From 89fd704af6c65fdb141f08c025b9bde6c3a2e9d8 Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Mon, 30 Sep 2024 16:21:19 +0200 Subject: [PATCH 001/129] fix(admin): replace GeoModelAdmin by GISModelAdmin --- metabase/admin.py | 2 +- public_data/admin/CeremaAdmin.py | 2 +- public_data/admin/CommuneAdmin.py | 2 +- public_data/admin/CommunePopAdmin.py | 2 +- public_data/admin/DepartementAdmin.py | 2 +- public_data/admin/EpciAdmin.py | 2 +- public_data/admin/OcsgeAdmin.py | 2 +- public_data/admin/OcsgeArtificialAreaAdmin.py | 2 +- public_data/admin/OcsgeCommuneDiffAdmin.py | 2 +- public_data/admin/OcsgeCommuneSolAdmin.py | 2 +- public_data/admin/OcsgeDiffAdmin.py | 2 +- public_data/admin/OcsgeZoneConstruiteAdmin.py | 2 +- public_data/admin/RegionAdmin.py | 2 +- public_data/admin/ScotAdmin.py | 2 +- public_data/admin/SudocuhAdmin.py | 2 +- public_data/admin/SudocuhEpciAdmin.py | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/metabase/admin.py b/metabase/admin.py index 50dc5e3f4..510b74cd3 100644 --- a/metabase/admin.py +++ b/metabase/admin.py @@ -4,7 +4,7 @@ @admin.register(StatDiagnostic) -class StatDiagnosticAdmin(admin.GeoModelAdmin): +class StatDiagnosticAdmin(admin.GISModelAdmin): model = StatDiagnostic list_display = ( "created_date", diff --git a/public_data/admin/CeremaAdmin.py b/public_data/admin/CeremaAdmin.py index 47a3b9e00..f266f6526 100644 --- a/public_data/admin/CeremaAdmin.py +++ b/public_data/admin/CeremaAdmin.py @@ -4,7 +4,7 @@ @admin.register(Cerema) -class CeremaAdmin(admin.GeoModelAdmin): +class CeremaAdmin(admin.GISModelAdmin): model = Cerema list_display = ( "city_insee", diff --git a/public_data/admin/CommuneAdmin.py b/public_data/admin/CommuneAdmin.py index 6c53c6005..c4236eb8e 100644 --- a/public_data/admin/CommuneAdmin.py +++ b/public_data/admin/CommuneAdmin.py @@ -4,7 +4,7 @@ @admin.register(Commune) -class CommuneAdmin(admin.GeoModelAdmin): +class CommuneAdmin(admin.GISModelAdmin): model = Commune list_display = ( "insee", diff --git a/public_data/admin/CommunePopAdmin.py b/public_data/admin/CommunePopAdmin.py index 2b6526ba1..1f21922cf 100644 --- a/public_data/admin/CommunePopAdmin.py +++ b/public_data/admin/CommunePopAdmin.py @@ -4,5 +4,5 @@ @admin.register(CommunePop) -class CommunePopAdmin(admin.GeoModelAdmin): +class CommunePopAdmin(admin.GISModelAdmin): model = CommunePop diff --git a/public_data/admin/DepartementAdmin.py b/public_data/admin/DepartementAdmin.py index e75296b13..eb0987621 100644 --- a/public_data/admin/DepartementAdmin.py +++ b/public_data/admin/DepartementAdmin.py @@ -4,7 +4,7 @@ @admin.register(Departement) -class DepartementAdmin(admin.GeoModelAdmin): +class DepartementAdmin(admin.GISModelAdmin): model = Departement list_display = ( "id", diff --git a/public_data/admin/EpciAdmin.py b/public_data/admin/EpciAdmin.py index 467e81cf6..570e3e057 100644 --- a/public_data/admin/EpciAdmin.py +++ b/public_data/admin/EpciAdmin.py @@ -4,7 +4,7 @@ @admin.register(Epci) -class EpciAdmin(admin.GeoModelAdmin): +class EpciAdmin(admin.GISModelAdmin): model = Epci list_display = ( "id", diff --git a/public_data/admin/OcsgeAdmin.py b/public_data/admin/OcsgeAdmin.py index c2b387061..943ca2343 100644 --- a/public_data/admin/OcsgeAdmin.py +++ b/public_data/admin/OcsgeAdmin.py @@ -4,7 +4,7 @@ @admin.register(Ocsge) -class OcsgeAdmin(admin.GeoModelAdmin): +class OcsgeAdmin(admin.GISModelAdmin): model = Ocsge list_display = ( "id", diff --git a/public_data/admin/OcsgeArtificialAreaAdmin.py b/public_data/admin/OcsgeArtificialAreaAdmin.py index 6a2261666..4536373e0 100644 --- a/public_data/admin/OcsgeArtificialAreaAdmin.py +++ b/public_data/admin/OcsgeArtificialAreaAdmin.py @@ -4,5 +4,5 @@ @admin.register(ArtificialArea) -class OcsgeArtificialAreaAdmin(admin.GeoModelAdmin): +class OcsgeArtificialAreaAdmin(admin.GISModelAdmin): model = ArtificialArea diff --git a/public_data/admin/OcsgeCommuneDiffAdmin.py b/public_data/admin/OcsgeCommuneDiffAdmin.py index 1a0f5f9ec..fcc0ce327 100644 --- a/public_data/admin/OcsgeCommuneDiffAdmin.py +++ b/public_data/admin/OcsgeCommuneDiffAdmin.py @@ -4,5 +4,5 @@ @admin.register(CommuneDiff) -class OcsgeCommuneDiffAdmin(admin.GeoModelAdmin): +class OcsgeCommuneDiffAdmin(admin.GISModelAdmin): model = CommuneDiff diff --git a/public_data/admin/OcsgeCommuneSolAdmin.py b/public_data/admin/OcsgeCommuneSolAdmin.py index 07bd2b3b3..18b2f4050 100644 --- a/public_data/admin/OcsgeCommuneSolAdmin.py +++ b/public_data/admin/OcsgeCommuneSolAdmin.py @@ -4,5 +4,5 @@ @admin.register(CommuneSol) -class OcsgeCommuneSolAdmin(admin.GeoModelAdmin): +class OcsgeCommuneSolAdmin(admin.GISModelAdmin): model = CommuneSol diff --git a/public_data/admin/OcsgeDiffAdmin.py b/public_data/admin/OcsgeDiffAdmin.py index b94cd3d14..e25629458 100644 --- a/public_data/admin/OcsgeDiffAdmin.py +++ b/public_data/admin/OcsgeDiffAdmin.py @@ -4,5 +4,5 @@ @admin.register(OcsgeDiff) -class OcsgeDiffAdmin(admin.GeoModelAdmin): +class OcsgeDiffAdmin(admin.GISModelAdmin): model = OcsgeDiff diff --git a/public_data/admin/OcsgeZoneConstruiteAdmin.py b/public_data/admin/OcsgeZoneConstruiteAdmin.py index fd2ddffff..0dbc17c6c 100644 --- a/public_data/admin/OcsgeZoneConstruiteAdmin.py +++ b/public_data/admin/OcsgeZoneConstruiteAdmin.py @@ -4,5 +4,5 @@ @admin.register(ZoneConstruite) -class OcsgeZoneConstruiteAdmin(admin.GeoModelAdmin): +class OcsgeZoneConstruiteAdmin(admin.GISModelAdmin): model = ZoneConstruite diff --git a/public_data/admin/RegionAdmin.py b/public_data/admin/RegionAdmin.py index 8f769583a..7853dab48 100644 --- a/public_data/admin/RegionAdmin.py +++ b/public_data/admin/RegionAdmin.py @@ -4,7 +4,7 @@ @admin.register(Region) -class RegionAdmin(admin.GeoModelAdmin): +class RegionAdmin(admin.GISModelAdmin): model = Region list_display = ( "id", diff --git a/public_data/admin/ScotAdmin.py b/public_data/admin/ScotAdmin.py index 516de0024..675802566 100644 --- a/public_data/admin/ScotAdmin.py +++ b/public_data/admin/ScotAdmin.py @@ -4,5 +4,5 @@ @admin.register(Scot) -class ScotAdmin(admin.GeoModelAdmin): +class ScotAdmin(admin.GISModelAdmin): model = Scot diff --git a/public_data/admin/SudocuhAdmin.py b/public_data/admin/SudocuhAdmin.py index f03dc9ffe..82e0a6ff1 100644 --- a/public_data/admin/SudocuhAdmin.py +++ b/public_data/admin/SudocuhAdmin.py @@ -4,7 +4,7 @@ @admin.register(Sudocuh) -class SudocuhAdmin(admin.GeoModelAdmin): +class SudocuhAdmin(admin.GISModelAdmin): model = Sudocuh list_display = ( "nom_commune", diff --git a/public_data/admin/SudocuhEpciAdmin.py b/public_data/admin/SudocuhEpciAdmin.py index e289a846b..cf6ce8b15 100644 --- a/public_data/admin/SudocuhEpciAdmin.py +++ b/public_data/admin/SudocuhEpciAdmin.py @@ -4,7 +4,7 @@ @admin.register(SudocuhEpci) -class SudocuhEpciAdmin(admin.GeoModelAdmin): +class SudocuhEpciAdmin(admin.GISModelAdmin): model = SudocuhEpci list_display = ( "nom_epci", From c4558a0a14748c35984f3790483ce7c8bc0dec69 Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Wed, 2 Oct 2024 14:32:11 +0200 Subject: [PATCH 002/129] feat(majic): add ingest_majic dag to airflow --- airflow/dags/ingest_admin_express.py | 36 ++--- airflow/dags/ingest_majic.py | 103 +++++++++++++ airflow/include/majic/sources.json | 32 ++++ airflow/include/sql/sparte/dbt_project.yml | 2 + airflow/include/sql/sparte/macros/majic.sql | 139 ++++++++++++++++++ .../sql/sparte/models/majic/consommation.sql | 26 ++++ .../models/majic/consommation_guadeloupe.sql | 1 + .../models/majic/consommation_guyane.sql | 1 + .../models/majic/consommation_martinique.sql | 1 + .../models/majic/consommation_metropole.sql | 3 + .../models/majic/consommation_reunion.sql | 1 + .../sql/sparte/models/majic/schema.yml | 46 ++++++ 12 files changed, 373 insertions(+), 18 deletions(-) create mode 100644 airflow/dags/ingest_majic.py create mode 100644 airflow/include/majic/sources.json create mode 100644 airflow/include/sql/sparte/macros/majic.sql create mode 100644 airflow/include/sql/sparte/models/majic/consommation.sql create mode 100644 airflow/include/sql/sparte/models/majic/consommation_guadeloupe.sql create mode 100644 airflow/include/sql/sparte/models/majic/consommation_guyane.sql create mode 100644 airflow/include/sql/sparte/models/majic/consommation_martinique.sql create mode 100644 airflow/include/sql/sparte/models/majic/consommation_metropole.sql create mode 100644 airflow/include/sql/sparte/models/majic/consommation_reunion.sql create mode 100644 airflow/include/sql/sparte/models/majic/schema.yml diff --git a/airflow/dags/ingest_admin_express.py b/airflow/dags/ingest_admin_express.py index 72bb9ac15..4c6781ce7 100644 --- a/airflow/dags/ingest_admin_express.py +++ b/airflow/dags/ingest_admin_express.py @@ -39,51 +39,46 @@ def get_source_by_name(name: str) -> dict: type="string", enum=zones, ), - "refresh_source": Param( - default=False, - description="Rafraîchir la source", - type="boolean", - ), }, ) def ingest_admin_express(): bucket_name = "airflow-staging" + tmp_path = "/tmp/admin_express" @task.python def download_admin_express(**context) -> str: + print(context["params"]["zone"]) url = get_source_by_name(context["params"]["zone"])["url"] - + print(url) filename = url.split("/")[-1] + print(filename) path_on_bucket = f"{bucket_name}/{filename}" print(path_on_bucket) - - file_exists = Container().s3().exists(path_on_bucket) - - if file_exists and not context["params"]["refresh_source"]: - return path_on_bucket - opener = URLopener() opener.addheader("User-Agent", "Mozilla/5.0") opener.retrieve(url=url, filename=filename) - Container().s3().put_file(filename, path_on_bucket) - + os.remove(filename) return path_on_bucket @task.python def ingest(path_on_bucket, **context) -> str: - srid = get_source_by_name(context["params"]["zone"])["srid"] - shp_to_table_map = get_source_by_name(context["params"]["zone"])["shapefile_to_table"] + source = get_source_by_name(context["params"]["zone"]) + srid = source["srid"] + print(srid) + shp_to_table_map = source["shapefile_to_table"] + print(shp_to_table_map) with Container().s3().open(path_on_bucket, "rb") as f: - py7zr.SevenZipFile(f, mode="r").extractall() - for dirpath, _, filenames in os.walk("."): + py7zr.SevenZipFile(f, mode="r").extractall(path=tmp_path) + for dirpath, _, filenames in os.walk(tmp_path): for filename in filenames: if filename.endswith(".shp"): table_name = shp_to_table_map.get(filename) if not table_name: continue path = os.path.abspath(os.path.join(dirpath, filename)) + print(path) cmd = [ "ogr2ogr", "-f", @@ -113,9 +108,14 @@ def dbt_run(**context): dbt_run_cmd = f"dbt build -s {dbt_selector}" return 'cd "${AIRFLOW_HOME}/include/sql/sparte" && ' + dbt_run_cmd + @task.bash + def cleanup() -> str: + return f"rm -rf {tmp_path}" + path_on_bucket = download_admin_express() ingest_result = ingest(path_on_bucket) ingest_result >> dbt_run() + ingest_result >> cleanup() # Instantiate the DAG diff --git a/airflow/dags/ingest_majic.py b/airflow/dags/ingest_majic.py new file mode 100644 index 000000000..b228fa29f --- /dev/null +++ b/airflow/dags/ingest_majic.py @@ -0,0 +1,103 @@ +import json +import os +import shutil +import subprocess +from typing import List +from zipfile import ZipFile + +from airflow.decorators import dag, task +from airflow.operators.python import PythonOperator +from include.container import Container +from include.pools import DBT_POOL +from pendulum import datetime + +with open("include/majic/sources.json", "r") as f: + sources = json.load(f) + +BUCKET_NAME = "airflow-staging" +TMP_PATH = "/tmp/majic" + + +def ogr_load_to_postgres(source: dict): + shapefile_on_s3 = source["shapefile_on_s3"] + srid = source["srid"] + table_name = source["table_name"] + path_on_bucket = f"{BUCKET_NAME}/{shapefile_on_s3}" + + with Container().s3().open(path_on_bucket, "rb") as f: + zip_file = ZipFile(f) + tmp_path = f"{TMP_PATH}/{table_name}" + zip_file.extractall(tmp_path) + for dirpath, _, filenames in os.walk(tmp_path): + for filename in filenames: + if filename.endswith(".shp"): + path = os.path.abspath(os.path.join(dirpath, filename)) + cmd = [ + "ogr2ogr", + "-f", + '"PostgreSQL"', + f'"{Container().gdal_dbt_conn().encode()}"', + "-overwrite", + "-lco", + "GEOMETRY_NAME=geom", + "-a_srs", + f"EPSG:{srid}", + "-nlt", + "MULTIPOLYGON", + "-nlt", + "PROMOTE_TO_MULTI", + "-nln", + table_name, + path, + "--config", + "PG_USE_COPY", + "YES", + ] + subprocess.run(" ".join(cmd), shell=True, check=True) + + shutil.rmtree(TMP_PATH) + + +@dag( + start_date=datetime(2024, 1, 1), + schedule="@once", + catchup=False, + max_active_runs=1, + default_args={"owner": "Alexis Athlani", "retries": 3}, + tags=["Majic", "Cerema"], +) +def ingest_majic(): + # Les fichiers de consommation d'espace sont sur le dropbox du Cerema + # Ils ne sont pas acessibles programmatiquement, donc il faut les télécharger manuellement + # et les mettre dans le bucket airflow-staging, dans le dossier majic + + ingest_tasks: List[PythonOperator] = [] + + for source in sources: + ingest_task = PythonOperator( + task_id=f"ingest_{source['table_name']}", + python_callable=ogr_load_to_postgres, + op_kwargs={"source": source}, + ) + ingest_tasks.append(ingest_task) + + @task.bash(pool=DBT_POOL) + def dbt_build() -> str: + return 'cd "${AIRFLOW_HOME}/include/sql/sparte" && dbt build -s +consommation.sql+' + + @task.bash() + def cleanup() -> str: + return f"rm -rf {TMP_PATH}" + + # run ingest tasks sequentially + for i in range(len(ingest_tasks) - 1): + ingest_tasks[i] >> ingest_tasks[i + 1] + + build = dbt_build() + cleanup_task = cleanup() + + ingest_tasks[-1].set_downstream(build) + build.set_downstream(cleanup_task) + + +ingest_majic() diff --git a/airflow/include/majic/sources.json b/airflow/include/majic/sources.json new file mode 100644 index 000000000..402e53ba1 --- /dev/null +++ b/airflow/include/majic/sources.json @@ -0,0 +1,32 @@ +[ + { + "name": "France Métropolitaine", + "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023.zip", + "srid": 2154, + "table_name": "majic_france_metropolitaine" + }, + { + "name": "Guadeloupe", + "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_971.zip", + "srid": 32620, + "table_name": "majic_guadeloupe" + }, + { + "name": "Martinique", + "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_972.zip", + "srid": 32620, + "table_name": "majic_martinique" + }, + { + "name": "Guyane", + "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_973.zip", + "srid": 2972, + "table_name": "majic_guyane" + }, + { + "name": "La Réunion", + "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_974.zip", + "srid": 2975, + "table_name": "majic_la_reunion" + } +] \ No newline at end of file diff --git a/airflow/include/sql/sparte/dbt_project.yml b/airflow/include/sql/sparte/dbt_project.yml index 7e5c37694..8ac978d04 100644 --- a/airflow/include/sql/sparte/dbt_project.yml +++ b/airflow/include/sql/sparte/dbt_project.yml @@ -24,3 +24,5 @@ models: +schema: admin_express gpu: +schema: gpu + majic: + +schema: majic diff --git a/airflow/include/sql/sparte/macros/majic.sql b/airflow/include/sql/sparte/macros/majic.sql new file mode 100644 index 000000000..9118caba8 --- /dev/null +++ b/airflow/include/sql/sparte/macros/majic.sql @@ -0,0 +1,139 @@ + +{% macro majic(source_table_name) %} + {{ config(materialized='table') }} + + SELECT + idcom as commune_code, + idcomtxt as commune_name, + idreg as region_code, + idregtxt as region_name, + iddep as departement_code, + iddeptxt as departement_name, + epci23 as epci_code, + epci23txt as epci_name, + scot as scot_name, + aav2020 as aire_attraction_ville, + aav2020txt as tranche_aire_attraction_ville, + aav2020_ty as typologie_aire_attraction_ville, + naf09art10 as conso_2009_2010, + art09act10 as conso_2009_2010_activite, + art09hab10 as conso_2009_2010_habitat, + art09mix10 as conso_2009_2010_mixte, + art09rou10 as conso_2009_2010_route, + art09fer10 as conso_2009_2010_ferroviaire, + art09inc10 as conso_2009_2010_inconnu, + naf10art11 as conso_2010_2011, + art10act11 as conso_2010_2011_activite, + art10hab11 as conso_2010_2011_habitat, + art10mix11 as conso_2010_2011_mixte, + art10rou11 as conso_2010_2011_route, + art10fer11 as conso_2010_2011_ferroviaire, + art10inc11 as conso_2010_2011_inconnu, + naf11art12 as conso_2011_2012, + art11act12 as conso_2011_2012_activite, + art11hab12 as conso_2011_2012_habitat, + art11mix12 as conso_2011_2012_mixte, + art11rou12 as conso_2011_2012_route, + art11fer12 as conso_2011_2012_ferroviaire, + art11inc12 as conso_2011_2012_inconnu, + naf12art13 as conso_2012_2013, + art12act13 as conso_2012_2013_activite, + art12hab13 as conso_2012_2013_habitat, + art12mix13 as conso_2012_2013_mixte, + art12rou13 as conso_2012_2013_route, + art12fer13 as conso_2012_2013_ferroviaire, + art12inc13 as conso_2012_2013_inconnu, + naf13art14 as conso_2013_2014, + art13act14 as conso_2013_2014_activite, + art13hab14 as conso_2013_2014_habitat, + art13mix14 as conso_2013_2014_mixte, + art13rou14 as conso_2013_2014_route, + art13fer14 as conso_2013_2014_ferroviaire, + art13inc14 as conso_2013_2014_inconnu, + naf14art15 as conso_2014_2015, + art14act15 as conso_2014_2015_activite, + art14hab15 as conso_2014_2015_habitat, + art14mix15 as conso_2014_2015_mixte, + art14rou15 as conso_2014_2015_route, + art14fer15 as conso_2014_2015_ferroviaire, + art14inc15 as conso_2014_2015_inconnu, + naf15art16 as conso_2015_2016, + art15act16 as conso_2015_2016_activite, + art15hab16 as conso_2015_2016_habitat, + art15mix16 as conso_2015_2016_mixte, + art15rou16 as conso_2015_2016_route, + art15fer16 as conso_2015_2016_ferroviaire, + art15inc16 as conso_2015_2016_inconnu, + naf16art17 as conso_2016_2017, + art16act17 as conso_2016_2017_activite, + art16hab17 as conso_2016_2017_habitat, + art16mix17 as conso_2016_2017_mixte, + art16rou17 as conso_2016_2017_route, + art16fer17 as conso_2016_2017_ferroviaire, + art16inc17 as conso_2016_2017_inconnu, + naf17art18 as conso_2017_2018, + art17act18 as conso_2017_2018_activite, + art17hab18 as conso_2017_2018_habitat, + art17mix18 as conso_2017_2018_mixte, + art17rou18 as conso_2017_2018_route, + art17fer18 as conso_2017_2018_ferroviaire, + art17inc18 as conso_2017_2018_inconnu, + naf18art19 as conso_2018_2019, + art18act19 as conso_2018_2019_activite, + art18hab19 as conso_2018_2019_habitat, + art18mix19 as conso_2018_2019_mixte, + art18rou19 as conso_2018_2019_route, + art18fer19 as conso_2018_2019_ferroviaire, + art18inc19 as conso_2018_2019_inconnu, + naf19art20 as conso_2019_2020, + art19act20 as conso_2019_2020_activite, + art19hab20 as conso_2019_2020_habitat, + art19mix20 as conso_2019_2020_mixte, + art19rou20 as conso_2019_2020_route, + art19fer20 as conso_2019_2020_ferroviaire, + art19inc20 as conso_2019_2020_inconnu, + naf20art21 as conso_2020_2021, + art20act21 as conso_2020_2021_activite, + art20hab21 as conso_2020_2021_habitat, + art20mix21 as conso_2020_2021_mixte, + art20rou21 as conso_2020_2021_route, + art20fer21 as conso_2020_2021_ferroviaire, + art20inc21 as conso_2020_2021_inconnu, + naf21art22 as conso_2021_2022, + art21act22 as conso_2021_2022_activite, + art21hab22 as conso_2021_2022_habitat, + art21mix22 as conso_2021_2022_mixte, + art21rou22 as conso_2021_2022_route, + art21fer22 as conso_2021_2022_ferroviaire, + art21inc22 as conso_2021_2022_inconnu, + naf22art23 as conso_2022_2023, + art22act23 as conso_2022_2023_activite, + art22hab23 as conso_2022_2023_habitat, + art22mix23 as conso_2022_2023_mixte, + art22rou23 as conso_2022_2023_route, + art22fer23 as conso_2022_2023_ferroviaire, + art22inc23 as conso_2022_2023_inconnu, + naf09art23 as conso_2009_2023, + art09act23 as conso_2009_2023_activite, + art09hab23 as conso_2009_2023_habitat, + art09mix23 as conso_2009_2023_mixte, + art09rou23 as conso_2009_2023_route, + art09fer23 as conso_2009_2023_ferroviaire, + art09inc23 as conso_2009_2023_inconnu, + pop14 as population_2014, + pop20 as population_2020, + pop1420 as population_variation_2014_2020, + men14 as menages_2014, + men20 as menages_2020, + men1420 as menages_variation_2014_2020, + emp14 as emplois_2014, + emp20 as emplois_2020, + emp1420 as emplois_variation_2014_2020, + mepart1420 as nouveaux_menages_et_emplois_par_ha_2014_2020, -- Nombre de ménages + emplois supplémentaire par ha artificialisé (période 2014-2020). Égal à (men1420 + emp1420) / (naf14art20/10000) + menhab1420 as nouveaux_menages_par_ha_consomme_pour_habitat_2014_2020, -- Nombre de ménages par ha artificialisé à destination de l’habitat (période 2014-2020). Égal à men1420 / (art14hab20 / 10000) + artpop1420 as metre_carre_consomme_par_nouveau_habitant_2014_2020, -- Nombre de m² artificialisé par habitant supplémentaire (période 2014-2020). Égal à naf14art20 / pop1420 + surfcom202 as surface_commune_metre_carre_2020, + geom + FROM + {{ source('public', source_table_name) }} +{% endmacro %} diff --git a/airflow/include/sql/sparte/models/majic/consommation.sql b/airflow/include/sql/sparte/models/majic/consommation.sql new file mode 100644 index 000000000..880c39e76 --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/consommation.sql @@ -0,0 +1,26 @@ +{{ config(materialized='table') }} + +SELECT + *, + 32620 AS srid_source +FROM {{ ref('consommation_guadeloupe') }} +UNION ALL +SELECT + *, + 32620 AS srid_source +FROM {{ ref('consommation_martinique') }} +UNION ALL +SELECT + *, + 2972 AS srid_source +FROM {{ ref('consommation_guyane') }} +UNION ALL +SELECT + *, + 2975 AS srid_source +FROM {{ ref('consommation_reunion') }} +UNION ALL +SELECT + *, + 2154 AS srid_source +FROM {{ ref('consommation_metropole') }} diff --git a/airflow/include/sql/sparte/models/majic/consommation_guadeloupe.sql b/airflow/include/sql/sparte/models/majic/consommation_guadeloupe.sql new file mode 100644 index 000000000..cb69d38ff --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/consommation_guadeloupe.sql @@ -0,0 +1 @@ +{{ majic('majic_guadeloupe') }} diff --git a/airflow/include/sql/sparte/models/majic/consommation_guyane.sql b/airflow/include/sql/sparte/models/majic/consommation_guyane.sql new file mode 100644 index 000000000..51d0f9bf9 --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/consommation_guyane.sql @@ -0,0 +1 @@ +{{ majic('majic_guyane') }} diff --git a/airflow/include/sql/sparte/models/majic/consommation_martinique.sql b/airflow/include/sql/sparte/models/majic/consommation_martinique.sql new file mode 100644 index 000000000..3f7456751 --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/consommation_martinique.sql @@ -0,0 +1 @@ +{{ majic('majic_martinique') }} diff --git a/airflow/include/sql/sparte/models/majic/consommation_metropole.sql b/airflow/include/sql/sparte/models/majic/consommation_metropole.sql new file mode 100644 index 000000000..495263e93 --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/consommation_metropole.sql @@ -0,0 +1,3 @@ +{{ majic('majic_france_metropolitaine') }} +WHERE + iddep NOT IN ('971', '972', '973', '974') diff --git a/airflow/include/sql/sparte/models/majic/consommation_reunion.sql b/airflow/include/sql/sparte/models/majic/consommation_reunion.sql new file mode 100644 index 000000000..4003e3a20 --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/consommation_reunion.sql @@ -0,0 +1 @@ +{{ majic('majic_la_reunion') }} diff --git a/airflow/include/sql/sparte/models/majic/schema.yml b/airflow/include/sql/sparte/models/majic/schema.yml new file mode 100644 index 000000000..276a4e40d --- /dev/null +++ b/airflow/include/sql/sparte/models/majic/schema.yml @@ -0,0 +1,46 @@ + +version: 2 + +models: + - name: consommation + columns: + - name: commune_code + data_tests: + - not_null + - unique + - name: commune_name + data_tests: + - not_null + - name: region_code + data_tests: + - not_null + - relationships: + to: ref('region') + field: code + - name: region_name + data_tests: + - not_null + - name: departement_code + data_tests: + - not_null + - relationships: + to: ref('departement') + field: code + - name: departement_name + data_tests: + - not_null + - name: epci_code + data_tests: + - not_null + - name: epci_name + data_tests: + - not_null + +sources: + - name: public + tables: + - name: majic_france_metropolitaine + - name: majic_guadeloupe + - name: majic_guyane + - name: majic_martinique + - name: majic_la_reunion From f5d29b8fa41d33528022429a500a5b550c216dcb Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Wed, 2 Oct 2024 20:25:32 +0200 Subject: [PATCH 003/129] feat(ingest_majic): code cleanup --- airflow/dags/ingest_majic.py | 68 +++++++++---------- .../majic/{sources.json => sources.py} | 16 ++--- airflow/include/utils.py | 32 +++++++++ 3 files changed, 73 insertions(+), 43 deletions(-) rename airflow/include/majic/{sources.json => sources.py} (74%) diff --git a/airflow/dags/ingest_majic.py b/airflow/dags/ingest_majic.py index b228fa29f..092067025 100644 --- a/airflow/dags/ingest_majic.py +++ b/airflow/dags/ingest_majic.py @@ -1,5 +1,3 @@ -import json -import os import shutil import subprocess from typing import List @@ -8,17 +6,19 @@ from airflow.decorators import dag, task from airflow.operators.python import PythonOperator from include.container import Container +from include.majic.sources import sources from include.pools import DBT_POOL +from include.utils import ( + get_dbt_command_from_directory, + get_first_shapefile_path_in_dir, +) from pendulum import datetime -with open("include/majic/sources.json", "r") as f: - sources = json.load(f) - BUCKET_NAME = "airflow-staging" TMP_PATH = "/tmp/majic" -def ogr_load_to_postgres(source: dict): +def load_shapefile_to_postgres(source: dict): shapefile_on_s3 = source["shapefile_on_s3"] srid = source["srid"] table_name = source["table_name"] @@ -28,32 +28,29 @@ def ogr_load_to_postgres(source: dict): zip_file = ZipFile(f) tmp_path = f"{TMP_PATH}/{table_name}" zip_file.extractall(tmp_path) - for dirpath, _, filenames in os.walk(tmp_path): - for filename in filenames: - if filename.endswith(".shp"): - path = os.path.abspath(os.path.join(dirpath, filename)) - cmd = [ - "ogr2ogr", - "-f", - '"PostgreSQL"', - f'"{Container().gdal_dbt_conn().encode()}"', - "-overwrite", - "-lco", - "GEOMETRY_NAME=geom", - "-a_srs", - f"EPSG:{srid}", - "-nlt", - "MULTIPOLYGON", - "-nlt", - "PROMOTE_TO_MULTI", - "-nln", - table_name, - path, - "--config", - "PG_USE_COPY", - "YES", - ] - subprocess.run(" ".join(cmd), shell=True, check=True) + shapefile_path = get_first_shapefile_path_in_dir(tmp_path) + cmd = [ + "ogr2ogr", + "-f", + '"PostgreSQL"', + f'"{Container().gdal_dbt_conn().encode()}"', + "-overwrite", + "-lco", + "GEOMETRY_NAME=geom", + "-a_srs", + f"EPSG:{srid}", + "-nlt", + "MULTIPOLYGON", + "-nlt", + "PROMOTE_TO_MULTI", + "-nln", + table_name, + shapefile_path, + "--config", + "PG_USE_COPY", + "YES", + ] + subprocess.run(" ".join(cmd), shell=True, check=True) shutil.rmtree(TMP_PATH) @@ -76,26 +73,27 @@ def ingest_majic(): for source in sources: ingest_task = PythonOperator( task_id=f"ingest_{source['table_name']}", - python_callable=ogr_load_to_postgres, + python_callable=load_shapefile_to_postgres, op_kwargs={"source": source}, ) ingest_tasks.append(ingest_task) @task.bash(pool=DBT_POOL) def dbt_build() -> str: - return 'cd "${AIRFLOW_HOME}/include/sql/sparte" && dbt build -s +consommation.sql+' + return get_dbt_command_from_directory(cmd="dbt build -s +consommation.sql+") @task.bash() def cleanup() -> str: return f"rm -rf {TMP_PATH}" - # run ingest tasks sequentially for i in range(len(ingest_tasks) - 1): ingest_tasks[i] >> ingest_tasks[i + 1] build = dbt_build() cleanup_task = cleanup() + # Build the models and clean up the temporary files + # after all the ingest tasks have completed ingest_tasks[-1].set_downstream(build) build.set_downstream(cleanup_task) diff --git a/airflow/include/majic/sources.json b/airflow/include/majic/sources.py similarity index 74% rename from airflow/include/majic/sources.json rename to airflow/include/majic/sources.py index 402e53ba1..0bd6138f1 100644 --- a/airflow/include/majic/sources.json +++ b/airflow/include/majic/sources.py @@ -1,32 +1,32 @@ -[ +sources = [ { "name": "France Métropolitaine", "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023.zip", "srid": 2154, - "table_name": "majic_france_metropolitaine" + "table_name": "majic_france_metropolitaine", }, { "name": "Guadeloupe", "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_971.zip", "srid": 32620, - "table_name": "majic_guadeloupe" + "table_name": "majic_guadeloupe", }, { "name": "Martinique", "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_972.zip", "srid": 32620, - "table_name": "majic_martinique" + "table_name": "majic_martinique", }, { "name": "Guyane", "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_973.zip", "srid": 2972, - "table_name": "majic_guyane" + "table_name": "majic_guyane", }, { "name": "La Réunion", "shapefile_on_s3": "majic/obs_artif_conso_com_2009_2023_974.zip", "srid": 2975, - "table_name": "majic_la_reunion" - } -] \ No newline at end of file + "table_name": "majic_la_reunion", + }, +] diff --git a/airflow/include/utils.py b/airflow/include/utils.py index ec9aa141e..294710ff8 100644 --- a/airflow/include/utils.py +++ b/airflow/include/utils.py @@ -1,2 +1,34 @@ +import os + + def multiline_string_to_single_line(string: str) -> str: return string.replace("\n", " ").replace("\r", "") + + +def get_first_shapefile_path_in_dir(dir_path: str) -> str | None: + """ + Walk through a directory and return the first shapefile path found. + Raises a ValueError if multiple shapefiles are found. + """ + + shapefile_paths = [] + + for dirpath, _, filenames in os.walk(dir_path): + for filename in filenames: + if filename.endswith(".shp"): + shapefile_paths.append(os.path.abspath(os.path.join(dirpath, filename))) + + if len(shapefile_paths) > 1: + raise ValueError(f"Multiple shapefiles found in {dir_path}") + + if shapefile_paths: + return shapefile_paths[0] + + return None + + +def get_dbt_command_from_directory( + cmd: str, + directory="${AIRFLOW_HOME}/include/sql/sparte", +) -> str: + return f'cd "{directory}" && ' + cmd From d01f0c85e509765c20aab029d9c495ef4277a10c Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Wed, 2 Oct 2024 20:42:32 +0200 Subject: [PATCH 004/129] chore(cerema): remove unused files --- public_data/admin/DataSourceAdmin.py | 21 - public_data/admin/__init__.py | 2 - public_data/factories.py | 61 - public_data/loaders.py | 325 -- .../management/commands/load_cerema.py | 65 - public_data/managers.py | 0 public_data/migrations/0012_ocsge2015.py | 1 - public_data/migrations/0019_ocsge2018.py | 1 - .../migrations/0022_auto_20211025_2135.py | 1 - public_data/migrations/0028_consocerema.py | 1 - .../migrations/0031_auto_20211217_2220.py | 1 - public_data/migrations/0047_ocsgediff.py | 1 - .../migrations/0048_auto_20220504_1041.py | 1 - public_data/migrations/0064_artificialarea.py | 1 - .../0190_delete_datasource_delete_refplan.py | 18 + public_data/models/__init__.py | 3 +- public_data/models/data_source.py | 125 - public_data/models/data_source_fixture.json | 3522 ----------------- public_data/models/deprecated.py | 20 - public_data/models/mixins.py | 270 +- public_data/readme.MD | 72 - public_data/shapefile.py | 199 - 22 files changed, 20 insertions(+), 4691 deletions(-) delete mode 100644 public_data/admin/DataSourceAdmin.py delete mode 100644 public_data/factories.py delete mode 100644 public_data/loaders.py delete mode 100644 public_data/management/commands/load_cerema.py delete mode 100644 public_data/managers.py create mode 100644 public_data/migrations/0190_delete_datasource_delete_refplan.py delete mode 100644 public_data/models/data_source.py delete mode 100644 public_data/models/data_source_fixture.json delete mode 100644 public_data/models/deprecated.py delete mode 100644 public_data/readme.MD delete mode 100644 public_data/shapefile.py diff --git a/public_data/admin/DataSourceAdmin.py b/public_data/admin/DataSourceAdmin.py deleted file mode 100644 index 660bc152d..000000000 --- a/public_data/admin/DataSourceAdmin.py +++ /dev/null @@ -1,21 +0,0 @@ -from django.contrib.gis import admin - -from public_data.models import DataSource - - -@admin.register(DataSource) -class DataSourceAdmin(admin.ModelAdmin): - model = DataSource - list_display = ( - "dataset", - "name", - "official_land_id", - "millesimes", - ) - search_fields = ( - "productor", - "dataset", - "name", - "official_land_id", - ) - ordering = ("productor", "dataset", "name") diff --git a/public_data/admin/__init__.py b/public_data/admin/__init__.py index 9c45d9d89..d275a5c6d 100644 --- a/public_data/admin/__init__.py +++ b/public_data/admin/__init__.py @@ -1,7 +1,6 @@ from .CeremaAdmin import CeremaAdmin from .CommuneAdmin import CommuneAdmin from .CommunePopAdmin import CommunePopAdmin -from .DataSourceAdmin import DataSourceAdmin from .DepartementAdmin import DepartementAdmin from .EpciAdmin import EpciAdmin from .OcsgeAdmin import OcsgeAdmin @@ -19,7 +18,6 @@ "CeremaAdmin", "CommuneAdmin", "CommunePopAdmin", - "DataSourceAdmin", "DepartementAdmin", "EpciAdmin", "OcsgeAdmin", diff --git a/public_data/factories.py b/public_data/factories.py deleted file mode 100644 index 1ab11dcb2..000000000 --- a/public_data/factories.py +++ /dev/null @@ -1,61 +0,0 @@ -import logging -import re -import secrets -import string -from typing import Any, Callable, Dict, Tuple - -from public_data.models import DataSource - -logger = logging.getLogger(__name__) - - -class LayerMapperFactory: - def __init__(self, data_source: DataSource): - self.data_source = data_source - - def get_class_properties(self, module_name: str) -> Dict[str, Any]: - properties = { - "Meta": type("Meta", (), {"proxy": True}), - "shape_file_path": self.data_source.path, - "departement_id": self.data_source.official_land_id, - "srid": self.data_source.srid, - "__module__": module_name, - } - if self.data_source.mapping: - properties["mapping"] = self.data_source.mapping - return properties - - def get_base_class(self) -> Tuple: - """Return the base class from which the proxy should inherit from. - - The base class returned should be a child of AutoLoadMixin: - >>> if not issubclass(base_class, AutoLoadMixin): - >>> raise TypeError(f"Base class {base_class} should inherit from AutoLoadMixin.") - """ - raise NotImplementedError("You need to define which base class to use.") - - def get_class_name(self) -> str: - """Build a class name in KamelCase. - - Naming rule: Auto{data_name}{official_land_id}{year} - Example: AutoOcsgeDiff3220182021 - """ - unique_token = "".join(secrets.choice(string.ascii_lowercase) for _ in range(5)) - raw_words = [ - "Auto", - unique_token, - self.data_source.name, - self.data_source.official_land_id, - ] + list(map(str, self.data_source.millesimes)) - splited_words = [sub_word for word in raw_words for sub_word in word.split("_")] - cleaned_words = [re.sub(r"[\W_]", "", word) for word in splited_words] - class_name = "".join([word.capitalize() for word in cleaned_words if word]) - return class_name - - def get_layer_mapper_proxy_class(self, module_name: str = __name__) -> Callable: - logger.info("Create class for module=%s", module_name) - return type( - self.get_class_name(), - self.get_base_class(), - self.get_class_properties(module_name), - ) diff --git a/public_data/loaders.py b/public_data/loaders.py deleted file mode 100644 index 51e0ef0af..000000000 --- a/public_data/loaders.py +++ /dev/null @@ -1,325 +0,0 @@ -from typing import Self - -from django.contrib.gis.db.models.functions import Area -from django.db.models import DecimalField, F -from django.db.models.functions import Cast - -from public_data.models import ( - SRID, - AutoLoadMixin, - CouvertureUsageMatrix, - Ocsge, - OcsgeDiff, - ZoneConstruite, -) -from public_data.models.cerema import Cerema -from utils.db import DynamicSRIDTransform - - -# syntaxic sugar to avoid writing long line of code -# cache has been added to matrix_dict method -def get_matrix(cs, us): - return CouvertureUsageMatrix().matrix_dict()[(cs, us)] - - -class AutoOcsge(AutoLoadMixin, Ocsge): - class Meta: - proxy = True - - mapping = { - "id_source": "ID", - "couverture": "CODE_CS", - "usage": "CODE_US", - "mpoly": "MULTIPOLYGON", - } - - def save(self, *args, **kwargs) -> Self: - self.year = self.__class__._year - self.departement = self.__class__._departement - self.srid_source = self.srid - - self.matrix = get_matrix(self.couverture, self.usage) - self.is_artificial = bool(self.matrix.is_artificial) - - if self.matrix.couverture: - self.couverture_label = self.matrix.couverture.label - if self.matrix.usage: - self.usage_label = self.matrix.usage.label - - return super().save(*args, **kwargs) - - @classmethod - def clean_data(cls) -> None: - cls.objects.filter( - departement=cls._departement, - year=cls._year, - ).delete() - - @classmethod - def calculate_fields(cls) -> None: - cls.objects.filter( - departement=cls._departement, - year=cls._year, - ).update( - surface=Cast( - Area(DynamicSRIDTransform("mpoly", "srid_source")), - DecimalField(max_digits=15, decimal_places=4), - ) - ) - - -class AutoOcsgeDiff(AutoLoadMixin, OcsgeDiff): - class Meta: - proxy = True - - @classmethod - @property - def mapping(cls) -> dict[str, str]: - return { - "cs_old": f"CS_{cls._year_old}", - "us_old": f"US_{cls._year_old}", - "cs_new": f"CS_{cls._year_new}", - "us_new": f"US_{cls._year_new}", - "mpoly": "MULTIPOLYGON", - } - - def before_save(self) -> None: - self.year_new = self.__class__._year_new - self.year_old = self.__class__._year_old - self.departement = self.__class__._departement - self.srid_source = self.srid - - self.new_matrix = get_matrix(self.cs_new, self.us_new) - self.new_is_artif = bool(self.new_matrix.is_artificial) - - if self.new_matrix.couverture: - self.cs_new_label = self.new_matrix.couverture.label - - if self.new_matrix.usage: - self.us_new_label = self.new_matrix.usage.label - - self.old_matrix = get_matrix(self.cs_old, self.us_old) - self.old_is_artif = bool(self.old_matrix.is_artificial) - - if self.old_matrix.couverture: - self.cs_old_label = self.old_matrix.couverture.label - if self.old_matrix.usage: - self.us_old_label = self.old_matrix.usage.label - - self.is_new_artif = not self.old_is_artif and self.new_is_artif - self.is_new_natural = self.old_is_artif and not self.new_is_artif - - @classmethod - def calculate_fields(cls) -> None: - cls.objects.filter( - departement=cls._departement, - year_new=cls._year_new, - year_old=cls._year_old, - ).update( - surface=Cast( - Area(DynamicSRIDTransform("mpoly", "srid_source")), - DecimalField(max_digits=15, decimal_places=4), - ) - ) - - @classmethod - def clean_data(cls) -> None: - cls.objects.filter( - departement=cls._departement, - year_new=cls._year_new, - year_old=cls._year_old, - ).delete() - - -class AutoZoneConstruite(AutoLoadMixin, ZoneConstruite): - class Meta: - proxy = True - - mapping = { - "id_source": "ID", - "millesime": "MILLESIME", - "mpoly": "MULTIPOLYGON", - } - - def save(self, *args, **kwargs) -> Self: - self.year = int(self._year) - self.departement = self.__class__._departement - self.srid_source = self.srid - self.surface = self.mpoly.transform(self.srid, clone=True).area - self.departement = self._departement - return super().save(*args, **kwargs) - - @classmethod - def clean_data(cls) -> None: - cls.objects.filter( - departement=cls._departement, - year=cls._year, - ).delete() - - -class BaseLoadCerema(AutoLoadMixin, Cerema): - class Meta: - proxy = True - - mapping = { - "city_insee": "IDCOM", - "city_name": "IDCOMTXT", - "region_id": "IDREG", - "region_name": "IDREGTXT", - "dept_id": "IDDEP", - "dept_name": "IDDEPTXT", - "epci_id": "EPCI22", - "epci_name": "EPCI22TXT", - "scot": "SCOT", - "naf09art10": "NAF09ART10", - "art09act10": "ART09ACT10", - "art09hab10": "ART09HAB10", - "art09mix10": "ART09MIX10", - "art09rou10": "ART09ROU10", - "art09fer10": "ART09FER10", - "art09inc10": "ART09INC10", - "naf10art11": "NAF10ART11", - "art10act11": "ART10ACT11", - "art10hab11": "ART10HAB11", - "art10mix11": "ART10MIX11", - "art10rou11": "ART10ROU11", - "art10fer11": "ART10FER11", - "art10inc11": "ART10INC11", - "naf11art12": "NAF11ART12", - "art11act12": "ART11ACT12", - "art11hab12": "ART11HAB12", - "art11mix12": "ART11MIX12", - "art11rou12": "ART11ROU12", - "art11fer12": "ART11FER12", - "art11inc12": "ART11INC12", - "naf12art13": "NAF12ART13", - "art12act13": "ART12ACT13", - "art12hab13": "ART12HAB13", - "art12mix13": "ART12MIX13", - "art12rou13": "ART12ROU13", - "art12fer13": "ART12FER13", - "art12inc13": "ART12INC13", - "naf13art14": "NAF13ART14", - "art13act14": "ART13ACT14", - "art13hab14": "ART13HAB14", - "art13mix14": "ART13MIX14", - "art13rou14": "ART13ROU14", - "art13fer14": "ART13FER14", - "art13inc14": "ART13INC14", - "naf14art15": "NAF14ART15", - "art14act15": "ART14ACT15", - "art14hab15": "ART14HAB15", - "art14mix15": "ART14MIX15", - "art14rou15": "ART14ROU15", - "art14fer15": "ART14FER15", - "art14inc15": "ART14INC15", - "naf15art16": "NAF15ART16", - "art15act16": "ART15ACT16", - "art15hab16": "ART15HAB16", - "art15mix16": "ART15MIX16", - "art15rou16": "ART15ROU16", - "art15fer16": "ART15FER16", - "art15inc16": "ART15INC16", - "naf16art17": "NAF16ART17", - "art16act17": "ART16ACT17", - "art16hab17": "ART16HAB17", - "art16mix17": "ART16MIX17", - "art16rou17": "ART16ROU17", - "art16fer17": "ART16FER17", - "art16inc17": "ART16INC17", - "naf17art18": "NAF17ART18", - "art17act18": "ART17ACT18", - "art17hab18": "ART17HAB18", - "art17mix18": "ART17MIX18", - "art17rou18": "ART17ROU18", - "art17fer18": "ART17FER18", - "art17inc18": "ART17INC18", - "naf18art19": "NAF18ART19", - "art18act19": "ART18ACT19", - "art18hab19": "ART18HAB19", - "art18mix19": "ART18MIX19", - "art18rou19": "ART18ROU19", - "art18fer19": "ART18FER19", - "art18inc19": "ART18INC19", - "naf19art20": "NAF19ART20", - "art19act20": "ART19ACT20", - "art19hab20": "ART19HAB20", - "art19mix20": "ART19MIX20", - "art19rou20": "ART19ROU20", - "art19fer20": "ART19FER20", - "art19inc20": "ART19INC20", - "naf20art21": "NAF20ART21", - "art20act21": "ART20ACT21", - "art20hab21": "ART20HAB21", - "art20mix21": "ART20MIX21", - "art20rou21": "ART20ROU21", - "art20fer21": "ART20FER21", - "art20inc21": "ART20INC21", - "naf21art22": "NAF21ART22", - "art21act22": "ART21ACT22", - "art21hab22": "ART21HAB22", - "art21mix22": "ART21MIX22", - "art21rou22": "ART21ROU22", - "art21fer22": "ART21FER22", - "art21inc22": "ART21INC22", - "mpoly": "MULTIPOLYGON", - # mis dans la table tel quel (pas d'usage à date) - "naf09art22": "NAF09ART22", - "art09act22": "ART09ACT22", - "art09hab22": "ART09HAB22", - "art09mix22": "ART09MIX22", - "art09inc22": "ART09INC22", - "art09rou22": "ART09ROU22", - "art09fer22": "ART09FER22", - "artcom2020": "ARTCOM2020", - "pop13": "POP13", - "pop19": "POP19", - "pop1319": "POP1319", - "men13": "MEN13", - "men19": "MEN19", - "men1319": "MEN1319", - "emp13": "EMP13", - "emp19": "EMP19", - "emp1319": "EMP1319", - "mepart1319": "MEPART1319", - "menhab1319": "MENHAB1319", - "artpop1319": "ARTPOP1319", - "surfcom2022": "SURFCOM202", - "aav2020": "AAV2020", - "aav2020txt": "AAV2020TXT", - "aav2020_ty": "AAV2020_TY", - } - - def __str__(self): - return f"{self.region_name}-{self.dept_name}-{self.city_name}({self.city_insee})" - - @classmethod - def calculate_fields(cls): - """Calculate fields to speedup user consultation.""" - fields = cls.get_art_field(2011, 2020) - kwargs = { - "naf11art21": sum([F(f) for f in fields]), - "art11hab21": sum([F(f.replace("art", "hab").replace("naf", "art")) for f in fields]), - "art11act21": sum([F(f.replace("art", "act").replace("naf", "art")) for f in fields]), - } - cls.objects.update(**kwargs) - - @classmethod - def clean_data(cls): - cls.objects.filter(srid_source=SRID.LAMBERT_93).delete() - - -class BaseLoadCeremaDromCom(BaseLoadCerema): - """ - Base class for DROM COM - NOTE: we exclude surfcom2022 and artcom2020 because they are not available for DROM COM - """ - - class Meta: - proxy = True - - mapping = {k: v for k, v in BaseLoadCerema.mapping.items() if k not in ["surfcom2022", "artcom2020"]} - - @classmethod - def clean_data(cls) -> None: - return cls.objects.filter(dept_id=cls.departement_id).delete() diff --git a/public_data/management/commands/load_cerema.py b/public_data/management/commands/load_cerema.py deleted file mode 100644 index e25e03674..000000000 --- a/public_data/management/commands/load_cerema.py +++ /dev/null @@ -1,65 +0,0 @@ -import logging -from typing import Callable, Tuple - -from django.core.management.base import BaseCommand - -from public_data import loaders -from public_data.factories import LayerMapperFactory -from public_data.models import DataSource - -logger = logging.getLogger("management.commands") - - -class CeremaFactory(LayerMapperFactory): - def get_base_class(self) -> Tuple[Callable]: - base_class = loaders.BaseLoadCeremaDromCom - if self.data_source.official_land_id == "MetropoleEtCorse": - base_class = loaders.BaseLoadCerema - return (base_class,) - - -class Command(BaseCommand): - help = "Load data from Cerema" - - def add_arguments(self, parser): - parser.add_argument( - "--verbose", - action="store_true", - help="reduce output", - ) - parser.add_argument( - "--official_land_ids", - nargs="+", - type=int, - help="Select what to to load using official land id source's property", - ) - - def get_queryset(self): - """Filter sources of data to return only Cerema sources and MAJIC dataset.""" - return DataSource.objects.filter( - productor=DataSource.ProductorChoices.CEREMA, - dataset=DataSource.DatasetChoices.MAJIC, - ) - - def handle(self, *args, **options): - logger.info("Start load_cerema") - - sources = self.get_queryset() - - if options.get("official_land_ids"): - logger.info("filter on official_land_ids=%s", options["official_land_ids"]) - sources = sources.filter(official_land_id__in=options["official_land_ids"]) - - if not sources.exists(): - logger.warning("No data source found") - return - - logger.info("Nb sources found=%d", sources.count()) - - for source in sources: - factory = CeremaFactory(source) - layer_mapper_proxy_class = factory.get_layer_mapper_proxy_class(module_name=__name__) - logger.info("Process %s", layer_mapper_proxy_class.__name__) - layer_mapper_proxy_class.load() - - logger.info("End load_cerema") diff --git a/public_data/managers.py b/public_data/managers.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/public_data/migrations/0012_ocsge2015.py b/public_data/migrations/0012_ocsge2015.py index a59e314b7..d2c2813a4 100644 --- a/public_data/migrations/0012_ocsge2015.py +++ b/public_data/migrations/0012_ocsge2015.py @@ -60,7 +60,6 @@ class Migration(migrations.Migration): ], bases=( models.Model, - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, ), ), diff --git a/public_data/migrations/0019_ocsge2018.py b/public_data/migrations/0019_ocsge2018.py index e102ccaae..822a6e78a 100644 --- a/public_data/migrations/0019_ocsge2018.py +++ b/public_data/migrations/0019_ocsge2018.py @@ -103,7 +103,6 @@ class Migration(migrations.Migration): }, bases=( models.Model, - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, ), ), diff --git a/public_data/migrations/0022_auto_20211025_2135.py b/public_data/migrations/0022_auto_20211025_2135.py index 8331cfd6e..34c22a75a 100644 --- a/public_data/migrations/0022_auto_20211025_2135.py +++ b/public_data/migrations/0022_auto_20211025_2135.py @@ -111,7 +111,6 @@ class Migration(migrations.Migration): ], bases=( models.Model, - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, ), ), diff --git a/public_data/migrations/0028_consocerema.py b/public_data/migrations/0028_consocerema.py index 162c1762d..5f3f65679 100644 --- a/public_data/migrations/0028_consocerema.py +++ b/public_data/migrations/0028_consocerema.py @@ -59,7 +59,6 @@ class Migration(migrations.Migration): ), ], bases=( - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, models.Model, ), diff --git a/public_data/migrations/0031_auto_20211217_2220.py b/public_data/migrations/0031_auto_20211217_2220.py index 9a9759530..ce4d41b78 100644 --- a/public_data/migrations/0031_auto_20211217_2220.py +++ b/public_data/migrations/0031_auto_20211217_2220.py @@ -115,7 +115,6 @@ class Migration(migrations.Migration): ), ], bases=( - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, models.Model, ), diff --git a/public_data/migrations/0047_ocsgediff.py b/public_data/migrations/0047_ocsgediff.py index 4c8a41dcc..23e6116cd 100644 --- a/public_data/migrations/0047_ocsgediff.py +++ b/public_data/migrations/0047_ocsgediff.py @@ -150,7 +150,6 @@ class Migration(migrations.Migration): ("is_new_naf", models.BooleanField(blank=True, null=True)), ], bases=( - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, models.Model, ), diff --git a/public_data/migrations/0048_auto_20220504_1041.py b/public_data/migrations/0048_auto_20220504_1041.py index 8caf53534..7d1a16290 100644 --- a/public_data/migrations/0048_auto_20220504_1041.py +++ b/public_data/migrations/0048_auto_20220504_1041.py @@ -51,7 +51,6 @@ class Migration(migrations.Migration): ), ], bases=( - public_data.models.mixins.AutoLoadMixin, public_data.models.mixins.DataColorationMixin, models.Model, ), diff --git a/public_data/migrations/0064_artificialarea.py b/public_data/migrations/0064_artificialarea.py index 330286d5f..05edb32f2 100644 --- a/public_data/migrations/0064_artificialarea.py +++ b/public_data/migrations/0064_artificialarea.py @@ -53,7 +53,6 @@ class Migration(migrations.Migration): ), ], bases=( - public_data.models.mixins.TruncateTableMixin, public_data.models.mixins.DataColorationMixin, models.Model, ), diff --git a/public_data/migrations/0190_delete_datasource_delete_refplan.py b/public_data/migrations/0190_delete_datasource_delete_refplan.py new file mode 100644 index 000000000..5c3a8c406 --- /dev/null +++ b/public_data/migrations/0190_delete_datasource_delete_refplan.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.13 on 2024-10-02 18:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("public_data", "0189_alter_commune_options_alter_departement_options_and_more"), + ] + + operations = [ + migrations.DeleteModel( + name="DataSource", + ), + migrations.DeleteModel( + name="RefPlan", + ), + ] diff --git a/public_data/models/__init__.py b/public_data/models/__init__.py index ac022b959..ecb876f37 100644 --- a/public_data/models/__init__.py +++ b/public_data/models/__init__.py @@ -1,7 +1,6 @@ from .administration import * # noqa: F401, F403 +from .cerema import Cerema # noqa: F401 from .couverture_usage import * # noqa: F401, F403 -from .data_source import * # noqa: F401, F403 -from .deprecated import * # noqa: F401, F403 from .gpu import * # noqa: F401, F403 from .mixins import * # noqa: F401, F403 from .ocsge import ArtificialArea, Ocsge, OcsgeDiff, ZoneConstruite # noqa: F401, F403 diff --git a/public_data/models/data_source.py b/public_data/models/data_source.py deleted file mode 100644 index bd670ce07..000000000 --- a/public_data/models/data_source.py +++ /dev/null @@ -1,125 +0,0 @@ -from django.contrib.postgres.fields import ArrayField -from django.db import models - -from public_data.models.enums import SRID - -from .cerema import Cerema -from .ocsge import Ocsge, OcsgeDiff, ZoneConstruite - - -class DataSource(models.Model): - class Meta: - verbose_name = "Source de données" - verbose_name_plural = "Sources de données" - unique_together = ["productor", "dataset", "name", "millesimes", "official_land_id"] - ordering = ["official_land_id", "millesimes", "name"] - - class ProductorChoices(models.TextChoices): - IGN = "IGN", "Institut national de l'information géographique et forestière" - CEREMA = ( - "CEREMA", - "Centre d'études et d'expertise sur les risques, l'environnement, la mobilité et l'aménagement", - ) - MDA = "MDA", "Mon Diagnostic Artficialisation" - - class DatasetChoices(models.TextChoices): - OCSGE = "OCSGE", "Occupation du sol à grande échelle" - MAJIC = "MAJIC", "Mise A Jour des Informations Cadastrales" - ADMIN_EXPRESS = "ADMIN_EXPRESS", "ADMIN EXPRESS" - - class DataNameChoices(models.TextChoices): - OCCUPATION_DU_SOL = "OCCUPATION_DU_SOL", "Couverture et usage du sol" - DIFFERENCE = "DIFFERENCE", "Différence entre deux OCSGE" - ZONE_CONSTRUITE = "ZONE_CONSTRUITE", "Zone construite" - ZONE_ARTIFICIELLE = "ZONE_ARTIFICIELLE", "Zone artificielle" - CONSOMMATION_ESPACE = "CONSOMMATION_ESPACE", "Consommation d'espace" - DEPARTEMENTS = "DEPARTEMENTS", "Départements" - - productor = models.CharField("Producteur", max_length=255, choices=ProductorChoices.choices) - dataset = models.CharField("Jeu de donnée", max_length=255, choices=DatasetChoices.choices) - name = models.CharField( - "Nom", - max_length=255, - choices=DataNameChoices.choices, - help_text="Nom de la couche de données au sein du jeu de donnée", - ) - millesimes = ArrayField( - models.IntegerField(), - verbose_name="Millésime(s)", - blank=True, - null=True, - help_text="Séparer les années par une virgule si la donnée concerne plusieurs années", - ) - mapping = models.JSONField( - blank=True, null=True, help_text="A renseigner uniquement si le mapping n'est pas standard." - ) - path = models.CharField("Chemin sur S3", max_length=255) - shapefile_name = models.CharField("Nom du shapefile", max_length=255) - source_url = models.URLField( - "URL de la source", - blank=True, - null=True, - help_text="Cet URL peut-être le même pour plusieurs sources (par exemple, si contenu dans archive zip)", - ) - official_land_id = models.CharField( - verbose_name="ID du territoire", - help_text=( - "\nID officiel du territoire (code INSEE, SIREN, etc.)
" - "\nPeut-être vide si la donnée ne concerne pas un territoire spécifique" - "\n(par exemple, s'il concerne la France entière, ou un DROM-COM entier)" - ), - max_length=255, - ) - srid = models.IntegerField( - "SRID", - choices=SRID.choices, - default=SRID.LAMBERT_93, - ) - - def __str__(self) -> str: - return f"{self.productor} - {self.dataset} - {self.official_land_id} - {self.name} - {self.millesimes}" - - def millesimes_string(self) -> str: - return "_".join(map(str, self.millesimes)) - - def get_build_name(self) -> str: - return ( - "_".join( - [ - self.dataset, - self.name, - self.official_land_id, - "_".join(map(str, self.millesimes)), - self.ProductorChoices.MDA, - ] - ) - + ".shp.zip" - ) - - def delete_loaded_data(self): - if self.productor != self.ProductorChoices.MDA: - raise ValueError("Only MDA data can be deleted") - - model: models.Model = { - self.DataNameChoices.OCCUPATION_DU_SOL: Ocsge, - self.DataNameChoices.ZONE_CONSTRUITE: ZoneConstruite, - self.DataNameChoices.DIFFERENCE: OcsgeDiff, - self.DataNameChoices.CONSOMMATION_ESPACE: Cerema, - }[self.name] - - if self.name == self.DataNameChoices.DIFFERENCE: - return model.objects.filter( - departement=self.official_land_id, - year_old=min(self.millesimes), - year_new=max(self.millesimes), - ).delete() - elif self.name == self.DataNameChoices.CONSOMMATION_ESPACE: - if self.official_land_id == "MetropoleEtCorse": - return model.objects.filter(srid_source=self.srid).delete() - else: - return model.objects.filter(dept_id=self.official_land_id).delete() - else: - return model.objects.filter( - departement=self.official_land_id, - year=self.millesimes[0], - ).delete() diff --git a/public_data/models/data_source_fixture.json b/public_data/models/data_source_fixture.json deleted file mode 100644 index 4d987a3ff..000000000 --- a/public_data/models/data_source_fixture.json +++ /dev/null @@ -1,3522 +0,0 @@ -[ - { - "model": "public_data.datasource", - "pk": 1, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "essonne_ocsge_2018.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D091_2018-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D091_2018-01-01.7z", - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 2, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "essonne_ocsge_2021.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D091_2021-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D091_2021-01-01.7z", - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 3, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "essonne_zone_construite_2018.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D091_2018-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D091_2018-01-01.7z", - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 4, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "essonne_zone_construite_2021.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D091_2021-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D091_2021-01-01.7z", - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 5, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "essonne_diff_2018_2021.zip", - "shapefile_name": "DIFF_91_2021_2018.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1_DIFF$OCS-GE-NG_1-1__SHP_LAMB93_D091_DIFF_2018-2021/file/OCS-GE-NG_1-1__SHP_LAMB93_D091_DIFF_2018-2021.7z", - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 11, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "hauts_de_seine_ocsge_2018_corrige.zip", - "shapefile_name": "hauts_de_seine_ocsge_2018_corrige.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D092_2018-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D092_2018-01-01.7z", - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 12, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "hauts_de_seine_ocsge_2021_corrige.zip", - "shapefile_name": "hauts_de_seine_ocsge_2021_corrige.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D092_2021-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D092_2021-01-01.7z", - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 13, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "hauts_de_seine_zone_construite_2018_corrige.zip", - "shapefile_name": "hauts_de_seine_zone_construite_2018_corrige.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D092_2018-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D092_2018-01-01.7z", - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 14, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "hauts_de_seine_zone_construite_2021_corrige.zip", - "shapefile_name": "hauts_de_seine_zone_construite_2021_corrige.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D092_2021-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D092_2021-01-01.7z", - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 15, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "hauts_de_seine_diff_2018_2021_corrige.zip", - "shapefile_name": "hauts_de_seine_diff_2018_2021_corrige.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1_DIFF$OCS-GE-NG_1-1__SHP_LAMB93_D092_DIFF_2018-2021/file/OCS-GE-NG_1-1__SHP_LAMB93_D092_DIFF_2018-2021.7z", - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 21, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "seine_et_marne_ocsge_2017.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D077_2017-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D077_2017-01-01.7z", - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 22, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "seine_et_marne_ocsge_2021.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D077_2021-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D077_2021-01-01.7z", - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 23, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "seine_et_marne_zone_construite_2017.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D077_2017-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D077_2017-01-01.7z", - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 24, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "seine_et_marne_zone_construite_2021.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1$OCS-GE-NG_1-1__SHP_LAMB93_D077_2021-01-01/file/OCS-GE-NG_1-1__SHP_LAMB93_D077_2021-01-01.7z", - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 25, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2021\"]", - "mapping": null, - "path": "seine_et_marne_diff_2017_2021.zip", - "shapefile_name": "DIFF_77_2021_2017.shp", - "source_url": "https://wxs.ign.fr/c2vbqzbz832vi4tkvvmtsoh6/telechargement/inspire/OCSGE-NG-PACK_1-1_DIFF$OCS-GE-NG_1-1__SHP_LAMB93_D077_DIFF_2017-2021/file/OCS-GE-NG_1-1__SHP_LAMB93_D077_DIFF_2017-2021.7z", - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 32, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "ille_et_vilaine_ocsge_2017_corrige.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D035_2017/OCS-GE-NG_1-1__SHP_LAMB93_D035_2017.7z", - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 33, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "ille_et_vilaine_ocsge_2020_corrige.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D035_2020/OCS-GE-NG_1-1__SHP_LAMB93_D035_2020.7z", - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 34, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "ille_et_vilaine_zone_construite_2017.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D035_2017/OCS-GE-NG_1-1__SHP_LAMB93_D035_2017.7z", - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 35, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "ille_et_vilaine_zone_construite_2020.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D035_2020/OCS-GE-NG_1-1__SHP_LAMB93_D035_2020.7z", - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 36, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2020\"]", - "mapping": null, - "path": "ille_et_vilaine_diff_2017_2020.zip", - "shapefile_name": "DIFF_35_2020_2017.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1_DIFF_SHP_LAMB93_D035_2017-2020/OCS-GE-NG_1-1_DIFF_SHP_LAMB93_D035_2017-2020.7z", - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 37, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "var_ocsge_2017_corrige.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D083_2017/OCS-GE-NG_1-1__SHP_LAMB93_D083_2017.7z", - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 39, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2020\"]", - "mapping": null, - "path": "var_diff_2017_2020.zip", - "shapefile_name": "DIFF_83_2020_2017.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1_DIFF_SHP_LAMB93_D083_2017-2020/OCS-GE-NG_1-1_DIFF_SHP_LAMB93_D083_2017-2020.7z", - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 40, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "var_zone_construite_2017.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D083_2017/OCS-GE-NG_1-1__SHP_LAMB93_D083_2017.7z", - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 42, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "val_de_marne_2018_corrige.zip", - "shapefile_name": "val_de_marne_2018_corrige.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D094_2018/OCS-GE-NG_1-1__SHP_LAMB93_D094_2018.7z", - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 43, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "val_de_marne_2021_corrige.zip", - "shapefile_name": "val_de_marne_2021_corrige.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D094_2021/OCS-GE-NG_1-1__SHP_LAMB93_D094_2021.7z", - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 44, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "val_de_marne_zone_construite_2018.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D094_2018/OCS-GE-NG_1-1__SHP_LAMB93_D094_2018.7z", - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 45, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "val_de_marne_zone_construite_2021.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D094_2021/OCS-GE-NG_1-1__SHP_LAMB93_D094_2021.7z", - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 46, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "val_de_marne_18_21_diff.zip", - "shapefile_name": "DIFF_94_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1_DIFF_SHP_LAMB93_D094_2018-2021/OCS-GE-NG_1-1_DIFF_SHP_LAMB93_D094_2018-2021.7z", - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 52, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2020\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_35_2017_2020_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 53, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_35_2017_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 54, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_35_2017_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 55, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_35_2020_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 56, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_35_2020_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 57, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_92_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 58, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_92_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 59, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_92_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 60, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_92_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 61, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_92_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 62, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_91_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 63, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_91_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 64, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_91_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 65, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_91_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 66, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_91_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 67, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_40_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 68, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_40_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 69, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_40_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 70, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_40_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 71, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_40_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 72, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_77_2017_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 73, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_77_2017_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 74, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_77_2017_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 75, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_77_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 76, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_77_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 77, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_83_2017_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 78, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_83_2017_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 79, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2020\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_83_2017_2020_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 80, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_83_2020_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 81, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_83_2020_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "83", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 82, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_94_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 83, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_94_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 84, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_94_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 85, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_94_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 86, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_94_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 87, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "ocsge_rhone_2017.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D069_2017-01-01/OCS-GE_2-0__SHP_LAMB93_D069_2017-01-01.7z", - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 88, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "ocsge_rhone_2020.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D069_2020-01-01/OCS-GE_2-0__SHP_LAMB93_D069_2020-01-01.7z", - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 89, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "zone_construite_rhone_2017.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D069_2017-01-01/OCS-GE_2-0__SHP_LAMB93_D069_2017-01-01.7z", - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 90, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "zone_construite_rhone_2020.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D069_2020-01-01/OCS-GE_2-0__SHP_LAMB93_D069_2020-01-01.7z", - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 91, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2020\"]", - "mapping": null, - "path": "rhone_diff_17_20.zip", - "shapefile_name": "DIFF_69_2020_2017.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D069_DIFF_2017-2020/OCS-GE_2-0__SHP_LAMB93_D069_DIFF_2017-2020.7z", - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 92, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_69_2017_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 93, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_69_2020_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 94, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2017\", \"2020\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_69_2017_2020_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 95, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_69_2017_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 96, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_69_2020_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 97, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_69_2017_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 98, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_69_2020_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "69", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 99, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_94_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 100, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_94_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "94", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 101, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "isere_ocsge_2018.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D038_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D038_2018-01-01.7z", - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 102, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "isere_ocsge_2021.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D038_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D038_2021-01-01.7z", - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 103, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "isere_zone_construite_2018.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D038_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D038_2018-01-01.7z", - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 104, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "isere_zone_construite_2021.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D038_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D038_2021-01-01.7z", - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 105, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "isere_diff_18_21.zip", - "shapefile_name": "DIFF_38_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D038_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D038_DIFF_2018-2021.7z", - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 106, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_38_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 107, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_38_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 108, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_38_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 109, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_38_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 110, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_38_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 112, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_38_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 113, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_38_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "38", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 123, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "29_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_29_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D029_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D029_DIFF_2018-2021.7z", - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 124, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "29_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D029_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D029_2018-01-01.7z", - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 125, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "29_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D029_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D029_2021-01-01.7z", - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 126, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "29_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D029_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D029_2021-01-01.7z", - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 127, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "29_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D029_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D029_2018-01-01.7z", - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 128, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "37_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_37_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D037_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D037_DIFF_2018-2021.7z", - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 129, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "37_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D037_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D037_2021-01-01.7z", - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 130, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "37_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D037_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D037_2018-01-01.7z", - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 131, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "37_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D037_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D037_2018-01-01.7z", - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 132, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "37_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D037_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D037_2021-01-01.7z", - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 133, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "67_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_67_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D067_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D067_DIFF_2018-2021.7z", - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 134, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "67_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D067_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D067_2018-01-01.7z", - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 135, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "67_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D067_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D067_2021-01-01.7z", - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 136, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "67_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D067_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D067_2018-01-01.7z", - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 137, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "67_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D067_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D067_2021-01-01.7z", - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 149, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "11_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_11_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D011_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D011_DIFF_2018-2021.7z", - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 154, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "84_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_84_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D084_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D084_DIFF_2018-2021.7z", - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 155, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "11_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D011_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D011_2018-01-01.7z", - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 156, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "11_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D011_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D011_2021-01-01.7z", - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 157, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "11_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D011_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D011_2018-01-01.7z", - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 158, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "11_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D011_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D011_2021-01-01.7z", - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 159, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "84_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D084_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D084_2018-01-01.7z", - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 160, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "84_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D084_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D084_2021-01-01.7z", - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 161, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "84_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D084_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D084_2021-01-01.7z", - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 162, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "84_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D084_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D084_2018-01-01.7z", - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 178, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_37_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 179, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_37_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 180, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_37_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 181, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_37_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 182, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_37_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 183, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_37_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 184, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_37_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "37", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 185, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_67_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 186, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_67_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 187, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_67_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 188, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_67_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 189, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_67_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 190, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_11_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 191, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_11_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 192, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_11_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 193, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_11_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 194, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_11_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 195, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_11_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 196, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_11_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "11", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 197, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_29_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 198, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_29_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 199, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_29_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 200, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_29_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 201, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_29_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 202, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_29_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 203, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_29_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "29", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 204, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_67_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 205, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_67_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "67", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 206, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_84_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 207, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_84_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 208, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_84_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 209, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_84_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 210, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_84_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 211, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_84_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 212, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_84_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "84", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 218, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2016\", \"2019\"]", - "mapping": null, - "path": "32_DIFFERENCE_2016_2019_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_32_2019_2016.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D032_DIFF_2016-2019/OCS-GE_2-0__SHP_LAMB93_D032_DIFF_2016-2019.7z", - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 220, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2016\"]", - "mapping": null, - "path": "32_OCCUPATION_DU_SOL_2016_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D032_2016-01-01/OCS-GE_2-0__SHP_LAMB93_D032_2016-01-01.7z", - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 221, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2019\"]", - "mapping": null, - "path": "32_OCCUPATION_DU_SOL_2019_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D032_2019-01-01/OCS-GE_2-0__SHP_LAMB93_D032_2019-01-01.7z", - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 222, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2016\"]", - "mapping": null, - "path": "32_ZONE_CONSTRUITE_2016_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D032_2016-01-01/OCS-GE_2-0__SHP_LAMB93_D032_2016-01-01.7z", - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 223, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2019\"]", - "mapping": null, - "path": "32_ZONE_CONSTRUITE_2019_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D032_2019-01-01/OCS-GE_2-0__SHP_LAMB93_D032_2019-01-01.7z", - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 224, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2016\", \"2019\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_32_2016_2019_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 225, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2016\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_32_2016_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 226, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2019\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_32_2019_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 227, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2016\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_32_2016_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 228, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2019\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_32_2019_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 229, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2016\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_32_2016_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 230, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2019\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_32_2019_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "32", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 231, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_35_2017_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 232, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2020\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_35_2020_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "35", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 233, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "66_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D066_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D066_2021-01-01.7z", - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 234, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "66_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D066_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D066_2021-01-01.7z", - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 235, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "66_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D066_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D066_2018-01-01.7z", - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 236, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "66_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D066_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D066_2018-01-01.7z", - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 237, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "66_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_D066_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0_DIFF_SHP_LAMB93_D066_2018-2021/OCS-GE_2-0_DIFF_SHP_LAMB93_D066_2018-2021.7z", - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 238, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_66_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 239, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_66_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 240, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_66_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 241, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_66_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 242, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_66_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 243, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_66_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 244, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_66_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "66", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 245, - "fields": { - "productor": "CEREMA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "cerema_2023.zip", - "shapefile_name": "cerema_2023.shp", - "source_url": "https://cerema.app.box.com/v/pnb-action7-indicateurs-ff/file/1512847131932", - "official_land_id": "MetropoleEtCorse", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 246, - "fields": { - "productor": "MDA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "MAJIC_CONSOMMATION_ESPACE_MetropoleEtCorse_2009_2023_MDA.shp.zip", - "shapefile_name": "CONSOMMATION_ESPACE.shp", - "source_url": null, - "official_land_id": "MetropoleEtCorse", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 247, - "fields": { - "productor": "CEREMA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "cerema_2023_971.zip", - "shapefile_name": "obs_artif_conso_com_2009_2023_971.shp", - "source_url": "https://cerema.app.box.com/v/pnb-action7-indicateurs-ff/file/1512838206072", - "official_land_id": "971", - "srid": 32620 - } - }, - { - "model": "public_data.datasource", - "pk": 248, - "fields": { - "productor": "CEREMA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "cerema_2023_972.zip", - "shapefile_name": "obs_artif_conso_com_2009_2023_972.shp", - "source_url": "https://cerema.app.box.com/v/pnb-action7-indicateurs-ff/file/1512827044358", - "official_land_id": "972", - "srid": 32620 - } - }, - { - "model": "public_data.datasource", - "pk": 249, - "fields": { - "productor": "CEREMA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "cerema_2023_973.zip", - "shapefile_name": "obs_artif_conso_com_2009_2023_973.shp", - "source_url": "https://cerema.app.box.com/v/pnb-action7-indicateurs-ff/file/1512828738470", - "official_land_id": "973", - "srid": 2972 - } - }, - { - "model": "public_data.datasource", - "pk": 250, - "fields": { - "productor": "CEREMA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "cerema_2023_974.zip", - "shapefile_name": "obs_artif_conso_com_2009_2023_974.shp", - "source_url": "https://cerema.app.box.com/v/pnb-action7-indicateurs-ff/file/1512840025235", - "official_land_id": "974", - "srid": 2975 - } - }, - { - "model": "public_data.datasource", - "pk": 251, - "fields": { - "productor": "MDA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "MAJIC_CONSOMMATION_ESPACE_971_2009_2023_MDA.shp.zip", - "shapefile_name": "CONSOMMATION_ESPACE.shp", - "source_url": null, - "official_land_id": "971", - "srid": 32620 - } - }, - { - "model": "public_data.datasource", - "pk": 252, - "fields": { - "productor": "MDA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "MAJIC_CONSOMMATION_ESPACE_972_2009_2023_MDA.shp.zip", - "shapefile_name": "CONSOMMATION_ESPACE.shp", - "source_url": null, - "official_land_id": "972", - "srid": 32620 - } - }, - { - "model": "public_data.datasource", - "pk": 253, - "fields": { - "productor": "MDA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "MAJIC_CONSOMMATION_ESPACE_973_2009_2023_MDA.shp.zip", - "shapefile_name": "CONSOMMATION_ESPACE.shp", - "source_url": null, - "official_land_id": "973", - "srid": 2972 - } - }, - { - "model": "public_data.datasource", - "pk": 254, - "fields": { - "productor": "MDA", - "dataset": "MAJIC", - "name": "CONSOMMATION_ESPACE", - "millesimes": "[\"2009\", \"2023\"]", - "mapping": null, - "path": "MAJIC_CONSOMMATION_ESPACE_974_2009_2023_MDA.shp.zip", - "shapefile_name": "CONSOMMATION_ESPACE.shp", - "source_url": null, - "official_land_id": "974", - "srid": 2975 - } - }, - { - "model": "public_data.datasource", - "pk": 255, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "62_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_62_2021_2019.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE-NG_1-1__SHP_LAMB93_D062_DIFF_2018-2021/OCS-GE-NG_1-1__SHP_LAMB93_D062_DIFF_2018-2021.7z", - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 256, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "62_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D062_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D062_2018-01-01.7z", - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 257, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "62_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D062_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D062_2018-01-01.7z", - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 258, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "62_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D062_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D062_2021-01-01.7z", - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 259, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "62_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D062_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D062_2021-01-01.7z", - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 260, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_62_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 261, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_62_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 262, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_62_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 263, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_62_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 264, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_62_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 265, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_62_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 266, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_62_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "62", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 268, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_91_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 269, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_91_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "91", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 270, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_92_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 271, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_92_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "92", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 275, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "40_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D040_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D040_2021-01-01.7z", - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 276, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "40_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D040_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D040_2021-01-01.7z", - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 277, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "40_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D040_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D040_2018-01-01.7z", - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 278, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "40_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D040_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D040_2018-01-01.7z", - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 279, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "40_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_40_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D040_DIFF_2018-2021/OCS-GE_2-0__SHP_LAMB93_D040_DIFF_2018-2021.7z", - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 280, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2017\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_77_2017_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 281, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_77_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "77", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 282, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_40_2018_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 283, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_ARTIFICIELLE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_ARTIFICIELLE_40_2021_MDA.shp.zip", - "shapefile_name": "ZONE_ARTIFICIELLE.shp", - "source_url": null, - "official_land_id": "40", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 284, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "33_OCCUPATION_DU_SOL_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D033_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D033_2018-01-01.7z", - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 285, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "33_ZONE_CONSTRUITE_2018_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D033_2018-01-01/OCS-GE_2-0__SHP_LAMB93_D033_2018-01-01.7z", - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 286, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "33_OCCUPATION_DU_SOL_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "OCCUPATION_SOL.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D033_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D033_2021-01-01.7z", - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 287, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "33_ZONE_CONSTRUITE_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D033_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D033_2021-01-01.7z", - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 288, - "fields": { - "productor": "IGN", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "33_DIFFERENCE_2018_2021_IGN_REPACKED.shp.zip", - "shapefile_name": "DIFF_D033_2021_2018.shp", - "source_url": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0_DIFF_SHP_LAMB93_D033_2018-2021/OCS-GE_2-0_DIFF_SHP_LAMB93_D033_2018-2021.7z", - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 289, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "DIFFERENCE", - "millesimes": "[\"2018\", \"2021\"]", - "mapping": null, - "path": "OCSGE_DIFFERENCE_33_2018_2021_MDA.shp.zip", - "shapefile_name": "DIFFERENCE.shp", - "source_url": null, - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 290, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_33_2018_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 291, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "ZONE_CONSTRUITE", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_ZONE_CONSTRUITE_33_2021_MDA.shp.zip", - "shapefile_name": "ZONE_CONSTRUITE.shp", - "source_url": null, - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 292, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2018\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_33_2018_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "33", - "srid": 2154 - } - }, - { - "model": "public_data.datasource", - "pk": 293, - "fields": { - "productor": "MDA", - "dataset": "OCSGE", - "name": "OCCUPATION_DU_SOL", - "millesimes": "[\"2021\"]", - "mapping": null, - "path": "OCSGE_OCCUPATION_DU_SOL_33_2021_MDA.shp.zip", - "shapefile_name": "OCCUPATION_DU_SOL.shp", - "source_url": null, - "official_land_id": "33", - "srid": 2154 - } - } -] \ No newline at end of file diff --git a/public_data/models/deprecated.py b/public_data/models/deprecated.py deleted file mode 100644 index ca81bcbe3..000000000 --- a/public_data/models/deprecated.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Ce fichier contient tous les modèles dit "DEPRECATED". Ce sont des modèles qu'il -faut migrer vers les nouvelles façons de stocker les données. Cela nécessite souvent -beaucoup de travail (les views sont également à changer, voir le front) et cela a été -remis à plus tard (dette technique). - -Il est également probable que certains modèles ont été total décommissioné mais pas -encore retiré de ce fichier. -""" -from .cerema import Cerema - - -class RefPlan(Cerema): - """ - Utilisé avant la récupération du fichier du Cerema - !!! DEPRECATED !!! - Available for retro-compatibility - """ - - class Meta: - proxy = True diff --git a/public_data/models/mixins.py b/public_data/models/mixins.py index d1d031656..1d0a1748b 100644 --- a/public_data/models/mixins.py +++ b/public_data/models/mixins.py @@ -1,18 +1,10 @@ -from logging import DEBUG, INFO, getLogger +from logging import getLogger from os import getenv -from pathlib import Path -from tempfile import TemporaryDirectory -from typing import Dict -from zipfile import ZipFile import numpy as np from colour import Color -from django.contrib.gis.utils import LayerMapping from django.core.exceptions import FieldDoesNotExist -from django.db import connection -from public_data.models.enums import SRID -from public_data.storages import DataStorage from utils.colors import get_onecolor_gradient, get_random_color, is_valid logger = getLogger(__name__) @@ -20,254 +12,6 @@ LOCAL_FILE_DIRECTORY = getenv("LOCAL_FILE_DIRECTORY") -class AutoLoadMixin: - """ - Enable auto loading of data into database according to - * shape_file_path - usually shape file is in media directory - * mapping - between feature name and database field name - Those two needs to be set in child class. - """ - - @property - def shape_file_path(self) -> str: - """ - Path to the shapefile to load, either on S3 or locally - - Local path is relative to the env variable LOCAL_FILE_DIRECTORY - S3 path is relative to the value defined in DataStorage.location - - Example: - LOCAL_FILE_DIRECTORY = 'public_data/local_data' - shape_file_path = 'communes/communes-2021-01-01.shp' - - will load the shapefile from public_data/local_data/communes/communes-2021-01-01.shp - """ - raise NotImplementedError("The shape_file_path property must be set in child class") - - @property - def mapping(self) -> Dict[str, str]: - """ - Mapping between shapefile fields and model fields - for geodjango's LayerMapping - """ - raise NotImplementedError("The mapping property must be set in child class") - - @property - def srid(self) -> int: - """ - SRID of the source shapefile - Defaults to LAMBERT_93, override if needed. - - NOTE: getting the SRID from the shapefile is not 100% reliable - hence the need to set it manually. - """ - return SRID.LAMBERT_93 - - def before_save(self) -> None: - if hasattr(self.__class__, "srid_source"): - self.srid_source = self.__class__.srid - - def save(self, *args, **kwargs): - self.before_save() - super().save(*args, **kwargs) - self.after_save() - return self - - def after_save(self) -> None: - """Hook to do things after saving""" - - @classmethod - def calculate_fields(cls) -> None: - """Override if you need to calculate some fields after loading data.""" - - @staticmethod - def prepare_shapefile(shape_file_path: Path) -> None: - """Hook that prepares shapefile before loading it into database - Useful to modify shapefile fields type before mapping - - Note that this method will update in place in case - a local file is used. If the shapefile is retrieved from S3, - it will update the file from the temporary directory it - is extracted to. - - Args: - shape_file_path: path to the shapefile to prepare - (provided by the load method) - """ - - @staticmethod - def __check_path_is_a_regular_file(path: Path) -> None: - if not path.is_file(): - raise FileNotFoundError(f"{path} is not a regular file") - - @staticmethod - def __check_path_suffix_is_shapefile(path: Path) -> None: - if path.suffix != ".shp": - raise FileNotFoundError(f"{path} is not a shapefile") - - @staticmethod - def __check_prj_file_exists(path: Path) -> None: - prj_file_path = path.with_suffix(suffix=".prj") - - if not prj_file_path.exists(): - raise FileNotFoundError(f"{prj_file_path} is missing") - - @classmethod - def __check_is_shape_file(cls, shape_file_path: Path) -> None: - cls.__check_path_is_a_regular_file(shape_file_path) - cls.__check_path_suffix_is_shapefile(shape_file_path) - cls.__check_prj_file_exists(shape_file_path) - - def __retrieve_zipped_shapefile_from_s3( - file_name_on_s3: str, - output_path: Path, - ) -> Path: - storage = DataStorage() - - if not storage.exists(file_name_on_s3): - raise FileNotFoundError(f"{file_name_on_s3} could not be found on S3") - - output_zip_path = f"{output_path}/{file_name_on_s3}" - - storage.bucket.download_file( - Key=f"{storage.location}/{file_name_on_s3}", - Filename=output_zip_path, - ) - - return output_zip_path - - def __extract_zipped_shapefile( - zipped_shapefile_path: Path, - output_path: Path, - ) -> Path: - with ZipFile(zipped_shapefile_path) as zip_file: - zip_file.extractall(output_path) - - return output_path - - def __get_shapefile_path_from_folder(folder_path: Path) -> Path: - for tempfile in folder_path.rglob("*.shp"): - if tempfile.name.startswith("._"): - continue - - return tempfile - - raise FileNotFoundError("No file with .shp suffix") - - @classmethod - def clean_data(cls) -> None: - """Delete previously loaded data - - The implementation of the method should ensure idempotency - by removing entirely and exclusively the data previously loaded - by the child class - """ - raise NotImplementedError(f"No clean_data method implemented for the class {cls.__name__}") - - @classmethod - def load( - cls, - local_file_path=None, - local_file_directory=LOCAL_FILE_DIRECTORY, - verbose=True, - layer_mapper_strict=True, - layer_mapper_silent=False, - layer_mapper_encoding="utf-8", - layer_mapper_step=1000, - ) -> None: - """Populate table with data from shapefile then calculate all fields - - If no local_file_path is provided, the shapefile is downloaded from S3, - and then extracted in a temporary directory. - - All arguments are optional and only affects how LayerMapper behave - LayerMapper documentation: - - https://docs.djangoproject.com/en/4.2/ref/contrib/gis/layermapping/ - - Args: - verbose: print more information - local_file_path: path to a local shapefile - local_file_directory: directory where to find the local shapefile - layer_mapper_strict: raise exception if a field is missing - layer_mapper_silent: do not print anything - layer_mapper_encoding: encoding of the shapefile - layer_mapper_step: number of rows to process at once - - Raises: - FileNotFoundError: if the shapefile is not found on S3 or locally - NotImplementedError: if the child class does not implement the shape_file_path property - """ - - logger.setLevel(DEBUG if verbose else INFO) - - logger.info("Loading data from class %s", cls.__name__) - - with TemporaryDirectory() as temporary_directory: - if not local_file_path: - logger.info("Retrieving zipped shapefile from S3") - - zipped_shapefile_path = cls.__retrieve_zipped_shapefile_from_s3( - file_name_on_s3=cls.shape_file_path, - output_path=Path(temporary_directory), - ) - logger.debug(f"Zipped shapefile temporary path: {zipped_shapefile_path}") - - logger.debug("Extracting zipped shapefile") - - shapefile_folder_path = cls.__extract_zipped_shapefile( - zipped_shapefile_path=zipped_shapefile_path, - output_path=Path(temporary_directory), - ) - - logger.debug(f"Extracted shapefile folder path: {shapefile_folder_path}") - - shape_file_path = cls.__get_shapefile_path_from_folder(shapefile_folder_path) - else: - logger.info("Using local shapefile") - - shape_file_path = Path(f"{local_file_directory}/{local_file_path}") - - logger.info("Shapefile path: %s", shape_file_path) - - cls.__check_is_shape_file(shape_file_path) - - logger.debug("Shapefile is valid ✅") - - logger.info("Preparing shapefile") - - cls.prepare_shapefile(shape_file_path) - - logger.info("Cleaning previously loaded data") - - cls.clean_data() - - logger.info("Setting up LayerMapper") - - layer_mapper = LayerMapping( - model=cls, - data=shape_file_path, - mapping=cls.mapping, - encoding=layer_mapper_encoding, - transaction_mode="commit_on_success", - ) - - logger.info("Saving mapped entities") - - layer_mapper.save( - strict=layer_mapper_strict, - silent=layer_mapper_silent, - verbose=verbose, - progress=True, - step=layer_mapper_step, - ) - - logger.info("Calculating fields") - - cls.calculate_fields() - - logger.info("Done loading data from class %s", cls.__name__) - - class DataColorationMixin: """DataColorationMixin add class' methods: - get_property_percentile: return percentiles of a property's distribution @@ -348,15 +92,3 @@ def get_percentile(cls, property_name=None, percentiles=None): return None else: return np.percentile(rows, percentiles, interpolation="lower") - - -class TruncateTableMixin: - """enable a truncate statement (compatible only with PostgreSQL so far)""" - - @classmethod - def truncate(cls, restart_id=True): - query = f'TRUNCATE TABLE "{cls._meta.db_table}"' - if restart_id: - query += " RESTART IDENTITY" - with connection.cursor() as cursor: - cursor.execute(query) diff --git a/public_data/readme.MD b/public_data/readme.MD deleted file mode 100644 index 2b6958218..000000000 --- a/public_data/readme.MD +++ /dev/null @@ -1,72 +0,0 @@ - - -## Management commands - - -### shp2model - -La commande attend un chemin relatif ou absolue vers un fichier shape (extension .shp). - -Exemple : `./manage.py shp2model ./public_data/media/mondossier/monfichier.shp` - -La commande va analyser le contenu du fichier et fournir un squelette de model selon les règles suivantes : -- Nom de la classe : nom du layer (en camelcase) -- Hérite de la classe `AutoLoadMixin` -- Un champ va être ajouté par feature avec pour nom le nom du champ en minuscule. Le type de champ est fonction du type OFT trouvé et le max_length est issu du field_width du fichier. -- un champ MultiPolygon est ajouté (nom: mpoly) -- le chemin vers le fichier est conservé dans la propriété shape_file_path -- le mapping entre les champs du fichier shape et les champs de la classe est conservé dans la propriété mapping - -Exemple: -``` -class Artificialisee2015to2018(AutoLoadMixin): - """ - A_B_2015_2018 : la surface (en hectares) artificialisée entre 2015 et 2018 - Données construites par Philippe - """ - - surface = models.IntegerField(_("surface"), max_length=10) - cs_2018 = models.CharField(_("cs_2018"), max_length=254) - us_2018 = models.CharField(_("us_2018"), max_length=254) - cs_2015 = models.CharField(_("cs_2015"), max_length=254) - us_2015 = models.CharField(_("us_2015"), max_length=254) - - mpoly = models.MultiPolygonField() - - shape_file_path = Path("public_data/media/a_b_2015_2018/A_B_2015_2018.shp") - mapping = { - "surface": "Surface", - "cs_2018": "cs_2018", - "us_2018": "us_2018", - "cs_2015": "cs_2015", - "us_2015": "us_2015", - "mpoly": "MULTIPOLYGON", - } -``` - -### load_data et AutoLoadMixin - -Ci-dessus, vous avez remarqué que le squelette hérite de la classe AutoLoadMixin (et nom models.Model comme il est de coutume). C'est pour que la classe embarque une méthode de classe "Load()" qui permet de charger les données en base depuis le fichier shape. - -Cette fonctionnalité est activée au travers de la commande load_data qui prend le nom du classe en paramètre. Exemple : `./manage.py load_data public_data.models.Artificialisee2015to2018` - -La méthode load() va : -- vider la base de donner (delete global) -- utiliser `LayerMapping` (issue de GeoDjango) avec les 2 propriétés détaillées précédemment : shape_file_path et mapping -- uploader le contenu du fichier dans la base - -## Données de l'INSEE - -2 données sont chargées depuis l'INSEE : -- Population des communes (incluant un historique depuis 2006) -- nombre de ménages par communes (incluant un historique depuis 2008) - -Ces données sont stockées dans CommunePop et accessible depuis Commune.pop.all() - -Pour charger ces données, 2 fichiers sont utilisées et ils doivent être disponibles dans s3://[bucketname]/data : -- pop : base-pop-historiques-1876-2019.xlsx, colonnes : CODGEO, LIBGEO, 2019 à 2006 -- ménage : base-cc-coupl-fam-men-2018-lite.xlsx, colonnes : CODGEO, LIBGEO, 2018 à 2008 - -L'INSEE ne fournit le nombre de ménage que pour 2018, 2013 et 2008. Les années manquantes ont été complétées avec une estimation en utilisant une droite affine. - -La commande pour charger les fichiers est : `python manage.py load_insee` diff --git a/public_data/shapefile.py b/public_data/shapefile.py deleted file mode 100644 index 7cc05c91b..000000000 --- a/public_data/shapefile.py +++ /dev/null @@ -1,199 +0,0 @@ -from logging import Logger, getLogger -from os import mkdir -from pathlib import Path -from urllib.request import URLopener -from uuid import uuid4 -from zipfile import ZipFile - -import py7zr -from storages.backends.s3boto3 import S3Boto3Storage - -from public_data.models import DataSource -from public_data.storages import DataStorage - - -def __download_source( - source: DataSource, - output_path: Path, - storage: S3Boto3Storage, -) -> Path: - file_name_on_s3 = source.path - - if not storage.exists(file_name_on_s3): - raise FileNotFoundError(f"{file_name_on_s3} could not be found on S3") - - output_zip_path = f"{output_path.name}/{file_name_on_s3}" - - storage.bucket.download_file( - Key=f"{storage.location}/{file_name_on_s3}", - Filename=output_zip_path, - ) - - return Path(output_zip_path) - - -def __download_url( - url: str, - output_path: Path, -) -> Path: - filename_from_url = url.split("/")[-1] - - output_zip_path = f"{output_path.name}/{filename_from_url}" - - opener = URLopener() - opener.addheader("User-Agent", "Mozilla/5.0") - opener.retrieve(url=url, filename=output_zip_path) - - return Path(output_zip_path) - - -def __extract_7z_shapefile( - zipped_shapefile_path: Path, - output_path: Path, -) -> Path: - zipped_shapefile_path_without_suffix = zipped_shapefile_path.stem.split(".")[0] - output_path = Path(f"{output_path}/{zipped_shapefile_path_without_suffix}") - - archive = py7zr.SevenZipFile(zipped_shapefile_path, mode="r") - archive.extractall(path=output_path.absolute()) - archive.close() - - return output_path - - -def __extract_zipped_shapefile( - zipped_shapefile_path: Path, - output_path: Path, -) -> Path: - zipped_shapefile_path_without_suffix = zipped_shapefile_path.stem.split(".")[0] - output_path = Path(f"{output_path}/{zipped_shapefile_path_without_suffix}") - - with ZipFile(file=zipped_shapefile_path) as zip_file: - zip_file.extractall(path=output_path.absolute()) - - return output_path - - -def __get_shapefile_path_from_folder(shapefile_directory: Path, pattern="*.shp") -> Path: - for tempfile in shapefile_directory.rglob(pattern=pattern): - if tempfile.name.startswith("."): - # Skip hidden files - continue - if not tempfile.name.endswith(".shp"): - # Skip files that contains shp in their name, but do not end with .shp (e.g. shp.zip) - continue - return tempfile - - raise FileNotFoundError(f"No file with .shp suffix found in {shapefile_directory}") - - -def delete_directory(pth: Path): - for sub in pth.iterdir(): - if sub.is_dir(): - delete_directory(sub) - else: - sub.unlink() - pth.rmdir() - - -def get_shapefile_from_source( - storage: DataStorage, - source: DataSource, - output_path: Path, - logger: Logger, -) -> tuple[Path, Path, Path]: - logger.info("Downloading shapefile") - zipped_shapefile_path = __download_source(storage=storage, source=source, output_path=output_path) - logger.info(f"Downloaded shapefile to {zipped_shapefile_path}") - logger.info(msg="Extracting shapefile") - shapefile_directory = __extract_zipped_shapefile( - zipped_shapefile_path=zipped_shapefile_path, - output_path=output_path, - ) - logger.info(f"Extracted shapefile to {shapefile_directory}") - - shapefile_path = __get_shapefile_path_from_folder(shapefile_directory=shapefile_directory) - logger.info(f"Shapefile path: {shapefile_path}") - - return shapefile_path, shapefile_directory, zipped_shapefile_path - - -def get_shapefile_from_url( - url: str, - output_path: Path, - logger: Logger, - shapefile_name: str = None, -): - logger.info("Downloading shapefile") - zipped_shapefile_path = __download_url(url=url, output_path=output_path) - logger.info(f"Downloaded shapefile to {zipped_shapefile_path}") - logger.info(msg="Extracting shapefile") - shapefile_directory = __extract_7z_shapefile( - zipped_shapefile_path=zipped_shapefile_path, - output_path=output_path, - ) - logger.info(f"Extracted shapefile to {shapefile_directory}") - - shapefile_path = __get_shapefile_path_from_folder(shapefile_directory=shapefile_directory, pattern=shapefile_name) - logger.info(f"Shapefile path: {shapefile_path}") - - return shapefile_path, shapefile_directory, zipped_shapefile_path - - -class ShapefileFromSource: - def __init__(self, source: DataSource, logger_name="management.commands") -> None: - self.storage = DataStorage() - self.source = source - self.output_path = Path("tmp" + str(uuid4())) - self.shapefile_path = None - self.shapefile_directory = None - self.zipped_shapefile_path = None - self.logger = getLogger(logger_name) - - def __enter__(self) -> Path: - mkdir(path=self.output_path) - shapefile_path, shapefile_directory, zipped_shapefile_path = get_shapefile_from_source( - source=self.source, - output_path=self.output_path, - storage=self.storage, - logger=self.logger, - ) - self.shapefile_path = shapefile_path - self.shapefile_directory = shapefile_directory - self.zipped_shapefile_path = zipped_shapefile_path - return self.shapefile_path - - def __exit__(self, exc_type, exc_val, exc_tb): - delete_directory(self.output_path) - - -class ShapefileFromURL: - def __init__( - self, - url: str, - logger_name="management.commands", - shapefile_name: str = None, - ) -> None: - self.url = url - self.shapefile_name = shapefile_name - self.output_path = Path("tmp" + str(uuid4())) - self.shapefile_path = None - self.shapefile_directory = None - self.zipped_shapefile_path = None - self.logger = getLogger(logger_name) - - def __enter__(self) -> Path: - mkdir(path=self.output_path) - shapefile_path, shapefile_directory, zipped_shapefile_path = get_shapefile_from_url( - url=self.url, - output_path=self.output_path, - logger=self.logger, - shapefile_name=self.shapefile_name, - ) - self.shapefile_path = shapefile_path - self.shapefile_directory = shapefile_directory - self.zipped_shapefile_path = zipped_shapefile_path - return self.shapefile_path - - def __exit__(self, exc_type, exc_val, exc_tb): - delete_directory(self.output_path) From cf5b796c110721ff85899333e0d979d5ab8c806e Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Thu, 3 Oct 2024 09:29:49 +0200 Subject: [PATCH 005/129] feat(epci): load epcis with airflow --- airflow/include/admin_express/sources.json | 25 ++++++----- .../sql/sparte/macros/admin_express/epci.sql | 13 ++++++ .../sql/sparte/models/admin_express/epci.sql | 35 ++++++++++++++++ .../models/admin_express/epci_guadeloupe.sql | 1 + .../models/admin_express/epci_guyane.sql | 1 + .../models/admin_express/epci_martinique.sql | 1 + .../models/admin_express/epci_metropole.sql | 1 + .../models/admin_express/epci_reunion.sql | 1 + .../sparte/models/admin_express/schema.yml | 42 ++++++++++++++++++- 9 files changed, 108 insertions(+), 12 deletions(-) create mode 100644 airflow/include/sql/sparte/macros/admin_express/epci.sql create mode 100644 airflow/include/sql/sparte/models/admin_express/epci.sql create mode 100644 airflow/include/sql/sparte/models/admin_express/epci_guadeloupe.sql create mode 100644 airflow/include/sql/sparte/models/admin_express/epci_guyane.sql create mode 100644 airflow/include/sql/sparte/models/admin_express/epci_martinique.sql create mode 100644 airflow/include/sql/sparte/models/admin_express/epci_metropole.sql create mode 100644 airflow/include/sql/sparte/models/admin_express/epci_reunion.sql diff --git a/airflow/include/admin_express/sources.json b/airflow/include/admin_express/sources.json index 7589f918f..61b2b1658 100644 --- a/airflow/include/admin_express/sources.json +++ b/airflow/include/admin_express/sources.json @@ -5,18 +5,20 @@ "srid": 2154, "shapefile_to_table": { "COMMUNE.shp": "commune_metropole", - "DEPARTEMENT.shp": "departement_metropole" + "DEPARTEMENT.shp": "departement_metropole", + "EPCI.shp": "epci_metropole" }, - "dbt_selector": "commune_metropole.sql+ departement_metropole.sql+" + "dbt_selector": "commune_metropole.sql+ departement_metropole.sql+ epci_metropole.sql+" }, { "name": "Guadeloupe", "url": "https://data.geopf.fr/telechargement/download/ADMIN-EXPRESS-COG/ADMIN-EXPRESS-COG_3-2__SHP_RGAF09UTM20_GLP_2024-02-22/ADMIN-EXPRESS-COG_3-2__SHP_RGAF09UTM20_GLP_2024-02-22.7z", "srid": 32620, "shapefile_to_table": { "COMMUNE.shp": "commune_guadeloupe", - "DEPARTEMENT.shp": "departement_guadeloupe" + "DEPARTEMENT.shp": "departement_guadeloupe", + "EPCI.shp": "epci_guadeloupe" }, - "dbt_selector": "commune_guadeloupe.sql+ departement_guadeloupe.sql+" + "dbt_selector": "commune_guadeloupe.sql+ departement_guadeloupe.sql+ epci_guadeloupe.sql+" }, { "name": "Martinique", @@ -24,26 +26,29 @@ "srid": 32620, "shapefile_to_table": { "COMMUNE.shp": "commune_martinique", - "DEPARTEMENT.shp": "departement_martinique" + "DEPARTEMENT.shp": "departement_martinique", + "EPCI.shp": "epci_martinique" }, - "dbt_selector": "commune_martinique.sql+ departement_martinique.sql+" + "dbt_selector": "commune_martinique.sql+ departement_martinique.sql+ epci_martinique.sql+" }, { "name": "Guyanne", "url": "https://data.geopf.fr/telechargement/download/ADMIN-EXPRESS-COG/ADMIN-EXPRESS-COG_3-2__SHP_UTM22RGFG95_GUF_2024-02-22/ADMIN-EXPRESS-COG_3-2__SHP_UTM22RGFG95_GUF_2024-02-22.7z", "srid": 2972, "shapefile_to_table": { "COMMUNE.shp": "commune_guyane", - "DEPARTEMENT.shp": "departement_guyane" + "DEPARTEMENT.shp": "departement_guyane", + "EPCI.shp": "epci_guyane" }, - "dbt_selector": "commune_guyane.sql+ departement_guyane.sql+" + "dbt_selector": "commune_guyane.sql+ departement_guyane.sql+ epci_guyane.sql+" }, { "name": "La Réunion", "url": "https://data.geopf.fr/telechargement/download/ADMIN-EXPRESS-COG/ADMIN-EXPRESS-COG_3-2__SHP_RGR92UTM40S_REU_2024-02-22/ADMIN-EXPRESS-COG_3-2__SHP_RGR92UTM40S_REU_2024-02-22.7z", "srid": 2975, "shapefile_to_table": { "COMMUNE.shp": "commune_reunion", - "DEPARTEMENT.shp": "departement_reunion" + "DEPARTEMENT.shp": "departement_reunion", + "EPCI.shp": "epci_reunion" }, - "dbt_selector": "commune_reunion.sql+ departement_reunion.sql+" + "dbt_selector": "commune_reunion.sql+ departement_reunion.sql+ epci_reunion.sql+" } ] \ No newline at end of file diff --git a/airflow/include/sql/sparte/macros/admin_express/epci.sql b/airflow/include/sql/sparte/macros/admin_express/epci.sql new file mode 100644 index 000000000..82e074b24 --- /dev/null +++ b/airflow/include/sql/sparte/macros/admin_express/epci.sql @@ -0,0 +1,13 @@ +{% macro epci(source_table_name) %} + {{ config(materialized='table') }} + + SELECT + id, + nom as name, + code_siren as code, + nature, + ST_Area(geom) as surface, + geom + FROM + {{ source('public', source_table_name) }} +{% endmacro %} diff --git a/airflow/include/sql/sparte/models/admin_express/epci.sql b/airflow/include/sql/sparte/models/admin_express/epci.sql new file mode 100644 index 000000000..4e74c4033 --- /dev/null +++ b/airflow/include/sql/sparte/models/admin_express/epci.sql @@ -0,0 +1,35 @@ +{{ + config( + materialized='table', + indexes=[ + {'columns': ['id'], 'type': 'btree'}, + {'columns': ['code'], 'type': 'btree'}, + {'columns': ['name'], 'type': 'btree'}, + {'columns': ['geom'], 'type': 'gist'} + ]) +}} + +SELECT + *, + 32620 AS srid_source +FROM {{ ref('epci_guadeloupe') }} +UNION ALL +SELECT + *, + 32620 AS srid_source +FROM {{ ref('epci_martinique') }} +UNION ALL +SELECT + *, + 2972 AS srid_source +FROM {{ ref('epci_guyane') }} +UNION ALL +SELECT + *, + 2975 AS srid_source +FROM {{ ref('epci_reunion') }} +UNION ALL +SELECT + *, + 2154 AS srid_source +FROM {{ ref('epci_metropole') }} diff --git a/airflow/include/sql/sparte/models/admin_express/epci_guadeloupe.sql b/airflow/include/sql/sparte/models/admin_express/epci_guadeloupe.sql new file mode 100644 index 000000000..fc4fdbcd3 --- /dev/null +++ b/airflow/include/sql/sparte/models/admin_express/epci_guadeloupe.sql @@ -0,0 +1 @@ +{{ epci('epci_guadeloupe') }} diff --git a/airflow/include/sql/sparte/models/admin_express/epci_guyane.sql b/airflow/include/sql/sparte/models/admin_express/epci_guyane.sql new file mode 100644 index 000000000..569a78543 --- /dev/null +++ b/airflow/include/sql/sparte/models/admin_express/epci_guyane.sql @@ -0,0 +1 @@ +{{ epci('epci_guyane') }} diff --git a/airflow/include/sql/sparte/models/admin_express/epci_martinique.sql b/airflow/include/sql/sparte/models/admin_express/epci_martinique.sql new file mode 100644 index 000000000..907bb8639 --- /dev/null +++ b/airflow/include/sql/sparte/models/admin_express/epci_martinique.sql @@ -0,0 +1 @@ +{{ epci('epci_martinique') }} diff --git a/airflow/include/sql/sparte/models/admin_express/epci_metropole.sql b/airflow/include/sql/sparte/models/admin_express/epci_metropole.sql new file mode 100644 index 000000000..a732459c0 --- /dev/null +++ b/airflow/include/sql/sparte/models/admin_express/epci_metropole.sql @@ -0,0 +1 @@ +{{ epci('epci_metropole') }} diff --git a/airflow/include/sql/sparte/models/admin_express/epci_reunion.sql b/airflow/include/sql/sparte/models/admin_express/epci_reunion.sql new file mode 100644 index 000000000..e23e8cc82 --- /dev/null +++ b/airflow/include/sql/sparte/models/admin_express/epci_reunion.sql @@ -0,0 +1 @@ +{{ epci('epci_reunion') }} diff --git a/airflow/include/sql/sparte/models/admin_express/schema.yml b/airflow/include/sql/sparte/models/admin_express/schema.yml index e9b165b75..03da9ff25 100644 --- a/airflow/include/sql/sparte/models/admin_express/schema.yml +++ b/airflow/include/sql/sparte/models/admin_express/schema.yml @@ -1,17 +1,52 @@ version: 2 + +code_is_unique_and_not_null: &code_is_unique_and_not_null + - name: code + data_tests: + - not_null + - unique + + models: - name: commune + columns: *code_is_unique_and_not_null - name: commune_guadeloupe + columns: *code_is_unique_and_not_null - name: commune_guyane + columns: *code_is_unique_and_not_null - name: commune_martinique + columns: *code_is_unique_and_not_null - name: commune_reunion + columns: *code_is_unique_and_not_null + - name: commune_metropole + columns: *code_is_unique_and_not_null - name: departement + columns: *code_is_unique_and_not_null - name: departement_guadeloupe + columns: *code_is_unique_and_not_null - name: departement_guyane + columns: *code_is_unique_and_not_null - name: departement_martinique + columns: *code_is_unique_and_not_null - name: departement_reunion + columns: *code_is_unique_and_not_null + - name: departement_metropole + columns: *code_is_unique_and_not_null + - name: epci + columns: *code_is_unique_and_not_null + - name: epci_guadeloupe + columns: *code_is_unique_and_not_null + - name: epci_guyane + columns: *code_is_unique_and_not_null + - name: epci_martinique + columns: *code_is_unique_and_not_null + - name: epci_reunion + columns: *code_is_unique_and_not_null + - name: epci_metropole + columns: *code_is_unique_and_not_null + sources: - name: public @@ -26,5 +61,8 @@ sources: - name: departement_guyane - name: departement_martinique - name: departement_reunion - - name: epci - - name: region + - name: epci_metropole + - name: epci_guadeloupe + - name: epci_guyane + - name: epci_martinique + - name: epci_reunion From 61de88a820465bc2161df0ea7e59015752ed8fce Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Wed, 9 Oct 2024 15:01:59 +0200 Subject: [PATCH 006/129] test(signup): add password validation --- users/tests/test_signup.py | 89 +++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/users/tests/test_signup.py b/users/tests/test_signup.py index 3ffb507e9..5a293caee 100644 --- a/users/tests/test_signup.py +++ b/users/tests/test_signup.py @@ -6,8 +6,8 @@ "email": "john.doe@gmail.com", "organism": "Test", "function": "Test", - "password1": "password", - "password2": "password", + "password1": "ycvqB:U7aj%umbG3H Date: Wed, 9 Oct 2024 16:01:35 +0200 Subject: [PATCH 007/129] feat(signup): add password validation --- config/settings.py | 3 +++ users/forms.py | 18 +++++++++++++++--- users/tests/test_signup.py | 38 ++++++-------------------------------- utils/tests_validators.py | 11 +++++++++++ utils/validators.py | 16 +++++++++++++++- 5 files changed, 50 insertions(+), 36 deletions(-) create mode 100644 utils/tests_validators.py diff --git a/config/settings.py b/config/settings.py index 33545fdee..ad6ca7bd5 100644 --- a/config/settings.py +++ b/config/settings.py @@ -173,6 +173,9 @@ { "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", }, + { + "NAME": "utils.validators.ContainsSpecialCharacterValidator", + }, ] diff --git a/users/forms.py b/users/forms.py index 395640ea3..d77e2d3cd 100644 --- a/users/forms.py +++ b/users/forms.py @@ -4,6 +4,7 @@ UserChangeForm, UserCreationForm, ) +from django.contrib.auth.password_validation import validate_password from .models import User @@ -21,7 +22,9 @@ class Meta: class SignupForm(forms.ModelForm): - password1 = forms.CharField(label="Mot de passe", widget=forms.PasswordInput(), max_length=50) + password1 = forms.CharField( + label="Mot de passe", widget=forms.PasswordInput(), validators=[validate_password], max_length=50 + ) password2 = forms.CharField( label="Confirmer le mot de passe", widget=forms.PasswordInput(), @@ -47,8 +50,10 @@ def clean(self): cleaned_data = super().clean() password1 = cleaned_data.get("password1") password2 = cleaned_data.get("password2") + if password1 is not None and password1 != password2: self.add_error("password2", "Les mots de passe ne sont pas identiques") + return cleaned_data def save(self, commit=True): @@ -73,8 +78,15 @@ class SigninForm(AuthenticationForm): class UpdatePasswordForm(forms.Form): old_password = forms.CharField(label="Ancien mot de passe", widget=forms.PasswordInput()) - new_password = forms.CharField(label="Nouveau mot de passe", widget=forms.PasswordInput()) - new_password2 = forms.CharField(label="Répétez votre nouveau mot de passe", widget=forms.PasswordInput()) + new_password = forms.CharField( + label="Nouveau mot de passe", + widget=forms.PasswordInput(), + validators=[validate_password], + ) + new_password2 = forms.CharField( + label="Répétez votre nouveau mot de passe", + widget=forms.PasswordInput(), + ) def __init__(self, *args, **kwargs): self.user = kwargs.pop("user") diff --git a/users/tests/test_signup.py b/users/tests/test_signup.py index 5a293caee..4f603a814 100644 --- a/users/tests/test_signup.py +++ b/users/tests/test_signup.py @@ -1,5 +1,7 @@ from django.test import TestCase +from utils.validators import MISSING_SPECIAL_CHAR_ERROR + valid_payload = { "first_name": "John", "last_name": "Doe", @@ -101,35 +103,6 @@ def test_strong_password_are_accepted(self): errors=[], ) - def test_password_do_not_contain_user_info(self): - payload_without_password = { - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@gmail.com", - "organism": "Commune", - "function": "Maire", - } - - bad_password_payloads = [ - {"password1": "JohnDoe!", "password2": "JohnDoe!"}, - {"password1": "John!", "password2": "John!"}, - {"password1": "Doe!", "password2": "Doe!"}, - {"password1": "Commune!", "password2": "Commune!"}, - {"password1": "Maire!", "password2": "Maire!"}, - {"password1": "CommuneMaire!", "password2": "CommuneMaire!"}, - ] - - for bad_password_payload in bad_password_payloads: - with self.subTest(bad_password_payload=bad_password_payload): - data = {**payload_without_password, **bad_password_payload} - response = self.client.post(path=form_url, data=data) - self.assertFormError( - response=response, - form="form", - field="password1", - errors="Le mot de passe ne doit pas contenir vos informations personnelles.", - ) - def test_password_do_not_contain_common_password(self): password_payload = { "password1": "password!", @@ -138,11 +111,12 @@ def test_password_do_not_contain_common_password(self): data = {**valid_payload, **password_payload} response = self.client.post(path=form_url, data=data) + self.assertFormError( response=response, form="form", field="password1", - errors="Le mot de passe est trop commun.", + errors="Ce mot de passe est trop courant.", ) def test_password_minimum_length(self): @@ -157,7 +131,7 @@ def test_password_minimum_length(self): response=response, form="form", field="password1", - errors="Le mot de passe doit contenir au moins 8 caractères.", + errors="Ce mot de passe est trop court. Il doit contenir au minimum 8 caractères.", ) def test_password_contains_special_chars(self): @@ -172,5 +146,5 @@ def test_password_contains_special_chars(self): response=response, form="form", field="password1", - errors="Le mot de passe doit contenir au moins un caractère spécial.", + errors=MISSING_SPECIAL_CHAR_ERROR, ) diff --git a/utils/tests_validators.py b/utils/tests_validators.py new file mode 100644 index 000000000..b471b9461 --- /dev/null +++ b/utils/tests_validators.py @@ -0,0 +1,11 @@ +from django.core.exceptions import ValidationError +from django.test import TestCase + +from .validators import ContainsSpecialCharacterValidator + + +class TestValidators(TestCase): + def test_contains_special_character_validator_with_invalid_password(self) -> None: + validator = ContainsSpecialCharacterValidator() + with self.assertRaises(ValidationError): + validator.validate(password="password") diff --git a/utils/validators.py b/utils/validators.py index 657a32996..bc2707342 100644 --- a/utils/validators.py +++ b/utils/validators.py @@ -1,5 +1,10 @@ +from string import punctuation + from django.core.exceptions import ValidationError +NOT_ALPHA_ERROR = "Le champ ne doit contenir que des lettres, des espaces ou des tirets." +MISSING_SPECIAL_CHAR_ERROR = "Le mot de passe doit contenir au moins un caractère spécial." + def is_alpha_valid(value: str) -> bool: special_chars_allowed = [" ", "-", "'"] @@ -8,4 +13,13 @@ def is_alpha_valid(value: str) -> bool: def is_alpha_validator(value: str) -> bool: if not is_alpha_valid(value): - raise ValidationError("Le champ ne doit contenir que des lettres, des espaces ou des tirets.") + raise ValidationError(NOT_ALPHA_ERROR) + + +class ContainsSpecialCharacterValidator: + def validate(self, password, user=None): + if not any(char in password for char in punctuation): + raise ValidationError(MISSING_SPECIAL_CHAR_ERROR) + + def get_help_text(self): + return MISSING_SPECIAL_CHAR_ERROR From 4aa21c5202a3a91b6f207375d0ea94076ab369b8 Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Thu, 10 Oct 2024 12:18:55 +0200 Subject: [PATCH 008/129] fix(crips): simplify notifications --- crisp/models.py | 21 +++++++++++++++++++++ crisp/signals.py | 21 ++++++++++++++------- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/crisp/models.py b/crisp/models.py index 95c107d50..70acd2a35 100644 --- a/crisp/models.py +++ b/crisp/models.py @@ -1,3 +1,5 @@ +from typing import Literal + from django.db import models from .signals import on_notification_save @@ -8,6 +10,25 @@ class CrispWebhookNotification(models.Model): timestamp = models.DateTimeField() data = models.JSONField() + @property + def from_value(self) -> Literal["user", "operator"] | None: + return self.data.get("from") + + @property + def sender(self): + if self.from_value and self.from_value == "user": + return self.data.get("user") + + return {} + + @property + def sender_email(self): + return self.sender.get("email") + + @property + def sender_name(self): + return self.sender.get("nickname") + @property def origin(self): return self.data.get("origin", "crisp") diff --git a/crisp/signals.py b/crisp/signals.py index ee2ae4bdc..53249574f 100644 --- a/crisp/signals.py +++ b/crisp/signals.py @@ -1,19 +1,26 @@ from textwrap import dedent +from crisp.models import CrispWebhookNotification from utils.mattermost import Crisp -def on_notification_save(sender, instance, created, *args, **kwargs): - if created: - message_with_link = f"[{instance.message}]({instance.inbox_url})" +def on_notification_save( + sender, + instance: CrispWebhookNotification, + created, + *args, + **kwargs, +): + if created and instance.event == "message:received" and instance.from_value == "user": + instance.data message = dedent( f""" - Nouveau message reçu sur Crisp. - Evénement : {instance.event} - Origine : {instance.origin} Date : {instance.timestamp} - Message : {message_with_link} + URL crisp : {instance.inbox_url} + Nom : {instance.sender_name} + Email : {instance.sender_email} + Message : {instance.message} """ ) From 3800963e09096c24436212391fe3742e864ea581 Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Thu, 10 Oct 2024 12:24:46 +0200 Subject: [PATCH 009/129] fix(signals): remove typing from on_notification_save --- crisp/signals.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crisp/signals.py b/crisp/signals.py index 53249574f..4bda0d7b9 100644 --- a/crisp/signals.py +++ b/crisp/signals.py @@ -1,12 +1,11 @@ from textwrap import dedent -from crisp.models import CrispWebhookNotification from utils.mattermost import Crisp def on_notification_save( sender, - instance: CrispWebhookNotification, + instance, created, *args, **kwargs, From 6a89d77cc9e7f4fe61b322306b3152fbe658b06d Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Thu, 10 Oct 2024 15:01:50 +0200 Subject: [PATCH 010/129] feat(crisp): simplify notification --- crisp/models.py | 6 +----- crisp/signals.py | 29 +++++++++++++-------------- crisp/tests.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 crisp/tests.py diff --git a/crisp/models.py b/crisp/models.py index 70acd2a35..2051d6b4f 100644 --- a/crisp/models.py +++ b/crisp/models.py @@ -21,10 +21,6 @@ def sender(self): return {} - @property - def sender_email(self): - return self.sender.get("email") - @property def sender_name(self): return self.sender.get("nickname") @@ -35,7 +31,7 @@ def origin(self): @property def message(self): - return self.data.get("content") + return self.data.get("content").replace("\r", "").replace("\\n", "\n") @property def inbox_url(self): diff --git a/crisp/signals.py b/crisp/signals.py index 4bda0d7b9..279e43c49 100644 --- a/crisp/signals.py +++ b/crisp/signals.py @@ -1,8 +1,14 @@ -from textwrap import dedent - from utils.mattermost import Crisp +def format_message(instance): + message = instance.message.replace("\r", "").replace("\\n", "\n") + return f"""Date : {instance.timestamp} +Lien Crisp : {instance.inbox_url} +Nom : {instance.sender_name} +Message : {message}""" + + def on_notification_save( sender, instance, @@ -10,20 +16,13 @@ def on_notification_save( *args, **kwargs, ): - if created and instance.event == "message:received" and instance.from_value == "user": - instance.data - - message = dedent( - f""" - Date : {instance.timestamp} - URL crisp : {instance.inbox_url} - Nom : {instance.sender_name} - Email : {instance.sender_email} - Message : {instance.message} - """ - ) + message_is_sent = instance.event == "message:send" + message_is_from_user = instance.from_value == "user" + message_is_text = instance.data.get("type") == "text" + message_is_sent_by_user = message_is_sent and message_is_from_user - notification = Crisp(msg=message) + if created and message_is_sent_by_user and message_is_text: + notification = Crisp(msg=format_message(instance)) notification.send() return instance diff --git a/crisp/tests.py b/crisp/tests.py new file mode 100644 index 000000000..3bd1bca5e --- /dev/null +++ b/crisp/tests.py @@ -0,0 +1,51 @@ +from django.test import TestCase + +from .models import CrispWebhookNotification +from .signals import format_message + + +class TestCrispNotification(TestCase): + def setUp(self) -> None: + self.maxDiff = None + self.notification = CrispWebhookNotification( + event="message:send", + timestamp="2021-08-03T14:00:00Z", + data={ + "from": "user", + "type": "text", + "user": {"user_id": "session_306c0770-46f3-4c66-8931-35cb324a0b72", "nickname": "Marie-José"}, + "origin": "urn:crisp.im:contact-form:0", + "content": "**Rapport Varennes-Jarcy**\n\nBonjour,\r\ndemande effectuée à plusieurs reprises mais aucune réception,\r\nbien cordialement,", # noqa : E501 + "stamped": True, + "mentions": [], + "timestamp": 1715864068597, + "session_id": "session_306c0770-46f3-4c66-8931-35cb324a0b72", + "website_id": "0ac14c43-849c-4fc4-8e09-923b78e9a0de", + "fingerprint": 171586406859730, + }, + ) + + def test_sender_name(self): + self.assertEqual(self.notification.sender_name, "Marie-José") + + def test_message(self): + self.assertEqual( + self.notification.message, + """**Rapport Varennes-Jarcy** + +Bonjour, +demande effectuée à plusieurs reprises mais aucune réception, +bien cordialement,""", + ) + + def test_format_message(self): + output = format_message(self.notification) + expected_output = """Date : 2021-08-03T14:00:00Z +Lien Crisp : https://app.crisp.chat/website/0ac14c43-849c-4fc4-8e09-923b78e9a0de/inbox/session_306c0770-46f3-4c66-8931-35cb324a0b72/ +Nom : Marie-José +Message : **Rapport Varennes-Jarcy** + +Bonjour, +demande effectuée à plusieurs reprises mais aucune réception, +bien cordialement,""" # noqa : E501 + self.assertEqual(output, expected_output) From 52a914e5c885efd747e15c12e7aa0e1c77174d5f Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Thu, 10 Oct 2024 15:03:05 +0200 Subject: [PATCH 011/129] feat(signals): simplify format_message --- crisp/signals.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crisp/signals.py b/crisp/signals.py index 279e43c49..8276e656a 100644 --- a/crisp/signals.py +++ b/crisp/signals.py @@ -2,11 +2,10 @@ def format_message(instance): - message = instance.message.replace("\r", "").replace("\\n", "\n") return f"""Date : {instance.timestamp} Lien Crisp : {instance.inbox_url} Nom : {instance.sender_name} -Message : {message}""" +Message : {instance.message}""" def on_notification_save( From 749b35db1edb0d8e0c14d05452eed259b6c1e80f Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Sun, 13 Oct 2024 19:01:07 +0200 Subject: [PATCH 012/129] feat(ocsge): add source for 2a" --- airflow/include/ocsge/sources.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/airflow/include/ocsge/sources.json b/airflow/include/ocsge/sources.json index 6492ffe45..d44590d61 100644 --- a/airflow/include/ocsge/sources.json +++ b/airflow/include/ocsge/sources.json @@ -1,4 +1,13 @@ { + "2A": { + "difference": { + "2019_2021": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0_DIFF_SHP_LAMB93_D02A_2019-2021/OCS-GE_2-0_DIFF_SHP_LAMB93_D02A_2019-2021.7z" + }, + "occupation_du_sol_et_zone_construite": { + "2019": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D02A_2019-01-01/OCS-GE_2-0__SHP_LAMB93_D02A_2019-01-01.7z", + "2021": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0__SHP_LAMB93_D02A_2021-01-01/OCS-GE_2-0__SHP_LAMB93_D02A_2021-01-01.7z" + } + }, "2B": { "difference": { "2019_2021": "https://data.geopf.fr/telechargement/download/OCSGE/OCS-GE_2-0_DIFF_SHP_LAMB93_D02B_2019-2021/OCS-GE_2-0_DIFF_SHP_LAMB93_D02B_2019-2021.7z" From d0e7a06396b408fb335b88db8fc83daabe9cc6c0 Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Mon, 14 Oct 2024 00:07:04 +0200 Subject: [PATCH 013/129] fix(dbt): fix incremental delete perf issue --- .../sparte/macros/delete_from_this_where_field_not_in.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/airflow/include/sql/sparte/macros/delete_from_this_where_field_not_in.sql b/airflow/include/sql/sparte/macros/delete_from_this_where_field_not_in.sql index 400c62090..6afc95a33 100644 --- a/airflow/include/sql/sparte/macros/delete_from_this_where_field_not_in.sql +++ b/airflow/include/sql/sparte/macros/delete_from_this_where_field_not_in.sql @@ -6,5 +6,11 @@ {% if not that_field %} {% set that_field = this_field %} {% endif %} - DELETE FROM {{ this }} WHERE {{ this_field }} not in (SELECT DISTINCT {{ that_field }} FROM {{ ref(table) }} ) + DELETE FROM {{ this }} + WHERE {{ this_field }} in ( + SELECT {{ this_field }} FROM {{ this }} AS foo + LEFT JOIN {{ ref(table) }} AS bar + ON foo.{{ this_field }} = bar.{{ that_field }} + WHERE {{ that_field }} is null + ) {% endmacro %} From 097e8c15546ecee0258437bb5b5ecb239ba129db Mon Sep 17 00:00:00 2001 From: "Sofian A. Thibaut" Date: Fri, 2 Aug 2024 15:53:42 +0200 Subject: [PATCH 014/129] Htmx middleware --- config/middlewares.py | 10 ++++++++++ config/settings.py | 1 + 2 files changed, 11 insertions(+) diff --git a/config/middlewares.py b/config/middlewares.py index aaaeafc12..76e6a0fcc 100644 --- a/config/middlewares.py +++ b/config/middlewares.py @@ -56,3 +56,13 @@ def process_response(self, request, response): content = response.content.decode("utf-8") response.content = content.replace("[NONCE_PLACEHOLDER]", request.csp_nonce).encode("utf-8") return response + + +class HtmxMiddleware: + def __init__(self, get_response): + self.get_response = get_response + + def __call__(self, request): + request.htmx = "HX-Request" in request.headers + response = self.get_response(request) + return response diff --git a/config/settings.py b/config/settings.py index ad6ca7bd5..1e6a180ac 100644 --- a/config/settings.py +++ b/config/settings.py @@ -107,6 +107,7 @@ MIDDLEWARE = [ "django.middleware.gzip.GZipMiddleware", + "config.middlewares.HtmxMiddleware", "config.middlewares.LogIncomingRequest", "config.middlewares.MaintenanceModeMiddleware", "django.middleware.security.SecurityMiddleware", From 6fea3b26e487f7ffb2cefa0042f9bf691ed7272a Mon Sep 17 00:00:00 2001 From: "Sofian A. Thibaut" Date: Fri, 2 Aug 2024 15:58:56 +0200 Subject: [PATCH 015/129] Dashboard layout --- .../scripts/components/DashboardSidebar.tsx | 174 +++++ assets/scripts/index.js | 4 +- assets/scripts/react-roots.js | 13 + package-lock.json | 37 + package.json | 1 + project/static/project/styles/dashboard.css | 37 + project/templates/project/layout/base.html | 89 +++ static/assets/scripts/bundle.js | 710 +++++++++++++++++- static/assets/styles/main.css | 21 + templates/footer.html | 2 +- templates/header.html | 2 +- templates/index.html | 21 - 12 files changed, 1085 insertions(+), 26 deletions(-) create mode 100644 assets/scripts/components/DashboardSidebar.tsx create mode 100644 project/static/project/styles/dashboard.css create mode 100644 project/templates/project/layout/base.html diff --git a/assets/scripts/components/DashboardSidebar.tsx b/assets/scripts/components/DashboardSidebar.tsx new file mode 100644 index 000000000..1c45ca9c4 --- /dev/null +++ b/assets/scripts/components/DashboardSidebar.tsx @@ -0,0 +1,174 @@ +import React, { useState, useEffect } from 'react'; +import styled from 'styled-components'; + +interface MenuItem { + label: string; + url?: string; + subMenu?: MenuItem[]; + icon?: string; +} + +interface SidebarProps { + menuItems: MenuItem[]; + currentUrl: string; +} + +const SidebarContainer = styled.nav` + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +`; + +const MenuList = styled.ul` + list-style: none; + padding: 0; + margin: 0; +`; + +const MenuItemContainer = styled.li` + padding: 0; + margin: 0; + font-weight: 500; + color: #A3AED0; + + &.is-menu { + margin-bottom: 1em; + } + + & > a { + padding: 1vh 1vw; + text-decoration: none; + background-image: none; + transition: color 0.2s ease, border-color 0.3s ease; + display: flex; + width: 100%; + font-size: 0.9em; + border-right: 4px solid transparent; + -webkit-tap-highlight-color: transparent; + + &:hover { + color: #2B3674; + } + + &:active { + background: none; + } + } + + & > span { + display: flex; + align-items: center; + cursor: default; + padding: 1vh 1vw; + font-size: 0.9em; + } + + &.active { + a { + color: #2B3674; + border-right: 4px solid #6A6AF4; + } + + i { + color: #4318FF; + } + } +`; + +const SubMenuList = styled.ul` + list-style: none; + padding: 0; + margin: 0; + padding-left: 0.4em; + border-left: 1px solid #dae0ef; + margin-left: 1.1em; +`; + +const Icon = styled.i` + margin-right: 0.7em; +`; + +// const BottomSection = styled.div` +// margin: 1em; +// padding: 3em 1em; +// border: 2px solid #4318FF; +// border-radius: 8px; +// text-align: center; +// font-size: 0.9em; +// color: #fff; +// display: flex; +// align-items: center; +// justify-content: center; + +// i { +// margin-right: 0.5em; +// } +// `; + +const Sidebar: React.FC = ({ menuItems, currentUrl }) => { + const [activeUrl, setActiveUrl] = useState(currentUrl); + + const handleClick = (url?: string) => { + if (url) { + setActiveUrl(url); + } + }; + + const renderMenuItems = (items: MenuItem[], isSubMenu: boolean = false) => ( + + {items.map(item => ( + + {item.url ? ( + handleClick(item.url)} + > + {!isSubMenu && item.icon && } + {item.label} + + ) : ( + + {!isSubMenu && item.icon && } + {item.label} + + )} + {item.subMenu && ( + + {renderMenuItems(item.subMenu, true)} + + )} + + ))} + + ); + + return ( + + {renderMenuItems(menuItems)} + {/* + +

+ + République + Française + +

+
*/} +
+ ); +}; + +export default Sidebar; \ No newline at end of file diff --git a/assets/scripts/index.js b/assets/scripts/index.js index a67e6aff3..13a72b27c 100644 --- a/assets/scripts/index.js +++ b/assets/scripts/index.js @@ -9,10 +9,10 @@ import '../styles/index.css' import '@gouvfr/dsfr/dist/dsfr.module.min.js' // Import fr-callout-read-more -import './fr-callout-read-more.js' +// import './fr-callout-read-more.js' // Import highcharts custom buttons -import './highcharts-custom-buttons.js' +// import './highcharts-custom-buttons.js' // Import filter diagnostic list import './filter-diagnostic-list.js' diff --git a/assets/scripts/react-roots.js b/assets/scripts/react-roots.js index 0105cc3f9..0048d23fe 100644 --- a/assets/scripts/react-roots.js +++ b/assets/scripts/react-roots.js @@ -2,6 +2,7 @@ import React from 'react' import { createRoot } from 'react-dom/client' import { Provider } from 'react-redux' import HighchartsMapOcsge from './components/HighchartsMapOcsge.tsx' +import DashboardSidebar from './components/DashboardSidebar.tsx' import store from './store/store.js' const highchartsMapOcsge = document.getElementById('react-highcharts-ocsge') @@ -13,3 +14,15 @@ if (highchartsMapOcsge) , ) } + +const dashboardSidebar = document.getElementById('react-dashboard-sidebar') +if (dashboardSidebar) +{ + const { menuItems, currentUrl } = JSON.parse(document.getElementById('sidebar-data').textContent) + + createRoot(dashboardSidebar).render( + + + , + ) +} diff --git a/package-lock.json b/package-lock.json index 9224fac92..4a8842ef8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@types/node": "^20.11.30", "@types/react": "^18.2.73", "@types/react-dom": "^18.2.23", + "@types/styled-components": "^5.1.34", "highcharts": "^11.4.6", "highcharts-react-official": "^3.2.1", "htmx.org": "^1.8.4", @@ -2522,6 +2523,16 @@ "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==", "license": "MIT" }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -2633,6 +2644,17 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "license": "MIT" }, + "node_modules/@types/styled-components": { + "version": "5.1.34", + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.34.tgz", + "integrity": "sha512-mmiVvwpYklFIv9E8qfxuPyIt/OuyIrn6gMOAMOFUO3WJfSrSE+sGUoa4PiZj77Ut7bKZpaa6o1fBKS/4TOEvnA==", + "license": "MIT", + "dependencies": { + "@types/hoist-non-react-statics": "*", + "@types/react": "*", + "csstype": "^3.0.2" + } + }, "node_modules/@types/stylis": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", @@ -6074,6 +6096,21 @@ "react": ">=16.8.0" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", diff --git a/package.json b/package.json index 6771ef4cf..e37a14053 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@types/node": "^20.11.30", "@types/react": "^18.2.73", "@types/react-dom": "^18.2.23", + "@types/styled-components": "^5.1.34", "highcharts": "^11.4.6", "highcharts-react-official": "^3.2.1", "htmx.org": "^1.8.4", diff --git a/project/static/project/styles/dashboard.css b/project/static/project/styles/dashboard.css new file mode 100644 index 000000000..5c51d1801 --- /dev/null +++ b/project/static/project/styles/dashboard.css @@ -0,0 +1,37 @@ +.fr-header { + filter: none; +} + +.dashboard-wrapper { + display: flex; + align-items: stretch; +} + +.dashboard-sidebar { + background-color: #fff; + border-top: 1px solid #f4f7fe; + padding-top: 4vh; + height: 100vh; + position: sticky; + top: 0; + overflow-y: auto; + flex: 0 0 250px; +} + +.dashboard-content { + background: #f4f7fe; + padding: 0 2vw 10vh 2vw; + width: 100%; +} + +.fr-breadcrumb li { + color: #707EAE !important; +} + +.fr-custom-loader { + display: none; +} + +.fr-callout { + background-color: #fff !important; +} \ No newline at end of file diff --git a/project/templates/project/layout/base.html b/project/templates/project/layout/base.html new file mode 100644 index 000000000..27edad25a --- /dev/null +++ b/project/templates/project/layout/base.html @@ -0,0 +1,89 @@ +{% extends "index.html" %} + +{% load sri %} + +{% block headers %} +{% sri_static "project/styles/dashboard.css" %} +{% sri_static "highcharts/js/highcharts.js" %} +{% sri_static "highcharts/js/exporting.js" %} +{% sri_static "highcharts/js/sankey.js" %} +{% sri_static "highcharts/js/dependency-wheel.js" %} + + +{% endblock %} + +{% block content %} +
+
+ +
+ {% block dashboard_content %} + {% endblock %} +
+
+{% endblock content %} + +{% block bodyend %} +{% sri_static "project/scripts/highcharts-custom-buttons.js" %} +{% sri_static "project/scripts/fr-callout-read-more.js" %} +{% endblock bodyend %} + +{% block footer %}{% endblock footer %} diff --git a/static/assets/scripts/bundle.js b/static/assets/scripts/bundle.js index bf5bb49c1..0c50ac905 100644 --- a/static/assets/scripts/bundle.js +++ b/static/assets/scripts/bundle.js @@ -1 +1,709 @@ -(()=>{var __webpack_modules__={348:()=>{const t=new class{constructor(){this.modules={}}create(t){const e=new t;this.modules[e.type]=e}getModule(t){return this.modules[t]}add(t,e){this.modules[t].add(e)}remove(t,e){this.modules[t].remove(e)}get isActive(){return this._isActive}set isActive(t){if(t===this._isActive)return;this._isActive=t;const e=Object.keys(this.modules).map((t=>this.modules[t]));if(t)for(const t of e)t.activate();else for(const t of e)t.deactivate()}get isLegacy(){return this._isLegacy}set isLegacy(t){t!==this._isLegacy&&(this._isLegacy=t)}},e="dsfr",i="1.12.1";class r{constructor(t,e,i,r){switch(this.level=t,this.light=e,this.dark=i,r){case"warn":this.logger=console.warn;break;case"error":this.logger=console.error;break;default:this.logger=console.log}}log(...t){const i=new s(e);for(const e of t)i.add(e);this.print(i)}print(t){t.setColor(this.color),this.logger.apply(console,t.getMessage())}get color(){return window.matchMedia("(prefers-color-scheme: dark)").matches?this.dark:this.light}}class s{constructor(t){this.inputs=["%c"],this.styles=["font-family:Marianne","line-height: 1.5"],this.objects=[],t&&this.add(`${t} :`)}add(t){switch(typeof t){case"object":case"function":this.inputs.push("%o "),this.objects.push(t);break;default:this.inputs.push(`${t} `)}}setColor(t){this.styles.push(`color:${t}`)}getMessage(){return[this.inputs.join(""),this.styles.join(";"),...this.objects]}}const n={log:new r(0,"#616161","#989898"),debug:new r(1,"#000091","#8B8BFF"),info:new r(2,"#007c3b","#00ed70"),warn:new r(3,"#ba4500","#fa5c00","warn"),error:new r(4,"#D80600","#FF4641","error")},o=new class{constructor(){this.level=2;for(const t in n){const e=n[t];this[t]=(...t)=>{this.level<=e.level&&e.log.apply(e,t)},this[t].print=e.print.bind(e)}}state(){const e=new s;e.add(t),this.log.print(e)}tree(){const e=t.getModule("stage");if(!e)return;const i=new s;this._branch(e.root,0,i),this.log.print(i)}_branch(t,e,i){let r="";if(e>0){let t="";for(let i=0;i{"loading"!==document.readyState?window.requestAnimationFrame(t):document.addEventListener("DOMContentLoaded",t)},l={AUTO:"auto",MANUAL:"manual",RUNTIME:"runtime",LOADED:"loaded",VUE:"vue",ANGULAR:"angular",REACT:"react"},c=new class{constructor(){this._mode=l.AUTO,this.isStarted=!1,this.starting=this.start.bind(this),this.preventManipulation=!1}configure(t={},e,r){this.startCallback=e;const s=t.production&&(!r||"false"!==r.production);switch(!0){case r&&!isNaN(r.level):o.level=Number(r.level);break;case r&&r.verbose&&("true"===r.verbose||1===r.verbose):o.level=0;break;case s:o.level=999;break;case t.verbose:o.level=0}o.info(`version ${i}`),this.mode=t.mode||l.AUTO}set mode(t){switch(t){case l.AUTO:this.preventManipulation=!1,e=this.starting,a(e);break;case l.LOADED:this.preventManipulation=!1,a(this.starting);break;case l.RUNTIME:this.preventManipulation=!1,this.start();break;case l.MANUAL:this.preventManipulation=!1;break;case l.VUE:case l.ANGULAR:case l.REACT:this.preventManipulation=!0;break;default:return void o.error("Illegal mode")}var e;this._mode=t,o.info(`mode set to ${t}`)}get mode(){return this._mode}start(){o.info("start"),this.startCallback()}};class h{constructor(){this._collection=[]}forEach(t){this._collection.forEach(t)}map(t){return this._collection.map(t)}get length(){return this._collection.length}add(t){return!(this._collection.indexOf(t)>-1||(this._collection.push(t),this.onAdd&&this.onAdd(),this.onPopulate&&1===this._collection.length&&this.onPopulate(),0))}remove(t){const e=this._collection.indexOf(t);if(-1===e)return!1;this._collection.splice(e,1),this.onRemove&&this.onRemove(),this.onEmpty&&0===this._collection.length&&this.onEmpty()}execute(...t){for(const e of this._collection)e&&e.apply(null,t)}clear(){this._collection.length=0}clone(){const t=new h;return t._collection=this._collection.slice(),t}get collection(){return this._collection}}class u extends h{constructor(t){super(),this.type=t,this.isActive=!1}activate(){}deactivate(){}}const d=t=>`fr-${t}`;d.selector=(t,e)=>(void 0===e&&(e="."),`${e}${d(t)}`),(d.attr=t=>`data-${d(t)}`).selector=(t,e)=>{let i=d.attr(t);return void 0!==e&&(i+=`="${e}"`),`[${i}]`},d.event=t=>`${e}.${t}`,d.emission=(t,e)=>`emission:${t}.${e}`;const p=(t,e)=>Array.prototype.slice.call(t.querySelectorAll(e)),f=(t,e)=>{const i=t.parentElement;return i.matches(e)?i:i===document.documentElement?null:f(i,e)};class m{constructor(t,e,i){this.selector=t,this.InstanceClass=e,this.creator=i,this.instances=new h,this.isIntroduced=!1,this._instanceClassName=this.InstanceClass.instanceClassName,this._instanceClassNames=this.getInstanceClassNames(this.InstanceClass),this._property=this._instanceClassName.substring(0,1).toLowerCase()+this._instanceClassName.substring(1);const r=this._instanceClassName.replace(/[^a-zA-Z0-9]+/g,"-").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([^0-9])/g,"$1-$2").replace(/([^0-9])([0-9])/g,"$1-$2").toLowerCase();this._attribute=d.attr(`js-${r}`)}getInstanceClassNames(t){const e=Object.getPrototypeOf(t);return e&&"Instance"!==e.instanceClassName?[...this.getInstanceClassNames(e),t.instanceClassName]:[t.instanceClassName]}hasInstanceClassName(t){return this._instanceClassNames.indexOf(t)>-1}introduce(){this.isIntroduced||(this.isIntroduced=!0,t.getModule("stage").parse(document.documentElement,this))}parse(t,e){const i=[];return t.matches&&t.matches(this.selector)&&i.push(t),!e&&t.querySelectorAll&&t.querySelector(this.selector)&&i.push.apply(i,p(t,this.selector)),i}create(t){if(!t.node.matches(this.selector))return;const e=new this.InstanceClass;return this.instances.add(e),e}remove(t){this.instances.remove(t)}dispose(){const t=this.instances.collection;for(let e=t.length-1;e>-1;e--)t[e]._dispose();this.creator=null}get instanceClassName(){return this._instanceClassName}get instanceClassNames(){return this._instanceClassNames}get property(){return this._property}get attribute(){return this._attribute}}class g extends u{constructor(){super("register")}register(e,i,r){const s=new m(e,i,r);return this.add(s),t.isActive&&s.introduce(),s}activate(){for(const t of this.collection)t.introduce()}remove(t){t.dispose(),super.remove(t)}}let y=0;class _{constructor(t,e){e?this.id=e:(y++,this.id=y),this.node=t,this.attributeNames=[],this.instances=[],this._children=[],this._parent=null,this._projects=[]}get proxy(){const t=this;if(!this._proxy){this._proxy={id:this.id,get parent(){return t.parent?t.parent.proxy:null},get children(){return t.children.map((t=>t.proxy))}};for(const t of this.instances)this._proxy[t.registration.property]=t.proxy}return this._proxy}get html(){if(!this.node||!this.node.outerHTML)return"";const t=this.node.outerHTML.indexOf(">");return this.node.outerHTML.substring(0,t+1)}project(t){-1===this._projects.indexOf(t)&&this._projects.push(t)}populate(){const t=this._projects.slice();this._projects.length=0;for(const e of t)this.create(e)}create(t){if(this.hasInstance(t.instanceClassName))return;o.debug(`create instance of ${t.instanceClassName} on element [${this.id}]`);const e=t.create(this);this.instances.push(e),e._config(this,t),this._proxy&&(this._proxy[t.property]=e.proxy)}remove(t){const e=this.instances.indexOf(t);e>-1&&this.instances.splice(e,1),this._proxy&&delete this._proxy[t.registration.property]}get parent(){return this._parent}get ascendants(){return[this.parent,...this.parent.ascendants]}get children(){return this._children}get descendants(){const t=[...this._children];return this._children.forEach((e=>t.push(...e.descendants))),t}addChild(t,e){return this._children.indexOf(t)>-1?null:(t._parent=this,!isNaN(e)&&e>-1&&e=0;t--){const e=this.instances[t];e&&e._dispose()}this.instances.length=0,t.remove("stage",this),this.parent.removeChild(this),this._children.length=0,o.debug(`remove element [${this.id}] ${this.html}`)}prepare(t){-1===this.attributeNames.indexOf(t)&&this.attributeNames.push(t)}examine(){const t=this.attributeNames.slice();this.attributeNames.length=0;for(let e=this.instances.length-1;e>-1;e--)this.instances[e].examine(t)}}const v={CLICK:d.emission("root","click"),KEYDOWN:d.emission("root","keydown"),KEYUP:d.emission("root","keyup")},x={TAB:{id:"tab",value:9},ESCAPE:{id:"escape",value:27},END:{id:"end",value:35},HOME:{id:"home",value:36},LEFT:{id:"left",value:37},UP:{id:"up",value:38},RIGHT:{id:"right",value:39},DOWN:{id:"down",value:40}},b=t=>Object.values(x).filter((e=>e.value===t))[0];class w extends _{constructor(){super(document.documentElement,"root"),this.node.setAttribute(d.attr("js"),!0),this.listen()}listen(){document.documentElement.addEventListener("click",this.click.bind(this),{capture:!0}),document.documentElement.addEventListener("keydown",this.keydown.bind(this),{capture:!0}),document.documentElement.addEventListener("keyup",this.keyup.bind(this),{capture:!0})}click(t){this.emit(v.CLICK,t.target)}keydown(t){this.emit(v.KEYDOWN,b(t.keyCode))}keyup(t){this.emit(v.KEYUP,b(t.keyCode))}}class S extends u{constructor(){super("stage"),this.root=new w,super.add(this.root),this.observer=new MutationObserver(this.mutate.bind(this)),this.modifications=[],this.willModify=!1,this.modifying=this.modify.bind(this)}hasElement(t){for(const e of this.collection)if(e.node===t)return!0;return!1}getElement(t){for(const e of this.collection)if(e.node===t)return e;const e=new _(t);return this.add(e),o.debug(`add element [${e.id}] ${e.html}`),e}getProxy(t){return this.hasElement(t)?this.getElement(t).proxy:null}add(t){super.add(t),this.put(t,this.root)}put(t,e){let i=0;for(let r=e.children.length-1;r>-1;r--){const s=e.children[r],n=t.node.compareDocumentPosition(s.node);if(n&Node.DOCUMENT_POSITION_CONTAINS)return void this.put(t,s);if(n&Node.DOCUMENT_POSITION_CONTAINED_BY)e.removeChild(s),t.addChild(s,0);else if(n&Node.DOCUMENT_POSITION_PRECEDING){i=r+1;break}}e.addChild(t,i)}activate(){this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})}deactivate(){this.observer.disconnect()}mutate(t){const e=[];t.forEach((t=>{switch(t.type){case"childList":t.removedNodes.forEach((t=>this.dispose(t))),t.addedNodes.forEach((t=>this.parse(t)));break;case"attributes":if(this.hasElement(t.target)){const i=this.getElement(t.target);i.prepare(t.attributeName),-1===e.indexOf(i)&&e.push(i);for(const t of i.descendants)-1===e.indexOf(t)&&e.push(t)}-1===this.modifications.indexOf(t.target)&&this.modifications.push(t.target)}})),e.forEach((t=>t.examine())),this.modifications.length&&!this.willModify&&(this.willModify=!0,window.requestAnimationFrame(this.modifying))}modify(){this.willModify=!1;const t=this.modifications.slice();this.modifications.length=0;for(const e of t)document.documentElement.contains(e)&&this.parse(e)}dispose(t){const e=[];this.forEach((i=>{t.contains(i.node)&&e.push(i)}));for(const t of e)t.dispose(),this.remove(t)}parse(e,i,r){const s=i?[i]:t.getModule("register").collection,n=[];for(const t of s){const i=t.parse(e,r);for(const e of i){const i=this.getElement(e);i.project(t),-1===n.indexOf(i)&&n.push(i)}}for(const t of n)t.populate()}}class C extends u{constructor(){super("render"),this.rendering=this.render.bind(this),this.nexts=new h}activate(){window.requestAnimationFrame(this.rendering)}request(t){this.nexts.add(t)}render(){if(!t.isActive)return;if(window.requestAnimationFrame(this.rendering),this.forEach((t=>t.render())),!this.nexts.length)return;const e=this.nexts.clone();this.nexts.clear(),e.forEach((t=>t.next()))}}class T extends u{constructor(){super("resize"),this.requireResize=!1,this.resizing=this.resize.bind(this);const t=this.request.bind(this);document.fonts&&document.fonts.ready.then(t),window.addEventListener("resize",t),window.addEventListener("orientationchange",t)}activate(){this.request()}request(){this.requireResize||(this.requireResize=!0,window.requestAnimationFrame(this.resizing))}resize(){this.requireResize&&(this.forEach((t=>t.resize())),this.requireResize=!1)}}class k extends u{constructor(){super("lock"),this._isLocked=!1,this._scrollY=0,this.onPopulate=this.lock.bind(this),this.onEmpty=this.unlock.bind(this)}get isLocked(){return this._isLocked}lock(){if(!this._isLocked){this._isLocked=!0,this._scrollY=window.scrollY;const t=window.innerWidth-document.documentElement.clientWidth;document.documentElement.setAttribute(d.attr("scrolling"),"false"),document.body.style.top=-this._scrollY+"px",this.behavior=getComputedStyle(document.documentElement).getPropertyValue("scroll-behavior"),"smooth"===this.behavior&&(document.documentElement.style.scrollBehavior="auto"),t>0&&document.documentElement.style.setProperty("--scrollbar-width",`${t}px`)}}unlock(){this._isLocked&&(this._isLocked=!1,document.documentElement.removeAttribute(d.attr("scrolling")),document.body.style.top="",window.scrollTo(0,this._scrollY),"smooth"===this.behavior&&document.documentElement.style.removeProperty("scroll-behavior"),document.documentElement.style.removeProperty("--scrollbar-width"))}move(t){this._isLocked?(this._scrollY+=t,document.body.style.top=-this._scrollY+"px"):window.scrollTo(0,window.scrollY+t)}}class E extends u{constructor(){super("load"),this.loading=this.load.bind(this)}activate(){window.addEventListener("load",this.loading)}load(){this.forEach((t=>t.load()))}}const A=["Marianne","Spectral"];class M extends u{constructor(){super("font-swap"),this.swapping=this.swap.bind(this)}activate(){document.fonts&&document.fonts.addEventListener("loadingdone",this.swapping)}swap(){const t=A.filter((t=>document.fonts.check(`16px ${t}`)));this.forEach((e=>e.swapFont(t)))}}class P extends u{constructor(){super("mouse-move"),this.requireMove=!1,this._isMoving=!1,this.moving=this.move.bind(this),this.requesting=this.request.bind(this),this.onPopulate=this.listen.bind(this),this.onEmpty=this.unlisten.bind(this)}listen(){this._isMoving||(this._isMoving=!0,this.requireMove=!1,document.documentElement.addEventListener("mousemove",this.requesting))}unlisten(){this._isMoving&&(this._isMoving=!1,this.requireMove=!1,document.documentElement.removeEventListener("mousemove",this.requesting))}request(t){this._isMoving&&(this.point={x:t.clientX,y:t.clientY},this.requireMove||(this.requireMove=!0,window.requestAnimationFrame(this.moving)))}move(){this.requireMove&&(this.forEach((t=>t.mouseMove(this.point))),this.requireMove=!1)}}class I extends u{constructor(){super("hash"),this.handling=this.handle.bind(this),this.getLocationHash()}activate(){window.addEventListener("hashchange",this.handling)}deactivate(){window.removeEventListener("hashchange",this.handling)}_sanitize(t){return"#"===t.charAt(0)?t.substring(1):t}set hash(t){const e=this._sanitize(t);this._hash!==e&&(window.location.hash=e)}get hash(){return this._hash}getLocationHash(){const t=window.location.hash;this._hash=this._sanitize(t)}handle(t){this.getLocationHash(),this.forEach((e=>e.handleHash(this._hash,t)))}}const L=new class{constructor(){t.create(g),t.create(S),t.create(C),t.create(T),t.create(k),t.create(E),t.create(M),t.create(P),t.create(I);const e=t.getModule("register");this.register=e.register.bind(e)}get isActive(){return t.isActive}start(){o.debug("START"),t.isActive=!0}stop(){o.debug("STOP"),t.isActive=!1}},D=new class{getColor(t,e,i,r={}){const s=`--${t}-${e}-${i}${(t=>{switch(!0){case t.hover:return"-hover";case t.active:return"-active";default:return""}})(r)}`;return getComputedStyle(document.documentElement).getPropertyValue(s).trim()||null}},z=t=>"."===t.charAt(0)?t.substr(1):t,O=t=>{switch(!0){case!t.className:return[];case"string"==typeof t.className:return t.className.split(" ");case"string"==typeof t.className.baseVal:return t.className.baseVal.split(" ")}return[]},R=(t,e,i)=>{e=z(e);const r=O(t),s=r.indexOf(e);!0===i?s>-1&&r.splice(s,1):-1===s&&r.push(e),t.className=r.join(" ")},N=(t,e)=>R(t,e),B=(t,e)=>R(t,e,!0),F=(t,e)=>O(t).indexOf(z(e))>-1,j=['[tabindex]:not([tabindex="-1"])',"a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details","iframe"].join(),U=t=>t.querySelectorAll(j);let V=0;const q=t=>{if(!document.getElementById(t))return t;let e=!0;const i=t;for(;e;)V++,t=`${i}-${V}`,e=document.getElementById(t);return t},G={addClass:N,hasClass:F,removeClass:B,queryParentSelector:f,querySelectorAllArray:p,queryActions:U,uniqueId:q},$={supportLocalStorage:()=>{try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}},supportAspectRatio:()=>!!window.CSS&&CSS.supports("aspect-ratio: 16 / 9")},H={TransitionSelector:{NONE:d.selector("transition-none")}},W=(t,...e)=>(e.forEach((e=>{const i=Object.keys(e).reduce(((t,i)=>(t[i]=Object.getOwnPropertyDescriptor(e,i),t)),{});Object.getOwnPropertySymbols(e).forEach((t=>{const r=Object.getOwnPropertyDescriptor(e,t);r.enumerable&&(i[t]=r)})),Object.defineProperties(t,i)})),t),X={completeAssign:W},Z={},Y={};Object.defineProperty(Y,"isLegacy",{get:()=>t.isLegacy}),Y.setLegacy=()=>{t.isLegacy=!0},Z.legacy=Y,Z.dom=G,Z.image={DataURISVG:class{constructor(t=0,e=0){this._width=t,this._height=e,this._content=""}get width(){return this._width}set width(t){this._width=t}get height(){return this._height}set height(t){this._height=t}get content(){return this._content}set content(t){this._content=t}getDataURI(t=!1){let e=`${this._content}`;return e=e.replace(/#/gi,"%23"),t&&(e=e.replace(//gi,"%3E"),e=e.replace(/"/gi,"'"),e=e.replace(/{/gi,"%7B"),e=e.replace(/}/gi,"%7D")),`data:image/svg+xml;charset=utf8,${e}`}}},Z.support=$,Z.motion=H,Z.property=X,Z.ns=d,Z.register=L.register,Z.state=t,Z.query=(t=>{if(t&&t.search){const t=new URLSearchParams(window.location.search).entries();return Object.fromEntries(t)}return null})(window.location),Object.defineProperty(Z,"preventManipulation",{get:()=>c.preventManipulation}),Object.defineProperty(Z,"stage",{get:()=>t.getModule("stage")});const K=e=>t.getModule("stage").getProxy(e);K.version=i,K.prefix="fr",K.organisation="@gouvfr",K.Modes=l,Object.defineProperty(K,"mode",{set:t=>{c.mode=t},get:()=>c.mode}),K.internals=Z,K.version=i,K.start=L.start,K.stop=L.stop,K.inspector=o,K.colors=D;const Q=window[e];K.internals.configuration=Q,c.configure(Q,K.start,K.internals.query),window[e]=K;class J{constructor(){this.emissions={}}add(t,e){if("function"!=typeof e)throw new Error("closure must be a function");this.emissions[t]||(this.emissions[t]=[]),this.emissions[t].push(e)}remove(t,e){if(this.emissions[t])if(e){const i=this.emissions[t].indexOf(e);i>-1&&this.emissions[t].splice(i)}else delete this.emissions[t]}emit(t,e){if(!this.emissions[t])return[];const i=[];for(const r of this.emissions[t])r&&i.push(r(e));return i}dispose(){this.emissions=null}}class tt{constructor(t,e){this.id=t,this.minWidth=e}test(){return window.matchMedia(`(min-width: ${this.minWidth}em)`).matches}}const et={XS:new tt("xs",0),SM:new tt("sm",36),MD:new tt("md",48),LG:new tt("lg",62),XL:new tt("xl",78)};class it{constructor(t=!0){this.jsAttribute=t,this._isRendering=!1,this._isResizing=!1,this._isScrollLocked=!1,this._isLoading=!1,this._isSwappingFont=!1,this._isEnabled=!0,this._isDisposed=!1,this._listeners={},this._handlingClick=this.handleClick.bind(this),this._hashes=[],this._hash="",this._keyListenerTypes=[],this._keys=[],this.handlingKey=this.handleKey.bind(this),this._emitter=new J,this._ascent=new J,this._descent=new J,this._registrations=[],this._nexts=[]}static get instanceClassName(){return"Instance"}_config(t,e){this.element=t,this.registration=e,this.node=t.node,this.id=t.node.id,this.jsAttribute&&this.setAttribute(e.attribute,!0),this.init()}init(){}get proxy(){const t=this;return W({render:()=>t.render(),resize:()=>t.resize()},{get node(){return this.node},get isEnabled(){return t.isEnabled},set isEnabled(e){t.isEnabled=e}})}log(...t){t.unshift(`${this.registration.instanceClassName} #${this.id} - `),o.log.apply(o,t)}debug(...t){t.unshift(`${this.registration.instanceClassName} #${this.id} - `),o.debug.apply(o,t)}info(...t){t.unshift(`${this.registration.instanceClassName} #${this.id} - `),o.info.apply(o,t)}warn(...t){t.unshift(`${this.registration.instanceClassName} #${this.id} - `),o.warn.apply(o,t)}error(...t){t.unshift(`${this.registration.instanceClassName} #${this.id} - `),o.error.apply(o,t)}register(e,i){const r=t.getModule("register").register(e,i,this);this._registrations.push(r)}getRegisteredInstances(t){for(const e of this._registrations)if(e.hasInstanceClassName(t))return e.instances.collection;return[]}dispatch(t,e,i,r){const s=new CustomEvent(t,{detail:e,bubble:!0===i,cancelable:!0===r});this.node.dispatchEvent(s)}listen(t,e,i){this._listeners[t]||(this._listeners[t]=[]);const r=this._listeners[t],s=new st(this.node,t,e,i);r.push(s),s.listen()}unlisten(t,e,i){if(!t){for(const t in this._listeners)this.unlisten(t);return}const r=this._listeners[t];if(!r)return;if(!e)return void r.forEach((e=>this.unlisten(t,e.closure)));const s=r.filter((t=>t.closure===e&&t.matchOptions(i)));s.forEach((t=>t.unlisten())),this._listeners[t]=r.filter((t=>-1===s.indexOf(t)))}listenClick(t){this.listen("click",this._handlingClick,t)}unlistenClick(t){this.unlisten("click",this._handlingClick,t)}handleClick(t){}set hash(e){t.getModule("hash").hash=e}get hash(){return t.getModule("hash").hash}listenHash(e,i){if(!this._hashes)return;0===this._hashes.length&&t.add("hash",this);const r=new nt(e,i);this._hashes=this._hashes.filter((t=>t.hash!==e)),this._hashes.push(r)}unlistenHash(e){this._hashes&&(this._hashes=this._hashes.filter((t=>t.hash!==e)),0===this._hashes.length&&t.remove("hash",this))}handleHash(t,e){if(this._hashes)for(const i of this._hashes)i.handle(t,e)}listenKey(t,e,i=!1,r=!1,s="down"){-1===this._keyListenerTypes.indexOf(s)&&(this.listen(`key${s}`,this.handlingKey),this._keyListenerTypes.push(s)),this._keys.push(new rt(s,t,e,i,r))}unlistenKey(t,e){this._keys=this._keys.filter((i=>i.code!==t||i.closure!==e)),this._keyListenerTypes.forEach((t=>{this._keys.some((e=>e.type===t))||this.unlisten(`key${t}`,this.handlingKey)}))}handleKey(t){for(const e of this._keys)e.handle(t)}get isEnabled(){return this._isEnabled}set isEnabled(t){this._isEnabled=t}get isRendering(){return this._isRendering}set isRendering(e){this._isRendering!==e&&(e?t.add("render",this):t.remove("render",this),this._isRendering=e)}render(){}request(e){this._nexts.push(e),t.getModule("render").request(this)}next(){const t=this._nexts.slice();this._nexts.length=0;for(const e of t)e&&e()}get isResizing(){return this._isResizing}set isResizing(e){this._isResizing!==e&&(e?(t.add("resize",this),this.resize()):t.remove("resize",this),this._isResizing=e)}resize(){}isBreakpoint(t){return 1==("string"==typeof t)?et[t.toUpperCase()].test():t.test()}get isScrollLocked(){return this._isScrollLocked}set isScrollLocked(e){this._isScrollLocked!==e&&(e?t.add("lock",this):t.remove("lock",this),this._isScrollLocked=e)}get isLoading(){return this._isLoading}set isLoading(e){this._isLoading!==e&&(e?t.add("load",this):t.remove("load",this),this._isLoading=e)}load(){}get isSwappingFont(){return this._isSwappingFont}set isSwappingFont(e){this._isSwappingFont!==e&&(e?t.add("font-swap",this):t.remove("font-swap",this),this._isSwappingFont=e)}swapFont(){}get isMouseMoving(){return this._isMouseMoving}set isMouseMoving(e){this._isMouseMoving!==e&&(e?t.add("mouse-move",this):t.remove("mouse-move",this),this._isMouseMoving=e)}mouseMove(t){}examine(t){this.node.matches(this.registration.selector)?this.mutate(t):this._dispose()}mutate(t){}retrieveNodeId(t,e){if(t.id)return t.id;const i=q(`${this.id}-${e}`);return this.warn(`add id '${i}' to ${e}`),t.setAttribute("id",i),i}get isDisposed(){return this._isDisposed}_dispose(){this.debug(`dispose instance of ${this.registration.instanceClassName} on element [${this.element.id}]`),this.removeAttribute(this.registration.attribute),this.unlisten(),t.remove("hash",this),this._hashes=null,this._keys=null,this.isRendering=!1,this.isResizing=!1,this._nexts=null,t.getModule("render").nexts.remove(this),this.isScrollLocked=!1,this.isLoading=!1,this.isSwappingFont=!1,this.isMouseMoving=!1,this._emitter.dispose(),this._emitter=null,this._ascent.dispose(),this._ascent=null,this._descent.dispose(),this._descent=null,this.element.remove(this);for(const e of this._registrations)t.remove("register",e);this._registrations=null,this.registration.remove(this),this._isDisposed=!0,this.dispose()}dispose(){}emit(t,e){return this.element.emit(t,e)}addEmission(t,e){this._emitter.add(t,e)}removeEmission(t,e){this._emitter.remove(t,e)}ascend(t,e){return this.element.ascend(t,e)}addAscent(t,e){this._ascent.add(t,e)}removeAscent(t,e){this._ascent.remove(t,e)}descend(t,e){return this.element.descend(t,e)}addDescent(t,e){this._descent.add(t,e)}removeDescent(t,e){this._descent.remove(t,e)}get style(){return this.node.style}addClass(t){N(this.node,t)}removeClass(t){B(this.node,t)}hasClass(t){return F(this.node,t)}get classNames(){return O(this.node)}remove(){this.node.parentNode.removeChild(this.node)}setAttribute(t,e){this.node.setAttribute(t,e)}getAttribute(t){return this.node.getAttribute(t)}hasAttribute(t){return this.node.hasAttribute(t)}removeAttribute(t){this.node.removeAttribute(t)}setProperty(t,e){this.node.style.setProperty(t,e)}removeProperty(t){this.node.style.removeProperty(t)}focus(){this.node.focus()}blur(){this.node.blur()}focusClosest(){const t=this._focusClosest(this.node.parentNode);t&&t.focus()}_focusClosest(t){if(!t)return null;const e=[...U(t)];if(e.length<=1)return this._focusClosest(t.parentNode);{const t=e.indexOf(this.node);return e[t+(twindow.innerHeight&&i.move(e.bottom-window.innerHeight+50)}matches(t){return this.node.matches(t)}querySelector(t){return this.node.querySelector(t)}querySelectorAll(t){return p(this.node,t)}queryParentSelector(t){return f(this.node,t)}getRect(){const t=this.node.getBoundingClientRect();return t.center=t.left+.5*t.width,t.middle=t.top+.5*t.height,t}get isLegacy(){return t.isLegacy}}class rt{constructor(t,e,i,r,s){this.type=t,this.eventType=`key${t}`,this.keyCode=e,this.closure=i,this.preventDefault=!0===r,this.stopPropagation=!0===s}handle(t){t.type===this.eventType&&t.keyCode===this.keyCode.value&&(this.closure(t),this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation())}}class st{constructor(t,e,i,r){this._node=t,this._type=e,this._closure=i,this._options=r}get closure(){return this._closure}listen(){this._node.addEventListener(this._type,this._closure,this._options)}matchOptions(t=null){switch(!0){case null===t:case"boolean"==typeof this._options&&"boolean"==typeof t&&this._options===t:return!0;case Object.keys(this._options).length!==Object.keys(t).length:return!1;case Object.keys(t).every((e=>this._options[e]===t[e])):return!0}return!1}unlisten(){this._node.removeEventListener(this._type,this._closure,this._options)}}class nt{constructor(t,e){this.hash=t,this.add=e}handle(t,e){this.hash===t&&this.add(e)}}const ot={DISCLOSE:d.event("disclose"),CONCEAL:d.event("conceal")},at={RESET:d.emission("disclosure","reset"),ADDED:d.emission("disclosure","added"),RETRIEVE:d.emission("disclosure","retrieve"),REMOVED:d.emission("disclosure","removed"),GROUP:d.emission("disclosure","group"),UNGROUP:d.emission("disclosure","ungroup"),SPOTLIGHT:d.emission("disclosure","spotlight")};class lt extends it{constructor(t,e,i,r){super(),this.type=t,this._selector=e,this.DisclosureButtonInstanceClass=i,this.disclosuresGroupInstanceClassName=r,this.modifier=this._selector+"--"+this.type.id,this._isPristine=!0,this._isRetrievingPrimaries=!1,this._hasRetrieved=!1,this._primaryButtons=[]}static get instanceClassName(){return"Disclosure"}init(){this.addDescent(at.RESET,this.reset.bind(this)),this.addDescent(at.GROUP,this.update.bind(this)),this.addDescent(at.UNGROUP,this.update.bind(this)),this.addAscent(at.SPOTLIGHT,this.disclose.bind(this)),this.register(`[aria-controls="${this.id}"]`,this.DisclosureButtonInstanceClass),this.ascend(at.ADDED),this.listenHash(this.id,this._spotlight.bind(this)),this.update()}get isEnabled(){return super.isEnabled}set isEnabled(t){this.isEnabled!==t&&(super.isEnabled=t,t?this.ascend(at.ADDED):this.ascend(at.REMOVED))}get isPristine(){return this._isPristine}get proxy(){const t=this,e=Object.assign(super.proxy,{disclose:t.disclose.bind(t),focus:t.focus.bind(t)});return this.type.canConceal&&(e.conceal=t.conceal.bind(t)),W(e,{get buttons(){return t.buttons.map((t=>t.proxy))},get group(){const e=t.group;return e?e.proxy:null},get isDisclosed(){return t.isDisclosed}})}get buttons(){return this.getRegisteredInstances(this.DisclosureButtonInstanceClass.instanceClassName)}update(){this.getGroup(),this.retrievePrimaries()}getGroup(){if(!this.disclosuresGroupInstanceClassName)return void(this._group=null);const t=this.element.getAscendantInstance(this.disclosuresGroupInstanceClassName,this.constructor.instanceClassName);t&&t.validate(this)?this._group=t:this._group=null}get group(){return this._group}disclose(t){return!(!0===this.isDisclosed||!this.isEnabled||(this._isPristine=!1,this.isDisclosed=!0,!t&&this.group&&(this.group.current=this),0))}conceal(t,e=!0){return!(!1===this.isDisclosed||!this.type.canConceal&&this.group&&this.group.current===this||(this.isDisclosed=!1,!t&&this.group&&this.group.current===this&&(this.group.current=null),e||this.focus(),this._isPristine||this.descend(at.RESET),0))}get isDisclosed(){return this._isDisclosed}set isDisclosed(t){if(this._isDisclosed!==t&&(this.isEnabled||!0!==t)){this.dispatch(t?ot.DISCLOSE:ot.CONCEAL,this.type),this._isDisclosed=t,t?this.addClass(this.modifier):this.removeClass(this.modifier);for(let e=0;et.isInitiallyDisclosed))}hasRetrieved(){return this._hasRetrieved}reset(){}toggle(t){if(this.type.canConceal)switch(!0){case!t:case this.isDisclosed:this.conceal(!1,!1);break;default:this.disclose()}else this.disclose()}get buttonHasFocus(){return this.buttons.some((t=>t.hasFocus))}get hasFocus(){return!!super.hasFocus||!!this.buttonHasFocus||this.querySelectorAll(":focus").length>0}focus(){this._primaryButtons.length>0&&this._primaryButtons[0].focus()}get primaryButtons(){return this._primaryButtons}retrievePrimaries(){this._isRetrievingPrimaries||(this._isRetrievingPrimaries=!0,this.request(this._retrievePrimaries.bind(this)))}_retrievePrimaries(){if(this._isRetrievingPrimaries=!1,this._primaryButtons=this._electPrimaries(this.buttons),!this._hasRetrieved&&0!==this._primaryButtons.length)if(this.retrieved(),this._hasRetrieved=!0,this.applyAbility(!0),this.group)this.group.retrieve();else if(this._isPristine&&this.isEnabled&&!this.group)switch(!0){case this.hash===this.id:this._spotlight();break;case this.isInitiallyDisclosed:this.disclose()}}retrieved(){}_spotlight(){this.disclose(),this.request((()=>{this.ascend(at.SPOTLIGHT)}))}_electPrimaries(t){return t.filter((t=>t.canDisclose&&!this.node.contains(t.node)))}applyAbility(t=!1){const e=!this._primaryButtons.every((t=>t.isDisabled));this.isEnabled!==e&&(this.isEnabled=e,t||(!this.isEnabled&&this.isDisclosed&&(this.group?this.ascend(at.REMOVED):this.type.canConceal&&this.conceal()),this.isEnabled&&(this.group&&this.ascend(at.ADDED),this.hash===this.id&&this._spotlight())))}dispose(){this._group=null,this._primaryButtons=null,super.dispose(),this.ascend(at.REMOVED)}}class ct extends it{constructor(t){super(),this.type=t,this.attributeName=t.ariaState?"aria-"+t.id:d.attr(t.id),this._canDisclose=!1}static get instanceClassName(){return"DisclosureButton"}get isPrimary(){return this.registration.creator.primaryButtons.includes(this)}get canDisclose(){return this._canDisclose}get isDisabled(){return this.type.canDisable&&this.hasAttribute("disabled")}init(){this._canDisclose=this.hasAttribute(this.attributeName),this._isInitiallyDisclosed=this.isDisclosed,this._isContained=this.registration.creator.node.contains(this.node),this.controlsId=this.getAttribute("aria-controls"),this.registration.creator.retrievePrimaries(),this.listenClick()}get proxy(){return Object.assign(super.proxy,{focus:this.focus.bind(this)})}handleClick(t){this.registration.creator&&this.registration.creator.toggle(this.canDisclose)}mutate(t){this._canDisclose=this.hasAttribute(this.attributeName),this.registration.creator.applyAbility(),!this._isApplying&&this.isPrimary&&t.indexOf(this.attributeName)>-1&&this.registration.creator&&(this.isDisclosed?this.registration.creator.disclose():this.type.canConceal&&this.registration.creator.conceal())}apply(t){this.canDisclose&&(this._isApplying=!0,this.setAttribute(this.attributeName,t),this.request((()=>{this._isApplying=!1})))}get isDisclosed(){return"true"===this.getAttribute(this.attributeName)}get isInitiallyDisclosed(){return this._isInitiallyDisclosed}focus(){super.focus(),this.scrollIntoView()}measure(t){const e=this.rect;this._dx=t.x-e.x,this._dy=t.y-e.y}get dx(){return this._dx}get dy(){return this._dy}}const ht={PREVENT_CONCEAL:d.attr.selector("prevent-conceal"),GROUP:d.attr("group")};class ut extends it{constructor(t,e){super(e),this.disclosureInstanceClassName=t,this._members=[],this._index=-1,this._isRetrieving=!1,this._hasRetrieved=!1,this._isGrouped=!0}static get instanceClassName(){return"DisclosuresGroup"}init(){this.addAscent(at.ADDED,this.update.bind(this)),this.addAscent(at.RETRIEVE,this.retrieve.bind(this)),this.addAscent(at.REMOVED,this.update.bind(this)),this.descend(at.GROUP),this._isGrouped="false"!==this.getAttribute(ht.GROUP),this.update()}get proxy(){const t=this,e={set index(e){t.index=e},get index(){return t.index},get length(){return t.length},get current(){const e=t.current;return e?e.proxy:null},get members(){return t.members.map((t=>t.proxy))},get hasFocus(){return t.hasFocus},set isGrouped(e){t.isGrouped=e},get isGrouped(){return t.isGrouped}};return W(super.proxy,e)}validate(t){return!0}getMembers(){const t=this.element.getDescendantInstances(this.disclosureInstanceClassName,this.constructor.instanceClassName,!0);this._members=t.filter(this.validate.bind(this)).filter((t=>t.isEnabled)),t.filter((t=>!this._members.includes(t))).forEach((t=>t.conceal()))}retrieve(t=!1){this._isRetrieving||this._hasRetrieved&&!t||(this._isRetrieving=!0,this.request(this._retrieve.bind(this)))}_retrieve(){if(this.getMembers(),this._isRetrieving=!1,this._hasRetrieved=!0,this.hash)for(let t=0;t{this.ascend(at.SPOTLIGHT)})),t}for(let t=0;t=this.length||t===this._index)){this._index=t;for(let e=0;ee.map((e=>d.selector(`${t}--${e}`))).join(","),St=`${d.selector("responsive-img")}, ${wt("responsive-img",bt)}, ${d.selector("responsive-vid")}, ${wt("responsive-vid",["16x9","4x3","1x1"])}`,Ct={RATIO:`${d.selector("ratio")}, ${wt("ratio",bt)}, ${St}`},Tt=window[e],kt={TOP:d.selector("placement--top"),RIGHT:d.selector("placement--right"),BOTTOM:d.selector("placement--bottom"),LEFT:d.selector("placement--left")},Et={START:d.selector("placement--start"),CENTER:d.selector("placement--center"),END:d.selector("placement--end")},At={TOP:"place_top",RIGHT:"place_right",BOTTOM:"place_bottom",LEFT:"place_left"},Mt={START:"align_start",CENTER:"align_center",END:"align_end"},Pt={AUTO:"placement_auto",MANUAL:"placement_manual"};K.core={Instance:it,Breakpoints:et,KeyCodes:x,Disclosure:lt,DisclosureButton:ct,DisclosuresGroup:ut,DisclosureType:dt,DisclosureEvent:ot,DisclosureSelector:ht,DisclosureEmission:at,Collapse:class extends lt{constructor(){super(dt.EXPAND,ft.COLLAPSE,pt,"CollapsesGroup")}static get instanceClassName(){return"Collapse"}init(){super.init(),this.listen("transitionend",this.endCollapsing.bind(this))}endCollapsing(t){this._isCollpasing&&(this._timeout&&clearTimeout(this._timeout),this._timeout=null,this._isCollpasing=!1,this.removeClass(ft.COLLAPSING),this.isDisclosed||this.isLegacy&&(this.style.maxHeight=""))}unbound(){this.isLegacy&&(this.style.maxHeight="none")}disclose(t){if(!0===this.isDisclosed||!this.isEnabled)return!1;this.unbound(),this.collapsing((()=>super.disclose(t)))}conceal(t,e){if(!1===this.isDisclosed)return!1;this.collapsing((()=>super.conceal(t,e)))}collapsing(t){this._isCollpasing=!0,this._timeout&&clearTimeout(this._timeout),this.addClass(ft.COLLAPSING),this.adjust(),this.request((()=>{t(),this._timeout=setTimeout(this.endCollapsing.bind(this),500)}))}adjust(){this.setProperty("--collapser","none");const t=this.node.offsetHeight;this.setProperty("--collapse",-t+"px"),this.setProperty("--collapser","")}reset(){this.isPristine||(this.isDisclosed=!1)}_electPrimaries(t){const e=this.element.parent.instances.map((t=>t.collapsePrimary)).filter((e=>void 0!==e&&t.indexOf(e)>-1));if(1===e.length)return e;if(1===(t=super._electPrimaries(t)).length)return t;const i=t.filter((t=>t.dy>=0));if(i.length>0&&(t=i),1===t.length)return t;const r=Math.min(...t.map((t=>t.dy))),s=t.filter((t=>t.dy===r));return s.length>0&&(t=s),1===t.length||t.sort(((t,e)=>Math.abs(e.dx)-Math.abs(t.dx))),t}},CollapseButton:pt,CollapsesGroup:class extends ut{constructor(){super("Collapse")}static get instanceClassName(){return"CollapsesGroup"}get canUngroup(){return!0}},CollapseSelector:ft,RootSelector:{ROOT:":root"},RootEmission:v,Equisized:class extends it{static get instanceClassName(){return"Equisized"}init(){this.ascend(mt.CHANGE)}measure(){return this.isLegacy&&(this.style.width="auto"),this.getRect().width}adjust(t){this.isLegacy&&(this.style.width=`${t}px`)}dispose(){this.ascend(mt.CHANGE)}},EquisizedEmission:mt,Toggle:class extends it{static get instanceClassName(){return"Toggle"}init(){this.pressed="true"===this.pressed,this.listenClick()}handleClick(){this.toggle()}toggle(){this.pressed="true"!==this.pressed}get pressed(){return this.getAttribute("aria-pressed")}set pressed(t){this.setAttribute("aria-pressed",t?"true":"false"),this.dispatch(gt.TOGGLE,t)}get proxy(){const t=this,e=Object.assign(super.proxy,{toggle:t.toggle.bind(t)});return W(e,{get pressed(){return t.pressed},set pressed(e){t.pressed=e}})}},EquisizedsGroup:class extends it{static get instanceClassName(){return"EquisizedsGroup"}init(){this.isResizing=!0,this.isLoading=!0,this.addAscent(mt.CHANGE,this.resize.bind(this))}load(){this.resize()}resize(){const t=this.element.getDescendantInstances("Equisized");this.isLegacy||this.style.setProperty("--equisized-width","auto");const e=Math.max(...t.map((t=>t.measure())));this.isLegacy?t.forEach((t=>t.adjust(e))):this.style.setProperty("--equisized-width",`${e}px`)}},InjectSvg:class extends it{static get instanceClassName(){return"InjectSvg"}init(){this.node&&(this.img=this.node.querySelector("img")),this.isLegacy||this.replace()}get proxy(){const t=this;return Object.assign(super.proxy,{replace:t.replace.bind(t),restore:t.restore.bind(t)})}fetch(){this.img&&(this.imgID=this.img.getAttribute("id"),this.imgClass=this.img.getAttribute("class"),this.imgURL=this.img.getAttribute("src"),fetch(this.imgURL).then((t=>t.text())).then((t=>{const e=(new DOMParser).parseFromString(t,"text/html");this.svg=e.querySelector("svg"),this.svg&&this.replace()})))}replace(){if(!this.svg)return void this.fetch();this.imgID&&void 0!==this.imgID&&this.svg.setAttribute("id",this.imgID);let t=this.imgURL.match(/[ \w-]+\./)[0];var e,i;t&&(t=t.slice(0,-1),["dark","light","system"].includes(t)&&(this.svg.innerHTML=this.svg.innerHTML.replaceAll('id="artwork-',`id="${t}-artwork-`),this.svg.innerHTML=this.svg.innerHTML.replaceAll('"#artwork-',`"#${t}-artwork-`))),this.imgClass&&void 0!==this.imgClass&&this.svg.setAttribute("class",this.imgClass),this.svg.hasAttribute("xmlns:a")&&this.svg.removeAttribute("xmlns:a"),this.node.setAttribute("data-fr-inject-svg",!0),e=this.svg,i={"aria-hidden":!0,focusable:!1},Object.keys(i).forEach((t=>e.setAttribute(t,i[t]))),this.node.replaceChild(this.svg,this.img)}restore(){this.img&&this.svg&&(this.node.setAttribute("data-fr-inject-svg",!1),this.node.replaceChild(this.img,this.svg))}},InjectSvgSelector:yt,Artwork:class extends it{static get instanceClassName(){return"Artwork"}init(){this.isLegacy&&this.replace()}get proxy(){return Object.assign(super.proxy,{replace:this.replace.bind(this)})}fetch(){this.xlink=this.node.getAttribute("href");const t=this.xlink.split("#");this.svgUrl=t[0],this.svgName=t[1];const e=new XMLHttpRequest;e.onload=()=>{const t=(new DOMParser).parseFromString(e.responseText,"text/html");this.realSvgContent=t.getElementById(this.svgName),this.realSvgContent&&("symbol"===this.realSvgContent.tagName?(this.use=t.querySelector('use[href="#'+this.svgName+'"]'),this.use&&this.node.parentNode.insertBefore(this.use,this.node)):this.realSvgContent.classList.add(this.node.classList),this.replace())},e.open("GET",this.svgUrl),e.send()}replace(){this.realSvgContent?this.node.parentNode.replaceChild(this.realSvgContent,this.node):this.fetch()}},ArtworkSelector:_t,AssessFile:class extends it{static get instanceClassName(){return"AssessFile"}init(){this.lang=this.getLang(this.node),this.href=this.getAttribute("href"),this.hreflang=this.getAttribute("hreflang"),this.file={},this.gather(),this.addAscent(xt.ADDED,this.update.bind(this)),this.addDescent(xt.ADDED,this.update.bind(this))}getFileLength(){void 0!==this.href?fetch(this.href,{method:"HEAD",mode:"cors"}).then((t=>{this.length=t.headers.get("content-length")||-1,-1===this.length&&o.warn("File size unknown: "+this.href+'\nUnable to get HTTP header: "content-length"'),this.gather()})):this.length=-1}mutate(t){-1!==t.indexOf("href")&&(this.href=this.getAttribute("href"),this.getFileLength()),-1!==t.indexOf("hreflang")&&(this.hreflang=this.getAttribute("hreflang"),this.gather())}gather(){if(this.isLegacy&&(this.length=-1),this.length){if(this.details=[],this.href){const t=this.parseExtension(this.href);t&&this.details.push(t.toUpperCase())}-1!==this.length&&this.details.push(this.bytesToSize(this.length)),this.hreflang&&this.details.push(this.getLangDisplayName(this.hreflang)),this.update()}else this.getFileLength()}update(){this.details&&(this.descend(xt.UPDATE,this.details),this.ascend(xt.UPDATE,this.details))}getLang(t){return t.lang?t.lang:document.documentElement===t?window.navigator.language:this.getLang(t.parentElement)}parseExtension(t){return t.match(/\.(\w{1,9})(?:$|[?#])/)[0].replace(".","")}getLangDisplayName(t){if(this.isLegacy)return t;const e=new Intl.DisplayNames([this.lang],{type:"language"}).of(t);return e.charAt(0).toUpperCase()+e.slice(1)}bytesToSize(t){if(-1===t)return null;let e=["octets","ko","Mo","Go","To"];"bytes"===this.getAttribute(d.attr("assess-file"))&&(e=["bytes","KB","MB","GB","TB"]);const i=parseInt(Math.floor(Math.log(t)/Math.log(1e3)),10);if(0===i)return`${t} ${e[i]}`;const r=t/1e3**i,s=Math.round(100*(r+Number.EPSILON))/100;return`${String(s).replace(".",",")} ${e[i]}`}},AssessDetail:class extends it{static get instanceClassName(){return"AssessDetail"}init(){this.addDescent(xt.UPDATE,this.update.bind(this)),this.ascend(xt.ADDED)}update(t){this.node.innerHTML=t.join(" - ")}},AssessEmission:xt,AssessSelector:vt,Ratio:class extends it{static get instanceClassName(){return"Ratio"}init(){if(!Tt.internals.support.supportAspectRatio()){this.ratio=16/9;for(const t in this.classNames)if(this.registration.selector.indexOf(this.classNames[t])>0){const e=this.classNames[t].split("ratio-");e[1]&&(this.ratio=e[1].split("x")[0]/e[1].split("x")[1])}this.isRendering=!0,this.update()}}render(){this.getRect().width!==this.currentWidth&&this.update()}update(){this.currentWidth=this.getRect().width,this.style.height=this.currentWidth/this.ratio+"px"}},RatioSelector:Ct,Placement:class extends it{constructor(t=Pt.AUTO,e=[At.BOTTOM,At.TOP,At.LEFT,At.RIGHT],i=[Mt.CENTER,Mt.START,Mt.END],r=16){super(),this._mode=t,this._places=e,this._aligns=i,this._safeAreaMargin=r,this._isShown=!1}static get instanceClassName(){return"Placement"}init(){this.isResizing=!0}get proxy(){const t=this,e=Object.assign(super.proxy,{show:t.show.bind(t),hide:t.hide.bind(t)});return W(e,{get mode(){return t.mode},set mode(e){t.mode=e},get place(){return t.place},set place(e){t.place=e},get align(){return t.align},set align(e){t.align=e},get isShown(){return t.isShown},set isShown(e){t.isShown=e}})}get mode(){return this._mode}set mode(t){this._mode=t}get place(){return this._place}set place(t){if(this._place!==t){switch(this._place){case At.TOP:this.removeClass(kt.TOP);break;case At.RIGHT:this.removeClass(kt.RIGHT);break;case At.BOTTOM:this.removeClass(kt.BOTTOM);break;case At.LEFT:this.removeClass(kt.LEFT)}switch(this._place=t,this._place){case At.TOP:this.addClass(kt.TOP);break;case At.RIGHT:this.addClass(kt.RIGHT);break;case At.BOTTOM:this.addClass(kt.BOTTOM);break;case At.LEFT:this.addClass(kt.LEFT)}}}get align(){return this._align}set align(t){if(this._align!==t){switch(this._align){case Mt.START:this.removeClass(Et.START);break;case Mt.CENTER:this.removeClass(Et.CENTER);break;case Mt.END:this.removeClass(Et.END)}switch(this._align=t,this._align){case Mt.START:this.addClass(Et.START);break;case Mt.CENTER:this.addClass(Et.CENTER);break;case Mt.END:this.addClass(Et.END)}}}show(){this.isShown=!0}hide(){this.isShown=!1}get isShown(){return this._isShown}set isShown(t){this._isShown!==t&&this.isEnabled&&(this.isRendering=t,this._isShown=t)}setReferent(t){this._referent=t}resize(){this.safeArea={top:this._safeAreaMargin,right:window.innerWidth-this._safeAreaMargin,bottom:window.innerHeight-this._safeAreaMargin,left:this._safeAreaMargin,center:.5*window.innerWidth,middle:.5*window.innerHeight}}render(){if(!this._referent)return;if(this.rect=this.getRect(),this.referentRect=this._referent.getRect(),this.mode===Pt.AUTO)switch(this.place=this.getPlace(),this.place){case At.TOP:case At.BOTTOM:this.align=this.getHorizontalAlign();break;case At.LEFT:case At.RIGHT:this.align=this.getVerticalAlign()}let t,e;switch(this.place){case At.TOP:e=this.referentRect.top-this.rect.height;break;case At.RIGHT:t=this.referentRect.right;break;case At.BOTTOM:e=this.referentRect.bottom;break;case At.LEFT:t=this.referentRect.left-this.rect.width}switch(this.place){case At.TOP:case At.BOTTOM:switch(this.align){case Mt.CENTER:t=this.referentRect.center-.5*this.rect.width;break;case Mt.START:t=this.referentRect.left;break;case Mt.END:t=this.referentRect.right-this.rect.width}break;case At.RIGHT:case At.LEFT:switch(this.align){case Mt.CENTER:e=this.referentRect.middle-.5*this.rect.height;break;case Mt.START:e=this.referentRect.top;break;case Mt.END:e=this.referentRect.bottom-this.rect.height}}this._x===t&&this._y===e||(this._x=t+.5|0,this._y=e+.5|0,this.node.style.transform=`translate(${this._x}px,${this._y}px)`)}getPlace(){for(const t of this._places)switch(t){case At.TOP:if(this.referentRect.top-this.rect.height>this.safeArea.top)return At.TOP;break;case At.RIGHT:if(this.referentRect.right+this.rect.widththis.safeArea.left)return At.LEFT}return this._places[0]}getHorizontalAlign(){for(const t of this._aligns)switch(t){case Mt.CENTER:if(this.referentRect.center-.5*this.rect.width>this.safeArea.left&&this.referentRect.center+.5*this.rect.widththis.safeArea.left)return Mt.END}return this._aligns[0]}getVerticalAlign(){for(const t of this._aligns)switch(t){case Mt.CENTER:if(this.referentRect.middle-.5*this.rect.height>this.safeArea.top&&this.referentRect.middle+.5*this.rect.heightthis.safeArea.top)return Mt.END}return this._aligns[0]}dispose(){this._referent=null,super.dispose()}},PlacementReferent:class extends it{constructor(){super(),this._isShown=!1}static get instanceClassName(){return"PlacementReferent"}init(){this.registration.creator.setReferent(this),this._placement=this.registration.creator}get placement(){return this._placement}get isShown(){return this._isShown}set isShown(t){this._isShown!==t&&this.isEnabled&&(this._isShown=t,t?this.registration.creator.show():this.registration.creator.hide())}show(){this.isShown=!0}hide(){this.isShown=!1}},PlacementAlign:Mt,PlacementPosition:At,PlacementMode:Pt},K.internals.register(K.core.CollapseSelector.COLLAPSE,K.core.Collapse),K.internals.register(K.core.InjectSvgSelector.INJECT_SVG,K.core.InjectSvg),K.internals.register(K.core.RatioSelector.RATIO,K.core.Ratio),K.internals.register(K.core.AssessSelector.ASSESS_FILE,K.core.AssessFile),K.internals.register(K.core.AssessSelector.DETAIL,K.core.AssessDetail);const It={SYSTEM:"system",LIGHT:"light",DARK:"dark"},Lt={THEME:Tt.internals.ns.attr("theme"),SCHEME:Tt.internals.ns.attr("scheme"),TRANSITION:Tt.internals.ns.attr("transition")},Dt={LIGHT:"light",DARK:"dark"},zt={SCHEME:Tt.internals.ns.emission("scheme","scheme"),THEME:Tt.internals.ns.emission("scheme","theme"),ASK:Tt.internals.ns.emission("scheme","ask")},Ot={SCHEME:Tt.internals.ns.event("scheme"),THEME:Tt.internals.ns.event("theme")};class Rt extends Tt.core.Instance{constructor(){super(!1)}static get instanceClassName(){return"Scheme"}init(){this.changing=this.change.bind(this),this.hasAttribute(Lt.TRANSITION)&&(this.removeAttribute(Lt.TRANSITION),this.request(this.restoreTransition.bind(this)));const t=Tt.internals.support.supportLocalStorage()?localStorage.getItem("scheme"):"",e=this.getAttribute(Lt.SCHEME);switch(t){case It.DARK:case It.LIGHT:case It.SYSTEM:this.scheme=t;break;default:switch(e){case It.DARK:this.scheme=It.DARK;break;case It.LIGHT:this.scheme=It.LIGHT;break;default:this.scheme=It.SYSTEM}}this.addAscent(zt.ASK,this.ask.bind(this)),this.addAscent(zt.SCHEME,this.apply.bind(this))}get proxy(){const t=this,e={get scheme(){return t.scheme},set scheme(e){t.scheme=e}};return Tt.internals.property.completeAssign(super.proxy,e)}restoreTransition(){this.setAttribute(Lt.TRANSITION,"")}ask(){this.descend(zt.SCHEME,this.scheme)}apply(t){this.scheme=t}get scheme(){return this._scheme}set scheme(t){if(this._scheme!==t){switch(this._scheme=t,t){case It.SYSTEM:this.listenPreferences();break;case It.DARK:this.unlistenPreferences(),this.theme=Dt.DARK;break;case It.LIGHT:this.unlistenPreferences(),this.theme=Dt.LIGHT;break;default:return void(this.scheme=It.SYSTEM)}this.descend(zt.SCHEME,t),Tt.internals.support.supportLocalStorage()&&localStorage.setItem("scheme",t),this.setAttribute(Lt.SCHEME,t),this.dispatch(Ot.SCHEME,{scheme:this._scheme})}}get theme(){return this._theme}set theme(t){if(this._theme!==t)switch(t){case Dt.LIGHT:case Dt.DARK:this._theme=t,this.setAttribute(Lt.THEME,t),this.descend(zt.THEME,t),this.dispatch(Ot.THEME,{theme:this._theme}),document.documentElement.style.colorScheme=t===Dt.DARK?"dark":""}}listenPreferences(){this.isListening||(this.isListening=!0,this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener&&this.mediaQuery.addEventListener("change",this.changing),this.change())}unlistenPreferences(){this.isListening&&(this.isListening=!1,this.mediaQuery.removeEventListener("change",this.changing),this.mediaQuery=null)}change(){this.isListening&&(this.theme=this.mediaQuery.matches?Dt.DARK:Dt.LIGHT)}mutate(t){t.indexOf(Lt.SCHEME)>-1&&(this.scheme=this.getAttribute(Lt.SCHEME)),t.indexOf(Lt.THEME)>-1&&(this.theme=this.getAttribute(Lt.THEME))}dispose(){this.unlistenPreferences()}}const Nt={SCHEME:`:root${Tt.internals.ns.attr.selector("theme")}, :root${Tt.internals.ns.attr.selector("scheme")}`,SWITCH_THEME:Tt.internals.ns.selector("switch-theme"),RADIO_BUTTONS:`input[name="${Tt.internals.ns("radios-theme")}"]`};Tt.scheme={Scheme:Rt,SchemeValue:It,SchemeSelector:Nt,SchemeEmission:zt,SchemeTheme:Dt,SchemeEvent:Ot},Tt.internals.register(Tt.scheme.SchemeSelector.SCHEME,Tt.scheme.Scheme);const Bt=Tt.internals.ns.selector("accordion"),Ft=Tt.internals.ns.selector("collapse"),jt={GROUP:Tt.internals.ns.selector("accordions-group"),ACCORDION:Bt,COLLAPSE:`${Bt} > ${Ft}, ${Bt} > *:not(${Bt}):not(${Ft}) > ${Ft}, ${Bt} > *:not(${Bt}):not(${Ft}) > *:not(${Bt}):not(${Ft}) > ${Ft}`,COLLAPSE_LEGACY:`${Bt} ${Ft}`,BUTTON:`${Bt}__btn`};class Ut extends Tt.core.Instance{static get instanceClassName(){return"Accordion"}get collapsePrimary(){return this.element.children.map((t=>t.getInstance("CollapseButton"))).filter((t=>null!==t&&t.hasClass(jt.BUTTON)))[0]}}class Vt extends Tt.core.CollapsesGroup{static get instanceClassName(){return"AccordionsGroup"}validate(t){const e=t.node.matches(Tt.internals.legacy.isLegacy?jt.COLLAPSE_LEGACY:jt.COLLAPSE);return super.validate(t)&&e}}Tt.accordion={Accordion:Ut,AccordionSelector:jt,AccordionsGroup:Vt},Tt.internals.register(Tt.accordion.AccordionSelector.GROUP,Tt.accordion.AccordionsGroup),Tt.internals.register(Tt.accordion.AccordionSelector.ACCORDION,Tt.accordion.Accordion);const qt={EQUISIZED_BUTTON:`${Tt.internals.ns.selector("btns-group--equisized")} ${Tt.internals.ns.selector("btn")}`,EQUISIZED_GROUP:Tt.internals.ns.selector("btns-group--equisized")};Tt.button={ButtonSelector:qt},Tt.internals.register(Tt.button.ButtonSelector.EQUISIZED_BUTTON,Tt.core.Equisized),Tt.internals.register(Tt.button.ButtonSelector.EQUISIZED_GROUP,Tt.core.EquisizedsGroup);class Gt extends Tt.core.Instance{static get instanceClassName(){return"CardDownload"}init(){this.addAscent(Tt.core.AssessEmission.UPDATE,(t=>{this.descend(Tt.core.AssessEmission.UPDATE,t)})),this.addAscent(Tt.core.AssessEmission.ADDED,(()=>{this.descend(Tt.core.AssessEmission.ADDED)}))}}const $t={DOWNLOAD:Tt.internals.ns.selector("card--download"),DOWNLOAD_DETAIL:`${Tt.internals.ns.selector("card--download")} ${Tt.internals.ns.selector("card__end")} ${Tt.internals.ns.selector("card__detail")}`};Tt.card={CardSelector:$t,CardDownload:Gt},Tt.internals.register(Tt.card.CardSelector.DOWNLOAD,Tt.card.CardDownload),Tt.internals.register(Tt.card.CardSelector.DOWNLOAD_DETAIL,Tt.core.AssessDetail);const Ht={INPUT:`${Tt.internals.ns.selector("checkbox-group")} input[type="checkbox"]`},Wt={CHANGE:Tt.internals.ns.emission("checkbox","change"),RETRIEVE:Tt.internals.ns.emission("checkbox","retrieve")};class Xt extends Tt.core.Instance{static get instanceClassName(){return"CheckboxInput"}constructor(){super(),this._handlingChange=this.handleChange.bind(this)}init(){this.node.addEventListener("change",this._handlingChange),this.addDescent(Wt.RETRIEVE,this._handlingChange),this.handleChange()}get isChecked(){return this.node.checked}handleChange(){this.ascend(Wt.CHANGE,this.node)}}Tt.checkbox={CheckboxSelector:Ht,CheckboxEmission:Wt,CheckboxInput:Xt},Tt.internals.register(Tt.checkbox.CheckboxSelector.INPUT,Tt.checkbox.CheckboxInput);const Zt={SEGMENTED:Tt.internals.ns.selector("segmented"),SEGMENTED_ELEMENTS:Tt.internals.ns.selector("segmented__elements"),SEGMENTED_ELEMENT:Tt.internals.ns.selector("segmented__element input"),SEGMENTED_LEGEND:Tt.internals.ns.selector("segmented__legend")},Yt={ADDED:Tt.internals.ns.emission("segmented","added"),REMOVED:Tt.internals.ns.emission("segmented","removed")};class Kt extends Tt.core.Instance{static get instanceClassName(){return"Segmented"}init(){this.elements=this.node.querySelector(Zt.SEGMENTED_ELEMENTS),this.legend=this.node.querySelector(Zt.SEGMENTED_LEGEND),this.addAscent(Yt.ADDED,this.resize.bind(this)),this.addAscent(Yt.REMOVED,this.resize.bind(this)),this._isLegendInline=this.legend&&this.legend.classList.contains(`${Tt.prefix}-segmented__legend--inline`),this.isResizing=!0}resize(){const t=`${Tt.prefix}-segmented--vertical`,e=`${Tt.prefix}-segmented__legend--inline`;this.removeClass(t),this._isLegendInline&&(this.legend.classList.add(e),(this.node.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth+this.legend.offsetWidth+16>this.node.parentNode.offsetWidth)&&this.legend.classList.remove(e)),this.elements.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth>this.node.parentNode.offsetWidth?this.addClass(t):this.removeClass(t)}}class Qt extends Tt.core.Instance{static get instanceClassName(){return"SegmentedElement"}init(){this.ascend(Yt.ADDED)}dispose(){this.ascend(Yt.REMOVED)}}Tt.segmented={SegmentedSelector:Zt,SegmentedEmission:Yt,SegmentedElement:Qt,Segmented:Kt},Tt.internals.register(Tt.segmented.SegmentedSelector.SEGMENTED,Tt.segmented.Segmented),Tt.internals.register(Tt.segmented.SegmentedSelector.SEGMENTED_ELEMENT,Tt.segmented.SegmentedElement);const Jt={BREADCRUMB:Tt.internals.ns.selector("breadcrumb"),BUTTON:Tt.internals.ns.selector("breadcrumb__button")};class te extends Tt.core.Instance{constructor(){super(),this.count=0,this.focusing=this.focus.bind(this)}static get instanceClassName(){return"Breadcrumb"}init(){this.getCollapse(),this.isResizing=!0}get proxy(){const t=this;return Object.assign(super.proxy,{focus:t.focus.bind(t),disclose:t.collapse.disclose.bind(t.collapse)})}getCollapse(){const t=this.collapse;t?t.listen(Tt.core.DisclosureEvent.DISCLOSE,this.focusing):this.addAscent(Tt.core.DisclosureEmission.ADDED,this.getCollapse.bind(this))}resize(){const t=this.collapse,e=this.links;t&&e.length&&(this.isBreakpoint(Tt.core.Breakpoints.MD)?t.buttonHasFocus&&e[0].focus():e.indexOf(document.activeElement)>-1&&t.focus())}get links(){return[...this.querySelectorAll("a[href]")]}get collapse(){return this.element.getDescendantInstances(Tt.core.Collapse.instanceClassName,null,!0)[0]}focus(){this.count=0,this._focus()}_focus(){const t=this.links[0];t&&(t.focus(),this.request(this.verify.bind(this)))}verify(){if(this.count++,this.count>100)return;const t=this.links[0];t&&document.activeElement!==t&&this._focus()}get collapsePrimary(){return this.element.children.map((t=>t.getInstance("CollapseButton"))).filter((t=>null!==t&&t.hasClass(Jt.BUTTON)))[0]}}Tt.breadcrumb={BreadcrumbSelector:Jt,Breadcrumb:te},Tt.internals.register(Tt.breadcrumb.BreadcrumbSelector.BREADCRUMB,Tt.breadcrumb.Breadcrumb);const ee={TOOLTIP:Tt.internals.ns.selector("tooltip"),SHOWN:Tt.internals.ns.selector("tooltip--shown"),BUTTON:Tt.internals.ns.selector("btn--tooltip")};class ie extends Tt.core.PlacementReferent{constructor(){super(),this._state=0}static get instanceClassName(){return"TooltipReferent"}init(){if(super.init(),this.listen("focusin",this.focusIn.bind(this)),this.listen("focusout",this.focusOut.bind(this)),!this.matches(ee.BUTTON)){const t=this.mouseover.bind(this);this.listen("mouseover",t),this.placement.listen("mouseover",t);const e=this.mouseout.bind(this);this.listen("mouseout",e),this.placement.listen("mouseout",e)}this.addEmission(Tt.core.RootEmission.KEYDOWN,this._keydown.bind(this)),this.listen("click",this._click.bind(this)),this.addEmission(Tt.core.RootEmission.CLICK,this._clickOut.bind(this))}_click(){this.focus()}_clickOut(t){this.node.contains(t)||this.blur()}_keydown(t){t===Tt.core.KeyCodes.ESCAPE&&(this.blur(),this.close())}close(){this.state=0}get state(){return this._state}set state(t){this._state!==t&&(this.isShown=t>0,this._state=t)}focusIn(){this.state|=1}focusOut(){this.state&=-2}mouseover(){this.state|=2}mouseout(){this.state&=-3}}const re={SHOW:d.event("show"),HIDE:d.event("hide")},se="hidden",ne="shown",oe="hiding";class ae extends Tt.core.Placement{constructor(){super(Tt.core.PlacementMode.AUTO,[Tt.core.PlacementPosition.TOP,Tt.core.PlacementPosition.BOTTOM],[Tt.core.PlacementAlign.CENTER,Tt.core.PlacementAlign.START,Tt.core.PlacementAlign.END]),this.modifier="",this._state=se}static get instanceClassName(){return"Tooltip"}init(){super.init(),this.register(`[aria-describedby="${this.id}"]`,ie),this.listen("transitionend",this.transitionEnd.bind(this))}transitionEnd(){this._state===oe&&(this._state=se,this.isShown=!1)}get isShown(){return super.isShown}set isShown(t){if(this.isEnabled)switch(!0){case t:this._state=ne,this.addClass(ee.SHOWN),this.dispatch(re.SHOW),super.isShown=!0;break;case this.isShown&&!t&&this._state===ne:this._state=oe,this.removeClass(ee.SHOWN);break;case this.isShown&&!t&&this._state===se:this.dispatch(re.HIDE),super.isShown=!1}}render(){super.render();let t=this.referentRect.center-this.rect.center;const e=.5*this.rect.width-8;t<-e&&(t=-e),t>e&&(t=e),this.setProperty("--arrow-x",`${t.toFixed(2)}px`)}}Tt.tooltip={Tooltip:ae,TooltipSelector:ee,TooltipEvent:re},Tt.internals.register(Tt.tooltip.TooltipSelector.TOOLTIP,Tt.tooltip.Tooltip);class le extends Tt.core.Instance{static get instanceClassName(){return"ToggleInput"}get isChecked(){return this.node.checked}}class ce extends Tt.core.Instance{static get instanceClassName(){return"ToggleStatusLabel"}init(){this.register(`input[id="${this.getAttribute("for")}"]`,le),this.update(),this.isSwappingFont=!0}get proxy(){return Object.assign(super.proxy,{update:this.update.bind(this)})}get input(){return this.getRegisteredInstances("ToggleInput")[0]}update(){this.node.style.removeProperty("--toggle-status-width");const t=this.input.isChecked,e=getComputedStyle(this.node,":before");let i=parseFloat(e.width);this.input.node.checked=!t;const r=getComputedStyle(this.node,":before"),s=parseFloat(r.width);s>i&&(i=s),this.input.node.checked=t,this.node.style.setProperty("--toggle-status-width",i/16+"rem")}swapFont(t){this.update()}}const he={STATUS_LABEL:`${Tt.internals.ns.selector("toggle__label")}${Tt.internals.ns.attr.selector("checked-label")}${Tt.internals.ns.attr.selector("unchecked-label")}`};Tt.toggle={ToggleStatusLabel:ce,ToggleSelector:he},Tt.internals.register(Tt.toggle.ToggleSelector.STATUS_LABEL,Tt.toggle.ToggleStatusLabel);const ue=Tt.internals.ns.selector("sidemenu__item"),de=Tt.internals.ns.selector("collapse"),pe={LIST:Tt.internals.ns.selector("sidemenu__list"),COLLAPSE:`${ue} > ${de}, ${ue} > *:not(${ue}):not(${de}) > ${de}, ${ue} > *:not(${ue}):not(${de}) > *:not(${ue}):not(${de}) > ${de}`,COLLAPSE_LEGACY:`${ue} ${de}`,ITEM:Tt.internals.ns.selector("sidemenu__item"),BUTTON:Tt.internals.ns.selector("sidemenu__btn")};class fe extends Tt.core.CollapsesGroup{static get instanceClassName(){return"SidemenuList"}validate(t){return super.validate(t)&&t.node.matches(Tt.internals.legacy.isLegacy?pe.COLLAPSE_LEGACY:pe.COLLAPSE)}}class me extends Tt.core.Instance{static get instanceClassName(){return"SidemenuItem"}get collapsePrimary(){return this.element.children.map((t=>t.getInstance("CollapseButton"))).filter((t=>null!==t&&t.hasClass(pe.BUTTON)))[0]}}Tt.sidemenu={SidemenuList:fe,SidemenuItem:me,SidemenuSelector:pe},Tt.internals.register(Tt.sidemenu.SidemenuSelector.LIST,Tt.sidemenu.SidemenuList),Tt.internals.register(Tt.sidemenu.SidemenuSelector.ITEM,Tt.sidemenu.SidemenuItem);const ge={MODAL:Tt.internals.ns.selector("modal"),SCROLL_DIVIDER:Tt.internals.ns.selector("scroll-divider"),BODY:Tt.internals.ns.selector("modal__body"),TITLE:Tt.internals.ns.selector("modal__title")};class ye extends Tt.core.DisclosureButton{constructor(){super(Tt.core.DisclosureType.OPENED)}static get instanceClassName(){return"ModalButton"}}const _e={CONCEALING_BACKDROP:Tt.internals.ns.attr("concealing-backdrop")};class ve extends Tt.core.Disclosure{constructor(){super(Tt.core.DisclosureType.OPENED,ge.MODAL,ye,"ModalsGroup"),this._isActive=!1,this.scrolling=this.resize.bind(this,!1),this.resizing=this.resize.bind(this,!0)}static get instanceClassName(){return"Modal"}init(){super.init(),this._isDialog="DIALOG"===this.node.tagName,this.isScrolling=!1,this.listenClick(),this.addEmission(Tt.core.RootEmission.KEYDOWN,this._keydown.bind(this))}_keydown(t){t===Tt.core.KeyCodes.ESCAPE&&this._escape()}_escape(){switch(document.activeElement?document.activeElement.tagName:void 0){case"INPUT":case"LABEL":case"TEXTAREA":case"SELECT":case"AUDIO":case"VIDEO":break;default:this.isDisclosed&&(this.conceal(),this.focus())}}retrieved(){this._ensureAccessibleName()}get body(){return this.element.getDescendantInstances("ModalBody","Modal")[0]}handleClick(t){t.target===this.node&&"false"!==this.getAttribute(_e.CONCEALING_BACKDROP)&&this.conceal()}disclose(t){return!!super.disclose(t)&&(this.body&&this.body.activate(),this.isScrollLocked=!0,this.setAttribute("aria-modal","true"),this.setAttribute("open","true"),this._isDialog||this.activateModal(),!0)}conceal(t,e){return!!super.conceal(t,e)&&(this.isScrollLocked=!1,this.removeAttribute("aria-modal"),this.removeAttribute("open"),this.body&&this.body.deactivate(),this._isDialog||this.deactivateModal(),!0)}get isDialog(){return this._isDialog}set isDialog(t){this._isDialog=t}activateModal(){this._isActive||(this._isActive=!0,this._hasDialogRole="dialog"===this.getAttribute("role"),this._hasDialogRole||this.setAttribute("role","dialog"))}deactivateModal(){this._isActive&&(this._isActive=!1,this._hasDialogRole||this.removeAttribute("role"))}_setAccessibleName(t,e){const i=this.retrieveNodeId(t,e);this.warn(`add reference to ${e} for accessible name (aria-labelledby)`),this.setAttribute("aria-labelledby",i)}_ensureAccessibleName(){if(this.hasAttribute("aria-labelledby")||this.hasAttribute("aria-label"))return;this.warn("missing accessible name");const t=this.node.querySelector(ge.TITLE),e=this.primaryButtons[0];switch(!0){case null!==t:this._setAccessibleName(t,"title");break;case void 0!==e:this.warn("missing required title, fallback to primary button"),this._setAccessibleName(e,"primary")}}}const xe=['[tabindex="0"]',"a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details","iframe"].join(),be=['[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'].join(),we=(t,e)=>{if(!(t instanceof Element))return!1;const i=window.getComputedStyle(t);if(!i)return!1;if("hidden"===i.visibility)return!1;for(void 0===e&&(e=t);e.contains(t);){if("none"===i.display)return!1;t=t.parentElement}return!0};class Se{constructor(t,e){this.element=null,this.activeElement=null,this.onTrap=t,this.onUntrap=e,this.waiting=this.wait.bind(this),this.handling=this.handle.bind(this),this.focusing=this.maintainFocus.bind(this),this.current=null}get trapped(){return null!==this.element}trap(t){this.trapped&&this.untrap(),this.element=t,this.isTrapping=!0,this.wait(),this.onTrap&&this.onTrap()}wait(){we(this.element)?this.trapping():window.requestAnimationFrame(this.waiting)}trapping(){if(!this.isTrapping)return;this.isTrapping=!1;const t=this.focusables;t.length&&-1===t.indexOf(document.activeElement)&&t[0].focus(),this.element.setAttribute("aria-modal",!0),window.addEventListener("keydown",this.handling),document.body.addEventListener("focus",this.focusing,!0)}stun(t){for(const e of t.children)e!==this.element&&(e.contains(this.element)?this.stun(e):this.stunneds.push(new Ce(e)))}maintainFocus(t){if(!this.element.contains(t.target)){const e=this.focusables;if(0===e.length)return;const i=e[0];t.preventDefault(),i.focus()}}handle(t){if(9!==t.keyCode)return;const e=this.focusables;if(0===e.length)return;const i=e[0],r=e[e.length-1],s=e.indexOf(document.activeElement);t.shiftKey?!this.element.contains(document.activeElement)||s<1?(t.preventDefault(),r.focus()):(document.activeElement.tabIndex>0||e[s-1].tabIndex>0)&&(t.preventDefault(),e[s-1].focus()):this.element.contains(document.activeElement)&&s!==e.length-1&&-1!==s?document.activeElement.tabIndex>0&&(t.preventDefault(),e[s+1].focus()):(t.preventDefault(),i.focus())}get focusables(){let t=Tt.internals.dom.querySelectorAllArray(this.element,xe);const e=Tt.internals.dom.querySelectorAllArray(document.documentElement,'input[type="radio"]');if(e.length){const i={};for(const t of e){const e=t.getAttribute("name");void 0===i[e]&&(i[e]=new Te(e)),i[e].push(t)}t=t.filter((t=>{if("input"!==t.tagName.toLowerCase()||"radio"!==t.getAttribute("type").toLowerCase())return!0;const e=t.getAttribute("name");return i[e].keep(t)}))}const i=Tt.internals.dom.querySelectorAllArray(this.element,be);i.sort(((t,e)=>t.tabIndex-e.tabIndex));const r=t.filter((t=>-1===i.indexOf(t)));return i.concat(r).filter((t=>"-1"!==t.tabIndex&&we(t,this.element)))}untrap(){this.trapped&&(this.isTrapping=!1,this.element.removeAttribute("aria-modal"),window.removeEventListener("keydown",this.handling),document.body.removeEventListener("focus",this.focusing,!0),this.element=null,this.onUntrap&&this.onUntrap())}dispose(){this.untrap()}}class Ce{constructor(t){this.element=t,this.inert=t.getAttribute("inert"),this.element.setAttribute("inert","")}unstun(){null===this.inert?this.element.removeAttribute("inert"):this.element.setAttribute("inert",this.inert)}}class Te{constructor(t){this.name=t,this.buttons=[]}push(t){this.buttons.push(t),(t===document.activeElement||t.checked||void 0===this.selected)&&(this.selected=t)}keep(t){return this.selected===t}}class ke extends Tt.core.DisclosuresGroup{constructor(){super("Modal",!1),this.focusTrap=new Se}static get instanceClassName(){return"ModalsGroup"}apply(t,e){super.apply(t,e),null===this.current?this.focusTrap.untrap():this.focusTrap.trap(this.current.node)}}class Ee extends Tt.core.Instance{static get instanceClassName(){return"ModalBody"}init(){this.listen("scroll",this.divide.bind(this))}activate(){this.isResizing=!0,this.resize()}deactivate(){this.isResizing=!1}divide(){this.node.scrollHeight>this.node.clientHeight?this.node.offsetHeight+this.node.scrollTop>=this.node.scrollHeight?this.removeClass(ge.SCROLL_DIVIDER):this.addClass(ge.SCROLL_DIVIDER):this.removeClass(ge.SCROLL_DIVIDER)}resize(){this.adjust(),this.request(this.adjust.bind(this))}adjust(){const t=32*(this.isBreakpoint(Tt.core.Breakpoints.MD)?2:1);this.isLegacy?this.style.maxHeight=window.innerHeight-t+"px":this.style.setProperty("--modal-max-height",window.innerHeight-t+"px"),this.divide()}}Tt.modal={Modal:ve,ModalButton:ye,ModalBody:Ee,ModalsGroup:ke,ModalSelector:ge},Tt.internals.register(Tt.modal.ModalSelector.MODAL,Tt.modal.Modal),Tt.internals.register(Tt.modal.ModalSelector.BODY,Tt.modal.ModalBody),Tt.internals.register(Tt.core.RootSelector.ROOT,Tt.modal.ModalsGroup);const Ae={TOGGLE:Tt.internals.ns.emission("password","toggle"),ADJUST:Tt.internals.ns.emission("password","adjust")};class Me extends Tt.core.Instance{static get instanceClassName(){return"PasswordToggle"}init(){this.listenClick(),this.ascend(Ae.ADJUST,this.width),this.isSwappingFont=!0,this._isChecked=this.isChecked}get width(){const t=getComputedStyle(this.node.parentNode);return parseInt(t.width)}get isChecked(){return this.node.checked}set isChecked(t){this._isChecked=t,this.ascend(Ae.TOGGLE,t)}handleClick(){this.isChecked=!this._isChecked}swapFont(t){this.ascend(Ae.ADJUST,this.width)}}class Pe extends Tt.core.Instance{static get instanceClassName(){return"Password"}init(){this.addAscent(Ae.TOGGLE,this.toggle.bind(this)),this.addAscent(Ae.ADJUST,this.adjust.bind(this))}toggle(t){this.descend(Ae.TOGGLE,t)}adjust(t){this.descend(Ae.ADJUST,t)}}const Ie={PASSWORD:Tt.internals.ns.selector("password"),INPUT:Tt.internals.ns.selector("password__input"),LABEL:Tt.internals.ns.selector("password__label"),TOOGLE:`${Tt.internals.ns.selector("password__checkbox")} input[type="checkbox"]`};class Le extends Tt.core.Instance{static get instanceClassName(){return"PasswordInput"}init(){this.addDescent(Ae.TOGGLE,this.toggle.bind(this)),this._isRevealed="password"===this.hasAttribute("type"),this.listen("keydown",this.capslock.bind(this)),this.listen("keyup",this.capslock.bind(this))}toggle(t){this.isRevealed=t,this.setAttribute("type",t?"text":"password")}get isRevealed(){return this._isRevealed}capslock(t){t&&"function"!=typeof t.getModifierState||(t.getModifierState("CapsLock")?this.node.parentNode.setAttribute(Tt.internals.ns.attr("capslock"),""):this.node.parentNode.removeAttribute(Tt.internals.ns.attr("capslock")))}set isRevealed(t){this._isRevealed=t,this.setAttribute("type",t?"text":"password")}}class De extends Tt.core.Instance{static get instanceClassName(){return"PasswordLabel"}init(){this.addDescent(Ae.ADJUST,this.adjust.bind(this))}adjust(t){const e=Math.ceil(t/16);this.node.style.paddingRight=e+"rem"}}Tt.password={Password:Pe,PasswordToggle:Me,PasswordSelector:Ie,PasswordInput:Le,PasswordLabel:De},Tt.internals.register(Tt.password.PasswordSelector.INPUT,Tt.password.PasswordInput),Tt.internals.register(Tt.password.PasswordSelector.PASSWORD,Tt.password.Password),Tt.internals.register(Tt.password.PasswordSelector.TOOGLE,Tt.password.PasswordToggle),Tt.internals.register(Tt.password.PasswordSelector.LABEL,Tt.password.PasswordLabel);const ze=Tt.internals.ns.selector("nav__item"),Oe=Tt.internals.ns.selector("collapse"),Re={NAVIGATION:Tt.internals.ns.selector("nav"),COLLAPSE:`${ze} > ${Oe}, ${ze} > *:not(${ze}):not(${Oe}) > ${Oe}, ${ze} > *:not(${ze}):not(${Oe}) > *:not(${ze}):not(${Oe}) > ${Oe}`,COLLAPSE_LEGACY:`${ze} ${Oe}`,ITEM:ze,ITEM_RIGHT:`${ze}--align-right`,MENU:Tt.internals.ns.selector("menu"),BUTTON:Tt.internals.ns.selector("nav__btn"),TRANSLATE_BUTTON:Tt.internals.ns.selector("translate__btn")};class Ne extends Tt.core.Instance{constructor(){super(),this._isRightAligned=!1}static get instanceClassName(){return"NavigationItem"}init(){this.addAscent(Tt.core.DisclosureEmission.ADDED,this.calculate.bind(this)),this.addAscent(Tt.core.DisclosureEmission.REMOVED,this.calculate.bind(this)),this.isResizing=!0,this.calculate()}resize(){this.calculate()}calculate(){const t=this.element.getDescendantInstances(Tt.core.Collapse.instanceClassName,null,!0)[0];if(t&&this.isBreakpoint(Tt.core.Breakpoints.LG)&&t.element.node.matches(Re.MENU)){const e=this.element.node.parentElement.getBoundingClientRect().right,i=t.element.node.getBoundingClientRect().width,r=this.element.node.getBoundingClientRect().left;this.isRightAligned=r+i>e}else this.isRightAligned=!1}get isRightAligned(){return this._isRightAligned}set isRightAligned(t){this._isRightAligned!==t&&(this._isRightAligned=t,t?Tt.internals.dom.addClass(this.element.node,Re.ITEM_RIGHT):Tt.internals.dom.removeClass(this.element.node,Re.ITEM_RIGHT))}get collapsePrimary(){return this.element.children.map((t=>t.getInstance("CollapseButton"))).filter((t=>null!==t&&(t.hasClass(Re.BUTTON)||t.hasClass(Re.TRANSLATE_BUTTON))))[0]}}const Be={NONE:-1,INSIDE:0,OUTSIDE:1};class Fe extends Tt.core.CollapsesGroup{static get instanceClassName(){return"Navigation"}init(){super.init(),this.clicked=!1,this.out=!1,this.addEmission(Tt.core.RootEmission.CLICK,this._handleRootClick.bind(this)),this.listen("mousedown",this.handleMouseDown.bind(this)),this.listenClick({capture:!0}),this.isResizing=!0}validate(t){return super.validate(t)&&t.element.node.matches(Tt.internals.legacy.isLegacy?Re.COLLAPSE_LEGACY:Re.COLLAPSE)}handleMouseDown(t){this.isBreakpoint(Tt.core.Breakpoints.LG)&&-1!==this.index&&this.current&&(this.position=this.current.node.contains(t.target)?Be.INSIDE:Be.OUTSIDE,this.requestPosition())}handleClick(t){!t.target.matches("a, button")||t.target.matches("[aria-controls]")||t.target.matches(Tt.core.DisclosureSelector.PREVENT_CONCEAL)||(this.index=-1)}_handleRootClick(t){this.isBreakpoint(Tt.core.Breakpoints.LG)&&(this.node.contains(t)||(this.out=!0,this.requestPosition()))}requestPosition(){this.isRequesting||(this.isRequesting=!0,this.request(this.getPosition.bind(this)))}getPosition(){if(this.out)switch(this.position){case Be.OUTSIDE:this.index=-1;break;case Be.INSIDE:this.current&&!this.current.node.contains(document.activeElement)&&this.current.focus();break;default:this.index>-1&&!this.current.hasFocus&&(this.index=-1)}this.request(this.requested.bind(this))}requested(){this.position=Be.NONE,this.out=!1,this.isRequesting=!1}get index(){return super.index}set index(t){-1===t&&this.current&&this.current.hasFocus&&this.current.focus(),super.index=t}get canUngroup(){return!this.isBreakpoint(Tt.core.Breakpoints.LG)}resize(){this.update()}}Tt.navigation={Navigation:Fe,NavigationItem:Ne,NavigationMousePosition:Be,NavigationSelector:Re},Tt.internals.register(Tt.navigation.NavigationSelector.NAVIGATION,Tt.navigation.Navigation),Tt.internals.register(Tt.navigation.NavigationSelector.ITEM,Tt.navigation.NavigationItem);class je extends Tt.core.DisclosureButton{constructor(){super(Tt.core.DisclosureType.SELECT)}static get instanceClassName(){return"TabButton"}handleClick(t){super.handleClick(t),this.focus()}apply(t){super.apply(t),this.isPrimary&&(this.setAttribute("tabindex",t?"0":"-1"),t&&this.list&&this.list.focalize(this))}get list(){return this.element.getAscendantInstance("TabsList","TabsGroup")}}const Ue={TAB:Tt.internals.ns.selector("tabs__tab"),GROUP:Tt.internals.ns.selector("tabs"),PANEL:Tt.internals.ns.selector("tabs__panel"),LIST:Tt.internals.ns.selector("tabs__list"),SHADOW:Tt.internals.ns.selector("tabs__shadow"),SHADOW_LEFT:Tt.internals.ns.selector("tabs__shadow--left"),SHADOW_RIGHT:Tt.internals.ns.selector("tabs__shadow--right"),PANEL_START:Tt.internals.ns.selector("tabs__panel--direction-start"),PANEL_END:Tt.internals.ns.selector("tabs__panel--direction-end")},Ve="direction-start",qe="direction-end",Ge="none";class $e extends Tt.core.Disclosure{constructor(){super(Tt.core.DisclosureType.SELECT,Ue.PANEL,je,"TabsGroup"),this._direction=Ge,this._isPreventingTransition=!1}static get instanceClassName(){return"TabPanel"}get direction(){return this._direction}set direction(t){if(t!==this._direction){switch(this._direction){case Ve:this.removeClass(Ue.PANEL_START);break;case qe:this.removeClass(Ue.PANEL_END);break;case Ge:break;default:return}switch(this._direction=t,this._direction){case Ve:this.addClass(Ue.PANEL_START);break;case qe:this.addClass(Ue.PANEL_END)}}}get isPreventingTransition(){return this._isPreventingTransition}set isPreventingTransition(t){this._isPreventingTransition!==t&&(t?this.addClass(Tt.internals.motion.TransitionSelector.NONE):this.removeClass(Tt.internals.motion.TransitionSelector.NONE),this._isPreventingTransition=!0===t)}translate(t,e){this.isPreventingTransition=e,this.direction=t}reset(){this.group&&this.group.retrieve(!0)}_electPrimaries(t){return this.group&&this.group.list?super._electPrimaries(t).filter((t=>this.group.list.node.contains(t.node))):[]}}const He="tab_keys_left",We="tab_keys_right",Xe="tab_keys_home",Ze="tab_keys_end",Ye={PRESS_KEY:Tt.internals.ns.emission("tab","press_key"),LIST_HEIGHT:Tt.internals.ns.emission("tab","list_height")};class Ke extends Tt.core.DisclosuresGroup{constructor(){super("TabPanel")}static get instanceClassName(){return"TabsGroup"}init(){super.init(),this.listen("transitionend",this.transitionend.bind(this)),this.addAscent(Ye.PRESS_KEY,this.pressKey.bind(this)),this.addAscent(Ye.LIST_HEIGHT,this.setListHeight.bind(this)),this.isRendering=!0}getIndex(t=0){super.getIndex(t)}get list(){return this.element.getDescendantInstances("TabsList","TabsGroup",!0)[0]}setListHeight(t){this.listHeight=t}transitionend(t){this.isPreventingTransition=!0}get buttonHasFocus(){return this.members.some((t=>t.buttonHasFocus))}pressKey(t){switch(t){case He:this.pressLeft();break;case We:this.pressRight();break;case Xe:this.pressHome();break;case Ze:this.pressEnd()}}pressRight(){this.buttonHasFocus&&(this.index0?this.index--:this.index=this.length-1,this.focus())}pressHome(){this.buttonHasFocus&&(this.index=0,this.focus())}pressEnd(){this.buttonHasFocus&&(this.index=this.length-1,this.focus())}focus(){this.current&&this.current.focus()}apply(){for(let t=0;ti.right&&this.node.scrollTo(r-i.right+e.right+16,0)}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,this.apply())}apply(){this._isScrolling?(this.addClass(Ue.SHADOW),this.scroll()):(this.removeClass(Ue.SHADOW_RIGHT),this.removeClass(Ue.SHADOW_LEFT),this.removeClass(Ue.SHADOW))}scroll(){const t=this.node.scrollLeft,e=t<=16,i=this.node.scrollWidth-this.node.clientWidth-16,r=Math.abs(t)>=i,s="rtl"===document.documentElement.getAttribute("dir"),n=s?Ue.SHADOW_RIGHT:Ue.SHADOW_LEFT,o=s?Ue.SHADOW_LEFT:Ue.SHADOW_RIGHT;e?this.removeClass(n):this.addClass(n),r?this.removeClass(o):this.addClass(o)}resize(){this.isScrolling=this.node.scrollWidth>this.node.clientWidth+16;const t=this.getRect().height;this.setProperty("--tabs-list-height",`${t}px`),this.ascend(Ye.LIST_HEIGHT,t)}dispose(){this.isScrolling=!1}}Tt.tab={TabPanel:$e,TabButton:je,TabsGroup:Ke,TabsList:Qe,TabSelector:Ue,TabEmission:Ye},Tt.internals.register(Tt.tab.TabSelector.PANEL,Tt.tab.TabPanel),Tt.internals.register(Tt.tab.TabSelector.GROUP,Tt.tab.TabsGroup),Tt.internals.register(Tt.tab.TabSelector.LIST,Tt.tab.TabsList);const Je={DISMISS:Tt.internals.ns.event("dismiss")};class ti extends Tt.core.Instance{static get instanceClassName(){return"TagDismissible"}init(){this.listenClick()}handleClick(){switch(this.focusClosest(),Tt.mode){case Tt.Modes.ANGULAR:case Tt.Modes.REACT:case Tt.Modes.VUE:this.request(this.verify.bind(this));break;default:this.remove()}this.dispatch(Je.DISMISS)}verify(){document.body.contains(this.node)&&this.warn(`a TagDismissible has just been dismissed and should be removed from the dom. In ${Tt.mode} mode, the api doesn't handle dom modification. An event ${Je.DISMISS} is dispatched by the element to trigger the removal`)}}const ei={PRESSABLE:`${Tt.internals.ns.selector("tag")}[aria-pressed]`,DISMISSIBLE:`${Tt.internals.ns.selector("tag--dismiss")}`};Tt.tag={TagDismissible:ti,TagSelector:ei,TagEvent:Je},Tt.internals.register(Tt.tag.TagSelector.PRESSABLE,Tt.core.Toggle),Tt.internals.register(Tt.tag.TagSelector.DISMISSIBLE,Tt.tag.TagDismissible);const ii=Tt.internals.ns.selector("transcription"),ri={TRANSCRIPTION:ii,BUTTON:`${ii}__btn`};class si extends Tt.core.Instance{static get instanceClassName(){return"Transcription"}get collapsePrimary(){return this.element.children.map((t=>t.getInstance("CollapseButton"))).filter((t=>null!==t&&t.hasClass(ri.BUTTON)))[0]}}Tt.transcription={Transcription:si,TranscriptionSelector:ri},Tt.internals.register(Tt.transcription.TranscriptionSelector.TRANSCRIPTION,Tt.transcription.Transcription);class ni extends Tt.core.Instance{static get instanceClassName(){return"TileDownload"}init(){this.addAscent(Tt.core.AssessEmission.UPDATE,(t=>{this.descend(Tt.core.AssessEmission.UPDATE,t)})),this.addAscent(Tt.core.AssessEmission.ADDED,(()=>{this.descend(Tt.core.AssessEmission.ADDED)}))}}const oi={DOWNLOAD:Tt.internals.ns.selector("tile--download"),DOWNLOAD_DETAIL:`${Tt.internals.ns.selector("tile--download")} ${Tt.internals.ns.selector("tile__detail")}`};Tt.tile={TileSelector:oi,TileDownload:ni},Tt.internals.register(Tt.tile.TileSelector.DOWNLOAD,Tt.tile.TileDownload),Tt.internals.register(Tt.tile.TileSelector.DOWNLOAD_DETAIL,Tt.core.AssessDetail);const ai={RANGE:Tt.internals.ns.selector("range"),RANGE_SM:Tt.internals.ns.selector("range--sm"),RANGE_STEP:Tt.internals.ns.selector("range--step"),RANGE_DOUBLE:Tt.internals.ns.selector("range--double"),RANGE_DOUBLE_STEP:Tt.internals.ns.selector("range--double")+Tt.internals.ns.selector("range--step"),RANGE_INPUT:Tt.internals.ns.selector("range input[type=range]:nth-of-type(1)"),RANGE_INPUT2:`${Tt.internals.ns.selector("range--double")} input[type=range]:nth-of-type(2)`,RANGE_OUTPUT:Tt.internals.ns.selector("range__output"),RANGE_MIN:Tt.internals.ns.selector("range__min"),RANGE_MAX:Tt.internals.ns.selector("range__max"),RANGE_PREFIX:Tt.internals.ns.attr("prefix"),RANGE_SUFFIX:Tt.internals.ns.attr("suffix")},li={VALUE:Tt.internals.ns.emission("range","value"),VALUE2:Tt.internals.ns.emission("range","value2"),OUTPUT:Tt.internals.ns.emission("range","output"),CONSTRAINTS:Tt.internals.ns.emission("range","constraints"),MIN:Tt.internals.ns.emission("range","min"),MAX:Tt.internals.ns.emission("range","max"),STEP:Tt.internals.ns.emission("range","step"),PREFIX:Tt.internals.ns.emission("range","prefix"),SUFFIX:Tt.internals.ns.emission("range","suffix"),DISABLED:Tt.internals.ns.emission("range","disabled"),ENABLE_POINTER:Tt.internals.ns.emission("range","enable_pointer")};class ci{constructor(){this._width=0,this._min=0,this._max=0,this._value=0,this._thumbSize=24,this._innerWidth=0,this._prefix="",this._suffix="",this._background={}}configure(t){t&&(this._prefix=t._prefix,this._suffix=t._suffix,this._width=t.width,this.setConstraints(t._constraints),this.value=t.value,this.update())}setPrefix(t){this._prefix=null!==t?t:""}setSuffix(t){this._suffix=null!==t?t:""}_decorate(t){return`${this._prefix}${t}${this._suffix}`}get width(){return this._width}set width(t){this._width=t}get isSm(){return this._isSm}set isSm(t){this._isSm!==t&&(this._isSm=t,this.setThumbSize(t?16:24),this.update())}setThumbSize(t,e=1){this._thumbSize=t,this._innerPadding=t*e}get textValue(){return this._decorate(this._value)}get value(){return this._value}set value(t){this._value=t}get outputX(){return this._outputX}setConstraints(t){this._constraints=t,this._min=t.min,this._max=t.max,this._step=t.step,this._rangeWidth=t.rangeWidth}get min(){return this._min}get textMin(){return this._decorate(this._min)}get max(){return this._max}get textMax(){return this._decorate(this._max)}get step(){return this._step}get output(){return{text:this.textValue,transform:`translateX(${this._translateX}px) translateX(-${this._centerPercent}%)`}}_getRatio(t){return(t-this._min)/this._rangeWidth}get progress(){return this._progress}update(){this._update()}_update(){this._innerWidth=this._width-this._innerPadding;const t=this._getRatio(this._value);this._translateX=t*this._width,this._centerPercent=100*t,this._progress={right:`${(this._innerWidth*t+.5*this._innerPadding).toFixed(2)}px`}}}class hi extends ci{get stepWidth(){return`${this._stepWidth.toFixed(3)}px`}_update(){super._update();const t=this._rangeWidth/this._step;for(this._stepWidth=this._innerWidth/t,(this._stepWidth<1||!isFinite(this._stepWidth))&&(this._stepWidth=4);this._stepWidth<4;)this._stepWidth*=2}}class ui extends ci{get value2(){return this._value}set value2(t){this._value2!==t&&(this._value2=t,this.update())}get textValue(){return`${this._decorate(this._value)} - ${this._decorate(this._value2)}`}setThumbSize(t){super.setThumbSize(t,2)}_update(){super._update();const t=this._getRatio(.5*(this._value+this._value2));this._translateX=t*this._width,this._centerPercent=100*t;const e=this._getRatio(this._value),i=this._getRatio(this._value2);this._progress={left:`${(this._innerWidth*e+.25*this._innerPadding).toFixed(2)}px`,right:`${(this._innerWidth*i+.75*this._innerPadding).toFixed(2)}px`}}}class di extends ui{get stepWidth(){return`${this._stepWidth.toFixed(3)}px`}_update(){super._update();const t=this._rangeWidth/this._step;this._stepWidth=this._innerWidth/t,this._stepWidth<4&&(this._stepWidth*=Math.ceil(4/this._stepWidth))}}const pi="step",fi="double",mi="double-step";class gi extends Tt.core.Instance{static get instanceClassName(){return"Range"}init(){this._retrieveType(),this._retrieveSize(),this.isLegacy?(this.isResizing=!0,this.isMouseMoving=!0):(this._observer=new ResizeObserver(this.resize.bind(this)),this._observer.observe(this.node)),this.addAscent(li.CONSTRAINTS,this.setConstraints.bind(this)),this.addAscent(li.VALUE,this.setValue.bind(this)),this.addAscent(li.VALUE2,this.setValue2.bind(this)),this.getAttribute(ai.RANGE_PREFIX)&&this.setPrefix(this.getAttribute(ai.RANGE_PREFIX)),this.getAttribute(ai.RANGE_SUFFIX)&&this.setSuffix(this.getAttribute(ai.RANGE_SUFFIX)),this.update()}_retrieveType(){switch(!0){case this.matches(ai.RANGE_DOUBLE_STEP):case this.matches(ai.RANGE_DOUBLE):this.type=fi;break;case this.matches(ai.RANGE_STEP):this.type=pi;break;default:this.type="default"}}set type(t){if(this._type===t)return;this._type=t;const e=this._model;switch(this._type){case mi:this._model=new di;break;case fi:this._model=new ui;break;case pi:this._model=new hi;break;default:this._model=new ci}this._model.configure(e)}get type(){return this._type}_retrieveSize(){this._model.isSm=this.matches(ai.RANGE_SM)}resize(){this._retrieveWidth(),this.update()}_retrieveWidth(){this._model.width=this.getRect().width}setValue(t){switch(this._model.value=t,this._type){case mi:case fi:this.descend(li.VALUE,t)}this.update()}setValue2(t){this._model.value2=t,this.descend(li.VALUE2,t),this.update()}setConstraints(t){this._model.setConstraints(t),this.update(),this.descend(li.CONSTRAINTS,t)}setPrefix(t){this._model.setPrefix(t),this.update()}setSuffix(t){this._model.setSuffix(t),this.update()}mutate(t){switch(!0){case t.includes("class"):this._retrieveType(),this._retrieveSize();break;case t.includes(ai.RANGE_PREFIX):case t.includes(ai.RANGE_SUFFIX):this._model.setPrefix(this.getAttribute(ai.RANGE_PREFIX)),this._model.setSuffix(this.getAttribute(ai.RANGE_SUFFIX)),this.update()}}update(){this._model.update(),this.descend(li.OUTPUT,this._model.output),this.descend(li.MIN,this._model.textMin),this.descend(li.MAX,this._model.textMax);const t=this._model.progress;t.left?this.style.setProperty("--progress-left",t.left):this.style.removeProperty("--progress-left"),t.right?(this.style.setProperty("--progress-right",t.right),this.isLegacy&&t.left&&(this.style.setProperty("background-position-x",t.left),this.style.setProperty("background-size",`${parseFloat(t.right)-parseFloat(t.left)}px ${this._model.isSm?"8px":"12px"}`))):(this.style.removeProperty("--progress-right"),this.isLegacy&&(this.style.removeProperty("background-size"),this.style.removeProperty("background-position-x"))),this._model.stepWidth?this.style.setProperty("--step-width",this._model.stepWidth):this.style.removeProperty("--step-width")}mouseMove(t){if(this._type!==fi&&this._type!==mi)return;const e=t.x-this.getRect().left;this.descend(li.ENABLE_POINTER,(parseFloat(this._model.progress.right)-parseFloat(this._model.progress.left))/2+parseFloat(this._model.progress.left){this.hasAttribute("min")||this.setAttribute("min",0),this.ascend(li.CONSTRAINTS,new yi(this.node)),this.ascend(li.DISABLED,this.node.disabled)})),this.addDescent(li.VALUE2,this.setValue.bind(this))}_enablePointer(t){const e=t===this._pointerId;this._isPointerEnabled!==e&&(this._isPointerEnabled=e,e?this.style.removeProperty("pointer-events"):this.style.setProperty("pointer-events","none"))}setValue(t){parseFloat(this.node.value)>t&&(this.node.value=t,this.dispatch("change",void 0,!0),this.change())}change(){this.ascend(li.VALUE,parseFloat(this.node.value))}mutate(t){t.includes("disabled")&&this.ascend(li.DISABLED,this.node.disabled),(t.includes("min")||t.includes("max")||t.includes("step"))&&(this.ascend(li.CONSTRAINTS,new yi(this.node)),this.change())}dispose(){this._listenerType&&this.unlisten(this._listenerType,this._changing)}}class vi extends Tt.core.Instance{static get instanceClassName(){return"RangeOutput"}init(){this.addDescent(li.OUTPUT,this.change.bind(this))}change(t){this.node.innerText=t.text,this.node.style.transform=t.transform}}class xi extends Tt.core.Instance{static get instanceClassName(){return"RangeLimit"}init(){switch(!0){case this.matches(ai.RANGE_MIN):this.addDescent(li.MIN,this.change.bind(this));break;case this.matches(ai.RANGE_MAX):this.addDescent(li.MAX,this.change.bind(this))}}change(t){this.node.innerText=t}}Tt.range={Range:gi,RangeInput:_i,RangeInput2:class extends _i{static get instanceClassName(){return"RangeInput2"}_init(){this._pointerId=2,this.addDescent(li.CONSTRAINTS,this.setConstraints.bind(this)),this.addDescent(li.VALUE,this.setValue.bind(this))}setValue(t){parseFloat(this.node.value)t.replace('id="',"").replace('"',"")));const n=i.match(/aria-controls="(.*?)"/gm);let o=i.replace(/id="(.*?)"/gm,'id="$1'+e+'"');if(n)for(const t of n){const i=t.replace('aria-controls="',"").replace('"',"");s.includes(i)&&(o=o.replace(`aria-controls="${i}"`,`aria-controls="${i+e}"`))}if(o!==r)switch(Tt.mode){case Tt.Modes.ANGULAR:case Tt.Modes.REACT:case Tt.Modes.VUE:this.warn(`header__tools-links content is different from header__menu-links content.\nAs you're using a dynamic framework, you should handle duplication of this content yourself, please refer to documentation:\n${Tt.header.doc}`);break;default:this.menuLinks.innerHTML=o}}}class Si extends Tt.core.Instance{static get instanceClassName(){return"HeaderModal"}init(){this.isResizing=!0}resize(){this.isBreakpoint(Tt.core.Breakpoints.LG)?this.deactivateModal():this.activateModal()}activateModal(){const t=this.element.getInstance("Modal");t&&(t.isEnabled=!0,this.listenClick({capture:!0}))}deactivateModal(){const t=this.element.getInstance("Modal");t&&(t.conceal(),t.isEnabled=!1,this.unlistenClick({capture:!0}))}handleClick(t){!t.target.matches("a, button")||t.target.matches("[aria-controls]")||t.target.matches(Tt.core.DisclosureSelector.PREVENT_CONCEAL)||this.element.getInstance("Modal").conceal()}}Tt.header={HeaderLinks:wi,HeaderModal:Si,HeaderSelector:bi,doc:"https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/en-tete"},Tt.internals.register(Tt.header.HeaderSelector.TOOLS_LINKS,Tt.header.HeaderLinks),Tt.internals.register(Tt.header.HeaderSelector.MODALS,Tt.header.HeaderModal);const Ci={DISPLAY:Tt.internals.ns.selector("display"),RADIO_BUTTONS:`input[name="${Tt.internals.ns("radios-theme")}"]`,FIELDSET:Tt.internals.ns.selector("fieldset")};class Ti extends Tt.core.Instance{static get instanceClassName(){return"Display"}init(){if(this.radios=this.querySelectorAll(Ci.RADIO_BUTTONS),Tt.scheme){this.changing=this.change.bind(this);for(const t of this.radios)t.addEventListener("change",this.changing);this.addDescent(Tt.scheme.SchemeEmission.SCHEME,this.apply.bind(this)),this.ascend(Tt.scheme.SchemeEmission.ASK)}else this.querySelector(Ci.FIELDSET).setAttribute("disabled","")}get scheme(){return this._scheme}set scheme(t){if(this._scheme!==t&&Tt.scheme)switch(t){case Tt.scheme.SchemeValue.SYSTEM:case Tt.scheme.SchemeValue.LIGHT:case Tt.scheme.SchemeValue.DARK:this._scheme=t;for(const e of this.radios)e.checked=e.value===t;this.ascend(Tt.scheme.SchemeEmission.SCHEME,t)}}change(){for(const t of this.radios)if(t.checked)return void(this.scheme=t.value)}apply(t){this.scheme=t}dispose(){for(const t of this.radios)t.removeEventListener("change",this.changing)}}Tt.display={Display:Ti,DisplaySelector:Ci},Tt.internals.register(Tt.display.DisplaySelector.DISPLAY,Tt.display.Display);const ki={SCROLLABLE:Tt.internals.ns.emission("table","scrollable"),CHANGE:Tt.internals.ns.emission("table","change"),CAPTION_HEIGHT:Tt.internals.ns.emission("table","captionheight"),CAPTION_WIDTH:Tt.internals.ns.emission("table","captionwidth")};class Ei extends Tt.core.Instance{static get instanceClassName(){return"Table"}init(){this.addAscent(ki.CAPTION_HEIGHT,this.setCaptionHeight.bind(this))}setCaptionHeight(t){this.setProperty("--table-offset",t)}}class Ai extends Tt.core.Instance{static get instanceClassName(){return"TableWrapper"}init(){this.addAscent(ki.CAPTION_HEIGHT,this.setCaptionHeight.bind(this))}setCaptionHeight(t){requestAnimationFrame((()=>this.ascend(ki.CAPTION_HEIGHT,0))),this.setProperty("--table-offset",t)}}const Mi={TABLE:Tt.internals.ns.selector("table"),TABLE_WRAPPER:[`${Tt.internals.ns.selector("table")} ${Tt.internals.ns.selector("table__wrapper")}`],SHADOW:Tt.internals.ns.selector("table__shadow"),SHADOW_LEFT:Tt.internals.ns.selector("table__shadow--left"),SHADOW_RIGHT:Tt.internals.ns.selector("table__shadow--right"),ELEMENT:[`${Tt.internals.ns.selector("table")}:not(${Tt.internals.ns.selector("table--no-scroll")}) table`],CAPTION:`${Tt.internals.ns.selector("table")} table caption`,ROW:`${Tt.internals.ns.selector("table")} tbody tr`,COL:`${Tt.internals.ns.selector("table")} thead th`};class Pi extends Tt.core.Instance{static get instanceClassName(){return"TableElement"}init(){this.listen("scroll",this.scroll.bind(this)),this.content=this.querySelector("tbody"),this.tableOffsetHeight=0,this.isResizing=!0}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,t?(this.addClass(Mi.SHADOW),this.scroll()):(this.removeClass(Mi.SHADOW),this.removeClass(Mi.SHADOW_LEFT),this.removeClass(Mi.SHADOW_RIGHT)))}scroll(){const t=this.node.scrollLeft<=0,e=this.content.offsetWidth-this.node.offsetWidth-0,i=Math.abs(this.node.scrollLeft)>=e,r="rtl"===document.documentElement.getAttribute("dir"),s=r?Mi.SHADOW_RIGHT:Mi.SHADOW_LEFT,n=r?Mi.SHADOW_LEFT:Mi.SHADOW_RIGHT;t?this.removeClass(s):this.addClass(s),i?this.removeClass(n):this.addClass(n)}resize(){this.isScrolling=this.content.offsetWidth>this.node.offsetWidth}dispose(){this.isScrolling=!1}}class Ii extends Tt.core.Instance{static get instanceClassName(){return"TableCaption"}init(){this.height=0,this.isResizing=!0}resize(){const t=this.getRect().height;this.height!==t&&(this.height=t,this.ascend(ki.CAPTION_HEIGHT,`calc(${t}px + 1rem)`))}}class Li extends Tt.core.Instance{static get instanceClassName(){return"TableRow"}init(){Tt.checkbox&&(this.addAscent(Wt.CHANGE,this._handleCheckboxChange.bind(this)),this.descend(Wt.RETRIEVE))}_handleCheckboxChange(t){"row-select"===t.name&&(this.isSelected=!0===t.checked)}render(){const t=this.getRect().height+2;this._height!==t&&(this._height=t,this.setProperty("--row-height",`${this._height}px`))}get isSelected(){return this._isSelected}set isSelected(t){this._isSelected!==t&&(this.isRendering=t,this._isSelected=t,this.setAttribute("aria-selected",t))}}Tt.table={Table:Ei,TableWrapper:Ai,TableElement:Pi,TableCaption:Ii,TableSelector:Mi,TableRow:Li},Tt.internals.register(Tt.table.TableSelector.TABLE,Tt.table.Table),Tt.internals.register(Tt.table.TableSelector.TABLE_WRAPPER,Tt.table.TableWrapper),Tt.internals.register(Tt.table.TableSelector.ELEMENT,Tt.table.TableElement),Tt.internals.register(Tt.table.TableSelector.CAPTION,Tt.table.TableCaption),Tt.internals.register(Tt.table.TableSelector.ROW,Tt.table.TableRow)},515:()=>{var t=document.getElementById("filter-diagnostic-list-input");t&&(t.onkeyup=function(){var e=t.value.toLowerCase(),i=document.querySelectorAll(".diagnostic-list-item");(i=Array.from(i)).forEach((function(t){-1!==t.querySelector(".diagnostic-list-item-key").dataset.key.toLowerCase().indexOf(e)?(t.removeAttribute("hidden"),t.style.visibility="visible"):(t.setAttribute("hidden",!0),t.style.visibility="hidden")}));var r=document.getElementById("diagnostic-list-empty-message");i.length===i.filter((function(t){return t.hidden})).length?(r.removeAttribute("hidden"),r.style.visibility="visible"):(r.setAttribute("hidden",!0),r.style.visibility="hidden")})},504:()=>{document.querySelectorAll(".fr-callout-read-more__btn").forEach((function(t){t.addEventListener("click",(function(){var e=t.parentNode.querySelector(".fr-callout-read-more__excerpt"),i=t.parentNode.querySelector(".fr-callout-read-more__text"),r="true"===t.getAttribute("aria-expanded");t.parentNode.classList.toggle("fr-callout-read-more--expanded"),t.setAttribute("aria-expanded",!r),e.hidden=!r,i.hidden=r,t.firstChild.data=r?"Lire plus":"Lire moins"}))}))},847:(t,e,i)=>{window.htmx=i(926),window.htmx.onLoad((function(){document.querySelectorAll(".fullscreen-chart").forEach((function(t){t.onclick=function(){var e=t.dataset.chartTarget,i=document.getElementById(e);Highcharts.charts[Highcharts.attr(i,"data-highcharts-chart")].fullscreen.toggle()}})),document.querySelectorAll(".export-chart").forEach((function(t){t.onclick=function(e){var i=t.dataset.chartTarget,r=document.getElementById(i),s=Highcharts.charts[Highcharts.attr(r,"data-highcharts-chart")];e.preventDefault(),s.exportChart({type:t.dataset.type,scale:3})}}))}))},316:function(t,e,i){var r;"undefined"!=typeof self&&self,t.exports=(r=i(540),function(t){function e(r){if(i[r])return i[r].exports;var s=i[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,i){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,r=new Array(e);iparseInt(i.userAgent.split("Firefox/")[1],10),i.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],i.noop=function(){},i.supportsPassiveEvents=function(){let t=!1;if(!i.isMS){let e=Object.defineProperty({},"passive",{get:function(){t=!0}});i.win.addEventListener&&i.win.removeEventListener&&(i.win.addEventListener("testPassive",i.noop,e),i.win.removeEventListener("testPassive",i.noop,e))}return t}(),i.charts=[],i.composed=[],i.dateFormats={},i.seriesTypes={},i.symbolSizes={},i.chartCount=0,e})),i(e,"Core/Utilities.js",[e["Core/Globals.js"]],(function(t){let e,{charts:i,doc:r,win:s}=t;function n(e,i,r,o){let a=i?"Highcharts error":"Highcharts warning";32===e&&(e=`${a}: Deprecated member`);let l=d(e),c=l?`${a} #${e}: www.highcharts.com/errors/${e}/`:e.toString();if(void 0!==o){let t="";l&&(c+="?"),w(o,(function(e,i){t+=`\n - ${i}: ${e}`,l&&(c+=encodeURI(i)+"="+encodeURI(e))})),c+=t}C(t,"displayError",{chart:r,code:e,message:c,params:o},(function(){if(i)throw Error(c);s.console&&-1===n.messages.indexOf(c)&&console.warn(c)})),n.messages.push(c)}function o(t,e){return parseInt(t,e||10)}function a(t){return"string"==typeof t}function l(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function c(t,e){return!(!t||"object"!=typeof t||e&&l(t))}function h(t){return c(t)&&"number"==typeof t.nodeType}function u(t){let e=t&&t.constructor;return!(!c(t,!0)||h(t)||!e||!e.name||"Object"===e.name)}function d(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function p(t){return null!=t}function f(t,e,i){let r,s=a(e)&&!p(i),n=(e,i)=>{p(e)?t.setAttribute(i,e):s?(r=t.getAttribute(i))||"class"!==i||(r=t.getAttribute(i+"Name")):t.removeAttribute(i)};return a(e)?n(i,e):w(e,n),r}function m(t){return l(t)?t:[t]}function g(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function y(){let t=arguments,e=t.length;for(let i=0;i1e14?t:parseFloat(t.toPrecision(e||14))}(n||(n={})).messages=[],Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)};let b=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let i,r=t.length;for(i=0;it.order-e.order)),t.forEach((t=>{!1===t.fn.call(e,s)&&s.preventDefault()}))}n&&!s.defaultPrevented&&n.call(e,s)}w({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},(function(e,i){t[i]=function(t){return n(32,!1,void 0,{[`Highcharts.${i}`]:`use Array.${e}`}),Array.prototype[e].apply(t,[].slice.call(arguments,1))}}));let T=function(){let t=Math.random().toString(36).substring(2,9)+"-",i=0;return function(){return"highcharts-"+(e?"":t)+i++}}();return s.jQuery&&(s.jQuery.fn.highcharts=function(){let e=[].slice.call(arguments);if(this[0])return e[0]?(new(t[a(e[0])?e.shift():"Chart"])(this[0],e[0],e[1]),this):i[f(this[0],"data-highcharts-chart")]}),{addEvent:function(e,i,r,s={}){let n="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});let o=n.hcEvents;t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let a=e.addEventListener;a&&a.call(e,i,r,!!t.supportsPassiveEvents&&{passive:void 0===s.passive?-1!==i.indexOf("touch"):s.passive,capture:!1}),o[i]||(o[i]=[]);let l={fn:r,order:"number"==typeof s.order?s.order:1/0};return o[i].push(l),o[i].sort(((t,e)=>t.order-e.order)),function(){S(e,i,r)}},arrayMax:function(t){let e=t.length,i=t[0];for(;e--;)t[e]>i&&(i=t[e]);return i},arrayMin:function(t){let e=t.length,i=t[0];for(;e--;)t[e]e?t{let r=e%2/2,s=i?-1:1;return(Math.round(t*s-r)+r)*s},css:_,defined:p,destroyObjectProperties:function(t,e,i){w(t,(function(r,s){r!==e&&r?.destroy&&r.destroy(),(r?.destroy||!i)&&delete t[s]}))},diffObjects:function(t,e,i,r){let s={};return function t(e,s,n,o){let a=i?s:e;w(e,(function(i,h){if(!o&&r&&r.indexOf(h)>-1&&s[h]){i=m(i),n[h]=[];for(let e=0;e{if(t.length>1)for(n=r=t.length-1;n>0;n--)(s=t[n]-t[n-1])<0&&!o?(e?.(),e=void 0):s&&(void 0===i||s=i-1&&(i=Math.floor(r)),Math.max(0,i-(t(e,"padding-left",!0)||0)-(t(e,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(t(e,"padding-top",!0)||0)-(t(e,"padding-bottom",!0)||0));let a=s.getComputedStyle(e,void 0);return a&&(n=a.getPropertyValue(i),y(r,"opacity"!==i)&&(n=o(n))),n},inArray:function(t,e,i){return n(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),e.indexOf(t,i)},insertItem:function(t,e){let i,r=t.options.index,s=e.length;for(i=t.options.isInternal?s:0;i=t))&&(s||!(a<=(e[n]+(e[n+1]||e[n]))/2)));n++);return x(o*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:w,offset:function(t){let e=r.documentElement,i=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(s.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(s.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:i.width,height:i.height}},pad:function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||"0")+t},pick:y,pInt:o,pushUnique:function(t,e){return 0>t.indexOf(e)&&!!t.push(e)},relativeLength:function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},removeEvent:S,replaceNested:function(t,...e){let i,r;do{for(r of(i=t,e))t=t.replace(r[0],r[1])}while(t!==i);return t},splat:m,stableSort:function(t,e){let i,r,s=t.length;for(r=0;r0?setTimeout(t,e,i):(t.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:T,useSerialIds:function(t){return e=y(t,e)},wrap:function(t,e,i){let r=t[e];t[e]=function(){let t=arguments,e=this;return i.apply(this,[function(){return r.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}}})),i(e,"Core/Chart/ChartDefaults.js",[],(function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}})),i(e,"Core/Color/Palettes.js",[],(function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}})),i(e,"Core/Time.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e){let{win:i}=t,{defined:r,error:s,extend:n,isNumber:o,isObject:a,merge:l,objectEach:c,pad:h,pick:u,splat:d,timeUnits:p}=e,f=t.isSafari&&i.Intl&&i.Intl.DateTimeFormat.prototype.formatRange,m=t.isSafari&&i.Intl&&!i.Intl.DateTimeFormat.prototype.formatRange;class g{constructor(t){this.options={},this.useUTC=!1,this.variableTimezone=!1,this.Date=i.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(t)}get(t,e){if(this.variableTimezone||this.timezoneOffset){let i=e.getTime(),r=i-this.getTimezoneOffset(e);e.setTime(r);let s=e["getUTC"+t]();return e.setTime(i),s}return this.useUTC?e["getUTC"+t]():e["get"+t]()}set(t,e,i){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===t||"Seconds"===t||"Minutes"===t&&this.getTimezoneOffset(e)%36e5==0)return e["setUTC"+t](i);let r=this.getTimezoneOffset(e),s=e.getTime()-r;e.setTime(s),e["setUTC"+t](i);let n=this.getTimezoneOffset(e);return s=e.getTime()+n,e.setTime(s)}return this.useUTC||f&&"FullYear"===t?e["setUTC"+t](i):e["set"+t](i)}update(t={}){let e=u(t.useUTC,!0);this.options=t=l(!0,this.options,t),this.Date=t.Date||i.Date||Date,this.useUTC=e,this.timezoneOffset=e&&t.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=e&&!(!t.getTimezoneOffset&&!t.timezone)}makeTime(t,e,i,r,s,n){let o,a,l;return this.useUTC?(o=this.Date.UTC.apply(0,arguments),a=this.getTimezoneOffset(o),o+=a,a!==(l=this.getTimezoneOffset(o))?o+=l-a:a-36e5!==this.getTimezoneOffset(o-36e5)||m||(o-=36e5)):o=new this.Date(t,e,u(i,1),u(r,0),u(s,0),u(n,0)).getTime(),o}timezoneOffsetFunction(){let t=this,e=this.options,i=e.getTimezoneOffset;return this.useUTC?e.timezone?t=>{try{let i=`shortOffset,${e.timezone||""}`,[r,s,n,a,l=0]=(g.formatCache[i]=g.formatCache[i]||Intl.DateTimeFormat("en",{timeZone:e.timezone,timeZoneName:"shortOffset"})).format(t).split(/(GMT|:)/).map(Number),c=-36e5*(n+l/60);if(o(c))return c}catch(t){s(34)}return 0}:this.useUTC&&i?t=>6e4*i(t.valueOf()):()=>6e4*(t.timezoneOffset||0):t=>6e4*new Date(t.toString()).getTimezoneOffset()}dateFormat(e,i,s){if(!r(i)||isNaN(i))return t.defaultOptions.lang&&t.defaultOptions.lang.invalidDate||"";e=u(e,"%Y-%m-%d %H:%M:%S");let o=this,a=new this.Date(i),l=this.get("Hours",a),d=this.get("Day",a),p=this.get("Date",a),f=this.get("Month",a),m=this.get("FullYear",a),g=t.defaultOptions.lang,y=g&&g.weekdays,_=g&&g.shortWeekdays;return c(n({a:_?_[d]:y[d].substr(0,3),A:y[d],d:h(p),e:h(p,2," "),w:d,b:g.shortMonths[f],B:g.months[f],m:h(f+1),o:f+1,y:m.toString().substr(2,2),Y:m,H:h(l),k:l,I:h(l%12||12),l:l%12||12,M:h(this.get("Minutes",a)),p:l<12?"AM":"PM",P:l<12?"am":"pm",S:h(this.get("Seconds",a)),L:h(Math.floor(i%1e3),3)},t.dateFormats),(function(t,r){for(;-1!==e.indexOf("%"+r);)e=e.replace("%"+r,"function"==typeof t?t.call(o,i):t)})),s?e.substr(0,1).toUpperCase()+e.substr(1):e}resolveDTLFormat(t){return a(t,!0)?t:{main:(t=d(t))[0],from:t[1],to:t[2]}}getTimeTicks(t,e,i,s){let o,a,l,c,h=this,d=h.Date,f=[],m={},g=new d(e),y=t.unitRange,_=t.count||1;if(s=u(s,1),r(e)){h.set("Milliseconds",g,y>=p.second?0:_*Math.floor(h.get("Milliseconds",g)/_)),y>=p.second&&h.set("Seconds",g,y>=p.minute?0:_*Math.floor(h.get("Seconds",g)/_)),y>=p.minute&&h.set("Minutes",g,y>=p.hour?0:_*Math.floor(h.get("Minutes",g)/_)),y>=p.hour&&h.set("Hours",g,y>=p.day?0:_*Math.floor(h.get("Hours",g)/_)),y>=p.day&&h.set("Date",g,y>=p.month?1:Math.max(1,_*Math.floor(h.get("Date",g)/_))),y>=p.month&&(h.set("Month",g,y>=p.year?0:_*Math.floor(h.get("Month",g)/_)),a=h.get("FullYear",g)),y>=p.year&&(a-=a%_,h.set("FullYear",g,a)),y===p.week&&(c=h.get("Day",g),h.set("Date",g,h.get("Date",g)-c+s+(c4*p.month||h.getTimezoneOffset(e)!==h.getTimezoneOffset(i));let d=g.getTime();for(o=1;d1?d=h.makeTime(a,t,n,u+o*_):d+=y*_:d=h.makeTime(a,t,n+o*_*(y===p.day?1:7)),o++;f.push(d),y<=p.hour&&f.length<1e4&&f.forEach((function(t){t%18e5==0&&"000000000"===h.dateFormat("%H%M%S%L",t)&&(m[t]="day")}))}return f.info=n(t,{higherRanks:m,totalRange:y*_}),f}getDateFormat(t,e,i,r){let s=this.dateFormat("%m-%d %H:%M:%S.%L",e),n="01-01 00:00:00.000",o={millisecond:15,second:12,minute:9,hour:6,day:3},a="millisecond",l=a;for(a in p){if(t===p.week&&+this.dateFormat("%w",e)===i&&s.substr(6)===n.substr(6)){a="week";break}if(p[a]>t){a=l;break}if(o[a]&&s.substr(o[a])!==n.substr(o[a]))break;"week"!==a&&(l=a)}return this.resolveDTLFormat(r[a]).main}}return g.formatCache={},g})),i(e,"Core/Defaults.js",[e["Core/Chart/ChartDefaults.js"],e["Core/Globals.js"],e["Core/Color/Palettes.js"],e["Core/Time.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s){let{isTouchDevice:n}=e,{fireEvent:o,merge:a}=s,l={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:t,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:t=>Math.sqrt(1-Math.pow(t-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:n?25:10,headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};l.chart.styledMode=!1;let c=new r(l.time);return{defaultOptions:l,defaultTime:c,getOptions:function(){return l},setOptions:function(t){return o(e,"setOptions",{options:t}),a(!0,l,t),(t.time||t.global)&&(e.time?e.time.update(a(l.global,l.time,t.global,t.time)):e.time=c),l}}})),i(e,"Core/Color/Color.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e){let{isNumber:i,merge:r,pInt:s}=e;class n{static parse(t){return t?new n(t):n.None}constructor(e){let i,r,s,o;this.rgba=[NaN,NaN,NaN,NaN],this.input=e;let a=t.Color;if(a&&a!==n)return new a(e);if("object"==typeof e&&void 0!==e.stops)this.stops=e.stops.map((t=>new n(t[1])));else if("string"==typeof e){if(this.input=e=n.names[e.toLowerCase()]||e,"#"===e.charAt(0)){let t=e.length,i=parseInt(e.substr(1),16);7===t?r=[(16711680&i)>>16,(65280&i)>>8,255&i,1]:4===t&&(r=[(3840&i)>>4|(3840&i)>>8,(240&i)>>4|240&i,(15&i)<<4|15&i,1])}if(!r)for(s=n.parsers.length;s--&&!r;)(i=(o=n.parsers[s]).regex.exec(e))&&(r=o.parse(i))}r&&(this.rgba=r)}get(t){let e=this.input,s=this.rgba;if("object"==typeof e&&void 0!==this.stops){let i=r(e);return i.stops=[].slice.call(i.stops),this.stops.forEach(((e,r)=>{i.stops[r]=[i.stops[r][0],e.get(t)]})),i}return s&&i(s[0])?"rgb"===t||!t&&1===s[3]?"rgb("+s[0]+","+s[1]+","+s[2]+")":"a"===t?`${s[3]}`:"rgba("+s.join(",")+")":e}brighten(t){let e=this.rgba;if(this.stops)this.stops.forEach((function(e){e.brighten(t)}));else if(i(t)&&0!==t)for(let i=0;i<3;i++)e[i]+=s(255*t),e[i]<0&&(e[i]=0),e[i]>255&&(e[i]=255);return this}setOpacity(t){return this.rgba[3]=t,this}tweenTo(t,e){let r=this.rgba,s=t.rgba;if(!i(r[0])||!i(s[0]))return t.input||"none";let n=1!==s[3]||1!==r[3];return(n?"rgba(":"rgb(")+Math.round(s[0]+(r[0]-s[0])*(1-e))+","+Math.round(s[1]+(r[1]-s[1])*(1-e))+","+Math.round(s[2]+(r[2]-s[2])*(1-e))+(n?","+(s[3]+(r[3]-s[3])*(1-e)):"")+")"}}return n.names={white:"#ffffff",black:"#000000"},n.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(t){return[s(t[1]),s(t[2]),s(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(t){return[s(t[1]),s(t[2]),s(t[3]),1]}}],n.None=new n(""),n})),i(e,"Core/Animation/Fx.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i){let{parse:r}=t,{win:s}=e,{isNumber:n,objectEach:o}=i;class a{constructor(t,e,i){this.pos=NaN,this.options=e,this.elem=t,this.prop=i}dSetter(){let t=this.paths,e=t&&t[0],i=t&&t[1],r=this.now||0,s=[];if(1!==r&&e&&i)if(e.length===i.length&&r<1)for(let t=0;t=l+this.startTime?(this.now=this.end,this.pos=1,this.update(),c[this.prop]=!0,i=!0,o(c,(function(t){!0!==t&&(i=!1)})),i&&a&&a.call(n),e=!1):(this.pos=s.easing((r-this.startTime)/l),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e}initPath(t,e,i){let r,s,o,a,l=t.startX,c=t.endX,h=i.slice(),u=t.isArea,d=u?2:1,p=e&&i.length>e.length&&i.hasStackedCliffs,f=e&&e.slice();if(!f||p)return[h,h];function m(t,e){for(;t.length{let r=h(t.options.animation);a=o(e)&&i(e.defer)?s.defer:Math.max(a,r.duration+r.defer),l=Math.min(s.duration,r.duration)})),t.renderer.forExport&&(a=0),{defer:Math.max(0,a-l),duration:Math.min(a,l)}},setAnimation:function(t,e){e.renderer.globalAnimation=c(t,e.options.chart.animation,!0)},stop:u}})),i(e,"Core/Renderer/HTML/AST.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e){let{SVG_NS:i,win:r}=t,{attr:s,createElement:n,css:o,error:a,isFunction:l,isString:c,objectEach:h,splat:u}=e,{trustedTypes:d}=r,p=d&&l(d.createPolicy)&&d.createPolicy("highcharts",{createHTML:t=>t}),f=p?p.createHTML(""):"",m=function(){try{return!!(new DOMParser).parseFromString(f,"text/html")}catch(t){return!1}}();class g{static filterUserAttributes(t){return h(t,((e,i)=>{let r=!0;-1===g.allowedAttributes.indexOf(i)&&(r=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i)&&(r=c(e)&&g.allowedReferences.some((t=>0===e.indexOf(t)))),r||(a(33,!1,void 0,{"Invalid attribute in config":`${i}`}),delete t[i]),c(e)&&t[i]&&(t[i]=e.replace(/{let i=e.split(":").map((t=>t.trim())),r=i.shift();return r&&i.length&&(t[r.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))]=i.join(":")),t}),{})}static setElementHTML(t,e){t.innerHTML=g.emptyHTML,e&&new g(e).addToDOM(t)}constructor(t){this.nodes="string"==typeof t?this.parseMarkup(t):t}addToDOM(e){return function e(r,n){let l;return u(r).forEach((function(r){let c,u=r.tagName,d=r.textContent?t.doc.createTextNode(r.textContent):void 0,p=g.bypassHTMLFiltering;if(u)if("#text"===u)c=d;else if(-1!==g.allowedTags.indexOf(u)||p){let a="svg"===u?i:n.namespaceURI||i,l=t.doc.createElementNS(a,u),f=r.attributes||{};h(r,(function(t,e){"tagName"!==e&&"attributes"!==e&&"children"!==e&&"style"!==e&&"textContent"!==e&&(f[e]=t)})),s(l,p?f:g.filterUserAttributes(f)),r.style&&o(l,r.style),d&&l.appendChild(d),e(r.children||[],l),c=l}else a(33,!1,void 0,{"Invalid tagName in config":u});c&&n.appendChild(c),l=c})),l}(this.nodes,e)}parseMarkup(t){let e,i=[];if(t=t.trim().replace(/ style=(["'])/g," data-style=$1"),m)e=(new DOMParser).parseFromString(p?p.createHTML(t):t,"text/html");else{let i=n("div");i.innerHTML=t,e={body:i}}let r=(t,e)=>{let i=t.nodeName.toLowerCase(),s={tagName:i};"#text"===i&&(s.textContent=t.textContent||"");let n=t.attributes;if(n){let t={};[].forEach.call(n,(e=>{"data-style"===e.name?s.style=g.parseStyle(e.value):t[e.name]=e.value})),s.attributes=t}if(t.childNodes.length){let e=[];[].forEach.call(t.childNodes,(t=>{r(t,e)})),e.length&&(s.children=e)}e.push(s)};return[].forEach.call(e.body.childNodes,(t=>r(t,i))),i}}return g.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],g.allowedReferences=["https://","http://","mailto:","/","../","./","#"],g.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],g.emptyHTML=f,g.bypassHTMLFiltering=!1,g})),i(e,"Core/Templating.js",[e["Core/Defaults.js"],e["Core/Utilities.js"]],(function(t,e){let{defaultOptions:i,defaultTime:r}=t,{extend:s,getNestedProperty:n,isArray:o,isNumber:a,isObject:l,pick:c,pInt:h}=e,u={add:(t,e)=>t+e,divide:(t,e)=>0!==e?t/e:"",eq:(t,e)=>t==e,each:function(t){let e=arguments[arguments.length-1];return!!o(t)&&t.map(((i,r)=>d(e.body,s(l(i)?i:{"@this":i},{"@index":r,"@first":0===r,"@last":r===t.length-1})))).join("")},ge:(t,e)=>t>=e,gt:(t,e)=>t>e,if:t=>!!t,le:(t,e)=>t<=e,lt:(t,e)=>tt*e,ne:(t,e)=>t!=e,subtract:(t,e)=>t-e,unless:t=>!t};function d(t="",e,s){let o,a,l,h=/\{([\w\:\.\,;\-\/<>%@"'’= #\(\)]+)\}/g,f=/\(([\w\:\.\,;\-\/<>%@"'= ]+)\)/g,m=[],g=/f$/,y=/\.(\d)/,_=i.lang,v=s&&s.time||r,x=s&&s.numberFormatter||p,b=(t="")=>{let i;return"true"===t||"false"!==t&&((i=Number(t)).toString()===t?i:n(t,e))},w=0;for(;null!==(o=h.exec(t));){let i=f.exec(o[1]);i&&(o=i,l=!0),a&&a.isBlock||(a={ctx:e,expression:o[1],find:o[0],isBlock:"#"===o[1].charAt(0),start:o.index,startInner:o.index+o[0].length,length:o[0].length});let r=o[1].split(" ")[0].replace("#","");u[r]&&(a.isBlock&&r===a.fn&&w++,a.fn||(a.fn=r));let s="else"===o[1];if(a.isBlock&&a.fn&&(o[1]===`/${a.fn}`||s))if(w)!s&&w--;else{let e=a.startInner,i=t.substr(e,o.index-e);void 0===a.body?(a.body=i,a.startInner=o.index+o[0].length):a.elseBody=i,a.find+=i+o[0],s||(m.push(a),a=void 0)}else a.isBlock||m.push(a);if(i&&!a?.isBlock)break}return m.forEach((i=>{let r,n,{body:o,elseBody:a,expression:l,fn:h}=i;if(h){let t=[i],c=l.split(" ");for(n=u[h].length;n--;)t.unshift(b(c[n+1]));r=u[h].apply(e,t),i.isBlock&&"boolean"==typeof r&&(r=d(r?o:a,e,s))}else{let t=l.split(":");if(r=b(t.shift()||""),t.length&&"number"==typeof r){let e=t.join(":");if(g.test(e)){let t=parseInt((e.match(y)||["","-1"])[1],10);null!==r&&(r=x(r,t,_.decimalPoint,e.indexOf(",")>-1?_.thousandsSep:""))}else r=v.dateFormat(e,r)}}t=t.replace(i.find,c(r,""))})),l?d(t,e,s):t}function p(t,e,r,s){let n,o;t=+t||0,e=+e;let l=i.lang,u=(t.toString().split(".")[1]||"").split("e")[0].length,d=t.toString().split("e"),p=e;-1===e?e=Math.min(u,20):a(e)?e&&d[1]&&d[1]<0&&((o=e+ +d[1])>=0?(d[0]=(+d[0]).toExponential(o).split("e")[0],e=o):(d[0]=d[0].split(".")[0]||0,t=e<20?(d[0]*Math.pow(10,d[1])).toFixed(e):0,d[1]=0)):e=2;let f=(Math.abs(d[1]?d[0]:t)+Math.pow(10,-Math.max(e,u)-1)).toFixed(e),m=String(h(f)),g=m.length>3?m.length%3:0;return r=c(r,l.decimalPoint),s=c(s,l.thousandsSep),n=(t<0?"-":"")+(g?m.substr(0,g)+s:""),0>+d[1]&&!p?n="0":n+=m.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+s),e?n+=r+f.slice(-e):0==+n&&(n="0"),d[1]&&0!=+n&&(n+="e"+d[1]),n}return{dateFormat:function(t,e,i){return r.dateFormat(t,e,i)},format:d,helpers:u,numberFormat:p}})),i(e,"Core/Renderer/RendererRegistry.js",[e["Core/Globals.js"]],(function(t){var e,i;let r;return(i=e||(e={})).rendererTypes={},i.getRendererType=function(t=r){return i.rendererTypes[t]||i.rendererTypes[r]},i.registerRendererType=function(e,s,n){i.rendererTypes[e]=s,(!r||n)&&(r=e,t.Renderer=s)},e})),i(e,"Core/Renderer/RendererUtilities.js",[e["Core/Utilities.js"]],(function(t){var e;let{clamp:i,pick:r,pushUnique:s,stableSort:n}=t;return(e||(e={})).distribute=function t(e,o,a){let l,c,h,u,d,p,f=e,m=f.reducedLen||o,g=(t,e)=>t.target-e.target,y=[],_=e.length,v=[],x=y.push,b=!0,w=0;for(l=_;l--;)w+=e[l].size;if(w>m){for(n(e,((t,e)=>(e.rank||0)-(t.rank||0))),h=(p=e[0].rank===e[e.length-1].rank)?_/2:-1,c=p?h:_-1;h&&w>m;)u=e[l=Math.floor(c)],s(v,l)&&(w-=u.size),c+=h,p&&c>=e.length&&(h/=2,c=h);v.sort(((t,e)=>e-t)).forEach((t=>x.apply(y,e.splice(t,1))))}for(n(e,g),e=e.map((t=>({size:t.size,targets:[t.target],align:r(t.align,.5)})));b;){for(l=e.length;l--;)u=e[l],d=(Math.min.apply(0,u.targets)+Math.max.apply(0,u.targets))/2,u.pos=i(d-u.size*u.align,0,o-u.size);for(l=e.length,b=!1;l--;)l>0&&e[l-1].pos+e[l-1].size>e[l].pos&&(e[l-1].size+=e[l].size,e[l-1].targets=e[l-1].targets.concat(e[l].targets),e[l-1].align=.5,e[l-1].pos+e[l-1].size>o&&(e[l-1].pos=o-e[l-1].size),e.splice(l,1),b=!0)}return x.apply(f,y),l=0,e.some((e=>{let i=0;return(e.targets||[]).some((()=>(f[l].pos=e.pos+i,void 0!==a&&Math.abs(f[l].pos-f[l].target)>a?(f.slice(0,l+1).forEach((t=>delete t.pos)),f.reducedLen=(f.reducedLen||o)-.1*o,f.reducedLen>.1*o&&t(f,o,a),!0):(i+=f[l].size,l++,!1))))})),n(f,g),f},e})),i(e,"Core/Renderer/SVG/SVGElement.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{animate:s,animObject:n,stop:o}=t,{deg2rad:a,doc:l,svg:c,SVG_NS:h,win:u}=i,{addEvent:d,attr:p,createElement:f,crisp:m,css:g,defined:y,erase:_,extend:v,fireEvent:x,isArray:b,isFunction:w,isObject:S,isString:C,merge:T,objectEach:k,pick:E,pInt:A,pushUnique:M,replaceNested:P,syncTimeout:I,uniqueKey:L}=r;class D{_defaultGetter(t){let e=E(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0);return/^-?[\d\.]+$/.test(e)&&(e=parseFloat(e)),e}_defaultSetter(t,e,i){i.setAttribute(e,t)}add(t){let e,i=this.renderer,r=this.element;return t&&(this.parentGroup=t),void 0!==this.textStr&&"text"===this.element.nodeName&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(r),this.onAdd&&this.onAdd(),this}addClass(t,e){let i=e?"":this.attr("class")||"";return(t=(t||"").split(/ /g).reduce((function(t,e){return-1===i.indexOf(e)&&t.push(e),t}),i?[i]:[]).join(" "))!==i&&this.attr("class",t),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(t,e,i,r=!0){let s,n,o,a,l={},c=this.renderer,h=c.alignedObjects,u=!!t;t?(this.alignOptions=t,this.alignByTranslate=e,this.alignTo=i):(t=this.alignOptions||{},e=this.alignByTranslate,i=this.alignTo);let d=!i||C(i)?i||"renderer":void 0;d&&(u&&M(h,this),i=void 0);let p=E(i,c[d],c),f=t.align,m=t.verticalAlign;return s=(p.x||0)+(t.x||0),n=(p.y||0)+(t.y||0),"right"===f?o=1:"center"===f&&(o=2),o&&(s+=((p.width||0)-(t.width||0))/o),l[e?"translateX":"x"]=Math.round(s),"bottom"===m?a=1:"middle"===m&&(a=2),a&&(n+=((p.height||0)-(t.height||0))/a),l[e?"translateY":"y"]=Math.round(n),r&&(this[this.placed?"animate":"attr"](l),this.placed=!0),this.alignAttr=l,this}alignSetter(t){let e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))}animate(t,e,i){let r=n(E(e,this.renderer.globalAnimation,!0)),o=r.defer;return l.hidden&&(r.duration=0),0!==r.duration?(i&&(r.complete=i),I((()=>{this.element&&s(this,t,r)}),o)):(this.attr(t,void 0,i||r.complete),k(t,(function(t,e){r.step&&r.step.call(this,t,{prop:e,pos:1,elem:this})}),this)),this}applyTextOutline(t){let e=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));let r=t.split(" "),s=r[r.length-1],n=r[0];if(n&&"none"!==n&&i.svg){this.fakeTS=!0,n=n.replace(/(^[\d\.]+)(.*?)$/g,(function(t,e,i){return 2*Number(e)+i})),this.removeTextOutline();let t=l.createElementNS(h,"tspan");p(t,{class:"highcharts-text-outline",fill:s,stroke:s,"stroke-width":n,"stroke-linejoin":"round"});let i=e.querySelector("textPath")||e;[].forEach.call(i.childNodes,(e=>{let i=e.cloneNode(!0);i.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach((t=>i.removeAttribute(t))),t.appendChild(i)}));let r=0;[].forEach.call(i.querySelectorAll("text tspan"),(t=>{r+=Number(t.getAttribute("dy"))}));let o=l.createElementNS(h,"tspan");o.textContent="​",p(o,{x:Number(e.getAttribute("x")),dy:-r}),t.appendChild(o),i.insertBefore(t,i.firstChild)}}attr(t,e,i,r){let s,n,a,{element:l}=this,c=D.symbolCustomAttribs,h=this;return"string"==typeof t&&void 0!==e&&(s=t,(t={})[s]=e),"string"==typeof t?h=(this[t+"Getter"]||this._defaultGetter).call(this,t,l):(k(t,(function(e,i){a=!1,r||o(this,i),this.symbolName&&-1!==c.indexOf(i)&&(n||(this.symbolAttr(t),n=!0),a=!0),this.rotation&&("x"===i||"y"===i)&&(this.doTransform=!0),a||(this[i+"Setter"]||this._defaultSetter).call(this,e,i,l)}),this),this.afterSetters()),i&&i.call(this),h}clip(t){if(t&&!t.clipPath){let e=L()+"-",i=this.renderer.createElement("clipPath").attr({id:e}).add(this.renderer.defs);v(t,{clipPath:i,id:e,count:0}),t.add(i)}return this.attr("clip-path",t?`url(${this.renderer.url}#${t.id})`:"none")}crisp(t,e){e=Math.round(e||t.strokeWidth||0);let i=t.x||this.x||0,r=t.y||this.y||0,s=(t.width||this.width||0)+i,n=(t.height||this.height||0)+r,o=m(i,e),a=m(r,e);return v(t,{x:o,y:a,width:m(s,e)-o,height:m(n,e)-a}),y(t.strokeWidth)&&(t.strokeWidth=e),t}complexColor(t,i,r){let s,n,o,a,l,c,h,u,d,p,f,m=this.renderer,g=[];x(this.renderer,"complexColor",{args:arguments},(function(){if(t.radialGradient?n="radialGradient":t.linearGradient&&(n="linearGradient"),n){if(o=t[n],l=m.gradients,c=t.stops,d=r.radialReference,b(o)&&(t[n]=o={x1:o[0],y1:o[1],x2:o[2],y2:o[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===n&&d&&!y(o.gradientUnits)&&(a=o,o=T(o,m.getRadialAttr(d,a),{gradientUnits:"userSpaceOnUse"})),k(o,(function(t,e){"id"!==e&&g.push(e,t)})),k(c,(function(t){g.push(t)})),l[g=g.join(",")])p=l[g].attr("id");else{o.id=p=L();let t=l[g]=m.createElement(n).attr(o).add(m.defs);t.radAttr=a,t.stops=[],c.forEach((function(i){0===i[1].indexOf("rgba")?(h=(s=e.parse(i[1])).get("rgb"),u=s.get("a")):(h=i[1],u=1);let r=m.createElement("stop").attr({offset:i[0],"stop-color":h,"stop-opacity":u}).add(t);t.stops.push(r)}))}f="url("+m.url+"#"+p+")",r.setAttribute(i,f),r.gradient=g,t.toString=function(){return f}}}))}css(t){let e,i=this.styles,r={},s=this.element,n=!i;if(i&&k(t,(function(t,e){i&&i[e]!==t&&(r[e]=t,n=!0)})),n){i&&(t=v(i,r)),null===t.width||"auto"===t.width?delete this.textWidth:"text"===s.nodeName.toLowerCase()&&t.width&&(e=this.textWidth=A(t.width)),v(this.styles,t),e&&!c&&this.renderer.forExport&&delete t.width;let n=T(t);s.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach((t=>n&&delete n[t])),n.color&&(n.fill=n.color)),g(s,n)}return this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t.textOutline&&this.applyTextOutline(t.textOutline)),this}dashstyleSetter(t){let e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){let r=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=r.length;e--;)r[e]=""+A(r[e])*E(i,NaN);t=r.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}}destroy(){let t,e,i=this,r=i.element||{},s=i.renderer,n=r.ownerSVGElement,a="SPAN"===r.nodeName&&i.parentGroup||void 0;if(r.onclick=r.onmouseout=r.onmouseover=r.onmousemove=r.point=null,o(i),i.clipPath&&n){let t=i.clipPath;[].forEach.call(n.querySelectorAll("[clip-path],[CLIP-PATH]"),(function(e){e.getAttribute("clip-path").indexOf(t.element.id)>-1&&e.removeAttribute("clip-path")})),i.clipPath=t.destroy()}if(i.connector=i.connector?.destroy(),i.stops){for(e=0;ee&&e.join?(i?t+" ":"")+e.join(" "):(e||"").toString()),"")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),this[e]!==t&&(i.setAttribute(e,t),this[e]=t)}fillSetter(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)}hrefSetter(t,e,i){i.setAttributeNS("http://www.w3.org/1999/xlink",e,t)}getBBox(t,e){let i,r,s,n,{alignValue:o,element:a,renderer:l,styles:c,textStr:h}=this,{cache:u,cacheKeys:d}=l,p=a.namespaceURI===this.SVG_NS,f=E(e,this.rotation,0),m=l.styledMode?a&&D.prototype.getStyle.call(a,"font-size"):c.fontSize;if(y(h)&&(-1===(n=h.toString()).indexOf("<")&&(n=n.replace(/\d/g,"0")),n+=["",l.rootFontSize,m,f,this.textWidth,o,c.textOverflow,c.fontWeight].join(",")),n&&!t&&(i=u[n]),!i||i.polygon){if(p||l.forExport){try{s=this.fakeTS&&function(t){let e=a.querySelector(".highcharts-text-outline");e&&g(e,{display:t})},w(s)&&s("none"),i=a.getBBox?v({},a.getBBox()):{width:a.offsetWidth,height:a.offsetHeight,x:0,y:0},w(s)&&s("")}catch(t){}(!i||i.width<0)&&(i={x:0,y:0,width:0,height:0})}else i=this.htmlGetBBox();r=i.height,p&&(i.height=r={"11px,17":14,"13px,20":16}[`${m||""},${Math.round(r)}`]||r),f&&(i=this.getRotatedBox(i,f));let e={bBox:i};x(this,"afterGetBBox",e),i=e.bBox}if(n&&(""===h||i.height>0)){for(;d.length>250;)delete u[d.shift()];u[n]||d.push(n),u[n]=i}return i}getRotatedBox(t,e){let{x:i,y:r,width:s,height:n}=t,{alignValue:o,translateY:l,rotationOriginX:c=0,rotationOriginY:h=0}=this,u={right:1,center:.5}[o||0]||0,d=Number(this.element.getAttribute("y")||0)-(l?0:r),p=e*a,f=(e-90)*a,m=Math.cos(p),g=Math.sin(p),y=s*m,_=s*g,v=Math.cos(f),x=Math.sin(f),[[b,w],[S,C]]=[c,h].map((t=>[t-t*m,t*g])),T=i+u*(s-y)+b+C+d*v,k=T+y,E=k-n*v,A=E-y,M=r+d-u*_-w+S+d*x,P=M+_,I=P-n*x,L=I-_,D=Math.min(T,k,E,A),z=Math.min(M,P,I,L);return{x:D,y:z,width:Math.max(T,k,E,A)-D,height:Math.max(M,P,I,L)-z,polygon:[[T,M],[k,P],[E,I],[A,L]]}}getStyle(t){return u.getComputedStyle(this.element||this,"").getPropertyValue(t)}hasClass(t){return-1!==(""+this.attr("class")).split(" ").indexOf(t)}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(t,e){this.onEvents={},this.opacity=1,this.SVG_NS=h,this.element="span"===e||"body"===e?f(e):l.createElementNS(this.SVG_NS,e),this.renderer=t,this.styles={},x(this,"afterInit")}on(t,e){let{onEvents:i}=this;return i[t]&&i[t](),i[t]=d(this.element,t,e),this}opacitySetter(t,e,i){let r=Number(Number(t).toFixed(3));this.opacity=r,i.setAttribute(e,r)}reAlign(){this.alignOptions?.width&&"left"!==this.alignOptions.align&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(t){return this.attr("class",(""+this.attr("class")).replace(C(t)?RegExp(`(^| )${t}( |$)`):t," ").replace(/ +/g," ").trim())}removeTextOutline(){let t=this.element.querySelector("tspan.highcharts-text-outline");t&&this.safeRemoveChild(t)}safeRemoveChild(t){let e=t.parentNode;e&&e.removeChild(t)}setRadialReference(t){let e=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this}shadow(t){let{renderer:e}=this,i=T(90===this.parentGroup?.rotation?{offsetX:-1,offsetY:-1}:{},S(t)?t:{}),r=e.shadowDefinition(i);return this.attr({filter:t?`url(${e.url}#${r})`:"none"})}show(t=!0){return this.attr({visibility:t?"inherit":"visible"})}"stroke-widthSetter"(t,e,i){this[e]=t,i.setAttribute(e,t)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let t,e=this.getStyle("stroke-width"),i=0;return/px$/.test(e)?i=A(e):""!==e&&(p(t=l.createElementNS(h,"rect"),{width:e,"stroke-width":0}),this.element.parentNode.appendChild(t),i=t.getBBox().width,t.parentNode.removeChild(t)),i}symbolAttr(t){let e=this;D.symbolCustomAttribs.forEach((function(i){e[i]=E(t[i],e[i])})),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})}textSetter(t){t!==this.textStr&&(delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(t){let e=this.element,i=e.getElementsByTagName("title")[0]||l.createElementNS(this.SVG_NS,"title");e.insertBefore?e.insertBefore(i,e.firstChild):e.appendChild(i),i.textContent=P(E(t,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let t=this.element;return t.parentNode.appendChild(t),this}translate(t,e){return this.attr({translateX:t,translateY:e})}updateTransform(t="transform"){let{element:e,matrix:i,rotation:r=0,rotationOriginX:s,rotationOriginY:n,scaleX:o,scaleY:a,translateX:l=0,translateY:c=0}=this,h=["translate("+l+","+c+")"];y(i)&&h.push("matrix("+i.join(",")+")"),r&&(h.push("rotate("+r+" "+E(s,e.getAttribute("x"),0)+" "+E(n,e.getAttribute("y")||0)+")"),"SPAN"===this.text?.element.tagName&&this.text.attr({rotation:r,rotationOriginX:(s||0)-this.padding,rotationOriginY:(n||0)-this.padding})),(y(o)||y(a))&&h.push("scale("+E(o,1)+" "+E(a,1)+")"),h.length&&!(this.text||this).textPath&&e.setAttribute(t,h.join(" "))}visibilitySetter(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t}xGetter(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)}zIndexSetter(t,e){let i,r,s,n,o,a=this.renderer,l=this.parentGroup,c=(l||a).element||a.box,h=this.element,u=c===a.box,d=!1,p=this.added;if(y(t)?(h.setAttribute("data-z-index",t),t=+t,this[e]===t&&(p=!1)):y(this[e])&&h.removeAttribute("data-z-index"),this[e]=t,p){for((t=this.zIndex)&&l&&(l.handleZ=!0),o=(i=c.childNodes).length-1;o>=0&&!d;o--)n=!y(s=(r=i[o]).getAttribute("data-z-index")),r!==h&&(t<0&&n&&!u&&!o?(c.insertBefore(h,i[o]),d=!0):(A(s)<=t||n&&(!y(t)||t>=0))&&(c.insertBefore(h,i[o+1]),d=!0));d||(c.insertBefore(h,i[u?3:0]),d=!0)}return d}}return D.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],D.prototype.strokeSetter=D.prototype.fillSetter,D.prototype.yGetter=D.prototype.xGetter,D.prototype.matrixSetter=D.prototype.rotationOriginXSetter=D.prototype.rotationOriginYSetter=D.prototype.rotationSetter=D.prototype.scaleXSetter=D.prototype.scaleYSetter=D.prototype.translateXSetter=D.prototype.translateYSetter=D.prototype.verticalAlignSetter=function(t,e){this[e]=t,this.doTransform=!0},D})),i(e,"Core/Renderer/SVG/SVGLabel.js",[e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t,e){let{defined:i,extend:r,isNumber:s,merge:n,pick:o,removeEvent:a}=e;class l extends t{constructor(t,e,i,r,s,n,o,a,c,h){let u;super(t,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=!1,this.textStr=e,this.x=i,this.y=r,this.anchorX=n,this.anchorY=o,this.baseline=c,this.className=h,this.addClass("button"===h?"highcharts-no-tooltip":"highcharts-label"),h&&this.addClass("highcharts-"+h),this.text=t.text(void 0,0,0,a).attr({zIndex:1}),"string"==typeof s&&((u=/^url\((.*?)\)$/.test(s))||this.renderer.symbols[s])&&(this.symbolKey=s),this.bBox=l.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=t.styledMode||u,this.deferredAttr={},this.alignFactor=0}alignSetter(t){let e={left:0,center:.5,right:1}[t];e!==this.alignFactor&&(this.alignFactor=e,this.bBox&&s(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(t,e){this.anchorX=t,this.boxAttr(e,Math.round(t)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(t,e){this.anchorY=t,this.boxAttr(e,t-this.ySetting)}boxAttr(t,e){this.box?this.box.attr(t,e):this.deferredAttr[t]=e}css(e){if(e){let t={};e=n(e),l.textProps.forEach((i=>{void 0!==e[i]&&(t[i]=e[i],delete e[i])})),this.text.css(t),"fontSize"in t||"fontWeight"in t?this.updateTextPadding():("width"in t||"textOverflow"in t)&&this.updateBoxSize()}return t.prototype.css.call(this,e)}destroy(){a(this.element,"mouseenter"),a(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),t.prototype.destroy.call(this)}fillSetter(t,e){t&&(this.needsBox=!0),this.fill=t,this.boxAttr(e,t)}getBBox(t,e){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();let{padding:i,height:r=0,translateX:s=0,translateY:n=0,width:a=0}=this,l=o(this.paddingLeft,i),c=e??(this.rotation||0),h={width:a,height:r,x:s+this.bBox.x-l,y:n+this.bBox.y-i+this.baselineOffset};return c&&(h=this.getRotatedBox(h,c)),h}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(t){this.heightSetting=t,this.doUpdate=!0}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=!1)}onAdd(){this.text.add(this),this.attr({text:o(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&i(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(t,e){s(t)?t!==this[e]&&(this[e]=t,this.updateTextPadding()):this[e]=void 0}rSetter(t,e){this.boxAttr(e,t)}strokeSetter(t,e){this.stroke=t,this.boxAttr(e,t)}"stroke-widthSetter"(t,e){t&&(this.needsBox=!0),this["stroke-width"]=t,this.boxAttr(e,t)}"text-alignSetter"(t){this.textAlign=t}textSetter(t){void 0!==t&&this.text.attr({text:t}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let t,e=this.text,n={},o=this.padding,a=this.bBox=s(this.widthSetting)&&s(this.heightSetting)&&!this.textAlign||!i(e.textStr)?l.emptyBBox:e.getBBox(void 0,0);this.width=this.getPaddedWidth(),this.height=(this.heightSetting||a.height||0)+2*o;let c=this.renderer.fontMetrics(e);if(this.baselineOffset=o+Math.min((this.text.firstLineMetrics||c).b,a.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-c.h)/2),this.needsBox&&!e.textPath){if(!this.box){let t=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();t.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),t.add(this)}t=this.getCrispAdjust(),n.x=t,n.y=(this.baseline?-this.baselineOffset:0)+t,n.width=Math.round(this.width),n.height=Math.round(this.height),this.box.attr(r(n,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let t=this.text;if(!t.textPath){this.updateBoxSize();let e=this.baseline?0:this.baselineOffset,r=o(this.paddingLeft,this.padding);i(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(r+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),(r!==t.x||e!==t.y)&&(t.attr("x",r),t.hasBoxWidthChanged&&(this.bBox=t.getBBox(!0)),void 0!==e&&t.attr("y",e)),t.x=r,t.y=e}}widthSetter(t){this.widthSetting=s(t)?t:void 0,this.doUpdate=!0}getPaddedWidth(){let t=this.padding,e=o(this.paddingLeft,t),i=o(this.paddingRight,t);return(this.widthSetting||this.bBox.width||0)+e+i}xSetter(t){this.x=t,this.alignFactor&&(t-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(t),this.attr("translateX",this.xSetting)}ySetter(t){this.ySetting=this.y=Math.round(t),this.attr("translateY",this.ySetting)}}return l.emptyBBox={width:0,height:0,x:0,y:0},l.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],l})),i(e,"Core/Renderer/SVG/Symbols.js",[e["Core/Utilities.js"]],(function(t){let{defined:e,isNumber:i,pick:r}=t;function s(t,i,s,n,o){let a=[];if(o){let l=o.start||0,c=r(o.r,s),h=r(o.r,n||s),u=2e-4/Math.max(c,1),d=Math.abs((o.end||0)-l-2*Math.PI)0&&h0)return u;if(t+c>r-l)if(h>e+l&&he+l&&h0){let i=hs&&cl&&u.splice(1,1,["L",c-6,e],["L",c,e-6],["L",c+6,e],["L",r-a,e]);return u},circle:function(t,e,i,r){return s(t+i/2,e+r/2,i/2,r/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(t,e,i,r){return[["M",t+i/2,e],["L",t+i,e+r/2],["L",t+i/2,e+r],["L",t,e+r/2],["Z"]]},rect:n,roundedRect:o,square:n,triangle:function(t,e,i,r){return[["M",t+i/2,e],["L",t+i,e+r],["L",t,e+r],["Z"]]},"triangle-down":function(t,e,i,r){return[["M",t,e],["L",t+i,e],["L",t+i/2,e+r],["Z"]]}}})),i(e,"Core/Renderer/SVG/TextBuilder.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i){let{doc:r,SVG_NS:s,win:n}=e,{attr:o,extend:a,fireEvent:l,isString:c,objectEach:h,pick:u}=i;return class{constructor(t){let e=t.styles;this.renderer=t.renderer,this.svgElement=t,this.width=t.textWidth,this.textLineHeight=e&&e.lineHeight,this.textOutline=e&&e.textOutline,this.ellipsis=!(!e||"ellipsis"!==e.textOverflow),this.noWrap=!(!e||"nowrap"!==e.whiteSpace)}buildSVG(){let e=this.svgElement,i=e.element,s=e.renderer,n=u(e.textStr,"").toString(),o=-1!==n.indexOf("<"),a=i.childNodes,l=!e.added&&s.box,h=[n,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,e.getStyle("font-size"),this.width].join(",");if(h!==e.textCache){e.textCache=h,delete e.actualWidth;for(let t=a.length;t--;)i.removeChild(a[t]);if(o||this.ellipsis||this.width||e.textPath||-1!==n.indexOf(" ")&&(!this.noWrap||//g.test(n))){if(""!==n){l&&l.appendChild(i);let r=new t(n);this.modifyTree(r.nodes),r.addToDOM(i),this.modifyDOM(),this.ellipsis&&-1!==(i.textContent||"").indexOf("…")&&e.attr("title",this.unescapeEntities(e.textStr||"",["<",">"])),l&&l.removeChild(i)}}else i.appendChild(r.createTextNode(this.unescapeEntities(n)));c(this.textOutline)&&e.applyTextOutline&&e.applyTextOutline(this.textOutline)}}modifyDOM(){let t,e=this.svgElement,i=o(e.element,"x");for(e.firstLineMetrics=void 0;(t=e.element.firstChild)&&/^[\s\u200B]*$/.test(t.textContent||" ");)e.element.removeChild(t);[].forEach.call(e.element.querySelectorAll("tspan.highcharts-br"),((t,r)=>{t.nextSibling&&t.previousSibling&&(0===r&&1===t.previousSibling.nodeType&&(e.firstLineMetrics=e.renderer.fontMetrics(t.previousSibling)),o(t,{dy:this.getLineHeight(t.nextSibling),x:i}))}));let a=this.width||0;if(!a)return;let l=(t,n)=>{let l=t.textContent||"",c=l.replace(/([^\^])-/g,"$1- ").split(" "),h=!this.noWrap&&(c.length>1||e.element.childNodes.length>1),u=this.getLineHeight(n),d=0,p=e.actualWidth;if(this.ellipsis)l&&this.truncate(t,l,void 0,0,Math.max(0,a-.8*u),((t,e)=>t.substring(0,e)+"…"));else if(h){let l=[],h=[];for(;n.firstChild&&n.firstChild!==t;)h.push(n.firstChild),n.removeChild(n.firstChild);for(;c.length;)c.length&&!this.noWrap&&d>0&&(l.push(t.textContent||""),t.textContent=c.join(" ").replace(/- /g,"-")),this.truncate(t,void 0,c,0===d&&p||0,a,((t,e)=>c.slice(0,e).join(" ").replace(/- /g,"-"))),p=e.actualWidth,d++;h.forEach((e=>{n.insertBefore(e,t)})),l.forEach((e=>{n.insertBefore(r.createTextNode(e),t);let a=r.createElementNS(s,"tspan");a.textContent="​",o(a,{dy:u,x:i}),n.insertBefore(a,t)}))}},c=t=>{[].slice.call(t.childNodes).forEach((i=>{i.nodeType===n.Node.TEXT_NODE?l(i,t):(-1!==i.className.baseVal.indexOf("highcharts-br")&&(e.actualWidth=0),c(i))}))};c(e.element)}getLineHeight(t){let e=t.nodeType===n.Node.TEXT_NODE?t.parentElement:t;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e||this.svgElement.element).h}modifyTree(t){let e=(i,r)=>{let{attributes:s={},children:n,style:o={},tagName:l}=i,c=this.renderer.styledMode;if("b"===l||"strong"===l?c?s.class="highcharts-strong":o.fontWeight="bold":("i"===l||"em"===l)&&(c?s.class="highcharts-emphasized":o.fontStyle="italic"),o&&o.color&&(o.fill=o.color),"br"===l){s.class="highcharts-br",i.textContent="​";let e=t[r+1];e&&e.textContent&&(e.textContent=e.textContent.replace(/^ +/gm,""))}else"a"===l&&n&&n.some((t=>"#text"===t.tagName))&&(i.children=[{children:n,tagName:"tspan"}]);"#text"!==l&&"a"!==l&&(i.tagName="tspan"),a(i,{attributes:s,style:o}),n&&n.filter((t=>"#text"!==t.tagName)).forEach(e)};t.forEach(e),l(this.svgElement,"afterModifyTree",{nodes:t})}truncate(t,e,i,r,s,n){let o,a,l=this.svgElement,{rotation:c}=l,h=[],u=i?1:0,d=(e||i||"").length,p=d,f=function(e,s){let n=s||e,o=t.parentNode;if(o&&void 0===h[n]&&o.getSubStringLength)try{h[n]=r+o.getSubStringLength(0,i?n+1:n)}catch(t){}return h[n]};if(l.rotation=0,r+(a=f(t.textContent.length))>s){for(;u<=d;)p=Math.ceil((u+d)/2),i&&(o=n(i,p)),a=f(p,o&&o.length-1),u===d?u=d+1:a>s?d=p-1:u=p;0===d?t.textContent="":e&&d===e.length-1||(t.textContent=o||n(e||i,p))}i&&i.splice(0,p),l.actualWidth=a,l.rotation=c}unescapeEntities(t,e){return h(this.renderer.escapes,(function(i,r){e&&-1!==e.indexOf(i)||(t=t.toString().replace(RegExp(i,"g"),r))})),t}}})),i(e,"Core/Renderer/SVG/SVGRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Defaults.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGLabel.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Renderer/SVG/TextBuilder.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a,l,c){let h,{defaultOptions:u}=e,{charts:d,deg2rad:p,doc:f,isFirefox:m,isMS:g,isWebKit:y,noop:_,SVG_NS:v,symbolSizes:x,win:b}=r,{addEvent:w,attr:S,createElement:C,crisp:T,css:k,defined:E,destroyObjectProperties:A,extend:M,isArray:P,isNumber:I,isObject:L,isString:D,merge:z,pick:O,pInt:R,replaceNested:N,uniqueKey:B}=c;class F{constructor(t,e,i,r,s,n,o){let a,l,c=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),h=c.element;o||c.css(this.getStyle(r||{})),t.appendChild(h),S(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&S(h,"xmlns",this.SVG_NS),this.box=h,this.boxWrapper=c,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 11.4.6")),this.defs=this.createElement("defs").add(),this.allowHTML=n,this.forExport=s,this.styledMode=o,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=c.getStyle("font-size"),this.setSize(e,i,!1),m&&t.getBoundingClientRect&&((a=function(){k(t,{left:0,top:0}),l=t.getBoundingClientRect(),k(t,{left:Math.ceil(l.left)-l.left+"px",top:Math.ceil(l.top)-l.top+"px"})})(),this.unSubPixelFix=w(b,"resize",a))}definition(e){return new t([e]).addToDOM(this.defs.element)}getReferenceURL(){if((m||y)&&f.getElementsByTagName("base").length){if(!E(h)){let e=B(),i=new t([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:e},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${e})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(f.body);k(i,{position:"fixed",top:0,left:0,zIndex:9e5});let r=f.elementFromPoint(6,6);h="hitme"===(r&&r.id),f.body.removeChild(i)}if(h)return N(b.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(t){return this.style=M({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},t),this.style}setStyle(t){this.boxWrapper.css(this.getStyle(t))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),A(this.gradients||{}),this.gradients=null,this.defs=t.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(t){return new this.Element(this,t)}getRadialAttr(t,e){return{cx:t[0]-t[2]/2+(e.cx||0)*t[2],cy:t[1]-t[2]/2+(e.cy||0)*t[2],r:(e.r||0)*t[2]}}shadowDefinition(t){let e=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(t).map((e=>`${e}-${t[e]}`))].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),i=z({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},t);return this.defs.element.querySelector(`#${e}`)||this.definition({tagName:"filter",attributes:{id:e,filterUnits:i.filterUnits},children:this.getShadowFilterContent(i)}),e}getShadowFilterContent(t){return[{tagName:"feDropShadow",attributes:{dx:t.offsetX,dy:t.offsetY,"flood-color":t.color,"flood-opacity":Math.min(5*t.opacity,1),stdDeviation:t.width/2}}]}buildText(t){new l(t).buildSVG()}getContrast(t){let e=i.parse(t).rgba.map((t=>{let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),r=.2126*e[0]+.7152*e[1]+.0722*e[2];return 1.05/(r+.05)>(r+.05)/.05?"#FFFFFF":"#000000"}button(e,i,r,s,n={},o,a,l,c,h){let d=this.label(e,i,r,c,void 0,void 0,h,void 0,"button"),p=this.styledMode,f=arguments,m=0;n=z(u.global.buttonTheme,n),p&&(delete n.fill,delete n.stroke,delete n["stroke-width"]);let y=n.states||{},_=n.style||{};delete n.states,delete n.style;let v=[t.filterUserAttributes(n)],x=[_];return p||["hover","select","disabled"].forEach(((e,i)=>{v.push(z(v[0],t.filterUserAttributes(f[i+5]||y[e]||{}))),x.push(v[i+1].style),delete v[i+1].style})),w(d.element,g?"mouseover":"mouseenter",(function(){3!==m&&d.setState(1)})),w(d.element,g?"mouseout":"mouseleave",(function(){3!==m&&d.setState(m)})),d.setState=(t=0)=>{if(1!==t&&(d.state=m=t),d.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t]),!p){d.attr(v[t]);let e=x[t];L(e)&&d.css(e)}},d.attr(v[0]),!p&&(d.css(M({cursor:"default"},_)),h&&d.text.css({pointerEvents:"none"})),d.on("touchstart",(t=>t.stopPropagation())).on("click",(function(t){3!==m&&s.call(d,t)}))}crispLine(t,e){let[i,r]=t;return E(i[1])&&i[1]===r[1]&&(i[1]=r[1]=T(i[1],e)),E(i[2])&&i[2]===r[2]&&(i[2]=r[2]=T(i[2],e)),t}path(t){let e=this.styledMode?{}:{fill:"none"};return P(t)?e.d=t:L(t)&&M(e,t),this.createElement("path").attr(e)}circle(t,e,i){let r=L(t)?t:void 0===t?{}:{x:t,y:e,r:i},s=this.createElement("circle");return s.xSetter=s.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},s.attr(r)}arc(t,e,i,r,s,n){let o;L(t)?(e=(o=t).y,i=o.r,r=o.innerR,s=o.start,n=o.end,t=o.x):o={innerR:r,start:s,end:n};let a=this.symbol("arc",t,e,i,i,o);return a.r=i,a}rect(t,e,i,r,s,n){let o=L(t)?t:void 0===t?{}:{x:t,y:e,r:s,width:Math.max(i||0,0),height:Math.max(r||0,0)},a=this.createElement("rect");return this.styledMode||(void 0!==n&&(o["stroke-width"]=n,M(o,a.crisp(o))),o.fill="none"),a.rSetter=function(t,e,i){a.r=t,S(i,{rx:t,ry:t})},a.rGetter=function(){return a.r||0},a.attr(o)}roundedRect(t){return this.symbol("roundedRect").attr(t)}setSize(t,e,i){this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:O(i,!0)?void 0:0}),this.alignElements()}g(t){let e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e}image(t,e,i,r,s,n){let o={preserveAspectRatio:"none"};I(e)&&(o.x=e),I(i)&&(o.y=i),I(r)&&(o.width=r),I(s)&&(o.height=s);let a=this.createElement("image").attr(o),l=function(e){a.attr({href:t}),n.call(a,e)};if(n){a.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let e=new b.Image;w(e,"load",l),e.src=t,e.complete&&l({})}else a.attr({href:t});return a}symbol(t,e,i,r,s,n){let o,a,l,c,h=this,u=/^url\((.*?)\)$/,p=u.test(t),m=!p&&(this.symbols[t]?t:"circle"),g=m&&this.symbols[m];if(g)"number"==typeof e&&(a=g.call(this.symbols,e||0,i||0,r||0,s||0,n)),o=this.path(a),h.styledMode||o.attr("fill","none"),M(o,{symbolName:m||void 0,x:e,y:i,width:r,height:s}),n&&M(o,n);else if(p){l=t.match(u)[1];let r=o=this.image(l);r.imgwidth=O(n&&n.width,x[l]&&x[l].width),r.imgheight=O(n&&n.height,x[l]&&x[l].height),c=t=>t.attr({width:t.width,height:t.height}),["width","height"].forEach((t=>{r[`${t}Setter`]=function(t,e){this[e]=t;let{alignByTranslate:i,element:r,width:s,height:o,imgwidth:a,imgheight:l}=this,c="width"===e?a:l,h=1;n&&"within"===n.backgroundSize&&s&&o&&a&&l?(h=Math.min(s/a,o/l),S(r,{width:Math.round(a*h),height:Math.round(l*h)})):r&&c&&r.setAttribute(e,c),!i&&a&&l&&this.translate(((s||0)-a*h)/2,((o||0)-l*h)/2)}})),E(e)&&r.attr({x:e,y:i}),r.isImg=!0,E(r.imgwidth)&&E(r.imgheight)?c(r):(r.attr({width:0,height:0}),C("img",{onload:function(){let t=d[h.chartIndex];0===this.width&&(k(this,{position:"absolute",top:"-999em"}),f.body.appendChild(this)),x[l]={width:this.width,height:this.height},r.imgwidth=this.width,r.imgheight=this.height,r.element&&c(r),this.parentNode&&this.parentNode.removeChild(this),h.imgCount--,h.imgCount||!t||t.hasLoaded||t.onload()},src:l}),this.imgCount++)}return o}clipRect(t,e,i,r){return this.rect(t,e,i,r,0)}text(t,e,i,r){let s={};if(r&&(this.allowHTML||!this.forExport))return this.html(t,e,i);s.x=Math.round(e||0),i&&(s.y=Math.round(i)),E(t)&&(s.text=t);let n=this.createElement("text").attr(s);return r&&(!this.forExport||this.allowHTML)||(n.xSetter=function(t,e,i){let r=i.getElementsByTagName("tspan"),s=i.getAttribute(e);for(let i,n=0;nt.align()))}}return M(F.prototype,{Element:n,SVG_NS:v,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:a,draw:_}),s.registerRendererType("svg",F,!0),F})),i(e,"Core/Renderer/HTML/HTMLElement.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{composed:s}=e,{attr:n,css:o,createElement:a,defined:l,extend:c,pInt:h,pushUnique:u}=r;function d(t,e,r){let s=this.div?.style||r.style;i.prototype[`${e}Setter`].call(this,t,e,r),s&&(s[e]=t)}let p=(t,e)=>{if(!t.div){let r=n(t.element,"class"),s=t.css,o=a("div",r?{className:r}:void 0,{position:"absolute",left:`${t.translateX||0}px`,top:`${t.translateY||0}px`,...t.styles,display:t.display,opacity:t.opacity,visibility:t.visibility},t.parentGroup?.div||e);t.classSetter=(t,e,i)=>{i.setAttribute("class",t),o.className=t},t.translateXSetter=t.translateYSetter=(e,i)=>{t[i]=e,o.style["translateX"===i?"left":"top"]=`${e}px`,t.doTransform=!0},t.opacitySetter=t.visibilitySetter=d,t.css=e=>(s.call(t,e),e.cursor&&(o.style.cursor=e.cursor),e.pointerEvents&&(o.style.pointerEvents=e.pointerEvents),t),t.on=function(){return i.prototype.on.apply({element:o,onEvents:t.onEvents},arguments),t},t.div=o}return t.div};class f extends i{static compose(t){u(s,this.compose)&&(t.prototype.html=function(t,e,i){return new f(this,"span").attr({text:t,x:Math.round(e),y:Math.round(i)})})}constructor(t,e){super(t,e),this.css({position:"absolute",...t.styledMode?{}:{fontFamily:t.style.fontFamily,fontSize:t.style.fontSize}}),this.element.style.whiteSpace="nowrap"}getSpanCorrection(t,e,i){this.xCorr=-t*i,this.yCorr=-e}css(t){let e,{element:i}=this,r="SPAN"===i.tagName&&t&&"width"in t,s=r&&t.width;return r&&(delete t.width,this.textWidth=h(s)||void 0,e=!0),"ellipsis"===t?.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),c(this.styles,t),o(i,t),e&&this.updateTransform(),this}htmlGetBBox(){let{element:t}=this;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}updateTransform(){if(!this.added)return void(this.alignOnAdd=!0);let{element:t,renderer:e,rotation:i,rotationOriginX:r,rotationOriginY:s,styles:n,textAlign:a="left",textWidth:c,translateX:h=0,translateY:u=0,x:d=0,y:p=0}=this,f={left:0,center:.5,right:1}[a],m=n.whiteSpace;if(o(t,{marginLeft:`${h}px`,marginTop:`${u}px`}),"SPAN"===t.tagName){let n,h=[i,a,t.innerHTML,c,this.textAlign].join(","),u=-1*this.parentGroup?.padding||0,g=!1;if(c!==this.oldTextWidth){let e=this.textPxLength?this.textPxLength:(o(t,{width:"",whiteSpace:m||"nowrap"}),t.offsetWidth),r=c||0;(r>this.oldTextWidth||e>r)&&(/[ \-]/.test(t.textContent||t.innerText)||"ellipsis"===t.style.textOverflow)&&(o(t,{width:e>r||i?c+"px":"auto",display:"block",whiteSpace:m||"normal"}),this.oldTextWidth=c,g=!0)}this.hasBoxWidthChanged=g,h!==this.cTT&&(n=e.fontMetrics(t).b,l(i)&&(i!==(this.oldRotation||0)||a!==this.oldAlign)&&this.setSpanRotation(i,u,u),this.getSpanCorrection(!l(i)&&this.textPxLength||t.offsetWidth,n,f));let{xCorr:y=0,yCorr:_=0}=this;o(t,{left:`${d+y}px`,top:`${p+_}px`,transformOrigin:`${(r??d)-y-d-u}px ${(s??p)-_-p-u}px`}),this.cTT=h,this.oldRotation=i,this.oldAlign=a}}setSpanRotation(t,e,i){o(this.element,{transform:`rotate(${t}deg)`,transformOrigin:`${e}% ${i}px`})}add(t){let e,i=this.renderer.box.parentNode,r=[];if(this.parentGroup=t,t&&!(e=t.div)){let s=t;for(;s;)r.push(s),s=s.parentGroup;for(let t of r.reverse())e=p(t,i)}return(e||i).appendChild(this.element),this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,t.setElementHTML(this.element,e??""),this.textStr=e,this.doTransform=!0)}alignSetter(t){this.alignValue=this.textAlign=t,this.doTransform=!0}xSetter(t,e){this[e]=t,this.doTransform=!0}}let m=f.prototype;return m.visibilitySetter=m.opacitySetter=d,m.ySetter=m.rotationSetter=m.rotationOriginXSetter=m.rotationOriginYSetter=m.xSetter,f})),i(e,"Core/Axis/AxisDefaults.js",[],(function(){var t,e;return(e=t||(t={})).xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},e.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:t}=this.axis.chart;return t(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},t})),i(e,"Core/Foundation.js",[e["Core/Utilities.js"]],(function(t){var e;let{addEvent:i,isFunction:r,objectEach:s,removeEvent:n}=t;return(e||(e={})).registerEventOptions=function(t,e){t.eventOptions=t.eventOptions||{},s(e.events,(function(e,s){t.eventOptions[s]!==e&&(t.eventOptions[s]&&(n(t,s,t.eventOptions[s]),delete t.eventOptions[s]),r(e)&&(t.eventOptions[s]=e,i(t,s,e,{order:0})))}))},e})),i(e,"Core/Axis/Tick.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i){let{deg2rad:r}=e,{clamp:s,correctFloat:n,defined:o,destroyObjectProperties:a,extend:l,fireEvent:c,isNumber:h,merge:u,objectEach:d,pick:p}=i;return class{constructor(t,e,i,r,s){this.isNew=!0,this.isNewLabel=!0,this.axis=t,this.pos=e,this.type=i||"",this.parameters=s||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,c(this,"init"),i||r||this.addLabel()}addLabel(){let e,i,r,s=this,a=s.axis,u=a.options,d=a.chart,f=a.categories,m=a.logarithmic,g=a.names,y=s.pos,_=p(s.options&&s.options.labels,u.labels),v=a.tickPositions,x=y===v[0],b=y===v[v.length-1],w=(!_.step||1===_.step)&&1===a.tickInterval,S=v.info,C=s.label,T=this.parameters.category||(f?p(f[y],g[y],y):y);m&&h(T)&&(T=n(m.lin2log(T))),a.dateTime&&(S?e=(i=d.time.resolveDTLFormat(u.dateTimeLabelFormats[!u.grid&&S.higherRanks[y]||S.unitName])).main:h(T)&&(e=a.dateTime.getXDateFormat(T,u.dateTimeLabelFormats||{}))),s.isFirst=x,s.isLast=b;let k={axis:a,chart:d,dateTimeLabelFormat:e,isFirst:x,isLast:b,pos:y,tick:s,tickPositionInfo:S,value:T};c(this,"labelFormat",k);let E=e=>_.formatter?_.formatter.call(e,e):_.format?(e.text=a.defaultLabelFormatter.call(e),t.format(_.format,e,d)):a.defaultLabelFormatter.call(e),A=E.call(k,k),M=i&&i.list;s.shortenLabel=M?function(){for(r=0;r0&&a+m*g>u&&(s=Math.round((l-a)/Math.cos(f*r))):(e=a-m*g,i=a+(1-m)*g,eu&&(v=u-t.x+v*m,x=-1),(v=Math.min(y,v))v||n.autoRotation&&(d.styles||{}).width)&&(s=v)),s&&(this.shortenLabel?this.shortenLabel():(_.width=Math.floor(s)+"px",(o.style||{}).textOverflow||(_.textOverflow="ellipsis"),d.css(_)))}moveLabel(t,e){let i,r=this,s=r.label,n=r.axis,o=!1;s&&s.textStr===t?(r.movedLabel=s,o=!0,delete r.label):d(n.ticks,(function(e){o||e.isNew||e===r||!e.label||e.label.textStr!==t||(r.movedLabel=e.label,o=!0,e.labelPos=r.movedLabel.xy,delete e.label)})),!o&&(r.labelPos||s)&&(i=r.labelPos||s.xy,r.movedLabel=r.createLabel(t,e,i),r.movedLabel&&r.movedLabel.attr({opacity:0}))}render(t,e,i){let r=this.axis,s=r.horiz,o=this.pos,a=p(this.tickmarkOffset,r.tickmarkOffset),l=this.getPosition(s,o,a,e),h=l.x,u=l.y,d=r.pos,f=d+r.len,m=s?h:u;!r.chart.polar&&this.isNew&&(n(m)f)&&(i=0);let g=p(i,this.label&&this.label.newOpacity,1);i=p(i,1),this.isActive=!0,this.renderGridLine(e,i),this.renderMark(l,i),this.renderLabel(l,e,g,t),this.isNew=!1,c(this,"afterRender")}renderGridLine(t,e){let i,r=this.axis,s=r.options,n={},o=this.pos,a=this.type,l=p(this.tickmarkOffset,r.tickmarkOffset),c=r.chart.renderer,h=this.gridLine,u=s.gridLineWidth,d=s.gridLineColor,f=s.gridLineDashStyle;"minor"===this.type&&(u=s.minorGridLineWidth,d=s.minorGridLineColor,f=s.minorGridLineDashStyle),h||(r.chart.styledMode||(n.stroke=d,n["stroke-width"]=u||0,n.dashstyle=f),a||(n.zIndex=1),t&&(e=0),this.gridLine=h=c.path().attr(n).addClass("highcharts-"+(a?a+"-":"")+"grid-line").add(r.gridGroup)),h&&(i=r.getPlotLinePath({value:o+l,lineWidth:h.strokeWidth(),force:"pass",old:t,acrossPanes:!1}))&&h[t||this.isNew?"attr":"animate"]({d:i,opacity:e})}renderMark(t,e){let i=this.axis,r=i.options,s=i.chart.renderer,n=this.type,o=i.tickSize(n?n+"Tick":"tick"),a=t.x,l=t.y,c=p(r["minor"!==n?"tickWidth":"minorTickWidth"],!n&&i.isXAxis?1:0),h=r["minor"!==n?"tickColor":"minorTickColor"],u=this.mark,d=!u;o&&(i.opposite&&(o[0]=-o[0]),u||(this.mark=u=s.path().addClass("highcharts-"+(n?n+"-":"")+"tick").add(i.axisGroup),i.chart.styledMode||u.attr({stroke:h,"stroke-width":c})),u[d?"attr":"animate"]({d:this.getMarkPath(a,l,o[0],u.strokeWidth(),i.horiz,s),opacity:e}))}renderLabel(t,e,i,r){let s=this.axis,n=s.horiz,o=s.options,a=this.label,l=o.labels,c=l.step,u=p(this.tickmarkOffset,s.tickmarkOffset),d=t.x,f=t.y,m=!0;a&&h(d)&&(a.xy=t=this.getLabelPosition(d,f,a,n,l,u,r,c),this.isFirst&&!this.isLast&&!o.showFirstLabel||this.isLast&&!this.isFirst&&!o.showLastLabel?m=!1:!n||l.step||l.rotation||e||0===i||this.handleOverflow(t),c&&r%c&&(m=!1),m&&h(t.y)?(t.opacity=i,a[this.isNewLabel?"attr":"animate"](t).show(!0),this.isNewLabel=!1):(a.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let t=this.label,e=this.axis;t&&!this.isNew&&(t.animate({opacity:0},void 0,t.destroy),delete this.label),e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}}})),i(e,"Core/Axis/Axis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/AxisDefaults.js"],e["Core/Color/Color.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a){let{animObject:l}=t,{xAxis:c,yAxis:h}=e,{defaultOptions:u}=r,{registerEventOptions:d}=s,{deg2rad:p}=n,{arrayMax:f,arrayMin:m,clamp:g,correctFloat:y,defined:_,destroyObjectProperties:v,erase:x,error:b,extend:w,fireEvent:S,getClosestDistance:C,insertItem:T,isArray:k,isNumber:E,isString:A,merge:M,normalizeTickInterval:P,objectEach:I,pick:L,relativeLength:D,removeEvent:z,splat:O,syncTimeout:R}=a,N=(t,e)=>P(e,void 0,void 0,L(t.options.allowDecimals,e<.5||void 0!==t.tickAmount),!!t.tickAmount);w(u,{xAxis:c,yAxis:M(c,h)});class B{constructor(t,e,i){this.init(t,e,i)}init(t,e,i=this.coll){let r="xAxis"===i,s=this.isZAxis||(t.inverted?!r:r);this.chart=t,this.horiz=s,this.isXAxis=r,this.coll=i,S(this,"init",{userOptions:e}),this.opposite=L(e.opposite,this.opposite),this.side=L(e.side,this.side,s?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);let n=this.options,o=n.labels,a=n.type;this.userOptions=e,this.minPixelPadding=0,this.reversed=L(n.reversed,this.reversed),this.visible=n.visible,this.zoomEnabled=n.zoomEnabled,this.hasNames="category"===a||!0===n.categories,this.categories=k(n.categories)&&n.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=_(n.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=n.minRange||n.maxZoom,this.range=n.range,this.offset=n.offset||0,this.max=void 0,this.min=void 0;let l=L(n.crosshair,O(t.options.tooltip.crosshairs)[r?0:1]);this.crosshair=!0===l?{}:l,-1===t.axes.indexOf(this)&&(r?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),T(this,t[this.coll])),t.orderItems(this.coll),this.series=this.series||[],t.inverted&&!this.isZAxis&&r&&!_(this.reversed)&&(this.reversed=!0),this.labelRotation=E(o.rotation)?o.rotation:void 0,d(this,n),S(this,"afterInit")}setOptions(t){let e=this.horiz?{labels:{autoRotation:[-45],padding:4},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=M(e,u[this.coll],t),S(this,"afterSetOptions",{userOptions:t})}defaultLabelFormatter(){let t,e,i=this.axis,{numberFormatter:r}=this.chart,s=E(this.value)?this.value:NaN,n=i.chart.time,o=i.categories,a=this.dateTimeLabelFormat,l=u.lang,c=l.numericSymbols,h=l.numericSymbolMagnitude||1e3,d=i.logarithmic?Math.abs(s):i.tickInterval,p=c&&c.length;if(o)e=`${this.value}`;else if(a)e=n.dateFormat(a,s);else if(p&&c&&d>=1e3)for(;p--&&void 0===e;)d>=(t=Math.pow(h,p+1))&&10*s%t==0&&null!==c[p]&&0!==s&&(e=r(s/t,-1)+c[p]);return void 0===e&&(e=Math.abs(s)>=1e4?r(s,-1):r(s,-1,void 0,"")),e}getSeriesExtremes(){let t,e=this;S(this,"getSeriesExtremes",null,(function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=void 0,e.softThreshold=!e.isXAxis,e.series.forEach((i=>{if(i.reserveSpace()){let r,s,n,o=i.options,a=o.threshold;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=(a||0)&&(a=void 0),e.isXAxis)(r=i.xData)&&r.length&&(r=e.logarithmic?r.filter((t=>t>0)):r,s=(t=i.getXExtremes(r)).min,n=t.max,E(s)||s instanceof Date||(r=r.filter(E),s=(t=i.getXExtremes(r)).min,n=t.max),r.length&&(e.dataMin=Math.min(L(e.dataMin,s),s),e.dataMax=Math.max(L(e.dataMax,n),n)));else{let t=i.applyExtremes();E(t.dataMin)&&(s=t.dataMin,e.dataMin=Math.min(L(e.dataMin,s),s)),E(t.dataMax)&&(n=t.dataMax,e.dataMax=Math.max(L(e.dataMax,n),n)),_(a)&&(e.threshold=a),(!o.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}}}))})),S(this,"afterGetSeriesExtremes")}translate(t,e,i,r,s,n){let o=this.linkedParent||this,a=r&&o.old?o.old.min:o.min;if(!E(a))return NaN;let l=o.minPixelPadding,c=(o.isOrdinal||o.brokenAxis?.hasBreaks||o.logarithmic&&s)&&o.lin2val,h=1,u=0,d=r&&o.old?o.old.transA:o.transA,p=0;return d||(d=o.transA),i&&(h*=-1,u=o.len),o.reversed&&(h*=-1,u-=h*(o.sector||o.len)),e?(p=(t=t*h+u-l)/d+a,c&&(p=o.lin2val(p))):(c&&(t=o.val2lin(t)),p=h*(t-a)*d+u+h*l+(E(n)?d*n:0),o.isRadial||(p=y(p))),p}toPixels(t,e){return this.translate(t,!1,!this.horiz,void 0,!0)+(e?0:this.pos)}toValue(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(t){let e,i,r,s,n,o=this,a=o.chart,l=o.left,c=o.top,h=t.old,u=t.value,d=t.lineWidth,p=h&&a.oldChartHeight||a.chartHeight,f=h&&a.oldChartWidth||a.chartWidth,m=o.transB,y=t.translatedValue,_=t.force;function v(t,e,i){return"pass"!==_&&(ti)&&(_?t=g(t,e,i):n=!0),t}let x={value:u,lineWidth:d,old:h,force:_,acrossPanes:t.acrossPanes,translatedValue:y};return S(this,"getPlotLinePath",x,(function(t){e=r=(y=g(y=L(y,o.translate(u,void 0,void 0,h)),-1e5,1e5))+m,i=s=p-y-m,E(y)?o.horiz?(i=c,s=p-o.bottom+(o.options.isInternal?0:a.scrollablePixelsY||0),e=r=v(e,l,l+o.width)):(e=l,r=f-o.right+(a.scrollablePixelsX||0),i=s=v(i,c,c+o.height)):(n=!0,_=!1),t.path=n&&!_?void 0:a.renderer.crispLine([["M",e,i],["L",r,s]],d||1)})),x.path}getLinearTickPositions(t,e,i){let r,s,n,o=y(Math.floor(e/t)*t),a=y(Math.ceil(i/t)*t),l=[];if(y(o+t)===o&&(n=20),this.single)return[e];for(r=o;r<=a&&(l.push(r),(r=y(r+t,n))!==s);)s=r;return l}getMinorTickInterval(){let{minorTicks:t,minorTickInterval:e}=this.options;return!0===t?L(e,"auto"):!1!==t?e:void 0}getMinorTickPositions(){let t,e=this.options,i=this.tickPositions,r=this.minorTickInterval,s=this.pointRangePadding||0,n=(this.min||0)-s,o=(this.max||0)+s,a=o-n,l=[];if(a&&a/r(t.xIncrement?t.xData?.slice(0,2):t.xData)||[])))||0),this.dataMax-this.dataMin)),E(o)&&E(a)&&E(l)&&o-a=l,t=(l-o+a)/2,i=[a-t,L(s.min,a-t)],e&&(i[2]=n?n.log2lin(this.dataMin):this.dataMin),r=[(a=f(i))+l,L(s.max,a+l)],e&&(r[2]=n?n.log2lin(this.dataMax):this.dataMax),(o=m(r))-at-e)),t=C([i]))}return t&&e?Math.min(t,e):t||e}nameToX(t){let e,i=k(this.options.categories),r=i?this.categories:this.names,s=t.options.x;return t.series.requireSorting=!1,_(s)||(s=this.options.uniqueNames&&r?i?r.indexOf(t.name):L(r.keys[t.name],-1):t.series.autoIncrement()),-1===s?!i&&r&&(e=r.length):e=s,void 0!==e?(this.names[e]=t.name,this.names.keys[t.name]=e):t.x&&(e=t.x),e}updateNames(){let t=this,e=this.names;e.length>0&&(Object.keys(e.keys).forEach((function(t){delete e.keys[t]})),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach((e=>{e.xIncrement=null,(!e.points||e.isDirtyData)&&(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach((function(i,r){let s;i?.options&&void 0!==i.name&&void 0!==(s=t.nameToX(i))&&s!==i.x&&(i.x=s,e.xData[r]=s)}))})))}setAxisTranslation(){let t,e,i=this,r=i.max-i.min,s=i.linkedParent,n=!!i.categories,o=i.isXAxis,a=i.axisPointRange||0,l=0,c=0,h=i.transA;(o||n||a)&&(t=i.getClosest(),s?(l=s.minPointOffset,c=s.pointRangePadding):i.series.forEach((function(e){let r=n?1:o?L(e.options.pointRange,t,0):i.axisPointRange||0,s=e.options.pointPlacement;if(a=Math.max(a,r),!i.single||n){let t=e.is("xrange")?!o:o;l=Math.max(l,t&&A(s)?0:r/2),c=Math.max(c,t&&"on"===s?0:r)}})),e=i.ordinal&&i.ordinal.slope&&t?i.ordinal.slope/t:1,i.minPointOffset=l*=e,i.pointRangePadding=c*=e,i.pointRange=Math.min(a,i.single&&n?1:r),o&&t&&(i.closestPointRange=t)),i.translationSlope=i.transA=h=i.staticScale||i.len/(r+c||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=h*l,S(this,"afterSetAxisTranslation")}minFromRange(){let{max:t,min:e}=this;return E(t)&&E(e)&&t-e||void 0}setTickInterval(t){let e,i,r,s,n,{categories:o,chart:a,dataMax:l,dataMin:c,dateTime:h,isXAxis:u,logarithmic:d,options:p,softThreshold:f}=this,m=E(this.threshold)?this.threshold:void 0,g=this.minRange||0,{ceiling:v,floor:x,linkedTo:w,softMax:C,softMin:T}=p,k=E(w)&&a[this.coll]?.[w],A=p.tickPixelInterval,M=p.maxPadding,P=p.minPadding,I=0,D=E(p.tickInterval)&&p.tickInterval>=0?p.tickInterval:void 0;if(h||o||k||this.getTickAmount(),s=L(this.userMin,p.min),n=L(this.userMax,p.max),k?(this.linkedParent=k,e=k.getExtremes(),this.min=L(e.min,e.dataMin),this.max=L(e.max,e.dataMax),p.type!==k.options.type&&b(11,!0,a)):(f&&_(m)&&E(l)&&E(c)&&(c>=m?(i=m,P=0):l<=m&&(r=m,M=0)),this.min=L(s,i,c),this.max=L(n,r,l)),E(this.max)&&E(this.min)&&(d&&(this.positiveValuesOnly&&!t&&0>=Math.min(this.min,L(c,this.min))&&b(10,!0,a),this.min=y(d.log2lin(this.min),16),this.max=y(d.log2lin(this.max),16)),this.range&&E(c)&&(this.userMin=this.min=s=Math.max(c,this.minFromRange()||0),this.userMax=n=this.max,this.range=void 0)),S(this,"foundExtremes"),this.adjustForMinRange(),E(this.min)&&E(this.max)){if(!E(this.userMin)&&E(T)&&Tthis.max&&(this.max=n=C),o||this.axisPointRange||this.stacking?.usePercentage||k||!(I=this.max-this.min)||(!_(s)&&P&&(this.min-=I*P),_(n)||!M||(this.max+=I*M)),!E(this.userMin)&&E(x)&&(this.min=Math.max(this.min,x)),!E(this.userMax)&&E(v)&&(this.max=Math.min(this.max,v)),f&&E(c)&&E(l)){let t=m||0;!_(s)&&this.min=t?this.min=p.minRange?Math.min(t,this.max-g):t:!_(n)&&this.max>t&&l<=t&&(this.max=p.minRange?Math.max(t,this.min+g):t)}!a.polar&&this.min>this.max&&(_(p.min)?this.max=this.min:_(p.max)&&(this.min=this.max)),I=this.max-this.min}if(this.min!==this.max&&E(this.min)&&E(this.max)?k&&!D&&A===k.options.tickPixelInterval?this.tickInterval=D=k.tickInterval:this.tickInterval=L(D,this.tickAmount?I/Math.max(this.tickAmount-1,1):void 0,o?1:I*A/Math.max(this.len,A)):this.tickInterval=1,u&&!t){let t=this.min!==this.old?.min||this.max!==this.old?.max;this.series.forEach((function(e){e.forceCrop=e.forceCropping?.(),e.processData(t)})),S(this,"postProcessData",{hasExtremesChanged:t})}this.setAxisTranslation(),S(this,"initialAxisTranslation"),this.pointRange&&!D&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let z=L(p.minTickInterval,h&&!this.series.some((t=>t.noSharedTooltip))?this.closestPointRange:0);!D&&this.tickIntervalMath.max(2*this.len,200))l=[this.min,this.max],b(19,!1,this.chart);else if(this.dateTime)l=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinal?.positions,this.closestPointRange,!0);else if(this.logarithmic)l=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let t=this.tickInterval,e=t;for(;e<=2*t&&(l=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&l.length>this.tickAmount);)this.tickInterval=N(this,e*=1.1)}l.length>this.len&&(l=[l[0],l[l.length-1]])[0]===l[1]&&(l.length=1),r&&(this.tickPositions=l,(t=r.apply(this,[this.min,this.max]))&&(l=t))}this.tickPositions=l,this.paddedTicks=l.slice(0),this.trimTicks(l,o,a),!this.isLinked&&E(this.min)&&E(this.max)&&(this.single&&l.length<2&&!this.categories&&!this.series.some((t=>t.is("heatmap")&&"between"===t.options.pointPlacement))&&(this.min-=.5,this.max+=.5),i||t||this.adjustTickAmount()),S(this,"afterSetTickPositions")}trimTicks(t,e,i){let r=t[0],s=t[t.length-1],n=!this.isOrdinal&&this.minPointOffset||0;if(S(this,"trimTicks"),!this.isLinked){if(e&&r!==-1/0)this.min=r;else for(;this.min-n>t[0];)t.shift();if(i)this.max=s;else for(;this.max+n{let{horiz:e,options:i}=t;return[e?i.left:i.top,i.width,i.height,i.pane].join(",")},n=s(this);i[this.coll].forEach((function(i){let{series:o}=i;o.length&&o.some((t=>t.visible))&&i!==e&&s(i)===n&&(t=!0,r.push(i))}))}if(t&&o){r.forEach((t=>{let i=t.getThresholdAlignment(e);E(i)&&a.push(i)}));let t=a.length>1?a.reduce(((t,e)=>t+e),0)/a.length:void 0;r.forEach((e=>{e.thresholdAlignment=t}))}return t}getThresholdAlignment(t){if((!E(this.dataMin)||this!==t&&this.series.some((t=>t.isDirty||t.isDirtyData)))&&this.getSeriesExtremes(),E(this.threshold)){let t=g((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(t=1-t),t}}getTickAmount(){let t=this.options,e=t.tickPixelInterval,i=t.tickAmount;_(t.tickInterval)||i||!(this.lenl.push(y(l[l.length-1]+p)),m=()=>l.unshift(y(l[0]-p));if(E(h)&&(i=h<.5?Math.ceil(h*(c-1)):Math.floor(h*(c-1)),a.reversed&&(i=c-1-i)),r.hasData()&&E(o)&&E(n)){let h=()=>{r.transA*=(u-1)/(c-1),r.min=a.startOnTick?l[0]:Math.min(o,l[0]),r.max=a.endOnTick?l[l.length-1]:Math.max(n,l[l.length-1])};if(E(i)&&E(r.threshold)){for(;l[i]!==d||l.length!==c||l[0]>o||l[l.length-1]r.threshold?m():f();if(p>8*r.tickInterval)break;p*=2}h()}else if(u0&&e{i=i||t.isDirtyData||t.isDirty,r=r||t.xAxis&&t.xAxis.isDirty||!1})),this.setAxisSize();let s=this.len!==(this.old&&this.old.len);s||i||r||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(e&&"yAxis"===t&&e.buildStacks(),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),e&&"xAxis"===t&&e.buildStacks(),this.isDirty||(this.isDirty=s||this.min!==this.old?.min||this.max!==this.old?.max)):e&&e.cleanStacks(),i&&delete this.allExtremes,S(this,"afterSetScale")}setExtremes(t,e,i=!0,r,s){this.series.forEach((t=>{delete t.kdTree})),S(this,"setExtremes",s=w(s,{min:t,max:e}),(t=>{this.userMin=t.min,this.userMax=t.max,this.eventArgs=t,i&&this.chart.redraw(r)}))}setAxisSize(){let t=this.chart,e=this.options,i=e.offsets||[0,0,0,0],r=this.horiz,s=this.width=Math.round(D(L(e.width,t.plotWidth-i[3]+i[1]),t.plotWidth)),n=this.height=Math.round(D(L(e.height,t.plotHeight-i[0]+i[2]),t.plotHeight)),o=this.top=Math.round(D(L(e.top,t.plotTop+i[0]),t.plotHeight,t.plotTop)),a=this.left=Math.round(D(L(e.left,t.plotLeft+i[3]),t.plotWidth,t.plotLeft));this.bottom=t.chartHeight-n-o,this.right=t.chartWidth-s-a,this.len=Math.max(r?s:n,0),this.pos=r?a:o}getExtremes(){let t=this.logarithmic;return{min:t?y(t.lin2log(this.min)):this.min,max:t?y(t.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(t){let e=this.logarithmic,i=e?e.lin2log(this.min):this.min,r=e?e.lin2log(this.max):this.max;return null===t||t===-1/0?t=i:t===1/0?t=r:i>t?t=i:r15&&e<165?t.align="right":e>195&&e<345&&(t.align="left")})),i.align}tickSize(t){let e,i=this.options,r=L(i["tick"===t?"tickWidth":"minorTickWidth"],"tick"===t&&this.isXAxis&&!this.categories?1:0),s=i["tick"===t?"tickLength":"minorTickLength"];r&&s&&("inside"===i[t+"Position"]&&(s=-s),e=[s,r]);let n={tickSize:e};return S(this,"afterTickSize",n),n.tickSize}labelMetrics(){let t=this.chart.renderer,e=this.ticks,i=e[Object.keys(e)[0]]||{};return this.chart.renderer.fontMetrics(i.label||i.movedLabel||t.box)}unsquish(){let t,e,i=this.options.labels,r=i.padding||0,s=this.horiz,n=this.tickInterval,o=this.len/(((this.categories?1:0)+this.max-this.min)/n),a=i.rotation,l=y(.8*this.labelMetrics().h),c=Math.max(this.max-this.min,0),h=function(t){let e=(t+2*r)/(o||1);return(e=e>1?Math.ceil(e):1)*n>c&&t!==1/0&&o!==1/0&&c&&(e=Math.ceil(c/n)),y(e*n)},u=n,d=Number.MAX_VALUE;if(s){if(!i.staggerLines&&(E(a)?e=[a]:o=-90&&s<=90)&&(r=(i=h(Math.abs(l/Math.sin(p*s))))+Math.abs(s/360))g&&(g=e.label.textPxLength)})),this.maxLabelLength=g,this.autoRotation)g>d&&g>f.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(u&&(t=d,!m))for(e="clip",r=o.length;!h&&r--;)(i=a[o[r]].label)&&("ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>u&&i.css({width:u+"px"}),i.getBBox().height>this.len/o.length-(f.h-f.f)&&(i.specificTextOverflow="ellipsis"));p.rotation&&(t=g>.5*s.chartHeight?.33*s.chartHeight:g,m||(e="ellipsis")),this.labelAlign=l.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(p.align=this.labelAlign),o.forEach((function(i){let r=a[i],s=r&&r.label,n=c.width,o={};s&&(s.attr(p),r.shortenLabel?r.shortenLabel():t&&!n&&"nowrap"!==c.whiteSpace&&(ts.g(e).attr({zIndex:o}).addClass(`highcharts-${i.toLowerCase()}${n} `+(this.isRadial?`highcharts-radial-axis${n} `:"")+(r.className||"")).add(t);this.axisGroup||(this.gridGroup=n("grid","-grid",r.gridZIndex),this.axisGroup=n("axis","",r.zIndex),this.labelGroup=n("axis-labels","-labels",r.labels.zIndex))}getOffset(){let t,e,i,r,s=this,{chart:n,horiz:o,options:a,side:l,ticks:c,tickPositions:h,coll:u}=s,d=n.inverted&&!s.isZAxis?[1,0,3,2][l]:l,p=s.hasData(),f=a.title,m=a.labels,g=E(a.crossing),y=n.axisOffset,v=n.clipOffset,x=[-1,1,1,-1][l],b=0,w=0,C=0;if(s.showAxis=t=p||a.showEmpty,s.staggerLines=s.horiz&&m.staggerLines||void 0,s.createGroups(),p||s.isLinked?(h.forEach((function(t){s.generateTick(t)})),s.renderUnsquish(),s.reserveSpaceDefault=0===l||2===l||{1:"left",3:"right"}[l]===s.labelAlign,L(m.reserveSpace,!g&&null,"center"===s.labelAlign||null,s.reserveSpaceDefault)&&h.forEach((function(t){C=Math.max(c[t].getLabelSize(),C)})),s.staggerLines&&(C*=s.staggerLines),s.labelOffset=C*(s.opposite?-1:1)):I(c,(function(t,e){t.destroy(),delete c[e]})),f?.text&&!1!==f.enabled&&(s.addTitle(t),t&&!g&&!1!==f.reserveSpace&&(s.titleOffset=b=s.axisTitle.getBBox()[o?"height":"width"],w=_(e=f.offset)?0:L(f.margin,o?5:10))),s.renderLine(),s.offset=x*L(a.offset,y[l]?y[l]+(a.margin||0):0),s.tickRotCorr=s.tickRotCorr||{x:0,y:0},r=0===l?-s.labelMetrics().h:2===l?s.tickRotCorr.y:0,i=Math.abs(C)+w,C&&(i-=r,i+=x*(o?L(m.y,s.tickRotCorr.y+x*m.distance):L(m.x,x*m.distance))),s.axisTitleMargin=L(e,i),s.getMaxLabelDimensions&&(s.maxLabelDimensions=s.getMaxLabelDimensions(c,h)),"colorAxis"!==u&&v){let t=this.tickSize("tick");y[l]=Math.max(y[l],(s.axisTitleMargin||0)+b+x*s.offset,i,h&&h.length&&t?t[0]+x*s.offset:0);let e=!s.axisLine||a.offset?0:s.axisLine.strokeWidth()/2;v[d]=Math.max(v[d],e)}S(this,"afterGetOffset")}getLinePath(t){let e=this.chart,i=this.opposite,r=this.offset,s=this.horiz,n=this.left+(i?this.width:0)+r,o=e.chartHeight-this.bottom-(i?this.height:0)+r;return i&&(t*=-1),e.renderer.crispLine([["M",s?this.left:n,s?o:this.top],["L",s?e.chartWidth-this.right:n,s?o:e.chartHeight-this.bottom]],t)}renderLine(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(t){let e=this.horiz,i=this.left,r=this.top,s=this.len,n=this.options.title,o=e?i:r,a=this.opposite,l=this.offset,c=n.x,h=n.y,u=this.chart.renderer.fontMetrics(t),d=t?Math.max(t.getBBox(!1,0).height-u.h-1,0):0,p={low:o+(e?0:s),middle:o+s/2,high:o+(e?s:0)}[n.align],f=(e?r+this.height:i)+(e?1:-1)*(a?-1:1)*(this.axisTitleMargin||0)+[-d,d,u.f,-d][this.side],m={x:e?p+c:f+(a?this.width:0)+l+c,y:e?f+h-(a?this.height:0)+l:p+h};return S(this,"afterGetTitlePosition",{titlePosition:m}),m}renderMinorTick(t,e){let i=this.minorTicks;i[t]||(i[t]=new o(this,t,"minor")),e&&i[t].isNew&&i[t].render(null,!0),i[t].render(null,!1,1)}renderTick(t,e,i){let r=this.isLinked,s=this.ticks;(!r||t>=this.min&&t<=this.max||this.grid&&this.grid.isColumn)&&(s[t]||(s[t]=new o(this,t)),i&&s[t].isNew&&s[t].render(e,!0,-1),s[t].render(e))}render(){let t,e,i=this,r=i.chart,s=i.logarithmic,a=r.renderer,c=i.options,h=i.isLinked,u=i.tickPositions,d=i.axisTitle,p=i.ticks,f=i.minorTicks,m=i.alternateBands,g=c.stackLabels,y=c.alternateGridColor,_=c.crossing,v=i.tickmarkOffset,x=i.axisLine,b=i.showAxis,w=l(a.globalAnimation);if(i.labelEdge.length=0,i.overlap=!1,[p,f,m].forEach((function(t){I(t,(function(t){t.isActive=!1}))})),E(_)){let t=this.isXAxis?r.yAxis[0]:r.xAxis[0],e=[1,-1,-1,1][this.side];if(t){let r=t.toPixels(_,!0);i.horiz&&(r=t.len-r),i.offset=e*r}}if(i.hasData()||h){let a=i.chart.hasRendered&&i.old&&E(i.old.min);i.minorTickInterval&&!i.categories&&i.getMinorTickPositions().forEach((function(t){i.renderMinorTick(t,a)})),u.length&&(u.forEach((function(t,e){i.renderTick(t,e,a)})),v&&(0===i.min||i.single)&&(p[-1]||(p[-1]=new o(i,-1,null,!0)),p[-1].render(-1))),y&&u.forEach((function(o,a){e=void 0!==u[a+1]?u[a+1]+v:i.max-v,a%2==0&&o=.5)t=Math.round(t),c=o.getLinearTickPositions(t,e,i);else if(t>=.08){let r,s,o,a,l,h,u;for(r=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],s=Math.floor(e);se&&(!n||h<=i)&&void 0!==h&&c.push(h),h>i&&(u=!0),h=l}else{let h=this.lin2log(e),u=this.lin2log(i),d=n?o.getMinorTickInterval():l.tickInterval,p=l.tickPixelInterval/(n?5:1),f=n?a/o.tickPositions.length:a;t=r(t=s("auto"===d?null:d,this.minorAutoInterval,(u-h)*p/(f||1))),c=o.getLinearTickPositions(t,h,u).map(this.log2lin),n||(this.minorAutoInterval=t/5)}return n||(o.tickInterval=t),c}lin2log(t){return Math.pow(10,t)}log2lin(t){return Math.log(t)/Math.LN10}}t.Additions=o}(e||(e={})),e})),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[e["Core/Utilities.js"]],(function(t){var e;let{erase:i,extend:r,isNumber:s}=t;return function(t){let e;function n(t){return this.addPlotBandOrLine(t,"plotBands")}function o(t,i){let r=this.userOptions,s=new e(this,t);if(this.visible&&(s=s.render()),s){if(this._addedPlotLB||(this._addedPlotLB=!0,(r.plotLines||[]).concat(r.plotBands||[]).forEach((t=>{this.addPlotBandOrLine(t)}))),i){let e=r[i]||[];e.push(t),r[i]=e}this.plotLinesAndBands.push(s)}return s}function a(t){return this.addPlotBandOrLine(t,"plotLines")}function l(t,e,i){i=i||this.options;let r,n,o=this.getPlotLinePath({value:e,force:!0,acrossPanes:i.acrossPanes}),a=[],l=this.horiz,c=!s(this.min)||!s(this.max)||tthis.max&&e>this.max,h=this.getPlotLinePath({value:t,force:!0,acrossPanes:i.acrossPanes}),u=1;if(h&&o)for(c&&(n=h.toString()===o.toString(),u=0),r=0;r{b?.on(e,(t=>{u[e].apply(this,[t])}))})),this.eventsAdded=!0),!T&&b.d||!w?.length?b&&(w?(b.show(),b.animate({d:w})):b.d&&(b.hide(),x&&(this.label=x=x.destroy()))):b.attr({d:w}),v&&(s(v.text)||s(v.formatter))&&w?.length&&e.width>0&&e.height>0&&!w.isFlat?(v=l({align:r&&S?"center":void 0,x:r?!S&&4:10,verticalAlign:!r&&S?"middle":void 0,y:r?S?16:10:S?6:-4,rotation:r&&!S?90:0},v),this.renderLabel(v,w,S,d)):x&&x.hide(),this}renderLabel(t,e,s,n){let o=this.axis,a=o.chart.renderer,c=this.label;c||(this.label=c=a.text(this.getLabelText(t),0,0,t.useHTML).attr({align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(s?"band":"line")+"-label "+(t.className||""),zIndex:n}),o.chart.styledMode||c.css(l({fontSize:"0.8em",textOverflow:"ellipsis"},t.style)),c.add());let h=e.xBounds||[e[0][1],e[1][1],s?e[2][1]:e[0][1]],u=e.yBounds||[e[0][2],e[1][2],s?e[2][2]:e[0][2]],d=r(h),p=r(u);if(c.align(t,!1,{x:d,y:p,width:i(h)-d,height:i(u)-p}),!c.alignValue||"left"===c.alignValue){let e=t.clip?o.width:o.chart.chartWidth;c.css({width:(90===c.rotation?o.height-(c.alignAttr.y-o.top):e-(c.alignAttr.x-o.left))+"px"})}c.show(!0)}getLabelText(t){return s(t.formatter)?t.formatter.call(this):t.text}destroy(){o(this.axis.plotLinesAndBands,this),delete this.axis,n(this)}}return u})),i(e,"Core/Tooltip.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n){var o;let{animObject:a}=t,{format:l}=e,{composed:c,doc:h,isSafari:u}=i,{distribute:d}=r,{addEvent:p,clamp:f,css:m,discardElement:g,extend:y,fireEvent:_,isArray:v,isNumber:x,isString:b,merge:w,pick:S,pushUnique:C,splat:T,syncTimeout:k}=n;class E{constructor(t,e,i){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.options={},this.outside=!1,this.chart=t,this.init(t,e),this.pointer=i}bodyFormatter(t){return t.map((function(t){let e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")}))}cleanSplit(t){this.chart.series.forEach((function(e){let i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)}))}defaultFormatter(t){let e,i=this.points||T(this);return(e=(e=[t.tooltipFooterHeaderFormatter(i[0])]).concat(t.bodyFormatter(i))).push(t.tooltipFooterHeaderFormatter(i[0],!0)),e}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),g(this.container)),n.clearTimeout(this.hideTimer)}getAnchor(t,e){let i,{chart:r,pointer:s}=this,n=r.inverted,o=r.plotTop,a=r.plotLeft;if((t=T(t))[0].series&&t[0].series.yAxis&&!t[0].series.yAxis.options.reversedStacks&&(t=t.slice().reverse()),this.followPointer&&e)void 0===e.chartX&&(e=s.normalize(e)),i=[e.chartX-a,e.chartY-o];else if(t[0].tooltipPos)i=t[0].tooltipPos;else{let r=0,s=0;t.forEach((function(t){let e=t.pos(!0);e&&(r+=e[0],s+=e[1])})),r/=t.length,s/=t.length,this.shared&&t.length>1&&e&&(n?r=e.chartX:s=e.chartY),i=[r-a,s-o]}return i.map(Math.round)}getClassName(t,e,i){let r=this.options,s=t.series,n=s.options;return[r.className,"highcharts-label",i&&"highcharts-tooltip-header",e?"highcharts-tooltip-box":"highcharts-tooltip",!i&&"highcharts-color-"+S(t.colorIndex,s.colorIndex),n&&n.className].filter(b).join(" ")}getLabel(){let t=this,e=this.chart.styledMode,r=this.options,n=this.split&&this.allowShared,o=this.container,a=this.chart.renderer;if(this.label){let t=!this.label.hasClass("highcharts-label");(!n&&t||n&&!t)&&this.destroy()}if(!this.label){if(this.outside){let t=this.chart.options.chart.style,e=s.getRendererType();this.container=o=i.doc.createElement("div"),o.className="highcharts-tooltip-container",m(o,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(t&&t.zIndex||0)+3)}),this.renderer=a=new e(o,0,0,t,void 0,void 0,a.styledMode)}if(n?this.label=a.g("tooltip"):(this.label=a.label("",0,0,r.shape,void 0,void 0,r.useHTML,void 0,"tooltip").attr({padding:r.padding,r:r.borderRadius}),e||this.label.attr({fill:r.backgroundColor,"stroke-width":r.borderWidth||0}).css(r.style).css({pointerEvents:r.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),t.outside){let e=this.label;[e.xSetter,e.ySetter].forEach(((i,r)=>{e[r?"ySetter":"xSetter"]=s=>{i.call(e,t.distance),e[r?"y":"x"]=s,o&&(o.style[r?"top":"left"]=`${s}px`)}}))}this.label.attr({zIndex:8}).shadow(r.shadow).add()}return o&&!o.parentElement&&i.doc.body.appendChild(o),this.label}getPlayingField(){let{body:t,documentElement:e}=h,{chart:i,distance:r,outside:s}=this;return{width:s?Math.max(t.scrollWidth,e.scrollWidth,t.offsetWidth,e.offsetWidth,e.clientWidth)-2*r:i.chartWidth,height:s?Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,e.clientHeight):i.chartHeight}}getPosition(t,e,i){let r,{distance:s,chart:n,outside:o,pointer:a}=this,{inverted:l,plotLeft:c,plotTop:h,polar:u}=n,{plotX:d=0,plotY:p=0}=i,f={},m=l&&i.h||0,{height:g,width:y}=this.getPlayingField(),_=a.getChartPosition(),v=t=>t*_.scaleX,x=t=>t*_.scaleY,b=i=>{let r="x"===i;return[i,r?y:g,r?t:e].concat(o?[r?v(t):x(e),r?_.left-s+v(d+c):_.top-s+x(p+h),0,r?y:g]:[r?t:e,r?d+c:p+h,r?c:h,r?c+n.plotWidth:h+n.plotHeight])},w=b("y"),C=b("x"),T=!!i.negative;!u&&n.hoverSeries?.yAxis?.reversed&&(T=!T);let k=!this.followPointer&&S(i.ttBelow,!u&&!l===T),E=function(t,e,i,r,n,a,l){let c=o?"y"===t?x(s):v(s):s,h=(i-r)/2,u=re?g:g+m)}},A=function(t,e,i,r,n){if(ne-s)return!1;f[t]=ne-r/2?e-r-2:n-i/2},M=function(t){[w,C]=[C,w],r=t},P=()=>{!1!==E.apply(0,w)?!1!==A.apply(0,C)||r||(M(!0),P()):r?f.x=f.y=0:(M(!0),P())};return(l&&!u||this.len>1)&&M(),P(),f}hide(t){let e=this;n.clearTimeout(this.hideTimer),t=S(t,this.options.hideDelay),this.isHidden||(this.hideTimer=k((function(){let i=e.getLabel();e.getLabel().animate({opacity:0},{duration:t?150:t,complete:()=>{i.hide(),e.container&&e.container.remove()}}),e.isHidden=!0}),t))}init(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=S(e.outside,!(!t.scrollablePixelsX&&!t.scrollablePixelsY))}shouldStickOnContact(t){return!(this.followPointer||!this.options.stickOnContact||t&&!this.pointer.inClass(t.target,"highcharts-tooltip"))}move(t,e,i,r){let s=this,n=a(!s.isHidden&&s.options.animation),o={x:t,y:e};s.followPointer||(s.len||0)>1||(o.anchorX=i,o.anchorY=r),n.step=()=>s.drawTracker(),s.getLabel().animate(o,n)}refresh(t,e){let{chart:i,options:r,pointer:s,shared:o}=this,a=T(t),c=a[0],h=[],u=r.format,d=r.formatter||this.defaultFormatter,p=i.styledMode,f={};if(!r.enabled||!c.series)return;n.clearTimeout(this.hideTimer),this.allowShared=!(!v(t)&&t.series&&t.series.noSharedTooltip),this.followPointer=!this.split&&c.series.tooltipOptions.followPointer;let m=this.getAnchor(t,e),g=m[0],y=m[1];o&&this.allowShared?(s.applyInactiveState(a),a.forEach((function(t){t.setState("hover"),h.push(t.getLabelConfig())})),(f=c.getLabelConfig()).points=h):f=c.getLabelConfig(),this.len=h.length;let x=b(u)?l(u,f,i):d.call(f,this),w=c.series;if(this.distance=S(w.tooltipOptions.distance,16),!1===x)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(x,a);else{let t=g,n=y;if(e&&s.isDirectTouch&&(t=e.chartX-i.plotLeft,n=e.chartY-i.plotTop),!i.polar&&!1!==w.options.clip&&!a.some((e=>s.isDirectTouch||e.series.shouldShowTooltip(t,n))))return void this.hide();{let t=this.getLabel();(!r.style.width||p)&&t.css({width:(this.outside?this.getPlayingField():i.spacingBox).width+"px"}),t.attr({class:this.getClassName(c),text:x&&x.join?x.join(""):x}),p||t.attr({stroke:r.borderColor||c.color||w.color||"#666666"}),this.updatePosition({plotX:g,plotY:y,negative:c.negative,ttBelow:c.ttBelow,h:m[2]||0})}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}_(this,"refresh")}renderSplit(t,e){let i=this,{chart:r,chart:{chartWidth:s,chartHeight:n,plotHeight:o,plotLeft:a,plotTop:l,scrollablePixelsY:c=0,scrollablePixelsX:p,styledMode:m},distance:g,options:_,options:{positioner:v},pointer:x}=i,{scrollLeft:w=0,scrollTop:C=0}=r.scrollablePlotArea?.scrollingContainer||{},T=i.outside&&"number"!=typeof p?h.documentElement.getBoundingClientRect():{left:w,right:w+s,top:C,bottom:C+n},k=i.getLabel(),E=this.renderer||r.renderer,A=!(!r.xAxis[0]||!r.xAxis[0].opposite),{left:M,top:P}=x.getChartPosition(),I=l+C,L=0,D=o-c;function z(t,e,r,s,n=!0){let o,a;return r?(o=A?0:D,a=f(t-s/2,T.left,T.right-s-(i.outside?M:0))):(o=e-I,a=f(a=n?t-s-g:t+g,n?a:T.left,T.right)),{x:a,y:o}}b(t)&&(t=[!1,t]);let O=t.slice(0,e.length+1).reduce((function(t,r,s){if(!1!==r&&""!==r){let n=e[s-1]||{isHeader:!0,plotX:e[0].plotX,plotY:o,series:{}},c=n.isHeader,h=c?i:n.series,u=h.tt=function(t,e,r){let s=t,{isHeader:n,series:o}=e;if(!s){let t={padding:_.padding,r:_.borderRadius};m||(t.fill=_.backgroundColor,t["stroke-width"]=_.borderWidth??1),s=E.label("",0,0,_[n?"headerShape":"shape"],void 0,void 0,_.useHTML).addClass(i.getClassName(e,!0,n)).attr(t).add(k)}return s.isActive=!0,s.attr({text:r}),m||s.css(_.style).attr({stroke:_.borderColor||e.color||o.color||"#333333"}),s}(h.tt,n,r.toString()),d=u.getBBox(),p=d.width+u.strokeWidth();c&&(L=d.height,D+=L,A&&(I-=L));let{anchorX:y,anchorY:x}=function(t){let e,i,{isHeader:r,plotX:s=0,plotY:n=0,series:c}=t;if(r)e=Math.max(a+s,a),i=l+o/2;else{let{xAxis:t,yAxis:r}=c;e=t.pos+f(s,-g,t.len+g),c.shouldShowTooltip(0,r.pos-l+n,{ignoreX:!0})&&(i=r.pos+n)}return{anchorX:e=f(e,T.left-g,T.right+g),anchorY:i}}(n);if("number"==typeof x){let e=d.height+1,r=v?v.call(i,p,e,n):z(y,x,c,p);t.push({align:v?0:void 0,anchorX:y,anchorY:x,boxWidth:p,point:n,rank:S(r.rank,c?1:0),size:e,target:r.y,tt:u,x:r.x})}else u.isActive=!1}return t}),[]);!v&&O.some((t=>{let{outside:e}=i,r=(e?M:0)+t.anchorX;return rr}))&&(O=O.map((t=>{let{x:e,y:i}=z(t.anchorX,t.anchorY,t.point.isHeader,t.boxWidth,!1);return y(t,{target:i,x:e})}))),i.cleanSplit(),d(O,D);let R={left:M,right:M};O.forEach((function(t){let{x:e,boxWidth:r,isHeader:s}=t;!s&&(i.outside&&M+eR.right&&(R.right=M+e))})),O.forEach((function(t){let{x:e,anchorX:r,anchorY:s,pos:n,point:{isHeader:o}}=t,a={visibility:void 0===n?"hidden":"inherit",x:e,y:(n||0)+I,anchorX:r,anchorY:s};if(i.outside&&e0&&(o||(a.x=e+t,a.anchorX=r+t),o&&(a.x=(R.right-R.left)/2,a.anchorX=r+t))}t.tt.attr(a)}));let{container:N,outside:B,renderer:F}=i;if(B&&N&&F){let{width:t,height:e,x:i,y:r}=k.getBBox();F.setSize(t+i,e+r,!1),N.style.left=R.left+"px",N.style.top=P+"px"}u&&k.attr({opacity:1===k.opacity?.999:1})}drawTracker(){if(!this.shouldStickOnContact())return void(this.tracker&&(this.tracker=this.tracker.destroy()));let t=this.chart,e=this.label,i=this.shared?t.hoverPoints:t.hoverPoint;if(!e||!i)return;let r={x:0,y:0,width:0,height:0},s=this.getAnchor(i),n=e.getBBox();s[0]+=t.plotLeft-(e.translateX||0),s[1]+=t.plotTop-(e.translateY||0),r.x=Math.min(0,s[0]),r.y=Math.min(0,s[1]),r.width=s[0]<0?Math.max(Math.abs(s[0]),n.width-s[0]):Math.max(Math.abs(s[0]),n.width),r.height=s[1]<0?Math.max(Math.abs(s[1]),n.height-Math.abs(s[1])):Math.max(Math.abs(s[1]),n.height),this.tracker?this.tracker.attr(r):(this.tracker=e.renderer.rect(r).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(t){return t.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}tooltipFooterHeaderFormatter(t,e){let i=t.series,r=i.tooltipOptions,s=i.xAxis,n=s&&s.dateTime,o={isFooter:e,labelConfig:t},a=r.xDateFormat,c=r[e?"footerFormat":"headerFormat"];return _(this,"headerFormatter",o,(function(e){n&&!a&&x(t.key)&&(a=n.getXDateFormat(t.key,r.dateTimeLabelFormats)),n&&a&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach((function(t){c=c.replace("{point."+t+"}","{point."+t+":"+a+"}")})),i.chart.styledMode&&(c=this.styledModeFormat(c)),e.text=l(c,{point:t,series:i},this.chart)})),o.text}update(t){this.destroy(),this.init(this.chart,w(!0,this.options,t))}updatePosition(t){let e,{chart:i,container:r,distance:s,options:n,pointer:o,renderer:a}=this,{height:l=0,width:c=0}=this.getLabel(),{left:h,top:u,scaleX:d,scaleY:p}=o.getChartPosition(),f=(n.positioner||this.getPosition).call(this,c,l,t),g=(t.plotX||0)+i.plotLeft,y=(t.plotY||0)+i.plotTop;a&&r&&(n.positioner&&(f.x+=h-s,f.y+=u-s),e=(n.borderWidth||0)+2*s+2,a.setSize(c+e,l+e,!1),(1!==d||1!==p)&&(m(r,{transform:`scale(${d}, ${p})`}),g*=d,y*=p),g+=h-f.x,y+=u-f.y),this.move(Math.round(f.x),Math.round(f.y||0),g,y)}}return(o=E||(E={})).compose=function(t){C(c,"Core.Tooltip")&&p(t,"afterInit",(function(){let t=this.chart;t.options.tooltip&&(t.tooltip=new o(t,t.options.tooltip,this))}))},E})),i(e,"Core/Series/Point.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s){let{animObject:n}=e,{defaultOptions:o}=i,{format:a}=r,{addEvent:l,crisp:c,erase:h,extend:u,fireEvent:d,getNestedProperty:p,isArray:f,isFunction:m,isNumber:g,isObject:y,merge:_,pick:v,syncTimeout:x,removeEvent:b,uniqueKey:w}=s;class S{animateBeforeDestroy(){let t=this,e={x:t.startXPos,opacity:0},i=t.getGraphicalProps();i.singular.forEach((function(i){t[i]=t[i].animate("dataLabel"===i?{x:t[i].startXPos,y:t[i].startYPos,opacity:0}:e)})),i.plural.forEach((function(e){t[e].forEach((function(e){e.element&&e.animate(u({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))}))}))}applyOptions(t,e){let i=this.series,r=i.options.pointValKey||i.pointValKey;return u(this,t=S.prototype.optionsToObject.call(this,t)),this.options=this.options?u(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,r&&(this.y=S.prototype.getNestedProperty.call(this,r)),this.selected&&(this.state="select"),"name"in this&&void 0===e&&i.xAxis&&i.xAxis.hasNames&&(this.x=i.xAxis.nameToX(this)),void 0===this.x&&i?this.x=e??i.autoIncrement():g(t.x)&&i.options.relativeXValue&&(this.x=i.autoIncrement(t.x)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let t=this,e=t.series,i=e.chart,r=e.options.dataSorting,s=i.hoverPoints,o=n(t.series.chart.renderer.globalAnimation),a=()=>{for(let e in(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(b(t),t.destroyElements()),t)delete t[e]};t.legendItem&&i.legend.destroyItem(t),s&&(t.setState(),h(s,t),s.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),r&&r.enabled?(this.animateBeforeDestroy(),x(a,o.duration)):a(),i.pointCount--}this.destroyed=!0}destroyElements(t){let e=this,i=e.getGraphicalProps(t);i.singular.forEach((function(t){e[t]=e[t].destroy()})),i.plural.forEach((function(t){e[t].forEach((function(t){t&&t.element&&t.destroy()})),delete e[t]}))}firePointEvent(t,e,i){let r=this,s=this.series.options;r.manageEvent(t),"click"===t&&s.allowPointSelect&&(i=function(t){!r.destroyed&&r.select&&r.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),d(r,t,e,i)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(t){let e,i,r=this,s=[],n={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&s.push("graphic","connector"),t.dataLabel&&s.push("dataLabel","dataLabelPath","dataLabelUpper"),i=s.length;i--;)r[e=s[i]]&&n.singular.push(e);return["graphic","dataLabel"].forEach((function(e){let i=e+"s";t[e]&&r[i]&&n.plural.push(i)})),n}getLabelConfig(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}}getNestedProperty(t){return t?0===t.indexOf("custom.")?p(t,this.options):this[t]:void 0}getZone(){let t,e=this.series,i=e.zones,r=e.zoneAxis||"y",s=0;for(t=i[0];this[r]>=t.value;)t=i[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),t&&t.color&&!this.options.color?this.color=t.color:this.color=this.nonZonedColor,t}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(t,e,i){this.formatPrefix="point",this.visible=!0,this.series=t,this.applyOptions(e,i),this.id??(this.id=w()),this.resolveColor(),t.chart.pointCount++,d(this,"afterInit")}isValid(){return(g(this.x)||this.x instanceof Date)&&g(this.y)}optionsToObject(t){let e,i=this.series,r=i.options.keys,s=r||i.pointArrayMap||["y"],n=s.length,o={},a=0,l=0;if(g(t)||null===t)o[s[0]]=t;else if(f(t))for(!r&&t.length>n&&("string"==(e=typeof t[0])?o.name=t[0]:"number"===e&&(o.x=t[0]),a++);l0?S.prototype.setNestedProperty(o,t[a],s[l]):o[s[l]]=t[a]),a++,l++;else"object"==typeof t&&(o=t,t.dataLabels&&(i.hasDataLabels=()=>!0),t.marker&&(i._hasPointMarkers=!0));return o}pos(t,e=this.plotY){if(!this.destroyed){let{plotX:i,series:r}=this,{chart:s,xAxis:n,yAxis:o}=r,a=0,l=0;if(g(i)&&g(e))return t&&(a=n?n.pos:s.plotLeft,l=o?o.pos:s.plotTop),s.inverted&&n&&o?[o.len-e+l,n.len-i+a]:[i+a,e+l]}}resolveColor(){let t,e,i,r=this.series,s=r.chart.options.chart,n=r.chart.styledMode,o=s.colorCount;delete this.nonZonedColor,r.options.colorByPoint?(n||(t=(e=r.options.colors||r.chart.options.colors)[r.colorCounter],o=e.length),i=r.colorCounter,r.colorCounter++,r.colorCounter===o&&(r.colorCounter=0)):(n||(t=r.color),i=r.colorIndex),this.colorIndex=v(this.options.colorIndex,i),this.color=v(this.options.color,t)}setNestedProperty(t,e,i){return i.split(".").reduce((function(t,i,r,s){let n=s.length-1===r;return t[i]=n?e:y(t[i],!0)?t[i]:{},t[i]}),t),t}shouldDraw(){return!this.isNull}tooltipFormatter(t){let e=this.series,i=e.tooltipOptions,r=v(i.valueDecimals,""),s=i.valuePrefix||"",n=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach((function(e){e="{point."+e,(s||n)&&(t=t.replace(RegExp(e+"}","g"),s+e+"}"+n)),t=t.replace(RegExp(e+"}","g"),e+":,."+r+"f}")})),a(t,{point:this,series:this.series},e.chart)}update(t,e,i,r){let s,n=this,o=n.series,a=n.graphic,l=o.chart,c=o.options;function h(){n.applyOptions(t);let r=a&&n.hasMockGraphic,h=null===n.y?!r:r;a&&h&&(n.graphic=a.destroy(),delete n.hasMockGraphic),y(t,!0)&&(a&&a.element&&t&&t.marker&&void 0!==t.marker.symbol&&(n.graphic=a.destroy()),t?.dataLabels&&n.dataLabel&&(n.dataLabel=n.dataLabel.destroy())),s=n.index,o.updateParallelArrays(n,s),c.data[s]=y(c.data[s],!0)||y(t,!0)?n.options:v(t,c.data[s]),o.isDirty=o.isDirtyData=!0,!o.fixedBox&&o.hasCartesianSeries&&(l.isDirtyBox=!0),"point"===c.legendType&&(l.isDirtyLegend=!0),e&&l.redraw(i)}e=v(e,!0),!1===r?h():n.firePointEvent("update",{options:t},h)}remove(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)}select(t,e){let i=this,r=i.series,s=r.chart;t=v(t,!i.selected),this.selectedStaging=t,i.firePointEvent(t?"select":"unselect",{accumulate:e},(function(){i.selected=i.options.selected=t,r.options.data[r.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||s.getSelectedPoints().forEach((function(t){let e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(s.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))}))})),delete this.selectedStaging}onMouseOver(t){let{inverted:e,pointer:i}=this.series.chart;i&&(t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e),i.runPointActions(t,this))}onMouseOut(){let t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach((function(t){t.setState()})),t.hoverPoints=t.hoverPoint=null}manageEvent(t){let e=_(this.series.options.point,this.options),i=e.events?.[t];!m(i)||this.hcEvents?.[t]&&-1!==this.hcEvents?.[t]?.map((t=>t.fn)).indexOf(i)?this.importedUserEvent&&!i&&this.hcEvents?.[t]&&(b(this,t),delete this.hcEvents[t],Object.keys(this.hcEvents)||delete this.importedUserEvent):(this.importedUserEvent?.(),this.importedUserEvent=l(this,t,i))}setState(e,i){let r,s,n,a,l=this.series,c=this.state,h=l.options.states[e||"normal"]||{},p=o.plotOptions[l.type].marker&&l.options.marker,f=p&&!1===p.enabled,m=p&&p.states&&p.states[e||"normal"]||{},y=!1===m.enabled,_=this.marker||{},x=l.chart,b=p&&l.markerAttribs,w=l.halo,S=l.stateMarkerGraphic;if((e=e||"")===this.state&&!i||this.selected&&"select"!==e||!1===h.enabled||e&&(y||f&&!1===m.enabled)||e&&_.states&&_.states[e]&&!1===_.states[e].enabled)return;if(this.state=e,b&&(r=l.markerAttribs(this,e)),this.graphic&&!this.hasMockGraphic){if(c&&this.graphic.removeClass("highcharts-point-"+c),e&&this.graphic.addClass("highcharts-point-"+e),!x.styledMode){s=l.pointAttribs(this,e),n=v(x.options.chart.animation,h.animation);let t=s.opacity;l.options.inactiveOtherPoints&&g(t)&&(this.dataLabels||[]).forEach((function(e){e&&!e.hasClass("highcharts-data-label-hidden")&&(e.animate({opacity:t},n),e.connector&&e.connector.animate({opacity:t},n))})),this.graphic.animate(s,n)}r&&this.graphic.animate(r,v(x.options.chart.animation,m.animation,p.animation)),S&&S.hide()}else e&&m&&(a=_.symbol||l.symbol,S&&S.currentSymbol!==a&&(S=S.destroy()),r&&(S?S[i?"animate":"attr"]({x:r.x,y:r.y}):a&&(l.stateMarkerGraphic=S=x.renderer.symbol(a,r.x,r.y,r.width,r.height).add(l.markerGroup),S.currentSymbol=a)),!x.styledMode&&S&&"inactive"!==this.state&&S.attr(l.pointAttribs(this,e))),S&&(S[e&&this.isInside?"show":"hide"](),S.element.point=this,S.addClass(this.getClassName(),!0));let C=h.halo,T=this.graphic||S,k=T&&T.visibility||"inherit";C&&C.size&&T&&"hidden"!==k&&!this.isCluster?(w||(l.halo=w=x.renderer.path().add(T.parentGroup)),w.show()[i?"animate":"attr"]({d:this.haloPath(C.size)}),w.attr({class:"highcharts-halo highcharts-color-"+v(this.colorIndex,l.colorIndex)+(this.className?" "+this.className:""),visibility:k,zIndex:-1}),w.point=this,x.styledMode||w.attr(u({fill:this.color||l.color,"fill-opacity":C.opacity},t.filterUserAttributes(C.attributes||{})))):w?.point?.haloPath&&!w.point.destroyed&&w.animate({d:w.point.haloPath(0)},null,w.hide),d(this,"afterSetState",{state:e})}haloPath(t){let e=this.pos();return e?this.series.chart.renderer.symbols.circle(c(e[0],1)-t,e[1]-t,2*t,2*t):[]}}return S})),i(e,"Core/Pointer.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i){var r;let{parse:s}=t,{charts:n,composed:o,isTouchDevice:a}=e,{addEvent:l,attr:c,css:h,extend:u,find:d,fireEvent:p,isNumber:f,isObject:m,objectEach:g,offset:y,pick:_,pushUnique:v,splat:x}=i;class b{applyInactiveState(t){let e,i=[];(t||[]).forEach((function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)})),this.chart.series.forEach((function(t){-1===i.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")}))}destroy(){let t=this;this.eventsToUnbind.forEach((t=>t())),this.eventsToUnbind=[],!e.chartCount&&(b.unbindDocumentMouseUp&&(b.unbindDocumentMouseUp=b.unbindDocumentMouseUp()),b.unbindDocumentTouchEnd&&(b.unbindDocumentTouchEnd=b.unbindDocumentTouchEnd())),clearInterval(t.tooltipTimeout),g(t,(function(e,i){t[i]=void 0}))}getSelectionMarkerAttrs(t,e){let i={args:{chartX:t,chartY:e},attrs:{},shapeType:"rect"};return p(this,"getSelectionMarkerAttrs",i,(i=>{let r,{chart:s,zoomHor:n,zoomVert:o}=this,{mouseDownX:a=0,mouseDownY:l=0}=s,c=i.attrs;c.x=s.plotLeft,c.y=s.plotTop,c.width=n?1:s.plotWidth,c.height=o?1:s.plotHeight,n&&(r=t-a,c.width=Math.max(1,Math.abs(r)),c.x=(r>0?0:r)+a),o&&(r=e-l,c.height=Math.max(1,Math.abs(r)),c.y=(r>0?0:r)+l)})),i}drag(t){let e,{chart:i}=this,{mouseDownX:r=0,mouseDownY:n=0}=i,{panning:o,panKey:a,selectionMarkerFill:l}=i.options.chart,c=i.plotLeft,h=i.plotTop,u=i.plotWidth,d=i.plotHeight,p=m(o)?o.enabled:o,f=a&&t[`${a}Key`],g=t.chartX,y=t.chartY,_=this.selectionMarker;if((!_||!_.touch)&&(gc+u&&(g=c+u),yh+d&&(y=h+d),this.hasDragged=Math.sqrt(Math.pow(r-g,2)+Math.pow(n-y,2)),this.hasDragged>10)){e=i.isInsidePlot(r-c,n-h,{visiblePlotOnly:!0});let{shapeType:a,attrs:u}=this.getSelectionMarkerAttrs(g,y);(i.hasCartesianSeries||i.mapView)&&this.hasZoom&&e&&!f&&!_&&(this.selectionMarker=_=i.renderer[a](),_.attr({class:"highcharts-selection-marker",zIndex:7}).add(),i.styledMode||_.attr({fill:l||s("#334eff").setOpacity(.25).get()})),_&&_.attr(u),e&&!_&&p&&i.pan(t,o)}}dragStart(t){let e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=t.chartX,e.mouseDownY=t.chartY}getSelectionBox(t){let e={args:{marker:t},result:t.getBBox()};return p(this,"getSelectionBox",e),e.result}drop(t){let e,{chart:i,selectionMarker:r}=this;for(let t of i.axes)t.isPanning&&(t.isPanning=!1,(t.options.startOnTick||t.options.endOnTick||t.series.some((t=>t.boosted)))&&(t.forceRedraw=!0,t.setExtremes(t.userMin,t.userMax,!1),e=!0));if(e&&i.redraw(),r&&t){if(this.hasDragged){let e=this.getSelectionBox(r);i.transform({axes:i.axes.filter((t=>t.zoomEnabled&&("xAxis"===t.coll&&this.zoomX||"yAxis"===t.coll&&this.zoomY))),selection:{originalEvent:t,xAxis:[],yAxis:[],...e},from:e})}f(i.index)&&(this.selectionMarker=r.destroy())}i&&f(i.index)&&(h(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=!1,this.hasDragged=0,this.pinchDown=[])}findNearestKDPoint(t,e,i){let r;return t.forEach((function(t){let s=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y"),n=t.searchPoint(i,s);m(n,!0)&&n.series&&(!m(r,!0)||function(t,i){let r=t.distX-i.distX,s=t.dist-i.dist,n=i.series.group?.zIndex-t.series.group?.zIndex;return 0!==r&&e?r:0!==s?s:0!==n?n:t.series.index>i.series.index?-1:1}(r,n)>0)&&(r=n)})),r}getChartCoordinatesFromPoint(t,e){let{xAxis:i,yAxis:r}=t.series,s=t.shapeArgs;if(i&&r){let n=t.clientX??t.plotX??0,o=t.plotY||0;return t.isNode&&s&&f(s.x)&&f(s.y)&&(n=s.x,o=s.y),e?{chartX:r.len+r.pos-o,chartY:i.len+i.pos-n}:{chartX:n+i.pos,chartY:o+r.pos}}if(s&&s.x&&s.y)return{chartX:s.x,chartY:s.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:t}=this.chart,e=y(t);this.chartPosition={left:e.left,top:e.top,scaleX:1,scaleY:1};let{offsetHeight:i,offsetWidth:r}=t;return r>2&&i>2&&(this.chartPosition.scaleX=e.width/r,this.chartPosition.scaleY=e.height/i),this.chartPosition}getCoordinates(t){let e={xAxis:[],yAxis:[]};for(let i of this.chart.axes)e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])});return e}getHoverData(t,e,i,r,s,n){let o,a=[],l=function(t){return t.visible&&!(!s&&t.directTouch)&&_(t.options.enableMouseTracking,!0)},c=e,h={chartX:n?n.chartX:void 0,chartY:n?n.chartY:void 0,shared:s};p(this,"beforeGetHoverData",h),o=c&&!c.stickyTracking?[c]:i.filter((t=>t.stickyTracking&&(h.filter||l)(t)));let u=r&&t||!n?t:this.findNearestKDPoint(o,s,n);return c=u&&u.series,u&&(s&&!c.noSharedTooltip?(o=i.filter((function(t){return h.filter?h.filter(t):l(t)&&!t.noSharedTooltip}))).forEach((function(t){let e=d(t.points,(function(t){return t.x===u.x&&!t.isNull}));m(e)&&(t.boosted&&t.boost&&(e=t.boost.getPoint(e)),a.push(e))})):a.push(u)),p(this,"afterGetHoverData",h={hoverPoint:u}),{hoverPoint:h.hoverPoint,hoverSeries:c,hoverPoints:a}}getPointFromEvent(t){let e,i=t.target;for(;i&&!e;)e=i.point,i=i.parentNode;return e}onTrackerMouseOut(t){let e=this.chart,i=t.relatedTarget,r=e.hoverSeries;this.isDirectTouch=!1,!r||!i||r.stickyTracking||this.inClass(i,"highcharts-tooltip")||this.inClass(i,"highcharts-series-"+r.index)&&this.inClass(i,"highcharts-tracker")||r.onMouseOut()}inClass(t,e){let i,r=t;for(;r;){if(i=c(r,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}r=r.parentElement}}constructor(t,e){this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=e,this.chart=t,this.runChartClick=!!e.chart.events?.click,this.pinchDown=[],this.setDOMEvents(),p(this,"afterInit")}normalize(t,e){let i=t.touches,r=i?i.length?i.item(0):_(i.changedTouches,t.changedTouches)[0]:t;e||(e=this.getChartPosition());let s=r.pageX-e.left,n=r.pageY-e.top;return u(t,{chartX:Math.round(s/=e.scaleX),chartY:Math.round(n/=e.scaleY)})}onContainerClick(t){let e=this.chart,i=e.hoverPoint,r=this.normalize(t),s=e.plotLeft,n=e.plotTop;!e.cancelClick&&(i&&this.inClass(r.target,"highcharts-tracker")?(p(i.series,"click",u(r,{point:i})),e.hoverPoint&&i.firePointEvent("click",r)):(u(r,this.getCoordinates(r)),e.isInsidePlot(r.chartX-s,r.chartY-n,{visiblePlotOnly:!0})&&p(e,"click",r)))}onContainerMouseDown(t){let i=!(1&~(t.buttons||t.button));t=this.normalize(t),e.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),(void 0===t.button||i)&&(this.zoomOption(t),i&&t.preventDefault?.(),this.dragStart(t))}onContainerMouseLeave(t){let{pointer:e}=n[_(b.hoverChartIndex,-1)]||{};t=this.normalize(t),this.onContainerMouseMove(t),e&&!this.inClass(t.relatedTarget,"highcharts-tooltip")&&(e.reset(),e.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(t){let e=this.chart,i=e.tooltip,r=this.normalize(t);this.setHoverChartIndex(t),("mousedown"===e.mouseIsDown||this.touchSelect(r))&&this.drag(r),!e.openMenu&&(this.inClass(r.target,"highcharts-tracker")||e.isInsidePlot(r.chartX-e.plotLeft,r.chartY-e.plotTop,{visiblePlotOnly:!0}))&&(!i||!i.shouldStickOnContact(r))&&(this.inClass(r.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(r))}onDocumentTouchEnd(t){this.onDocumentMouseUp(t)}onContainerTouchMove(t){this.touchSelect(t)?this.onContainerMouseMove(t):this.touch(t)}onContainerTouchStart(t){this.touchSelect(t)?this.onContainerMouseDown(t):(this.zoomOption(t),this.touch(t,!0))}onDocumentMouseMove(t){let e=this.chart,i=e.tooltip,r=this.chartPosition,s=this.normalize(t,r);!r||e.isInsidePlot(s.chartX-e.plotLeft,s.chartY-e.plotTop,{visiblePlotOnly:!0})||i&&i.shouldStickOnContact(s)||s.target!==e.container.ownerDocument&&this.inClass(s.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(t){n[_(b.hoverChartIndex,-1)]?.pointer?.drop(t)}pinch(t){let e=this,{chart:i,hasZoom:r,lastTouches:s}=e,n=[].map.call(t.touches||[],(t=>e.normalize(t))),o=n.length,a=1===o&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),l=i.tooltip,c=1===o&&_(l?.options.followTouchMove,!0);o>1?e.initiated=!0:c&&(e.initiated=!1),r&&e.initiated&&!a&&!1!==t.cancelable&&t.preventDefault(),"touchstart"===t.type?(e.pinchDown=n,e.res=!0,i.mouseDownX=t.chartX):c?this.runPointActions(e.normalize(t)):s&&(p(i,"touchpan",{originalEvent:t,touches:n},(()=>{let e=t=>{let e=t[0],i=t[1]||e;return{x:e.chartX,y:e.chartY,width:i.chartX-e.chartX,height:i.chartY-e.chartY}};i.transform({axes:i.axes.filter((t=>t.zoomEnabled&&(this.zoomHor&&t.horiz||this.zoomVert&&!t.horiz))),to:e(n),from:e(s),trigger:t.type})})),e.res&&(e.res=!1,this.reset(!1,0))),e.lastTouches=n}reset(t,e){let i=this.chart,r=i.hoverSeries,s=i.hoverPoint,n=i.hoverPoints,o=i.tooltip,a=o&&o.shared?n:s;t&&a&&x(a).forEach((function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)})),t?o&&a&&x(a).length&&(o.refresh(a),o.shared&&n?n.forEach((function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))})):s&&(s.setState(s.state,!0),i.axes.forEach((function(t){t.crosshair&&s.series[t.coll]===t&&t.drawCrosshair(null,s)})))):(s&&s.onMouseOut(),n&&n.forEach((function(t){t.setState()})),r&&r.onMouseOut(),o&&o.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach((function(t){t.hideCrosshair()})),i.hoverPoints=i.hoverPoint=void 0)}runPointActions(t,e,i){let r=this.chart,s=r.series,o=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,a=!!o&&o.shared,c=e||r.hoverPoint,h=c&&c.series||r.hoverSeries,u=(!t||"touchmove"!==t.type)&&(!!e||h&&h.directTouch&&this.isDirectTouch),p=this.getHoverData(c,h,s,u,a,t);c=p.hoverPoint,h=p.hoverSeries;let f=p.hoverPoints,m=h&&h.tooltipOptions.followPointer&&!h.tooltipOptions.split,g=a&&h&&!h.noSharedTooltip;if(c&&(i||c!==r.hoverPoint||o&&o.isHidden)){if((r.hoverPoints||[]).forEach((function(t){-1===f.indexOf(t)&&t.setState()})),r.hoverSeries!==h&&h.onMouseOver(),this.applyInactiveState(f),(f||[]).forEach((function(t){t.setState("hover")})),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!c.series)return;r.hoverPoints=f,r.hoverPoint=c,c.firePointEvent("mouseOver",void 0,(()=>{o&&c&&o.refresh(g?f:c,t)}))}else if(m&&o&&!o.isHidden){let e=o.getAnchor([{}],t);r.isInsidePlot(e[0],e[1],{visiblePlotOnly:!0})&&o.updatePosition({plotX:e[0],plotY:e[1]})}this.unDocMouseMove||(this.unDocMouseMove=l(r.container.ownerDocument,"mousemove",(t=>n[b.hoverChartIndex??-1]?.pointer?.onDocumentMouseMove(t))),this.eventsToUnbind.push(this.unDocMouseMove)),r.axes.forEach((function(e){let i,s=_((e.crosshair||{}).snap,!0);!s||(i=r.hoverPoint)&&i.series[e.coll]===e||(i=d(f,(t=>t.series&&t.series[e.coll]===e))),i||!s?e.drawCrosshair(t,i):e.hideCrosshair()}))}setDOMEvents(){let t=this.chart.container,e=t.ownerDocument;t.onmousedown=this.onContainerMouseDown.bind(this),t.onmousemove=this.onContainerMouseMove.bind(this),t.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(l(t,"mouseenter",this.onContainerMouseEnter.bind(this)),l(t,"mouseleave",this.onContainerMouseLeave.bind(this))),b.unbindDocumentMouseUp||(b.unbindDocumentMouseUp=l(e,"mouseup",this.onDocumentMouseUp.bind(this)));let i=this.chart.renderTo.parentElement;for(;i&&"BODY"!==i.tagName;)this.eventsToUnbind.push(l(i,"scroll",(()=>{delete this.chartPosition}))),i=i.parentElement;this.eventsToUnbind.push(l(t,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1}),l(t,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),b.unbindDocumentTouchEnd||(b.unbindDocumentTouchEnd=l(e,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})),this.setPointerCapture(),l(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){if(!a)return;let t=this.pointerCaptureEventsToUnbind,e=this.chart,i=e.container,r=_(e.options.tooltip?.followTouchMove,!0)&&e.series.some((t=>t.options.findNearestPointBy.indexOf("y")>-1));!this.hasPointerCapture&&r?(t.push(l(i,"pointerdown",(t=>{t.target?.hasPointerCapture(t.pointerId)&&t.target?.releasePointerCapture(t.pointerId)})),l(i,"pointermove",(t=>{e.pointer?.getPointFromEvent(t)?.onMouseOver(t)}))),e.styledMode||h(i,{"touch-action":"none"}),i.className+=" highcharts-no-touch-action",this.hasPointerCapture=!0):this.hasPointerCapture&&!r&&(t.forEach((t=>t())),t.length=0,e.styledMode||h(i,{"touch-action":_(e.options.chart.style?.["touch-action"],"manipulation")}),i.className=i.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=!1)}setHoverChartIndex(t){let i=this.chart,r=e.charts[_(b.hoverChartIndex,-1)];if(r&&r!==i){let e={relatedTarget:i.container};t&&!t?.relatedTarget&&(t={...e,...t}),r.pointer?.onContainerMouseLeave(t||e)}r&&r.mouseIsDown||(b.hoverChartIndex=i.index)}touch(t,e){let i,{chart:r,pinchDown:s=[]}=this;this.setHoverChartIndex(),1===(t=this.normalize(t)).touches.length?r.isInsidePlot(t.chartX-r.plotLeft,t.chartY-r.plotTop,{visiblePlotOnly:!0})&&!r.openMenu?(e&&this.runPointActions(t),"touchmove"===t.type&&(i=!!s[0]&&Math.pow(s[0].chartX-t.chartX,2)+Math.pow(s[0].chartY-t.chartY,2)>=16),_(i,!0)&&this.pinch(t)):e&&this.reset():2===t.touches.length&&this.pinch(t)}touchSelect(t){return!(!this.chart.zooming.singleTouch||!t.touches||1!==t.touches.length)}zoomOption(t){let e,i,r=this.chart,s=r.inverted,n=r.zooming.type||"";/touch/.test(t.type)&&(n=_(r.zooming.pinchType,n)),this.zoomX=e=/x/.test(n),this.zoomY=i=/y/.test(n),this.zoomHor=e&&!s||i&&s,this.zoomVert=i&&!s||e&&s,this.hasZoom=e||i}}return(r=b||(b={})).compose=function(t){v(o,"Core.Pointer")&&l(t,"beforeRender",(function(){this.pointer=new r(this,this.options)}))},b})),i(e,"Core/Legend/LegendSymbol.js",[e["Core/Utilities.js"]],(function(t){var e;let{extend:i,merge:r,pick:s}=t;return function(t){function e(t,e,n){let o,a=this.legendItem=this.legendItem||{},{chart:l,options:c}=this,{baseline:h=0,symbolWidth:u,symbolHeight:d}=t,p=this.symbol||"circle",f=d/2,m=l.renderer,g=a.group,y=h-Math.round(d*(n?.4:.3)),_={},v=c.marker,x=0;if(l.styledMode||(_["stroke-width"]=Math.min(c.lineWidth||0,24),c.dashStyle?_.dashstyle=c.dashStyle:"square"===c.linecap||(_["stroke-linecap"]="round")),a.line=m.path().addClass("highcharts-graph").attr(_).add(g),n&&(a.area=m.path().addClass("highcharts-area").add(g)),_["stroke-linecap"]&&(x=Math.min(a.line.strokeWidth(),u)/2),u){let t=[["M",x,y],["L",u-x,y]];a.line.attr({d:t}),a.area?.attr({d:[...t,["L",u-x,h],["L",x,h]]})}if(v&&!1!==v.enabled&&u){let t=Math.min(s(v.radius,f),f);0===p.indexOf("url")&&(v=r(v,{width:d,height:d}),t=0),a.symbol=o=m.symbol(p,u/2-t,y-t,2*t,2*t,i({context:"legend"},v)).addClass("highcharts-point").add(g),o.isMarker=!0}}t.areaMarker=function(t,i){e.call(this,t,i,!0)},t.lineMarker=e,t.rectangle=function(t,e){let i=e.legendItem||{},r=t.options,n=t.symbolHeight,o=r.squareSymbol,a=o?n:t.symbolWidth;i.symbol=this.chart.renderer.rect(o?(t.symbolWidth-n)/2:0,t.baseline-n+1,a,n,s(t.options.symbolRadius,n/2)).addClass("highcharts-point").attr({zIndex:3}).add(i.group)}}(e||(e={})),e})),i(e,"Core/Series/SeriesDefaults.js",[],(function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){let{numberFormatter:t}=this.series.chart;return"number"!=typeof this.y?"":t(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}})),i(e,"Core/Series/SeriesRegistry.js",[e["Core/Globals.js"],e["Core/Defaults.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],(function(t,e,i,r){var s;let{defaultOptions:n}=e,{extend:o,extendClass:a,merge:l}=r;return function(e){function r(t,r){let s=n.plotOptions||{},o=r.defaultOptions,a=r.prototype;return a.type=t,a.pointClass||(a.pointClass=i),!e.seriesTypes[t]&&(o&&(s[t]=o),e.seriesTypes[t]=r,!0)}e.seriesTypes=t.seriesTypes,e.registerSeriesType=r,e.seriesType=function(t,s,c,h,u){let d=n.plotOptions||{};if(s=s||"",d[t]=l(d[s],c),delete e.seriesTypes[t],r(t,a(e.seriesTypes[s]||function(){},h)),e.seriesTypes[t].prototype.type=t,u){class r extends i{}o(r.prototype,u),e.seriesTypes[t].prototype.pointClass=r}return e.seriesTypes[t]}}(s||(s={})),s})),i(e,"Core/Series/Series.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Series/Point.js"],e["Core/Series/SeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a,l,c){let{animObject:h,setAnimation:u}=t,{defaultOptions:d}=e,{registerEventOptions:p}=i,{svg:f,win:m}=r,{seriesTypes:g}=a,{arrayMax:y,arrayMin:_,clamp:v,correctFloat:x,crisp:b,defined:w,destroyObjectProperties:S,diffObjects:C,erase:T,error:k,extend:E,find:A,fireEvent:M,getClosestDistance:P,getNestedProperty:I,insertItem:L,isArray:D,isNumber:z,isString:O,merge:R,objectEach:N,pick:B,removeEvent:F,splat:j,syncTimeout:U}=c;class V{constructor(){this.zoneAxis="y"}init(t,e){let i;M(this,"init",{options:e});let r=this,s=t.series;this.eventsToUnbind=[],r.chart=t,r.options=r.setOptions(e);let n=r.options,o=!1!==n.visible;r.linkedSeries=[],r.bindAxes(),E(r,{name:n.name,state:"",visible:o,selected:!0===n.selected}),p(this,n);let a=n.events;(a&&a.click||n.point&&n.point.events&&n.point.events.click||n.allowPointSelect)&&(t.runTrackerClick=!0),r.getColor(),r.getSymbol(),r.parallelArrays.forEach((function(t){r[t+"Data"]||(r[t+"Data"]=[])})),r.isCartesian&&(t.hasCartesianSeries=!0),s.length&&(i=s[s.length-1]),r._i=B(i&&i._i,-1)+1,r.opacity=r.options.opacity,t.orderItems("series",L(this,s)),n.dataSorting&&n.dataSorting.enabled?r.setDataSortingOptions():r.points||r.data||r.setData(n.data,!1),M(this,"afterInit")}is(t){return g[t]&&this instanceof g[t]}bindAxes(){let t,e=this,i=e.options,r=e.chart;M(this,"bindAxes",null,(function(){(e.axisTypes||[]).forEach((function(s){(r[s]||[]).forEach((function(r){t=r.options,(B(i[s],0)===r.index||void 0!==i[s]&&i[s]===t.id)&&(L(e,r.series),e[s]=r,r.isDirty=!0)})),e[s]||e.optionalAxis===s||k(18,!0,r)}))})),M(this,"afterBindAxes")}updateParallelArrays(t,e,i){let r=t.series,s=z(e)?function(i){let s="y"===i&&r.toYData?r.toYData(t):t[i];r[i+"Data"][e]=s}:function(t){Array.prototype[e].apply(r[t+"Data"],i)};r.parallelArrays.forEach(s)}hasData(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&this.yData.length>0}hasMarkerChanged(t,e){let i=t.marker,r=e.marker||{};return i&&(r.enabled&&!i.enabled||r.symbol!==i.symbol||r.height!==i.height||r.width!==i.width)}autoIncrement(t){let e,i,r=this.options,s=r.pointIntervalUnit,n=r.relativeXValue,o=this.chart.time,a=this.xIncrement;return a=B(a,r.pointStart,0),this.pointInterval=i=B(this.pointInterval,r.pointInterval,1),n&&z(t)&&(i*=t),s&&(e=new o.Date(a),"day"===s?o.set("Date",e,o.get("Date",e)+i):"month"===s?o.set("Month",e,o.get("Month",e)+i):"year"===s&&o.set("FullYear",e,o.get("FullYear",e)+i),i=e.getTime()-a),n&&z(t)?a+i:(this.xIncrement=a+i,a)}setDataSortingOptions(){let t=this.options;E(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),w(t.pointRange)||(t.pointRange=1)}setOptions(t){let e,i=this.chart,r=i.options.plotOptions,s=i.userOptions||{},n=R(t),o=i.styledMode,a={plotOptions:r,userOptions:n};M(this,"setOptions",a);let l=a.plotOptions[this.type],c=s.plotOptions||{},h=c.series||{},u=d.plotOptions[this.type]||{},p=c[this.type]||{};this.userOptions=a.userOptions;let f=R(l,r.series,p,n);this.tooltipOptions=R(d.tooltip,d.plotOptions.series?.tooltip,u?.tooltip,i.userOptions.tooltip,c.series?.tooltip,p.tooltip,n.tooltip),this.stickyTracking=B(n.stickyTracking,p.stickyTracking,h.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||f.stickyTracking),null===l.marker&&delete f.marker,this.zoneAxis=f.zoneAxis||"y";let m=this.zones=(f.zones||[]).map((t=>({...t})));return(f.negativeColor||f.negativeFillColor)&&!f.zones&&(e={value:f[this.zoneAxis+"Threshold"]||f.threshold||0,className:"highcharts-negative"},o||(e.color=f.negativeColor,e.fillColor=f.negativeFillColor),m.push(e)),m.length&&w(m[m.length-1].value)&&m.push(o?{}:{color:this.color,fillColor:this.fillColor}),M(this,"afterSetOptions",{options:f}),f}getName(){return B(this.options.name,"Series "+(this.index+1))}getCyclic(t,e,i){let r,s,n=this.chart,o=`${t}Index`,a=`${t}Counter`,l=i?.length||n.options.chart.colorCount;!e&&(w(s=B("color"===t?this.options.colorIndex:void 0,this[o]))?r=s:(n.series.length||(n[a]=0),r=n[a]%l,n[a]+=1),i&&(e=i[r])),void 0!==r&&(this[o]=r),this[t]=e}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||d.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols)}findPointIndex(t,e){let i,r,s,o=t.id,a=t.x,l=this.points,c=this.options.dataSorting;if(o){let t=this.chart.get(o);t instanceof n&&(i=t)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let e=e=>!e.touched&&e.index===t.index;if(c&&c.matchByName?e=e=>!e.touched&&e.name===t.name:this.options.relativeXValue&&(e=e=>!e.touched&&e.options.x===t.x),!(i=A(l,e)))return}return i&&void 0!==(s=i&&i.index)&&(r=!0),void 0===s&&z(a)&&(s=this.xData.indexOf(a,e)),-1!==s&&void 0!==s&&this.cropped&&(s=s>=this.cropStart?s-this.cropStart:s),!r&&z(s)&&l[s]&&l[s].touched&&(s=void 0),s}updateData(t,e){let i,r,s,n,o=this.options,a=o.dataSorting,l=this.points,c=[],h=this.requireSorting,u=t.length===l.length,d=!0;if(this.xIncrement=null,t.forEach((function(t,e){let r,s=w(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},d=s.x;s.id||z(d)?(-1===(r=this.findPointIndex(s,n))||void 0===r?c.push(t):l[r]&&t!==o.data[r]?(l[r].update(t,!1,null,!1),l[r].touched=!0,h&&(n=r+1)):l[r]&&(l[r].touched=!0),(!u||e!==r||a&&a.enabled||this.hasDerivedData)&&(i=!0)):c.push(t)}),this),i)for(r=l.length;r--;)(s=l[r])&&!s.touched&&s.remove&&s.remove(!1,e);else!u||a&&a.enabled?d=!1:(t.forEach((function(t,e){t===l[e].y||l[e].destroyed||l[e].update(t,!1,null,!1)})),c.length=0);return l.forEach((function(t){t&&(t.touched=!1)})),!!d&&(c.forEach((function(t){this.addPoint(t,!1,null,null,!1)}),this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=y(this.xData),this.autoIncrement()),!0)}setData(t,e=!0,i,r){let s,n,o,a,l=this,c=l.points,h=c&&c.length||0,u=l.options,d=l.chart,p=u.dataSorting,f=l.xAxis,m=u.turboThreshold,g=this.xData,y=this.yData,_=l.pointArrayMap,v=_&&_.length,x=u.keys,b=0,w=1;d.options.chart.allowMutatingData||(u.data&&delete l.options.data,l.userOptions.data&&delete l.userOptions.data,a=R(!0,t));let S=(t=a||t||[]).length;if(p&&p.enabled&&(t=this.sortData(t)),d.options.chart.allowMutatingData&&!1!==r&&S&&h&&!l.cropped&&!l.hasGroupedData&&l.visible&&!l.boosted&&(o=this.updateData(t,i)),!o){l.xIncrement=null,l.colorCounter=0,this.parallelArrays.forEach((function(t){l[t+"Data"].length=0}));let e=m&&S>m;if(e){let i=l.getFirstValidPoint(t),r=l.getFirstValidPoint(t,S-1,-1),o=t=>!(!D(t)||!x&&!z(t[0]));if(z(i)&&z(r))for(s=0;s=0?b:0,w=w>=0?w:1),1===i.length&&(w=0),b===w)for(s=0;s{let r=I(i,t),s=I(i,e);return sr?1:0})).forEach((function(t,e){t.x=e}),this),e.linkedSeries&&e.linkedSeries.forEach((function(e){let i=e.options,s=i.data;i.dataSorting&&i.dataSorting.enabled||!s||(s.forEach((function(i,n){s[n]=r(e,i),t[n]&&(s[n].x=t[n].x,s[n].index=n)})),e.setData(s,!1))})),t}getProcessedData(t){let e,i,r,s,n,o=this,a=o.xAxis,l=o.options.cropThreshold,c=a?.logarithmic,h=o.isCartesian,u=0,d=o.xData,p=o.yData,f=!1,m=d.length;a&&(s=(r=a.getExtremes()).min,n=r.max,f=!(!a.categories||a.names.length)),h&&o.sorted&&!t&&(!l||m>l||o.forceCrop)&&(d[m-1]n?(d=[],p=[]):o.yData&&(d[0]n)&&(d=(e=this.cropData(o.xData,o.yData,s,n)).xData,p=e.yData,u=e.start,i=!0));let g=P([c?d.map(c.log2lin):d],(()=>o.requireSorting&&!f&&k(15,!1,o.chart)));return{xData:d,yData:p,cropped:i,cropStart:u,closestPointRange:g}}processData(t){let e=this.xAxis;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;let i=this.getProcessedData();this.cropped=i.cropped,this.cropStart=i.cropStart,this.processedXData=i.xData,this.processedYData=i.yData,this.closestPointRange=this.basePointRange=i.closestPointRange,M(this,"afterProcessData")}cropData(t,e,i,r){let s,n,o=t.length,a=0,l=o;for(s=0;s=i){a=Math.max(0,s-1);break}for(n=s;nr){l=n+1;break}return{xData:t.slice(a,l),yData:e.slice(a,l),start:a,end:l}}generatePoints(){let t,e,i,r,s=this.options,n=this.processedData||s.data,o=this.processedXData,a=this.processedYData,l=this.pointClass,c=o.length,h=this.cropStart||0,u=this.hasGroupedData,d=s.keys,p=[],f=s.dataGrouping&&s.dataGrouping.groupAll?h:0,m=this.data;if(!m&&!u){let t=[];t.length=n.length,m=this.data=t}for(d&&u&&(this.options.keys=!1),r=0;r0:o.length)||!p),s=e||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!c||(S[a+d]||n)>=v&&(S[a-d]||n)<=x,r&&s)if(l=o.length)for(;l--;)z(o[l])&&(u[b++]=o[l]);else u[b++]=o;let C={activeYData:u,dataMin:_(u),dataMax:y(u)};return M(this,"afterGetExtremes",{dataExtremes:C}),C}applyExtremes(){let t=this.getExtremes();return this.dataMin=t.dataMin,this.dataMax=t.dataMax,t}getFirstValidPoint(t,e=0,i=1){let r=t.length,s=e;for(;s>=0&&s1)&&(n.step=function(t,e){i&&i.apply(e,arguments),"width"===e.prop&&l?.element&&l.attr(s?"height":"width",t+99)}),a.addClass("highcharts-animating").animate(t,n)}}afterAnimate(){this.setClip(),N(this.chart.sharedClips,((t,e,i)=>{t&&!this.chart.container.querySelector(`[clip-path="url(#${t.id})"]`)&&(t.destroy(),delete i[e])})),this.finishedAnimating=!0,M(this,"afterAnimate")}drawPoints(t=this.points){let e,i,r,s,n,o,a,l=this.chart,c=l.styledMode,{colorAxis:h,options:u}=this,d=u.marker,p=this[this.specialGroup||"markerGroup"],f=this.xAxis,m=B(d.enabled,!f||!!f.isRadial||null,this.closestPointRangePx>=d.enabledThreshold*d.radius);if(!1!==d.enabled||this._hasPointMarkers)for(e=0;e0||i.hasImage)&&(i.graphic=r=l.renderer.symbol(t,a.x,a.y,a.width,a.height,o?n:d).add(p),this.enabledDataSorting&&l.hasRendered&&(r.attr({x:i.startXPos}),s="animate")),r&&"animate"===s&&r[e?"show":"hide"](e).animate(a),r){let t=this.pointAttribs(i,c||!i.selected?void 0:"select");c?h&&r.css({fill:t.fill}):r[s](t)}r&&r.addClass(i.getClassName(),!0)}else r&&(i.graphic=r.destroy())}markerAttribs(t,e){let i,r,s=this.options,n=s.marker,o=t.marker||{},a=o.symbol||n.symbol,l={},c=B(o.radius,n&&n.radius);e&&(i=n.states[e],c=B((r=o.states&&o.states[e])&&r.radius,i&&i.radius,c&&c+(i&&i.radiusPlus||0))),t.hasImage=a&&0===a.indexOf("url"),t.hasImage&&(c=0);let h=t.pos();return z(c)&&h&&(s.crisp&&(h[0]=b(h[0],t.hasImage?0:"rect"===a?n?.lineWidth||0:1)),l.x=h[0]-c,l.y=h[1]-c),c&&(l.width=l.height=2*c),l}pointAttribs(t,e){let i,r,s,n,o=this.options.marker,a=t&&t.options,l=a&&a.marker||{},c=a&&a.color,h=t&&t.color,u=t&&t.zone&&t.zone.color,d=this.color,p=B(l.lineWidth,o.lineWidth),f=1;return d=c||u||h||d,s=l.fillColor||o.fillColor||d,n=l.lineColor||o.lineColor||d,e=e||"normal",i=o.states[e]||{},p=B((r=l.states&&l.states[e]||{}).lineWidth,i.lineWidth,p+B(r.lineWidthPlus,i.lineWidthPlus,0)),s=r.fillColor||i.fillColor||s,{stroke:n=r.lineColor||i.lineColor||n,"stroke-width":p,fill:s,opacity:f=B(r.opacity,i.opacity,f)}}destroy(t){let e,i,r,s=this,n=s.chart,o=/AppleWebKit\/533/.test(m.navigator.userAgent),a=s.data||[];for(M(s,"destroy",{keepEventsForUpdate:t}),this.removeEvents(t),(s.axisTypes||[]).forEach((function(t){(r=s[t])&&r.series&&(T(r.series,s),r.isDirty=r.forceRedraw=!0)})),s.legendItem&&s.chart.legend.destroyItem(s),e=a.length;e--;)(i=a[e])&&i.destroy&&i.destroy();for(let t of s.zones)S(t,void 0,!0);c.clearTimeout(s.animationTimeout),N(s,(function(t,e){t instanceof l&&!t.survive&&t[o&&"group"===e?"hide":"destroy"]()})),n.hoverSeries===s&&(n.hoverSeries=void 0),T(n.series,s),n.orderItems("series"),N(s,(function(e,i){t&&"hcEvents"===i||delete s[i]}))}applyZones(){let{area:t,chart:e,graph:i,zones:r,points:s,xAxis:n,yAxis:o,zoneAxis:a}=this,{inverted:l,renderer:c}=e,h=this[`${a}Axis`],{isXAxis:u,len:d=0}=h||{},p=(i?.strokeWidth()||0)/2+1,f=(t,e=0,i=0)=>{l&&(i=d-i);let{translated:r=0,lineClip:s}=t,n=i-r;s?.push(["L",e,Math.abs(n){t.forEach(((e,i)=>{("M"===e[0]||"L"===e[0])&&(t[i]=[e[0],u?d-e[1]:e[1],u?e[2]:d-e[2]])}))};if(r.forEach((t=>{t.lineClip=[],t.translated=v(h.toPixels(B(t.value,e),!0)||0,0,d)})),i&&!this.showLine&&i.hide(),t&&t.hide(),"y"===a&&s.length{let r=e.lineClip||[],s=Math.round(e.translated||0);n.reversed&&r.reverse();let{clip:a,simpleClip:h}=e,d=0,f=0,y=n.len,_=o.len;u?(d=s,y=g):(f=s,_=g);let v=[["M",d,f],["L",y,f],["L",y,_],["L",d,_],["Z"]],x=[v[0],...r,v[1],v[2],...m,v[3],v[4]];m=r.reverse(),g=s,l&&(p(x),t&&p(v)),a?(a.animate({d:x}),h?.animate({d:v})):(a=e.clip=c.path(x),t&&(h=e.simpleClip=c.path(v))),i&&e.graph?.clip(a),t&&e.area?.clip(h)}))}else this.visible&&(i&&i.show(),t&&t.show())}plotGroup(t,e,i,r,s){let n=this[t],o=!n,a={visibility:i,zIndex:r||.1};return w(this.opacity)&&!this.chart.styledMode&&"inactive"!==this.state&&(a.opacity=this.opacity),n||(this[t]=n=this.chart.renderer.g().add(s)),n.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(w(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(n.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),n.attr(a)[o?"attr":"animate"](this.getPlotBox(e)),n}getPlotBox(t){let e=this.xAxis,i=this.yAxis,r=this.chart,s=r.inverted&&!r.polar&&e&&this.invertible&&"series"===t;return r.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:r.plotLeft,translateY:i?i.top:r.plotTop,rotation:s?90:0,rotationOriginX:s?(e.len-i.len)/2:0,rotationOriginY:s?(e.len+i.len)/2:0,scaleX:s?-1:1,scaleY:1}}removeEvents(t){let{eventsToUnbind:e}=this;t||F(this),e.length&&(e.forEach((t=>{t()})),e.length=0)}render(){let t=this,{chart:e,options:i,hasRendered:r}=t,s=h(i.animation),n=t.visible?"inherit":"hidden",o=i.zIndex,a=e.seriesGroup,l=t.finishedAnimating?0:s.duration;M(this,"render"),t.plotGroup("group","series",n,o,a),t.markerGroup=t.plotGroup("markerGroup","markers",n,o,a),!1!==i.clip&&t.setClip(),l&&t.animate?.(!0),t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels?.(),t.redrawPoints?.(),i.enableMouseTracking&&t.drawTracker?.(),l&&t.animate?.(),r||(l&&s.defer&&(l+=s.defer),t.animationTimeout=U((()=>{t.afterAnimate()}),l||0)),t.isDirty=!1,t.hasRendered=!0,M(t,"afterRender")}redraw(){let t=this.isDirty||this.isDirtyData;this.translate(),this.render(),t&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(t,e){let{xAxis:i,yAxis:r}=this,s=this.chart.inverted;return this.searchKDTree({clientX:s?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:s?r.len-t.chartX+r.pos:t.chartY-r.pos},e,t)}buildKDTree(t){this.buildingKdTree=!0;let e=this,i=e.options.findNearestPointBy.indexOf("y")>-1?2:1;delete e.kdTree,U((function(){e.kdTree=function t(i,r,s){let n,o,a=i?.length;if(a)return n=e.kdAxisArray[r%s],i.sort(((t,e)=>(t[n]||0)-(e[n]||0))),{point:i[o=Math.floor(a/2)],left:t(i.slice(0,o),r+1,s),right:t(i.slice(o+1),r+1,s)}}(e.getValidPoints(void 0,!e.directTouch),i,i),e.buildingKdTree=!1}),e.options.kdNow||"touchstart"===t?.type?0:1)}searchKDTree(t,e,i){let r=this,[s,n]=this.kdAxisArray,o=e?"distX":"dist",a=(r.options.findNearestPointBy||"").indexOf("y")>-1?2:1,l=!!r.isBubble;if(this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return function t(e,i,a,c){let h,u,d=i.point,p=r.kdAxisArray[a%c],f=d;!function(t,e){let i=t[s],r=e[s],o=w(i)&&w(r)?i-r:null,a=t[n],c=e[n],h=w(a)&&w(c)?a-c:0,u=l&&e.marker?.radius||0;e.dist=Math.sqrt((o&&o*o||0)+h*h)-u,e.distX=w(o)?Math.abs(o)-u:Number.MAX_VALUE}(e,d);let m=(e[p]||0)-(d[p]||0)+(l&&d.marker?.radius||0),g=m<0?"left":"right",y=m<0?"right":"left";return i[g]&&(f=(h=t(e,i[g],a+1,c))[o]=0&&n<=(r?r.len:e.plotHeight)&&s>=0&&s<=(i?i.len:e.plotWidth)}drawTracker(){let t=this,e=t.options,i=e.trackByArea,r=[].concat((i?t.areaPath:t.graphPath)||[]),s=t.chart,n=s.pointer,o=s.renderer,a=s.options.tooltip?.snap||0,l=()=>{e.enableMouseTracking&&s.hoverSeries!==t&&t.onMouseOver()},c="rgba(192,192,192,"+(f?1e-4:.002)+")",h=t.tracker;h?h.attr({d:r}):t.graph&&(t.tracker=h=o.path(r).attr({visibility:t.visible?"inherit":"hidden",zIndex:2}).addClass(i?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),s.styledMode||h.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:c,fill:i?c:"none","stroke-width":t.graph.strokeWidth()+(i?0:2*a)}),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach((t=>{t&&(t.addClass("highcharts-tracker").on("mouseover",l).on("mouseout",(t=>{n?.onTrackerMouseOut(t)})),e.cursor&&!s.styledMode&&t.css({cursor:e.cursor}),t.on("touchstart",l))}))),M(this,"afterDrawTracker")}addPoint(t,e,i,r,s){let n,o,a=this.options,l=this.data,c=this.chart,h=this.xAxis,u=h&&h.hasNames&&h.names,d=a.data,p=this.xData;e=B(e,!0);let f={series:this};this.pointClass.prototype.applyOptions.apply(f,[t]);let m=f.x;if(o=p.length,this.requireSorting&&mm;)o--;this.updateParallelArrays(f,"splice",[o,0,0]),this.updateParallelArrays(f,o),u&&f.name&&(u[m]=f.name),d.splice(o,0,t),(n||this.processedData)&&(this.data.splice(o,0,null),this.processData()),"point"===a.legendType&&this.generatePoints(),i&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(f,"shift"),d.shift())),!1!==s&&M(this,"addPoint",{point:f}),this.isDirty=!0,this.isDirtyData=!0,e&&c.redraw(r)}removePoint(t,e,i){let r=this,s=r.data,n=s[t],o=r.points,a=r.chart,l=function(){o&&o.length===s.length&&o.splice(t,1),s.splice(t,1),r.options.data.splice(t,1),r.updateParallelArrays(n||{series:r},"splice",[t,1]),n&&n.destroy(),r.isDirty=!0,r.isDirtyData=!0,e&&a.redraw()};u(i,a),e=B(e,!0),n?n.firePointEvent("remove",null,l):l()}remove(t,e,i,r){let s=this,n=s.chart;function o(){s.destroy(r),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(r),B(t,!0)&&n.redraw(e)}!1!==i?M(s,"remove",null,o):o()}update(t,e){M(this,"update",{options:t=C(t,this.userOptions)});let i,r,s=this,n=s.chart,o=s.userOptions,a=s.initialType||s.type,l=n.options.plotOptions,c=g[a].prototype,h=s.finishedAnimating&&{animation:!1},u={},d=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],p=t.type||o.type||n.options.chart.type,f=!(this.hasDerivedData||p&&p!==this.type||void 0!==t.pointStart||void 0!==t.pointInterval||void 0!==t.relativeXValue||t.joinBy||t.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some((t=>s.hasOptionChanged(t))));p=p||a,f&&(d.push("data","isDirtyData","isDirtyCanvas","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"),!1!==t.visible&&d.push("area","graph"),s.parallelArrays.forEach((function(t){d.push(t+"Data")})),t.data&&(t.dataSorting&&E(s.options.dataSorting,t.dataSorting),this.setData(t.data,!1))),t=R(o,{index:void 0===o.index?s.index:o.index,pointStart:l?.series?.pointStart??o.pointStart??s.xData?.[0]},!f&&{data:s.options.data},t,h),f&&t.data&&(t.data=s.options.data),(d=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(d)).forEach((function(t){d[t]=s[t],delete s[t]}));let m=!1;if(g[p]){if(m=p!==s.type,s.remove(!1,!1,!1,!0),m)if(n.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(s,g[p].prototype);else{let t=Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents;for(r in c)s[r]=void 0;E(s,g[p].prototype),t?s.hcEvents=t:delete s.hcEvents}}else k(17,!0,n,{missingModuleFor:p});if(d.forEach((function(t){s[t]=d[t]})),s.init(n,t),f&&this.points)for(let t of(!1===(i=s.options).visible?(u.graphic=1,u.dataLabel=1):(this.hasMarkerChanged(i,o)&&(u.graphic=1),s.hasDataLabels?.()||(u.dataLabel=1)),this.points))t&&t.series&&(t.resolveColor(),Object.keys(u).length&&t.destroyElements(u),!1===i.showInLegend&&t.legendItem&&n.legend.destroyItem(t));s.initialType=a,n.linkSeries(),n.setSortedData(),m&&s.linkedSeries.length&&(s.isDirtyData=!0),M(this,"afterUpdate"),B(e,!0)&&n.redraw(!!f&&void 0)}setName(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0}hasOptionChanged(t){let e=this.chart,i=this.options[t],r=e.options.plotOptions,s=this.userOptions[t],n=B(r?.[this.type]?.[t],r?.series?.[t]);return s&&!w(n)?i!==s:i!==B(n,i)}onMouseOver(){let t=this.chart,e=t.hoverSeries,i=t.pointer;i?.setHoverChartIndex(),e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&M(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this}onMouseOut(){let t=this.options,e=this.chart,i=e.tooltip,r=e.hoverPoint;e.hoverSeries=null,r&&r.onMouseOut(),this&&t.events.mouseOut&&M(this,"mouseOut"),i&&!this.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),e.series.forEach((function(t){t.setState("",!0)}))}setState(t,e){let i=this,r=i.options,s=i.graph,n=r.inactiveOtherPoints,o=r.states,a=B(o[t||"normal"]&&o[t||"normal"].animation,i.chart.options.chart.animation),l=r.lineWidth,c=r.opacity;if(t=t||"",i.state!==t&&([i.group,i.markerGroup,i.dataLabelsGroup].forEach((function(e){e&&(i.state&&e.removeClass("highcharts-series-"+i.state),t&&e.addClass("highcharts-series-"+t))})),i.state=t,!i.chart.styledMode)){if(o[t]&&!1===o[t].enabled)return;if(t&&(l=o[t].lineWidth||l+(o[t].lineWidthPlus||0),c=B(o[t].opacity,c)),s&&!s.dashstyle&&z(l))for(let t of[s,...this.zones.map((t=>t.graph))])t?.animate({"stroke-width":l},a);n||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach((function(t){t&&t.animate({opacity:c},a)}))}e&&n&&i.points&&i.setAllPointsToState(t||void 0)}setAllPointsToState(t){this.points.forEach((function(e){e.setState&&e.setState(t)}))}setVisible(t,e){let i=this,r=i.chart,s=r.options.chart.ignoreHiddenSeries,n=i.visible;i.visible=t=i.options.visible=i.userOptions.visible=void 0===t?!n:t;let o=t?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach((t=>{i[t]?.[o]()})),(r.hoverSeries===i||r.hoverPoint?.series===i)&&i.onMouseOut(),i.legendItem&&r.legend.colorizeItem(i,t),i.isDirty=!0,i.options.stacking&&r.series.forEach((t=>{t.options.stacking&&t.visible&&(t.isDirty=!0)})),i.linkedSeries.forEach((e=>{e.setVisible(t,!1)})),s&&(r.isDirtyBox=!0),M(i,o),!1!==e&&r.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(t){this.selected=t=this.options.selected=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),M(this,t?"select":"unselect")}shouldShowTooltip(t,e,i={}){return i.series=this,i.visiblePlotOnly=!0,this.chart.isInsidePlot(t,e,i)}drawLegendSymbol(t,e){s[this.options.legendSymbol||"rectangle"]?.call(this,t,e)}}return V.defaultOptions=o,V.types=a.seriesTypes,V.registerType=a.registerSeriesType,E(V.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:!1,invertible:!0,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:n,requireSorting:!0,sorted:!0}),a.series=V,V})),i(e,"Core/Legend/Legend.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/Point.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a){var l;let{animObject:c,setAnimation:h}=t,{registerEventOptions:u}=e,{composed:d,marginNames:p}=i,{distribute:f}=n,{format:m}=o,{addEvent:g,createElement:y,css:_,defined:v,discardElement:x,find:b,fireEvent:w,isNumber:S,merge:C,pick:T,pushUnique:k,relativeLength:E,stableSort:A,syncTimeout:M}=a;class P{constructor(t,e){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=t,this.setOptions(e),e.enabled&&(this.render(),u(this,e),g(this.chart,"endResize",(function(){this.legend.positionCheckboxes()}))),g(this.chart,"render",(()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())}))}setOptions(t){let e=T(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=C(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop,this.itemMarginBottom=t.itemMarginBottom,this.padding=e,this.initialItemY=e-5,this.symbolWidth=T(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted,this.baseline=void 0}update(t,e){let i=this.chart;this.setOptions(C(!0,this.options,t)),"events"in this.options&&u(this,this.options),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,T(e,!0)&&i.redraw(),w(this,"afterUpdate",{redraw:e})}colorizeItem(t,e){let{area:i,group:r,label:s,line:n,symbol:o}=t.legendItem||{};if(r?.[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:r={}}=this,a=r.color,{fillColor:l,fillOpacity:c,lineColor:h,marker:u}=t.options,d=t=>(!e&&(t.fill&&(t.fill=a),t.stroke&&(t.stroke=a)),t);s?.css(C(e?this.itemStyle:r)),n?.attr(d({stroke:h||t.color})),o&&o.attr(d(u&&o.isMarker?t.pointAttribs():{fill:t.color})),i?.attr(d({fill:l||t.color,"fill-opacity":l?1:c??.75}))}w(this,"afterColorizeItem",{item:t,visible:e})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(t){let{group:e,x:i=0,y:r=0}=t.legendItem||{},s=this.options,n=s.symbolPadding,o=!s.rtl,a=t.checkbox;if(e&&e.element){let s={translateX:o?i:this.legendWidth-i-2*n-4,translateY:r};e[v(e.translateY)?"animate":"attr"](s,void 0,(()=>{w(this,"afterPositionItem",{item:t})}))}a&&(a.x=i,a.y=r)}destroyItem(t){let e=t.checkbox,i=t.legendItem||{};for(let t of["group","label","line","symbol"])i[t]&&(i[t]=i[t].destroy());e&&x(e),t.legendItem=void 0}destroy(){for(let t of this.getAllItems())this.destroyItem(t);for(let t of["clipRect","up","down","pager","nav","box","title","group"])this[t]&&(this[t]=this[t].destroy());this.display=null}positionCheckboxes(){let t,e=this.group&&this.group.alignAttr,i=this.clipHeight||this.legendHeight,r=this.titleHeight;e&&(t=e.translateY,this.allItems.forEach((function(s){let n,o=s.checkbox;o&&(n=t+r+o.y+(this.scrollOffset||0)+3,_(o,{left:e.translateX+s.checkboxOffset+o.x-20+"px",top:n+"px",display:this.proximate||n>t-6&&n1.5*b?x.height:b))}layoutItem(t){let e=this.options,i=this.padding,r="horizontal"===e.layout,s=t.itemHeight,n=this.itemMarginBottom,o=this.itemMarginTop,a=r?T(e.itemDistance,20):0,l=this.maxLegendWidth,c=e.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:t.itemWidth,h=t.legendItem||{};r&&this.itemX-i+c>l&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=o+this.lastLineHeight+n),this.lastLineHeight=0),this.lastItemY=o+this.itemY+n,this.lastLineHeight=Math.max(s,this.lastLineHeight),h.x=this.itemX,h.y=this.itemY,r?this.itemX+=c:(this.itemY+=o+s+n,this.lastLineHeight=s),this.offsetWidth=this.widthOption||Math.max((r?this.itemX-i-(t.checkbox?0:a):c)+i,this.offsetWidth)}getAllItems(){let t=[];return this.chart.series.forEach((function(e){let i=e&&e.options;e&&T(i.showInLegend,!v(i.linkedTo)&&void 0,!0)&&(t=t.concat((e.legendItem||{}).labels||("point"===i.legendType?e.data:e)))})),w(this,"afterGetAllItems",{allItems:t}),t}getAlignment(){let t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)}adjustMargins(t,e){let i=this.chart,r=this.options,s=this.getAlignment();s&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((function(n,o){n.test(s)&&!v(t[o])&&(i[p[o]]=Math.max(i[p[o]],i.legend[(o+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][o]*r[o%2?"x":"y"]+T(r.margin,12)+e[o]+(i.titleOffset[o]||0)))}))}proximatePositions(){let t,e=this.chart,i=[],r="left"===this.options.align;for(let s of(this.allItems.forEach((function(t){let s,n,o,a,l=r;t.yAxis&&(t.xAxis.options.reversed&&(l=!l),t.points&&(s=b(l?t.points:t.points.slice(0).reverse(),(function(t){return S(t.plotY)}))),n=this.itemMarginTop+t.legendItem.label.getBBox().height+this.itemMarginBottom,a=t.yAxis.top-e.plotTop,o=t.visible?(s?s.plotY:t.yAxis.height)+(a-.3*n):a+t.yAxis.height,i.push({target:o,size:n,item:t}))}),this),f(i,e.plotHeight)))t=s.item.legendItem||{},S(s.pos)&&(t.y=e.plotTop-e.spacing[0]+s.pos)}render(){let t,e,i,r,s=this.chart,n=s.renderer,o=this.options,a=this.padding,l=this.getAllItems(),c=this.group,h=this.box;this.itemX=a,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=E(o.width,s.spacingBox.width-a),r=s.spacingBox.width-2*a-o.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(r/=2),this.maxLegendWidth=this.widthOption||r,c||(this.group=c=n.g("legend").addClass(o.className||"").attr({zIndex:7}).add(),this.contentGroup=n.g().attr({zIndex:1}).add(c),this.scrollGroup=n.g().add(this.contentGroup)),this.renderTitle(),A(l,((t,e)=>(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0))),o.reversed&&l.reverse(),this.allItems=l,this.display=t=!!l.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,l.forEach(this.renderItem,this),l.forEach(this.layoutItem,this),e=(this.widthOption||this.offsetWidth)+a,i=this.lastItemY+this.lastLineHeight+this.titleHeight,i=this.handleOverflow(i)+a,h||(this.box=h=n.rect().addClass("highcharts-legend-box").attr({r:o.borderRadius}).add(c)),s.styledMode||h.attr({stroke:o.borderColor,"stroke-width":o.borderWidth||0,fill:o.backgroundColor||"none"}).shadow(o.shadow),e>0&&i>0&&h[h.placed?"animate":"attr"](h.crisp.call({},{x:0,y:0,width:e,height:i},h.strokeWidth())),c[t?"show":"hide"](),s.styledMode&&"none"===c.getStyle("display")&&(e=i=0),this.legendWidth=e,this.legendHeight=i,t&&this.align(),this.proximate||this.positionItems(),w(this,"afterRender")}align(t=this.chart.spacingBox){let e=this.chart,i=this.options,r=t.y;/(lth|ct|rth)/.test(this.getAlignment())&&e.titleOffset[0]>0?r+=e.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&e.titleOffset[2]>0&&(r-=e.titleOffset[2]),r!==t.y&&(t=C(t,{y:r})),e.hasRendered||(this.group.placed=!1),this.group.align(C(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,t)}handleOverflow(t){let e,i,r,s=this,n=this.chart,o=n.renderer,a=this.options,l=a.y,c="top"===a.verticalAlign,h=this.padding,u=a.maxHeight,d=a.navigation,p=T(d.animation,!0),f=d.arrowSize||12,m=this.pages,g=this.allItems,y=function(t){"number"==typeof t?b.attr({height:t}):b&&(s.clipRect=b.destroy(),s.contentGroup.clip()),s.contentGroup.div&&(s.contentGroup.div.style.clip=t?"rect("+h+"px,9999px,"+(h+t)+"px,0)":"auto")},_=function(t){return s[t]=o.circle(0,0,1.3*f).translate(f/2,f/2).add(x),n.styledMode||s[t].attr("fill","rgba(0,0,0,0.0001)"),s[t]},v=n.spacingBox.height+(c?-l:l)-h,x=this.nav,b=this.clipRect;return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(v/=2),u&&(v=Math.min(v,u)),m.length=0,t&&v>0&&t>v&&!1!==d.enabled?(this.clipHeight=e=Math.max(v-20-this.titleHeight-h,0),this.currentPage=T(this.currentPage,1),this.fullHeight=t,g.forEach(((t,s)=>{let n=(r=t.legendItem||{}).y||0,o=Math.round(r.label.getBBox().height),a=m.length;(!a||n-m[a-1]>e&&(i||n)!==m[a-1])&&(m.push(i||n),a++),r.pageIx=a-1,i&&((g[s-1].legendItem||{}).pageIx=a-1),s===g.length-1&&n+o-m[a-1]>e&&n>m[a-1]&&(m.push(n),r.pageIx=a),n!==i&&(i=n)})),b||(b=s.clipRect=o.clipRect(0,h-2,9999,0),s.contentGroup.clip(b)),y(e),x||(this.nav=x=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,f,f).add(x),_("upTracker").on("click",(function(){s.scroll(-1,p)})),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation"),!n.styledMode&&d.style&&this.pager.css(d.style),this.pager.add(x),this.down=o.symbol("triangle-down",0,0,f,f).add(x),_("downTracker").on("click",(function(){s.scroll(1,p)}))),s.scroll(0),t=v):x&&(y(),this.nav=x.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t}scroll(t,e){let i=this.chart,r=this.pages,s=r.length,n=this.clipHeight,o=this.options.navigation,a=this.pager,l=this.padding,u=this.currentPage+t;u>s&&(u=s),u>0&&(void 0!==e&&h(e,i),this.nav.attr({translateX:l,translateY:n+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach((function(t){t.attr({class:1===u?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})})),a.attr({text:u+"/"+s}),[this.down,this.downTracker].forEach((function(t){t.attr({x:18+this.pager.getBBox().width,class:u===s?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),this),i.styledMode||(this.up.attr({fill:1===u?o.inactiveColor:o.activeColor}),this.upTracker.css({cursor:1===u?"default":"pointer"}),this.down.attr({fill:u===s?o.inactiveColor:o.activeColor}),this.downTracker.css({cursor:u===s?"default":"pointer"})),this.scrollOffset=-r[u-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=u,this.positionCheckboxes(),M((()=>{w(this,"afterScroll",{currentPage:u})}),c(T(e,i.renderer.globalAnimation,!0)).duration))}setItemEvents(t,e,i){let n=this,o=t.legendItem||{},a=n.chart.renderer.boxWrapper,l=t instanceof s,c=t instanceof r,h="highcharts-legend-"+(l?"point":"series")+"-active",u=n.chart.styledMode,d=i?[e,o.symbol]:[o.group],p=e=>{n.allItems.forEach((i=>{t!==i&&[i].concat(i.linkedSeries||[]).forEach((t=>{t.setState(e,!l)}))}))};for(let i of d)i&&i.on("mouseover",(function(){t.visible&&p("inactive"),t.setState("hover"),t.visible&&a.addClass(h),u||e.css(n.options.itemHoverStyle)})).on("mouseout",(function(){n.chart.styledMode||e.css(C(t.visible?n.itemStyle:n.itemHiddenStyle)),p(""),a.removeClass(h),t.setState()})).on("click",(function(e){a.removeClass(h),w(n,"itemClick",{browserEvent:e,legendItem:t},(function(){t.setVisible&&t.setVisible(),p(t.visible?"inactive":"")})),l?t.firePointEvent("legendItemClick",{browserEvent:e}):c&&w(t,"legendItemClick",{browserEvent:e})}))}createCheckboxForItem(t){t.checkbox=y("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),g(t.checkbox,"click",(function(e){let i=e.target;w(t.series||t,"checkboxClick",{checked:i.checked,item:t},(function(){t.select()}))}))}}return(l=P||(P={})).compose=function(t){k(d,"Core.Legend")&&g(t,"beforeMargins",(function(){this.legend=new l(this,this.options.legend)}))},P})),i(e,"Core/Chart/Chart.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Time.js"],e["Core/Utilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Axis/Tick.js"]],(function(t,e,i,r,s,n,o,a,l,c,h,u,d,p){let{animate:f,animObject:m,setAnimation:g}=t,{defaultOptions:y,defaultTime:_}=i,{numberFormat:v}=r,{registerEventOptions:x}=s,{charts:b,doc:w,marginNames:S,svg:C,win:T}=n,{seriesTypes:k}=l,{addEvent:E,attr:A,createElement:M,css:P,defined:I,diffObjects:L,discardElement:D,erase:z,error:O,extend:R,find:N,fireEvent:B,getStyle:F,isArray:j,isNumber:U,isObject:V,isString:q,merge:G,objectEach:$,pick:H,pInt:W,relativeLength:X,removeEvent:Z,splat:Y,syncTimeout:K,uniqueKey:Q}=u;class J{static chart(t,e,i){return new J(t,e,i)}constructor(t,e,i){this.sharedClips={};let r=[...arguments];(q(t)||t.nodeName)&&(this.renderTo=r.shift()),this.init(r[0],r[1])}setZoomOptions(){let t=this.options.chart,e=t.zooming;this.zooming={...e,type:H(t.zoomType,e.type),key:H(t.zoomKey,e.key),pinchType:H(t.pinchType,e.pinchType),singleTouch:H(t.zoomBySingleTouch,e.singleTouch,!1),resetButton:G(e.resetButton,t.resetZoomButton)}}init(t,e){B(this,"init",{args:arguments},(function(){let i=G(y,t),r=i.chart;this.userOptions=R({},t),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=e,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.time=t.time&&Object.keys(t.time).length?new h(t.time):n.time,this.numberFormatter=r.numberFormatter||v,this.styledMode=r.styledMode,this.hasCartesianSeries=r.showAxes,this.index=b.length,b.push(this),n.chartCount++,x(this,r),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),B(this,"afterInit"),this.firstRender()}))}initSeries(t){let e=this.options.chart,i=t.type||e.type,r=k[i];r||O(17,!0,this,{missingModuleFor:i});let s=new r;return"function"==typeof s.init&&s.init(this,t),s}setSortedData(){this.getSeriesOrderByLinks().forEach((function(t){t.points||t.data||!t.enabledDataSorting||t.setData(t.options.data,!1)}))}getSeriesOrderByLinks(){return this.series.concat().sort((function(t,e){return t.linkedSeries.length||e.linkedSeries.length?e.linkedSeries.length-t.linkedSeries.length:0}))}orderItems(t,e=0){let i=this[t],r=this.options[t]=Y(this.options[t]).slice(),s=this.userOptions[t]=this.userOptions[t]?Y(this.userOptions[t]).slice():[];if(this.hasRendered&&(r.splice(e),s.splice(e)),i)for(let t=e,n=i.length;t=Math.max(l+n,t.pos)&&e<=Math.min(l+n+u.width,t.pos+t.len)||(f.isInsidePlot=!1)}if(!i.ignoreY&&f.isInsidePlot){let t=!r&&i.axis&&!i.axis.isXAxis&&i.axis||h&&(r?h.xAxis:h.yAxis)||{pos:o,len:1/0},e=i.paneCoordinates?t.pos+p:o+p;e>=Math.max(c+o,t.pos)&&e<=Math.min(c+o+u.height,t.pos+t.len)||(f.isInsidePlot=!1)}return B(this,"afterIsInsidePlot",f),f.isInsidePlot}redraw(t){B(this,"beforeRedraw");let e,i,r,s,n=this.hasCartesianSeries?this.axes:this.colorAxis||[],o=this.series,a=this.pointer,l=this.legend,c=this.userOptions.legend,h=this.renderer,u=h.isHidden(),d=[],p=this.isDirtyBox,f=this.isDirtyLegend;for(h.rootFontSize=h.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),g(!!this.hasRendered&&t,this),u&&this.temporaryDisplay(),this.layOutTitles(!1),r=o.length;r--;)if(((s=o[r]).options.stacking||s.options.centerInCategory)&&(i=!0,s.isDirty)){e=!0;break}if(e)for(r=o.length;r--;)(s=o[r]).options.stacking&&(s.isDirty=!0);o.forEach((function(t){t.isDirty&&("point"===t.options.legendType?("function"==typeof t.updateTotals&&t.updateTotals(),f=!0):c&&(c.labelFormatter||c.labelFormat)&&(f=!0)),t.isDirtyData&&B(t,"updatedData")})),f&&l&&l.options.enabled&&(l.render(),this.isDirtyLegend=!1),i&&this.getStacks(),n.forEach((function(t){t.updateNames(),t.setScale()})),this.getMargins(),n.forEach((function(t){t.isDirty&&(p=!0)})),n.forEach((function(t){let e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,d.push((function(){B(t,"afterSetExtremes",R(t.eventArgs,t.getExtremes())),delete t.eventArgs}))),(p||i)&&t.redraw()})),p&&this.drawChartBox(),B(this,"predraw"),o.forEach((function(t){(p||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1})),a&&a.reset(!0),h.draw(),B(this,"redraw"),B(this,"render"),u&&this.temporaryDisplay(!0),d.forEach((function(t){t.call()}))}get(t){let e=this.series;function i(e){return e.id===t||e.options&&e.options.id===t}let r=N(this.axes,i)||N(this.series,i);for(let t=0;!r&&t(e.getPointsCollection().forEach((e=>{H(e.selectedStaging,e.selected)&&t.push(e)})),t)),[])}getSelectedSeries(){return this.series.filter((function(t){return t.selected}))}setTitle(t,e,i){this.applyDescription("title",t),this.applyDescription("subtitle",e),this.applyDescription("caption",void 0),this.layOutTitles(i)}applyDescription(t,e){let i=this,r=this.options[t]=G(this.options[t],e),s=this[t];s&&e&&(this[t]=s=s.destroy()),r&&!s&&((s=this.renderer.text(r.text,0,0,r.useHTML).attr({align:r.align,class:"highcharts-"+t,zIndex:r.zIndex||4}).add()).update=function(e,r){i.applyDescription(t,e),i.layOutTitles(r)},this.styledMode||s.css(R("title"===t?{fontSize:this.options.isStock?"1em":"1.2em"}:{},r.style)),this[t]=s)}layOutTitles(t=!0){let e=[0,0,0],i=this.renderer,r=this.spacingBox;["title","subtitle","caption"].forEach((function(t){let s=this[t],n=this.options[t],o=n.verticalAlign||"top",a="title"===t?"top"===o?-3:0:"top"===o?e[0]+2:0;if(s){s.css({width:(n.width||r.width+(n.widthAdjust||0))+"px"});let t=i.fontMetrics(s).b,l=Math.round(s.getBBox(n.useHTML).height);s.align(R({y:"bottom"===o?t:a+t,height:l},n),!1,"spacingBox"),n.floating||("top"===o?e[0]=Math.ceil(e[0]+l):"bottom"===o&&(e[2]=Math.ceil(e[2]+l)))}}),this),e[0]&&"top"===(this.options.title.verticalAlign||"top")&&(e[0]+=this.options.title.margin),e[2]&&"bottom"===this.options.caption.verticalAlign&&(e[2]+=this.options.caption.margin);let s=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e,B(this,"afterLayOutTitles"),!this.isDirtyBox&&s&&(this.isDirtyBox=this.isDirtyLegend=s,this.hasRendered&&t&&this.isDirtyBox&&this.redraw())}getContainerBox(){return{width:F(this.renderTo,"width",!0)||0,height:F(this.renderTo,"height",!0)||0}}getChartSize(){let t=this.options.chart,e=t.width,i=t.height,r=this.getContainerBox();this.chartWidth=Math.max(0,e||r.width||600),this.chartHeight=Math.max(0,X(i,this.chartWidth)||(r.height>1?r.height:400)),this.containerBox=r}temporaryDisplay(t){let e,i=this.renderTo;if(t)for(;i&&i.style;)i.hcOrigStyle&&(P(i,i.hcOrigStyle),delete i.hcOrigStyle),i.hcOrigDetached&&(w.body.removeChild(i),i.hcOrigDetached=!1),i=i.parentNode;else for(;i&&i.style&&(w.body.contains(i)||i.parentNode||(i.hcOrigDetached=!0,w.body.appendChild(i)),("none"===F(i,"display",!1)||i.hcOricDetached)&&(i.hcOrigStyle={display:i.style.display,height:i.style.height,overflow:i.style.overflow},e={display:"block",overflow:"hidden"},i!==this.renderTo&&(e.height=0),P(i,e),i.offsetWidth||i.style.setProperty("display","block","important")),(i=i.parentNode)!==w.body););}setClassName(t){this.container.className="highcharts-container "+(t||"")}getContainer(){let t,e=this.options,i=e.chart,r="data-highcharts-chart",s=Q(),a=this.renderTo;a||(this.renderTo=a=i.renderTo),q(a)&&(this.renderTo=a=w.getElementById(a)),a||O(13,!0,this);let l=W(A(a,r));U(l)&&b[l]&&b[l].hasRendered&&b[l].destroy(),A(a,r,this.index),a.innerHTML=d.emptyHTML,i.skipClone||a.offsetWidth||this.temporaryDisplay(),this.getChartSize();let h=this.chartHeight,u=this.chartWidth;P(a,{overflow:"hidden",pointerEvents:n.isChrome?"fill":"auto"}),this.styledMode||(t=R({position:"relative",overflow:"hidden",width:u+"px",height:h+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},i.style||{}));let p=M("div",{id:s},t,a);this.container=p,this.getChartSize(),u===this.chartWidth||(u=this.chartWidth,this.styledMode||P(p,{width:H(i.style?.width,u+"px")})),this.containerBox=this.getContainerBox(),this._cursor=p.style.cursor;let f=i.renderer||!C?o.getRendererType(i.renderer):c;if(this.renderer=new f(p,u,h,void 0,i.forExport,e.exporting&&e.exporting.allowHTML,this.styledMode),g(void 0,this),this.setClassName(i.className),this.styledMode)for(let t in e.defs)this.renderer.definition(e.defs[t]);else this.renderer.setStyle(i.style);this.renderer.chartIndex=this.index,B(this,"afterGetContainer")}getMargins(t){let{spacing:e,margin:i,titleOffset:r}=this;this.resetMargins(),r[0]&&!I(i[0])&&(this.plotTop=Math.max(this.plotTop,r[0]+e[0])),r[2]&&!I(i[2])&&(this.marginBottom=Math.max(this.marginBottom,r[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),B(this,"getMargins"),t||this.getAxisMargins()}getAxisMargins(){let t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,r=t.margin,s=function(t){t.forEach((function(t){t.visible&&t.getOffset()}))};t.hasCartesianSeries?s(t.axes):i&&i.length&&s(i),S.forEach((function(i,s){I(r[s])||(t[i]+=e[s])})),t.setChartSize()}getOptions(){return L(this.userOptions,y)}reflow(t){let e=this,i=e.containerBox,r=e.getContainerBox();delete e.pointer?.chartPosition,!e.isPrinting&&!e.isResizing&&i&&r.width&&((r.width!==i.width||r.height!==i.height)&&(u.clearTimeout(e.reflowTimeout),e.reflowTimeout=K((function(){e.container&&e.setSize(void 0,void 0,!1)}),t?100:0)),e.containerBox=r)}setReflow(){let t=this,e=e=>{t.options?.chart.reflow&&t.hasLoaded&&t.reflow(e)};if("function"==typeof ResizeObserver)new ResizeObserver(e).observe(t.renderTo);else{let t=E(T,"resize",e);E(this,"destroy",t)}}setSize(t,e,i){let r=this,s=r.renderer;r.isResizing+=1,g(i,r);let n=s.globalAnimation;r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,void 0!==t&&(r.options.chart.width=t),void 0!==e&&(r.options.chart.height=e),r.getChartSize();let{chartWidth:o,chartHeight:a,scrollablePixelsX:l=0,scrollablePixelsY:c=0}=r;(r.isDirtyBox||o!==r.oldChartWidth||a!==r.oldChartHeight)&&(r.styledMode||(n?f:P)(r.container,{width:`${o+l}px`,height:`${a+c}px`},n),r.setChartSize(!0),s.setSize(o,a,n),r.axes.forEach((function(t){t.isDirty=!0,t.setScale()})),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.layOutTitles(),r.getMargins(),r.redraw(n),r.oldChartHeight=void 0,B(r,"resize"),setTimeout((()=>{r&&B(r,"endResize")}),m(n).duration)),r.isResizing-=1}setChartSize(t){let e,i,r,s,{chartHeight:n,chartWidth:o,inverted:a,spacing:l,renderer:c}=this,h=this.clipOffset,u=Math[a?"floor":"round"];this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=r=Math.max(0,Math.round(o-e-this.marginRight)),this.plotHeight=s=Math.max(0,Math.round(n-i-this.marginBottom)),this.plotSizeX=a?s:r,this.plotSizeY=a?r:s,this.spacingBox=c.spacingBox={x:l[3],y:l[0],width:o-l[3]-l[1],height:n-l[0]-l[2]},this.plotBox=c.plotBox={x:e,y:i,width:r,height:s},h&&(this.clipBox={x:u(h[3]),y:u(h[0]),width:u(this.plotSizeX-h[1]-h[3]),height:u(this.plotSizeY-h[0]-h[2])}),t||(this.axes.forEach((function(t){t.setAxisSize(),t.setAxisTranslation()})),c.alignElements()),B(this,"afterSetChartSize",{skipAxes:t})}resetMargins(){B(this,"resetMargins");let t=this,e=t.options.chart,i=e.plotBorderWidth||0,r=i/2;["margin","spacing"].forEach((function(i){let r=e[i],s=V(r)?r:[r,r,r,r];["Top","Right","Bottom","Left"].forEach((function(r,n){t[i][n]=H(e[i+r],s[n])}))})),S.forEach((function(e,i){t[e]=H(t.margin[i],t.spacing[i])})),t.axisOffset=[0,0,0,0],t.clipOffset=[r,r,r,r],t.plotBorderWidth=i}drawChartBox(){let t,e,i,r=this.options.chart,s=this.renderer,n=this.chartWidth,o=this.chartHeight,a=this.styledMode,l=this.plotBGImage,c=r.backgroundColor,h=r.plotBackgroundColor,u=r.plotBackgroundImage,d=this.plotLeft,p=this.plotTop,f=this.plotWidth,m=this.plotHeight,g=this.plotBox,y=this.clipRect,_=this.clipBox,v=this.chartBackground,x=this.plotBackground,b=this.plotBorder,w="animate";v||(this.chartBackground=v=s.rect().addClass("highcharts-background").add(),w="attr"),a?t=e=v.strokeWidth():(e=(t=r.borderWidth||0)+(r.shadow?8:0),i={fill:c||"none"},(t||v["stroke-width"])&&(i.stroke=r.borderColor,i["stroke-width"]=t),v.attr(i).shadow(r.shadow)),v[w]({x:e/2,y:e/2,width:n-e-t%2,height:o-e-t%2,r:r.borderRadius}),w="animate",x||(w="attr",this.plotBackground=x=s.rect().addClass("highcharts-plot-background").add()),x[w](g),!a&&(x.attr({fill:h||"none"}).shadow(r.plotShadow),u&&(l?(u!==l.attr("href")&&l.attr("href",u),l.animate(g)):this.plotBGImage=s.image(u,d,p,f,m).add())),y?y.animate({width:_.width,height:_.height}):this.clipRect=s.clipRect(_),w="animate",b||(w="attr",this.plotBorder=b=s.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),a||b.attr({stroke:r.plotBorderColor,"stroke-width":r.plotBorderWidth||0,fill:"none"}),b[w](b.crisp({x:d,y:p,width:f,height:m},-b.strokeWidth())),this.isDirtyBox=!1,B(this,"afterDrawChartBox")}propFromSeries(){let t,e,i,r=this,s=r.options.chart,n=r.options.series;["inverted","angular","polar"].forEach((function(o){for(e=k[s.type],i=s[o]||e&&e.prototype[o],t=n&&n.length;!i&&t--;)(e=k[n[t].type])&&e.prototype[o]&&(i=!0);r[o]=i}))}linkSeries(t){let e=this,i=e.series;i.forEach((function(t){t.linkedSeries.length=0})),i.forEach((function(t){let{linkedTo:i}=t.options;if(q(i)){let r;(r=":previous"===i?e.series[t.index-1]:e.get(i))&&r.linkedParent!==t&&(r.linkedSeries.push(t),t.linkedParent=r,r.enabledDataSorting&&t.setDataSortingOptions(),t.visible=H(t.options.visible,r.options.visible,t.visible))}})),B(this,"afterLinkSeries",{isUpdating:t})}renderSeries(){this.series.forEach((function(t){t.translate(),t.render()}))}render(){let t,e=this.axes,i=this.colorAxis,r=this.renderer,s=this.options.chart.axisLayoutRuns||2,n=t=>{t.forEach((t=>{t.visible&&t.render()}))},o=0,a=!0,l=0;for(let t of(this.setTitle(),B(this,"beforeMargins"),this.getStacks?.(),this.getMargins(!0),this.setChartSize(),e)){let{options:e}=t,{labels:i}=e;if(this.hasCartesianSeries&&t.horiz&&t.visible&&i.enabled&&t.series.length&&"colorAxis"!==t.coll&&!this.polar){o=e.tickLength,t.createGroups();let r=new p(t,0,"",!0),s=r.createLabel("x",i);if(r.destroy(),s&&H(i.reserveSpace,!U(e.crossing))&&(o=s.getBBox().height+i.distance+Math.max(e.offset||0,0)),o){s?.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-o,0);(a||t||s>1)&&l(l?1:1.1),t=r/this.plotHeight>(l?1:1.05),l++}this.drawChartBox(),this.hasCartesianSeries?n(e):i&&i.length&&n(i),this.seriesGroup||(this.seriesGroup=r.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(t){let e=this,i=G(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",(function(){i.href&&(T.location.href=i.href)})).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})}destroy(){let t,e=this,i=e.axes,r=e.series,s=e.container,o=s&&s.parentNode;for(B(e,"destroy"),e.renderer.forExport?z(b,e):b[e.index]=void 0,n.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),Z(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=r.length;t--;)r[t]=r[t].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach((function(t){let i=e[t];i&&i.destroy&&(e[t]=i.destroy())})),s&&(s.innerHTML=d.emptyHTML,Z(s),o&&D(s)),$(e,(function(t,i){delete e[i]}))}firstRender(){let t=this,e=t.options;t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes();let i=j(e.series)?e.series:[];e.series=[],i.forEach((function(e){t.initSeries(e)})),t.linkSeries(),t.setSortedData(),B(t,"beforeRender"),t.render(),t.pointer?.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach((function(t){t&&void 0!==this.index&&t.apply(this,[this])}),this),B(this,"load"),B(this,"render"),I(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:t,title:e}=this;!t||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(e&&e.element.textContent||"").replace(/this.transform({reset:!0,trigger:"zoom"})))}pan(t,e){let i=this,r="object"==typeof e?e:{enabled:e,type:"x"},s=r.type,n=s&&i[{x:"xAxis",xy:"axes",y:"yAxis"}[s]].filter((t=>t.options.panningEnabled&&!t.options.isInternal)),o=i.options.chart;o?.panning&&(o.panning=r),B(this,"pan",{originalEvent:t},(()=>{i.transform({axes:n,event:t,to:{x:t.chartX-(i.mouseDownX||0),y:t.chartY-(i.mouseDownY||0)},trigger:"pan"}),P(i.container,{cursor:"move"})}))}transform(t){let e,i,{axes:r=this.axes,event:s,from:n={},reset:o,selection:a,to:l={},trigger:c}=t,{inverted:h}=this,u=!1;for(let t of(this.hoverPoints?.forEach((t=>t.setState())),r)){let{horiz:r,len:d,minPointOffset:p=0,options:f,reversed:m}=t,g=r?"width":"height",y=r?"x":"y",_=H(l[g],t.len),v=H(n[g],t.len),x=10>Math.abs(_)?1:_/v,b=(n[y]||0)+v/2-t.pos,w=b-((l[y]??t.pos)+_/2-t.pos)/x,S=m&&!h||!m&&h?-1:1;if(!o&&(b<0||b>t.len))continue;let C=t.toValue(w,!0)+(a?0:p*S),T=t.toValue(w+d/x,!0)-(a?0:p*S||0),k=t.allExtremes;if(C>T&&([C,T]=[T,C]),1===x&&!o&&"yAxis"===t.coll&&!k){for(let e of t.series){let t=e.getExtremes(e.getProcessedData(!0).yData,!0);k??(k={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),U(t.dataMin)&&U(t.dataMax)&&(k.dataMin=Math.min(t.dataMin,k.dataMin),k.dataMax=Math.max(t.dataMax,k.dataMax))}t.allExtremes=k}let{dataMin:E,dataMax:A,min:M,max:P}=R(t.getExtremes(),k||{}),L=E??f.min,D=A??f.max,z=T-C,O=t.categories?0:Math.min(z,D-L),N=L-O*(I(f.min)?0:f.minPadding),B=D+O*(I(f.max)?0:f.maxPadding),F=t.allowZoomOutside||1===x||"zoom"!==c&&x>1,j=Math.min(f.min??N,N,F?M:N),V=Math.max(f.max??B,B,F?P:B);(!t.isOrdinal||1!==x||o)&&(C=1&&(T=C+z)),T>V&&(T=V,x>=1&&(C=T-z)),(o||t.series.length&&(C!==M||T!==P)&&C>=j&&T<=V)&&(a?a[t.coll].push({axis:t,min:C,max:T}):(t.isPanning="zoom"!==c,t.isPanning&&(i=!0),t.setExtremes(o?void 0:C,o?void 0:T,!1,!1,{move:w,trigger:c,scale:x}),!o&&(C>j||T{delete t.selection,t.trigger="zoom",this.transform(t)})):(!e||i||this.resetZoomButton?!e&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw("zoom"===c&&(this.options.chart.animation??this.pointCount<100)))),u}}return R(J.prototype,{callbacks:[],collectionsWithInit:{xAxis:[J.prototype.addAxis,[!0]],yAxis:[J.prototype.addAxis,[!1]],series:[J.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]}),J})),i(e,"Extensions/ScrollablePlotArea.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{stop:s}=t,{composed:n}=e,{addEvent:o,createElement:a,css:l,defined:c,merge:h,pushUnique:u}=r;function d(){let t=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!t&&(this.scrollablePlotArea=t=new f(this)),t?.applyFixed()}function p(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class f{static compose(t,e,i){u(n,this.compose)&&(o(t,"afterInit",p),o(e,"afterSetChartSize",(t=>this.afterSetSize(t.target,t))),o(e,"render",d),o(i,"show",p))}static afterSetSize(t,e){let i,r,s,{minWidth:n,minHeight:o}=t.options.chart.scrollablePlotArea||{},{clipBox:a,plotBox:l,inverted:u,renderer:d}=t;if(!d.forExport&&(n?(t.scrollablePixelsX=i=Math.max(0,n-t.chartWidth),i&&(t.scrollablePlotBox=h(t.plotBox),l.width=t.plotWidth+=i,a[u?"height":"width"]+=i,s=!0)):o&&(t.scrollablePixelsY=r=Math.max(0,o-t.chartHeight),c(r)&&(t.scrollablePlotBox=h(t.plotBox),l.height=t.plotHeight+=r,a[u?"width":"height"]+=r,s=!1)),c(s)&&!e.skipAxes))for(let e of t.axes)e.horiz===s&&(e.setAxisSize(),e.setAxisTranslation())}constructor(t){let e,r=t.options.chart,s=i.getRendererType(),n=r.scrollablePlotArea||{},c=this.moveFixedElements.bind(this),h={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};t.scrollablePixelsX&&(h.overflowX="auto"),t.scrollablePixelsY&&(h.overflowY="auto"),this.chart=t;let u=this.parentDiv=a("div",{className:"highcharts-scrolling-parent"},{position:"relative"},t.renderTo),d=this.scrollingContainer=a("div",{className:"highcharts-scrolling"},h,u),p=this.innerContainer=a("div",{className:"highcharts-inner-container"},void 0,d),f=this.fixedDiv=a("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(r.style?.zIndex||0)+2,top:0},void 0,!0),m=this.fixedRenderer=new s(f,t.chartWidth,t.chartHeight,r.style);this.mask=m.path().attr({fill:r.backgroundColor||"#fff","fill-opacity":n.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),d.parentNode.insertBefore(f,d),l(t.renderTo,{overflow:"visible"}),o(t,"afterShowResetZoom",c),o(t,"afterApplyDrilldown",c),o(t,"afterLayOutTitles",c),o(d,"scroll",(()=>{let{pointer:i,hoverPoint:r}=t;i&&(delete i.chartPosition,r&&(e=r),i.runPointActions(void 0,e,!0))})),p.appendChild(t.container)}applyFixed(){let{chart:t,fixedRenderer:e,isDirty:i,scrollingContainer:r}=this,{axisOffset:n,chartWidth:o,chartHeight:a,container:h,plotHeight:u,plotLeft:d,plotTop:p,plotWidth:f,scrollablePixelsX:m=0,scrollablePixelsY:g=0}=t,{scrollPositionX:y=0,scrollPositionY:_=0}=t.options.chart.scrollablePlotArea||{},v=o+m,x=a+g;e.setSize(o,a),(i??!0)&&(this.isDirty=!1,this.moveFixedElements()),s(t.container),l(h,{width:`${v}px`,height:`${x}px`}),t.renderer.boxWrapper.attr({width:v,height:x,viewBox:[0,0,v,x].join(" ")}),t.chartBackground?.attr({width:v,height:x}),l(r,{width:`${o}px`,height:`${a}px`}),c(i)||(r.scrollLeft=m*y,r.scrollTop=g*_);let b=p-n[0]-1,w=d-n[3]-1,S=p+u+n[2]+1,C=d+f+n[1]+1,T=d+f-m,k=p+u-g,E=[["M",0,0]];m?E=[["M",0,b],["L",d-1,b],["L",d-1,S],["L",0,S],["Z"],["M",T,b],["L",o,b],["L",o,S],["L",T,S],["Z"]]:g&&(E=[["M",w,0],["L",w,p-1],["L",C,p-1],["L",C,0],["Z"],["M",w,k],["L",w,a],["L",C,a],["L",C,k],["Z"]]),"adjustHeight"!==t.redrawTrigger&&this.mask.attr({d:E})}moveFixedElements(){let t,{container:e,inverted:i,scrollablePixelsX:r,scrollablePixelsY:s}=this.chart,n=this.fixedRenderer,o=f.fixedSelectors;for(let a of(r&&!i?t=".highcharts-yaxis":r&&i||s&&!i?t=".highcharts-xaxis":s&&i&&(t=".highcharts-yaxis"),t&&o.push(`${t}:not(.highcharts-radial-axis)`,`${t}-labels:not(.highcharts-radial-axis-labels)`),o))[].forEach.call(e.querySelectorAll(a),(t=>{(t.namespaceURI===n.SVG_NS?n.box:n.box.parentNode).appendChild(t),t.style.pointerEvents="auto"}))}}return f.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"],f})),i(e,"Core/Axis/Stacking/StackItem.js",[e["Core/Templating.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{format:r}=t,{series:s}=e,{destroyObjectProperties:n,fireEvent:o,isNumber:a,pick:l}=i;return class{constructor(t,e,i,r,s){let n=t.chart.inverted,o=t.reversed;this.axis=t;let a=this.isNegative=!!i!=!!o;this.options=e=e||{},this.x=r,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=s,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(n?a?"left":"right":"center"),verticalAlign:e.verticalAlign||(n?"middle":a?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(n?a?"right":"left":"center")}destroy(){n(this,this.axis)}render(t){let e=this.axis.chart,i=this.options,s=i.format,n=s?r(s,this,e):i.formatter.call(this);if(this.label)this.label.attr({text:n,visibility:"hidden"});else{this.label=e.renderer.label(n,null,void 0,i.shape,void 0,void 0,i.useHTML,!1,"stack-labels");let r={r:i.borderRadius||0,text:n,padding:l(i.padding,5),visibility:"hidden"};e.styledMode||(r.fill=i.backgroundColor,r.stroke=i.borderColor,r["stroke-width"]=i.borderWidth,this.label.css(i.style||{})),this.label.attr(r),this.label.added||this.label.add(t)}this.label.labelrank=e.plotSizeY,o(this,"afterRender")}setOffset(t,e,i,r,n,c){let{alignOptions:h,axis:u,label:d,options:p,textAlign:f}=this,m=u.chart,g=this.getStackBox({xOffset:t,width:e,boxBottom:i,boxTop:r,defaultX:n,xAxis:c}),{verticalAlign:y}=h;if(d&&g){let t,e=d.getBBox(void 0,0),i=d.padding,r="justify"===l(p.overflow,"justify");h.x=p.x||0,h.y=p.y||0;let{x:n,y:o}=this.adjustStackPosition({labelBox:e,verticalAlign:y,textAlign:f});g.x-=n,g.y-=o,d.align(h,!1,g),(t=m.isInsidePlot(d.alignAttr.x+h.x+n,d.alignAttr.y+h.y+o))||(r=!1),r&&s.prototype.justifyDataLabel.call(u,d,h,d.alignAttr,e,g),d.attr({x:d.alignAttr.x,y:d.alignAttr.y,rotation:p.rotation,rotationOriginX:e.width*{left:0,center:.5,right:1}[p.textAlign||"center"],rotationOriginY:e.height/2}),l(!r&&p.crop,!0)&&(t=a(d.x)&&a(d.y)&&m.isInsidePlot(d.x-i+(d.width||0),d.y)&&m.isInsidePlot(d.x+i,d.y)),d[t?"show":"hide"]()}o(this,"afterSetOffset",{xOffset:t,width:e})}adjustStackPosition({labelBox:t,verticalAlign:e,textAlign:i}){let r={bottom:0,middle:1,top:2,right:1,center:0,left:-1},s=r[e],n=r[i];return{x:t.width/2+t.width/2*n,y:t.height/2*s}}getStackBox(t){let e=this.axis,i=e.chart,{boxTop:r,defaultX:s,xOffset:n,width:o,boxBottom:c}=t,h=e.stacking.usePercentage?100:l(r,this.total,0),u=e.toPixels(h),d=t.xAxis||i.xAxis[0],p=l(s,d.translate(this.x))+n,f=Math.abs(u-e.toPixels(c||a(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),m=i.inverted,g=this.isNegative;return m?{x:(g?u:u-f)-i.plotLeft,y:d.height-p-o+d.top-i.plotTop,width:f,height:o}:{x:p+d.transB-i.plotLeft,y:(g?u-f:u)-i.plotTop,width:o,height:f}}}})),i(e,"Core/Axis/Stacking/StackingAxis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s){var n;let{getDeferredAnimation:o}=t,{series:{prototype:a}}=i,{addEvent:l,correctFloat:c,defined:h,destroyObjectProperties:u,fireEvent:d,isArray:p,isNumber:f,objectEach:m,pick:g}=s;function y(){let t=this.inverted;this.axes.forEach((t=>{t.stacking&&t.stacking.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)})),this.series.forEach((e=>{let i=e.xAxis&&e.xAxis.options||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,g(e.options.stack,""),t?i.top:i.left,t?i.height:i.width].join(","))}))}function _(){let t=this.stacking;if(t){let e=t.stacks;m(e,((t,i)=>{u(t),delete e[i]})),t.stackTotalGroup?.destroy()}}function v(){this.stacking||(this.stacking=new T(this))}function x(t,e,i,r){return!h(t)||t.x!==e||r&&t.stackKey!==r?t={x:e,index:0,key:r,stackKey:r}:t.index++,t.key=[i,e,t.index].join(","),t}function b(){let t,e=this,i=e.yAxis,r=e.stackKey||"",s=i.stacking.stacks,n=e.processedXData,o=e.options.stacking,a=e[o+"Stacker"];a&&[r,"-"+r].forEach((i=>{let r,o,l,c=n.length;for(;c--;)r=n[c],t=e.getStackIndicator(t,r,e.index,i),o=s[i]?.[r],(l=o?.points[t.key||""])&&a.call(e,l,o,c)}))}function w(t,e,i){let r=e.total?100/e.total:0;t[0]=c(t[0]*r),t[1]=c(t[1]*r),this.stackedYData[i]=t[1]}function S(t){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&!this.options.stacking&&this.chart.series.length>1?a.setStackedPoints.call(this,t,"group"):t.stacking.resetStacks())}function C(t,e){let i,s,n,o,a,l,u,d,f,m=e||this.options.stacking;if(!m||!this.reserveSpace()||({group:"xAxis"}[m]||"yAxis")!==t.coll)return;let y=this.processedXData,_=this.processedYData,v=[],x=_.length,b=this.options,w=b.threshold||0,S=b.startFromThreshold?w:0,C=b.stack,T=e?`${this.type},${m}`:this.stackKey||"",k="-"+T,E=this.negStacks,A=t.stacking,M=A.stacks,P=A.oldStacks;for(A.stacksTouched+=1,u=0;u0&&!1===this.singleStacks&&(n.points[l][0]=n.points[this.index+","+d+",0"][0])):(delete n.points[l],delete n.points[this.index]);let e=n.total||0;"percent"===m?(o=s?T:k,e=E&&M[o]?.[d]?(o=M[o][d]).total=Math.max(o.total||0,e)+Math.abs(f)||0:c(e+(Math.abs(f)||0))):"group"===m?(p(f)&&(f=f[0]),null!==f&&e++):e=c(e+(f||0)),n.cumulative="group"===m?(e||1)-1:c(g(n.cumulative,S)+(f||0)),n.total=e,null!==f&&(n.points[l].push(n.cumulative),v[u]=n.cumulative,n.hasValidPoints=!0)}"percent"===m&&(A.usePercentage=!0),"group"!==m&&(this.stackedYData=v),A.oldStacks={}}class T{constructor(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}buildStacks(){let t,e,i=this.axis,r=i.series,s="xAxis"===i.coll,n=i.options.reversedStacks,o=r.length;for(this.resetStacks(),this.usePercentage=!1,e=o;e--;)t=r[n?e:o-e-1],s&&t.setGroupedPoints(i),t.setStackedPoints(i);if(!s)for(e=0;e{m(t,(t=>{t.cumulative=t.total}))})))}resetStacks(){m(this.stacks,(t=>{m(t,((e,i)=>{f(e.touched)&&e.touched{m(t,(t=>{t.render(n)}))})),n.animate({opacity:1},s)}}return(n||(n={})).compose=function(t,e,i){let r=e.prototype,s=i.prototype;r.getStacks||(l(t,"init",v),l(t,"destroy",_),r.getStacks=y,s.getStackIndicator=x,s.modifyStacks=b,s.percentStacker=w,s.setGroupedPoints=S,s.setStackedPoints=C)},n})),i(e,"Series/Line/LineSeries.js",[e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{defined:r,merge:s,isObject:n}=i;class o extends t{drawGraph(){let t=this.options,e=(this.gappedPath||this.getGraphPath).call(this),i=this.chart.styledMode;[this,...this.zones].forEach(((r,o)=>{let a,l=r.graph,c=l?"animate":"attr",h=r.dashStyle||t.dashStyle;l?(l.endX=this.preventGraphAnimation?null:e.xMap,l.animate({d:e})):e.length&&(r.graph=l=this.chart.renderer.path(e).addClass("highcharts-graph"+(o?` highcharts-zone-graph-${o-1} `:" ")+(o&&r.className||"")).attr({zIndex:1}).add(this.group)),l&&!i&&(a={stroke:!o&&t.lineColor||r.color||this.color||"#cccccc","stroke-width":t.lineWidth||0,fill:this.fillGraph&&this.color||"none"},h?a.dashstyle=h:"square"!==t.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),l[c](a).shadow(o<2&&t.shadow&&s({filterUnits:"userSpaceOnUse"},n(t.shadow)?t.shadow:{}))),l&&(l.startX=e.xMap,l.isArea=e.isArea)}))}getGraphPath(t,e,i){let s,n=this,o=n.options,a=[],l=[],c=o.step,h=(t=t||n.points).reversed;return h&&t.reverse(),(c={right:1,center:2}[c]||c&&3)&&h&&(c=4-c),(t=this.getValidPoints(t,!1,!(o.connectNulls&&!e&&!i))).forEach((function(h,u){let d,p=h.plotX,f=h.plotY,m=t[u-1],g=h.isNull||"number"!=typeof f;(h.leftCliff||m&&m.rightCliff)&&!i&&(s=!0),g&&!r(e)&&u>0?s=!o.connectNulls:g&&!e?s=!0:(0===u||s?d=[["M",h.plotX,h.plotY]]:n.getPointSpline?d=[n.getPointSpline(t,h,u)]:c?(d=1===c?[["L",m.plotX,f]]:2===c?[["L",(m.plotX+p)/2,m.plotY],["L",(m.plotX+p)/2,f]]:[["L",p,m.plotY]]).push(["L",p,f]):d=[["L",p,f]],l.push(h.x),c&&(l.push(h.x),2===c&&l.push(h.x)),a.push.apply(a,d),s=!1)})),a.xMap=l,n.graphPath=a,a}}return o.defaultOptions=s(t.defaultOptions,{legendSymbol:"lineMarker"}),e.registerSeriesType("line",o),o})),i(e,"Series/Area/AreaSeriesDefaults.js",[],(function(){return{threshold:0,legendSymbol:"areaMarker"}})),i(e,"Series/Area/AreaSeries.js",[e["Series/Area/AreaSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{seriesTypes:{line:r}}=e,{extend:s,merge:n,objectEach:o,pick:a}=i;class l extends r{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:t,options:e}=this;[this,...this.zones].forEach(((i,r)=>{let s={},n=i.fillColor||e.fillColor,o=i.area,a=o?"animate":"attr";o?(o.endX=this.preventGraphAnimation?null:t.xMap,o.animate({d:t})):(s.zIndex=0,(o=i.area=this.chart.renderer.path(t).addClass("highcharts-area"+(r?` highcharts-zone-area-${r-1} `:" ")+(r&&i.className||"")).add(this.group)).isArea=!0),this.chart.styledMode||(s.fill=n||i.color||this.color,s["fill-opacity"]=n?1:e.fillOpacity??.75,o.css({pointerEvents:this.stickyTracking?"none":"auto"})),o[a](s),o.startX=t.xMap,o.shiftUnit=e.step?2:1}))}getGraphPath(t){let e,i,s,n=r.prototype.getGraphPath,o=this.options,l=o.stacking,c=this.yAxis,h=[],u=[],d=this.index,p=c.stacking.stacks[this.stackKey],f=o.threshold,m=Math.round(c.getThreshold(o.threshold)),g=a(o.connectNulls,"percent"===l),y=function(i,r,s){let n,o,a=t[i],g=l&&p[a.x].points[d],y=a[s+"Null"]||0,_=a[s+"Cliff"]||0,v=!0;_||y?(n=(y?g[0]:g[1])+_,o=g[0]+_,v=!!y):!l&&t[r]&&t[r].isNull&&(n=o=f),void 0!==n&&(u.push({plotX:e,plotY:null===n?m:c.getThreshold(n),isNull:v,isCliff:!0}),h.push({plotX:e,plotY:null===o?m:c.getThreshold(o),doCurve:!1}))};t=t||this.points,l&&(t=this.getStackPoints(t));for(let r=0,n=t.length;r1&&l&&u.some((t=>t.isCliff))&&(b.hasStackedCliffs=w.hasStackedCliffs=!0),b.xMap=_.xMap,this.areaPath=b,w}getStackPoints(t){let e=this,i=[],r=[],s=this.xAxis,n=this.yAxis,l=n.stacking.stacks[this.stackKey],c={},h=n.series,u=h.length,d=n.options.reversedStacks?1:-1,p=h.indexOf(e);if(t=t||this.points,this.options.stacking){for(let e=0;et.visible));r.forEach((function(t,o){let m,g,y=0;if(c[t]&&!c[t].isNull)i.push(c[t]),[-1,1].forEach((function(i){let s=1===i?"rightNull":"leftNull",n=l[r[o+i]],a=0;if(n){let i=p;for(;i>=0&&i=0&&ei&&n>c?(n=Math.max(i,c),a=2*c-n):nd&&a>c?(a=Math.max(d,c),n=2*c-a):a1){let s=this.xAxis.series.filter((t=>t.visible)).map((t=>t.index)),n=0,o=0;v(this.xAxis.stacking?.stacks,(t=>{if("number"==typeof i.x){let e=t[i.x.toString()];if(e&&m(e.points[this.index])){let t=Object.keys(e.points).filter((t=>!t.match(",")&&e.points[t]&&e.points[t].length>1)).map(parseFloat).filter((t=>-1!==s.indexOf(t))).sort(((t,e)=>e-t));n=t.indexOf(this.index),o=t.length}}})),n=this.xAxis.reversed?o-1-n:n;let a=(o-1)*r.paddedWidth+e;t=(i.plotX||0)+a/2-e-n*r.paddedWidth}return t}translate(){let t=this,e=t.chart,i=t.options,r=t.dense=t.closestPointRange*t.xAxis.transA<2,n=t.borderWidth=_(i.borderWidth,r?0:1),o=t.xAxis,a=t.yAxis,l=i.threshold,c=_(i.minPointLength,5),u=t.getColumnMetrics(),p=u.width,m=t.pointXOffset=u.offset,y=t.dataMin,v=t.dataMax,x=t.translatedThreshold=a.getThreshold(l),b=t.barW=Math.max(p,1+2*n);i.pointPadding&&(b=Math.ceil(b)),s.prototype.translate.apply(t),t.points.forEach((function(r){let s,n=_(r.yBottom,x),f=999+Math.abs(n),w=r.plotX||0,S=h(r.plotY,-f,a.len+f),C=Math.min(S,n),T=Math.max(S,n)-C,k=p,E=w+m,A=b;c&&Math.abs(T)c?n-c:x-(s?c:0)),d(r.options.pointWidth)&&(E-=Math.round(((k=A=Math.ceil(r.options.pointWidth))-p)/2)),i.centerInCategory&&!i.stacking&&(E=t.adjustForMissingColumns(E,k,r,u)),r.barX=E,r.pointWidth=k,r.tooltipPos=e.inverted?[h(a.len+a.pos-e.plotLeft-S,a.pos-e.plotLeft,a.len+a.pos-e.plotLeft),o.len+o.pos-e.plotTop-E-A/2,T]:[o.left-e.plotLeft+E+A/2,h(S+a.pos-e.plotTop,a.pos-e.plotTop,a.len+a.pos-e.plotTop),T],r.shapeType=t.pointClass.prototype.shapeType||"roundedRect",r.shapeArgs=t.crispCol(E,r.isNull?x:C,A,r.isNull?0:T)})),f(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(t,e){let i,r,s,n=this.options,o=this.pointAttrToOptions||{},a=o.stroke||"borderColor",c=o["stroke-width"]||"borderWidth",h=t&&t.color||this.color,u=t&&t[a]||n[a]||h,d=t&&t.options.dashStyle||n.dashStyle,p=t&&t[c]||n[c]||this[c]||0,f=_(t&&t.opacity,n.opacity,1);t&&this.zones.length&&(r=t.getZone(),h=t.options.color||r&&(r.color||t.nonZonedColor)||this.color,r&&(u=r.borderColor||u,d=r.dashStyle||d,p=r.borderWidth||p)),e&&t&&(s=(i=y(n.states[e],t.options.states&&t.options.states[e]||{})).brightness,h=i.color||void 0!==s&&l(h).brighten(i.brightness).get()||h,u=i[a]||u,p=i[c]||p,d=i.dashStyle||d,f=_(i.opacity,f));let m={fill:h,stroke:u,"stroke-width":p,opacity:f};return d&&(m.dashstyle=d),m}drawPoints(t=this.points){let e,i=this,r=this.chart,s=i.options,n=r.renderer,o=s.animationLimit||250;t.forEach((function(t){let a=t.plotY,l=t.graphic,c=!!l,h=l&&r.pointCountt?.enabled))}function i(t,e,i,r,s){let{chart:n,enabledDataSorting:l}=this,c=this.isCartesian&&n.inverted,h=t.plotX,d=t.plotY,f=i.rotation||0,m=o(h)&&o(d)&&n.isInsidePlot(h,Math.round(d),{inverted:c,paneCoordinates:!0,series:this}),g=0===f&&"justify"===p(i.overflow,l?"none":"justify"),y=this.visible&&!1!==t.visible&&o(h)&&(t.series.forceDL||l&&!g||m||p(i.inside,!!this.options.stacking)&&r&&n.isInsidePlot(h,c?r.x+1:r.y+r.height-1,{inverted:c,paneCoordinates:!0,series:this})),_=t.pos();if(y&&_){var v;let o=e.getBBox(),h=e.getBBox(void 0,0),d={right:1,center:.5}[i.align||0]||0,x={bottom:1,middle:.5}[i.verticalAlign||0]||0;if(r=a({x:_[0],y:Math.round(_[1]),width:0,height:0},r||{}),"plotEdges"===i.alignTo&&this.isCartesian&&(r[c?"x":"y"]=0,r[c?"width":"height"]=this.yAxis?.len||0),a(i,{width:o.width,height:o.height}),v=r,l&&this.xAxis&&!g&&this.setDataLabelStartPos(t,e,s,m,v),e.align(u(i,{width:h.width,height:h.height}),!1,r,!1),e.alignAttr.x+=d*(h.width-o.width),e.alignAttr.y+=x*(h.height-o.height),e[e.placed?"animate":"attr"]({x:e.alignAttr.x+(o.width-h.width)/2,y:e.alignAttr.y+(o.height-h.height)/2,rotationOriginX:(e.width||0)/2,rotationOriginY:(e.height||0)/2}),g&&r.height>=0)this.justifyDataLabel(e,i,e.alignAttr,o,r,s);else if(p(i.crop,!0)){let{x:t,y:i}=e.alignAttr;y=n.isInsidePlot(t,i,{paneCoordinates:!0,series:this})&&n.isInsidePlot(t+o.width-1,i+o.height-1,{paneCoordinates:!0,series:this})}i.shape&&!f&&e[s?"attr":"animate"]({anchorX:_[0],anchorY:_[1]})}s&&l&&(e.placed=!1),y||l&&!g?(e.show(),e.placed=!0):(e.hide(),e.placed=!1)}function r(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function g(t){let e=this.hasRendered||0,i=this.initDataLabelsGroup().attr({opacity:+e});return!e&&i&&(this.visible&&i.show(),this.options.animation?i.animate({opacity:1},t):i.attr({opacity:1})),i}function y(t){let e;t=t||this.points;let i=this,r=i.chart,a=i.options,c=r.renderer,{backgroundColor:u,plotBackgroundColor:g}=r.options.chart,y=c.getContrast(h(g)&&g||h(u)&&u||"#000000"),_=x(i),{animation:b,defer:w}=_[0],S=w?s(r,b,i):{defer:0,duration:0};l(this,"drawDataLabels"),i.hasDataLabels?.()&&(e=this.initDataLabels(S),t.forEach((t=>{let s=t.dataLabels||[];m(v(_,t.dlOptions||t.options?.dataLabels)).forEach(((u,m)=>{let g,_,v,x,b,w=u.enabled&&(t.visible||t.dataLabelOnHidden)&&(!t.isNull||t.dataLabelOnNull)&&function(t,e){let i=e.filter;if(i){let e=i.operator,r=t[i.property],s=i.value;return">"===e&&r>s||"<"===e&&r="===e&&r>=s||"<="===e&&r<=s||"=="===e&&r==s||"==="===e&&r===s||"!="===e&&r!=s||"!=="===e&&r!==s}return!0}(t,u),{backgroundColor:S,borderColor:C,distance:T,style:k={}}=u,E={},A=s[m],M=!A;w&&(_=p(u[t.formatPrefix+"Format"],u.format),g=t.getLabelConfig(),v=o(_)?n(_,g,r):(u[t.formatPrefix+"Formatter"]||u.formatter).call(g,u),x=u.rotation,!r.styledMode&&(k.color=p(u.color,k.color,h(i.color)?i.color:void 0,"#000000"),"contrast"===k.color?("none"!==S&&(b=S),t.contrastColor=c.getContrast("auto"!==b&&b||t.color||i.color),k.color=b||!o(T)&&u.inside||0>f(T||0)||a.stacking?t.contrastColor:y):delete t.contrastColor,a.cursor&&(k.cursor=a.cursor)),E={r:u.borderRadius||0,rotation:x,padding:u.padding,zIndex:1},r.styledMode||(E.fill="auto"===S?t.color:S,E.stroke="auto"===C?t.color:C,E["stroke-width"]=u.borderWidth),d(E,((t,e)=>{void 0===t&&delete E[e]}))),!A||w&&o(v)&&!!A.div==!!u.useHTML&&(A.rotation&&u.rotation||A.rotation===u.rotation)||(A=void 0,M=!0),w&&o(v)&&(A?E.text=v:(A=c.label(v,0,0,u.shape,void 0,void 0,u.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+t.colorIndex+" "+(u.className||"")+(u.useHTML?" highcharts-tracker":"")),A&&(A.options=u,A.attr(E),r.styledMode||A.css(k).shadow(u.shadow),l(A,"beforeAddingDataLabel",{labelOptions:u,point:t}),A.added||A.add(e),i.alignDataLabel(t,A,u,void 0,M),A.isActive=!0,s[m]&&s[m]!==A&&s[m].destroy(),s[m]=A))}));let u=s.length;for(;u--;)s[u]&&s[u].isActive?s[u].isActive=!1:(s[u]?.destroy(),s.splice(u,1));t.dataLabel=s[0],t.dataLabels=s}))),l(this,"afterDrawDataLabels")}function _(t,e,i,r,s,n){let o,a,l=this.chart,c=e.align,h=e.verticalAlign,u=t.box?0:t.padding||0,d=l.inverted?this.yAxis:this.xAxis,p=d?d.left-l.plotLeft:0,f=l.inverted?this.xAxis:this.yAxis,m=f?f.top-l.plotTop:0,{x:g=0,y=0}=e;return(o=(i.x||0)+u+p)<0&&("right"===c&&g>=0?(e.align="left",e.inside=!0):g-=o,a=!0),(o=(i.x||0)+r.width-u+p)>l.plotWidth&&("left"===c&&g<=0?(e.align="right",e.inside=!0):g+=l.plotWidth-o,a=!0),(o=i.y+u+m)<0&&("bottom"===h&&y>=0?(e.verticalAlign="top",e.inside=!0):y-=o,a=!0),(o=(i.y||0)+r.height-u+m)>l.plotHeight&&("top"===h&&y<=0?(e.verticalAlign="bottom",e.inside=!0):y+=l.plotHeight-o,a=!0),a&&(e.x=g,e.y=y,t.placed=!n,t.align(e,void 0,s)),a}function v(t,e){let i,r=[];if(c(t)&&!c(e))r=t.map((function(t){return u(t,e)}));else if(c(e)&&!c(t))r=e.map((function(e){return u(t,e)}));else if(c(t)||c(e)){if(c(t)&&c(e))for(i=Math.max(t.length,e.length);i--;)r[i]=u(t[i],e[i])}else r=u(t,e);return r}function x(t){let e=t.chart.options.plotOptions;return m(v(v(e?.series?.dataLabels,e?.[t.type]?.dataLabels),t.options.dataLabels))}function b(t,e,i,r,s){let n=this.chart,o=n.inverted,a=this.xAxis,l=a.reversed,c=((o?e.height:e.width)||0)/2,h=t.pointWidth,u=h?h/2:0;e.startXPos=o?s.x:l?-c-u:a.width-c+u,e.startYPos=o?l?this.yAxis.height-c+u:-c-u:s.y,r?"hidden"===e.visibility&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0},void 0,e.hide),n.hasRendered&&(i&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)}t.compose=function(t){let s=t.prototype;s.initDataLabels||(s.initDataLabels=g,s.initDataLabelsGroup=r,s.alignDataLabel=i,s.drawDataLabels=y,s.justifyDataLabel=_,s.setDataLabelStartPos=b,s.hasDataLabels=e)}}(r||(r={})),r})),i(e,"Series/Column/ColumnDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r){var s;let{composed:n}=e,{series:o}=i,{merge:a,pick:l,pushUnique:c}=r;return function(e){function i(t,e,i,r,s){let n=this.chart.inverted,c=t.series,h=(c.xAxis?c.xAxis.len:this.chart.plotSizeX)||0,u=(c.yAxis?c.yAxis.len:this.chart.plotSizeY)||0,d=t.dlBox||t.shapeArgs,p=l(t.below,t.plotY>l(this.translatedThreshold,u)),f=l(i.inside,!!this.options.stacking);if(d){if(r=a(d),"allow"!==i.overflow||!1!==i.crop){r.y<0&&(r.height+=r.y,r.y=0);let t=r.y+r.height-u;t>0&&t {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}})),i(e,"Series/Scatter/ScatterSeries.js",[e["Series/Scatter/ScatterSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{column:r,line:s}=e.seriesTypes,{addEvent:n,extend:o,merge:a}=i;class l extends s{applyJitter(){let t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach((function(r,s){["x","y"].forEach((function(n,o){if(e[n]&&!r.isNull){let a=`plot${n.toUpperCase()}`,l=t[`${n}Axis`],c=e[n]*l.transA;if(l&&!l.logarithmic){let t=Math.max(0,(r[a]||0)-c),e=Math.min(l.len,(r[a]||0)+c);r[a]=t+(e-t)*function(t){let e=1e4*Math.sin(t);return e-Math.floor(e)}(s+o*i),"x"===n&&(r.clientX=r.plotX)}}}))}))}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}return l.defaultOptions=a(s.defaultOptions,t),o(l.prototype,{drawTracker:r.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),n(l,"afterTranslate",(function(){this.applyJitter()})),e.registerSeriesType("scatter",l),l})),i(e,"Series/CenteredUtilities.js",[e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Utilities.js"]],(function(t,e,i){var r,s;let{deg2rad:n}=t,{fireEvent:o,isNumber:a,pick:l,relativeLength:c}=i;return(s=r||(r={})).getCenter=function(){let t,i,r,s=this.options,n=this.chart,h=2*(s.slicedOffset||0),u=n.plotWidth-2*h,d=n.plotHeight-2*h,p=s.center,f=Math.min(u,d),m=s.thickness,g=s.size,y=s.innerSize||0;"string"==typeof g&&(g=parseFloat(g)),"string"==typeof y&&(y=parseFloat(y));let _=[l(p[0],"50%"),l(p[1],"50%"),l(g&&g<0?void 0:s.size,"100%"),l(y&&y<0?void 0:s.innerSize||0,"0%")];for(!n.angular||this instanceof e||(_[3]=0),i=0;i<4;++i)r=_[i],t=i<2||2===i&&/%$/.test(r),_[i]=c(r,[u,d,f,_[2]][i])+(t?h:0);return _[3]>_[2]&&(_[3]=_[2]),a(m)&&2*m<_[2]&&m>0&&(_[3]=_[2]-2*m),o(this,"afterGetCenter",{positions:_}),_},s.getStartAndEndRadians=function(t,e){let i=a(t)?t:0,r=a(e)&&e>i&&e-i<360?e:i+360;return{start:n*(i+-90),end:n*(r+-90)}},r})),i(e,"Series/Pie/PiePoint.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],(function(t,e,i){let{setAnimation:r}=t,{addEvent:s,defined:n,extend:o,isNumber:a,pick:l,relativeLength:c}=i;class h extends e{getConnectorPath(t){let e=t.dataLabelPosition,i=t.options||{},r=i.connectorShape,s=this.connectorShapes[r]||r;return e&&s.call(this,{...e.computed,alignment:e.alignment},e.connectorPosition,i)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(t){let e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:e.r-1,start:e.start,end:e.end,borderRadius:e.borderRadius})}constructor(t,e,i){super(t,e,i),this.half=0,this.name??(this.name="Slice");let r=t=>{this.slice("select"===t.type)};s(this,"select",r),s(this,"unselect",r)}isValid(){return a(this.y)&&this.y>=0}setVisible(t,e=!0){t!==this.visible&&this.update({visible:t??!this.visible},e,void 0,!1)}slice(t,e,i){let s=this.series;r(i,s.chart),e=l(e,!0),this.sliced=this.options.sliced=t=n(t)?t:!this.sliced,s.options.data[s.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}return o(h.prototype,{connectorShapes:{fixedOffset:function(t,e,i){let r=e.breakAt,s=e.touchingSliceAt,n=i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*r.x-s.x,2*r.y-s.y,r.x,r.y]:["L",r.x,r.y];return[["M",t.x,t.y],n,["L",s.x,s.y]]},straight:function(t,e){let i=e.touchingSliceAt;return[["M",t.x,t.y],["L",i.x,i.y]]},crookedLine:function(t,e,i){let{breakAt:r,touchingSliceAt:s}=e,{series:n}=this,[o,a,l]=n.center,h=l/2,{plotLeft:u,plotWidth:d}=n.chart,p="left"===t.alignment,{x:f,y:m}=t,g=r.x;if(i.crookDistance){let t=c(i.crookDistance,1);g=p?o+h+(d+u-o-h)*(1-t):u+(o-h)*t}else g=o+(a-m)*Math.tan((this.angle||0)-Math.PI/2);let y=[["M",f,m]];return(p?g<=f&&g>=r.x:g>=f&&g<=r.x)&&y.push(["L",g,m]),y.push(["L",r.x,r.y],["L",s.x,s.y]),y}}}),h})),i(e,"Series/Pie/PieSeriesDefaults.js",[],(function(){return{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}})),i(e,"Series/Pie/PieSeries.js",[e["Series/CenteredUtilities.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Series/Pie/PiePoint.js"],e["Series/Pie/PieSeriesDefaults.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a,l){let{getStartAndEndRadians:c}=t,{noop:h}=i,{clamp:u,extend:d,fireEvent:p,merge:f,pick:m}=l;class g extends n{animate(t){let e=this,i=e.points,r=e.startAngleRad;t||i.forEach((function(t){let i=t.graphic,s=t.shapeArgs;i&&s&&(i.attr({r:m(t.startR,e.center&&e.center[3]/2),start:r,end:r}),i.animate({r:s.r,start:s.start,end:s.end},e.options.animation))}))}drawEmpty(){let t,e,i=this.startAngleRad,r=this.endAngleRad,s=this.options;0===this.total&&this.center?(t=this.center[0],e=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(t,e,this.center[1]/2,0,i,r).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(t,e,this.center[2]/2,0,{start:i,end:r,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":s.borderWidth,fill:s.fillColor||"none",stroke:s.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let t=this.chart.renderer;this.points.forEach((function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)}))}generatePoints(){super.generatePoints(),this.updateTotals()}getX(t,e,i,r){let s=this.center,n=this.radii?this.radii[i.index]||0:s[2]/2,o=r.dataLabelPosition,a=o?.distance||0,l=Math.asin(u((t-s[1])/(n+a),-1,1));return s[0]+Math.cos(l)*(n+a)*(e?-1:1)+(a>0?(e?-1:1)*(r.padding||0):0)}hasData(){return!!this.processedXData.length}redrawPoints(){let t,e,i,r,s=this,n=s.chart;this.drawEmpty(),s.group&&!n.styledMode&&s.group.shadow(s.options.shadow),s.points.forEach((function(o){let a={};e=o.graphic,!o.isNull&&e?(r=o.shapeArgs,t=o.getTranslate(),n.styledMode||(i=s.pointAttribs(o,o.selected&&"select")),o.delayedRendering?(e.setRadialReference(s.center).attr(r).attr(t),n.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}),o.delayedRendering=!1):(e.setRadialReference(s.center),n.styledMode||f(!0,a,i),f(!0,a,r,t),e.animate(a)),e.attr({visibility:o.visible?"inherit":"hidden"}),e.addClass(o.getClassName(),!0)):e&&(o.graphic=e.destroy())}))}sortByAngle(t,e){t.sort((function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e}))}translate(t){p(this,"translate"),this.generatePoints();let e,i,r,s,n,o,a,l=this.options,h=l.slicedOffset,u=c(l.startAngle,l.endAngle),d=this.startAngleRad=u.start,f=(this.endAngleRad=u.end)-d,m=this.points,g=l.ignoreHiddenPoint,y=m.length,_=0;for(t||(this.center=t=this.getCenter()),o=0;o1.5*Math.PI?r-=2*Math.PI:r<-Math.PI/2&&(r+=2*Math.PI),a.slicedTranslation={translateX:Math.round(Math.cos(r)*h),translateY:Math.round(Math.sin(r)*h)},s=Math.cos(r)*t[2]/2,n=Math.sin(r)*t[2]/2,a.tooltipPos=[t[0]+.7*s,t[1]+.7*n],a.half=r<-Math.PI/2||r>Math.PI/2?1:0,a.angle=r}p(this,"afterTranslate")}updateTotals(){let t,e,i=this.points,r=i.length,s=this.options.ignoreHiddenPoint,n=0;for(t=0;t0&&(e.visible||!s)?e.y/n*100:0,e.total=n}}return g.defaultOptions=f(n.defaultOptions,s),d(g.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:e.prototype.drawTracker,getCenter:t.getCenter,getSymbol:h,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointAttribs:e.prototype.pointAttribs,pointClass:r,requireSorting:!1,searchPoint:h,trackerGroups:["group","dataLabelsGroup"]}),o.registerSeriesType("pie",g),g})),i(e,"Series/Pie/PieDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s){var n;let{composed:o,noop:a}=e,{distribute:l}=i,{series:c}=r,{arrayMax:h,clamp:u,defined:d,pick:p,pushUnique:f,relativeLength:m}=s;return function(e){let i={radialDistributionY:function(t,e){return(e.dataLabelPosition?.top||0)+t.distributeBox.pos},radialDistributionX:function(t,e,i,r,s){let n=s.dataLabelPosition;return t.getX(i<(n?.top||0)+2||i>(n?.bottom||0)-2?r:i,e.half,e,s)},justify:function(t,e,i,r){return r[0]+(t.half?-1:1)*(i+(e.dataLabelPosition?.distance||0))},alignToPlotEdges:function(t,e,i,r){let s=t.getBBox().width;return e?s+r:i-s-r},alignToConnectors:function(t,e,i,r){let s,n=0;return t.forEach((function(t){(s=t.dataLabel.getBBox().width)>n&&(n=s)})),e?n+r:i-n-r}};function r(t,e){let{center:i,options:r}=this,s=i[2]/2,n=t.angle||0,o=Math.cos(n),a=Math.sin(n),l=i[0]+o*s,c=i[1]+a*s,h=Math.min((r.slicedOffset||0)+(r.borderWidth||0),e/5);return{natural:{x:l+o*e,y:c+a*e},computed:{},alignment:e<0?"center":t.half?"right":"left",connectorPosition:{breakAt:{x:l+o*h,y:c+a*h},touchingSliceAt:{x:l,y:c}},distance:e}}function s(){let t,e,i,r=this,s=r.points,n=r.chart,o=n.plotWidth,a=n.plotHeight,u=n.plotLeft,f=Math.round(n.chartWidth/3),g=r.center,y=g[2]/2,_=g[1],v=[[],[]],x=[0,0,0,0],b=r.dataLabelPositioners,w=0;r.visible&&r.hasDataLabels?.()&&(s.forEach((t=>{(t.dataLabels||[]).forEach((t=>{t.shortened&&(t.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.shortened=!1)}))})),c.prototype.drawDataLabels.apply(r),s.forEach((t=>{(t.dataLabels||[]).forEach(((e,i)=>{let r=g[2]/2,s=e.options,n=m(s?.distance||0,r);0===i&&v[t.half].push(t),!d(s?.style?.width)&&e.getBBox().width>f&&(e.css({width:Math.round(.7*f)+"px"}),e.shortened=!0),e.dataLabelPosition=this.getDataLabelPosition(t,n),w=Math.max(w,n)}))})),v.forEach(((t,s)=>{let c,h,f,m=t.length,v=[],S=0;m&&(r.sortByAngle(t,s-.5),w>0&&(c=Math.max(0,_-y-w),h=Math.min(_+y+w,n.plotHeight),t.forEach((t=>{(t.dataLabels||[]).forEach((e=>{let i=e.dataLabelPosition;i&&i.distance>0&&(i.top=Math.max(0,_-y-i.distance),i.bottom=Math.min(_+y+i.distance,n.plotHeight),S=e.getBBox().height||21,e.lineHeight=n.renderer.fontMetrics(e.text||e).h+2*e.padding,t.distributeBox={target:(e.dataLabelPosition?.natural.y||0)-i.top+e.lineHeight/2,size:S,rank:t.y},v.push(t.distributeBox))}))})),l(v,f=h+S-c,f/5)),t.forEach((n=>{(n.dataLabels||[]).forEach((l=>{let c=l.options||{},h=n.distributeBox,f=l.dataLabelPosition,m=f?.natural.y||0,_=c.connectorPadding||0,w=l.lineHeight||21,S=(w-l.getBBox().height)/2,C=0,T=m,k="inherit";if(f){if(v&&d(h)&&f.distance>0&&(void 0===h.pos?k="hidden":(i=h.size,T=b.radialDistributionY(n,l))),c.justify)C=b.justify(n,l,y,g);else switch(c.alignTo){case"connectors":C=b.alignToConnectors(t,s,o,u);break;case"plotEdges":C=b.alignToPlotEdges(l,s,o,u);break;default:C=b.radialDistributionX(r,n,T-S,m,l)}if(f.attribs={visibility:k,align:f.alignment},f.posAttribs={x:C+(c.x||0)+({left:_,right:-_}[f.alignment]||0),y:T+(c.y||0)-w/2},f.computed.x=C,f.computed.y=T-S,p(c.crop,!0)){let t;C-(e=l.getBBox().width)<_&&1===s?(t=Math.round(e-C+_),x[3]=Math.max(t,x[3])):C+e>o-_&&0===s&&(t=Math.round(C+e-o+_),x[1]=Math.max(t,x[1])),T-i/2<0?x[0]=Math.max(Math.round(i/2-T),x[0]):T+i/2>a&&(x[2]=Math.max(Math.round(T+i/2-a),x[2])),f.sideOverflow=t}}}))})))})),(0===h(x)||this.verifyDataLabelOverflow(x))&&(this.placeDataLabels(),this.points.forEach((e=>{(e.dataLabels||[]).forEach((i=>{let{connectorColor:s,connectorWidth:o=1}=i.options||{},a=i.dataLabelPosition;if(o){let l;t=i.connector,a&&a.distance>0?(l=!t,t||(i.connector=t=n.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex+(e.className?" "+e.className:"")).add(r.dataLabelsGroup)),n.styledMode||t.attr({"stroke-width":o,stroke:s||e.color||"#666666"}),t[l?"attr":"animate"]({d:e.getConnectorPath(i)}),t.attr({visibility:a.attribs?.visibility})):t&&(i.connector=t.destroy())}}))}))))}function n(){this.points.forEach((t=>{(t.dataLabels||[]).forEach((t=>{let e=t.dataLabelPosition;e?(e.sideOverflow&&(t.css({width:Math.max(t.getBBox().width-e.sideOverflow,0)+"px",textOverflow:(t.options?.style||{}).textOverflow||"ellipsis"}),t.shortened=!0),t.attr(e.attribs),t[t.moved?"animate":"attr"](e.posAttribs),t.moved=!0):t&&t.attr({y:-9999})})),delete t.distributeBox}),this)}function g(t){let e=this.center,i=this.options,r=i.center,s=i.minSize||80,n=s,o=null!==i.size;return!o&&(null!==r[0]?n=Math.max(e[2]-Math.max(t[1],t[3]),s):(n=Math.max(e[2]-t[1]-t[3],s),e[0]+=(t[3]-t[1])/2),null!==r[1]?n=u(n,s,e[2]-Math.max(t[0],t[2])):(n=u(n,s,e[2]-t[0]-t[2]),e[1]+=(t[0]-t[2])/2),n(t.x+=e.x,t.y+=e.y,t)),{x:0,y:0});return{x:e.x/t.length,y:e.y/t.length}},e.getDistanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},e.getAngleBetweenPoints=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)},e.pointInPolygon=function({x:t,y:e},i){let r,s,n=i.length,o=!1;for(r=0,s=n-1;re!=c>e&&t<(l-n)*(e-a)/(c-a)+n&&(o=!o)}return o},t})),i(e,"Extensions/OverlappingDataLabels.js",[e["Core/Geometry/GeometryUtilities.js"],e["Core/Utilities.js"]],(function(t,e){let{pointInPolygon:i}=t,{addEvent:r,fireEvent:s,objectEach:n,pick:o}=e;function a(t){let e,r,n,o,a,c=t.length,h=(t,e)=>!(e.x>=t.x+t.width||e.x+e.width<=t.x||e.y>=t.y+t.height||e.y+e.height<=t.y),u=(t,e)=>{for(let r of t)if(i({x:r[0],y:r[1]},e))return!0;return!1},d=!1;for(let i=0;i(e.labelrank||0)-(t.labelrank||0)));for(let e=0;e{n(t,(t=>{t.label&&e.push(t.label)}))}));for(let i of t.series||[])if(i.visible&&i.hasDataLabels?.()){let r=i=>{for(let r of i)r.visible&&(r.dataLabels||[]).forEach((i=>{let s=i.options||{};i.labelrank=o(s.labelrank,r.labelrank,r.shapeArgs?.height),s.allowOverlap??Number(s.distance)>0?(i.oldOpacity=i.opacity,i.newOpacity=1,l(i,t)):e.push(i)}))};r(i.nodes||[]),r(i.points)}this.hideOverlappingLabels(e)}return{compose:function(t){let e=t.prototype;e.hideOverlappingLabels||(e.hideOverlappingLabels=a,r(t,"render",c))}}})),i(e,"Extensions/BorderRadius.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i){let{defaultOptions:r}=t,{noop:s}=e,{addEvent:n,extend:o,isObject:a,merge:l,relativeLength:c}=i,h={radius:0,scope:"stack",where:void 0},u=s,d=s;function p(t,e,i,r,s={}){let n=u(t,e,i,r,s),{innerR:o=0,r:a=i,start:l=0,end:h=0}=s;if(s.open||!s.borderRadius)return n;let d=h-l,p=Math.sin(d/2),f=Math.max(Math.min(c(s.borderRadius||0,a-o),(a-o)/2,a*p/(1+p)),0),m=Math.min(f,d/Math.PI*2*o),g=n.length-1;for(;g--;)!function(t,e,i){let r,s,n,o=t[e],a=t[e+1];if("Z"===a[0]&&(a=t[0]),"M"!==o[0]&&"L"!==o[0]||"A"!==a[0]?"A"===o[0]&&("M"===a[0]||"L"===a[0])&&(r=a,s=o):(r=o,s=a,n=!0),r&&s&&s.params){let o=s[1],a=s[5],l=s.params,{start:c,end:h,cx:u,cy:d}=l,p=a?o-i:o+i,f=p?Math.asin(i/p):0,m=a?f:-f,g=Math.cos(f)*p;n?(l.start=c+m,r[1]=u+g*Math.cos(c),r[2]=d+g*Math.sin(c),t.splice(e+1,0,["A",i,i,0,0,1,u+o*Math.cos(l.start),d+o*Math.sin(l.start)])):(l.end=h-m,s[6]=u+o*Math.cos(l.end),s[7]=d+o*Math.sin(l.end),t.splice(e+1,0,["A",i,i,0,0,1,u+g*Math.cos(h),d+g*Math.sin(h)])),s[4]=Math.abs(l.end-l.start)1?m:f);return n}function f(){if(this.options.borderRadius&&(!this.chart.is3d||!this.chart.is3d())){let{options:t,yAxis:e}=this,i="percent"===t.stacking,s=r.plotOptions?.[this.type]?.borderRadius,n=m(t.borderRadius,a(s)?s:{}),l=e.options.reversed;for(let r of this.points){let{shapeArgs:s}=r;if("roundedRect"===r.shapeType&&s){let{width:a=0,height:h=0,y:u=0}=s,d=u,p=h;if("stack"===n.scope&&r.stackTotal){let s=e.translate(i?100:r.stackTotal,!1,!0,!1,!0),n=e.translate(t.threshold||0,!1,!0,!1,!0),o=this.crispCol(0,Math.min(s,n),0,Math.abs(s-n));d=o.y,p=o.height}let f=(r.negative?-1:1)*(l?-1:1)==-1,m=n.where;!m&&this.is("waterfall")&&Math.abs((r.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(m="all"),m||(m="end");let g=Math.min(c(n.radius,a),a/2,"all"===m?h/2:1/0)||0;"end"===m&&(f&&(d-=g),p+=g),o(s,{brBoxHeight:p,brBoxY:d,r:g})}}}}function m(t,e){return a(t)||(t={radius:t||0}),l(h,e,t)}function g(){let t=m(this.options.borderRadius);for(let e of this.points){let i=e.shapeArgs;i&&(i.borderRadius=c(t.radius,(i.r||0)-(i.innerR||0)))}}function y(t,e,i,r,s={}){let n=d(t,e,i,r,s),{r:o=0,brBoxHeight:a=r,brBoxY:l=e}=s,c=e-l,h=l+a-(e+r),u=c-o>-.1?0:o,p=h-o>-.1?0:o,f=Math.max(u&&c,0),m=Math.max(p&&h,0),g=[t+u,e],y=[t+i-u,e],_=[t+i,e+u],v=[t+i,e+r-p],x=[t+i-p,e+r],b=[t+p,e+r],w=[t,e+r-p],S=[t,e+u],C=(t,e)=>Math.sqrt(Math.pow(t,2)-Math.pow(e,2));if(f){let t=C(u,u-f);g[0]-=t,y[0]+=t,_[1]=S[1]=e+u-f}if(r=o(i.minWidth,0)&&this.chartHeight>=o(i.minHeight,0)}).call(this)&&e.push(t._id)}function l(t,e){let r,o=this.options.responsive,l=this.currentResponsive,c=[];!e&&o&&o.rules&&o.rules.forEach((t=>{void 0===t._id&&(t._id=a()),this.matchResponsiveRule(t,c)}),this);let h=n(...c.map((t=>s((o||{}).rules||[],(e=>e._id===t)))).map((t=>t&&t.chartOptions)));h.isResponsiveOptions=!0,c=c.toString()||void 0;let u=l&&l.ruleIds;c===u||(l&&(this.currentResponsive=void 0,this.updatingResponsive=!0,this.update(l.undoOptions,t,!0),this.updatingResponsive=!1),c?((r=i(h,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:c,mergedOptions:h,undoOptions:r},this.updatingResponsive||this.update(h,t,!0)):this.currentResponsive=void 0)}t.compose=function(t){let i=t.prototype;return i.matchResponsiveRule||r(i,{matchResponsiveRule:e,setResponsive:l}),t}}(e||(e={})),e})),i(e,"masters/highcharts.src.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Core/Defaults.js"],e["Core/Animation/Fx.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Templating.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Renderer/HTML/HTMLElement.js"],e["Core/Axis/Axis.js"],e["Core/Axis/DateTimeAxis.js"],e["Core/Axis/LogarithmicAxis.js"],e["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],e["Core/Axis/Tick.js"],e["Core/Tooltip.js"],e["Core/Series/Point.js"],e["Core/Pointer.js"],e["Core/Legend/Legend.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Chart/Chart.js"],e["Extensions/ScrollablePlotArea.js"],e["Core/Axis/Stacking/StackingAxis.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Column/ColumnDataLabel.js"],e["Series/Pie/PieDataLabel.js"],e["Core/Series/DataLabel.js"],e["Extensions/OverlappingDataLabels.js"],e["Extensions/BorderRadius.js"],e["Core/Responsive.js"],e["Core/Color/Color.js"],e["Core/Time.js"]],(function(t,e,i,r,s,n,o,a,l,c,h,u,d,p,f,m,g,y,_,v,x,b,w,S,C,T,k,E,A,M,P,I,L,D,z,O){return t.AST=n,t.Axis=d,t.Chart=w,t.Color=z,t.DataLabel=P,t.Fx=r,t.HTMLElement=u,t.Legend=x,t.LegendSymbol=b,t.OverlappingDataLabels=t.OverlappingDataLabels||I,t.PlotLineOrBand=m,t.Point=_,t.Pointer=v,t.RendererRegistry=a,t.Series=k,t.SeriesRegistry=E,t.StackItem=T,t.SVGElement=c,t.SVGRenderer=h,t.Templating=o,t.Tick=g,t.Time=O,t.Tooltip=y,t.animate=s.animate,t.animObject=s.animObject,t.chart=w.chart,t.color=z.parse,t.dateFormat=o.dateFormat,t.defaultOptions=i.defaultOptions,t.distribute=l.distribute,t.format=o.format,t.getDeferredAnimation=s.getDeferredAnimation,t.getOptions=i.getOptions,t.numberFormat=o.numberFormat,t.seriesType=E.seriesType,t.setAnimation=s.setAnimation,t.setOptions=i.setOptions,t.stop=s.stop,t.time=i.defaultTime,t.timers=r.timers,L.compose(t.Series,t.SVGElement,t.SVGRenderer),A.compose(t.Series.types.column),P.compose(t.Series),p.compose(t.Axis),u.compose(t.SVGRenderer),x.compose(t.Chart),f.compose(t.Axis),I.compose(t.Chart),M.compose(t.Series.types.pie),m.compose(t.Axis),v.compose(t.Chart),D.compose(t.Chart),S.compose(t.Axis,t.Chart,t.Series),C.compose(t.Axis,t.Chart,t.Series),y.compose(t.Pointer),e.extend(t,e),t})),e["masters/highcharts.src.js"]._modules=e,e["masters/highcharts.src.js"]},t.exports?(n.default=n,t.exports=s&&s.document?n(s):n):void 0===(r=function(){return n(s)}.call(e,i,e,t))||(t.exports=r)},159:(t,e,i)=>{var r,s,n;n=function(t){"use strict";var e=t?t._modules:{};function i(e,i,r,s){e.hasOwnProperty(i)||(e[i]=s.apply(null,r),"function"==typeof CustomEvent&&t.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}i(e,"Core/Axis/Color/ColorAxisComposition.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],(function(t,e){var i;let{parse:r}=t,{addEvent:s,extend:n,merge:o,pick:a,splat:l}=e;return function(t){let e;function i(){let{userOptions:t}=this;this.colorAxis=[],t.colorAxis&&(t.colorAxis=l(t.colorAxis),t.colorAxis.map((t=>new e(this,t))))}function c(t){let e,i,r=this.chart.colorAxis||[],s=e=>{let i=t.allItems.indexOf(e);-1!==i&&(this.destroyItem(t.allItems[i]),t.allItems.splice(i,1))},n=[];for(r.forEach((function(t){(e=t.options)&&e.showInLegend&&(e.dataClasses&&e.visible?n=n.concat(t.getDataClassLegendSymbols()):e.visible&&n.push(t),t.series.forEach((function(t){(!t.options.showInLegend||e.dataClasses)&&("point"===t.options.legendType?t.points.forEach((function(t){s(t)})):s(t))})))})),i=n.length;i--;)t.allItems.unshift(n[i])}function h(t){t.visible&&t.item.legendColor&&t.item.legendItem.symbol.attr({fill:t.item.legendColor})}function u(t){this.chart.colorAxis?.forEach((e=>{e.update({},t.redraw)}))}function d(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function p(){let t=this.axisTypes;t?-1===t.indexOf("colorAxis")&&t.push("colorAxis"):this.axisTypes=["colorAxis"]}function f(t){let e=this,i=t?"show":"hide";e.visible=e.options.visible=!!t,["graphic","dataLabel"].forEach((function(t){e[t]&&e[t][i]()})),this.series.buildKDTree()}function m(){let t=this,e=this.getPointsCollection(),i=this.options.nullColor,r=this.colorAxis,s=this.colorKey;e.forEach((e=>{let n=e.getNestedProperty(s),o=e.options.color||(e.isNull||null===e.value?i:r&&void 0!==n?r.toColor(n,e):e.color||t.color);o&&e.color!==o&&(e.color=o,"point"===t.options.legendType&&e.legendItem&&e.legendItem.label&&t.chart.legend.colorizeItem(e,e.visible))}))}function g(){this.elem.attr("fill",r(this.start).tweenTo(r(this.end),this.pos),void 0,!0)}function y(){this.elem.attr("stroke",r(this.start).tweenTo(r(this.end),this.pos),void 0,!0)}t.compose=function(t,r,l,_,v){let x=r.prototype,b=l.prototype,w=v.prototype;x.collectionsWithUpdate.includes("colorAxis")||(e=t,x.collectionsWithUpdate.push("colorAxis"),x.collectionsWithInit.colorAxis=[x.addColorAxis],s(r,"afterGetAxes",i),function(t){let i=t.prototype.createAxis;t.prototype.createAxis=function(t,r){if("colorAxis"!==t)return i.apply(this,arguments);let s=new e(this,o(r.axis,{index:this[t].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach((t=>{t.series=[]})),this.series.forEach((t=>{t.bindAxes(),t.isDirtyData=!0})),a(r.redraw,!0)&&this.redraw(r.animation),s}}(r),b.fillSetter=g,b.strokeSetter=y,s(_,"afterGetAllItems",c),s(_,"afterColorizeItem",h),s(_,"afterUpdate",u),n(w,{optionalAxis:"colorAxis",translateColors:m}),n(w.pointClass.prototype,{setVisible:f}),s(v,"afterTranslate",d,{order:1}),s(v,"bindAxes",p))},t.pointSetVisible=f}(i||(i={})),i})),i(e,"Core/Axis/Color/ColorAxisDefaults.js",[],(function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,showInLegend:!0}})),i(e,"Core/Axis/Color/ColorAxisLike.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],(function(t,e){var i,r;let{parse:s}=t,{merge:n}=e;return(r=i||(i={})).initDataClasses=function(t){let e,i,r,o=this.chart,a=this.legendItem=this.legendItem||{},l=this.options,c=t.dataClasses||[],h=o.options.chart.colorCount,u=0;this.dataClasses=i=[],a.labels=[];for(let t=0,a=c.length;t=r)&&(void 0===s||t<=s)){n=o.color,e&&(e.dataClass=a,e.colorIndex=o.colorIndex);break}}else{for(i=this.normalizedValue(t),a=c.length;a--&&!(i>c[a][0]););r=c[a]||c[a+1],i=1-((s=c[a+1]||r)[0]-i)/(s[0]-r[0]||1),n=r.color.tweenTo(s.color,i)}return n},i})),i(e,"Core/Axis/Color/ColorAxis.js",[e["Core/Axis/Axis.js"],e["Core/Axis/Color/ColorAxisComposition.js"],e["Core/Axis/Color/ColorAxisDefaults.js"],e["Core/Axis/Color/ColorAxisLike.js"],e["Core/Defaults.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a){let{defaultOptions:l}=s,{series:c}=o,{defined:h,extend:u,fireEvent:d,isArray:p,isNumber:f,merge:m,pick:g,relativeLength:y}=a;l.colorAxis=m(l.xAxis,i);class _ extends t{static compose(t,i,r,s){e.compose(_,t,i,r,s)}constructor(t,e){super(t,e),this.coll="colorAxis",this.visible=!0,this.init(t,e)}init(t,e){let i=t.options.legend||{},r=e.layout?"vertical"!==e.layout:"vertical"!==i.layout;this.side=e.side||r?2:1,this.reversed=e.reversed||!r,this.opposite=!r,super.init(t,e,"colorAxis"),this.userOptions=e,p(t.userOptions.colorAxis)&&(t.userOptions.colorAxis[this.index]=e),e.dataClasses&&this.initDataClasses(e),this.initStops(),this.horiz=r,this.zoomEnabled=!1}hasData(){return!!(this.tickPositions||[]).length}setTickPositions(){if(!this.dataClasses)return super.setTickPositions()}setOptions(t){let e=m(l.colorAxis,t,{showEmpty:!1,title:null,visible:this.chart.options.legend.enabled&&!1!==t.visible});super.setOptions(e),this.options.crosshair=this.options.marker}setAxisSize(){let t=this.chart,e=this.legendItem?.symbol,{width:i,height:r}=this.getSize();e&&(this.left=+e.attr("x"),this.top=+e.attr("y"),this.width=i=+e.attr("width"),this.height=r=+e.attr("height"),this.right=t.chartWidth-this.left-i,this.bottom=t.chartHeight-this.top-r,this.pos=this.horiz?this.left:this.top),this.len=(this.horiz?i:r)||_.defaultLegendLength}getOffset(){let t=this.legendItem?.group,e=this.chart.axisOffset[this.side];if(t){this.axisParent=t,super.getOffset();let i=this.chart.legend;i.allItems.forEach((function(t){t instanceof _&&t.drawLegendSymbol(i,t)})),i.render(),this.chart.getMargins(!0),this.chart.series.some((t=>t.isDrilling))||(this.isDirty=!0),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=e}}setLegendColor(){let t=this.horiz,e=this.reversed,i=e?1:0,r=e?0:1,s=t?[i,0,r,0]:[0,r,0,i];this.legendColor={linearGradient:{x1:s[0],y1:s[1],x2:s[2],y2:s[3]},stops:this.stops}}drawLegendSymbol(t,e){let i=e.legendItem||{},r=t.padding,s=t.options,n=this.options.labels,o=g(s.itemDistance,10),a=this.horiz,{width:l,height:c}=this.getSize(),h=g(s.labelPadding,a?16:30);this.setLegendColor(),i.symbol||(i.symbol=this.chart.renderer.symbol("roundedRect").attr({r:s.symbolRadius??3,zIndex:1}).add(i.group)),i.symbol.attr({x:0,y:(t.baseline||0)-11,width:l,height:c}),i.labelWidth=l+r+(a?o:g(n.x,n.distance)+(this.maxLabelLength||0)),i.labelHeight=c+r+(a?h:0)}setState(t){this.series.forEach((function(e){e.setState(t)}))}setVisible(){}getSeriesExtremes(){let t,e,i,r,s,n,o,a,l=this.series,u=l.length;for(this.dataMin=1/0,this.dataMax=-1/0;u--;){if(e=(n=l[u]).colorKey=g(n.options.colorKey,n.colorKey,n.pointValKey,n.zoneAxis,"y"),r=n.pointArrayMap,s=n[e+"Min"]&&n[e+"Max"],n[e+"Data"])t=n[e+"Data"];else if(r){if(t=[],i=r.indexOf(e),o=n.yData,i>=0&&o)for(a=0;ao+a&&(i=o+a+2),e.plotX=i,e.plotY=this.len-i,super.drawCrosshair(t,e),e.plotX=s,e.plotY=n,this.cross&&!this.cross.addedToColorAxis&&r.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(r.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||"object"!=typeof this.crosshair||this.cross.attr({fill:this.crosshair.color})))}getPlotLinePath(t){let e=this.left,i=t.translatedValue,r=this.top;return f(i)?this.horiz?[["M",i-4,r-6],["L",i+4,r-6],["L",i,r],["Z"]]:[["M",e,i],["L",e-6,i+6],["L",e-6,i-6],["Z"]]:super.getPlotLinePath(t)}update(t,e){let i=this.chart.legend;this.series.forEach((t=>{t.isDirtyData=!0})),(t.dataClasses&&i.allItems||this.dataClasses)&&this.destroyItems(),super.update(t,e),this.legendItem&&this.legendItem.label&&(this.setLegendColor(),i.colorizeItem(this,!0))}destroyItems(){let t=this.chart,e=this.legendItem||{};if(e.label)t.legend.destroyItem(this);else if(e.labels)for(let i of e.labels)t.legend.destroyItem(i);t.isDirtyLegend=!0}destroy(){this.chart.isDirtyLegend=!0,this.destroyItems(),super.destroy(...[].slice.call(arguments))}remove(t){this.destroyItems(),super.remove(t)}getDataClassLegendSymbols(){let t,e=this,i=e.chart,r=e.legendItem&&e.legendItem.labels||[],s=i.options.legend,o=g(s.valueDecimals,-1),a=g(s.valueSuffix,""),l=t=>e.series.reduce(((e,i)=>(e.push(...i.points.filter((e=>e.dataClass===t))),e)),[]);return r.length||e.dataClasses.forEach(((s,c)=>{let h=s.from,p=s.to,{numberFormatter:f}=i,m=!0;t="",void 0===h?t="< ":void 0===p&&(t="> "),void 0!==h&&(t+=f(h,o)+a),void 0!==h&&void 0!==p&&(t+=" - "),void 0!==p&&(t+=f(p,o)+a),r.push(u({chart:i,name:t,options:{},drawLegendSymbol:n.rectangle,visible:!0,isDataClass:!0,setState:t=>{for(let e of l(c))e.setState(t)},setVisible:function(){this.visible=m=e.visible=!m;let t=[];for(let e of l(c))e.setVisible(m),e.hiddenInDataClass=!m,-1===t.indexOf(e.series)&&t.push(e.series);i.legend.colorizeItem(this,m),t.forEach((t=>{d(t,"afterDataClassLegendClick")}))}},s))})),r}getSize(){let{chart:t,horiz:e}=this,{height:i,width:r}=this.options,{legend:s}=t.options;return{width:g(h(r)?y(r,t.chartWidth):void 0,s?.symbolWidth,e?_.defaultLegendLength:12),height:g(h(i)?y(i,t.chartHeight):void 0,s?.symbolHeight,e?12:_.defaultLegendLength)}}}return _.defaultLegendLength=200,_.keepProps=["legendItem"],u(_.prototype,r),Array.prototype.push.apply(t.keepProps,_.keepProps),_})),i(e,"masters/modules/coloraxis.src.js",[e["Core/Globals.js"],e["Core/Axis/Color/ColorAxis.js"]],(function(t,e){return t.ColorAxis=t.ColorAxis||e,t.ColorAxis.compose(t.Chart,t.Fx,t.Legend,t.Series),t})),i(e,"Maps/MapNavigationDefaults.js",[],(function(){return{lang:{zoomIn:"Zoom in",zoomOut:"Zoom out"},mapNavigation:{buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,height:18,padding:5,style:{color:"#666666",fontSize:"1em",fontWeight:"bold"},theme:{fill:"#ffffff",stroke:"#e6e6e6","stroke-width":1,"text-align":"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1}}})),i(e,"Maps/MapPointer.js",[e["Core/Utilities.js"]],(function(t){var e;let{defined:i,extend:r,pick:s,wrap:n}=t;return function(t){let e,o=0;function a(t){let e=this.chart;t=this.normalize(t),e.options.mapNavigation.enableDoubleClickZoomTo?e.pointer.inClass(t.target,"highcharts-tracker")&&e.hoverPoint&&e.hoverPoint.zoomTo():e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&e.mapZoom(.5,void 0,void 0,t.chartX,t.chartY)}function l(t){let r=this.chart,s=i((t=this.normalize(t)).wheelDelta)&&-t.wheelDelta/120||t.deltaY||t.detail;Math.abs(s)>=1&&(o+=Math.abs(s),e&&clearTimeout(e),e=setTimeout((()=>{o=0}),50)),o<10&&r.isInsidePlot(t.chartX-r.plotLeft,t.chartY-r.plotTop)&&r.mapView&&r.mapView.zoomBy(-(r.options.mapNavigation.mouseWheelSensitivity-1)*s,void 0,[t.chartX,t.chartY],!(1>Math.abs(s))&&void 0)}function c(t,e,i){let s=this.chart;if(e=t.call(this,e,i),s&&s.mapView){let t=s.mapView.pixelsToLonLat({x:e.chartX-s.plotLeft,y:e.chartY-s.plotTop});t&&r(e,t)}return e}function h(t){let e=this.chart.options.mapNavigation;e&&s(e.enableTouchZoom,e.enabled)&&(this.chart.zooming.pinchType="xy"),t.apply(this,[].slice.call(arguments,1))}t.compose=function(t){let e=t.prototype;e.onContainerDblClick||(r(e,{onContainerDblClick:a,onContainerMouseWheel:l}),n(e,"normalize",c),n(e,"zoomOption",h))}}(e||(e={})),e})),i(e,"Maps/MapSymbols.js",[],(function(){let t;function e(e,i,r,s,n){if(n){let t=n?.r||0;n.brBoxY=i-t,n.brBoxHeight=s+t}return t.roundedRect(e,i,r,s,n)}function i(e,i,r,s,n){if(n){let t=n?.r||0;n.brBoxHeight=s+t}return t.roundedRect(e,i,r,s,n)}return{compose:function(r){(t=r.prototype.symbols).bottombutton=e,t.topbutton=i}}})),i(e,"Maps/MapNavigation.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Maps/MapNavigationDefaults.js"],e["Maps/MapPointer.js"],e["Maps/MapSymbols.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n){let{setOptions:o}=t,{composed:a}=e,{addEvent:l,extend:c,merge:h,objectEach:u,pick:d,pushUnique:p}=n;function f(t){t&&(t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)}class m{static compose(t,e,n){r.compose(e),s.compose(n),p(a,"Map.Navigation")&&(l(t,"beforeRender",(function(){this.mapNavigation=new m(this),this.mapNavigation.update()})),o(i))}constructor(t){this.chart=t,this.navButtons=[]}update(t){let e=this,i=e.chart,r=e.navButtons,s=function(t){this.handler.call(i,t),f(t)},n=i.options.mapNavigation;for(t&&(n=i.options.mapNavigation=h(i.options.mapNavigation,t));r.length;)r.pop().destroy();if(!i.renderer.forExport&&d(n.enableButtons,n.enabled)){e.navButtonsGroup||(e.navButtonsGroup=i.renderer.g().attr({zIndex:7}).add()),u(n.buttons,((t,o)=>{let a={padding:(t=h(n.buttonOptions,t)).padding};!i.styledMode&&t.theme&&(c(a,t.theme),a.style=h(t.theme.style,t.style));let{text:u,width:d=0,height:p=0,padding:m=0}=t,g=i.renderer.button("+"!==u&&"-"!==u&&u||"",0,0,s,a,void 0,void 0,void 0,"zoomIn"===o?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+{zoomIn:"zoom-in",zoomOut:"zoom-out"}[o]).attr({width:d,height:p,title:i.options.lang[o],zIndex:5}).add(e.navButtonsGroup);if("+"===u||"-"===u){let e=d+1,r=[["M",m+3,m+p/2],["L",m+e-3,m+p/2]];"+"===u&&r.push(["M",m+e/2,m+3],["L",m+e/2,m+p-3]),i.renderer.path(r).addClass("highcharts-button-symbol").attr(i.styledMode?{}:{stroke:t.style?.color,"stroke-width":3,"stroke-linecap":"round"}).add(g)}if(g.handler=t.onclick,l(g.element,"dblclick",f),r.push(g),c(t,{width:g.width,height:2*(g.height||0)}),i.hasLoaded)g.align(t,!1,t.alignTo);else{let e=l(i,"load",(()=>{g.element&&g.align(t,!1,t.alignTo),e()}))}}));let t=(t,e)=>!(e.x>=t.x+t.width||e.x+e.width<=t.x||e.y>=t.y+t.height||e.y+e.height<=t.y);i.hasLoaded||l(i,"render",(function(){let r=i.exportingGroup&&i.exportingGroup.getBBox();if(r){let i=e.navButtonsGroup.getBBox();if(t(r,i)){let t=-i.y-i.height+r.y-5,s=r.y+r.height-i.y+5,o=n.buttonOptions&&n.buttonOptions.verticalAlign;e.navButtonsGroup.attr({translateY:"bottom"===o?t:s})}}}))}this.updateEvents(n)}updateEvents(t){let e=this.chart;d(t.enableDoubleClickZoom,t.enabled)||t.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||l(e.container,"dblclick",(function(t){e.pointer.onContainerDblClick(t)})):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()),d(t.enableMouseWheelZoom,t.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||l(e.container,"wheel",(function(t){return e.pointer.inClass(t.target,"highcharts-no-mousewheel")||(e.pointer.onContainerMouseWheel(t),f(t)),!1})):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())}}return m})),i(e,"Series/ColorMapComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t,e,i){var r;let{column:{prototype:s}}=t.seriesTypes,{addEvent:n,defined:o}=i;return function(t){function i(t){let i=this.series,r=i.chart.renderer;this.moveToTopOnHover&&this.graphic&&(i.stateMarkerGraphic||(i.stateMarkerGraphic=new e(r,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),"hover"===t?.state?(this.graphic.attr({id:this.id}),i.stateMarkerGraphic.attr({href:`${r.url}#${this.id}`,visibility:"visible"})):i.stateMarkerGraphic.attr({href:""}))}t.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&this.value!==1/0&&this.value!==-1/0&&(void 0===this.value||!isNaN(this.value))}},t.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(t){let e={};return o(t.color)&&(!t.state||"normal"===t.state)&&(e[this.colorProp||"fill"]=t.color),e},pointAttribs:s.pointAttribs},t.compose=function(t){return n(t.prototype.pointClass,"afterSetState",i),t}}(r||(r={})),r})),i(e,"Core/Chart/MapChart.js",[e["Core/Chart/Chart.js"],e["Core/Defaults.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],(function(t,e,i,r){var s;let{getOptions:n}=e,{isNumber:o,merge:a,pick:l}=r;class c extends t{init(t,e){let i=n().credits,r=a({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:l(i.mapText,' © {geojson.copyrightShort}'),mapTextFull:l(i.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},t);super.init(r,e)}mapZoom(t,e,i,r,s){this.mapView&&(o(t)&&(t=Math.log(t)/Math.log(.5)),this.mapView.zoomBy(t,o(e)&&o(i)?this.mapView.projection.inverse([e,i]):void 0,o(r)&&o(s)?[r,s]:void 0))}update(t){t.chart&&"map"in t.chart&&this.mapView?.recommendMapView(this,[t.chart.map,...(this.options.series||[]).map((t=>t.mapData))],!0),super.update.apply(this,arguments)}}return(s=c||(c={})).maps={},s.mapChart=function(t,e,i){return new s(t,e,i)},s.splitPath=function(t){let e;return e="string"==typeof t?(t=t.replace(/([A-Z])/gi," $1 ").replace(/^\s*/,"").replace(/\s*$/,"")).split(/[ ,;]+/).map((t=>/[A-Z]/i.test(t)?t:parseFloat(t))):t,i.prototype.pathToSegments(e)},c})),i(e,"Maps/MapUtilities.js",[],(function(){return{boundsFromPath:function(t){let e,i=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,n=Number.MAX_VALUE;if(t.forEach((t=>{let o=t[t.length-2],a=t[t.length-1];"number"==typeof o&&"number"==typeof a&&(r=Math.min(r,o),i=Math.max(i,o),n=Math.min(n,a),s=Math.max(s,a),e=!0)})),e)return{x1:r,y1:n,x2:i,y2:s}}}})),i(e,"Series/Map/MapPoint.js",[e["Series/ColorMapComposition.js"],e["Maps/MapUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{boundsFromPath:s}=e,n=i.seriesTypes.scatter.prototype.pointClass,{extend:o,isNumber:a,pick:l}=r;class c extends n{static getProjectedPath(t,e){return t.projectedPath||(e&&t.geometry?(e.hasCoordinates=!0,t.projectedPath=e.path(t.geometry)):t.projectedPath=t.path),t.projectedPath||[]}applyOptions(t,e){let i=this.series,r=super.applyOptions(t,e),s=i.joinBy;if(i.mapData&&i.mapMap){let t=s[1],e=super.getNestedProperty(t),n=void 0!==e&&i.mapMap[e];n?o(r,{...n,name:r.name??n.name}):-1!==i.pointArrayMap.indexOf("value")&&(r.value=r.value||null)}return r}getProjectedBounds(t){let e=s(c.getProjectedPath(this,t)),i=this.properties,r=this.series.chart.mapView;if(e){let s=i&&i["hc-middle-lon"],n=i&&i["hc-middle-lat"];if(r&&a(s)&&a(n)){let i=t.forward([s,n]);e.midX=i[0],e.midY=i[1]}else{let t=i&&i["hc-middle-x"],r=i&&i["hc-middle-y"];e.midX=e.x1+(e.x2-e.x1)*l(this.middleX,a(t)?t:.5);let s=l(this.middleY,a(r)?r:.5);this.geometry||(s=1-s),e.midY=e.y2-(e.y2-e.y1)*s}return e}}onMouseOver(t){r.clearTimeout(this.colorInterval),!this.isNull&&this.visible||this.series.options.nullInteraction?super.onMouseOver.call(this,t):this.series.onMouseOut()}setVisible(t){this.visible=this.options.visible=!!t,this.dataLabel&&this.dataLabel[t?"show":"hide"](),this.graphic&&this.graphic.attr(this.series.pointAttribs(this))}zoomTo(t){let e=this.series.chart,i=e.mapView,r=this.bounds;if(i&&r){let s=a(this.insetIndex)&&i.insets[this.insetIndex];if(s){let t=s.projectedUnitsToPixels({x:r.x1,y:r.y1}),e=s.projectedUnitsToPixels({x:r.x2,y:r.y2}),n=i.pixelsToProjectedUnits({x:t.x,y:t.y}),o=i.pixelsToProjectedUnits({x:e.x,y:e.y});r={x1:n.x,y1:n.y,x2:o.x,y2:o.y}}i.fitToBounds(r,void 0,!1),this.series.isDirty=!0,e.redraw(t)}}}return o(c.prototype,{dataLabelOnNull:t.pointMembers.dataLabelOnNull,moveToTopOnHover:t.pointMembers.moveToTopOnHover,isValid:t.pointMembers.isValid}),c})),i(e,"Series/Map/MapSeriesDefaults.js",[e["Core/Utilities.js"]],(function(t){let{isNumber:e}=t;return{affectsMapView:!0,animation:!1,dataLabels:{crop:!1,formatter:function(){let{numberFormatter:t}=this.series.chart,{value:i}=this.point;return e(i)?t(i,-1):this.point.name},inside:!0,overflow:!1,padding:0,verticalAlign:"middle"},linecap:"round",marker:null,nullColor:"#f7f7f7",stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}
"},turboThreshold:0,allAreas:!0,borderColor:"#e6e6e6",borderWidth:1,joinBy:"hc-key",states:{hover:{halo:void 0,borderColor:"#666666",borderWidth:2},normal:{animation:!0},select:{color:"#cccccc"}},legendSymbol:"rectangle"}})),i(e,"Maps/MapViewDefaults.js",[],(function(){return{center:[0,0],fitToGeometry:void 0,maxZoom:void 0,padding:0,projection:{name:void 0,parallels:void 0,rotation:void 0},zoom:void 0,insetOptions:{borderColor:"#cccccc",borderWidth:1,padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}}})),i(e,"Maps/GeoJSONComposition.js",[e["Core/Globals.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],(function(t,e,i){var r;let{win:s}=t,{format:n}=e,{error:o,extend:a,merge:l,wrap:c}=i;return function(t){function e(t){return this.mapView&&this.mapView.lonLatToProjectedUnits(t)}function i(t){return this.mapView&&this.mapView.projectedUnitsToLonLat(t)}function r(t,e){let i=this.options.chart.proj4||s.proj4;if(!i)return void o(21,!1,this);let{jsonmarginX:r=0,jsonmarginY:n=0,jsonres:a=1,scale:l=1,xoffset:c=0,xpan:h=0,yoffset:u=0,ypan:d=0}=e,p=i(e.crs,[t.lon,t.lat]),f=e.cosAngle||e.rotation&&Math.cos(e.rotation),m=e.sinAngle||e.rotation&&Math.sin(e.rotation),g=e.rotation?[p[0]*f+p[1]*m,-p[0]*m+p[1]*f]:p;return{x:((g[0]-c)*l+h)*a+r,y:-(((u-g[1])*l+d)*a-n)}}function h(t,e){let i=this.options.chart.proj4||s.proj4;if(!i)return void o(21,!1,this);if(null===t.y)return;let{jsonmarginX:r=0,jsonmarginY:n=0,jsonres:a=1,scale:l=1,xoffset:c=0,xpan:h=0,yoffset:u=0,ypan:d=0}=e,p={x:((t.x-r)/a-h)/l+c,y:((t.y-n)/a+d)/l+u},f=e.cosAngle||e.rotation&&Math.cos(e.rotation),m=e.sinAngle||e.rotation&&Math.sin(e.rotation),g=i(e.crs,"WGS84",e.rotation?{x:p.x*f+-p.y*m,y:p.x*m+p.y*f}:p);return{lat:g.y,lon:g.x}}function u(t,e){e||(e=Object.keys(t.objects)[0]);let i=t.objects[e];if(i["hc-decoded-geojson"]&&i["hc-decoded-geojson"].title===t.title)return i["hc-decoded-geojson"];let r=t.arcs;if(t.transform){let e,i,s,n=t.arcs,{scale:o,translate:a}=t.transform;r=[];for(let t=0,l=n.length;t"number"==typeof t[0]?t.reduce(((t,e,i)=>{let s=e<0?r[~e]:r[e];return e<0?(s=s.slice(0,0===i?s.length:s.length-1)).reverse():i&&(s=s.slice(1)),t.concat(s)}),[]):t.map(s),n=i.geometries,o=[];for(let t=0,e=n.length;t(e[1]-t[1])*(i[0]-t[0])}function i(t,e,i,r){let s=[t[0]-e[0],t[1]-e[1]],n=[i[0]-r[0],i[1]-r[1]],o=t[0]*e[1]-t[1]*e[0],a=i[0]*r[1]-i[1]*r[0],l=1/(s[0]*n[1]-s[1]*n[0]),c=[(o*n[0]-a*s[0])*l,(o*n[1]-a*s[1])*l];return c.isIntersection=!0,c}return{clipLineString:function(e,i){let r=[],s=t(e,i,!1);for(let t=1;t0===t?0:t>0?1:-1),e=Math.PI/180,i=Math.PI/2,r=t=>Math.tan((i+t)/2);return class{constructor(i){let s=(i.parallels||[]).map((t=>t*e)),n=s[0]||0,o=s[1]??n,a=Math.cos(n);"object"==typeof i.projectedBounds&&(this.projectedBounds=i.projectedBounds);let l=n===o?Math.sin(n):Math.log(a/Math.cos(o))/Math.log(r(o)/r(n));1e-10>Math.abs(l)&&(l=1e-10*(t(l)||1)),this.n=l,this.c=a*Math.pow(r(n),l)/l}forward(t){let{c:s,n,projectedBounds:o}=this,a=t[0]*e,l=t[1]*e;s>0?l<1e-6-i&&(l=1e-6-i):l>i-1e-6&&(l=i-1e-6);let c=s/Math.pow(r(l),n),h=c*Math.sin(n*a)*63.78137,u=63.78137*(s-c*Math.cos(n*a)),d=[h,u];return o&&(ho.x2||uo.y2)&&(d.outside=!0),d}inverse(r){let{c:s,n}=this,o=r[0]/63.78137,a=s-r[1]/63.78137,l=t(n)*Math.sqrt(o*o+a*a),c=Math.atan2(o,Math.abs(a))*t(a);return a*n<0&&(c-=Math.PI*t(o)*t(a)),[c/n/e,(2*Math.atan(Math.pow(s/l,1/n))-i)/e]}}})),i(e,"Maps/Projections/EqualEarth.js",[],(function(){let t=Math.sqrt(3)/2;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}forward(e){let i=Math.PI/180,r=Math.asin(t*Math.sin(e[1]*i)),s=r*r,n=s*s*s;return[e[0]*i*Math.cos(r)*74.03120656864502/(t*(1.340264+-.24331799999999998*s+n*(.0062510000000000005+.034164*s))),74.03120656864502*r*(1.340264+-.081106*s+n*(893e-6+.003796*s))]}inverse(e){let i,r,s,n,o=e[0]/74.03120656864502,a=e[1]/74.03120656864502,l=180/Math.PI,c=a;for(let t=0;t<12&&(r=(i=c*c)*i*i,s=c*(1.340264+-.081106*i+r*(893e-6+.003796*i))-a,c-=n=s/(1.340264+-.24331799999999998*i+r*(.0062510000000000005+.034164*i)),!(1e-9>Math.abs(n)));++t);r=(i=c*c)*i*i;let h=l*t*o*(1.340264+-.24331799999999998*i+r*(.0062510000000000005+.034164*i))/Math.cos(c),u=l*Math.asin(Math.sin(c)/t);return Math.abs(h)>180?[NaN,NaN]:[h,u]}}})),i(e,"Maps/Projections/Miller.js",[],(function(){let t=Math.PI/4,e=Math.PI/180;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}forward(i){return[i[0]*e*63.78137,79.7267125*Math.log(Math.tan(t+.4*i[1]*e))]}inverse(i){return[i[0]/63.78137/e,2.5*(Math.atan(Math.exp(i[1]/63.78137*.8))-t)/e]}}})),i(e,"Maps/Projections/Orthographic.js",[],(function(){let t=Math.PI/180;return class{constructor(){this.antimeridianCutting=!1,this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,y2:63.78460826781007}}forward(e){let i=e[0],r=e[1]*t,s=[Math.cos(r)*Math.sin(i*t)*63.78460826781007,63.78460826781007*Math.sin(r)];return(i<-90||i>90)&&(s.outside=!0),s}inverse(e){let i=e[0]/63.78460826781007,r=e[1]/63.78460826781007,s=Math.sqrt(i*i+r*r),n=Math.asin(s),o=Math.sin(n);return[Math.atan2(i*o,s*Math.cos(n))/t,Math.asin(s&&r*o/s)/t]}}})),i(e,"Maps/Projections/WebMercator.js",[],(function(){let t=Math.PI/180;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071},this.maxLatitude=85.0511287798}forward(e){let i=Math.sin(e[1]*t),r=[63.78137*e[0]*t,63.78137*Math.log((1+i)/(1-i))/2];return Math.abs(e[1])>this.maxLatitude&&(r.outside=!0),r}inverse(e){return[e[0]/(63.78137*t),(2*Math.atan(Math.exp(e[1]/63.78137))-Math.PI/2)/t]}}})),i(e,"Maps/Projections/ProjectionRegistry.js",[e["Maps/Projections/LambertConformalConic.js"],e["Maps/Projections/EqualEarth.js"],e["Maps/Projections/Miller.js"],e["Maps/Projections/Orthographic.js"],e["Maps/Projections/WebMercator.js"]],(function(t,e,i,r,s){return{EqualEarth:e,LambertConformalConic:t,Miller:i,Orthographic:r,WebMercator:s}})),i(e,"Maps/Projection.js",[e["Core/Geometry/PolygonClip.js"],e["Maps/Projections/ProjectionRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{clipLineString:r,clipPolygon:s}=t,{clamp:n,erase:o}=i,a=2*Math.PI/360,l=t=>(t<-180&&(t+=360),t>180&&(t-=360),t),c=t=>(1-Math.cos(t))/2;class h{static add(t,e){h.registry[t]=e}static distance(t,e){let{atan2:i,sqrt:r}=Math,s=((t,e)=>{let i=Math.cos,r=t[1]*a,s=t[0]*a,n=e[1]*a,o=e[0]*a;return c(n-r)+i(r)*i(n)*c(o-s)})(t,e);return 2*i(r(s),r(1-s))*6371e3}static geodesic(t,e,i,r=5e5){let{atan2:s,cos:n,sin:o,sqrt:l}=Math,c=h.distance,u=t[1]*a,d=t[0]*a,p=e[1]*a,f=e[0]*a,m=n(u)*n(d),g=n(p)*n(f),y=n(u)*o(d),_=n(p)*o(f),v=o(u),x=o(p),b=c(t,e),w=b/6371e3,S=o(w),C=Math.round(b/r),T=[];if(i&&T.push(t),C>1){let t=1/C;for(let e=t;e<.999;e+=t){let t=o((1-e)*w)/S,i=o(e*w)/S,r=t*m+i*g,n=t*y+i*_,c=s(t*v+i*x,l(r*r+n*n)),h=s(n,r);T.push([h/a,c/a])}}return i&&T.push(e),T}static insertGeodesics(t){let e=t.length-1;for(;e--;)if(Math.max(Math.abs(t[e][0]-t[e+1][0]),Math.abs(t[e][1]-t[e+1][1]))>10){let i=h.geodesic(t[e],t[e+1]);i.length&&t.splice(e+1,0,...i)}}static toString(t){let{name:e,rotation:i}=t||{};return[e,i&&i.join(",")].join(";")}constructor(t={}){this.hasCoordinates=!1,this.hasGeoProjection=!1,this.maxLatitude=90,this.options=t;let{name:e,projectedBounds:i,rotation:r}=t;this.rotator=r?this.getRotator(r):void 0;let s=e?h.registry[e]:void 0;s&&(this.def=new s(t));let{def:n,rotator:o}=this;n&&(this.maxLatitude=n.maxLatitude||90,this.hasGeoProjection=!0),o&&n?(this.forward=t=>n.forward(o.forward(t)),this.inverse=t=>o.inverse(n.inverse(t))):n?(this.forward=t=>n.forward(t),this.inverse=t=>n.inverse(t)):o&&(this.forward=o.forward,this.inverse=o.inverse),this.bounds="world"===i?n&&n.bounds:i}lineIntersectsBounds(t){let e,{x1:i,x2:r,y1:s,y2:n}=this.bounds||{},o=(t,e,i)=>{let[r,s]=t,n=e?0:1;if("number"==typeof i&&r[e]>=i!=s[e]>=i){let t=(i-r[e])/(s[e]-r[e]),o=r[n]+t*(s[n]-r[n]);return e?[o,i]:[i,o]}},a=t[0];return((e=o(t,0,i))||(e=o(t,0,r)))&&(a=e,t[1]=e),((e=o(t,1,s))||(e=o(t,1,n)))&&(a=e),a}getRotator(t){let e=t[0]*a,i=(t[1]||0)*a,r=(t[2]||0)*a,s=Math.cos(i),n=Math.sin(i),o=Math.cos(r),l=Math.sin(r);if(0!==e||0!==i||0!==r)return{forward:t=>{let i=t[0]*a+e,r=t[1]*a,c=Math.cos(r),h=Math.cos(i)*c,u=Math.sin(i)*c,d=Math.sin(r),p=d*s+h*n;return[Math.atan2(u*o-p*l,h*s-d*n)/a,Math.asin(p*o+u*l)/a]},inverse:t=>{let i=t[0]*a,r=t[1]*a,c=Math.cos(r),h=Math.cos(i)*c,u=Math.sin(i)*c,d=Math.sin(r),p=d*o-u*l;return[(Math.atan2(u*o+d*l,h*s+p*n)-e)/a,Math.asin(p*s-h*n)/a]}}}forward(t){return t}inverse(t){return t}cutOnAntimeridian(t,e){let i,r=[],s=[t];for(let i=0,s=t.length;i90)&&(l<-90||l>90)&&a>0!=l>0){let t=n((180-(a+360)%360)/((l+360)%360-(a+360)%360),0,1),e=o[1]+t*(s[1]-o[1]);r.push({i,lat:e,direction:a<0?1:-1,previousLonLat:o,lonLat:s})}}if(r.length)if(e){r.length%2==1&&(i=r.slice().sort(((t,e)=>Math.abs(e.lat)-Math.abs(t.lat)))[0],o(r,i));let e=r.length-2;for(;e>=0;){let i=r[e].i,n=l(180+1e-6*r[e].direction),o=l(180-1e-6*r[e].direction),a=t.splice(i,r[e+1].i-i,...h.geodesic([n,r[e].lat],[n,r[e+1].lat],!0));a.push(...h.geodesic([o,r[e+1].lat],[o,r[e].lat],!0)),s.push(a),e-=2}if(i)for(let t=0;t-1){let t=(r<0?-1:1)*this.maxLatitude,s=l(180+1e-6*e),a=l(180-1e-6*e),c=h.geodesic([s,r],[s,t],!0);for(let i=s+120*e;i>-180&&i<180;i+=120*e)c.push([i,t]);c.push(...h.geodesic([a,t],[a,i.lat],!0)),n.splice(o,0,...c);break}}}else{let e=r.length;for(;e--;){let i=r[e].i,n=t.splice(i,t.length,[l(180+1e-6*r[e].direction),r[e].lat]);n.unshift([l(180-1e-6*r[e].direction),r[e].lat]),s.push(n)}}return s}path(t){let e,{bounds:i,def:n,rotator:o}=this,a=[],l="Polygon"===t.type||"MultiPolygon"===t.type,c=this.hasGeoProjection,u=!n||!1!==n.antimeridianCutting,d=u?o:void 0,p=u&&n||this;i&&(e=[[i.x1,i.y1],[i.x2,i.y1],[i.x2,i.y2],[i.x1,i.y2]]);let f=t=>{let n=t.map((t=>{if(u){d&&(t=d.forward(t));let e=t[0];1e-6>Math.abs(e-180)&&(e=e<180?179.999999:180.000001),t=[e,t[1]]}return t})),o=[n];c&&(h.insertGeodesics(n),u&&(o=this.cutOnAntimeridian(n,l))),o.forEach((t=>{let n,o;if(t.length<2)return;let d=!1,f=!1,m=t=>{d?a.push(["L",t[0],t[1]]):(a.push(["M",t[0],t[1]]),d=!0)},g=!1,y=!1,_=t.map((t=>{let e=p.forward(t);return e.outside?g=!0:y=!0,e[1]===1/0?e[1]=1e10:e[1]===-1/0&&(e[1]=-1e10),e}));if(u){if(l&&_.push(_[0]),g){if(!y)return;if(e)if(l)_=s(_,e);else if(i)return void r(_,e).forEach((t=>{d=!1,t.forEach(m)}))}_.forEach(m)}else for(let e=0;e<_.length;e++){let i=t[e],r=_[e];r.outside?f=!0:(l&&!n&&(n=i,t.push(i),_.push(r)),f&&o&&(l&&c?h.geodesic(o,i).forEach((t=>m(p.forward(t)))):d=!1),m(r),o=i,f=!1)}}))};return"LineString"===t.type?f(t.coordinates):"MultiLineString"===t.type?t.coordinates.forEach((t=>f(t))):"Polygon"===t.type?(t.coordinates.forEach((t=>f(t))),a.length&&a.push(["Z"])):"MultiPolygon"===t.type&&(t.coordinates.forEach((t=>{t.forEach((t=>f(t)))})),a.length&&a.push(["Z"])),a}}return h.registry=e,h})),i(e,"Maps/MapView.js",[e["Core/Globals.js"],e["Maps/MapViewDefaults.js"],e["Maps/GeoJSONComposition.js"],e["Core/Geometry/GeometryUtilities.js"],e["Maps/MapUtilities.js"],e["Maps/Projection.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o){let{composed:a}=t,{pointInPolygon:l}=r,{topo2geo:c}=i,{boundsFromPath:h}=s,{addEvent:u,clamp:d,crisp:p,fireEvent:f,isArray:m,isNumber:g,isObject:y,isString:_,merge:v,pick:x,pushUnique:b,relativeLength:w}=o,S={};function C(t,e){let{width:i,height:r}=e;return Math.log(400.979322/Math.max((t.x2-t.x1)/(i/256),(t.y2-t.y1)/(r/256)))/Math.log(2)}function T(t){t.seriesOptions.mapData&&this.mapView?.recommendMapView(this,[this.options.chart.map,t.seriesOptions.mapData],this.options.drilldown?.mapZooming)}class k{static compose(t){b(a,"MapView")&&(S=t.maps,u(t,"afterInit",(function(){this.mapView=new k(this,this.options.mapView)}),{order:0}),u(t,"addSeriesAsDrilldown",T),u(t,"afterDrillUp",T))}static compositeBounds(t){if(t.length)return t.slice(1).reduce(((t,e)=>(t.x1=Math.min(t.x1,e.x1),t.y1=Math.min(t.y1,e.y1),t.x2=Math.max(t.x2,e.x2),t.y2=Math.max(t.y2,e.y2),t)),v(t[0]))}static mergeInsets(t,e){let i=t=>{let e={};return t.forEach(((t,i)=>{e[t&&t.id||`i${i}`]=t})),e},r=v(i(t),i(e));return Object.keys(r).map((t=>r[t]))}constructor(t,i){this.allowTransformAnimation=!0,this.eventsToUnbind=[],this.insets=[],this.padding=[0,0,0,0],this.recommendedMapView={},this instanceof E||this.recommendMapView(t,[t.options.chart.map,...(t.options.series||[]).map((t=>t.mapData))]),this.userOptions=i||{};let r=v(e,this.recommendedMapView,i),s=this.recommendedMapView?.insets,o=i&&i.insets;s&&o&&(r.insets=k.mergeInsets(s,o)),this.chart=t,this.center=r.center,this.options=r,this.projection=new n(r.projection),this.playingField=t.plotBox,this.zoom=r.zoom||0,this.minZoom=r.minZoom,this.createInsets(),this.eventsToUnbind.push(u(t,"afterSetChartSize",(()=>{this.playingField=this.getField(),(void 0===this.minZoom||this.minZoom===this.zoom)&&(this.fitToBounds(void 0,void 0,!1),!this.chart.hasRendered&&g(this.userOptions.zoom)&&(this.zoom=this.userOptions.zoom),this.userOptions.center&&v(!0,this.center,this.userOptions.center))}))),this.setUpEvents()}createInsets(){let t=this.options,e=t.insets;e&&e.forEach((e=>{let i=new E(this,v(t.insetOptions,e));this.insets.push(i)}))}fitToBounds(t,e,i=!0,r){let s=t||this.getProjectedBounds();if(s){let n=x(e,t?0:this.options.padding),o=this.getField(!1),a=m(n)?n:[n,n,n,n];this.padding=[w(a[0],o.height),w(a[1],o.width),w(a[2],o.height),w(a[3],o.width)],this.playingField=this.getField();let l=C(s,this.playingField);t||(this.minZoom=l);let c=this.projection.inverse([(s.x2+s.x1)/2,(s.y2+s.y1)/2]);this.setView(c,l,i,r)}}getField(t=!0){let e=t?this.padding:[0,0,0,0];return{x:e[3],y:e[0],width:this.chart.plotWidth-e[1]-e[3],height:this.chart.plotHeight-e[0]-e[2]}}getGeoMap(t){if(_(t))return S[t]&&"Topology"===S[t].type?c(S[t]):S[t];if(y(t,!0)){if("FeatureCollection"===t.type)return t;if("Topology"===t.type)return c(t)}}getMapBBox(){let t=this.getProjectedBounds(),e=this.getScale();if(t){let i=this.padding,r=this.projectedUnitsToPixels({x:t.x1,y:t.y2});return{width:(t.x2-t.x1)*e+i[1]+i[3],height:(t.y2-t.y1)*e+i[0]+i[2],x:r.x-i[3],y:r.y-i[0]}}}getProjectedBounds(){let t=this.projection,e=this.chart.series.reduce(((t,e)=>{let i=e.getProjectedBounds&&e.getProjectedBounds();return i&&!1!==e.options.affectsMapView&&t.push(i),t}),[]),i=this.options.fitToGeometry;if(i){if(!this.fitToGeometryCache)if("MultiPoint"===i.type){let e=i.coordinates.map((e=>t.forward(e))),r=e.map((t=>t[0])),s=e.map((t=>t[1]));this.fitToGeometryCache={x1:Math.min.apply(0,r),x2:Math.max.apply(0,r),y1:Math.min.apply(0,s),y2:Math.max.apply(0,s)}}else this.fitToGeometryCache=h(t.path(i));return this.fitToGeometryCache}return this.projection.bounds||k.compositeBounds(e)}getScale(){return 256/400.979322*Math.pow(2,this.zoom)}getSVGTransform(){let{x:t,y:e,width:i,height:r}=this.playingField,s=this.projection.forward(this.center),n=this.projection.hasCoordinates?-1:1,o=this.getScale(),a=o*n;return{scaleX:o,scaleY:a,translateX:t+i/2-s[0]*o,translateY:e+r/2-s[1]*a}}lonLatToPixels(t){let e=this.lonLatToProjectedUnits(t);if(e)return this.projectedUnitsToPixels(e)}lonLatToProjectedUnits(t){let e=this.chart,i=e.mapTransforms;if(i){for(let r in i)if(Object.hasOwnProperty.call(i,r)&&i[r].hitZone){let s=e.transformFromLatLon(t,i[r]);if(s&&l(s,i[r].hitZone.coordinates[0]))return s}return e.transformFromLatLon(t,i.default)}for(let e of this.insets)if(e.options.geoBounds&&l({x:t.lon,y:t.lat},e.options.geoBounds.coordinates[0])){let i=e.projection.forward([t.lon,t.lat]),r=e.projectedUnitsToPixels({x:i[0],y:i[1]});return this.pixelsToProjectedUnits(r)}let r=this.projection.forward([t.lon,t.lat]);if(!r.outside)return{x:r[0],y:r[1]}}projectedUnitsToLonLat(t){let e=this.chart,i=e.mapTransforms;if(i){for(let r in i)if(Object.hasOwnProperty.call(i,r)&&i[r].hitZone&&l(t,i[r].hitZone.coordinates[0]))return e.transformToLatLon(t,i[r]);return e.transformToLatLon(t,i.default)}let r=this.projectedUnitsToPixels(t);for(let t of this.insets)if(t.hitZone&&l(r,t.hitZone.coordinates[0])){let e=t.pixelsToProjectedUnits(r),i=t.projection.inverse([e.x,e.y]);return{lon:i[0],lat:i[1]}}let s=this.projection.inverse([t.x,t.y]);return{lon:s[0],lat:s[1]}}recommendMapView(t,e,i=!1){this.recommendedMapView={};let r=e.map((t=>this.getGeoMap(t))),s=[];r.forEach((t=>{if(t&&(Object.keys(this.recommendedMapView).length||(this.recommendedMapView=t["hc-recommended-mapview"]||{}),t.bbox)){let[e,i,r,n]=t.bbox;s.push({x1:e,y1:i,x2:r,y2:n})}}));let n=s.length&&k.compositeBounds(s);f(this,"onRecommendMapView",{geoBounds:n,chart:t},(function(){if(n&&this.recommendedMapView){if(!this.recommendedMapView.projection){let{x1:t,y1:e,x2:i,y2:r}=n;this.recommendedMapView.projection=i-t>180&&r-e>90?{name:"EqualEarth",parallels:[0,0],rotation:[0]}:{name:"LambertConformalConic",parallels:[e,r],rotation:[-(t+i)/2]}}this.recommendedMapView.insets||(this.recommendedMapView.insets=void 0)}})),this.geoMap=r[0],i&&t.hasRendered&&!t.userOptions.mapView?.projection&&this.recommendedMapView&&this.update(this.recommendedMapView)}redraw(t){this.chart.series.forEach((t=>{t.useMapGeometry&&(t.isDirty=!0)})),this.chart.redraw(t)}setView(t,e,i=!0,r){t&&(this.center=t),"number"==typeof e&&("number"==typeof this.minZoom&&(e=Math.max(e,this.minZoom)),"number"==typeof this.options.maxZoom&&(e=Math.min(e,this.options.maxZoom)),g(e)&&(this.zoom=e));let s=this.getProjectedBounds();if(s){let t=this.projection.forward(this.center),{x:e,y:i,width:r,height:n}=this.playingField,o=this.getScale(),a=this.projectedUnitsToPixels({x:s.x1,y:s.y1}),l=this.projectedUnitsToPixels({x:s.x2,y:s.y2}),c=[(s.x1+s.x2)/2,(s.y1+s.y2)/2];if(!this.chart.series.some((t=>t.isDrilling))){let s=a.x,h=l.y,u=l.x,d=a.y;u-se+r&&s>e&&(t[0]+=Math.min(u-r-e,s-e)/o),d-hi+n&&h>i&&(t[1]-=Math.min(d-n-i,h-i)/o),this.center=this.projection.inverse(t)}this.insets.forEach((t=>{t.options.field&&(t.hitZone=t.getHitZone(),t.playingField=t.getField())})),this.render()}f(this,"afterSetView"),i&&this.redraw(r)}projectedUnitsToPixels(t){let e=this.getScale(),i=this.projection.forward(this.center),r=this.playingField,s=r.x+r.width/2,n=r.y+r.height/2;return{x:s-e*(i[0]-t.x),y:n+e*(i[1]-t.y)}}pixelsToLonLat(t){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(t))}pixelsToProjectedUnits(t){let{x:e,y:i}=t,r=this.getScale(),s=this.projection.forward(this.center),n=this.playingField,o=n.x+n.width/2,a=n.y+n.height/2;return{x:s[0]+(e-o)/r,y:s[1]-(i-a)/r}}setUpEvents(){let t,e,i,{chart:r}=this,s=s=>{let{lastTouches:n,pinchDown:o}=r.pointer,a=this.projection,l=s.touches,{mouseDownX:c,mouseDownY:h}=r,u=0;if(1===o?.length?(c=o[0].chartX,h=o[0].chartY):2===o?.length&&(c=(o[0].chartX+o[1].chartX)/2,h=(o[0].chartY+o[1].chartY)/2),2===l?.length&&n&&(u=Math.log(Math.sqrt(Math.pow(n[0].chartX-n[1].chartX,2)+Math.pow(n[0].chartY-n[1].chartY,2))/Math.sqrt(Math.pow(l[0].chartX-l[1].chartX,2)+Math.pow(l[0].chartY-l[1].chartY,2)))/Math.log(.5)),g(c)&&g(h)){let n=`${c},${h}`,{chartX:o,chartY:p}=s.originalEvent;2===l?.length&&(o=(l[0].chartX+l[1].chartX)/2,p=(l[0].chartY+l[1].chartY)/2),n!==e&&(e=n,t=this.projection.forward(this.center),i=(this.projection.options.rotation||[0,0]).slice());let f=a.def&&a.def.bounds,m=f&&C(f,this.playingField)||-1/0;if("Orthographic"===a.options.name&&2>(l?.length||0)&&(this.minZoom||1/0)<1.3*m){let t=440/(this.getScale()*Math.min(r.plotWidth,r.plotHeight));if(i){let e=(c-o)*t-i[0],s=d(-i[1]-(h-p)*t,-80,80),n=this.zoom;this.update({projection:{rotation:[-e,-s]}},!1),this.fitToBounds(void 0,void 0,!1),this.zoom=n,r.redraw(!1)}}else if(g(o)&&g(p)){let e=this.getScale(),i=this.projection.hasCoordinates?1:-1,r=this.projection.inverse([t[0]+(c-o)/e,t[1]-(h-p)/e*i]);isNaN(r[0]+r[1])||this.zoomBy(u,r,void 0,!1)}s.preventDefault()}};u(r,"pan",s),u(r,"touchpan",s),u(r,"selection",(t=>{if(t.resetSelection)this.zoomBy();else{let e=t.x-r.plotLeft,i=t.y-r.plotTop,{y:s,x:n}=this.pixelsToProjectedUnits({x:e,y:i}),{y:o,x:a}=this.pixelsToProjectedUnits({x:e+t.width,y:i+t.height});this.fitToBounds({x1:n,y1:s,x2:a,y2:o},void 0,!0,!t.originalEvent.touches&&void 0),/^touch/.test(t.originalEvent.type)||r.showResetZoom(),t.preventDefault()}}))}render(){this.group||(this.group=this.chart.renderer.g("map-view").attr({zIndex:4}).add())}update(t,e=!0,i){let r=t.projection,s=r&&n.toString(r)!==n.toString(this.options.projection),o=!1;v(!0,this.userOptions,t),v(!0,this.options,t),"insets"in t&&(this.insets.forEach((t=>t.destroy())),this.insets.length=0,o=!0),(s||"fitToGeometry"in t)&&delete this.fitToGeometryCache,(s||o)&&(this.chart.series.forEach((t=>{let e=t.transformGroups;if(t.clearBounds&&t.clearBounds(),t.isDirty=!0,t.isDirtyData=!0,o&&e)for(;e.length>1;){let t=e.pop();t&&t.destroy()}})),s&&(this.projection=new n(this.options.projection)),o&&this.createInsets(),!t.center&&Object.hasOwnProperty.call(t,"zoom")&&!g(t.zoom)&&this.fitToBounds(void 0,void 0,!1)),t.center||g(t.zoom)?this.setView(this.options.center,t.zoom,!1):"fitToGeometry"in t&&this.fitToBounds(void 0,void 0,!1),e&&this.chart.redraw(i)}zoomBy(t,e,i,r){let s=this.chart,n=this.projection.forward(this.center);if("number"==typeof t){let o,a,l,c=this.zoom+t;if(i){let[t,e]=i,r=this.getScale(),o=t-s.plotLeft-s.plotWidth/2,c=e-s.plotTop-s.plotHeight/2;a=n[0]+o/r,l=n[1]+c/r}if("number"==typeof a&&"number"==typeof l){let t=1-Math.pow(2,this.zoom)/Math.pow(2,c),e=n[0]-a,i=n[1]-l;n[0]-=e*t,n[1]+=i*t,o=this.projection.inverse(n)}this.setView(e||o,c,void 0,r)}else this.fitToBounds(void 0,void 0,void 0,r)}}class E extends k{constructor(t,e){if(super(t.chart,e),this.id=e.id,this.mapView=t,this.options=v({center:[0,0]},t.options.insetOptions,e),this.allBounds=[],this.options.geoBounds){let e=t.projection.path(this.options.geoBounds);this.geoBoundsProjectedBox=h(e),this.geoBoundsProjectedPolygon=e.map((t=>[t[1]||0,t[2]||0]))}}getField(t=!0){let e=this.hitZone;if(e){let i=t?this.padding:[0,0,0,0],r=e.coordinates[0],s=r.map((t=>t[0])),n=r.map((t=>t[1])),o=Math.min.apply(0,s)+i[3],a=Math.max.apply(0,s)-i[1],l=Math.min.apply(0,n)+i[0],c=Math.max.apply(0,n)-i[2];if(g(o)&&g(l))return{x:o,y:l,width:a-o,height:c-l}}return super.getField.call(this,t)}getHitZone(){let{chart:t,mapView:e,options:i}=this,{coordinates:r}=i.field||{};if(r){let s=r[0];if("percent"===i.units){let r="mapBoundingBox"===i.relativeTo&&e.getMapBBox()||v(t.plotBox,{x:0,y:0});s=s.map((t=>[w(`${t[0]}%`,r.width,r.x),w(`${t[1]}%`,r.height,r.y)]))}return{type:"Polygon",coordinates:[s]}}}getProjectedBounds(){return k.compositeBounds(this.allBounds)}isInside(t){let{geoBoundsProjectedBox:e,geoBoundsProjectedPolygon:i}=this;return!!(e&&t.x>=e.x1&&t.x<=e.x2&&t.y>=e.y1&&t.y<=e.y2&&i&&l(t,i))}render(){let{chart:t,mapView:e,options:i}=this,r=i.borderPath||i.field;if(r&&e.group){let s=!0;this.border||(this.border=t.renderer.path().addClass("highcharts-mapview-inset-border").add(e.group),s=!1),t.styledMode||this.border.attr({stroke:i.borderColor,"stroke-width":i.borderWidth});let n=this.border.strokeWidth(),o="mapBoundingBox"===i.relativeTo&&e.getMapBBox()||e.playingField,a=(r.coordinates||[]).reduce(((e,r)=>r.reduce(((e,r,s)=>{let[a,l]=r;return"percent"===i.units&&(a=t.plotLeft+w(`${a}%`,o.width,o.x),l=t.plotTop+w(`${l}%`,o.height,o.y)),a=p(a,n),l=p(l,n),e.push(0===s?["M",a,l]:["L",a,l]),e}),e)),[]);this.border[s?"animate":"attr"]({d:a})}}destroy(){this.border&&(this.border=this.border.destroy()),this.eventsToUnbind.forEach((t=>t()))}setUpEvents(){}}return k})),i(e,"Series/Map/MapSeries.js",[e["Core/Animation/AnimationUtilities.js"],e["Series/ColorMapComposition.js"],e["Series/CenteredUtilities.js"],e["Core/Globals.js"],e["Core/Chart/MapChart.js"],e["Series/Map/MapPoint.js"],e["Series/Map/MapSeriesDefaults.js"],e["Maps/MapView.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n,o,a,l,c){let{animObject:h,stop:u}=t,{noop:d}=r,{splitPath:p}=s,{column:f,scatter:m}=l.seriesTypes,{extend:g,find:y,fireEvent:_,getNestedProperty:v,isArray:x,defined:b,isNumber:w,isObject:S,merge:C,objectEach:T,pick:k,splat:E}=c;class A extends m{constructor(){super(...arguments),this.processedData=[]}animate(t){let{chart:e,group:i}=this,r=h(this.options.animation);t?i.attr({translateX:e.plotLeft+e.plotWidth/2,translateY:e.plotTop+e.plotHeight/2,scaleX:.001,scaleY:.001}):i.animate({translateX:e.plotLeft,translateY:e.plotTop,scaleX:1,scaleY:1},r)}clearBounds(){this.points.forEach((t=>{delete t.bounds,delete t.insetIndex,delete t.projectedPath})),delete this.bounds}doFullTranslate(){return!(!this.isDirtyData&&!this.chart.isResizing&&this.hasRendered)}drawMapDataLabels(){super.drawDataLabels(),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)}drawPoints(){let t=this,{chart:e,group:i,transformGroups:r=[]}=this,{mapView:s,renderer:n}=e;if(s){this.transformGroups=r,r[0]||(r[0]=n.g().add(i));for(let t=0,e=s.insets.length;t{let{graphic:e}=t;t.group=r["number"==typeof t.insetIndex?t.insetIndex+1:0],e&&e.parentGroup!==t.group&&e.add(t.group)})),f.prototype.drawPoints.apply(this),this.points.forEach((i=>{let r=i.graphic;if(r){let s=r.animate,n="";i.name&&(n+="highcharts-name-"+i.name.replace(/ /g,"-").toLowerCase()),i.properties&&i.properties["hc-key"]&&(n+=" highcharts-key-"+i.properties["hc-key"].toString().toLowerCase()),n&&r.addClass(n),e.styledMode&&r.css(this.pointAttribs(i,i.selected?"select":void 0)),r.attr({visibility:i.visible||!i.visible&&!i.isNull?"inherit":"hidden"}),r.animate=function(i,n,o){let a=w(i["stroke-width"])&&!w(r["stroke-width"]),l=w(r["stroke-width"])&&!w(i["stroke-width"]);if(a||l){let s=k(t.getStrokeWidth(t.options),1)/(e.mapView&&e.mapView.getScale()||1);a&&(r["stroke-width"]=s),l&&(i["stroke-width"]=s)}return s.call(r,i,n,l?function(){r.element.removeAttribute("stroke-width"),delete r["stroke-width"],o&&o.apply(this,arguments)}:o)}}}))),r.forEach(((i,r)=>{let o=(0===r?s:s.insets[r-1]).getSVGTransform(),a=k(this.getStrokeWidth(this.options),1),l=o.scaleX,c=o.scaleY>0?1:-1,d=e=>{(t.points||[]).forEach((t=>{let i,r=t.graphic;r&&r["stroke-width"]&&(i=this.getStrokeWidth(t.options))&&r.attr({"stroke-width":i/e})}))};if(n.globalAnimation&&e.hasRendered&&s.allowTransformAnimation){let t=Number(i.attr("translateX")),e=Number(i.attr("translateY")),r=Number(i.attr("scaleX")),s=(s,n)=>{let h=r+(l-r)*n.pos;i.attr({translateX:t+(o.translateX-t)*n.pos,translateY:e+(o.translateY-e)*n.pos,scaleX:h,scaleY:h*c,"stroke-width":a/h}),d(h)},u=C(h(n.globalAnimation)),p=u.step;u.step=function(){p&&p.apply(this,arguments),s.apply(this,arguments)},i.attr({animator:0}).animate({animator:1},u,function(){"boolean"!=typeof n.globalAnimation&&n.globalAnimation.complete&&n.globalAnimation.complete({applyDrilldown:!0}),_(this,"mapZoomComplete")}.bind(this))}else u(i),i.attr(C(o,{"stroke-width":a/l})),d(l)})),this.isDrilling||this.drawMapDataLabels()}}getProjectedBounds(){if(!this.bounds&&this.chart.mapView){let{insets:t,projection:e}=this.chart.mapView,i=[];(this.points||[]).forEach((r=>{if(r.path||r.geometry){if("string"==typeof r.path?r.path=p(r.path):x(r.path)&&"M"===r.path[0]&&(r.path=this.chart.renderer.pathToSegments(r.path)),!r.bounds){let i=r.getProjectedBounds(e);if(i){r.labelrank=k(r.labelrank,(i.x2-i.x1)*(i.y2-i.y1));let{midX:e,midY:s}=i;if(t&&w(e)&&w(s)){let n=y(t,(t=>t.isInside({x:e,y:s})));n&&(delete r.projectedPath,(i=r.getProjectedBounds(n.projection))&&n.allBounds.push(i),r.insetIndex=t.indexOf(n))}r.bounds=i}}r.bounds&&void 0===r.insetIndex&&i.push(r.bounds)}})),this.bounds=a.compositeBounds(i)}return this.bounds}getStrokeWidth(t){let e=this.pointAttrToOptions;return t[e&&e["stroke-width"]||"borderWidth"]}hasData(){return!!this.processedXData.length}pointAttribs(t,e){let{mapView:i,styledMode:r}=t.series.chart,s=r?this.colorAttribs(t):f.prototype.pointAttribs.call(this,t,e),n=this.getStrokeWidth(t.options);if(e){let i=C(this.options.states&&this.options.states[e],t.options.states&&t.options.states[e]||{}),r=this.getStrokeWidth(i);b(r)&&(n=r),s.stroke=i.borderColor??t.color}n&&i&&(n/=i.getScale());let o=this.getStrokeWidth(this.options);return s.dashstyle&&i&&w(o)&&(n=o/i.getScale()),t.visible||(s.fill=this.options.nullColor),b(n)?s["stroke-width"]=n:delete s["stroke-width"],s["stroke-linecap"]=s["stroke-linejoin"]=this.options.linecap,s}updateData(){return!this.processedData&&super.updateData.apply(this,arguments)}setData(t,e=!0,i,r){delete this.bounds,super.setData(t,!1,void 0,r),this.processData(),this.generatePoints(),e&&this.chart.redraw(i)}processData(){let t,e,i,s=this.options,o=s.data,a=this.chart,l=a.options.chart,c=this.joinBy,h=s.keys||this.pointArrayMap,u=[],d={},p=this.chart.mapView,f=p&&(S(s.mapData,!0)?p.getGeoMap(s.mapData):p.geoMap),m=a.mapTransforms=l.mapTransforms||f&&f["hc-transform"]||a.mapTransforms;m&&T(m,(t=>{t.rotation&&(t.cosAngle=Math.cos(t.rotation),t.sinAngle=Math.sin(t.rotation))})),x(s.mapData)?i=s.mapData:f&&"FeatureCollection"===f.type&&(this.mapTitle=f.title,i=r.geojson(f,this.type,this)),this.processedData=[];let g=this.processedData;if(o){let t;for(let e=0,i=o.length;eh.length&&"string"==typeof t[0]&&(g[e]["hc-key"]=t[0],++i);for(let r=0;r0?n.prototype.setNestedProperty(g[e],t[i],h[r]):g[e][h[r]]=t[i])}else g[e]=o[e];c&&"_i"===c[0]&&(g[e]._i=e)}}if(i){this.mapData=i,this.mapMap={};for(let r=0;r{let i=v(t,e);d[i]&&u.push(d[i])}))}if(s.allAreas){if(c[1]){let t=c[1];g.forEach((e=>{u.push(v(t,e))}))}let t="|"+u.map((function(t){return t&&t[c[0]]})).join("|")+"|";i.forEach((e=>{c[0]&&-1!==t.indexOf("|"+e[c[0]]+"|")||g.push(C(e,{value:null}))}))}}this.processedXData=Array(g.length)}setOptions(t){let e=super.setOptions(t),i=e.joinBy;return null===e.joinBy&&(i="_i"),(i=this.joinBy=E(i))[1]||(i[1]=i[0]),e}translate(){let t=this.doFullTranslate(),e=this.chart.mapView,i=e&&e.projection;if(this.chart.hasRendered&&(this.isDirtyData||!this.hasRendered)&&(this.processData(),this.generatePoints(),delete this.bounds,!e||e.userOptions.center||w(e.userOptions.zoom)||e.zoom!==e.minZoom?this.getProjectedBounds():e.fitToBounds(void 0,void 0,!1)),e){let r=e.getSVGTransform();this.points.forEach((s=>{let o=w(s.insetIndex)&&e.insets[s.insetIndex].getSVGTransform()||r;o&&s.bounds&&w(s.bounds.midX)&&w(s.bounds.midY)&&(s.plotX=s.bounds.midX*o.scaleX+o.translateX,s.plotY=s.bounds.midY*o.scaleY+o.translateY),t&&(s.shapeType="path",s.shapeArgs={d:n.getProjectedPath(s,i)}),s.hiddenInDataClass||(s.projectedPath&&!s.projectedPath.length?s.setVisible(!1):s.visible||s.setVisible(!0))}))}_(this,"afterTranslate")}update(t){t.mapData&&this.chart.mapView?.recommendMapView(this.chart,[this.chart.options.chart.map,...(this.chart.options.series||[]).map(((e,i)=>i===this._i?t.mapData:e.mapData))],!0),super.update.apply(this,arguments)}}return A.defaultOptions=C(m.defaultOptions,o),g(A.prototype,{type:"map",axisTypes:e.seriesMembers.axisTypes,colorAttribs:e.seriesMembers.colorAttribs,colorKey:e.seriesMembers.colorKey,directTouch:!0,drawDataLabels:d,drawGraph:d,forceDL:!0,getCenter:i.getCenter,getExtremesFromAll:!0,getSymbol:d,isCartesian:!1,parallelArrays:e.seriesMembers.parallelArrays,pointArrayMap:e.seriesMembers.pointArrayMap,pointClass:n,preserveAspectRatio:!0,searchPoint:d,trackerGroups:e.seriesMembers.trackerGroups,useMapGeometry:!0}),e.compose(A),l.registerSeriesType("map",A),A})),i(e,"Series/MapLine/MapLineSeriesDefaults.js",[],(function(){return{lineWidth:1,fillColor:"none",legendSymbol:"lineMarker"}})),i(e,"Series/MapLine/MapLineSeries.js",[e["Series/MapLine/MapLineSeriesDefaults.js"],e["Series/Map/MapSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{extend:s,merge:n}=r;class o extends e{pointAttribs(t,e){let i=super.pointAttribs(t,e);return i.fill=this.options.fillColor,i}}return o.defaultOptions=n(e.defaultOptions,t),s(o.prototype,{type:"mapline",colorProp:"stroke",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"}}),i.registerSeriesType("mapline",o),o})),i(e,"Series/MapPoint/MapPointPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e){let{scatter:i}=t.seriesTypes,{isNumber:r}=e;class s extends i.prototype.pointClass{isValid(){return!!(this.options.geometry||r(this.x)&&r(this.y)||r(this.options.lon)&&r(this.options.lat))}}return s})),i(e,"Series/MapPoint/MapPointSeriesDefaults.js",[],(function(){return{dataLabels:{crop:!1,defer:!1,enabled:!0,formatter:function(){return this.point.name},overflow:!1,style:{color:"#000000"}},legendSymbol:"lineMarker"}})),i(e,"Series/MapPoint/MapPointSeries.js",[e["Core/Globals.js"],e["Series/MapPoint/MapPointPoint.js"],e["Series/MapPoint/MapPointSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n){let{noop:o}=t,{map:a,scatter:l}=r.seriesTypes,{extend:c,fireEvent:h,isNumber:u,merge:d}=n;class p extends l{constructor(){super(...arguments),this.clearBounds=a.prototype.clearBounds}drawDataLabels(){super.drawDataLabels(),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)}projectPoint(t){let e=this.chart.mapView;if(e){let{geometry:i,lon:r,lat:s}=t,n=i&&"Point"===i.type&&i.coordinates;if(u(r)&&u(s)&&(n=[r,s]),n)return e.lonLatToProjectedUnits({lon:n[0],lat:n[1]})}}translate(){let t=this.chart.mapView;if(this.processedXData||this.processData(),this.generatePoints(),this.getProjectedBounds&&this.isDirtyData&&(delete this.bounds,this.getProjectedBounds()),t){let e=t.getSVGTransform(),{hasCoordinates:i}=t.projection;this.points.forEach((r=>{let s,{x:n,y:o}=r,a=u(r.insetIndex)&&t.insets[r.insetIndex].getSVGTransform()||e,l=this.projectPoint(r.options)||r.properties&&this.projectPoint(r.properties);if(l?(n=l.x,o=l.y):r.bounds&&(n=r.bounds.midX,o=r.bounds.midY,a&&u(n)&&u(o)&&(r.plotX=n*a.scaleX+a.translateX,r.plotY=o*a.scaleY+a.translateY,s=!0)),u(n)&&u(o)){if(!s){let e=t.projectedUnitsToPixels({x:n,y:o});r.plotX=e.x,r.plotY=i?e.y:this.chart.plotHeight-e.y}}else r.y=r.plotX=r.plotY=void 0;r.isInside=this.isPointInside(r),r.zone=this.zones.length?r.getZone():void 0}))}h(this,"afterTranslate")}}return p.defaultOptions=d(l.defaultOptions,i),s.prototype.symbols.mapmarker=(t,e,i,r,s)=>{let n,o,a=s&&"legend"===s.context;a?(n=t+i/2,o=e+r):s&&"number"==typeof s.anchorX&&"number"==typeof s.anchorY?(n=s.anchorX,o=s.anchorY):(n=t+i/2,o=e+r/2,e-=r);let l=a?r/3:r/2;return[["M",n,o],["C",n,o,n-l,e+1.5*l,n-l,e+l],["A",l,l,1,1,1,n+l,e+l],["C",n+l,e+1.5*l,n,o,n,o],["Z"]]},c(p.prototype,{type:"mappoint",axisTypes:["colorAxis"],forceDL:!0,isCartesian:!1,pointClass:e,searchPoint:o,useMapGeometry:!0}),r.registerSeriesType("mappoint",p),p})),i(e,"Series/Bubble/BubbleLegendDefaults.js",[],(function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}})),i(e,"Series/Bubble/BubbleLegendItem.js",[e["Core/Color/Color.js"],e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{parse:s}=t,{noop:n}=i,{arrayMax:o,arrayMin:a,isNumber:l,merge:c,pick:h,stableSort:u}=r;return class{constructor(t,e){this.setState=n,this.init(t,e)}init(t,e){this.options=t,this.visible=!0,this.chart=e.chart,this.legend=e}addToLegend(t){t.splice(this.options.legendIndex,0,this)}drawLegendSymbol(t){let e,i=h(t.options.itemDistance,20),r=this.legendItem||{},s=this.options,n=s.ranges,o=s.connectorDistance;if(!n||!n.length||!l(n[0].value))return void(t.options.bubbleLegend.autoRanges=!0);u(n,(function(t,e){return e.value-t.value})),this.ranges=n,this.setOptions(),this.render();let a=this.getMaxLabelSize(),c=this.ranges[0].radius,d=2*c;e=(e=o-c+a.width)>0?e:0,this.maxLabel=a,this.movementX="left"===s.labels.align?e:0,r.labelWidth=d+e+i,r.labelHeight=d+a.height/2}setOptions(){let t=this.ranges,e=this.options,i=this.chart.series[e.seriesIndex],r=this.legend.baseline,n={zIndex:e.zIndex,"stroke-width":e.borderWidth},o={zIndex:e.zIndex,"stroke-width":e.connectorWidth},a={align:this.legend.options.rtl||"left"===e.labels.align?"right":"left",zIndex:e.zIndex},l=i.options.marker.fillOpacity,u=this.chart.styledMode;t.forEach((function(d,p){u||(n.stroke=h(d.borderColor,e.borderColor,i.color),n.fill=h(d.color,e.color,1!==l?s(i.color).setOpacity(l).get("rgba"):i.color),o.stroke=h(d.connectorColor,e.connectorColor,i.color)),t[p].radius=this.getRangeRadius(d.value),t[p]=c(t[p],{center:t[0].radius-t[p].radius+r}),u||c(!0,t[p],{bubbleAttribs:c(n),connectorAttribs:c(o),labelAttribs:a})}),this)}getRangeRadius(t){let e=this.options,i=this.options.seriesIndex,r=this.chart.series[i],s=e.ranges[0].value,n=e.ranges[e.ranges.length-1].value,o=e.minSize,a=e.maxSize;return r.getRadius.call(this,n,s,o,a,t)}render(){let t=this.legendItem||{},e=this.chart.renderer,i=this.options.zThreshold;for(let r of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),t.symbol=e.g("bubble-legend"),t.label=e.g("bubble-legend-item").css(this.legend.itemStyle||{}),t.symbol.translateX=0,t.symbol.translateY=0,t.symbol.add(t.label),t.label.add(t.group),this.ranges))r.value>=i&&this.renderRange(r);this.hideOverlappingLabels()}renderRange(t){let e=this.ranges[0],i=this.legend,r=this.options,s=r.labels,n=this.chart,o=n.series[r.seriesIndex],a=n.renderer,l=this.symbols,c=l.labels,h=t.center,u=Math.abs(t.radius),d=r.connectorDistance||0,p=s.align,f=i.options.rtl,m=r.borderWidth,g=r.connectorWidth,y=e.radius||0,_=h-u-m/2+g/2,v=(_%1?1:.5)-(g%2?0:.5),x=a.styledMode,b=f||"left"===p?-d:d;"center"===p&&(b=0,r.connectorDistance=0,t.labelAttribs.align="center"),l.bubbleItems.push(a.circle(y,h+v,u).attr(x?{}:t.bubbleAttribs).addClass((x?"highcharts-color-"+o.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(r.className||"")).add(this.legendItem.symbol)),l.connectors.push(a.path(a.crispLine([["M",y,_],["L",y+b,_]],r.connectorWidth)).attr(x?{}:t.connectorAttribs).addClass((x?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(r.connectorClassName||"")).add(this.legendItem.symbol));let w=a.text(this.formatLabel(t)).attr(x?{}:t.labelAttribs).css(x?{}:s.style).addClass("highcharts-bubble-legend-labels "+(r.labels.className||"")).add(this.legendItem.symbol),S={x:y+b+r.labels.x,y:_+r.labels.y+.4*w.getBBox().height};w.attr(S),c.push(w),w.placed=!0,w.alignAttr=S}getMaxLabelSize(){let t,e;return this.symbols.labels.forEach((function(i){e=i.getBBox(!0),t=t?e.width>t.width?e:t:e})),t||{}}formatLabel(t){let i=this.options,r=i.labels.formatter,s=i.labels.format,{numberFormatter:n}=this.chart;return s?e.format(s,t):r?r.call(t):n(t.value,1)}hideOverlappingLabels(){let t=this.chart,e=this.options.labels.allowOverlap,i=this.symbols;!e&&i&&(t.hideOverlappingLabels(i.labels),i.labels.forEach((function(t,e){t.newOpacity?t.newOpacity!==t.oldOpacity&&i.connectors[e].show():i.connectors[e].hide()})))}getRanges(){let t,e,i=this.legend.bubbleLegend,r=i.chart.series,s=i.options.ranges,n=Number.MAX_VALUE,u=-Number.MAX_VALUE;return r.forEach((function(t){t.isBubble&&!t.ignoreSeries&&(e=t.zData.filter(l)).length&&(n=h(t.options.zMin,Math.min(n,Math.max(a(e),!1===t.options.displayNegative?t.options.zThreshold:-Number.MAX_VALUE))),u=h(t.options.zMax,Math.max(u,o(e))))})),t=n===u?[{value:u}]:[{value:n},{value:(n+u)/2},{value:u,autoRanges:!0}],s.length&&s[0].radius&&t.reverse(),t.forEach((function(e,i){s&&s[i]&&(t[i]=c(s[i],e))})),t}predictBubbleSizes(){let t,e=this.chart,i=e.legend.options,r=i.floating,s="horizontal"===i.layout,n=s?e.legend.lastLineHeight:0,o=e.plotSizeX,a=e.plotSizeY,l=e.series[this.options.seriesIndex],c=l.getPxExtremes(),h=Math.ceil(c.minPxSize),u=Math.ceil(c.maxPxSize),d=Math.min(a,o),p=l.options.maxSize;return r||!/%$/.test(p)?t=u:(t=(d+n)*(p=parseFloat(p))/100/(p/100+1),(s&&a-t>=o||!s&&o-t>=a)&&(t=u)),[h,Math.ceil(t)]}updateRanges(t,e){let i=this.legend.options.bubbleLegend;i.minSize=t,i.maxSize=e,i.ranges=this.getRanges()}correctSizes(){let t=this.legend,e=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(e.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,e.maxPxSize),t.render())}}})),i(e,"Series/Bubble/BubbleLegendComposition.js",[e["Series/Bubble/BubbleLegendDefaults.js"],e["Series/Bubble/BubbleLegendItem.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s){let{setOptions:n}=i,{composed:o}=r,{addEvent:a,objectEach:l,pushUnique:c,wrap:h}=s;function u(t,e,i){let r,s,n,o=this.legend,a=d(this)>=0;o&&o.options.enabled&&o.bubbleLegend&&o.options.bubbleLegend.autoRanges&&a?(r=o.bubbleLegend.options,s=o.bubbleLegend.predictBubbleSizes(),o.bubbleLegend.updateRanges(s[0],s[1]),r.placed||(o.group.placed=!1,o.allItems.forEach((t=>{(n=t.legendItem||{}).group&&(n.group.translateY=void 0)}))),o.render(),r.placed||(this.getMargins(),this.axes.forEach((function(t){t.visible&&t.render(),r.placed||(t.setScale(),t.updateNames(),l(t.ticks,(function(t){t.isNew=!0,t.isNewLabel=!0})))})),this.getMargins()),r.placed=!0,t.call(this,e,i),o.bubbleLegend.correctSizes(),g(o,p(o))):(t.call(this,e,i),o&&o.options.enabled&&o.bubbleLegend&&(o.render(),g(o,p(o))))}function d(t){let e=t.series,i=0;for(;ie.height&&(e.height=s[l].itemHeight);e.step=a}return n}function f(t){let i=this.bubbleLegend,r=this.options,s=r.bubbleLegend,n=d(this.chart);i&&i.ranges&&i.ranges.length&&(s.ranges.length&&(s.autoRanges=!!s.ranges[0].autoRanges),this.destroyItem(i)),n>=0&&r.enabled&&s.enabled&&(s.seriesIndex=n,this.bubbleLegend=new e(s,this),this.bubbleLegend.addToLegend(t.allItems))}function m(t){let e;if(t.defaultPrevented)return!1;let i=t.legendItem,r=this.chart,s=i.visible;this&&this.bubbleLegend&&(i.visible=!s,i.ignoreSeries=s,e=d(r)>=0,this.bubbleLegend.visible!==e&&(this.update({bubbleLegend:{enabled:e}}),this.bubbleLegend.visible=e),i.visible=s)}function g(t,e){let i,r,s,n,o=t.allItems,a=t.options.rtl,l=0;o.forEach(((t,o)=>{(n=t.legendItem||{}).group&&(i=n.group.translateX||0,r=n.y||0,((s=t.movementX)||a&&t.ranges)&&(s=a?i-t.options.maxSize/2:i+s,n.group.attr({translateX:s})),o>e[l].step&&l++,n.group.attr({translateY:Math.round(r+e[l].height/2)}),n.y=r+e[l].height/2)}))}return{compose:function(e,i){c(o,"Series.BubbleLegend")&&(n({legend:{bubbleLegend:t}}),h(e.prototype,"drawChartBox",u),a(i,"afterGetAllItems",f),a(i,"itemClick",m))}}})),i(e,"Series/Bubble/BubblePoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{seriesTypes:{scatter:{prototype:{pointClass:r}}}}=e,{extend:s}=i;class n extends r{haloPath(e){return t.prototype.haloPath.call(this,0===e?0:(this.marker&&this.marker.radius||0)+e)}}return s(n.prototype,{ttBelow:!1}),n})),i(e,"Series/Bubble/BubbleSeries.js",[e["Series/Bubble/BubbleLegendComposition.js"],e["Series/Bubble/BubblePoint.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r,s,n){let{parse:o}=i,{composed:a,noop:l}=r,{series:c,seriesTypes:{column:{prototype:h},scatter:u}}=s,{addEvent:d,arrayMax:p,arrayMin:f,clamp:m,extend:g,isNumber:y,merge:_,pick:v,pushUnique:x}=n;function b(){let t,e=this.len,{coll:i,isXAxis:r,min:s}=this,n=r?"xData":"yData",o=(this.max||0)-(s||0),a=0,l=e,c=e/o;("xAxis"===i||"yAxis"===i)&&(this.series.forEach((e=>{if(e.bubblePadding&&e.reserveSpace()){this.allowZoomOutside=!0,t=!0;let i=e[n];if(r&&((e.onPoint||e).getRadii(0,0,e),e.onPoint&&(e.radii=e.onPoint.radii)),o>0){let t=i.length;for(;t--;)if(y(i[t])&&this.dataMin<=i[t]&&i[t]<=this.max){let r=e.radii&&e.radii[t]||0;a=Math.min((i[t]-s)*c-r,a),l=Math.max((i[t]-s)*c+r,l)}}}})),t&&o>0&&!this.logarithmic&&(l-=e,c*=(e+Math.max(0,a)-Math.min(l,e))/e,[["min","userMin",a],["max","userMax",l]].forEach((t=>{void 0===v(this.options[t[0]],this[t[1]])&&(this[t[0]]+=t[2]/c)}))))}class w extends u{static compose(e,i,r){t.compose(i,r),x(a,"Series.Bubble")&&d(e,"foundExtremes",b)}animate(t){!t&&this.points.length{if(r.bubblePadding&&r.reserveSpace()){let s=(r.onPoint||r).getZExtremes();s&&(e=Math.min(v(e,s.zMin),s.zMin),i=Math.max(v(i,s.zMax),s.zMax),t=!0)}})),t?(o={zMin:e,zMax:i},this.chart.bubbleZExtremes=o):o={zMin:0,zMax:0}}for(e=0,t=r.length;e0&&(h=(s-t)/c)}return a&&h>=0&&(h=Math.sqrt(h)),Math.ceil(i+h*(r-i))/2}hasData(){return!!this.processedXData.length}markerAttribs(t,e){let i=super.markerAttribs(t,e),{height:r=0,width:s=0}=i;return this.chart.inverted?g(i,{x:(t.plotX||0)-s/2,y:(t.plotY||0)-r/2}):i}pointAttribs(t,e){let i=this.options.marker.fillOpacity,r=c.prototype.pointAttribs.call(this,t,e);return 1!==i&&(r.fill=o(r.fill).setOpacity(i).get("rgba")),r}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:t,options:e,radii:i}=this,{minPxSize:r}=this.getPxExtremes(),s=t.length;for(;s--;){let n=t[s],o=i?i[s]:0;"z"===this.zoneAxis&&(n.negative=(n.z||0)<(e.zThreshold||0)),y(o)&&o>=r/2?(n.marker=g(n.marker,{radius:o,width:2*o,height:2*o}),n.dlBox={x:n.plotX-o,y:n.plotY-o,width:2*o,height:2*o}):(n.shapeArgs=n.plotY=n.dlBox=void 0,n.isInside=!1)}}getPxExtremes(){let t=Math.min(this.chart.plotWidth,this.chart.plotHeight),e=e=>{let i;return"string"==typeof e&&(i=/%$/.test(e),e=parseInt(e,10)),i?t*e/100:e},i=e(v(this.options.minSize,8));return{minPxSize:i,maxPxSize:Math.max(e(v(this.options.maxSize,"20%")),i)}}getZExtremes(){let t=this.options,e=(this.zData||[]).filter(y);if(e.length){let i=v(t.zMin,m(f(e),!1===t.displayNegative?t.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),r=v(t.zMax,p(e));if(y(i)&&y(r))return{zMin:i,zMax:r}}}}return w.defaultOptions=_(u.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:t}=this.series.chart,{z:e}=this.point;return y(e)?t(e,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),g(w.prototype,{alignDataLabel:h.alignDataLabel,applyZones:l,bubblePadding:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:e,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),d(w,"updatedData",(t=>{delete t.target.chart.bubbleZExtremes})),d(w,"remove",(t=>{delete t.target.chart.bubbleZExtremes})),s.registerSeriesType("bubble",w),w})),i(e,"Series/MapBubble/MapBubblePoint.js",[e["Series/Bubble/BubblePoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i){let{seriesTypes:{map:{prototype:{pointClass:{prototype:r}}}}}=e,{extend:s}=i;class n extends t{isValid(){return"number"==typeof this.z}}return s(n.prototype,{applyOptions:r.applyOptions,getProjectedBounds:r.getProjectedBounds}),n})),i(e,"Series/MapBubble/MapBubbleSeries.js",[e["Series/Bubble/BubbleSeries.js"],e["Series/MapBubble/MapBubblePoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e,i,r){let{seriesTypes:{map:{prototype:s},mappoint:{prototype:n}}}=i,{extend:o,merge:a}=r;class l extends t{constructor(){super(...arguments),this.clearBounds=s.clearBounds}searchPoint(t,e){return this.searchKDTree({plotX:t.chartX-this.chart.plotLeft,plotY:t.chartY-this.chart.plotTop},e,t)}translate(){n.translate.call(this),this.getRadii(),this.translateBubble()}updateParallelArrays(t,e,i){super.updateParallelArrays.call(this,t,e,i);let r=this.processedXData,s=this.xData;r&&s&&(r.length=s.length)}}return l.defaultOptions=a(t.defaultOptions,{lineWidth:0,animationLimit:500,joinBy:"hc-key",tooltip:{pointFormat:"{point.name}: {point.z}"}}),o(l.prototype,{type:"mapbubble",axisTypes:["colorAxis"],getProjectedBounds:s.getProjectedBounds,isCartesian:!1,pointArrayMap:["z"],pointClass:e,processData:s.processData,projectPoint:n.projectPoint,kdAxisArray:["plotX","plotY"],setData:s.setData,setOptions:s.setOptions,updateData:s.updateData,useMapGeometry:!0,xyFromShape:!0}),i.registerSeriesType("mapbubble",l),l})),i(e,"Series/Heatmap/HeatmapPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t,e){let{scatter:{prototype:{pointClass:i}}}=t.seriesTypes,{clamp:r,defined:s,extend:n,pick:o}=e;class a extends i{applyOptions(t,e){return(this.isNull||null===this.value)&&delete this.color,super.applyOptions(t,e),this.formatPrefix=this.isNull||null===this.value?"null":"point",this}getCellAttributes(){let t=this.series,e=t.options,i=(e.colsize||1)/2,n=(e.rowsize||1)/2,a=t.xAxis,l=t.yAxis,c=this.options.marker||t.options.marker,h=t.pointPlacementToXValue(),u=o(this.pointPadding,e.pointPadding,0),d={x1:r(Math.round(a.len-a.translate(this.x-i,!1,!0,!1,!0,-h)),-a.len,2*a.len),x2:r(Math.round(a.len-a.translate(this.x+i,!1,!0,!1,!0,-h)),-a.len,2*a.len),y1:r(Math.round(l.translate(this.y-n,!1,!0,!1,!0)),-l.len,2*l.len),y2:r(Math.round(l.translate(this.y+n,!1,!0,!1,!0)),-l.len,2*l.len)};for(let t of[["width","x"],["height","y"]]){let e=t[0],i=t[1],r=i+"1",n=i+"2",o=Math.abs(d[r]-d[n]),h=c&&c.lineWidth||0,p=Math.abs(d[r]+d[n])/2,f=c&&c[e];if(s(f)&&f"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}})),i(e,"Series/InterpolationUtilities.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t,e){let{doc:i}=t,{defined:r,pick:s}=e;return{colorFromPoint:function(t,e){let i=e.series.colorAxis;if(i){let n=i.toColor(t||0,e).split(")")[0].split("(")[1].split(",").map((t=>s(parseFloat(t),parseInt(t,10))));return n[3]=255*s(n[3],1),r(t)&&e.visible||(n[3]=0),n}return[0,0,0,0]},getContext:function(t){let{canvas:e,context:r}=t;return e&&r?(r.clearRect(0,0,e.width,e.height),r):(t.canvas=i.createElement("canvas"),t.context=t.canvas.getContext("2d",{willReadFrequently:!0})||void 0,t.context)}}})),i(e,"Series/Heatmap/HeatmapSeries.js",[e["Core/Color/Color.js"],e["Series/ColorMapComposition.js"],e["Series/Heatmap/HeatmapPoint.js"],e["Series/Heatmap/HeatmapSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"],e["Series/InterpolationUtilities.js"]],(function(t,e,i,r,s,n,o,a){let{series:l,seriesTypes:{column:c,scatter:h}}=s,{prototype:{symbols:u}}=n,{addEvent:d,extend:p,fireEvent:f,isNumber:m,merge:g,pick:y}=o,{colorFromPoint:_,getContext:v}=a;class x extends h{constructor(){super(...arguments),this.valueMax=NaN,this.valueMin=NaN,this.isDirtyCanvas=!0}drawPoints(){let t=this,e=t.options,i=e.interpolation,r=e.marker||{};if(i){let{image:e,chart:i,xAxis:r,yAxis:s}=t,{reversed:n=!1,len:o}=r,{reversed:a=!1,len:l}=s,c={width:o,height:l};if(!e||t.isDirtyData||t.isDirtyCanvas){let o=v(t),{canvas:l,options:{colsize:h=1,rowsize:u=1},points:d,points:{length:p}}=t,f=i.colorAxis&&i.colorAxis[0];if(l&&o&&f){let{min:f,max:m}=r.getExtremes(),{min:g,max:y}=s.getExtremes(),v=m-f,x=y-g,b=Math.round(v/h/8*8),w=Math.round(x/u/8*8),[S,C]=[[b,b/v,n,"ceil"],[w,w/x,!a,"floor"]].map((([t,e,i,r])=>i?i=>Math[r](t-e*i):t=>Math[r](e*t))),T=l.width=b+1,k=T*(l.height=w+1),E=(p-1)/k,A=new Uint8ClampedArray(4*k),M=(t,e)=>4*Math.ceil(T*C(e-g)+S(t-f));t.buildKDTree();for(let t=0;t{e.graphic&&(e.graphic[t.chart.styledMode?"css":"animate"](t.colorAttribs(e)),null===e.value&&e.graphic.addClass("highcharts-null-point"))})))}getExtremes(){let{dataMin:t,dataMax:e}=l.prototype.getExtremes.call(this,this.valueData);return m(t)&&(this.valueMin=t),m(e)&&(this.valueMax=e),l.prototype.getExtremes.call(this)}getValidPoints(t,e){return l.prototype.getValidPoints.call(this,t,e,!0)}hasData(){return!!this.processedXData.length}init(){super.init.apply(this,arguments);let t=this.options;t.pointRange=y(t.pointRange,t.colsize||1),this.yAxis.axisPointRange=t.rowsize||1,u.ellipse=u.circle,t.marker&&m(t.borderRadius)&&(t.marker.r=t.borderRadius)}markerAttribs(t,e){let i=t.shapeArgs||{};if(t.hasImage)return{x:t.plotX,y:t.plotY};if(e&&"normal"!==e){let r=t.options.marker||{},s=this.options.marker||{},n=s.states&&s.states[e]||{},o=r.states&&r.states[e]||{},a=(o.width||n.width||i.width||0)+(o.widthPlus||n.widthPlus||0),l=(o.height||n.height||i.height||0)+(o.heightPlus||n.heightPlus||0);return{x:(i.x||0)+((i.width||0)-a)/2,y:(i.y||0)+((i.height||0)-l)/2,width:a,height:l}}return i}pointAttribs(e,i){let r=l.prototype.pointAttribs.call(this,e,i),s=this.options||{},n=this.chart.options.plotOptions||{},o=n.series||{},a=n.heatmap||{},c=e&&e.options.borderColor||s.borderColor||a.borderColor||o.borderColor,h=e&&e.options.borderWidth||s.borderWidth||a.borderWidth||o.borderWidth||r["stroke-width"];if(r.stroke=e&&e.marker&&e.marker.lineColor||s.marker&&s.marker.lineColor||c||this.color,r["stroke-width"]=h,i&&"normal"!==i){let n=g(s.states&&s.states[i],s.marker&&s.marker.states&&s.marker.states[i],e&&e.options.states&&e.options.states[i]||{});r.fill=n.color||t.parse(r.fill).brighten(n.brightness||0).get(),r.stroke=n.lineColor||r.stroke}return r}translate(){let{borderRadius:t,marker:e}=this.options,i=e&&e.symbol||"rect",r=u[i]?i:"rect",s=-1!==["circle","square"].indexOf(r);for(let e of(this.generatePoints(),this.points)){let n=e.getCellAttributes(),o=Math.min(n.x1,n.x2),a=Math.min(n.y1,n.y2),l=Math.max(Math.abs(n.x2-n.x1),0),c=Math.max(Math.abs(n.y2-n.y1),0);if(e.hasImage=0===(e.marker&&e.marker.symbol||i||"").indexOf("url"),s){let t=Math.abs(l-c);o=Math.min(n.x1,n.x2)+(l]*>|>)([\\s\\S]*?)<\\/"+t+">",e?"gim":"im")}function d(t){if(null==t)return;let e=NaN;return e="ms"==t.slice(-2)?parseFloat(t.slice(0,-2)):"s"==t.slice(-1)?1e3*parseFloat(t.slice(0,-1)):"m"==t.slice(-1)?1e3*parseFloat(t.slice(0,-1))*60:parseFloat(t),isNaN(e)?void 0:e}function ee(t,e){return t.getAttribute&&t.getAttribute(e)}function o(t,e){return t.hasAttribute&&(t.hasAttribute(e)||t.hasAttribute("data-"+e))}function te(t,e){return ee(t,e)||ee(t,"data-"+e)}function u(t){return t.parentElement}function re(){return document}function c(t,e){for(;t&&!e(t);)t=u(t);return t||null}function L(t,e,i){var r=te(e,i),s=te(e,"hx-disinherit");return t!==e&&s&&("*"===s||s.split(" ").indexOf(i)>=0)?"unset":r}function ne(t,e){var i=null;if(c(t,(function(r){return i=L(t,r,e)})),"unset"!==i)return i}function h(t,e){var i=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector;return i&&i.call(t,e)}function A(t){var e=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(t);return e?e[1].toLowerCase():""}function s(t,e){for(var i=(new DOMParser).parseFromString(t,"text/html").body;e>0;)e--,i=i.firstChild;return null==i&&(i=re().createDocumentFragment()),i}function N(t){return/",0).querySelector("template").content;return Q.config.allowScriptTags?oe(n.querySelectorAll("script"),(function(t){Q.config.inlineScriptNonce&&(t.nonce=Q.config.inlineScriptNonce),t.htmxExecuted=-1===navigator.userAgent.indexOf("Firefox")})):oe(n.querySelectorAll("script"),(function(t){_(t)})),n}switch(i){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return s(""+r+"
",1);case"col":return s(""+r+"
",2);case"tr":return s(""+r+"
",2);case"td":case"th":return s(""+r+"
",3);case"script":case"style":return s("
"+r+"
",1);default:return s(r,0)}}function ie(t){t&&t()}function I(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function k(t){return I(t,"Function")}function P(t){return I(t,"Object")}function ae(t){var e="htmx-internal-data",i=t[e];return i||(i=t[e]={}),i}function M(t){var e=[];if(t)for(var i=0;i=0}function se(t){return t.getRootNode&&t.getRootNode()instanceof window.ShadowRoot?re().body.contains(t.getRootNode().host):re().body.contains(t)}function D(t){return t.trim().split(/\s+/)}function le(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function E(t){try{return JSON.parse(t)}catch(t){return b(t),null}}function U(){var t="htmx:localStorageTest";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(t){return!1}}function B(t){try{var e=new URL(t);return e&&(t=e.pathname+e.search),/^\/$/.test(t)||(t=t.replace(/\/+$/,"")),t}catch(e){return t}}function t(e){return Tr(re().body,(function(){return eval(e)}))}function F(t){return Q.on("htmx:load",(function(e){t(e.detail.elt)}))}function V(){Q.logger=function(t,e,i){console&&console.log(e,t,i)}}function j(){Q.logger=null}function C(t,e){return e?t.querySelector(e):C(re(),t)}function f(t,e){return e?t.querySelectorAll(e):f(re(),t)}function _(t,e){t=p(t),e?setTimeout((function(){_(t),t=null}),e):t.parentElement.removeChild(t)}function z(t,e,i){t=p(t),i?setTimeout((function(){z(t,e),t=null}),i):t.classList&&t.classList.add(e)}function n(t,e,i){t=p(t),i?setTimeout((function(){n(t,e),t=null}),i):t.classList&&(t.classList.remove(e),0===t.classList.length&&t.removeAttribute("class"))}function $(t,e){(t=p(t)).classList.toggle(e)}function W(t,e){oe((t=p(t)).parentElement.children,(function(t){n(t,e)})),z(t,e)}function v(t,e){if((t=p(t)).closest)return t.closest(e);do{if(null==t||h(t,e))return t}while(t=t&&u(t));return null}function g(t,e){return t.substring(0,e.length)===e}function G(t,e){return t.substring(t.length-e.length)===e}function J(t){var e=t.trim();return g(e,"<")&&G(e,"/>")?e.substring(1,e.length-2):e}function Z(t,e){return 0===e.indexOf("closest ")?[v(t,J(e.substr(8)))]:0===e.indexOf("find ")?[C(t,J(e.substr(5)))]:"next"===e?[t.nextElementSibling]:0===e.indexOf("next ")?[K(t,J(e.substr(5)))]:"previous"===e?[t.previousElementSibling]:0===e.indexOf("previous ")?[Y(t,J(e.substr(9)))]:"document"===e?[document]:"window"===e?[window]:"body"===e?[document.body]:re().querySelectorAll(J(e))}var K=function(t,e){for(var i=re().querySelectorAll(e),r=0;r=0;r--){var s=i[r];if(s.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING)return s}};function ue(t,e){return e?Z(t,e)[0]:Z(re().body,t)[0]}function p(t){return I(t,"String")?C(t):t}function ve(t,e,i){return k(e)?{target:re().body,event:t,listener:e}:{target:p(t),event:e,listener:i}}function de(t,e,i){return jr((function(){var r=ve(t,e,i);r.target.addEventListener(r.event,r.listener)})),k(e)?e:i}function ge(t,e,i){return jr((function(){var r=ve(t,e,i);r.target.removeEventListener(r.event,r.listener)})),k(e)?e:i}var pe=re().createElement("output");function me(t,e){var i=ne(t,e);if(i){if("this"===i)return[xe(t,e)];var r=Z(t,i);return 0===r.length?(b('The selector "'+i+'" on '+e+" returned no matches!"),[pe]):r}}function xe(t,e){return c(t,(function(t){return null!=te(t,e)}))}function ye(t){var e=ne(t,"hx-target");return e?"this"===e?xe(t,"hx-target"):ue(t,e):ae(t).boosted?re().body:t}function be(t){for(var e=Q.config.attributesToSettle,i=0;i0?(s=t.substr(0,t.indexOf(":")),r=t.substr(t.indexOf(":")+1,t.length)):s=t);var n=re().querySelectorAll(r);return n?(oe(n,(function(t){var r,n=e.cloneNode(!0);(r=re().createDocumentFragment()).appendChild(n),Se(s,t)||(r=n);var o={shouldSwap:!0,target:t,fragment:r};ce(t,"htmx:oobBeforeSwap",o)&&(t=o.target,o.shouldSwap&&Fe(s,t,t,r,i),oe(i.elts,(function(t){ce(t,"htmx:oobAfterSwap",o)})))})),e.parentNode.removeChild(e)):(e.parentNode.removeChild(e),fe(re().body,"htmx:oobErrorNoTarget",{content:e})),t}function Ce(t,e,i){var r=ne(t,"hx-select-oob");if(r)for(var s=r.split(","),n=0;n0){var s=r.replace("'","\\'"),n=e.tagName.replace(":","\\:"),o=t.querySelector(n+"[id='"+s+"']");if(o&&o!==t){var a=e.cloneNode();we(e,o),i.tasks.push((function(){we(e,a)}))}}}))}function Oe(t){return function(){n(t,Q.config.addedClass),zt(t),Nt(t),qe(t),ce(t,"htmx:load")}}function qe(t){var e="[autofocus]",i=h(t,e)?t:t.querySelector(e);null!=i&&i.focus()}function a(t,e,i,r){for(Te(t,i,r);i.childNodes.length>0;){var s=i.firstChild;z(s,Q.config.addedClass),t.insertBefore(s,e),s.nodeType!==Node.TEXT_NODE&&s.nodeType!==Node.COMMENT_NODE&&r.tasks.push(Oe(s))}}function He(t,e){for(var i=0;i-1){var e=t.replace(H,"").match(q);if(e)return e[2]}}function je(t,e,i,r,s,n){s.title=Ve(r);var o=l(r);if(o)return Ce(i,o,s),Re(o=Be(i,o,n)),Fe(t,i,e,o,s)}function _e(t,e,i){var r=t.getResponseHeader(e);if(0===r.indexOf("{")){var s=E(r);for(var n in s)if(s.hasOwnProperty(n)){var o=s[n];P(o)||(o={value:o}),ce(i,n,o)}}else for(var a=r.split(","),l=0;l0;){var o=e[0];if("]"===o){if(0==--r){null===n&&(s+="true"),e.shift(),s+=")})";try{var a=Tr(t,(function(){return Function(s)()}),(function(){return!0}));return a.source=s,a}catch(t){return fe(re().body,"htmx:syntax:error",{error:t,source:s}),null}}}else"["===o&&r++;Qe(o,n,i)?s+="(("+i+"."+o+") ? ("+i+"."+o+") : (window."+o+"))":s+=o,n=e.shift()}}}function y(t,e){for(var i="";t.length>0&&!e.test(t[0]);)i+=t.shift();return i}function tt(t){var e;return t.length>0&&Ze.test(t[0])?(t.shift(),e=y(t,Ke).trim(),t.shift()):e=y(t,x),e}var rt="input, textarea, select";function nt(t,e,i){var r=[],s=Ye(e);do{y(s,Je);var n=s.length,o=y(s,/[,\[\s]/);if(""!==o)if("every"===o){var a={trigger:"every"};y(s,Je),a.pollInterval=d(y(s,/[,\[\s]/)),y(s,Je),(l=et(t,s,"event"))&&(a.eventFilter=l),r.push(a)}else if(0===o.indexOf("sse:"))r.push({trigger:"sse",sseEvent:o.substr(4)});else{var l,c={trigger:o};for((l=et(t,s,"event"))&&(c.eventFilter=l);s.length>0&&","!==s[0];){y(s,Je);var h=s.shift();if("changed"===h)c.changed=!0;else if("once"===h)c.once=!0;else if("consume"===h)c.consume=!0;else if("delay"===h&&":"===s[0])s.shift(),c.delay=d(y(s,x));else if("from"===h&&":"===s[0]){if(s.shift(),Ze.test(s[0]))var u=tt(s);else if("closest"===(u=y(s,x))||"find"===u||"next"===u||"previous"===u){s.shift();var p=tt(s);p.length>0&&(u+=" "+p)}c.from=u}else"target"===h&&":"===s[0]?(s.shift(),c.target=tt(s)):"throttle"===h&&":"===s[0]?(s.shift(),c.throttle=d(y(s,x))):"queue"===h&&":"===s[0]?(s.shift(),c.queue=y(s,x)):"root"===h&&":"===s[0]?(s.shift(),c[h]=tt(s)):"threshold"===h&&":"===s[0]?(s.shift(),c[h]=y(s,x)):fe(t,"htmx:syntax:error",{token:s.shift()})}r.push(c)}s.length===n&&fe(t,"htmx:syntax:error",{token:s.shift()}),y(s,Je)}while(","===s[0]&&s.shift());return i&&(i[e]=r),r}function it(t){var e=te(t,"hx-trigger"),i=[];if(e){var r=Q.config.triggerSpecsCache;i=r&&r[e]||nt(t,e,r)}return i.length>0?i:h(t,"form")?[{trigger:"submit"}]:h(t,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:h(t,rt)?[{trigger:"change"}]:[{trigger:"click"}]}function at(t){ae(t).cancelled=!0}function ot(t,e,i){var r=ae(t);r.timeout=setTimeout((function(){se(t)&&!0!==r.cancelled&&(ct(i,t,Wt("hx:poll:trigger",{triggerSpec:i,target:t}))||e(t),ot(t,e,i))}),i.pollInterval)}function st(t){return location.hostname===t.hostname&&ee(t,"href")&&0!==ee(t,"href").indexOf("#")}function lt(t,e,i){if("A"===t.tagName&&st(t)&&(""===t.target||"_self"===t.target)||"FORM"===t.tagName){var r,s;if(e.boosted=!0,"A"===t.tagName)r="get",s=ee(t,"href");else{var n=ee(t,"method");r=n?n.toLowerCase():"get",s=ee(t,"action")}i.forEach((function(i){ht(t,(function(t,e){v(t,Q.config.disableSelector)?m(t):he(r,s,t,e)}),e,i,!0)}))}}function ut(t,e){if("submit"===t.type||"click"===t.type){if("FORM"===e.tagName)return!0;if(h(e,'input[type="submit"], button')&&null!==v(e,"form"))return!0;if("A"===e.tagName&&e.href&&("#"===e.getAttribute("href")||0!==e.getAttribute("href").indexOf("#")))return!0}return!1}function ft(t,e){return ae(t).boosted&&"A"===t.tagName&&"click"===e.type&&(e.ctrlKey||e.metaKey)}function ct(t,e,i){var r=t.eventFilter;if(r)try{return!0!==r.call(e,i)}catch(t){return fe(re().body,"htmx:eventFilter:error",{error:t,source:r.source}),!0}return!1}function ht(t,e,i,r,s){var n,o=ae(t);n=r.from?Z(t,r.from):[t],r.changed&&n.forEach((function(t){ae(t).lastValue=t.value})),oe(n,(function(n){var a=function(i){if(se(t)){if(!ft(t,i)&&((s||ut(i,t))&&i.preventDefault(),!ct(r,t,i))){var l=ae(i);if(l.triggerSpec=r,null==l.handledFor&&(l.handledFor=[]),l.handledFor.indexOf(t)<0){if(l.handledFor.push(t),r.consume&&i.stopPropagation(),r.target&&i.target&&!h(i.target,r.target))return;if(r.once){if(o.triggeredOnce)return;o.triggeredOnce=!0}if(r.changed){var c=ae(n);if(c.lastValue===n.value)return;c.lastValue=n.value}if(o.delayed&&clearTimeout(o.delayed),o.throttle)return;r.throttle>0?o.throttle||(e(t,i),o.throttle=setTimeout((function(){o.throttle=null}),r.throttle)):r.delay>0?o.delayed=setTimeout((function(){e(t,i)}),r.delay):(ce(t,"htmx:trigger"),e(t,i))}}}else n.removeEventListener(r.trigger,a)};null==i.listenerInfos&&(i.listenerInfos=[]),i.listenerInfos.push({trigger:r.trigger,listener:a,on:n}),n.addEventListener(r.trigger,a)}))}var vt=!1,dt=null;function gt(){dt||(dt=function(){vt=!0},window.addEventListener("scroll",dt),setInterval((function(){vt&&(vt=!1,oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),(function(t){pt(t)})))}),200))}function pt(t){!o(t,"data-hx-revealed")&&X(t)&&(t.setAttribute("data-hx-revealed","true"),ae(t).initHash?ce(t,"revealed"):t.addEventListener("htmx:afterProcessNode",(function(e){ce(t,"revealed")}),{once:!0}))}function mt(t,e,i){for(var r=D(i),s=0;s=0){var s=wt(i);setTimeout((function(){xt(t,e,i+1)}),s)}},s.onopen=function(t){i=0},ae(t).webSocket=s,s.addEventListener("message",(function(e){if(!yt(t)){var i=e.data;R(t,(function(e){i=e.transformResponse(i,null,t)}));for(var r=T(t),s=M(l(i).children),n=0;n0?ce(t,"htmx:validation:halted",o):(r.send(JSON.stringify(a)),ut(i,t)&&i.preventDefault())})):fe(t,"htmx:noWebSocketSourceError")}function wt(t){var e=Q.config.wsReconnectDelay;if("function"==typeof e)return e(t);if("full-jitter"===e){var i=Math.min(t,6);return 1e3*Math.pow(2,i)*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(t,e,i){for(var r=D(i),s=0;s0?setTimeout(s,r):s()}function Ht(t,e,i){var r=!1;return oe(w,(function(s){if(o(t,"hx-"+s)){var n=te(t,"hx-"+s);r=!0,e.path=n,e.verb=s,i.forEach((function(i){Lt(t,i,e,(function(t,e){v(t,Q.config.disableSelector)?m(t):he(s,n,t,e)}))}))}})),r}function Lt(t,e,i,r){if(e.sseEvent)Rt(t,r,e.sseEvent);else if("revealed"===e.trigger)gt(),ht(t,r,i,e),pt(t);else if("intersect"===e.trigger){var s={};e.root&&(s.root=ue(t,e.root)),e.threshold&&(s.threshold=parseFloat(e.threshold));var n=new IntersectionObserver((function(e){for(var i=0;i0?(i.polling=!0,ot(t,r,e)):ht(t,r,i,e)}function At(t){if(!t.htmxExecuted&&Q.config.allowScriptTags&&("text/javascript"===t.type||"module"===t.type||""===t.type)){var e=re().createElement("script");oe(t.attributes,(function(t){e.setAttribute(t.name,t.value)})),e.textContent=t.textContent,e.async=!1,Q.config.inlineScriptNonce&&(e.nonce=Q.config.inlineScriptNonce);var i=t.parentElement;try{i.insertBefore(e,t)}catch(t){b(t)}finally{t.parentElement&&t.parentElement.removeChild(t)}}}function Nt(t){h(t,"script")&&At(t),oe(f(t,"script"),(function(t){At(t)}))}function It(t){var e=t.attributes;if(!e)return!1;for(var i=0;i0;){var o=r.shift(),a=o.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);0===n&&a?(o.split(":"),i[s=a[1].slice(0,-1)]=a[2]):i[s]+=o,n+=Bt(o)}for(var l in i)Ft(t,l,i[l])}}function jt(t){Ae(t);for(var e=0;eQ.config.historyCacheSize;)s.shift();for(;s.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(s));break}catch(t){fe(re().body,"htmx:historyCacheError",{cause:t,cache:s}),s.shift()}}}function Yt(t){if(!U())return null;t=B(t);for(var e=E(localStorage.getItem("htmx-history-cache"))||[],i=0;i=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",i);var e=l(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var r=Zt(),s=T(r),n=Ve(this.response);if(n){var o=C("title");o?o.innerHTML=n:window.document.title=n}Ue(r,e,s),nr(s.tasks),Jt=t,ce(re().body,"htmx:historyRestore",{path:t,cacheMiss:!0,serverResponse:this.response})}else fe(re().body,"htmx:historyCacheMissLoadError",i)},e.send()}function ar(t){er();var e=Yt(t=t||location.pathname+location.search);if(e){var i=l(e.content),r=Zt(),s=T(r);Ue(r,i,s),nr(s.tasks),document.title=e.title,setTimeout((function(){window.scrollTo(0,e.scroll)}),0),Jt=t,ce(re().body,"htmx:historyRestore",{path:t,item:e})}else Q.config.refreshOnHistoryMiss?window.location.reload(!0):ir(t)}function or(t){var e=me(t,"hx-indicator");return null==e&&(e=[t]),oe(e,(function(t){var e=ae(t);e.requestCount=(e.requestCount||0)+1,t.classList.add.call(t.classList,Q.config.requestClass)})),e}function sr(t){var e=me(t,"hx-disabled-elt");return null==e&&(e=[]),oe(e,(function(t){var e=ae(t);e.requestCount=(e.requestCount||0)+1,t.setAttribute("disabled","")})),e}function lr(t,e){oe(t,(function(t){var e=ae(t);e.requestCount=(e.requestCount||0)-1,0===e.requestCount&&t.classList.remove.call(t.classList,Q.config.requestClass)})),oe(e,(function(t){var e=ae(t);e.requestCount=(e.requestCount||0)-1,0===e.requestCount&&t.removeAttribute("disabled")}))}function ur(t,e){for(var i=0;i=0}function wr(t,e){var i=e||ne(t,"hx-swap"),r={swapStyle:ae(t).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(t).boosted&&!br(t)&&(r.show="top"),i){var s=D(i);if(s.length>0)for(var n=0;n0?c.join(":"):null;r.scroll=a,r.scrollTarget=l}else if(0===o.indexOf("show:")){var c,h=(c=o.substr(5).split(":")).pop();l=c.length>0?c.join(":"):null,r.show=h,r.showTarget=l}else if(0===o.indexOf("focus-scroll:")){var u=o.substr(13);r.focusScroll="true"==u}else 0==n?r.swapStyle=o:b("Unknown modifier in hx-swap: "+o)}}return r}function Sr(t){return"multipart/form-data"===ne(t,"hx-encoding")||h(t,"form")&&"multipart/form-data"===ee(t,"enctype")}function Er(t,e,i){var r=null;return R(e,(function(s){null==r&&(r=s.encodeParameters(t,i,e))})),null!=r?r:Sr(e)?mr(i):pr(i)}function T(t){return{tasks:[],elts:[t]}}function Cr(t,e){var i=t[0],r=t[t.length-1];if(e.scroll){var s=null;e.scrollTarget&&(s=ue(i,e.scrollTarget)),"top"===e.scroll&&(i||s)&&((s=s||i).scrollTop=0),"bottom"===e.scroll&&(r||s)&&((s=s||r).scrollTop=s.scrollHeight)}if(e.show){if(s=null,e.showTarget){var n=e.showTarget;"window"===e.showTarget&&(n="body"),s=ue(i,n)}"top"===e.show&&(i||s)&&(s=s||i).scrollIntoView({block:"start",behavior:Q.config.scrollBehavior}),"bottom"===e.show&&(r||s)&&(s=s||r).scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}function Rr(t,e,i,r){if(null==r&&(r={}),null==t)return r;var s=te(t,e);if(s){var n,o=s.trim(),a=i;if("unset"===o)return null;for(var l in 0===o.indexOf("javascript:")?(o=o.substr(11),a=!0):0===o.indexOf("js:")&&(o=o.substr(3),a=!0),0!==o.indexOf("{")&&(o="{"+o+"}"),n=a?Tr(t,(function(){return Function("return ("+o+")")()}),{}):E(o))n.hasOwnProperty(l)&&null==r[l]&&(r[l]=n[l])}return Rr(u(t),e,i,r)}function Tr(t,e,i){return Q.config.allowEval?e():(fe(t,"htmx:evalDisallowedError"),i)}function Or(t,e){return Rr(t,"hx-vars",!0,e)}function qr(t,e){return Rr(t,"hx-vals",!1,e)}function Hr(t){return le(Or(t),qr(t))}function Lr(t,e,i){if(null!==i)try{t.setRequestHeader(e,i)}catch(r){t.setRequestHeader(e,encodeURIComponent(i)),t.setRequestHeader(e+"-URI-AutoEncoded","true")}}function Ar(t){if(t.responseURL&&"undefined"!=typeof URL)try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(re().body,"htmx:badResponseUrl",{url:t.responseURL})}}function O(t,e){return e.test(t.getAllResponseHeaders())}function Nr(t,e,i){return t=t.toLowerCase(),i?i instanceof Element||I(i,"String")?he(t,e,null,null,{targetOverride:p(i),returnPromise:!0}):he(t,e,p(i.source),i.event,{handler:i.handler,headers:i.headers,values:i.values,targetOverride:p(i.target),swapOverride:i.swap,select:i.select,returnPromise:!0}):he(t,e,null,null,{returnPromise:!0})}function Ir(t){for(var e=[];t;)e.push(t),t=t.parentElement;return e}function kr(t,e,i){var r,s;return"function"==typeof URL?(s=new URL(e,document.location.href),r=document.location.origin===s.origin):(s=e,r=g(e,document.location.origin)),!(Q.config.selfRequestsOnly&&!r)&&ce(t,"htmx:validateUrl",le({url:s,sameHost:r},i))}function he(t,e,i,r,s,n){var o=null,a=null;if((s=null!=s?s:{}).returnPromise&&"undefined"!=typeof Promise)var l=new Promise((function(t,e){o=t,a=e}));null==i&&(i=re().body);var c=s.handler||Mr,h=s.select||null;if(!se(i))return ie(o),l;var u=s.targetOverride||ye(i);if(null==u||u==pe)return fe(i,"htmx:targetError",{target:te(i,"hx-target")}),ie(a),l;var d=ae(i),p=d.lastButtonClicked;if(p){var f=ee(p,"formaction");null!=f&&(e=f);var m=ee(p,"formmethod");null!=m&&"dialog"!==m.toLowerCase()&&(t=m)}var g=ne(i,"hx-confirm");if(void 0===n){var y={target:u,elt:i,path:e,verb:t,triggeringEvent:r,etc:s,issueRequest:function(n){return he(t,e,i,r,s,!!n)},question:g};if(!1===ce(i,"htmx:confirm",y))return ie(o),l}var _=i,v=ne(i,"hx-sync"),x=null,b=!1;if(v){var w=v.split(":"),S=w[0].trim();if(_="this"===S?xe(i,"hx-sync"):ue(i,S),v=(w[1]||"drop").trim(),d=ae(_),"drop"===v&&d.xhr&&!0!==d.abortable)return ie(o),l;if("abort"===v){if(d.xhr)return ie(o),l;b=!0}else"replace"===v?ce(_,"htmx:abort"):0===v.indexOf("queue")&&(x=(v.split(" ")[1]||"last").trim())}if(d.xhr){if(!d.abortable){if(null==x){if(r){var C=ae(r);C&&C.triggerSpec&&C.triggerSpec.queue&&(x=C.triggerSpec.queue)}null==x&&(x="last")}return null==d.queuedRequests&&(d.queuedRequests=[]),"first"===x&&0===d.queuedRequests.length||"all"===x?d.queuedRequests.push((function(){he(t,e,i,r,s)})):"last"===x&&(d.queuedRequests=[],d.queuedRequests.push((function(){he(t,e,i,r,s)}))),ie(o),l}ce(_,"htmx:abort")}var T=new XMLHttpRequest;d.xhr=T,d.abortable=b;var k=function(){d.xhr=null,d.abortable=!1,null!=d.queuedRequests&&d.queuedRequests.length>0&&d.queuedRequests.shift()()},E=ne(i,"hx-prompt");if(E){var A=prompt(E);if(null===A||!ce(i,"htmx:prompt",{prompt:A,target:u}))return ie(o),k(),l}if(g&&!n&&!confirm(g))return ie(o),k(),l;var M=xr(i,u,A);"get"===t||Sr(i)||(M["Content-Type"]="application/x-www-form-urlencoded"),s.headers&&(M=le(M,s.headers));var P=dr(i,t),I=P.errors,L=P.values;s.values&&(L=le(L,s.values));var D=le(L,Hr(i)),z=yr(D,i);Q.config.getCacheBusterParam&&"get"===t&&(z["org.htmx.cache-buster"]=ee(u,"id")||"true"),null!=e&&""!==e||(e=re().location.href);var O=Rr(i,"hx-request"),R=ae(i).boosted,N=Q.config.methodsThatUseUrlParams.indexOf(t)>=0,B={boosted:R,useUrlParams:N,parameters:z,unfilteredParameters:D,headers:M,target:u,verb:t,errors:I,withCredentials:s.credentials||O.credentials||Q.config.withCredentials,timeout:s.timeout||O.timeout||Q.config.timeout,path:e,triggeringEvent:r};if(!ce(i,"htmx:configRequest",B))return ie(o),k(),l;if(e=B.path,t=B.verb,M=B.headers,z=B.parameters,N=B.useUrlParams,(I=B.errors)&&I.length>0)return ce(i,"htmx:validation:halted",B),ie(o),k(),l;var F=e.split("#"),j=F[0],U=F[1],V=e;if(N&&(V=j,0!==Object.keys(z).length&&(V.indexOf("?")<0?V+="?":V+="&",V+=pr(z),U&&(V+="#"+U))),!kr(i,V,B))return fe(i,"htmx:invalidPath",B),ie(a),l;if(T.open(t.toUpperCase(),V,!0),T.overrideMimeType("text/html"),T.withCredentials=B.withCredentials,T.timeout=B.timeout,O.noHeaders);else for(var q in M)if(M.hasOwnProperty(q)){var G=M[q];Lr(T,q,G)}var $={xhr:T,target:u,requestConfig:B,etc:s,boosted:R,select:h,pathInfo:{requestPath:e,finalRequestPath:V,anchor:U}};if(T.onload=function(){try{var t=Ir(i);if($.pathInfo.responsePath=Ar(T),c(i,$),lr(H,W),ce(i,"htmx:afterRequest",$),ce(i,"htmx:afterOnLoad",$),!se(i)){for(var e=null;t.length>0&&null==e;){var r=t.shift();se(r)&&(e=r)}e&&(ce(e,"htmx:afterRequest",$),ce(e,"htmx:afterOnLoad",$))}ie(o),k()}catch(t){throw fe(i,"htmx:onLoadError",le({error:t},$)),t}},T.onerror=function(){lr(H,W),fe(i,"htmx:afterRequest",$),fe(i,"htmx:sendError",$),ie(a),k()},T.onabort=function(){lr(H,W),fe(i,"htmx:afterRequest",$),fe(i,"htmx:sendAbort",$),ie(a),k()},T.ontimeout=function(){lr(H,W),fe(i,"htmx:afterRequest",$),fe(i,"htmx:timeout",$),ie(a),k()},!ce(i,"htmx:beforeRequest",$))return ie(o),k(),l;var H=or(i),W=sr(i);oe(["loadstart","loadend","progress","abort"],(function(t){oe([T,T.upload],(function(e){e.addEventListener(t,(function(e){ce(i,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})}))}))})),ce(i,"htmx:beforeSend",$);var X=N?null:Er(T,i,z);return T.send(X),l}function Pr(t,e){var i=e.xhr,r=null,s=null;if(O(i,/HX-Push:/i)?(r=i.getResponseHeader("HX-Push"),s="push"):O(i,/HX-Push-Url:/i)?(r=i.getResponseHeader("HX-Push-Url"),s="push"):O(i,/HX-Replace-Url:/i)&&(r=i.getResponseHeader("HX-Replace-Url"),s="replace"),r)return"false"===r?{}:{type:s,path:r};var n=e.pathInfo.finalRequestPath,o=e.pathInfo.responsePath,a=ne(t,"hx-push-url"),l=ne(t,"hx-replace-url"),c=ae(t).boosted,h=null,u=null;return a?(h="push",u=a):l?(h="replace",u=l):c&&(h="push",u=o||n),u?"false"===u?{}:("true"===u&&(u=o||n),e.pathInfo.anchor&&-1===u.indexOf("#")&&(u=u+"#"+e.pathInfo.anchor),{type:h,path:u}):{}}function Mr(t,e){var i=e.xhr,r=e.target,s=e.etc,n=(e.requestConfig,e.select);if(ce(t,"htmx:beforeOnLoad",e)){if(O(i,/HX-Trigger:/i)&&_e(i,"HX-Trigger",t),O(i,/HX-Location:/i)){er();var o=i.getResponseHeader("HX-Location");return 0===o.indexOf("{")&&(f=E(o),o=f.path,delete f.path),void Nr("GET",o,f).then((function(){tr(o)}))}var a=O(i,/HX-Refresh:/i)&&"true"===i.getResponseHeader("HX-Refresh");if(O(i,/HX-Redirect:/i))return location.href=i.getResponseHeader("HX-Redirect"),void(a&&location.reload());if(a)location.reload();else{O(i,/HX-Retarget:/i)&&("this"===i.getResponseHeader("HX-Retarget")?e.target=t:e.target=ue(t,i.getResponseHeader("HX-Retarget")));var l=Pr(t,e),c=i.status>=200&&i.status<400&&204!==i.status,h=i.response,u=i.status>=400,d=Q.config.ignoreTitle,p=le({shouldSwap:c,serverResponse:h,isError:u,ignoreTitle:d},e);if(ce(r,"htmx:beforeSwap",p)){if(r=p.target,h=p.serverResponse,u=p.isError,d=p.ignoreTitle,e.target=r,e.failed=u,e.successful=!u,p.shouldSwap){286===i.status&&at(t),R(t,(function(e){h=e.transformResponse(h,i,t)})),l.type&&er();var f,m=s.swapOverride;O(i,/HX-Reswap:/i)&&(m=i.getResponseHeader("HX-Reswap")),(f=wr(t,m)).hasOwnProperty("ignoreTitle")&&(d=f.ignoreTitle),r.classList.add(Q.config.swappingClass);var g=null,y=null,_=function(){try{var s,o=document.activeElement,a={};try{a={elt:o,start:o?o.selectionStart:null,end:o?o.selectionEnd:null}}catch(o){}n&&(s=n),O(i,/HX-Reselect:/i)&&(s=i.getResponseHeader("HX-Reselect")),l.type&&(ce(re().body,"htmx:beforeHistoryUpdate",le({history:l},e)),"push"===l.type?(tr(l.path),ce(re().body,"htmx:pushedIntoHistory",{path:l.path})):(rr(l.path),ce(re().body,"htmx:replacedInHistory",{path:l.path})));var c=T(r);if(je(f.swapStyle,r,t,h,c,s),a.elt&&!se(a.elt)&&ee(a.elt,"id")){var u=document.getElementById(ee(a.elt,"id")),p={preventScroll:void 0!==f.focusScroll?!f.focusScroll:!Q.config.defaultFocusScroll};if(u){if(a.start&&u.setSelectionRange)try{u.setSelectionRange(a.start,a.end)}catch(o){}u.focus(p)}}if(r.classList.remove(Q.config.swappingClass),oe(c.elts,(function(t){t.classList&&t.classList.add(Q.config.settlingClass),ce(t,"htmx:afterSwap",e)})),O(i,/HX-Trigger-After-Swap:/i)){var m=t;se(t)||(m=re().body),_e(i,"HX-Trigger-After-Swap",m)}var _=function(){if(oe(c.tasks,(function(t){t.call()})),oe(c.elts,(function(t){t.classList&&t.classList.remove(Q.config.settlingClass),ce(t,"htmx:afterSettle",e)})),e.pathInfo.anchor){var r=re().getElementById(e.pathInfo.anchor);r&&r.scrollIntoView({block:"start",behavior:"auto"})}if(c.title&&!d){var s=C("title");s?s.innerHTML=c.title:window.document.title=c.title}if(Cr(c.elts,f),O(i,/HX-Trigger-After-Settle:/i)){var n=t;se(t)||(n=re().body),_e(i,"HX-Trigger-After-Settle",n)}ie(g)};f.settleDelay>0?setTimeout(_,f.settleDelay):_()}catch(o){throw fe(t,"htmx:swapError",e),ie(y),o}},v=Q.config.globalViewTransitions;if(f.hasOwnProperty("transition")&&(v=f.transition),v&&ce(t,"htmx:beforeTransition",e)&&"undefined"!=typeof Promise&&document.startViewTransition){var x=new Promise((function(t,e){g=t,y=e})),b=_;_=function(){document.startViewTransition((function(){return b(),x}))}}f.swapDelay>0?setTimeout(_,f.swapDelay):_()}u&&fe(t,"htmx:responseError",le({error:"Response Status Error Code "+i.status+" from "+e.pathInfo.requestPath},e))}}}}var Xr={};function Dr(){return{init:function(t){return null},onEvent:function(t,e){return!0},transformResponse:function(t,e,i){return t},isInlineSwap:function(t){return!1},handleSwap:function(t,e,i,r){return!1},encodeParameters:function(t,e,i){return null}}}function Ur(t,e){e.init&&e.init(r),Xr[t]=le(Dr(),e)}function Br(t){delete Xr[t]}function Fr(t,e,i){if(null==t)return e;null==e&&(e=[]),null==i&&(i=[]);var r=te(t,"hx-ext");return r&&oe(r.split(","),(function(t){if("ignore:"!=(t=t.replace(/ /g,"")).slice(0,7)){if(i.indexOf(t)<0){var r=Xr[t];r&&e.indexOf(r)<0&&e.push(r)}}else i.push(t.slice(7))})),Fr(u(t),e,i)}var Vr=!1;function jr(t){Vr||"complete"===re().readyState?t():re().addEventListener("DOMContentLoaded",t)}function _r(){!1!==Q.config.includeIndicatorStyles&&re().head.insertAdjacentHTML("beforeend","")}function zr(){var t=re().querySelector('meta[name="htmx-config"]');return t?E(t.content):null}function $r(){var t=zr();t&&(Q.config=le(Q.config,t))}return re().addEventListener("DOMContentLoaded",(function(){Vr=!0})),jr((function(){$r(),_r();var t=re().body;zt(t);var e=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");t.addEventListener("htmx:abort",(function(t){var e=ae(t.target);e&&e.xhr&&e.xhr.abort()}));const i=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(t){t.state&&t.state.htmx?(ar(),oe(e,(function(t){ce(t,"htmx:restored",{document:re(),triggerEvent:ce})}))):i&&i(t)},setTimeout((function(){ce(t,"htmx:load",{}),t=null}),0)})),Q}()},__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=t)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},551:(t,e,i)=>{"use strict";var r=i(540),s=i(982);function n(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i