From 26045676a0e7e887d9322efa39247bce2a7cdf1f Mon Sep 17 00:00:00 2001 From: csae8092 Date: Wed, 13 Nov 2024 11:14:17 +0100 Subject: [PATCH 01/10] pinns acdh-django-browsing version to <3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9ecb480..d63a637 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -acdh-django-browsing +acdh-django-browsing>=2.0,<3 acdh_geonames_utils acdh-id-reconciler>=0.2,<1 acdh-tei-pyutils>=1.1,<2 From c873947119f6068cfb0a0ead7a6c6933faf86802 Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Thu, 14 Nov 2024 09:37:41 +0100 Subject: [PATCH 02/10] Update navbar.html [skip ci] --- templates/partials/navbar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/partials/navbar.html b/templates/partials/navbar.html index 9e0a00e..f1da50e 100644 --- a/templates/partials/navbar.html +++ b/templates/partials/navbar.html @@ -79,7 +79,7 @@
  • - Personen und Personen + Personen und Personen
  • @@ -188,4 +188,4 @@ - \ No newline at end of file + From 7db3912ea474e5e1cdc7fd6e04849dff70b5078d Mon Sep 17 00:00:00 2001 From: martinantonmueller Date: Thu, 21 Nov 2024 12:39:44 +0100 Subject: [PATCH 03/10] Kleinigkeit im relations-navbar --- templates/partials/navbar.html | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/templates/partials/navbar.html b/templates/partials/navbar.html index f1da50e..8ccdc6a 100644 --- a/templates/partials/navbar.html +++ b/templates/partials/navbar.html @@ -114,62 +114,55 @@
  • - Institutionen und Institutionen - + Institutionen und + Institutionen - Institutionen und Orte - + Institutionen und Orte - Institutionen und Werke - + Institutionen und Werke + - Institutionen und Ereignisse - + Institutionen und Ereignisse
  • - Orte und Orte - + Orte und Orte
  • - Orte und Werke - + Orte und Werke
  • - Orte und Ereignisse - + Orte und Ereignisse
  • - Ereignisse und Ereignisse - + Ereignisse und Ereignisse - Ereignisse und Werke - + Ereignisse und Werke
  • - Werke und Werke - + Werke und Werke + From db08e043724e40a9060292d637076c2431e8d523 Mon Sep 17 00:00:00 2001 From: csae8092 Date: Sat, 23 Nov 2024 08:04:46 +0100 Subject: [PATCH 04/10] cosmograph tweaks [skip ci] --- dumper/templates/dumper/network.html | 47 +- package.json | 4 +- pnpm-lock.yaml | 958 +++++++++++++++++++-------- static/src/js/main.js | 83 ++- static/vite/browser-CBdNgIts.js | 1 + static/vite/browser-DJJKDSYy.js | 1 - static/vite/main-CJBCyQtR.js | 951 ++++++++++++++++++++++++++ static/vite/main-CbaY_M2F.js | 952 -------------------------- static/vite/manifest.info | 10 +- 9 files changed, 1722 insertions(+), 1285 deletions(-) create mode 100644 static/vite/browser-CBdNgIts.js delete mode 100644 static/vite/browser-DJJKDSYy.js create mode 100644 static/vite/main-CJBCyQtR.js delete mode 100644 static/vite/main-CbaY_M2F.js diff --git a/dumper/templates/dumper/network.html b/dumper/templates/dumper/network.html index b428538..c5b50ce 100644 --- a/dumper/templates/dumper/network.html +++ b/dumper/templates/dumper/network.html @@ -9,39 +9,26 @@ {% endblock scripts %} {% block content %} -
    -

    Netzwerk aller Verbindungen

    -
    - - +
    +
    +
    +

    + + + Relationen + +

    +

    {{ edges_count|intcomma }} Relationen

    +

    Relationen zwischen Personen, Werken, Ereignissen, Institutionen und Orten. +

    +
    +
    +

    + Ereignisse

    {{ event_count|intcomma }} Ereignisse

    @@ -72,6 +90,7 @@

    {{ event_count|intcomma }} Ereignisse

    + Institutionen

    {{ institution_count|intcomma }} Institutionen

    @@ -83,6 +102,7 @@

    {{ institution_count|intcomma }} Institutionen

    + Uris

    {{ uri_count|intcomma }} URIs

    diff --git a/dumper/views.py b/dumper/views.py index 6d7e29c..b21a082 100644 --- a/dumper/views.py +++ b/dumper/views.py @@ -1,14 +1,18 @@ +import requests from typing import Any + + from django.apps import apps +from django.conf import settings from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.views.generic.base import TemplateView from apis_core.apis_entities.models import Event, Institution, Person, Place, Work -from django.conf import settings from apis_core.apis_metainfo.models import Uri -import requests + +from network.models import Edge from .forms import form_user_login @@ -80,6 +84,7 @@ def get_context_data(self, *args, **kwargs): context["work_count"] = Work.objects.all().count() context["institution_count"] = Institution.objects.all().count() context["uri_count"] = Uri.objects.all().count() + context["edges_count"] = Edge.objects.all().count() return context diff --git a/network/__init__.py b/network/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/network/admin.py b/network/admin.py new file mode 100644 index 0000000..7e8f1a8 --- /dev/null +++ b/network/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin +from network.models import Edge + + +admin.site.register(Edge) diff --git a/network/apps.py b/network/apps.py new file mode 100644 index 0000000..673ce3f --- /dev/null +++ b/network/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class NetworkConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "network" diff --git a/network/filters.py b/network/filters.py new file mode 100644 index 0000000..ed5a05c --- /dev/null +++ b/network/filters.py @@ -0,0 +1,31 @@ +import django_filters +from django.db.models import CharField + +from network.models import Edge + + +class EdgeListFilter(django_filters.FilterSet): + + class Meta: + model = Edge + fields = "__all__" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + for field_name, filter_obj in self.filters.items(): + model_field = self.Meta.model._meta.get_field(field_name) + self.filters[field_name].label = model_field.verbose_name + self.filters[field_name].help_text = model_field.help_text + + if isinstance(model_field, CharField): + if ( + model_field.choices + ): # Keep the default filter logic for choice fields + continue + else: + self.filters[field_name] = django_filters.CharFilter( + field_name=field_name, + lookup_expr="icontains", + help_text=model_field.help_text, + label=model_field.verbose_name, + ) diff --git a/network/forms.py b/network/forms.py new file mode 100644 index 0000000..af8ca7a --- /dev/null +++ b/network/forms.py @@ -0,0 +1,35 @@ +from crispy_forms.helper import FormHelper + +from crispy_forms.layout import Layout +from crispy_forms.bootstrap import AccordionGroup +from crispy_bootstrap5.bootstrap5 import BS5Accordion + + +class EdgeFilterFormHelper(FormHelper): + def __init__(self, *args, **kwargs): + super(EdgeFilterFormHelper, self).__init__(*args, **kwargs) + self.helper = FormHelper() + self.form_class = "genericFilterForm" + self.form_method = "GET" + self.form_tag = False + self.layout = Layout( + BS5Accordion( + AccordionGroup( + "Quellknoten", + "source_label", + "source_kind", + ), + AccordionGroup( + "Zielknoten", + "target_label", + "target_kind", + ), + AccordionGroup( + "Beziehung", + "edge_label", + "edge_kind", + "start_date", + "end_date", + ), + ), + ) diff --git a/network/migrations/0001_initial.py b/network/migrations/0001_initial.py new file mode 100644 index 0000000..8bc0106 --- /dev/null +++ b/network/migrations/0001_initial.py @@ -0,0 +1,136 @@ +# Generated by Django 5.1.1 on 2024-11-23 07:42 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [] + + operations = [ + migrations.CreateModel( + name="Edge", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "edge_id", + models.IntegerField( + help_text="ID der Kante", verbose_name="ID der Kante" + ), + ), + ( + "edge_kind", + models.CharField( + choices=[ + ("personperson", "Personen und Personen"), + ("personplace", "Personen und Orte"), + ("personwork", "Personen und Werke"), + ("personevent", "Personen und Ereignisse"), + ("personinstitution", "Personen und Institutionen"), + ( + "institutioninstitution", + "Institutionen und Institutionen", + ), + ("institutionplace", "Institutionen und Orte"), + ("institutionwork", "Institutionen und Werke"), + ("institutionevent", "Institutionen und Ereignisse"), + ("placeplace", "Orte und Orte"), + ("placework", "Orte und Werke"), + ("placeevent", "Orte und Ereignisse"), + ("eventevent", "Ereignisse und Ereignisse"), + ("eventwork", "Ereignisse und Werke"), + ("workwork", "Werke und Werke"), + ], + help_text="Art der Beziehung (Personen und Orte, Werke und Werke, ...)", + max_length=100, + verbose_name="Kantentyp", + ), + ), + ( + "source_label", + models.CharField( + help_text="Name der Quelle", + max_length=250, + verbose_name="Name der Quelle", + ), + ), + ( + "source_kind", + models.CharField( + help_text="Art der Quelle (Person, Ort, Werk, Institution, Ereignis)", + max_length=250, + verbose_name="Art der Quelle", + ), + ), + ( + "source_id", + models.IntegerField( + help_text="ID der Quelle", verbose_name="ID der Quelle" + ), + ), + ( + "edge_label", + models.CharField( + help_text="Art der Beziehung von Quell- und Zielknoten", + max_length=250, + verbose_name="Art der Beziehung", + ), + ), + ( + "target_label", + models.CharField( + help_text="Name des Ziels", + max_length=250, + verbose_name="Name des Ziels", + ), + ), + ( + "target_kind", + models.CharField( + help_text="Art des Ziels (Person, Ort, Werk, Institution, Ereignis)", + max_length=250, + verbose_name="Art des Ziels", + ), + ), + ( + "target_id", + models.IntegerField( + help_text="ID des Ziels", verbose_name="ID des Ziels" + ), + ), + ( + "start_date", + models.DateField( + blank=True, + help_text="Beginn der Beziehung (YYYY-MM-DD)", + null=True, + verbose_name="Beginn der Beziehung", + ), + ), + ( + "end_date", + models.DateField( + blank=True, + help_text="Ende der Beziehung (YYYY-MM-DD)", + null=True, + verbose_name="Ende der Beziehung", + ), + ), + ], + options={ + "verbose_name": ("Kante",), + "verbose_name_plural": "Kanten", + "ordering": ["-id"], + }, + ), + ] diff --git a/network/migrations/0002_alter_edge_options_alter_edge_source_kind_and_more.py b/network/migrations/0002_alter_edge_options_alter_edge_source_kind_and_more.py new file mode 100644 index 0000000..6bcdd6b --- /dev/null +++ b/network/migrations/0002_alter_edge_options_alter_edge_source_kind_and_more.py @@ -0,0 +1,53 @@ +# Generated by Django 5.1.1 on 2024-11-24 08:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("network", "0001_initial"), + ] + + operations = [ + migrations.AlterModelOptions( + name="edge", + options={ + "ordering": ["-id"], + "verbose_name": "Kante", + "verbose_name_plural": "Kanten", + }, + ), + migrations.AlterField( + model_name="edge", + name="source_kind", + field=models.CharField( + choices=[ + ("person", "Person"), + ("institution", "Institution"), + ("place", "Ort"), + ("event", "Ereignis"), + ("work", "Werk"), + ], + help_text="Art der Quelle (Person, Ort, Werk, Institution, Ereignis)", + max_length=250, + verbose_name="Art der Quelle", + ), + ), + migrations.AlterField( + model_name="edge", + name="target_kind", + field=models.CharField( + choices=[ + ("person", "Person"), + ("institution", "Institution"), + ("place", "Ort"), + ("event", "Ereignis"), + ("work", "Werk"), + ], + help_text="Art des Ziels (Person, Ort, Werk, Institution, Ereignis)", + max_length=250, + verbose_name="Art des Ziels", + ), + ), + ] diff --git a/network/migrations/__init__.py b/network/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/network/models.py b/network/models.py new file mode 100644 index 0000000..765e282 --- /dev/null +++ b/network/models.py @@ -0,0 +1,95 @@ +from django.db import models +from django.urls import reverse + +EDGE_TYPES = ( + ("personperson", "Personen und Personen"), + ("personplace", "Personen und Orte"), + ("personwork", "Personen und Werke"), + ("personevent", "Personen und Ereignisse"), + ("personinstitution", "Personen und Institutionen"), + ("institutioninstitution", "Institutionen und Institutionen"), + ("institutionplace", "Institutionen und Orte"), + ("institutionwork", "Institutionen und Werke"), + ("institutionevent", "Institutionen und Ereignisse"), + ("placeplace", "Orte und Orte"), + ("placework", "Orte und Werke"), + ("placeevent", "Orte und Ereignisse"), + ("eventevent", "Ereignisse und Ereignisse"), + ("eventwork", "Ereignisse und Werke"), + ("workwork", "Werke und Werke"), +) + +NODE_TYPES = ( + ("person", "Person"), + ("institution", "Institution"), + ("place", "Ort"), + ("event", "Ereignis"), + ("work", "Werk"), +) + + +class Edge(models.Model): + edge_id = models.IntegerField(verbose_name="ID der Kante", help_text="ID der Kante") + edge_kind = models.CharField( + max_length=100, + choices=EDGE_TYPES, + verbose_name="Kantentyp", + help_text="Art der Beziehung (Personen und Orte, Werke und Werke, ...)", + ) + source_label = models.CharField( + max_length=250, + verbose_name="Name der Quelle", + help_text="Name der Quelle", + ) + source_kind = models.CharField( + max_length=250, + choices=NODE_TYPES, + verbose_name="Art der Quelle", + help_text="Art der Quelle (Person, Ort, Werk, Institution, Ereignis)", + ) + source_id = models.IntegerField( + verbose_name="ID der Quelle", help_text="ID der Quelle" + ) + edge_label = models.CharField( + max_length=250, + verbose_name="Art der Beziehung", + help_text="Art der Beziehung von Quell- und Zielknoten", + ) + target_label = models.CharField( + max_length=250, + verbose_name="Name des Ziels", + help_text="Name des Ziels", + ) + target_kind = models.CharField( + max_length=250, + choices=NODE_TYPES, + verbose_name="Art des Ziels", + help_text="Art des Ziels (Person, Ort, Werk, Institution, Ereignis)", + ) + target_id = models.IntegerField( + verbose_name="ID des Ziels", help_text="ID des Ziels" + ) + start_date = models.DateField( + blank=True, + null=True, + verbose_name="Beginn der Beziehung", + help_text="Beginn der Beziehung (YYYY-MM-DD)", + ) + end_date = models.DateField( + blank=True, + null=True, + verbose_name="Ende der Beziehung", + help_text="Ende der Beziehung (YYYY-MM-DD)", + ) + + class Meta: + verbose_name = "Kante" + verbose_name_plural = "Kanten" + ordering = ["-id"] + + def __str__(self): + return f"{self.source_label}, {self.edge_label}, {self.target_label}" + + @classmethod + def get_listview_url(self): + return reverse("network:edges_browse") diff --git a/network/tables.py b/network/tables.py new file mode 100644 index 0000000..d773f4d --- /dev/null +++ b/network/tables.py @@ -0,0 +1,17 @@ +import django_tables2 as tables + +from network.models import Edge + + +class EdgeTable(tables.Table): + + class Meta: + model = Edge + sequence = ( + "id", + "source_label", + "edge_label", + "target_label", + "start_date", + "end_date", + ) diff --git a/network/templates/network/list_view.html b/network/templates/network/list_view.html new file mode 100644 index 0000000..dce278f --- /dev/null +++ b/network/templates/network/list_view.html @@ -0,0 +1,86 @@ +{% extends "base.html" %} +{% load static %} +{% load django_tables2 %} +{% load crispy_forms_field %} +{% load crispy_forms_tags %} +{% block title %} Alle Beziehungen {% endblock %} +{% block content %} +{% include "partials/entity_styles.html" %} + +
    +

    + Beziehungen +

    + +
    +
    +

    Suchen & Filtern

    + {% block customView %}{% endblock %} + {% block create_button %}{% endblock %} + + {% load django_tables2 crispy_forms_tags %} +
    + {% crispy filter.form filter.form.helper %} + {% include 'browsing/partials/column_selector.html' %} + Zurücksetzen + +
    + {% include 'browsing/partials/chart_form.html' %} + +
    +
    + + {% with table.paginator.count as total %} +

    {{ total }} Result(s)

    + {% endwith %} +
    + {% block table %} + {% include 'browsing/partials/table.html' %} + {% endblock table %} + {% block pagination.allpages %} + {% load django_tables2 %} +{% load i18n %} + +
    + {% with table.page.object_list|length as count %} +

    Page total: {{ count }}

    + {% endwith %} +
    + + + + {% endblock pagination.allpages %} + {% if download %} +
    + {% include "browsing/partials/download_menu.html" %} +
    + {% endif %} +
    +
    +
    + +
    +{% endblock %} +{% block scripts2 %} + + +{% endblock scripts2 %} \ No newline at end of file diff --git a/network/tests.py b/network/tests.py new file mode 100644 index 0000000..a79ca8b --- /dev/null +++ b/network/tests.py @@ -0,0 +1,3 @@ +# from django.test import TestCase + +# Create your tests here. diff --git a/network/urls.py b/network/urls.py new file mode 100644 index 0000000..cfcafb6 --- /dev/null +++ b/network/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from network.views import EdgeListViews + + +app_name = "network" +urlpatterns = [ + path("edges/", EdgeListViews.as_view(), name="edges_browse"), +] diff --git a/network/views.py b/network/views.py new file mode 100644 index 0000000..b00ddec --- /dev/null +++ b/network/views.py @@ -0,0 +1,23 @@ +from browsing.browsing_utils import ( + GenericListView, +) + +from network.filters import EdgeListFilter +from network.forms import EdgeFilterFormHelper +from network.models import Edge +from network.tables import EdgeTable + + +class EdgeListViews(GenericListView): + model = Edge + filter_class = EdgeListFilter + formhelper_class = EdgeFilterFormHelper + table_class = EdgeTable + init_columns = [ + "source_label", + "edge_label", + "target_label", + "start_date", + ] + enable_merge = False + template_name = "network/list_view.html" diff --git a/pmb/settings.py b/pmb/settings.py index be91c96..ba3ee85 100644 --- a/pmb/settings.py +++ b/pmb/settings.py @@ -58,6 +58,7 @@ "normdata", "dumper", "archemd", + "network", ] CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" diff --git a/pmb/urls.py b/pmb/urls.py index 54f5372..245fcec 100644 --- a/pmb/urls.py +++ b/pmb/urls.py @@ -7,25 +7,20 @@ from django.views.generic.base import TemplateView -urlpatterns = ( - [ - path( - "robots.txt", - TemplateView.as_view(template_name="robots.txt", content_type="text/plain"), - ), - path("apis/", include("apis_core.urls", namespace="apis")), - path("normdata/", include("normdata.urls", namespace="normdata")), - path("admin/", admin.site.urls), - path("arche/", include("archemd.urls", namespace="archemd")), - path("uri/", resolver_views.uri_resolver, name="uri-resolver"), - path( - "entity//", resolver_views.entity_resolver, name="entity-resolver" - ), - path("", include("dumper.urls", namespace="dumper")), - ] - # + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) - # + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) -) +urlpatterns = [ + path( + "robots.txt", + TemplateView.as_view(template_name="robots.txt", content_type="text/plain"), + ), + path("network/", include("network.urls", namespace="network")), + path("apis/", include("apis_core.urls", namespace="apis")), + path("normdata/", include("normdata.urls", namespace="normdata")), + path("admin/", admin.site.urls), + path("arche/", include("archemd.urls", namespace="archemd")), + path("uri/", resolver_views.uri_resolver, name="uri-resolver"), + path("entity//", resolver_views.entity_resolver, name="entity-resolver"), + path("", include("dumper.urls", namespace="dumper")), +] if settings.DEBUG: urlpatterns = urlpatterns + static( diff --git a/static/css/style.css b/static/css/style.css index 42a830a..deecfd1 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,5 +1,5 @@ :root { - --pmb: #9B5F98; + --pmb: #874A84; --pmb-hover: #9b5f98c2; --person: #720e07; --place: #5bc0eb; @@ -13,6 +13,11 @@ min-height: 2.2rem; } +footer a { + color: var(--pmb); + text-decoration: underline; +} + a { color: var(--pmb); text-decoration: unset; diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 7c4fe0b..8d94f84 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -35,18 +35,18 @@
    From 278fe2d93d0bf84fc47a817826578722880a786e Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Mon, 25 Nov 2024 09:57:00 +0100 Subject: [PATCH 06/10] provides links in Edge-Table to nodes detail view; or filter by edge_type (#257) --- network/tables.py | 28 ++++++++++++++++++++++++++++ static/css/style.css | 1 + 2 files changed, 29 insertions(+) diff --git a/network/tables.py b/network/tables.py index d773f4d..2a4239f 100644 --- a/network/tables.py +++ b/network/tables.py @@ -5,6 +5,34 @@ class EdgeTable(tables.Table): + source_label = tables.TemplateColumn( + """ + {{ record.source_label }} + """ + ) + target_label = tables.TemplateColumn( + """ + {{ record.target_label }} + """ + ) + # this does not work, because the querystring template tag needs a requests object in context + # and passing this in the matching view does not work for reasons unknown to me + # edge_label = tables.TemplateColumn( + # """ + # + # {{ record.edge_label }} + # + # """, + # extra_context={"request": None} + # ) + edge_label = tables.TemplateColumn( + """ + + {{ record.edge_label }} + + """, # noqa: + ) + class Meta: model = Edge sequence = ( diff --git a/static/css/style.css b/static/css/style.css index deecfd1..90aea14 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,5 +1,6 @@ :root { --pmb: #874A84; + --edge: #874A84; --pmb-hover: #9b5f98c2; --person: #720e07; --place: #5bc0eb; From b9b398b77488c169e64a7ca295f838cbbba15fb1 Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Mon, 25 Nov 2024 10:59:11 +0100 Subject: [PATCH 07/10] custom filters for IDs and labels of nodes (no matter if source or target) (#258) --- network/filters.py | 52 ++++++++++++++++++++++++++++++++++++++++------ network/forms.py | 2 ++ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/network/filters.py b/network/filters.py index ed5a05c..229ccbd 100644 --- a/network/filters.py +++ b/network/filters.py @@ -1,23 +1,63 @@ import django_filters -from django.db.models import CharField +from django.core.exceptions import FieldDoesNotExist +from django.db.models import CharField, Q +import django_filters.widgets from network.models import Edge +def safe_int_conversion(value): + try: + return int(value) + except ValueError: + pass + + class EdgeListFilter(django_filters.FilterSet): + node = django_filters.CharFilter( + field_name="source_label", + method="nodes_icontains_filter", + label="Quell- oder Zielknoten", + help_text="Sucht im Label des Ziel, oder des Quellknotens", + ) + node_id = django_filters.BaseInFilter( + field_name="source_id", + method="nodes_id_filter", + label="IDs eines oder mehrerer Quell- oder Zielknoten", + help_text="IDs eines oder mehrerer Quell- oder Zielknoten, z.B. '2121,10815'", + widget=django_filters.widgets.CSVWidget(), + ) + edge_label = django_filters.AllValuesMultipleFilter() + class Meta: model = Edge fields = "__all__" + def nodes_icontains_filter(self, queryset, name, value): + return queryset.filter( + Q(source_label__icontains=value) | Q(target_label__icontains=value) + ) + + def nodes_id_filter(self, queryset, name, value): + sane_values = [safe_int_conversion(x) for x in value] + print(value) + print(sane_values) + return queryset.filter( + Q(source_id__in=sane_values) | Q(target_id__in=sane_values) + ) + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for field_name, filter_obj in self.filters.items(): - model_field = self.Meta.model._meta.get_field(field_name) - self.filters[field_name].label = model_field.verbose_name - self.filters[field_name].help_text = model_field.help_text - - if isinstance(model_field, CharField): + try: + model_field = self.Meta.model._meta.get_field(field_name) + self.filters[field_name].label = model_field.verbose_name + self.filters[field_name].help_text = model_field.help_text + except FieldDoesNotExist: + continue + print(field_name, type(model_field)) + if isinstance(model_field, CharField) and not field_name == "edge_label": if ( model_field.choices ): # Keep the default filter logic for choice fields diff --git a/network/forms.py b/network/forms.py index af8ca7a..095d251 100644 --- a/network/forms.py +++ b/network/forms.py @@ -13,6 +13,8 @@ def __init__(self, *args, **kwargs): self.form_method = "GET" self.form_tag = False self.layout = Layout( + "node", + "node_id", BS5Accordion( AccordionGroup( "Quellknoten", From 1257273724690a21796d32bf7b5489c61934444a Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Mon, 25 Nov 2024 12:11:58 +0100 Subject: [PATCH 08/10] adds mgm cmd to recreate edges table (#259) --- crontab | 1 + network/management/commands/edges.py | 51 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 network/management/commands/edges.py diff --git a/crontab b/crontab index 4fb5aa1..941968e 100644 --- a/crontab +++ b/crontab @@ -10,4 +10,5 @@ 1 7 * * * root cd /opt/app && /usr/local/bin/python3 manage.py fetch_images >> /var/log/cron.log 2>&1 30 7 * * * root cd /opt/app && /usr/local/bin/python3 manage.py find_duplicted_persons >> /var/log/cron.log 2>&1 50 7 * * * root cd /opt/app && /usr/local/bin/python3 manage.py find_duplicted_places >> /var/log/cron.log 2>&1 +5 23 * * * root cd /opt/app && /usr/local/bin/python3 manage.py edges >> /var/log/cron.log 2>&1 # diff --git a/network/management/commands/edges.py b/network/management/commands/edges.py new file mode 100644 index 0000000..c7cd42e --- /dev/null +++ b/network/management/commands/edges.py @@ -0,0 +1,51 @@ +import os +from datetime import datetime + +from django.conf import settings +from django.core.management.base import BaseCommand +from tqdm import tqdm + +from apis_core.apis_relations.models import AbstractRelation +from dumper.utils import write_report + +from network.models import Edge + + +class Command(BaseCommand): + help = "Updates Edges" + + def handle(self, *args, **kwargs): + start_time = datetime.now().strftime(settings.PMB_TIME_PATTERN) + edges = Edge.objects.all() + print(f"found {edges.count()} edges, going to delete those") + edges._raw_delete(edges.db) + print("finished deleting") + for y in AbstractRelation.get_all_relation_classes(): + print(f"####\n{y.__name__}\n") + edge_kind = y.__name__.lower() + source_kind = y.get_related_entity_classa().__name__.lower() + target_kind = y.get_related_entity_classb().__name__.lower() + for x in tqdm(y.objects.all(), total=y.objects.all().count()): + source_obj = x.get_related_entity_instancea() + target_obj = x.get_related_entity_instanceb() + item = { + "edge_id": x.id, + "edge_kind": edge_kind, + "source_label": f"{source_obj}"[:249], + "source_kind": source_kind, + "source_id": source_obj.id, + "edge_label": f"{x.relation_type}", + "target_label": f"{target_obj}"[:249], + "target_kind": target_kind, + "target_id": target_obj.id, + "start_date": x.start_date, + "end_date": x.end_date, + } + try: + Edge.objects.create(**item) + except Exception as e: + print(x, x.id, edge_kind, e) + print(f"created {Edge.objects.all().count()} Edges") + end_time = datetime.now().strftime(settings.PMB_TIME_PATTERN) + report = [os.path.basename(__file__), start_time, end_time] + write_report(report) From ec9dc7064a14461d547e557365f1e58c81b0775f Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Mon, 25 Nov 2024 13:55:35 +0100 Subject: [PATCH 09/10] serializes edge data as csv and json (#260) --- network/templates/network/list_view.html | 7 +++++ network/urls.py | 3 ++- network/views.py | 33 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/network/templates/network/list_view.html b/network/templates/network/list_view.html index dce278f..bb4471b 100644 --- a/network/templates/network/list_view.html +++ b/network/templates/network/list_view.html @@ -11,6 +11,13 @@

    Beziehungen

    +
    +

    Download

    +
    + CSV + JSON +
    +
    diff --git a/network/urls.py b/network/urls.py index cfcafb6..f8a2b8f 100644 --- a/network/urls.py +++ b/network/urls.py @@ -1,8 +1,9 @@ from django.urls import path -from network.views import EdgeListViews +from network.views import EdgeListViews, network_data app_name = "network" urlpatterns = [ path("edges/", EdgeListViews.as_view(), name="edges_browse"), + path("csv/", network_data, name="data"), ] diff --git a/network/views.py b/network/views.py index b00ddec..cf121ba 100644 --- a/network/views.py +++ b/network/views.py @@ -1,3 +1,8 @@ +import pandas as pd +import json +from django.http import HttpResponse, JsonResponse + + from browsing.browsing_utils import ( GenericListView, ) @@ -21,3 +26,31 @@ class EdgeListViews(GenericListView): ] enable_merge = False template_name = "network/list_view.html" + + +def network_data(request): + values_list = [x.name for x in Edge._meta.get_fields()] + qs = EdgeListFilter(request.GET, queryset=Edge.objects.all()).qs + items = list(qs.values_list(*values_list)) + df = pd.DataFrame(items, columns=values_list) + response = HttpResponse( + content_type="text/csv", + ) + format = request.GET.get("format", "csv") + if format not in ["csv", "json"]: + format = "csv" + if format == "csv": + response = HttpResponse( + content_type="text/csv", + headers={"Content-Disposition": 'attachment; filename="relations.csv"'}, + ) + df.to_csv(response, index=False) + else: + df = df.set_index("edge_id") + df["start_date"] = pd.to_datetime(df["start_date"], errors="coerce") + df["end_date"] = pd.to_datetime(df["end_date"], errors="coerce") + df["start_date"] = df["start_date"].dt.strftime("%Y-%m-%d").fillna("") + df["end_date"] = df["end_date"].dt.strftime("%Y-%m-%d").fillna("") + out = df.to_json(orient="index", force_ascii=False) + response = JsonResponse(json.loads(out)) + return response From d585570cf05a9884a99014c0583d6e10c40039de Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Tue, 26 Nov 2024 07:20:07 +0100 Subject: [PATCH 10/10] 261 cosmograph data format (#262) * serializes some network data; dynamic network-view * visualize filtered edges --- network/filters.py | 3 - network/templates/network/list_view.html | 18 +- network/views.py | 48 +- static/src/js/main.js | 137 +-- ...rowser-CBdNgIts.js => browser-lg2ZDdSy.js} | 2 +- static/vite/main-CJBCyQtR.js | 951 ------------------ static/vite/main-Dnusw_Zv.js | 899 +++++++++++++++++ static/vite/manifest.info | 8 +- 8 files changed, 1038 insertions(+), 1028 deletions(-) rename static/vite/{browser-CBdNgIts.js => browser-lg2ZDdSy.js} (78%) delete mode 100644 static/vite/main-CJBCyQtR.js create mode 100644 static/vite/main-Dnusw_Zv.js diff --git a/network/filters.py b/network/filters.py index 229ccbd..a743653 100644 --- a/network/filters.py +++ b/network/filters.py @@ -41,8 +41,6 @@ def nodes_icontains_filter(self, queryset, name, value): def nodes_id_filter(self, queryset, name, value): sane_values = [safe_int_conversion(x) for x in value] - print(value) - print(sane_values) return queryset.filter( Q(source_id__in=sane_values) | Q(target_id__in=sane_values) ) @@ -56,7 +54,6 @@ def __init__(self, *args, **kwargs): self.filters[field_name].help_text = model_field.help_text except FieldDoesNotExist: continue - print(field_name, type(model_field)) if isinstance(model_field, CharField) and not field_name == "edge_label": if ( model_field.choices diff --git a/network/templates/network/list_view.html b/network/templates/network/list_view.html index bb4471b..326466c 100644 --- a/network/templates/network/list_view.html +++ b/network/templates/network/list_view.html @@ -11,11 +11,19 @@

    Beziehungen

    -
    -

    Download

    -
    - CSV - JSON +
    +
    +

    Download

    +
    + CSV + JSON +
    +
    +
    +

    Visualize

    +
    diff --git a/network/views.py b/network/views.py index cf121ba..bf6cb85 100644 --- a/network/views.py +++ b/network/views.py @@ -37,7 +37,7 @@ def network_data(request): content_type="text/csv", ) format = request.GET.get("format", "csv") - if format not in ["csv", "json"]: + if format not in ["csv", "json", "cosmograph"]: format = "csv" if format == "csv": response = HttpResponse( @@ -45,7 +45,8 @@ def network_data(request): headers={"Content-Disposition": 'attachment; filename="relations.csv"'}, ) df.to_csv(response, index=False) - else: + return response + elif format == "json": df = df.set_index("edge_id") df["start_date"] = pd.to_datetime(df["start_date"], errors="coerce") df["end_date"] = pd.to_datetime(df["end_date"], errors="coerce") @@ -53,4 +54,45 @@ def network_data(request): df["end_date"] = df["end_date"].dt.strftime("%Y-%m-%d").fillna("") out = df.to_json(orient="index", force_ascii=False) response = JsonResponse(json.loads(out)) - return response + elif format == "cosmograph": + data = {} + edge_data = df.apply( + lambda row: { + "id": row["edge_id"], + "s": row["source_id"], + "t": row["target_id"], + "start": str(row["start_date"]), + "end": str(row["end_date"]), + }, + axis=1, + ).tolist() + data["edges"] = edge_data + source_nodes = df[["source_label", "source_kind", "source_id"]].rename( + columns={ + "source_label": "node_label", + "source_kind": "node_kind", + "source_id": "node_id", + } + ) + target_nodes = df[["target_label", "target_kind", "target_id"]].rename( + columns={ + "target_label": "node_label", + "target_kind": "node_kind", + "target_id": "node_id", + } + ) + nodes = ( + pd.concat([source_nodes, target_nodes]) + .drop_duplicates() + .reset_index(drop=True) + ) + data["nodes"] = nodes.apply( + lambda row: { + "id": row["node_id"], + "k": row["node_kind"], + "l": row["node_label"], + }, + axis=1, + ).tolist() + response = JsonResponse(data) + return response diff --git a/static/src/js/main.js b/static/src/js/main.js index 7eff615..12d910e 100644 --- a/static/src/js/main.js +++ b/static/src/js/main.js @@ -1,61 +1,76 @@ -import { - Cosmograph, - CosmographSearch, - CosmographTimeline, -} from "@cosmograph/cosmograph"; -import * as d3 from "d3"; - -const edge_csv = "/media/edges.csv"; -const node_csv = "/media/nodes.csv"; - -const edge_promis = d3.csv(edge_csv); -const node_promis = d3.csv(node_csv); -const alertNode = document.getElementById("alert") -const spinnerNode = document.getElementById("spinner"); -const legendNode = document.getElementById("legend"); -const canvas = document.createElement("div"); - -Promise.all([edge_promis, node_promis]).then(([edge_data, node_data]) => { - const links = edge_data.map((d) => ({ - source: parseInt(d.source), - target: parseInt(d.target), - date: Date.parse(d.date), - })); - - const nodes = node_data.map((d) => ({ - id: parseInt(d.id), - label: d.label, - color: d.color, - })); - const appNode = document.getElementById("app"); - - // remove spinner - spinnerNode.classList.add("visually-hidden"); - legendNode.style.visibility = "visible"; - alertNode.classList.add("visually-hidden"); - appNode.appendChild(canvas); - const searchContainer = document.createElement("div"); - appNode.appendChild(searchContainer); - const config = { - nodeColor: (d) => d.color, - nodeLabelAccessor: (d) => d.label, - showTopLabels: true, - showDynamicLabels: false, - linkGreyoutOpacity: 0, - nodeLabelColor: "white", - hoveredNodeLabelColor: "white", - linkWidth: 1, - linkArrows: false, - onClick: (data) => alert(data.label) - }; - const cosmograph = new Cosmograph(canvas, config); - - const timelineContainer = document.createElement("div"); - const timeline = new CosmographTimeline(cosmograph, timelineContainer); - - - const search = new CosmographSearch(cosmograph, searchContainer); - cosmograph.setData(nodes, links); - appNode.appendChild(timelineContainer); - -}); +import { Cosmograph, CosmographTimeline } from "@cosmograph/cosmograph"; + +async function init() { + const alertNode = document.getElementById("alert"); + const spinnerNode = document.getElementById("spinner"); + const legendNode = document.getElementById("legend"); + const canvas = document.createElement("div"); + + const queryString = window.location.search; + const url = `/network/csv/${queryString}`; + + try { + const res = await fetch(url); + const data = await res.json(); + + const colors = { + person: "#720e07", + place: "#5bc0eb", + work: "#ff8600", + event: "#9bc53d", + institution: "#ffdd1b", + }; + + const links = data["edges"].map((d) => ({ + source: parseInt(d.s), + target: parseInt(d.t), + date: Date.parse(d.start), + })); + + const nodes = data["nodes"].map((d) => ({ + id: parseInt(d.id), + label: d.l, + color: colors[d["k"]], + })); + + const appNode = document.getElementById("app"); + + // Remove spinner + spinnerNode.classList.add("visually-hidden"); + legendNode.style.visibility = "visible"; + alertNode.classList.add("visually-hidden"); + + appNode.appendChild(canvas); + const searchContainer = document.createElement("div"); + appNode.appendChild(searchContainer); + + const config = { + nodeColor: (d) => d.color, + nodeLabelAccessor: (d) => d.label, + showTopLabels: true, + showDynamicLabels: false, + linkGreyoutOpacity: 0, + nodeLabelColor: "white", + hoveredNodeLabelColor: "white", + linkWidth: 1, + linkArrows: false, + onClick: (data) => alert(data.label), + simulationRepulsion: 1, + linkDistance: 5, + gravity: 0.5 + }; + + const cosmograph = new Cosmograph(canvas, config); + + const timelineContainer = document.createElement("div"); + const timeline = new CosmographTimeline(cosmograph, timelineContainer); + cosmograph.setData(nodes, links); + appNode.appendChild(timelineContainer); + } catch (error) { + console.error("Failed to fetch data:", error); + alertNode.textContent = "Failed to load data. Please try again later."; + alertNode.style.visibility = "visible"; + } +} + +init(); diff --git a/static/vite/browser-CBdNgIts.js b/static/vite/browser-lg2ZDdSy.js similarity index 78% rename from static/vite/browser-CBdNgIts.js rename to static/vite/browser-lg2ZDdSy.js index 52ff740..d3ff861 100644 --- a/static/vite/browser-CBdNgIts.js +++ b/static/vite/browser-lg2ZDdSy.js @@ -1 +1 @@ -import{g as e}from"./main-CJBCyQtR.js";var o=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const r=e(o),s=Object.freeze(Object.defineProperty({__proto__:null,default:r},Symbol.toStringTag,{value:"Module"}));export{s as b}; +import{g as e}from"./main-Dnusw_Zv.js";var o=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const r=e(o),s=Object.freeze(Object.defineProperty({__proto__:null,default:r},Symbol.toStringTag,{value:"Module"}));export{s as b}; diff --git a/static/vite/main-CJBCyQtR.js b/static/vite/main-CJBCyQtR.js deleted file mode 100644 index 8a5ce4c..0000000 --- a/static/vite/main-CJBCyQtR.js +++ /dev/null @@ -1,951 +0,0 @@ -var Yb=Object.defineProperty,Kb=Object.defineProperties;var Zb=Object.getOwnPropertyDescriptors;var Bl=Object.getOwnPropertySymbols;var $m=Object.prototype.hasOwnProperty,Lm=Object.prototype.propertyIsEnumerable;var km=(i,e,t)=>e in i?Yb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,wi=(i,e)=>{for(var t in e||(e={}))$m.call(e,t)&&km(i,t,e[t]);if(Bl)for(var t of Bl(e))Lm.call(e,t)&&km(i,t,e[t]);return i},vo=(i,e)=>Kb(i,Zb(e));var Om=i=>typeof i=="symbol"?i:i+"",Rm=(i,e)=>{var t={};for(var r in i)$m.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&Bl)for(var r of Bl(i))e.indexOf(r)<0&&Lm.call(i,r)&&(t[r]=i[r]);return t};var se=(i,e,t)=>new Promise((r,n)=>{var a=l=>{try{o(t.next(l))}catch(d){n(d)}},s=l=>{try{o(t.throw(l))}catch(d){n(d)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);o((t=t.apply(i,e)).next())});var ku="http://www.w3.org/1999/xhtml";const Pm={svg:"http://www.w3.org/2000/svg",xhtml:ku,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Nd(i){var e=i+="",t=e.indexOf(":");return t>=0&&(e=i.slice(0,t))!=="xmlns"&&(i=i.slice(t+1)),Pm.hasOwnProperty(e)?{space:Pm[e],local:i}:i}function Jb(i){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===ku&&e.documentElement.namespaceURI===ku?e.createElement(i):e.createElementNS(t,i)}}function Qb(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function y0(i){var e=Nd(i);return(e.local?Qb:Jb)(e)}function ey(){}function df(i){return i==null?ey:function(){return this.querySelector(i)}}function ty(i){typeof i!="function"&&(i=df(i));for(var e=this._groups,t=e.length,r=new Array(t),n=0;n=y&&(y=T+1);!(L=p[y])&&++y=0;)(s=r[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Ay(i){i||(i=Iy);function e(u,f){return u&&f?i(u.__data__,f.__data__):!u-!f}for(var t=this._groups,r=t.length,n=new Array(r),a=0;ae?1:i>=e?0:NaN}function Cy(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function ky(){return Array.from(this)}function $y(){for(var i=this._groups,e=0,t=i.length;e1?this.each((e==null?Uy:typeof e=="function"?jy:Gy)(i,e,t==null?"":t)):Ns(this.node(),i)}function Ns(i,e){return i.style.getPropertyValue(e)||T0(i).getComputedStyle(i,null).getPropertyValue(e)}function Vy(i){return function(){delete this[i]}}function Wy(i,e){return function(){this[i]=e}}function qy(i,e){return function(){var t=e.apply(this,arguments);t==null?delete this[i]:this[i]=t}}function Xy(i,e){return arguments.length>1?this.each((e==null?Vy:typeof e=="function"?qy:Wy)(i,e)):this.node()[i]}function A0(i){return i.trim().split(/^|\s+/)}function cf(i){return i.classList||new I0(i)}function I0(i){this._node=i,this._names=A0(i.getAttribute("class")||"")}I0.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function C0(i,e){for(var t=cf(i),r=-1,n=e.length;++r=0&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function wx(i){return function(){var e=this.__on;if(e){for(var t=0,r=-1,n=e.length,a;t{}};function Dd(){for(var i=0,e=arguments.length,t={},r;i=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}nd.prototype=Dd.prototype={constructor:nd,on:function(i,e){var t=this._,r=Ox(i+"",t),n,a=-1,s=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(n),r=0,n,a;r=0&&i._call.call(void 0,e),i=i._next;--Ds}function Nm(){za=(pd=Go.now())+Md,Ds=Oo=0;try{Fx()}finally{Ds=0,Dx(),za=0}}function Nx(){var i=Go.now(),e=i-pd;e>O0&&(Md-=e,pd=i)}function Dx(){for(var i,e=md,t,r=1/0;e;)e._call?(r>e._time&&(r=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:md=t);Ro=i,$u(r)}function $u(i){if(!Ds){Oo&&(Oo=clearTimeout(Oo));var e=i-za;e>24?(i<1/0&&(Oo=setTimeout(Nm,i-Go.now()-Md)),_o&&(_o=clearInterval(_o))):(_o||(pd=Go.now(),_o=setInterval(Nx,O0)),Ds=1,R0(Nm))}}function Dm(i,e,t){var r=new gd;return e=e==null?0:+e,r.restart(n=>{r.stop(),i(n+e)},e,t),r}var Mx=Dd("start","end","cancel","interrupt"),zx=[],F0=0,Mm=1,Lu=2,ad=3,zm=4,Ou=5,sd=6;function zd(i,e,t,r,n,a){var s=i.__transition;if(!s)i.__transition={};else if(t in s)return;Bx(i,t,{name:e,index:r,group:n,on:Mx,tween:zx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:F0})}function ff(i,e){var t=dn(i,e);if(t.state>F0)throw new Error("too late; already scheduled");return t}function xn(i,e){var t=dn(i,e);if(t.state>ad)throw new Error("too late; already running");return t}function dn(i,e){var t=i.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function Bx(i,e,t){var r=i.__transition,n;r[e]=t,t.timer=P0(a,0,t.time);function a(d){t.state=Mm,t.timer.restart(s,t.delay,t.time),t.delay<=d&&s(d-t.delay)}function s(d){var c,u,f,h;if(t.state!==Mm)return l();for(c in r)if(h=r[c],h.name===t.name){if(h.state===ad)return Dm(s);h.state===zm?(h.state=sd,h.timer.stop(),h.on.call("interrupt",i,i.__data__,h.index,h.group),delete r[c]):+cLu&&r.state>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Ul(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Ul(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=jx.exec(i))?new Fr(e[1],e[2],e[3],1):(e=Hx.exec(i))?new Fr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Vx.exec(i))?Ul(e[1],e[2],e[3],e[4]):(e=Wx.exec(i))?Ul(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=qx.exec(i))?Wm(e[1],e[2]/100,e[3]/100,1):(e=Xx.exec(i))?Wm(e[1],e[2]/100,e[3]/100,e[4]):Bm.hasOwnProperty(i)?jm(Bm[i]):i==="transparent"?new Fr(NaN,NaN,NaN,0):null}function jm(i){return new Fr(i>>16&255,i>>8&255,i&255,1)}function Ul(i,e,t,r){return r<=0&&(i=e=t=NaN),new Fr(i,e,t,r)}function Zx(i){return i instanceof Qo||(i=Gn(i)),i?(i=i.rgb(),new Fr(i.r,i.g,i.b,i.opacity)):new Fr}function Ru(i,e,t,r){return arguments.length===1?Zx(i):new Fr(i,e,t,r==null?1:r)}function Fr(i,e,t,r){this.r=+i,this.g=+e,this.b=+t,this.opacity=+r}hf(Fr,Ru,N0(Qo,{brighter(i){return i=i==null?vd:Math.pow(vd,i),new Fr(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?jo:Math.pow(jo,i),new Fr(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Fr(Na(this.r),Na(this.g),Na(this.b),_d(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Hm,formatHex:Hm,formatHex8:Jx,formatRgb:Vm,toString:Vm}));function Hm(){return`#${Ra(this.r)}${Ra(this.g)}${Ra(this.b)}`}function Jx(){return`#${Ra(this.r)}${Ra(this.g)}${Ra(this.b)}${Ra((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vm(){const i=_d(this.opacity);return`${i===1?"rgb(":"rgba("}${Na(this.r)}, ${Na(this.g)}, ${Na(this.b)}${i===1?")":`, ${i})`}`}function _d(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Na(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Ra(i){return i=Na(i),(i<16?"0":"")+i.toString(16)}function Wm(i,e,t,r){return r<=0?i=e=t=NaN:t<=0||t>=1?i=e=NaN:e<=0&&(i=NaN),new nn(i,e,t,r)}function D0(i){if(i instanceof nn)return new nn(i.h,i.s,i.l,i.opacity);if(i instanceof Qo||(i=Gn(i)),!i)return new nn;if(i instanceof nn)return i;i=i.rgb();var e=i.r/255,t=i.g/255,r=i.b/255,n=Math.min(e,t,r),a=Math.max(e,t,r),s=NaN,o=a-n,l=(a+n)/2;return o?(e===a?s=(t-r)/o+(t0&&l<1?0:s,new nn(s,o,l,i.opacity)}function Qx(i,e,t,r){return arguments.length===1?D0(i):new nn(i,e,t,r==null?1:r)}function nn(i,e,t,r){this.h=+i,this.s=+e,this.l=+t,this.opacity=+r}hf(nn,Qx,N0(Qo,{brighter(i){return i=i==null?vd:Math.pow(vd,i),new nn(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?jo:Math.pow(jo,i),new nn(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*e,n=2*t-r;return new Fr(Qc(i>=240?i-240:i+120,n,r),Qc(i,n,r),Qc(i<120?i+240:i-120,n,r),this.opacity)},clamp(){return new nn(qm(this.h),Gl(this.s),Gl(this.l),_d(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=_d(this.opacity);return`${i===1?"hsl(":"hsla("}${qm(this.h)}, ${Gl(this.s)*100}%, ${Gl(this.l)*100}%${i===1?")":`, ${i})`}`}}));function qm(i){return i=(i||0)%360,i<0?i+360:i}function Gl(i){return Math.max(0,Math.min(1,i||0))}function Qc(i,e,t){return(i<60?e+(t-e)*i/60:i<180?t:i<240?e+(t-e)*(240-i)/60:e)*255}const mf=i=>()=>i;function ew(i,e){return function(t){return i+t*e}}function tw(i,e,t){return i=Math.pow(i,t),e=Math.pow(e,t)-i,t=1/t,function(r){return Math.pow(i+r*e,t)}}function iw(i){return(i=+i)==1?M0:function(e,t){return t-e?tw(e,t,i):mf(isNaN(e)?t:e)}}function M0(i,e){var t=e-i;return t?ew(i,t):mf(isNaN(i)?e:i)}const bd=function i(e){var t=iw(e);function r(n,a){var s=t((n=Ru(n)).r,(a=Ru(a)).r),o=t(n.g,a.g),l=t(n.b,a.b),d=M0(n.opacity,a.opacity);return function(c){return n.r=s(c),n.g=o(c),n.b=l(c),n.opacity=d(c),n+""}}return r.gamma=i,r}(1);function rw(i,e){e||(e=[]);var t=i?Math.min(e.length,i.length):0,r=e.slice(),n;return function(a){for(n=0;nt&&(a=e.slice(t,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:rn(r,n)})),t=eu.lastIndex;return t180?c+=360:c-d>180&&(d+=360),f.push({i:u.push(n(u)+"rotate(",null,r)-2,x:rn(d,c)})):c&&u.push(n(u)+"rotate("+c+r)}function o(d,c,u,f){d!==c?f.push({i:u.push(n(u)+"skewX(",null,r)-2,x:rn(d,c)}):c&&u.push(n(u)+"skewX("+c+r)}function l(d,c,u,f,h,g){if(d!==u||c!==f){var S=h.push(n(h)+"scale(",null,",",null,")");g.push({i:S-4,x:rn(d,u)},{i:S-2,x:rn(c,f)})}else(u!==1||f!==1)&&h.push(n(h)+"scale("+u+","+f+")")}return function(d,c){var u=[],f=[];return d=i(d),c=i(c),a(d.translateX,d.translateY,c.translateX,c.translateY,u,f),s(d.rotate,c.rotate,u,f),o(d.skewX,c.skewX,u,f),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,u,f),d=c=null,function(h){for(var g=-1,S=f.length,p;++g=0&&(e=e.slice(0,t)),!e||e==="start"})}function qw(i,e,t){var r,n,a=Ww(e)?ff:xn;return function(){var s=a(this,i),o=s.on;o!==r&&(n=(r=o).copy()).on(e,t),s.on=n}}function Xw(i,e){var t=this._id;return arguments.length<2?dn(this.node(),t).on.on(i):this.each(qw(t,i,e))}function Yw(i){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==i)return;e&&e.removeChild(this)}}function Kw(){return this.on("end.remove",Yw(this._id))}function Zw(i){var e=this._name,t=this._id;typeof i!="function"&&(i=df(i));for(var r=this._groups,n=r.length,a=new Array(n),s=0;s=0&&(m|0)===m||s("invalid parameter type, ("+m+")"+l(x)+". must be a nonnegative integer")}function g(m,x,R){x.indexOf(m)<0&&s("invalid value"+l(R)+". must be one of: "+x)}var S=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function p(m){Object.keys(m).forEach(function(x){S.indexOf(x)<0&&s('invalid regl constructor argument "'+x+'". must be one of '+S)})}function b(m,x){for(m=m+"";m.length0&&x.push(new v("unknown",0,R))}}),x}function W(m,x){x.forEach(function(R){var J=m[R.file];if(J){var de=J.index[R.line];if(de){de.errors.push(R),J.hasErrors=!0;return}}m.unknown.hasErrors=!0,m.unknown.lines[0].errors.push(R)})}function he(m,x,R,J,de){if(!m.getShaderParameter(x,m.COMPILE_STATUS)){var Z=m.getShaderInfoLog(x),re=J===m.FRAGMENT_SHADER?"fragment":"vertex";ee(R,"string",re+" shader source must be a string",de);var be=I(R,de),_e=O(Z);W(be,_e),Object.keys(be).forEach(function(Ae){var Ce=be[Ae];if(!Ce.hasErrors)return;var Ie=[""],Pe=[""];function ye(Te,j){Ie.push(Te),Pe.push(j||"")}ye("file number "+Ae+": "+Ce.name+` -`,"color:red;text-decoration:underline;font-weight:bold"),Ce.lines.forEach(function(Te){if(Te.errors.length>0){ye(b(Te.number,4)+"| ","background-color:yellow; font-weight:bold"),ye(Te.line+n,"color:red; background-color:yellow; font-weight:bold");var j=0;Te.errors.forEach(function(te){var Ee=te.message,We=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Ee);if(We){var me=We[1];switch(Ee=We[2],me){case"assign":me="=";break}j=Math.max(Te.line.indexOf(me,j),0)}else j=0;ye(b("| ",6)),ye(b("^^^",j+3)+n,"font-weight:bold"),ye(b("| ",6)),ye(Ee+n,"font-weight:bold")}),ye(b("| ",6)+n)}else ye(b(Te.number,4)+"| "),ye(Te.line+n,"color:red")}),typeof document!="undefined"&&!window.chrome?(Pe[0]=Ie.join("%c"),console.log.apply(console,Pe)):console.log(Ie.join(""))}),o.raise("Error compiling "+re+" shader, "+be[0].name)}}function ne(m,x,R,J,de){if(!m.getProgramParameter(x,m.LINK_STATUS)){var Z=m.getProgramInfoLog(x),re=I(R,de),be=I(J,de),_e='Error linking program with vertex shader, "'+be[0].name+'", and fragment shader "'+re[0].name+'"';typeof document!="undefined"?console.log("%c"+_e+n+"%c"+Z,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(_e+n+Z),o.raise(_e)}}function ie(m){m._commandRef=L()}function P(m,x,R,J){ie(m);function de(_e){return _e?J.id(_e):0}m._fragId=de(m.static.frag),m._vertId=de(m.static.vert);function Z(_e,Ae){Object.keys(Ae).forEach(function(Ce){_e[J.id(Ce)]=!0})}var re=m._uniformSet={};Z(re,x.static),Z(re,x.dynamic);var be=m._attributeSet={};Z(be,R.static),Z(be,R.dynamic),m._hasCount="count"in m.static||"count"in m.dynamic||"elements"in m.static||"elements"in m.dynamic}function C(m,x){var R=z();s(m+" in command "+(x||L())+(R==="unknown"?"":" called from "+R))}function Y(m,x,R){m||C(x,R||L())}function U(m,x,R,J){m in x||C("unknown parameter ("+m+")"+l(R)+". possible values: "+Object.keys(x).join(),J||L())}function ee(m,x,R,J){u(m,x)||C("invalid parameter type"+l(R)+". expected "+x+", got "+typeof m,J||L())}function Fe(m){m()}function xe(m,x,R){m.texture?g(m.texture._texture.internalformat,x,"unsupported texture format for attachment"):g(m.renderbuffer._renderbuffer.format,R,"unsupported renderbuffer format for attachment")}var ke=33071,Ge=9728,Ye=9984,ce=9985,ft=9986,yt=9987,ot=5120,xt=5121,ge=5122,oe=5123,Qe=5124,lt=5125,we=5126,It=32819,Ct=32820,Qt=33635,ui=34042,ht=36193,Et={};Et[ot]=Et[xt]=1,Et[ge]=Et[oe]=Et[ht]=Et[Qt]=Et[It]=Et[Ct]=2,Et[Qe]=Et[lt]=Et[we]=Et[ui]=4;function ve(m,x){return m===Ct||m===It||m===Qt?2:m===ui?4:Et[m]*x}function at(m){return!(m&m-1)&&!!m}function gt(m,x,R){var J,de=x.width,Z=x.height,re=x.channels;o(de>0&&de<=R.maxTextureSize&&Z>0&&Z<=R.maxTextureSize,"invalid texture shape"),(m.wrapS!==ke||m.wrapT!==ke)&&o(at(de)&&at(Z),"incompatible wrap mode for texture, both width and height must be power of 2"),x.mipmask===1?de!==1&&Z!==1&&o(m.minFilter!==Ye&&m.minFilter!==ft&&m.minFilter!==ce&&m.minFilter!==yt,"min filter requires mipmap"):(o(at(de)&&at(Z),"texture must be a square power of 2 to support mipmapping"),o(x.mipmask===(de<<1)-1,"missing or incomplete mipmap data")),x.type===we&&(R.extensions.indexOf("oes_texture_float_linear")<0&&o(m.minFilter===Ge&&m.magFilter===Ge,"filter not supported, must enable oes_texture_float_linear"),o(!m.genMipmaps,"mipmap generation not supported with float textures"));var be=x.images;for(J=0;J<16;++J)if(be[J]){var _e=de>>J,Ae=Z>>J;o(x.mipmask&1<0&&de<=J.maxTextureSize&&Z>0&&Z<=J.maxTextureSize,"invalid texture shape"),o(de===Z,"cube map must be square"),o(x.wrapS===ke&&x.wrapT===ke,"wrap mode not supported by cube map");for(var be=0;be>Ce,ye=Z>>Ce;o(_e.mipmask&1<1&&x===R&&(x==='"'||x==="'"))return['"'+pe(m.substr(1,m.length-2))+'"'];var J=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(m);if(J)return ae(m.substr(0,J.index)).concat(ae(J[1])).concat(ae(m.substr(J.index+J[0].length)));var de=m.split(".");if(de.length===1)return['"'+pe(m)+'"'];for(var Z=[],re=0;re0,"invalid pixel ratio"))):E.raise("invalid arguments to regl"),R&&(R.nodeName.toLowerCase()==="canvas"?de=R:J=R),!Z){if(!de){E(typeof document!="undefined","must manually specify webgl context outside of DOM environments");var ye=Ti(J||document.body,Ie,Ae);if(!ye)return null;de=ye.canvas,Pe=ye.onDestroy}re.premultipliedAlpha===void 0&&(re.premultipliedAlpha=!0),Z=si(de,re)}return Z?{gl:Z,canvas:de,container:J,extensions:be,optionalExtensions:_e,pixelRatio:Ae,profile:Ce,onDone:Ie,onDestroy:Pe}:(Pe(),Ie("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function qn(m,x){var R={};function J(re){E.type(re,"string","extension name must be string");var be=re.toLowerCase(),_e;try{_e=R[be]=m.getExtension(be)}catch(Ae){}return!!_e}for(var de=0;de65535)<<4,m>>>=x,R=(m>255)<<3,m>>>=R,x|=R,R=(m>15)<<2,m>>>=R,x|=R,R=(m>3)<<1,m>>>=R,x|=R,x|m>>1}function ll(){var m=fi(8,function(){return[]});function x(Z){var re=sl(Z),be=m[ol(re)>>2];return be.length>0?be.pop():new ArrayBuffer(re)}function R(Z){m[ol(Z.byteLength)>>2].push(Z)}function J(Z,re){var be=null;switch(Z){case ga:be=new Int8Array(x(re),0,re);break;case pr:be=new Uint8Array(x(re),0,re);break;case Ki:be=new Int16Array(x(2*re),0,re);break;case tc:be=new Uint16Array(x(2*re),0,re);break;case Zs:be=new Int32Array(x(4*re),0,re);break;case al:be=new Uint32Array(x(4*re),0,re);break;case ic:be=new Float32Array(x(4*re),0,re);break;default:return null}return be.length!==re?be.subarray(0,re):be}function de(Z){R(Z.buffer)}return{alloc:x,free:R,allocType:J,freeType:de}}var yi=ll();yi.zero=ll();var rt=3408,Mt=3410,Vt=3411,zi=3412,Bt=3413,Rt=3414,qt=3415,oi=33901,Zi=33902,tr=3379,ir=3386,In=34921,jr=36347,Xn=36348,Ya=35661,Cn=35660,kn=34930,Js=36349,Kr=34076,dl=34024,w_=7936,S_=7937,E_=7938,T_=35724,A_=34047,I_=36063,C_=34852,cl=3553,zf=34067,k_=34069,$_=33984,Qs=6408,rc=5126,Bf=5121,nc=36160,L_=36053,O_=36064,R_=16384,P_=function(m,x){var R=1;x.ext_texture_filter_anisotropic&&(R=m.getParameter(A_));var J=1,de=1;x.webgl_draw_buffers&&(J=m.getParameter(C_),de=m.getParameter(I_));var Z=!!x.oes_texture_float;if(Z){var re=m.createTexture();m.bindTexture(cl,re),m.texImage2D(cl,0,Qs,1,1,0,Qs,rc,null);var be=m.createFramebuffer();if(m.bindFramebuffer(nc,be),m.framebufferTexture2D(nc,O_,cl,re,0),m.bindTexture(cl,null),m.checkFramebufferStatus(nc)!==L_)Z=!1;else{m.viewport(0,0,1,1),m.clearColor(1,0,0,1),m.clear(R_);var _e=yi.allocType(rc,4);m.readPixels(0,0,1,1,Qs,rc,_e),m.getError()?Z=!1:(m.deleteFramebuffer(be),m.deleteTexture(re),Z=_e[0]===1),yi.freeType(_e)}}var Ae=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ce=!0;if(!Ae){var Ie=m.createTexture(),Pe=yi.allocType(Bf,36);m.activeTexture($_),m.bindTexture(zf,Ie),m.texImage2D(k_,0,Qs,3,3,0,Qs,Bf,Pe),yi.freeType(Pe),m.bindTexture(zf,null),m.deleteTexture(Ie),Ce=!m.getError()}return{colorBits:[m.getParameter(Mt),m.getParameter(Vt),m.getParameter(zi),m.getParameter(Bt)],depthBits:m.getParameter(Rt),stencilBits:m.getParameter(qt),subpixelBits:m.getParameter(rt),extensions:Object.keys(x).filter(function(ye){return!!x[ye]}),maxAnisotropic:R,maxDrawbuffers:J,maxColorAttachments:de,pointSizeDims:m.getParameter(oi),lineWidthDims:m.getParameter(Zi),maxViewportDims:m.getParameter(ir),maxCombinedTextureUnits:m.getParameter(Ya),maxCubeMapSize:m.getParameter(Kr),maxRenderbufferSize:m.getParameter(dl),maxTextureUnits:m.getParameter(kn),maxTextureSize:m.getParameter(tr),maxAttributes:m.getParameter(In),maxVertexUniforms:m.getParameter(jr),maxVertexTextureUnits:m.getParameter(Cn),maxVaryingVectors:m.getParameter(Xn),maxFragmentUniforms:m.getParameter(Js),glsl:m.getParameter(T_),renderer:m.getParameter(S_),vendor:m.getParameter(w_),version:m.getParameter(E_),readFloat:Z,npotTextureCube:Ce}};function Zr(m){return!!m&&typeof m=="object"&&Array.isArray(m.shape)&&Array.isArray(m.stride)&&typeof m.offset=="number"&&m.shape.length===m.stride.length&&(Array.isArray(m.data)||t(m.data))}var Br=function(m){return Object.keys(m).map(function(x){return m[x]})},ul={shape:M_,flatten:D_};function F_(m,x,R){for(var J=0;J0){var st;if(Array.isArray(te[0])){ze=jf(te);for(var ue=1,le=1;le0)if(typeof ue[0]=="number"){var Se=yi.allocType(me.dtype,ue.length);Vf(Se,ue),ze(Se,Ke),yi.freeType(Se)}else if(Array.isArray(ue[0])||t(ue[0])){Ne=jf(ue);var De=sc(ue,Ne,me.dtype);ze(De,Ke),yi.freeType(De)}else E.raise("invalid buffer data")}else if(Zr(ue)){Ne=ue.shape;var Me=ue.stride,Tt=0,bt=0,Be=0,Ve=0;Ne.length===1?(Tt=Ne[0],bt=1,Be=Me[0],Ve=0):Ne.length===2?(Tt=Ne[0],bt=Ne[1],Be=Me[0],Ve=Me[1]):E.raise("invalid shape");var mt=Array.isArray(ue.data)?me.dtype:hl(ue.data),wt=yi.allocType(mt,Tt*bt);Wf(wt,ue.data,Tt,bt,Be,Ve,ue.offset),ze(wt,Ke),yi.freeType(wt)}else E.raise("invalid data for buffer subdata");return He}return Ee||He(j),He._reglType="buffer",He._buffer=me,He.subdata=st,R.profile&&(He.stats=me.stats),He.destroy=function(){Pe(me)},He}function Te(){Br(Z).forEach(function(j){j.buffer=m.createBuffer(),m.bindBuffer(j.type,j.buffer),m.bufferData(j.type,j.persistentData||j.byteLength,j.usage)})}return R.profile&&(x.getTotalBufferSize=function(){var j=0;return Object.keys(Z).forEach(function(te){j+=Z[te].stats.size}),j}),{create:ye,createStream:_e,destroyStream:Ae,clear:function(){Br(Z).forEach(Pe),be.forEach(Pe)},getBuffer:function(j){return j&&j._buffer instanceof re?j._buffer:null},restore:Te,_initBuffer:Ie}}var Z_=0,J_=0,Q_=1,e1=1,t1=4,i1=4,Kn={points:Z_,point:J_,lines:Q_,line:e1,triangles:t1,triangle:i1,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},r1=0,n1=1,eo=4,a1=5120,Ka=5121,qf=5122,Za=5123,Xf=5124,_a=5125,dc=34963,s1=35040,o1=35044;function l1(m,x,R,J){var de={},Z=0,re={uint8:Ka,uint16:Za};x.oes_element_index_uint&&(re.uint32=_a);function be(Te){this.id=Z++,de[this.id]=this,this.buffer=Te,this.primType=eo,this.vertCount=0,this.type=0}be.prototype.bind=function(){this.buffer.bind()};var _e=[];function Ae(Te){var j=_e.pop();return j||(j=new be(R.create(null,dc,!0,!1)._buffer)),Ie(j,Te,s1,-1,-1,0,0),j}function Ce(Te){_e.push(Te)}function Ie(Te,j,te,Ee,We,me,He){Te.buffer.bind();var ze;if(j){var st=He;!He&&(!t(j)||Zr(j)&&!t(j.data))&&(st=x.oes_element_index_uint?_a:Za),R._initBuffer(Te.buffer,j,te,st,3)}else m.bufferData(dc,me,te),Te.buffer.dtype=ze||Ka,Te.buffer.usage=te,Te.buffer.dimension=3,Te.buffer.byteLength=me;if(ze=He,!He){switch(Te.buffer.dtype){case Ka:case a1:ze=Ka;break;case Za:case qf:ze=Za;break;case _a:case Xf:ze=_a;break;default:E.raise("unsupported type for element array")}Te.buffer.dtype=ze}Te.type=ze,E(ze!==_a||!!x.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var ue=We;ue<0&&(ue=Te.buffer.byteLength,ze===Za?ue>>=1:ze===_a&&(ue>>=2)),Te.vertCount=ue;var le=Ee;if(Ee<0){le=eo;var Ke=Te.buffer.dimension;Ke===1&&(le=r1),Ke===2&&(le=n1),Ke===3&&(le=eo)}Te.primType=le}function Pe(Te){J.elementsCount--,E(Te.buffer!==null,"must not double destroy elements"),delete de[Te.id],Te.buffer.destroy(),Te.buffer=null}function ye(Te,j){var te=R.create(null,dc,!0),Ee=new be(te._buffer);J.elementsCount++;function We(me){if(!me)te(),Ee.primType=eo,Ee.vertCount=0,Ee.type=Ka;else if(typeof me=="number")te(me),Ee.primType=eo,Ee.vertCount=me|0,Ee.type=Ka;else{var He=null,ze=o1,st=-1,ue=-1,le=0,Ke=0;Array.isArray(me)||t(me)||Zr(me)?He=me:(E.type(me,"object","invalid arguments for elements"),"data"in me&&(He=me.data,E(Array.isArray(He)||t(He)||Zr(He),"invalid data for element buffer")),"usage"in me&&(E.parameter(me.usage,fl,"invalid element buffer usage"),ze=fl[me.usage]),"primitive"in me&&(E.parameter(me.primitive,Kn,"invalid element buffer primitive"),st=Kn[me.primitive]),"count"in me&&(E(typeof me.count=="number"&&me.count>=0,"invalid vertex count for elements"),ue=me.count|0),"type"in me&&(E.parameter(me.type,re,"invalid buffer type"),Ke=re[me.type]),"length"in me?le=me.length|0:(le=ue,Ke===Za||Ke===qf?le*=2:(Ke===_a||Ke===Xf)&&(le*=4))),Ie(Ee,He,ze,st,ue,le,Ke)}return We}return We(Te),We._reglType="elements",We._elements=Ee,We.subdata=function(me,He){return te.subdata(me,He),We},We.destroy=function(){Pe(Ee)},We}return{create:ye,createStream:Ae,destroyStream:Ce,getElements:function(Te){return typeof Te=="function"&&Te._elements instanceof be?Te._elements:null},clear:function(){Br(de).forEach(Pe)}}}var Yf=new Float32Array(1),d1=new Uint32Array(Yf.buffer),c1=5123;function Kf(m){for(var x=yi.allocType(c1,m.length),R=0;R>>31<<15,Z=(J<<1>>>24)-127,re=J>>13&1023;if(Z<-24)x[R]=de;else if(Z<-14){var be=-14-Z;x[R]=de+(re+1024>>be)}else Z>15?x[R]=de+31744:x[R]=de+(Z+15<<10)+re}return x}function ki(m){return Array.isArray(m)||t(m)}var Zf=function(m){return!(m&m-1)&&!!m},u1=34467,cn=3553,cc=34067,ml=34069,ba=6408,uc=6406,pl=6407,to=6409,gl=6410,Jf=32854,fc=32855,Qf=36194,f1=32819,h1=32820,m1=33635,p1=34042,hc=6402,vl=34041,mc=35904,pc=35906,Ja=36193,gc=33776,vc=33777,_c=33778,bc=33779,eh=35986,th=35987,ih=34798,rh=35840,nh=35841,ah=35842,sh=35843,oh=36196,Qa=5121,yc=5123,xc=5125,io=5126,g1=10242,v1=10243,_1=10497,wc=33071,b1=33648,y1=10240,x1=10241,Sc=9728,w1=9729,Ec=9984,lh=9985,dh=9986,Tc=9987,S1=33170,_l=4352,E1=4353,T1=4354,A1=34046,I1=3317,C1=37440,k1=37441,$1=37443,ch=37444,ro=33984,L1=[Ec,dh,lh,Tc],bl=[0,to,gl,pl,ba],Hr={};Hr[to]=Hr[uc]=Hr[hc]=1,Hr[vl]=Hr[gl]=2,Hr[pl]=Hr[mc]=3,Hr[ba]=Hr[pc]=4;function es(m){return"[object "+m+"]"}var uh=es("HTMLCanvasElement"),fh=es("OffscreenCanvas"),hh=es("CanvasRenderingContext2D"),mh=es("ImageBitmap"),ph=es("HTMLImageElement"),gh=es("HTMLVideoElement"),O1=Object.keys(ac).concat([uh,fh,hh,mh,ph,gh]),ts=[];ts[Qa]=1,ts[io]=4,ts[Ja]=2,ts[yc]=2,ts[xc]=4;var cr=[];cr[Jf]=2,cr[fc]=2,cr[Qf]=2,cr[vl]=4,cr[gc]=.5,cr[vc]=.5,cr[_c]=1,cr[bc]=1,cr[eh]=.5,cr[th]=1,cr[ih]=1,cr[rh]=.5,cr[nh]=.25,cr[ah]=.5,cr[sh]=.25,cr[oh]=.5;function vh(m){return Array.isArray(m)&&(m.length===0||typeof m[0]=="number")}function _h(m){if(!Array.isArray(m))return!1;var x=m.length;return!(x===0||!ki(m[0]))}function ya(m){return Object.prototype.toString.call(m)}function bh(m){return ya(m)===uh}function yh(m){return ya(m)===fh}function R1(m){return ya(m)===hh}function P1(m){return ya(m)===mh}function F1(m){return ya(m)===ph}function N1(m){return ya(m)===gh}function Ac(m){if(!m)return!1;var x=ya(m);return O1.indexOf(x)>=0?!0:vh(m)||_h(m)||Zr(m)}function xh(m){return ac[Object.prototype.toString.call(m)]|0}function D1(m,x){var R=x.length;switch(m.type){case Qa:case yc:case xc:case io:var J=yi.allocType(m.type,R);J.set(x),m.data=J;break;case Ja:m.data=Kf(x);break;default:E.raise("unsupported texture type, must specify a typed array")}}function wh(m,x){return yi.allocType(m.type===Ja?io:m.type,x)}function Sh(m,x){m.type===Ja?(m.data=Kf(x),yi.freeType(x)):m.data=x}function M1(m,x,R,J,de,Z){for(var re=m.width,be=m.height,_e=m.channels,Ae=re*be*_e,Ce=wh(m,Ae),Ie=0,Pe=0;Pe=1;)be+=re*_e*_e,_e/=2;return be}else return re*R*J}function z1(m,x,R,J,de,Z,re){var be={"don't care":_l,"dont care":_l,nice:T1,fast:E1},_e={repeat:_1,clamp:wc,mirror:b1},Ae={nearest:Sc,linear:w1},Ce=r({mipmap:Tc,"nearest mipmap nearest":Ec,"linear mipmap nearest":lh,"nearest mipmap linear":dh,"linear mipmap linear":Tc},Ae),Ie={none:0,browser:ch},Pe={uint8:Qa,rgba4:f1,rgb565:m1,"rgb5 a1":h1},ye={alpha:uc,luminance:to,"luminance alpha":gl,rgb:pl,rgba:ba,rgba4:Jf,"rgb5 a1":fc,rgb565:Qf},Te={};x.ext_srgb&&(ye.srgb=mc,ye.srgba=pc),x.oes_texture_float&&(Pe.float32=Pe.float=io),x.oes_texture_half_float&&(Pe.float16=Pe["half float"]=Ja),x.webgl_depth_texture&&(r(ye,{depth:hc,"depth stencil":vl}),r(Pe,{uint16:yc,uint32:xc,"depth stencil":p1})),x.webgl_compressed_texture_s3tc&&r(Te,{"rgb s3tc dxt1":gc,"rgba s3tc dxt1":vc,"rgba s3tc dxt3":_c,"rgba s3tc dxt5":bc}),x.webgl_compressed_texture_atc&&r(Te,{"rgb atc":eh,"rgba atc explicit alpha":th,"rgba atc interpolated alpha":ih}),x.webgl_compressed_texture_pvrtc&&r(Te,{"rgb pvrtc 4bppv1":rh,"rgb pvrtc 2bppv1":nh,"rgba pvrtc 4bppv1":ah,"rgba pvrtc 2bppv1":sh}),x.webgl_compressed_texture_etc1&&(Te["rgb etc1"]=oh);var j=Array.prototype.slice.call(m.getParameter(u1));Object.keys(Te).forEach(function($){var Q=Te[$];j.indexOf(Q)>=0&&(ye[$]=Q)});var te=Object.keys(ye);R.textureFormats=te;var Ee=[];Object.keys(ye).forEach(function($){var Q=ye[$];Ee[Q]=$});var We=[];Object.keys(Pe).forEach(function($){var Q=Pe[$];We[Q]=$});var me=[];Object.keys(Ae).forEach(function($){var Q=Ae[$];me[Q]=$});var He=[];Object.keys(Ce).forEach(function($){var Q=Ce[$];He[Q]=$});var ze=[];Object.keys(_e).forEach(function($){var Q=_e[$];ze[Q]=$});var st=te.reduce(function($,Q){var X=ye[Q];return X===to||X===uc||X===to||X===gl||X===hc||X===vl||x.ext_srgb&&(X===mc||X===pc)?$[X]=X:X===fc||Q.indexOf("rgba")>=0?$[X]=ba:$[X]=pl,$},{});function ue(){this.internalformat=ba,this.format=ba,this.type=Qa,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ch,this.width=0,this.height=0,this.channels=0}function le($,Q){$.internalformat=Q.internalformat,$.format=Q.format,$.type=Q.type,$.compressed=Q.compressed,$.premultiplyAlpha=Q.premultiplyAlpha,$.flipY=Q.flipY,$.unpackAlignment=Q.unpackAlignment,$.colorSpace=Q.colorSpace,$.width=Q.width,$.height=Q.height,$.channels=Q.channels}function Ke($,Q){if(!(typeof Q!="object"||!Q)){if("premultiplyAlpha"in Q&&(E.type(Q.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),$.premultiplyAlpha=Q.premultiplyAlpha),"flipY"in Q&&(E.type(Q.flipY,"boolean","invalid texture flip"),$.flipY=Q.flipY),"alignment"in Q&&(E.oneOf(Q.alignment,[1,2,4,8],"invalid texture unpack alignment"),$.unpackAlignment=Q.alignment),"colorSpace"in Q&&(E.parameter(Q.colorSpace,Ie,"invalid colorSpace"),$.colorSpace=Ie[Q.colorSpace]),"type"in Q){var X=Q.type;E(x.oes_texture_float||!(X==="float"||X==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),E(x.oes_texture_half_float||!(X==="half float"||X==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),E(x.webgl_depth_texture||!(X==="uint16"||X==="uint32"||X==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(X,Pe,"invalid texture type"),$.type=Pe[X]}var Xe=$.width,$t=$.height,A=$.channels,_=!1;"shape"in Q?(E(Array.isArray(Q.shape)&&Q.shape.length>=2,"shape must be an array"),Xe=Q.shape[0],$t=Q.shape[1],Q.shape.length===3&&(A=Q.shape[2],E(A>0&&A<=4,"invalid number of channels"),_=!0),E(Xe>=0&&Xe<=R.maxTextureSize,"invalid width"),E($t>=0&&$t<=R.maxTextureSize,"invalid height")):("radius"in Q&&(Xe=$t=Q.radius,E(Xe>=0&&Xe<=R.maxTextureSize,"invalid radius")),"width"in Q&&(Xe=Q.width,E(Xe>=0&&Xe<=R.maxTextureSize,"invalid width")),"height"in Q&&($t=Q.height,E($t>=0&&$t<=R.maxTextureSize,"invalid height")),"channels"in Q&&(A=Q.channels,E(A>0&&A<=4,"invalid number of channels"),_=!0)),$.width=Xe|0,$.height=$t|0,$.channels=A|0;var N=!1;if("format"in Q){var G=Q.format;E(x.webgl_depth_texture||!(G==="depth"||G==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(G,ye,"invalid texture format");var V=$.internalformat=ye[G];$.format=st[V],G in Pe&&("type"in Q||($.type=Pe[G])),G in Te&&($.compressed=!0),N=!0}!_&&N?$.channels=Hr[$.format]:_&&!N?$.channels!==bl[$.format]&&($.format=$.internalformat=bl[$.channels]):N&&_&&E($.channels===Hr[$.format],"number of channels inconsistent with specified format")}}function Ne($){m.pixelStorei(C1,$.flipY),m.pixelStorei(k1,$.premultiplyAlpha),m.pixelStorei($1,$.colorSpace),m.pixelStorei(I1,$.unpackAlignment)}function Se(){ue.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function De($,Q){var X=null;if(Ac(Q)?X=Q:Q&&(E.type(Q,"object","invalid pixel data type"),Ke($,Q),"x"in Q&&($.xOffset=Q.x|0),"y"in Q&&($.yOffset=Q.y|0),Ac(Q.data)&&(X=Q.data)),E(!$.compressed||X instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),Q.copy){E(!X,"can not specify copy and data field for the same texture");var Xe=de.viewportWidth,$t=de.viewportHeight;$.width=$.width||Xe-$.xOffset,$.height=$.height||$t-$.yOffset,$.needsCopy=!0,E($.xOffset>=0&&$.xOffset=0&&$.yOffset<$t&&$.width>0&&$.width<=Xe&&$.height>0&&$.height<=$t,"copy texture read out of bounds")}else if(!X)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(t(X))$.channels=$.channels||4,$.data=X,!("type"in Q)&&$.type===Qa&&($.type=xh(X));else if(vh(X))$.channels=$.channels||4,D1($,X),$.alignment=1,$.needsFree=!0;else if(Zr(X)){var A=X.data;!Array.isArray(A)&&$.type===Qa&&($.type=xh(A));var _=X.shape,N=X.stride,G,V,M,D,B,w;_.length===3?(M=_[2],w=N[2]):(E(_.length===2,"invalid ndarray pixel data, must be 2 or 3D"),M=1,w=1),G=_[0],V=_[1],D=N[0],B=N[1],$.alignment=1,$.width=G,$.height=V,$.channels=M,$.format=$.internalformat=bl[M],$.needsFree=!0,M1($,A,D,B,w,X.offset)}else if(bh(X)||yh(X)||R1(X))bh(X)||yh(X)?$.element=X:$.element=X.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(P1(X))$.element=X,$.width=X.width,$.height=X.height,$.channels=4;else if(F1(X))$.element=X,$.width=X.naturalWidth,$.height=X.naturalHeight,$.channels=4;else if(N1(X))$.element=X,$.width=X.videoWidth,$.height=X.videoHeight,$.channels=4;else if(_h(X)){var F=$.width||X[0].length,k=$.height||X.length,H=$.channels;ki(X[0][0])?H=H||X[0][0].length:H=H||1;for(var q=ul.shape(X),fe=1,Oe=0;Oe=0,"oes_texture_float extension not enabled"):$.type===Ja&&E(R.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function Me($,Q,X){var Xe=$.element,$t=$.data,A=$.internalformat,_=$.format,N=$.type,G=$.width,V=$.height;Ne($),Xe?m.texImage2D(Q,X,_,_,N,Xe):$.compressed?m.compressedTexImage2D(Q,X,A,G,V,0,$t):$.needsCopy?(J(),m.copyTexImage2D(Q,X,_,$.xOffset,$.yOffset,G,V,0)):m.texImage2D(Q,X,_,G,V,0,_,N,$t||null)}function Tt($,Q,X,Xe,$t){var A=$.element,_=$.data,N=$.internalformat,G=$.format,V=$.type,M=$.width,D=$.height;Ne($),A?m.texSubImage2D(Q,$t,X,Xe,G,V,A):$.compressed?m.compressedTexSubImage2D(Q,$t,X,Xe,N,M,D,_):$.needsCopy?(J(),m.copyTexSubImage2D(Q,$t,X,Xe,$.xOffset,$.yOffset,M,D)):m.texSubImage2D(Q,$t,X,Xe,M,D,G,V,_)}var bt=[];function Be(){return bt.pop()||new Se}function Ve($){$.needsFree&&yi.freeType($.data),Se.call($),bt.push($)}function mt(){ue.call(this),this.genMipmaps=!1,this.mipmapHint=_l,this.mipmask=0,this.images=Array(16)}function wt($,Q,X){var Xe=$.images[0]=Be();$.mipmask=1,Xe.width=$.width=Q,Xe.height=$.height=X,Xe.channels=$.channels=4}function Lt($,Q){var X=null;if(Ac(Q))X=$.images[0]=Be(),le(X,$),De(X,Q),$.mipmask=1;else if(Ke($,Q),Array.isArray(Q.mipmap))for(var Xe=Q.mipmap,$t=0;$t>=$t,X.height>>=$t,De(X,Xe[$t]),$.mipmask|=1<<$t;else X=$.images[0]=Be(),le(X,$),De(X,Q),$.mipmask=1;le($,$.images[0]),$.compressed&&($.internalformat===gc||$.internalformat===vc||$.internalformat===_c||$.internalformat===bc)&&E($.width%4===0&&$.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function vi($,Q){for(var X=$.images,Xe=0;Xe=0&&!("faces"in Q)&&($.genMipmaps=!0)}if("mag"in Q){var Xe=Q.mag;E.parameter(Xe,Ae),$.magFilter=Ae[Xe]}var $t=$.wrapS,A=$.wrapT;if("wrap"in Q){var _=Q.wrap;typeof _=="string"?(E.parameter(_,_e),$t=A=_e[_]):Array.isArray(_)&&(E.parameter(_[0],_e),E.parameter(_[1],_e),$t=_e[_[0]],A=_e[_[1]])}else{if("wrapS"in Q){var N=Q.wrapS;E.parameter(N,_e),$t=_e[N]}if("wrapT"in Q){var G=Q.wrapT;E.parameter(G,_e),A=_e[G]}}if($.wrapS=$t,$.wrapT=A,"anisotropic"in Q){var V=Q.anisotropic;E(typeof V=="number"&&V>=1&&V<=R.maxAnisotropic,"aniso samples must be between 1 and "),$.anisotropic=Q.anisotropic}if("mipmap"in Q){var M=!1;switch(typeof Q.mipmap){case"string":E.parameter(Q.mipmap,be,"invalid mipmap hint"),$.mipmapHint=be[Q.mipmap],$.genMipmaps=!0,M=!0;break;case"boolean":M=$.genMipmaps=Q.mipmap;break;case"object":E(Array.isArray(Q.mipmap),"invalid mipmap type"),$.genMipmaps=!1,M=!0;break;default:E.raise("invalid mipmap type")}M&&!("min"in Q)&&($.minFilter=Ec)}}function Ui($,Q){m.texParameteri(Q,x1,$.minFilter),m.texParameteri(Q,y1,$.magFilter),m.texParameteri(Q,g1,$.wrapS),m.texParameteri(Q,v1,$.wrapT),x.ext_texture_filter_anisotropic&&m.texParameteri(Q,A1,$.anisotropic),$.genMipmaps&&(m.hint(S1,$.mipmapHint),m.generateMipmap(Q))}var Gi=0,rr={},ur=R.maxTextureUnits,$i=Array(ur).map(function(){return null});function At($){ue.call(this),this.mipmask=0,this.internalformat=ba,this.id=Gi++,this.refCount=1,this.target=$,this.texture=m.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new li,re.profile&&(this.stats={size:0})}function fr($){m.activeTexture(ro),m.bindTexture($.target,$.texture)}function Gt(){var $=$i[0];$?m.bindTexture($.target,$.texture):m.bindTexture(cn,null)}function ut($){var Q=$.texture;E(Q,"must not double destroy texture");var X=$.unit,Xe=$.target;X>=0&&(m.activeTexture(ro+X),m.bindTexture(Xe,null),$i[X]=null),m.deleteTexture(Q),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete rr[$.id],Z.textureCount--}r(At.prototype,{bind:function(){var $=this;$.bindCount+=1;var Q=$.unit;if(Q<0){for(var X=0;X0)continue;Xe.unit=-1}$i[X]=$,Q=X;break}Q>=ur&&E.raise("insufficient number of texture units"),re.profile&&Z.maxTextureUnits>B)-M,w.height=w.height||(X.height>>B)-D,E(X.type===w.type&&X.format===w.format&&X.internalformat===w.internalformat,"incompatible format for texture.subimage"),E(M>=0&&D>=0&&M+w.width<=X.width&&D+w.height<=X.height,"texture.subimage write out of bounds"),E(X.mipmask&1<>M;++M){var D=G>>M,B=V>>M;if(!D||!B)break;m.texImage2D(cn,M,X.format,D,B,0,X.format,X.type,null)}return Gt(),re.profile&&(X.stats.size=yl(X.internalformat,X.type,G,V,!1,!1)),Xe}return Xe($,Q),Xe.subimage=$t,Xe.resize=A,Xe._reglType="texture2d",Xe._texture=X,re.profile&&(Xe.stats=X.stats),Xe.destroy=function(){X.decRef()},Xe}function Dt($,Q,X,Xe,$t,A){var _=new At(cc);rr[_.id]=_,Z.cubeCount++;var N=new Array(6);function G(D,B,w,F,k,H){var q,fe=_.texInfo;for(li.call(fe),q=0;q<6;++q)N[q]=Pt();if(typeof D=="number"||!D){var Oe=D|0||1;for(q=0;q<6;++q)wt(N[q],Oe,Oe)}else if(typeof D=="object")if(B)Lt(N[0],D),Lt(N[1],B),Lt(N[2],w),Lt(N[3],F),Lt(N[4],k),Lt(N[5],H);else if(Di(fe,D),Ke(_,D),"faces"in D){var Re=D.faces;for(E(Array.isArray(Re)&&Re.length===6,"cube faces must be a length 6 array"),q=0;q<6;++q)E(typeof Re[q]=="object"&&!!Re[q],"invalid input for cube map face"),le(N[q],_),Lt(N[q],Re[q])}else for(q=0;q<6;++q)Lt(N[q],D);else E.raise("invalid arguments to cube map");for(le(_,N[0]),E.optional(function(){R.npotTextureCube||E(Zf(_.width)&&Zf(_.height),"your browser does not support non power or two texture dimensions")}),fe.genMipmaps?_.mipmask=(N[0].width<<1)-1:_.mipmask=N[0].mipmask,E.textureCube(_,fe,N,R),_.internalformat=N[0].internalformat,G.width=N[0].width,G.height=N[0].height,fr(_),q=0;q<6;++q)vi(N[q],ml+q);for(Ui(fe,cc),Gt(),re.profile&&(_.stats.size=yl(_.internalformat,_.type,G.width,G.height,fe.genMipmaps,!0)),G.format=Ee[_.internalformat],G.type=We[_.type],G.mag=me[fe.magFilter],G.min=He[fe.minFilter],G.wrapS=ze[fe.wrapS],G.wrapT=ze[fe.wrapT],q=0;q<6;++q)Bi(N[q]);return G}function V(D,B,w,F,k){E(!!B,"must specify image data"),E(typeof D=="number"&&D===(D|0)&&D>=0&&D<6,"invalid face");var H=w|0,q=F|0,fe=k|0,Oe=Be();return le(Oe,_),Oe.width=0,Oe.height=0,De(Oe,B),Oe.width=Oe.width||(_.width>>fe)-H,Oe.height=Oe.height||(_.height>>fe)-q,E(_.type===Oe.type&&_.format===Oe.format&&_.internalformat===Oe.internalformat,"incompatible format for texture.subimage"),E(H>=0&&q>=0&&H+Oe.width<=_.width&&q+Oe.height<=_.height,"texture.subimage write out of bounds"),E(_.mipmask&1<>F;++F)m.texImage2D(ml+w,F,_.format,B>>F,B>>F,0,_.format,_.type,null);return Gt(),re.profile&&(_.stats.size=yl(_.internalformat,_.type,G.width,G.height,!1,!0)),G}}return G($,Q,X,Xe,$t,A),G.subimage=V,G.resize=M,G._reglType="textureCube",G._texture=_,re.profile&&(G.stats=_.stats),G.destroy=function(){_.decRef()},G}function Li(){for(var $=0;$>Xe,X.height>>Xe,0,X.internalformat,X.type,null);else for(var $t=0;$t<6;++$t)m.texImage2D(ml+$t,Xe,X.internalformat,X.width>>Xe,X.height>>Xe,0,X.internalformat,X.type,null);Ui(X.texInfo,X.target)})}function Ia(){for(var $=0;$=2,"invalid renderbuffer shape"),He=le[0]|0,ze=le[1]|0}else"radius"in ue&&(He=ze=ue.radius|0),"width"in ue&&(He=ue.width|0),"height"in ue&&(ze=ue.height|0);"format"in ue&&(E.parameter(ue.format,Z,"invalid renderbuffer format"),st=Z[ue.format])}else typeof We=="number"?(He=We|0,typeof me=="number"?ze=me|0:ze=He):We?E.raise("invalid arguments to renderbuffer constructor"):He=ze=1;if(E(He>0&&ze>0&&He<=R.maxRenderbufferSize&&ze<=R.maxRenderbufferSize,"invalid renderbuffer size"),!(He===j.width&&ze===j.height&&st===j.format))return te.width=j.width=He,te.height=j.height=ze,j.format=st,m.bindRenderbuffer(Zn,j.renderbuffer),m.renderbufferStorage(Zn,st,He,ze),E(m.getError()===0,"invalid render buffer format"),de.profile&&(j.stats.size=Rh(j.format,j.width,j.height)),te.format=re[j.format],te}function Ee(We,me){var He=We|0,ze=me|0||He;return He===j.width&&ze===j.height||(E(He>0&&ze>0&&He<=R.maxRenderbufferSize&&ze<=R.maxRenderbufferSize,"invalid renderbuffer size"),te.width=j.width=He,te.height=j.height=ze,m.bindRenderbuffer(Zn,j.renderbuffer),m.renderbufferStorage(Zn,j.format,He,ze),E(m.getError()===0,"invalid render buffer format"),de.profile&&(j.stats.size=Rh(j.format,j.width,j.height))),te}return te(ye,Te),te.resize=Ee,te._reglType="renderbuffer",te._renderbuffer=j,de.profile&&(te.stats=j.stats),te.destroy=function(){j.decRef()},te}de.profile&&(J.getTotalRenderbufferSize=function(){var ye=0;return Object.keys(_e).forEach(function(Te){ye+=_e[Te].stats.size}),ye});function Pe(){Br(_e).forEach(function(ye){ye.renderbuffer=m.createRenderbuffer(),m.bindRenderbuffer(Zn,ye.renderbuffer),m.renderbufferStorage(Zn,ye.format,ye.width,ye.height)}),m.bindRenderbuffer(Zn,null)}return{create:Ie,clear:function(){Br(_e).forEach(Ce)},restore:Pe}},$n=36160,Ic=36161,xa=3553,wl=34069,Ph=36064,Fh=36096,Nh=36128,Dh=33306,Mh=36053,U1=36054,G1=36055,j1=36057,H1=36061,V1=36193,W1=5121,q1=5126,zh=6407,Bh=6408,X1=6402,Y1=[zh,Bh],Cc=[];Cc[Bh]=4,Cc[zh]=3;var Sl=[];Sl[W1]=1,Sl[q1]=4,Sl[V1]=2;var K1=32854,Z1=32855,J1=36194,Q1=33189,eb=36168,Uh=34041,tb=35907,ib=34836,rb=34842,nb=34843,ab=[K1,Z1,J1,tb,rb,nb,ib],is={};is[Mh]="complete",is[U1]="incomplete attachment",is[j1]="incomplete dimensions",is[G1]="incomplete, missing attachment",is[H1]="unsupported";function sb(m,x,R,J,de,Z){var re={cur:null,next:null,dirty:!1,setFBO:null},be=["rgba"],_e=["rgba4","rgb565","rgb5 a1"];x.ext_srgb&&_e.push("srgba"),x.ext_color_buffer_half_float&&_e.push("rgba16f","rgb16f"),x.webgl_color_buffer_float&&_e.push("rgba32f");var Ae=["uint8"];x.oes_texture_half_float&&Ae.push("half float","float16"),x.oes_texture_float&&Ae.push("float","float32");function Ce(Se,De,Me){this.target=Se,this.texture=De,this.renderbuffer=Me;var Tt=0,bt=0;De?(Tt=De.width,bt=De.height):Me&&(Tt=Me.width,bt=Me.height),this.width=Tt,this.height=bt}function Ie(Se){Se&&(Se.texture&&Se.texture._texture.decRef(),Se.renderbuffer&&Se.renderbuffer._renderbuffer.decRef())}function Pe(Se,De,Me){if(Se)if(Se.texture){var Tt=Se.texture._texture,bt=Math.max(1,Tt.width),Be=Math.max(1,Tt.height);E(bt===De&&Be===Me,"inconsistent width/height for supplied texture"),Tt.refCount+=1}else{var Ve=Se.renderbuffer._renderbuffer;E(Ve.width===De&&Ve.height===Me,"inconsistent width/height for renderbuffer"),Ve.refCount+=1}}function ye(Se,De){De&&(De.texture?m.framebufferTexture2D($n,Se,De.target,De.texture._texture.texture,0):m.framebufferRenderbuffer($n,Se,Ic,De.renderbuffer._renderbuffer.renderbuffer))}function Te(Se){var De=xa,Me=null,Tt=null,bt=Se;typeof Se=="object"&&(bt=Se.data,"target"in Se&&(De=Se.target|0)),E.type(bt,"function","invalid attachment data");var Be=bt._reglType;return Be==="texture2d"?(Me=bt,E(De===xa)):Be==="textureCube"?(Me=bt,E(De>=wl&&De=2,"invalid shape for framebuffer"),wt=fr[0],Lt=fr[1]}else"radius"in At&&(wt=Lt=At.radius),"width"in At&&(wt=At.width),"height"in At&&(Lt=At.height);("color"in At||"colors"in At)&&(Pt=At.color||At.colors,Array.isArray(Pt)&&E(Pt.length===1||x.webgl_draw_buffers,"multiple render targets not supported")),Pt||("colorCount"in At&&(Ui=At.colorCount|0,E(Ui>0,"invalid color buffer count")),"colorTexture"in At&&(Bi=!!At.colorTexture,li="rgba4"),"colorType"in At&&(Di=At.colorType,Bi?(E(x.oes_texture_float||!(Di==="float"||Di==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),E(x.oes_texture_half_float||!(Di==="half float"||Di==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Di==="half float"||Di==="float16"?(E(x.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),li="rgba16f"):(Di==="float"||Di==="float32")&&(E(x.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),li="rgba32f"),E.oneOf(Di,Ae,"invalid color type")),"colorFormat"in At&&(li=At.colorFormat,be.indexOf(li)>=0?Bi=!0:_e.indexOf(li)>=0?Bi=!1:E.optional(function(){Bi?E.oneOf(At.colorFormat,be,"invalid color format for texture"):E.oneOf(At.colorFormat,_e,"invalid color format for renderbuffer")}))),("depthTexture"in At||"depthStencilTexture"in At)&&($i=!!(At.depthTexture||At.depthStencilTexture),E(!$i||x.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in At&&(typeof At.depth=="boolean"?vi=At.depth:(Gi=At.depth,xi=!1)),"stencil"in At&&(typeof At.stencil=="boolean"?xi=At.stencil:(rr=At.stencil,vi=!1)),"depthStencil"in At&&(typeof At.depthStencil=="boolean"?vi=xi=At.depthStencil:(ur=At.depthStencil,vi=!1,xi=!1))}var Gt=null,ut=null,Ot=null,Dt=null;if(Array.isArray(Pt))Gt=Pt.map(Te);else if(Pt)Gt=[Te(Pt)];else for(Gt=new Array(Ui),mt=0;mt=0||Gt[mt].renderbuffer&&ab.indexOf(Gt[mt].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+mt+" is invalid"),Gt[mt]&&Gt[mt].texture){var fn=Cc[Gt[mt].texture._texture.format]*Sl[Gt[mt].texture._texture.type];Li===null?Li=fn:E(Li===fn,"all color attachments much have the same number of bits per pixel.")}return Pe(ut,wt,Lt),E(!ut||ut.texture&&ut.texture._texture.format===X1||ut.renderbuffer&&ut.renderbuffer._renderbuffer.format===Q1,"invalid depth attachment for framebuffer object"),Pe(Ot,wt,Lt),E(!Ot||Ot.renderbuffer&&Ot.renderbuffer._renderbuffer.format===eb,"invalid stencil attachment for framebuffer object"),Pe(Dt,wt,Lt),E(!Dt||Dt.texture&&Dt.texture._texture.format===Uh||Dt.renderbuffer&&Dt.renderbuffer._renderbuffer.format===Uh,"invalid depth-stencil attachment for framebuffer object"),ze(Me),Me.width=wt,Me.height=Lt,Me.colorAttachments=Gt,Me.depthAttachment=ut,Me.stencilAttachment=Ot,Me.depthStencilAttachment=Dt,Tt.color=Gt.map(te),Tt.depth=te(ut),Tt.stencil=te(Ot),Tt.depthStencil=te(Dt),Tt.width=Me.width,Tt.height=Me.height,ue(Me),Tt}function bt(Be,Ve){E(re.next!==Me,"can not resize a framebuffer which is currently in use");var mt=Math.max(Be|0,1),wt=Math.max(Ve|0||mt,1);if(mt===Me.width&&wt===Me.height)return Tt;for(var Lt=Me.colorAttachments,vi=0;vi=2,"invalid shape for framebuffer"),E(Bi[0]===Bi[1],"cube framebuffer must be square"),mt=Bi[0]}else"radius"in Pt&&(mt=Pt.radius|0),"width"in Pt?(mt=Pt.width|0,"height"in Pt&&E(Pt.height===mt,"must be square")):"height"in Pt&&(mt=Pt.height|0);("color"in Pt||"colors"in Pt)&&(wt=Pt.color||Pt.colors,Array.isArray(wt)&&E(wt.length===1||x.webgl_draw_buffers,"multiple render targets not supported")),wt||("colorCount"in Pt&&(xi=Pt.colorCount|0,E(xi>0,"invalid color buffer count")),"colorType"in Pt&&(E.oneOf(Pt.colorType,Ae,"invalid color type"),vi=Pt.colorType),"colorFormat"in Pt&&(Lt=Pt.colorFormat,E.oneOf(Pt.colorFormat,be,"invalid color format for texture"))),"depth"in Pt&&(Ve.depth=Pt.depth),"stencil"in Pt&&(Ve.stencil=Pt.stencil),"depthStencil"in Pt&&(Ve.depthStencil=Pt.depthStencil)}var li;if(wt)if(Array.isArray(wt))for(li=[],Be=0;Be0&&(Ve.depth=De[0].depth,Ve.stencil=De[0].stencil,Ve.depthStencil=De[0].depthStencil),De[Be]?De[Be](Ve):De[Be]=le(Ve)}return r(Me,{width:mt,height:mt,color:li})}function Tt(bt){var Be,Ve=bt|0;if(E(Ve>0&&Ve<=R.maxCubeMapSize,"invalid radius for cube fbo"),Ve===Me.width)return Me;var mt=Me.color;for(Be=0;Be{for(var vi=Object.keys(Ne),xi=0;xi=0,'invalid option for vao: "'+vi[xi]+'" valid options are '+jh)}),E(Array.isArray(Se),"attributes must be an array")}E(Se.length0,"must specify at least one attribute");var Me={},Tt=le.attributes;Tt.length=Se.length;for(var bt=0;bt=mt.byteLength?wt.subdata(mt):(wt.destroy(),le.buffers[bt]=null)),le.buffers[bt]||(wt=le.buffers[bt]=de.create(Be,Gh,!1,!0)),Ve.buffer=de.getBuffer(wt),Ve.size=Ve.buffer.dimension|0,Ve.normalized=!1,Ve.type=Ve.buffer.dtype,Ve.offset=0,Ve.stride=0,Ve.divisor=0,Ve.state=1,Me[bt]=1}else de.getBuffer(Be)?(Ve.buffer=de.getBuffer(Be),Ve.size=Ve.buffer.dimension|0,Ve.normalized=!1,Ve.type=Ve.buffer.dtype,Ve.offset=0,Ve.stride=0,Ve.divisor=0,Ve.state=1):de.getBuffer(Be.buffer)?(Ve.buffer=de.getBuffer(Be.buffer),Ve.size=(+Be.size||Ve.buffer.dimension)|0,Ve.normalized=!!Be.normalized||!1,"type"in Be?(E.parameter(Be.type,va,"invalid buffer type"),Ve.type=va[Be.type]):Ve.type=Ve.buffer.dtype,Ve.offset=(Be.offset||0)|0,Ve.stride=(Be.stride||0)|0,Ve.divisor=(Be.divisor||0)|0,Ve.state=1,E(Ve.size>=1&&Ve.size<=4,"size must be between 1 and 4"),E(Ve.offset>=0,"invalid offset"),E(Ve.stride>=0&&Ve.stride<=255,"stride must be between 0 and 255"),E(Ve.divisor>=0,"divisor must be positive"),E(!Ve.divisor||!!x.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Be?(E(bt>0,"first attribute must not be a constant"),Ve.x=+Be.x||0,Ve.y=+Be.y||0,Ve.z=+Be.z||0,Ve.w=+Be.w||0,Ve.state=2):E(!1,"invalid attribute spec for location "+bt)}for(var Lt=0;Lt1)for(var Ne=0;Nej&&(j=te.stats.uniformsCount)}),j},R.getMaxAttributesCount=function(){var j=0;return Ce.forEach(function(te){te.stats.attributesCount>j&&(j=te.stats.attributesCount)}),j});function Te(){de={},Z={};for(var j=0;j=0,"missing vertex shader",Ee),E.command(te>=0,"missing fragment shader",Ee);var me=Ae[te];me||(me=Ae[te]={});var He=me[j];if(He&&(He.refCount++,!We))return He;var ze=new Pe(te,j);return R.shaderCount++,ye(ze,Ee,We),He||(me[j]=ze),Ce.push(ze),r(ze,{destroy:function(){if(ze.refCount--,ze.refCount<=0){m.deleteProgram(ze.program);var st=Ce.indexOf(ze);Ce.splice(st,1),R.shaderCount--}me[ze.vertId].refCount<=0&&(m.deleteShader(Z[ze.vertId]),delete Z[ze.vertId],delete Ae[ze.fragId][ze.vertId]),Object.keys(Ae[ze.fragId]).length||(m.deleteShader(de[ze.fragId]),delete de[ze.fragId],delete Ae[ze.fragId])}})},restore:Te,shader:_e,frag:-1,vert:-1}}var hb=6408,no=5121,mb=3333,Tl=5126;function pb(m,x,R,J,de,Z,re){function be(Ce){var Ie;x.next===null?(E(de.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Ie=no):(E(x.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Ie=x.next.colorAttachments[0].texture._texture.type,E.optional(function(){Z.oes_texture_float?(E(Ie===no||Ie===Tl,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Ie===Tl&&E(re.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):E(Ie===no,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var Pe=0,ye=0,Te=J.framebufferWidth,j=J.framebufferHeight,te=null;t(Ce)?te=Ce:Ce&&(E.type(Ce,"object","invalid arguments to regl.read()"),Pe=Ce.x|0,ye=Ce.y|0,E(Pe>=0&&Pe=0&&ye0&&Te+Pe<=J.framebufferWidth,"invalid width for read pixels"),E(j>0&&j+ye<=J.framebufferHeight,"invalid height for read pixels"),R();var Ee=Te*j*4;return te||(Ie===no?te=new Uint8Array(Ee):Ie===Tl&&(te=te||new Float32Array(Ee))),E.isTypedArray(te,"data buffer for regl.read() must be a typedarray"),E(te.byteLength>=Ee,"data buffer for regl.read() too small"),m.pixelStorei(mb,4),m.readPixels(Pe,ye,Te,j,hb,Ie,te),te}function _e(Ce){var Ie;return x.setFBO({framebuffer:Ce.framebuffer},function(){Ie=be(Ce)}),Ie}function Ae(Ce){return!Ce||!("framebuffer"in Ce)?be(Ce):_e(Ce)}return Ae}function rs(m){return Array.prototype.slice.call(m)}function ns(m){return rs(m).join("")}function gb(){var m=0,x=[],R=[];function J(Ie){for(var Pe=0;Pe0&&(Ie.push(j,"="),Ie.push.apply(Ie,rs(arguments)),Ie.push(";")),j}return r(Pe,{def:Te,toString:function(){return ns([ye.length>0?"var "+ye.join(",")+";":"",ns(Ie)])}})}function Z(){var Ie=de(),Pe=de(),ye=Ie.toString,Te=Pe.toString;function j(te,Ee){Pe(te,Ee,"=",Ie.def(te,Ee),";")}return r(function(){Ie.apply(Ie,rs(arguments))},{def:Ie.def,entry:Ie,exit:Pe,save:j,set:function(te,Ee,We){j(te,Ee),Ie(te,Ee,"=",We,";")},toString:function(){return ye()+Te()}})}function re(){var Ie=ns(arguments),Pe=Z(),ye=Z(),Te=Pe.toString,j=ye.toString;return r(Pe,{then:function(){return Pe.apply(Pe,rs(arguments)),this},else:function(){return ye.apply(ye,rs(arguments)),this},toString:function(){var te=j();return te&&(te="else{"+te+"}"),ns(["if(",Ie,"){",Te(),"}",te])}})}var be=de(),_e={};function Ae(Ie,Pe){var ye=[];function Te(){var me="a"+ye.length;return ye.push(me),me}Pe=Pe||0;for(var j=0;j":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Qn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},bm={frag:yb,vert:xb},Jc={cw:hm,ccw:Zc};function zl(m){return Array.isArray(m)||t(m)||Zr(m)}function ym(m){return m.sort(function(x,R){return x===Ln?-1:R===Ln?1:x=1,J>=2,x)}else if(R===Al){var de=m.data;return new Ji(de.thisDep,de.contextDep,de.propDep,x)}else{if(R===Wh)return new Ji(!1,!1,!1,x);if(R===qh){for(var Z=!1,re=!1,be=!1,_e=0;_e=1&&(re=!0),Ce>=2&&(be=!0)}else Ae.type===Al&&(Z=Z||Ae.data.thisDep,re=re||Ae.data.contextDep,be=be||Ae.data.propDep)}return new Ji(Z,re,be,x)}else return new Ji(R===Pc,R===Rc,R===Oc,x)}}var xm=new Ji(!1,!1,!1,function(){});function Db(m,x,R,J,de,Z,re,be,_e,Ae,Ce,Ie,Pe,ye,Te){var j=Ae.Record,te={add:32774,subtract:32778,"reverse subtract":32779};R.ext_blend_minmax&&(te.min=Ob,te.max=Rb);var Ee=R.angle_instanced_arrays,We=R.webgl_draw_buffers,me=R.oes_vertex_array_object,He={dirty:!0,profile:Te.profile},ze={},st=[],ue={},le={};function Ke(A){return A.replace(".","_")}function Ne(A,_,N){var G=Ke(A);st.push(A),ze[G]=He[G]=!!N,ue[G]=_}function Se(A,_,N){var G=Ke(A);st.push(A),Array.isArray(N)?(He[G]=N.slice(),ze[G]=N.slice()):He[G]=ze[G]=N,le[G]=_}Ne(Xh,Tb),Ne(Yh,Eb),Se(Kh,"blendColor",[0,0,0,0]),Se(Fc,"blendEquationSeparate",[gm,gm]),Se(Nc,"blendFuncSeparate",[pm,mm,pm,mm]),Ne(Zh,Ib,!0),Se(Jh,"depthFunc",Fb),Se(Qh,"depthRange",[0,1]),Se(em,"depthMask",!0),Se(Dc,Dc,[!0,!0,!0,!0]),Ne(tm,Sb),Se(im,"cullFace",Aa),Se(Mc,Mc,Zc),Se(zc,zc,1),Ne(rm,kb),Se(Bc,"polygonOffset",[0,0]),Ne(nm,$b),Ne(am,Lb),Se(Uc,"sampleCoverage",[1,!1]),Ne(sm,Ab),Se(om,"stencilMask",-1),Se(Gc,"stencilFunc",[Pb,0,-1]),Se(jc,"stencilOpSeparate",[go,Jn,Jn,Jn]),Se(ao,"stencilOpSeparate",[Aa,Jn,Jn,Jn]),Ne(lm,Cb),Se(Il,"scissor",[0,0,m.drawingBufferWidth,m.drawingBufferHeight]),Se(Ln,Ln,[0,0,m.drawingBufferWidth,m.drawingBufferHeight]);var De={gl:m,context:Pe,strings:x,next:ze,current:He,draw:Ie,elements:Z,buffer:de,shader:Ce,attributes:Ae.state,vao:Ae,uniforms:_e,framebuffer:be,extensions:R,timer:ye,isBufferArgs:zl},Me={primTypes:Kn,compareFuncs:cs,blendFuncs:un,blendEquations:te,stencilOps:Qn,glTypes:va,orientationType:Jc};E.optional(function(){De.isArrayLike=ki}),We&&(Me.backBuffer=[Aa],Me.drawBuffer=fi(J.maxDrawbuffers,function(A){return A===0?[0]:fi(A,function(_){return Nb+_})}));var Tt=0;function bt(){var A=gb(),_=A.link,N=A.global;A.id=Tt++,A.batchId="0";var G=_(De),V=A.shared={props:"a0"};Object.keys(De).forEach(function(F){V[F]=N.def(G,".",F)}),E.optional(function(){A.CHECK=_(E),A.commandStr=E.guessCommand(),A.command=_(A.commandStr),A.assert=function(F,k,H){F("if(!(",k,"))",this.CHECK,".commandRaise(",_(H),",",this.command,");")},Me.invalidBlendCombinations=_m});var M=A.next={},D=A.current={};Object.keys(le).forEach(function(F){Array.isArray(He[F])&&(M[F]=N.def(V.next,".",F),D[F]=N.def(V.current,".",F))});var B=A.constants={};Object.keys(Me).forEach(function(F){B[F]=N.def(JSON.stringify(Me[F]))}),A.invoke=function(F,k){switch(k.type){case Lc:var H=["this",V.context,V.props,A.batchId];return F.def(_(k.data),".call(",H.slice(0,Math.max(k.data.length+1,4)),")");case Oc:return F.def(V.props,k.data);case Rc:return F.def(V.context,k.data);case Pc:return F.def("this",k.data);case Al:return k.data.append(A,F),k.data.ref;case Wh:return k.data.toString();case qh:return k.data.map(function(q){return A.invoke(F,q)})}},A.attribCache={};var w={};return A.scopeAttrib=function(F){var k=x.id(F);if(k in w)return w[k];var H=Ae.scope[k];H||(H=Ae.scope[k]=new j);var q=w[k]=_(H);return q},A}function Be(A){var _=A.static,N=A.dynamic,G;if(so in _){var V=!!_[so];G=Ni(function(D,B){return V}),G.enable=V}else if(so in N){var M=N[so];G=kr(M,function(D,B){return D.invoke(B,M)})}return G}function Ve(A,_){var N=A.static,G=A.dynamic;if(wa in N){var V=N[wa];return V?(V=be.getFramebuffer(V),E.command(V,"invalid framebuffer object"),Ni(function(D,B){var w=D.link(V),F=D.shared;B.set(F.framebuffer,".next",w);var k=F.context;return B.set(k,"."+os,w+".width"),B.set(k,"."+ls,w+".height"),w})):Ni(function(D,B){var w=D.shared;B.set(w.framebuffer,".next","null");var F=w.context;return B.set(F,"."+os,F+"."+cm),B.set(F,"."+ls,F+"."+um),"null"})}else if(wa in G){var M=G[wa];return kr(M,function(D,B){var w=D.invoke(B,M),F=D.shared,k=F.framebuffer,H=B.def(k,".getFramebuffer(",w,")");E.optional(function(){D.assert(B,"!"+w+"||"+H,"invalid framebuffer object")}),B.set(k,".next",H);var q=F.context;return B.set(q,"."+os,H+"?"+H+".width:"+q+"."+cm),B.set(q,"."+ls,H+"?"+H+".height:"+q+"."+um),H})}else return null}function mt(A,_,N){var G=A.static,V=A.dynamic;function M(w){if(w in G){var F=G[w];E.commandType(F,"object","invalid "+w,N.commandStr);var k=!0,H=F.x|0,q=F.y|0,fe,Oe;return"width"in F?(fe=F.width|0,E.command(fe>=0,"invalid "+w,N.commandStr)):k=!1,"height"in F?(Oe=F.height|0,E.command(Oe>=0,"invalid "+w,N.commandStr)):k=!1,new Ji(!k&&_&&_.thisDep,!k&&_&&_.contextDep,!k&&_&&_.propDep,function($e,et){var qe=$e.shared.context,Ze=fe;"width"in F||(Ze=et.def(qe,".",os,"-",H));var Je=Oe;return"height"in F||(Je=et.def(qe,".",ls,"-",q)),[H,q,Ze,Je]})}else if(w in V){var Re=V[w],Ue=kr(Re,function($e,et){var qe=$e.invoke(et,Re);E.optional(function(){$e.assert(et,qe+"&&typeof "+qe+'==="object"',"invalid "+w)});var Ze=$e.shared.context,Je=et.def(qe,".x|0"),tt=et.def(qe,".y|0"),pt=et.def('"width" in ',qe,"?",qe,".width|0:","(",Ze,".",os,"-",Je,")"),ti=et.def('"height" in ',qe,"?",qe,".height|0:","(",Ze,".",ls,"-",tt,")");return E.optional(function(){$e.assert(et,pt+">=0&&"+ti+">=0","invalid "+w)}),[Je,tt,pt,ti]});return _&&(Ue.thisDep=Ue.thisDep||_.thisDep,Ue.contextDep=Ue.contextDep||_.contextDep,Ue.propDep=Ue.propDep||_.propDep),Ue}else return _?new Ji(_.thisDep,_.contextDep,_.propDep,function($e,et){var qe=$e.shared.context;return[0,0,et.def(qe,".",os),et.def(qe,".",ls)]}):null}var D=M(Ln);if(D){var B=D;D=new Ji(D.thisDep,D.contextDep,D.propDep,function(w,F){var k=B.append(w,F),H=w.shared.context;return F.set(H,"."+vb,k[2]),F.set(H,"."+_b,k[3]),k})}return{viewport:D,scissor_box:M(Il)}}function wt(A,_){var N=A.static,G=typeof N[lo]=="string"&&typeof N[oo]=="string";if(G){if(Object.keys(_.dynamic).length>0)return null;var V=_.static,M=Object.keys(V);if(M.length>0&&typeof V[M[0]]=="number"){for(var D=[],B=0;B=0,"invalid "+et,_.commandStr),Ni(function(tt,pt){return qe&&(tt.OFFSET=Ze),Ze})}else if(et in G){var Je=G[et];return kr(Je,function(tt,pt){var ti=tt.invoke(pt,Je);return qe&&(tt.OFFSET=ti,E.optional(function(){tt.assert(pt,ti+">=0","invalid "+et)})),ti})}else if(qe){if(w)return Ni(function(tt,pt){return tt.OFFSET=0,0});if(M)return new Ji(B.thisDep,B.contextDep,B.propDep,function(tt,pt){return pt.def(tt.shared.vao+".currentVAO?"+tt.shared.vao+".currentVAO.offset:0")})}else if(M)return new Ji(B.thisDep,B.contextDep,B.propDep,function(tt,pt){return pt.def(tt.shared.vao+".currentVAO?"+tt.shared.vao+".currentVAO.instances:-1")});return null}var fe=q(Cl,!0);function Oe(){if(Ta in N){var et=N[Ta]|0;return V.count=et,E.command(typeof et=="number"&&et>=0,"invalid vertex count",_.commandStr),Ni(function(){return et})}else if(Ta in G){var qe=G[Ta];return kr(qe,function(pt,ti){var nr=pt.invoke(ti,qe);return E.optional(function(){pt.assert(ti,"typeof "+nr+'==="number"&&'+nr+">=0&&"+nr+"===("+nr+"|0)","invalid vertex count")}),nr})}else if(w)if(ea(k)){if(k)return fe?new Ji(fe.thisDep,fe.contextDep,fe.propDep,function(pt,ti){var nr=ti.def(pt.ELEMENTS,".vertCount-",pt.OFFSET);return E.optional(function(){pt.assert(ti,nr+">=0","invalid vertex offset/element buffer too small")}),nr}):Ni(function(pt,ti){return ti.def(pt.ELEMENTS,".vertCount")});var Ze=Ni(function(){return-1});return E.optional(function(){Ze.MISSING=!0}),Ze}else{var Je=new Ji(k.thisDep||fe.thisDep,k.contextDep||fe.contextDep,k.propDep||fe.propDep,function(pt,ti){var nr=pt.ELEMENTS;return pt.OFFSET?ti.def(nr,"?",nr,".vertCount-",pt.OFFSET,":-1"):ti.def(nr,"?",nr,".vertCount:-1")});return E.optional(function(){Je.DYNAMIC=!0}),Je}else if(M){var tt=new Ji(B.thisDep,B.contextDep,B.propDep,function(pt,ti){return ti.def(pt.shared.vao,".currentVAO?",pt.shared.vao,".currentVAO.count:-1")});return tt}return null}var Re=H(),Ue=Oe(),$e=q(kl,!1);return{elements:k,primitive:Re,count:Ue,instances:$e,offset:fe,vao:B,vaoActive:M,elementsActive:w,static:V}}function xi(A,_){var N=A.static,G=A.dynamic,V={};return st.forEach(function(M){var D=Ke(M);function B(w,F){if(M in N){var k=w(N[M]);V[D]=Ni(function(){return k})}else if(M in G){var H=G[M];V[D]=kr(H,function(q,fe){return F(q,fe,q.invoke(fe,H))})}}switch(M){case tm:case Yh:case Xh:case sm:case Zh:case lm:case rm:case nm:case am:case em:return B(function(w){return E.commandType(w,"boolean",M,_.commandStr),w},function(w,F,k){return E.optional(function(){w.assert(F,"typeof "+k+'==="boolean"',"invalid flag "+M,w.commandStr)}),k});case Jh:return B(function(w){return E.commandParameter(w,cs,"invalid "+M,_.commandStr),cs[w]},function(w,F,k){var H=w.constants.compareFuncs;return E.optional(function(){w.assert(F,k+" in "+H,"invalid "+M+", must be one of "+Object.keys(cs))}),F.def(H,"[",k,"]")});case Qh:return B(function(w){return E.command(ki(w)&&w.length===2&&typeof w[0]=="number"&&typeof w[1]=="number"&&w[0]<=w[1],"depth range is 2d array",_.commandStr),w},function(w,F,k){E.optional(function(){w.assert(F,w.shared.isArrayLike+"("+k+")&&"+k+".length===2&&typeof "+k+'[0]==="number"&&typeof '+k+'[1]==="number"&&'+k+"[0]<="+k+"[1]","depth range must be a 2d array")});var H=F.def("+",k,"[0]"),q=F.def("+",k,"[1]");return[H,q]});case Nc:return B(function(w){E.commandType(w,"object","blend.func",_.commandStr);var F="srcRGB"in w?w.srcRGB:w.src,k="srcAlpha"in w?w.srcAlpha:w.src,H="dstRGB"in w?w.dstRGB:w.dst,q="dstAlpha"in w?w.dstAlpha:w.dst;return E.commandParameter(F,un,D+".srcRGB",_.commandStr),E.commandParameter(k,un,D+".srcAlpha",_.commandStr),E.commandParameter(H,un,D+".dstRGB",_.commandStr),E.commandParameter(q,un,D+".dstAlpha",_.commandStr),E.command(_m.indexOf(F+", "+H)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+F+", "+H+")",_.commandStr),[un[F],un[H],un[k],un[q]]},function(w,F,k){var H=w.constants.blendFuncs;E.optional(function(){w.assert(F,k+"&&typeof "+k+'==="object"',"invalid blend func, must be an object")});function q(qe,Ze){var Je=F.def('"',qe,Ze,'" in ',k,"?",k,".",qe,Ze,":",k,".",qe);return E.optional(function(){w.assert(F,Je+" in "+H,"invalid "+M+"."+qe+Ze+", must be one of "+Object.keys(un))}),Je}var fe=q("src","RGB"),Oe=q("dst","RGB");E.optional(function(){var qe=w.constants.invalidBlendCombinations;w.assert(F,qe+".indexOf("+fe+'+", "+'+Oe+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Re=F.def(H,"[",fe,"]"),Ue=F.def(H,"[",q("src","Alpha"),"]"),$e=F.def(H,"[",Oe,"]"),et=F.def(H,"[",q("dst","Alpha"),"]");return[Re,$e,Ue,et]});case Fc:return B(function(w){if(typeof w=="string")return E.commandParameter(w,te,"invalid "+M,_.commandStr),[te[w],te[w]];if(typeof w=="object")return E.commandParameter(w.rgb,te,M+".rgb",_.commandStr),E.commandParameter(w.alpha,te,M+".alpha",_.commandStr),[te[w.rgb],te[w.alpha]];E.commandRaise("invalid blend.equation",_.commandStr)},function(w,F,k){var H=w.constants.blendEquations,q=F.def(),fe=F.def(),Oe=w.cond("typeof ",k,'==="string"');return E.optional(function(){function Re(Ue,$e,et){w.assert(Ue,et+" in "+H,"invalid "+$e+", must be one of "+Object.keys(te))}Re(Oe.then,M,k),w.assert(Oe.else,k+"&&typeof "+k+'==="object"',"invalid "+M),Re(Oe.else,M+".rgb",k+".rgb"),Re(Oe.else,M+".alpha",k+".alpha")}),Oe.then(q,"=",fe,"=",H,"[",k,"];"),Oe.else(q,"=",H,"[",k,".rgb];",fe,"=",H,"[",k,".alpha];"),F(Oe),[q,fe]});case Kh:return B(function(w){return E.command(ki(w)&&w.length===4,"blend.color must be a 4d array",_.commandStr),fi(4,function(F){return+w[F]})},function(w,F,k){return E.optional(function(){w.assert(F,w.shared.isArrayLike+"("+k+")&&"+k+".length===4","blend.color must be a 4d array")}),fi(4,function(H){return F.def("+",k,"[",H,"]")})});case om:return B(function(w){return E.commandType(w,"number",D,_.commandStr),w|0},function(w,F,k){return E.optional(function(){w.assert(F,"typeof "+k+'==="number"',"invalid stencil.mask")}),F.def(k,"|0")});case Gc:return B(function(w){E.commandType(w,"object",D,_.commandStr);var F=w.cmp||"keep",k=w.ref||0,H="mask"in w?w.mask:-1;return E.commandParameter(F,cs,M+".cmp",_.commandStr),E.commandType(k,"number",M+".ref",_.commandStr),E.commandType(H,"number",M+".mask",_.commandStr),[cs[F],k,H]},function(w,F,k){var H=w.constants.compareFuncs;E.optional(function(){function Re(){w.assert(F,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Re(k+"&&typeof ",k,'==="object"'),Re('!("cmp" in ',k,")||(",k,".cmp in ",H,")")});var q=F.def('"cmp" in ',k,"?",H,"[",k,".cmp]",":",Jn),fe=F.def(k,".ref|0"),Oe=F.def('"mask" in ',k,"?",k,".mask|0:-1");return[q,fe,Oe]});case jc:case ao:return B(function(w){E.commandType(w,"object",D,_.commandStr);var F=w.fail||"keep",k=w.zfail||"keep",H=w.zpass||"keep";return E.commandParameter(F,Qn,M+".fail",_.commandStr),E.commandParameter(k,Qn,M+".zfail",_.commandStr),E.commandParameter(H,Qn,M+".zpass",_.commandStr),[M===ao?Aa:go,Qn[F],Qn[k],Qn[H]]},function(w,F,k){var H=w.constants.stencilOps;E.optional(function(){w.assert(F,k+"&&typeof "+k+'==="object"',"invalid "+M)});function q(fe){return E.optional(function(){w.assert(F,'!("'+fe+'" in '+k+")||("+k+"."+fe+" in "+H+")","invalid "+M+"."+fe+", must be one of "+Object.keys(Qn))}),F.def('"',fe,'" in ',k,"?",H,"[",k,".",fe,"]:",Jn)}return[M===ao?Aa:go,q("fail"),q("zfail"),q("zpass")]});case Bc:return B(function(w){E.commandType(w,"object",D,_.commandStr);var F=w.factor|0,k=w.units|0;return E.commandType(F,"number",D+".factor",_.commandStr),E.commandType(k,"number",D+".units",_.commandStr),[F,k]},function(w,F,k){E.optional(function(){w.assert(F,k+"&&typeof "+k+'==="object"',"invalid "+M)});var H=F.def(k,".factor|0"),q=F.def(k,".units|0");return[H,q]});case im:return B(function(w){var F=0;return w==="front"?F=go:w==="back"&&(F=Aa),E.command(!!F,D,_.commandStr),F},function(w,F,k){return E.optional(function(){w.assert(F,k+'==="front"||'+k+'==="back"',"invalid cull.face")}),F.def(k,'==="front"?',go,":",Aa)});case zc:return B(function(w){return E.command(typeof w=="number"&&w>=J.lineWidthDims[0]&&w<=J.lineWidthDims[1],"invalid line width, must be a positive number between "+J.lineWidthDims[0]+" and "+J.lineWidthDims[1],_.commandStr),w},function(w,F,k){return E.optional(function(){w.assert(F,"typeof "+k+'==="number"&&'+k+">="+J.lineWidthDims[0]+"&&"+k+"<="+J.lineWidthDims[1],"invalid line width")}),k});case Mc:return B(function(w){return E.commandParameter(w,Jc,D,_.commandStr),Jc[w]},function(w,F,k){return E.optional(function(){w.assert(F,k+'==="cw"||'+k+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),F.def(k+'==="cw"?'+hm+":"+Zc)});case Dc:return B(function(w){return E.command(ki(w)&&w.length===4,"color.mask must be length 4 array",_.commandStr),w.map(function(F){return!!F})},function(w,F,k){return E.optional(function(){w.assert(F,w.shared.isArrayLike+"("+k+")&&"+k+".length===4","invalid color.mask")}),fi(4,function(H){return"!!"+k+"["+H+"]"})});case Uc:return B(function(w){E.command(typeof w=="object"&&w,D,_.commandStr);var F="value"in w?w.value:1,k=!!w.invert;return E.command(typeof F=="number"&&F>=0&&F<=1,"sample.coverage.value must be a number between 0 and 1",_.commandStr),[F,k]},function(w,F,k){E.optional(function(){w.assert(F,k+"&&typeof "+k+'==="object"',"invalid sample.coverage")});var H=F.def('"value" in ',k,"?+",k,".value:1"),q=F.def("!!",k,".invert");return[H,q]})}}),V}function Pt(A,_){var N=A.static,G=A.dynamic,V={};return Object.keys(N).forEach(function(M){var D=N[M],B;if(typeof D=="number"||typeof D=="boolean")B=Ni(function(){return D});else if(typeof D=="function"){var w=D._reglType;w==="texture2d"||w==="textureCube"?B=Ni(function(F){return F.link(D)}):w==="framebuffer"||w==="framebufferCube"?(E.command(D.color.length>0,'missing color attachment for framebuffer sent to uniform "'+M+'"',_.commandStr),B=Ni(function(F){return F.link(D.color[0])})):E.commandRaise('invalid data for uniform "'+M+'"',_.commandStr)}else ki(D)?B=Ni(function(F){var k=F.global.def("[",fi(D.length,function(H){return E.command(typeof D[H]=="number"||typeof D[H]=="boolean","invalid uniform "+M,F.commandStr),D[H]}),"]");return k}):E.commandRaise('invalid or missing data for uniform "'+M+'"',_.commandStr);B.value=D,V[M]=B}),Object.keys(G).forEach(function(M){var D=G[M];V[M]=kr(D,function(B,w){return B.invoke(w,D)})}),V}function Bi(A,_){var N=A.static,G=A.dynamic,V={};return Object.keys(N).forEach(function(M){var D=N[M],B=x.id(M),w=new j;if(zl(D))w.state=ss,w.buffer=de.getBuffer(de.create(D,ds,!1,!0)),w.type=0;else{var F=de.getBuffer(D);if(F)w.state=ss,w.buffer=F,w.type=0;else if(E.command(typeof D=="object"&&D,"invalid data for attribute "+M,_.commandStr),"constant"in D){var k=D.constant;w.buffer="null",w.state=$c,typeof k=="number"?w.x=k:(E.command(ki(k)&&k.length>0&&k.length<=4,"invalid constant for attribute "+M,_.commandStr),as.forEach(function($e,et){et=0,'invalid offset for attribute "'+M+'"',_.commandStr);var q=D.stride|0;E.command(q>=0&&q<256,'invalid stride for attribute "'+M+'", must be integer betweeen [0, 255]',_.commandStr);var fe=D.size|0;E.command(!("size"in D)||fe>0&&fe<=4,'invalid size for attribute "'+M+'", must be 1,2,3,4',_.commandStr);var Oe=!!D.normalized,Re=0;"type"in D&&(E.commandParameter(D.type,va,"invalid type for attribute "+M,_.commandStr),Re=va[D.type]);var Ue=D.divisor|0;E.optional(function(){"divisor"in D&&(E.command(Ue===0||Ee,'cannot specify divisor for attribute "'+M+'", instancing not supported',_.commandStr),E.command(Ue>=0,'invalid divisor for attribute "'+M+'"',_.commandStr));var $e=_.commandStr,et=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(D).forEach(function(qe){E.command(et.indexOf(qe)>=0,'unknown parameter "'+qe+'" for attribute pointer "'+M+'" (valid parameters are '+et+")",$e)})}),w.buffer=F,w.state=ss,w.size=fe,w.normalized=Oe,w.type=Re||F.dtype,w.offset=H,w.stride=q,w.divisor=Ue}}V[M]=Ni(function($e,et){var qe=$e.attribCache;if(B in qe)return qe[B];var Ze={isStream:!1};return Object.keys(w).forEach(function(Je){Ze[Je]=w[Je]}),w.buffer&&(Ze.buffer=$e.link(w.buffer),Ze.type=Ze.type||Ze.buffer+".dtype"),qe[B]=Ze,Ze})}),Object.keys(G).forEach(function(M){var D=G[M];function B(w,F){var k=w.invoke(F,D),H=w.shared,q=w.constants,fe=H.isBufferArgs,Oe=H.buffer;E.optional(function(){w.assert(F,k+"&&(typeof "+k+'==="object"||typeof '+k+'==="function")&&('+fe+"("+k+")||"+Oe+".getBuffer("+k+")||"+Oe+".getBuffer("+k+".buffer)||"+fe+"("+k+'.buffer)||("constant" in '+k+"&&(typeof "+k+'.constant==="number"||'+H.isArrayLike+"("+k+".constant))))",'invalid dynamic attribute "'+M+'"')});var Re={isStream:F.def(!1)},Ue=new j;Ue.state=ss,Object.keys(Ue).forEach(function(Ze){Re[Ze]=F.def(""+Ue[Ze])});var $e=Re.buffer,et=Re.type;F("if(",fe,"(",k,")){",Re.isStream,"=true;",$e,"=",Oe,".createStream(",ds,",",k,");",et,"=",$e,".dtype;","}else{",$e,"=",Oe,".getBuffer(",k,");","if(",$e,"){",et,"=",$e,".dtype;",'}else if("constant" in ',k,"){",Re.state,"=",$c,";","if(typeof "+k+'.constant === "number"){',Re[as[0]],"=",k,".constant;",as.slice(1).map(function(Ze){return Re[Ze]}).join("="),"=0;","}else{",as.map(function(Ze,Je){return Re[Ze]+"="+k+".constant.length>"+Je+"?"+k+".constant["+Je+"]:0;"}).join(""),"}}else{","if(",fe,"(",k,".buffer)){",$e,"=",Oe,".createStream(",ds,",",k,".buffer);","}else{",$e,"=",Oe,".getBuffer(",k,".buffer);","}",et,'="type" in ',k,"?",q.glTypes,"[",k,".type]:",$e,".dtype;",Re.normalized,"=!!",k,".normalized;");function qe(Ze){F(Re[Ze],"=",k,".",Ze,"|0;")}return qe("size"),qe("offset"),qe("stride"),qe("divisor"),F("}}"),F.exit("if(",Re.isStream,"){",Oe,".destroyStream(",$e,");","}"),Re}V[M]=kr(D,B)}),V}function li(A){var _=A.static,N=A.dynamic,G={};return Object.keys(_).forEach(function(V){var M=_[V];G[V]=Ni(function(D,B){return typeof M=="number"||typeof M=="boolean"?""+M:D.link(M)})}),Object.keys(N).forEach(function(V){var M=N[V];G[V]=kr(M,function(D,B){return D.invoke(B,M)})}),G}function Di(A,_,N,G,V){var M=A.static,D=A.dynamic;E.optional(function(){var qe=[wa,oo,lo,Sa,Ea,Cl,Ta,kl,so,co].concat(st);function Ze(Je){Object.keys(Je).forEach(function(tt){E.command(qe.indexOf(tt)>=0,'unknown parameter "'+tt+'"',V.commandStr)})}Ze(M),Ze(D)});var B=wt(A,_),w=Ve(A),F=mt(A,w,V),k=vi(A,V),H=xi(A,V),q=Lt(A,V,B);function fe(qe){var Ze=F[qe];Ze&&(H[qe]=Ze)}fe(Ln),fe(Ke(Il));var Oe=Object.keys(H).length>0,Re={framebuffer:w,draw:k,shader:q,state:H,dirty:Oe,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Re.profile=Be(A),Re.uniforms=Pt(N,V),Re.drawVAO=Re.scopeVAO=k.vao,!Re.drawVAO&&q.program&&!B&&R.angle_instanced_arrays&&k.static.elements){var Ue=!0,$e=q.program.attributes.map(function(qe){var Ze=_.static[qe];return Ue=Ue&&!!Ze,Ze});if(Ue&&$e.length>0){var et=Ae.getVAO(Ae.createVAO({attributes:$e,elements:k.static.elements}));Re.drawVAO=new Ji(null,null,null,function(qe,Ze){return qe.link(et)}),Re.useVAO=!0}}return B?Re.useVAO=!0:Re.attributes=Bi(_,V),Re.context=li(G),Re}function Ui(A,_,N){var G=A.shared,V=G.context,M=A.scope();Object.keys(N).forEach(function(D){_.save(V,"."+D);var B=N[D],w=B.append(A,_);Array.isArray(w)?M(V,".",D,"=[",w.join(),"];"):M(V,".",D,"=",w,";")}),_(M)}function Gi(A,_,N,G){var V=A.shared,M=V.gl,D=V.framebuffer,B;We&&(B=_.def(V.extensions,".webgl_draw_buffers"));var w=A.constants,F=w.drawBuffer,k=w.backBuffer,H;N?H=N.append(A,_):H=_.def(D,".next"),G||_("if(",H,"!==",D,".cur){"),_("if(",H,"){",M,".bindFramebuffer(",vm,",",H,".framebuffer);"),We&&_(B,".drawBuffersWEBGL(",F,"[",H,".colorAttachments.length]);"),_("}else{",M,".bindFramebuffer(",vm,",null);"),We&&_(B,".drawBuffersWEBGL(",k,");"),_("}",D,".cur=",H,";"),G||_("}")}function rr(A,_,N){var G=A.shared,V=G.gl,M=A.current,D=A.next,B=G.current,w=G.next,F=A.cond(B,".dirty");st.forEach(function(k){var H=Ke(k);if(!(H in N.state)){var q,fe;if(H in D){q=D[H],fe=M[H];var Oe=fi(He[H].length,function(Ue){return F.def(q,"[",Ue,"]")});F(A.cond(Oe.map(function(Ue,$e){return Ue+"!=="+fe+"["+$e+"]"}).join("||")).then(V,".",le[H],"(",Oe,");",Oe.map(function(Ue,$e){return fe+"["+$e+"]="+Ue}).join(";"),";"))}else{q=F.def(w,".",H);var Re=A.cond(q,"!==",B,".",H);F(Re),H in ue?Re(A.cond(q).then(V,".enable(",ue[H],");").else(V,".disable(",ue[H],");"),B,".",H,"=",q,";"):Re(V,".",le[H],"(",q,");",B,".",H,"=",q,";")}}}),Object.keys(N.state).length===0&&F(B,".dirty=false;"),_(F)}function ur(A,_,N,G){var V=A.shared,M=A.current,D=V.current,B=V.gl;ym(Object.keys(N)).forEach(function(w){var F=N[w];if(!(G&&!G(F))){var k=F.append(A,_);if(ue[w]){var H=ue[w];ea(F)?k?_(B,".enable(",H,");"):_(B,".disable(",H,");"):_(A.cond(k).then(B,".enable(",H,");").else(B,".disable(",H,");")),_(D,".",w,"=",k,";")}else if(ki(k)){var q=M[w];_(B,".",le[w],"(",k,");",k.map(function(fe,Oe){return q+"["+Oe+"]="+fe}).join(";"),";")}else _(B,".",le[w],"(",k,");",D,".",w,"=",k,";")}})}function $i(A,_){Ee&&(A.instancing=_.def(A.shared.extensions,".angle_instanced_arrays"))}function At(A,_,N,G,V){var M=A.shared,D=A.stats,B=M.current,w=M.timer,F=N.profile;function k(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var H,q;function fe(qe){H=_.def(),qe(H,"=",k(),";"),typeof V=="string"?qe(D,".count+=",V,";"):qe(D,".count++;"),ye&&(G?(q=_.def(),qe(q,"=",w,".getNumPendingQueries();")):qe(w,".beginQuery(",D,");"))}function Oe(qe){qe(D,".cpuTime+=",k(),"-",H,";"),ye&&(G?qe(w,".pushScopeStats(",q,",",w,".getNumPendingQueries(),",D,");"):qe(w,".endQuery();"))}function Re(qe){var Ze=_.def(B,".profile");_(B,".profile=",qe,";"),_.exit(B,".profile=",Ze,";")}var Ue;if(F){if(ea(F)){F.enable?(fe(_),Oe(_.exit),Re("true")):Re("false");return}Ue=F.append(A,_),Re(Ue)}else Ue=_.def(B,".profile");var $e=A.block();fe($e),_("if(",Ue,"){",$e,"}");var et=A.block();Oe(et),_.exit("if(",Ue,"){",et,"}")}function fr(A,_,N,G,V){var M=A.shared;function D(w){switch(w){case $l:case Rl:case Nl:return 2;case Ll:case Pl:case Dl:return 3;case Ol:case Fl:case Ml:return 4;default:return 1}}function B(w,F,k){var H=M.gl,q=_.def(w,".location"),fe=_.def(M.attributes,"[",q,"]"),Oe=k.state,Re=k.buffer,Ue=[k.x,k.y,k.z,k.w],$e=["buffer","normalized","offset","stride"];function et(){_("if(!",fe,".buffer){",H,".enableVertexAttribArray(",q,");}");var Ze=k.type,Je;if(k.size?Je=_.def(k.size,"||",F):Je=F,_("if(",fe,".type!==",Ze,"||",fe,".size!==",Je,"||",$e.map(function(pt){return fe+"."+pt+"!=="+k[pt]}).join("||"),"){",H,".bindBuffer(",ds,",",Re,".buffer);",H,".vertexAttribPointer(",[q,Je,Ze,k.normalized,k.stride,k.offset],");",fe,".type=",Ze,";",fe,".size=",Je,";",$e.map(function(pt){return fe+"."+pt+"="+k[pt]+";"}).join(""),"}"),Ee){var tt=k.divisor;_("if(",fe,".divisor!==",tt,"){",A.instancing,".vertexAttribDivisorANGLE(",[q,tt],");",fe,".divisor=",tt,";}")}}function qe(){_("if(",fe,".buffer){",H,".disableVertexAttribArray(",q,");",fe,".buffer=null;","}if(",as.map(function(Ze,Je){return fe+"."+Ze+"!=="+Ue[Je]}).join("||"),"){",H,".vertexAttrib4f(",q,",",Ue,");",as.map(function(Ze,Je){return fe+"."+Ze+"="+Ue[Je]+";"}).join(""),"}")}Oe===ss?et():Oe===$c?qe():(_("if(",Oe,"===",ss,"){"),et(),_("}else{"),qe(),_("}"))}G.forEach(function(w){var F=w.name,k=N.attributes[F],H;if(k){if(!V(k))return;H=k.append(A,_)}else{if(!V(xm))return;var q=A.scopeAttrib(F);E.optional(function(){A.assert(_,q+".state","missing attribute "+F)}),H={},Object.keys(new j).forEach(function(fe){H[fe]=_.def(q,".",fe)})}B(A.link(w),D(w.info.type),H)})}function Gt(A,_,N,G,V,M){for(var D=A.shared,B=D.gl,w,F=0;F1){for(var nr=[],On=[],Rn=0;Rn=0","missing vertex count")})):(tt=pt.def(D,".",Ta),E.optional(function(){A.assert(pt,tt+">=0","missing vertex count")})),tt}var k=w();function H(Je){var tt=B[Je];return tt?tt.contextDep&&G.contextDynamic||tt.propDep?tt.append(A,N):tt.append(A,_):_.def(D,".",Je)}var q=H(Ea),fe=H(Cl),Oe=F();if(typeof Oe=="number"){if(Oe===0)return}else N("if(",Oe,"){"),N.exit("}");var Re,Ue;Ee&&(Re=H(kl),Ue=A.instancing);var $e=k+".type",et=B.elements&&ea(B.elements)&&!B.vaoActive;function qe(){function Je(){N(Ue,".drawElementsInstancedANGLE(",[q,Oe,$e,fe+"<<(("+$e+"-"+Vh+")>>1)",Re],");")}function tt(){N(Ue,".drawArraysInstancedANGLE(",[q,fe,Oe,Re],");")}k&&k!=="null"?et?Je():(N("if(",k,"){"),Je(),N("}else{"),tt(),N("}")):tt()}function Ze(){function Je(){N(M+".drawElements("+[q,Oe,$e,fe+"<<(("+$e+"-"+Vh+")>>1)"]+");")}function tt(){N(M+".drawArrays("+[q,fe,Oe]+");")}k&&k!=="null"?et?Je():(N("if(",k,"){"),Je(),N("}else{"),tt(),N("}")):tt()}Ee&&(typeof Re!="number"||Re>=0)?typeof Re=="string"?(N("if(",Re,">0){"),qe(),N("}else if(",Re,"<0){"),Ze(),N("}")):qe():Ze()}function Ot(A,_,N,G,V){var M=bt(),D=M.proc("body",V);return E.optional(function(){M.commandStr=_.commandStr,M.command=M.link(_.commandStr)}),Ee&&(M.instancing=D.def(M.shared.extensions,".angle_instanced_arrays")),A(M,D,N,G),M.compile().body}function Dt(A,_,N,G){$i(A,_),N.useVAO?N.drawVAO?_(A.shared.vao,".setVAO(",N.drawVAO.append(A,_),");"):_(A.shared.vao,".setVAO(",A.shared.vao,".targetVAO);"):(_(A.shared.vao,".setVAO(null);"),fr(A,_,N,G.attributes,function(){return!0})),Gt(A,_,N,G.uniforms,function(){return!0},!1),ut(A,_,_,N)}function Li(A,_){var N=A.proc("draw",1);$i(A,N),Ui(A,N,_.context),Gi(A,N,_.framebuffer),rr(A,N,_),ur(A,N,_.state),At(A,N,_,!1,!0);var G=_.shader.progVar.append(A,N);if(N(A.shared.gl,".useProgram(",G,".program);"),_.shader.program)Dt(A,N,_,_.shader.program);else{N(A.shared.vao,".setVAO(null);");var V=A.global.def("{}"),M=N.def(G,".id"),D=N.def(V,"[",M,"]");N(A.cond(D).then(D,".call(this,a0);").else(D,"=",V,"[",M,"]=",A.link(function(B){return Ot(Dt,A,_,B,1)}),"(",G,");",D,".call(this,a0);"))}Object.keys(_.state).length>0&&N(A.shared.current,".dirty=true;"),A.shared.vao&&N(A.shared.vao,".setVAO(null);")}function fn(A,_,N,G){A.batchId="a1",$i(A,_);function V(){return!0}fr(A,_,N,G.attributes,V),Gt(A,_,N,G.uniforms,V,!1),ut(A,_,_,N)}function Ia(A,_,N,G){$i(A,_);var V=N.contextDep,M=_.def(),D="a0",B="a1",w=_.def();A.shared.props=w,A.batchId=M;var F=A.scope(),k=A.scope();_(F.entry,"for(",M,"=0;",M,"<",B,";++",M,"){",w,"=",D,"[",M,"];",k,"}",F.exit);function H($e){return $e.contextDep&&V||$e.propDep}function q($e){return!H($e)}if(N.needsContext&&Ui(A,k,N.context),N.needsFramebuffer&&Gi(A,k,N.framebuffer),ur(A,k,N.state,H),N.profile&&H(N.profile)&&At(A,k,N,!1,!0),G)N.useVAO?N.drawVAO?H(N.drawVAO)?k(A.shared.vao,".setVAO(",N.drawVAO.append(A,k),");"):F(A.shared.vao,".setVAO(",N.drawVAO.append(A,F),");"):F(A.shared.vao,".setVAO(",A.shared.vao,".targetVAO);"):(F(A.shared.vao,".setVAO(null);"),fr(A,F,N,G.attributes,q),fr(A,k,N,G.attributes,H)),Gt(A,F,N,G.uniforms,q,!1),Gt(A,k,N,G.uniforms,H,!0),ut(A,F,k,N);else{var fe=A.global.def("{}"),Oe=N.shader.progVar.append(A,k),Re=k.def(Oe,".id"),Ue=k.def(fe,"[",Re,"]");k(A.shared.gl,".useProgram(",Oe,".program);","if(!",Ue,"){",Ue,"=",fe,"[",Re,"]=",A.link(function($e){return Ot(fn,A,N,$e,2)}),"(",Oe,");}",Ue,".call(this,a0[",M,"],",M,");")}}function $(A,_){var N=A.proc("batch",2);A.batchId="0",$i(A,N);var G=!1,V=!0;Object.keys(_.context).forEach(function(fe){G=G||_.context[fe].propDep}),G||(Ui(A,N,_.context),V=!1);var M=_.framebuffer,D=!1;M?(M.propDep?G=D=!0:M.contextDep&&G&&(D=!0),D||Gi(A,N,M)):Gi(A,N,null),_.state.viewport&&_.state.viewport.propDep&&(G=!0);function B(fe){return fe.contextDep&&G||fe.propDep}rr(A,N,_),ur(A,N,_.state,function(fe){return!B(fe)}),(!_.profile||!B(_.profile))&&At(A,N,_,!1,"a1"),_.contextDep=G,_.needsContext=V,_.needsFramebuffer=D;var w=_.shader.progVar;if(w.contextDep&&G||w.propDep)Ia(A,N,_,null);else{var F=w.append(A,N);if(N(A.shared.gl,".useProgram(",F,".program);"),_.shader.program)Ia(A,N,_,_.shader.program);else{N(A.shared.vao,".setVAO(null);");var k=A.global.def("{}"),H=N.def(F,".id"),q=N.def(k,"[",H,"]");N(A.cond(q).then(q,".call(this,a0,a1);").else(q,"=",k,"[",H,"]=",A.link(function(fe){return Ot(Ia,A,_,fe,2)}),"(",F,");",q,".call(this,a0,a1);"))}}Object.keys(_.state).length>0&&N(A.shared.current,".dirty=true;"),A.shared.vao&&N(A.shared.vao,".setVAO(null);")}function Q(A,_){var N=A.proc("scope",3);A.batchId="a2";var G=A.shared,V=G.current;Ui(A,N,_.context),_.framebuffer&&_.framebuffer.append(A,N),ym(Object.keys(_.state)).forEach(function(D){var B=_.state[D],w=B.append(A,N);ki(w)?w.forEach(function(F,k){N.set(A.next[D],"["+k+"]",F)}):N.set(G.next,"."+D,w)}),At(A,N,_,!0,!0),[Sa,Cl,Ta,kl,Ea].forEach(function(D){var B=_.draw[D];B&&N.set(G.draw,"."+D,""+B.append(A,N))}),Object.keys(_.uniforms).forEach(function(D){var B=_.uniforms[D].append(A,N);Array.isArray(B)&&(B="["+B.join()+"]"),N.set(G.uniforms,"["+x.id(D)+"]",B)}),Object.keys(_.attributes).forEach(function(D){var B=_.attributes[D].append(A,N),w=A.scopeAttrib(D);Object.keys(new j).forEach(function(F){N.set(w,"."+F,B[F])})}),_.scopeVAO&&N.set(G.vao,".targetVAO",_.scopeVAO.append(A,N));function M(D){var B=_.shader[D];B&&N.set(G.shader,"."+D,B.append(A,N))}M(oo),M(lo),Object.keys(_.state).length>0&&(N(V,".dirty=true;"),N.exit(V,".dirty=true;")),N("a1(",A.shared.context,",a0,",A.batchId,");")}function X(A){if(!(typeof A!="object"||ki(A))){for(var _=Object.keys(A),N=0;N<_.length;++N)if(Wt.isDynamic(A[_[N]]))return!0;return!1}}function Xe(A,_,N){var G=_.static[N];if(!G||!X(G))return;var V=A.global,M=Object.keys(G),D=!1,B=!1,w=!1,F=A.global.def("{}");M.forEach(function(H){var q=G[H];if(Wt.isDynamic(q)){typeof q=="function"&&(q=G[H]=Wt.unbox(q));var fe=kr(q,null);D=D||fe.thisDep,w=w||fe.propDep,B=B||fe.contextDep}else{switch(V(F,".",H,"="),typeof q){case"number":V(q);break;case"string":V('"',q,'"');break;case"object":Array.isArray(q)&&V("[",q.join(),"]");break;default:V(A.link(q));break}V(";")}});function k(H,q){M.forEach(function(fe){var Oe=G[fe];if(Wt.isDynamic(Oe)){var Re=H.invoke(q,Oe);q(F,".",fe,"=",Re,";")}})}_.dynamic[N]=new Wt.DynamicVariable(Al,{thisDep:D,contextDep:B,propDep:w,ref:F,append:k}),delete _.static[N]}function $t(A,_,N,G,V){var M=bt();M.stats=M.link(V),Object.keys(_.static).forEach(function(B){Xe(M,_,B)}),bb.forEach(function(B){Xe(M,A,B)});var D=Di(A,_,N,G,M);return Li(M,D),Q(M,D),$(M,D),r(M.compile(),{destroy:function(){D.shader.program.destroy()}})}return{next:ze,current:He,procs:function(){var A=bt(),_=A.proc("poll"),N=A.proc("refresh"),G=A.block();_(G),N(G);var V=A.shared,M=V.gl,D=V.next,B=V.current;G(B,".dirty=false;"),Gi(A,_),Gi(A,N,null,!0);var w;Ee&&(w=A.link(Ee)),R.oes_vertex_array_object&&N(A.link(R.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var F=0;F=0;--ut){var Ot=Me[ut];Ot&&Ot(ye,null,0)}R.flush(),Ae&&Ae.update()}function wt(){!Ve&&Me.length>0&&(Ve=Fi.next(mt))}function Lt(){Ve&&(Fi.cancel(mt),Ve=null)}function vi(ut){ut.preventDefault(),de=!0,Lt(),Tt.forEach(function(Ot){Ot()})}function xi(ut){R.getError(),de=!1,Z.restore(),ze.restore(),Ee.restore(),st.restore(),ue.restore(),le.restore(),me.restore(),Ae&&Ae.restore(),Ke.procs.refresh(),wt(),bt.forEach(function(Ot){Ot()})}De&&(De.addEventListener(Sm,vi,!1),De.addEventListener(Em,xi,!1));function Pt(){Me.length=0,Lt(),De&&(De.removeEventListener(Sm,vi),De.removeEventListener(Em,xi)),ze.clear(),le.clear(),ue.clear(),me.clear(),st.clear(),We.clear(),Ee.clear(),Ae&&Ae.clear(),Be.forEach(function(ut){ut()})}function Bi(ut){E(!!ut,"invalid args to regl({...})"),E.type(ut,"object","invalid args to regl({...})");function Ot(V){var M=r({},V);delete M.uniforms,delete M.attributes,delete M.context,delete M.vao,"stencil"in M&&M.stencil.op&&(M.stencil.opBack=M.stencil.opFront=M.stencil.op,delete M.stencil.op);function D(B){if(B in M){var w=M[B];delete M[B],Object.keys(w).forEach(function(F){M[B+"."+F]=w[F]})}}return D("blend"),D("depth"),D("cull"),D("stencil"),D("polygonOffset"),D("scissor"),D("sample"),"vao"in V&&(M.vao=V.vao),M}function Dt(V,M){var D={},B={};return Object.keys(V).forEach(function(w){var F=V[w];if(Wt.isDynamic(F)){B[w]=Wt.unbox(F,w);return}else if(M&&Array.isArray(F)){for(var k=0;k0)return $t.call(this,N(V|0),V|0)}else if(Array.isArray(V)){if(V.length)return $t.call(this,V,V.length)}else return Xe.call(this,V)}return r(G,{stats:Q,destroy:function(){X.destroy()}})}var li=le.setFBO=Bi({framebuffer:Wt.define.call(null,Tm,"framebuffer")});function Di(ut,Ot){var Dt=0;Ke.procs.poll();var Li=Ot.color;Li&&(R.clearColor(+Li[0]||0,+Li[1]||0,+Li[2]||0,+Li[3]||0),Dt|=Gb),"depth"in Ot&&(R.clearDepth(+Ot.depth),Dt|=jb),"stencil"in Ot&&(R.clearStencil(Ot.stencil|0),Dt|=Hb),E(!!Dt,"called regl.clear with no buffer specified"),R.clear(Dt)}function Ui(ut){if(E(typeof ut=="object"&&ut,"regl.clear() takes an object as input"),"framebuffer"in ut)if(ut.framebuffer&&ut.framebuffer_reglType==="framebufferCube")for(var Ot=0;Ot<6;++Ot)li(r({framebuffer:ut.framebuffer.faces[Ot]},ut),Di);else li(ut,Di);else Di(null,ut)}function Gi(ut){E.type(ut,"function","regl.frame() callback must be a function"),Me.push(ut);function Ot(){var Dt=Am(Me,ut);E(Dt>=0,"cannot cancel a frame twice");function Li(){var fn=Am(Me,Li);Me[fn]=Me[Me.length-1],Me.length-=1,Me.length<=0&&Lt()}Me[Dt]=Li}return wt(),{cancel:Ot}}function rr(){var ut=Se.viewport,Ot=Se.scissor_box;ut[0]=ut[1]=Ot[0]=Ot[1]=0,ye.viewportWidth=ye.framebufferWidth=ye.drawingBufferWidth=ut[2]=Ot[2]=R.drawingBufferWidth,ye.viewportHeight=ye.framebufferHeight=ye.drawingBufferHeight=ut[3]=Ot[3]=R.drawingBufferHeight}function ur(){ye.tick+=1,ye.time=At(),rr(),Ke.procs.poll()}function $i(){st.refresh(),rr(),Ke.procs.refresh(),Ae&&Ae.update()}function At(){return(Ci()-Ce)/1e3}$i();function fr(ut,Ot){E.type(Ot,"function","listener callback must be a function");var Dt;switch(ut){case"frame":return Gi(Ot);case"lost":Dt=Tt;break;case"restore":Dt=bt;break;case"destroy":Dt=Be;break;default:E.raise("invalid event, must be one of frame,lost,restore,destroy")}return Dt.push(Ot),{cancel:function(){for(var Li=0;Li=0},read:Ne,destroy:Pt,_gl:R,_refresh:$i,poll:function(){ur(),Ae&&Ae.update()},now:At,stats:be});return x.onDone(null,Gt),Gt}return Xb})})(q0);var T2=q0.exports;const A2=V0(T2);function od(i,e){return i==null||e==null?NaN:ie?1:i>=e?0:NaN}function I2(i,e){return i==null||e==null?NaN:ei?1:e>=i?0:NaN}function gf(i){let e,t,r;i.length!==2?(e=od,t=(o,l)=>od(i(o),l),r=(o,l)=>i(o)-l):(e=i===od||i===I2?i:C2,t=i,r=i);function n(o,l,d=0,c=o.length){if(d>>1;t(o[u],l)<0?d=u+1:c=u}while(d>>1;t(o[u],l)<=0?d=u+1:c=u}while(dd&&r(o[u-1],l)>-r(o[u],l)?u-1:u}return{left:n,center:s,right:a}}function C2(){return 0}function k2(i){return i===null?NaN:+i}const $2=gf(od),L2=$2.right;gf(k2).center;function Vo(i,e){let t,r;for(const n of i)n!=null&&(t===void 0?n>=n&&(t=r=n):(t>n&&(t=n),r=r.length)return t(a);const o=new O2,l=r[s++];let d=-1;for(const c of a){const u=l(c,++d,a),f=o.get(u);f?f.push(c):o.set(u,[c])}for(const[c,u]of o)o.set(c,n(u,s));return e(o)}(i,0)}const z2=Math.sqrt(50),B2=Math.sqrt(10),U2=Math.sqrt(2);function yd(i,e,t){const r=(e-i)/Math.max(0,t),n=Math.floor(Math.log10(r)),a=r/Math.pow(10,n),s=a>=z2?10:a>=B2?5:a>=U2?2:1;let o,l,d;return n<0?(d=Math.pow(10,-n)/s,o=Math.round(i*d),l=Math.round(e*d),o/de&&--l,d=-d):(d=Math.pow(10,n)*s,o=Math.round(i/d),l=Math.round(e/d),o*de&&--l),l0))return[];if(i===e)return[i];const r=e=n))return[];const o=a-n+1,l=new Array(o);if(r)if(s<0)for(let d=0;de&&(t=i,i=e,e=t),function(r){return Math.max(i,Math.min(e,r))}}function X2(i,e,t){var r=i[0],n=i[1],a=e[0],s=e[1];return n2?Y2:X2,l=d=null,u}function u(f){return f==null||isNaN(f=+f)?a:(l||(l=o(i.map(r),e,t)))(r(s(f)))}return u.invert=function(f){return s(n((d||(d=o(e,i.map(r),rn)))(f)))},u.domain=function(f){return arguments.length?(i=Array.from(f,W2),c()):i.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),c()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),t=cw,c()},u.clamp=function(f){return arguments.length?(s=f?!0:gn,c()):s!==gn},u.interpolate=function(f){return arguments.length?(t=f,c()):t},u.unknown=function(f){return arguments.length?(a=f,u):a},function(f,h){return r=f,n=h,c()}}function X0(){return vf()(gn,gn)}function K2(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function xd(i,e){if((t=(i=e?i.toExponential(e-1):i.toExponential()).indexOf("e"))<0)return null;var t,r=i.slice(0,t);return[r.length>1?r[0]+r.slice(2):r,+i.slice(t+1)]}function Ms(i){return i=xd(Math.abs(i)),i?i[1]:NaN}function Z2(i,e){return function(t,r){for(var n=t.length,a=[],s=0,o=i[0],l=0;n>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(t.substring(n-=o,n+o)),!((l+=o+1)>r));)o=i[s=(s+1)%i.length];return a.reverse().join(e)}}function J2(i){return function(e){return e.replace(/[0-9]/g,function(t){return i[+t]})}}var Q2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wd(i){if(!(e=Q2.exec(i)))throw new Error("invalid format: "+i);var e;return new _f({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}wd.prototype=_f.prototype;function _f(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}_f.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function e3(i){e:for(var e=i.length,t=1,r=-1,n;t0&&(r=0);break}return r>0?i.slice(0,r)+i.slice(n+1):i}var Y0;function t3(i,e){var t=xd(i,e);if(!t)return i+"";var r=t[0],n=t[1],a=n-(Y0=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+xd(i,Math.max(0,e+a-1))[0]}function Jm(i,e){var t=xd(i,e);if(!t)return i+"";var r=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}const Qm={"%":(i,e)=>(i*100).toFixed(e),b:i=>Math.round(i).toString(2),c:i=>i+"",d:K2,e:(i,e)=>i.toExponential(e),f:(i,e)=>i.toFixed(e),g:(i,e)=>i.toPrecision(e),o:i=>Math.round(i).toString(8),p:(i,e)=>Jm(i*100,e),r:Jm,s:t3,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function ep(i){return i}var tp=Array.prototype.map,ip=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function i3(i){var e=i.grouping===void 0||i.thousands===void 0?ep:Z2(tp.call(i.grouping,Number),i.thousands+""),t=i.currency===void 0?"":i.currency[0]+"",r=i.currency===void 0?"":i.currency[1]+"",n=i.decimal===void 0?".":i.decimal+"",a=i.numerals===void 0?ep:J2(tp.call(i.numerals,String)),s=i.percent===void 0?"%":i.percent+"",o=i.minus===void 0?"−":i.minus+"",l=i.nan===void 0?"NaN":i.nan+"";function d(u){u=wd(u);var f=u.fill,h=u.align,g=u.sign,S=u.symbol,p=u.zero,b=u.width,T=u.comma,y=u.precision,v=u.trim,L=u.type;L==="n"?(T=!0,L="g"):Qm[L]||(y===void 0&&(y=12),v=!0,L="g"),(p||f==="0"&&h==="=")&&(p=!0,f="0",h="=");var z=S==="$"?t:S==="#"&&/[boxX]/.test(L)?"0"+L.toLowerCase():"",I=S==="$"?r:/[%p]/.test(L)?s:"",O=Qm[L],W=/[defgprs%]/.test(L);y=y===void 0?6:/[gprs]/.test(L)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function he(ne){var ie=z,P=I,C,Y,U;if(L==="c")P=O(ne)+P,ne="";else{ne=+ne;var ee=ne<0||1/ne<0;if(ne=isNaN(ne)?l:O(Math.abs(ne),y),v&&(ne=e3(ne)),ee&&+ne==0&&g!=="+"&&(ee=!1),ie=(ee?g==="("?g:o:g==="-"||g==="("?"":g)+ie,P=(L==="s"?ip[8+Y0/3]:"")+P+(ee&&g==="("?")":""),W){for(C=-1,Y=ne.length;++CU||U>57){P=(U===46?n+ne.slice(C+1):ne.slice(C))+P,ne=ne.slice(0,C);break}}}T&&!p&&(ne=e(ne,1/0));var Fe=ie.length+ne.length+P.length,xe=Fe>1)+ie+ne+P+xe.slice(Fe);break;default:ne=xe+ie+ne+P;break}return a(ne)}return he.toString=function(){return u+""},he}function c(u,f){var h=d((u=wd(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Ms(f)/3)))*3,S=Math.pow(10,-g),p=ip[8+g/3];return function(b){return h(S*b)+p}}return{format:d,formatPrefix:c}}var Hl,K0,Z0;r3({thousands:",",grouping:[3],currency:["$",""]});function r3(i){return Hl=i3(i),K0=Hl.format,Z0=Hl.formatPrefix,Hl}function n3(i){return Math.max(0,-Ms(Math.abs(i)))}function a3(i,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ms(e)/3)))*3-Ms(Math.abs(i)))}function s3(i,e){return i=Math.abs(i),e=Math.abs(e)-i,Math.max(0,Ms(e)-Ms(i))+1}function o3(i,e,t,r){var n=Du(i,e,t),a;switch(r=wd(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(i),Math.abs(e));return r.precision==null&&!isNaN(a=a3(n,s))&&(r.precision=a),Z0(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=s3(n,Math.max(Math.abs(i),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=n3(n))&&(r.precision=a-(r.type==="%")*2);break}}return K0(r)}function bf(i){var e=i.domain;return i.ticks=function(t){var r=e();return G2(r[0],r[r.length-1],t==null?10:t)},i.tickFormat=function(t,r){var n=e();return o3(n[0],n[n.length-1],t==null?10:t,r)},i.nice=function(t){t==null&&(t=10);var r=e(),n=0,a=r.length-1,s=r[n],o=r[a],l,d,c=10;for(o0;){if(d=Nu(s,o,t),d===l)return r[n]=s,r[a]=o,e(r);if(d>0)s=Math.floor(s/d)*d,o=Math.ceil(o/d)*d;else if(d<0)s=Math.ceil(s*d)/d,o=Math.floor(o*d)/d;else break;l=d}return i},i}function zs(){var i=X0();return i.copy=function(){return Gd(i,zs())},Ud.apply(i,arguments),bf(i)}function l3(i,e){i=i.slice();var t=0,r=i.length-1,n=i[t],a=i[r],s;return a(i(a=new Date(+a)),a),n.ceil=a=>(i(a=new Date(a-1)),e(a,1),i(a),a),n.round=a=>{const s=n(a),o=n.ceil(a);return a-s(e(a=new Date(+a),s==null?1:Math.floor(s)),a),n.range=(a,s,o)=>{const l=[];if(a=n.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let d;do l.push(d=new Date(+a)),e(a,o),i(a);while(dlr(s=>{if(s>=s)for(;i(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),t&&(n.count=(a,s)=>(tu.setTime(+a),iu.setTime(+s),i(tu),i(iu),Math.floor(t(tu,iu))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(r?s=>r(s)%a===0:s=>n.count(0,s)%a===0):n)),n}const Sd=lr(()=>{},(i,e)=>{i.setTime(+i+e)},(i,e)=>e-i);Sd.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?lr(e=>{e.setTime(Math.floor(e/i)*i)},(e,t)=>{e.setTime(+e+t*i)},(e,t)=>(t-e)/i):Sd);Sd.range;const zn=1e3,qr=zn*60,Bn=qr*60,Hn=Bn*24,yf=Hn*7,sp=Hn*30,ru=Hn*365,Pa=lr(i=>{i.setTime(i-i.getMilliseconds())},(i,e)=>{i.setTime(+i+e*zn)},(i,e)=>(e-i)/zn,i=>i.getUTCSeconds());Pa.range;const jd=lr(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*zn)},(i,e)=>{i.setTime(+i+e*qr)},(i,e)=>(e-i)/qr,i=>i.getMinutes());jd.range;const h3=lr(i=>{i.setUTCSeconds(0,0)},(i,e)=>{i.setTime(+i+e*qr)},(i,e)=>(e-i)/qr,i=>i.getUTCMinutes());h3.range;const Hd=lr(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*zn-i.getMinutes()*qr)},(i,e)=>{i.setTime(+i+e*Bn)},(i,e)=>(e-i)/Bn,i=>i.getHours());Hd.range;const m3=lr(i=>{i.setUTCMinutes(0,0,0)},(i,e)=>{i.setTime(+i+e*Bn)},(i,e)=>(e-i)/Bn,i=>i.getUTCHours());m3.range;const Xs=lr(i=>i.setHours(0,0,0,0),(i,e)=>i.setDate(i.getDate()+e),(i,e)=>(e-i-(e.getTimezoneOffset()-i.getTimezoneOffset())*qr)/Hn,i=>i.getDate()-1);Xs.range;const xf=lr(i=>{i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCDate(i.getUTCDate()+e)},(i,e)=>(e-i)/Hn,i=>i.getUTCDate()-1);xf.range;const p3=lr(i=>{i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCDate(i.getUTCDate()+e)},(i,e)=>(e-i)/Hn,i=>Math.floor(i/Hn));p3.range;function Ua(i){return lr(e=>{e.setDate(e.getDate()-(e.getDay()+7-i)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*qr)/yf)}const el=Ua(0),Ed=Ua(1),g3=Ua(2),v3=Ua(3),Bs=Ua(4),_3=Ua(5),b3=Ua(6);el.range;Ed.range;g3.range;v3.range;Bs.range;_3.range;b3.range;function Ga(i){return lr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-i)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/yf)}const ev=Ga(0),Td=Ga(1),y3=Ga(2),x3=Ga(3),Us=Ga(4),w3=Ga(5),S3=Ga(6);ev.range;Td.range;y3.range;x3.range;Us.range;w3.range;S3.range;const Vd=lr(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,e)=>{i.setMonth(i.getMonth()+e)},(i,e)=>e.getMonth()-i.getMonth()+(e.getFullYear()-i.getFullYear())*12,i=>i.getMonth());Vd.range;const E3=lr(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCMonth(i.getUTCMonth()+e)},(i,e)=>e.getUTCMonth()-i.getUTCMonth()+(e.getUTCFullYear()-i.getUTCFullYear())*12,i=>i.getUTCMonth());E3.range;const bn=lr(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,e)=>{i.setFullYear(i.getFullYear()+e)},(i,e)=>e.getFullYear()-i.getFullYear(),i=>i.getFullYear());bn.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:lr(e=>{e.setFullYear(Math.floor(e.getFullYear()/i)*i),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*i)});bn.range;const Ba=lr(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCFullYear(i.getUTCFullYear()+e)},(i,e)=>e.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());Ba.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:lr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/i)*i),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*i)});Ba.range;function T3(i,e,t,r,n,a){const s=[[Pa,1,zn],[Pa,5,5*zn],[Pa,15,15*zn],[Pa,30,30*zn],[a,1,qr],[a,5,5*qr],[a,15,15*qr],[a,30,30*qr],[n,1,Bn],[n,3,3*Bn],[n,6,6*Bn],[n,12,12*Bn],[r,1,Hn],[r,2,2*Hn],[t,1,yf],[e,1,sp],[e,3,3*sp],[i,1,ru]];function o(d,c,u){const f=cp).right(s,f);if(h===s.length)return i.every(Du(d/ru,c/ru,u));if(h===0)return Sd.every(Math.max(Du(d,c,u),1));const[g,S]=s[f/s[h-1][2]53)return null;"w"in we||(we.w=1),"Z"in we?(Ct=au(bo(we.y,0,1)),Qt=Ct.getUTCDay(),Ct=Qt>4||Qt===0?Td.ceil(Ct):Td(Ct),Ct=xf.offset(Ct,(we.V-1)*7),we.y=Ct.getUTCFullYear(),we.m=Ct.getUTCMonth(),we.d=Ct.getUTCDate()+(we.w+6)%7):(Ct=nu(bo(we.y,0,1)),Qt=Ct.getDay(),Ct=Qt>4||Qt===0?Ed.ceil(Ct):Ed(Ct),Ct=Xs.offset(Ct,(we.V-1)*7),we.y=Ct.getFullYear(),we.m=Ct.getMonth(),we.d=Ct.getDate()+(we.w+6)%7)}else("W"in we||"U"in we)&&("w"in we||(we.w="u"in we?we.u%7:"W"in we?1:0),Qt="Z"in we?au(bo(we.y,0,1)).getUTCDay():nu(bo(we.y,0,1)).getDay(),we.m=0,we.d="W"in we?(we.w+6)%7+we.W*7-(Qt+5)%7:we.w+we.U*7-(Qt+6)%7);return"Z"in we?(we.H+=we.Z/100|0,we.M+=we.Z%100,au(we)):nu(we)}}function O(oe,Qe,lt,we){for(var It=0,Ct=Qe.length,Qt=lt.length,ui,ht;It=Qt)return-1;if(ui=Qe.charCodeAt(It++),ui===37){if(ui=Qe.charAt(It++),ht=L[ui in op?Qe.charAt(It++):ui],!ht||(we=ht(oe,lt,we))<0)return-1}else if(ui!=lt.charCodeAt(we++))return-1}return we}function W(oe,Qe,lt){var we=d.exec(Qe.slice(lt));return we?(oe.p=c.get(we[0].toLowerCase()),lt+we[0].length):-1}function he(oe,Qe,lt){var we=h.exec(Qe.slice(lt));return we?(oe.w=g.get(we[0].toLowerCase()),lt+we[0].length):-1}function ne(oe,Qe,lt){var we=u.exec(Qe.slice(lt));return we?(oe.w=f.get(we[0].toLowerCase()),lt+we[0].length):-1}function ie(oe,Qe,lt){var we=b.exec(Qe.slice(lt));return we?(oe.m=T.get(we[0].toLowerCase()),lt+we[0].length):-1}function P(oe,Qe,lt){var we=S.exec(Qe.slice(lt));return we?(oe.m=p.get(we[0].toLowerCase()),lt+we[0].length):-1}function C(oe,Qe,lt){return O(oe,e,Qe,lt)}function Y(oe,Qe,lt){return O(oe,t,Qe,lt)}function U(oe,Qe,lt){return O(oe,r,Qe,lt)}function ee(oe){return s[oe.getDay()]}function Fe(oe){return a[oe.getDay()]}function xe(oe){return l[oe.getMonth()]}function ke(oe){return o[oe.getMonth()]}function Ge(oe){return n[+(oe.getHours()>=12)]}function Ye(oe){return 1+~~(oe.getMonth()/3)}function ce(oe){return s[oe.getUTCDay()]}function ft(oe){return a[oe.getUTCDay()]}function yt(oe){return l[oe.getUTCMonth()]}function ot(oe){return o[oe.getUTCMonth()]}function xt(oe){return n[+(oe.getUTCHours()>=12)]}function ge(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var Qe=z(oe+="",y);return Qe.toString=function(){return oe},Qe},parse:function(oe){var Qe=I(oe+="",!1);return Qe.toString=function(){return oe},Qe},utcFormat:function(oe){var Qe=z(oe+="",v);return Qe.toString=function(){return oe},Qe},utcParse:function(oe){var Qe=I(oe+="",!0);return Qe.toString=function(){return oe},Qe}}}var op={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,k3=/^%/,$3=/[\\^$*+?|[\]().{}]/g;function Xt(i,e,t){var r=i<0?"-":"",n=(r?-i:i)+"",a=n.length;return r+(a[e.toLowerCase(),t]))}function O3(i,e,t){var r=mr.exec(e.slice(t,t+1));return r?(i.w=+r[0],t+r[0].length):-1}function R3(i,e,t){var r=mr.exec(e.slice(t,t+1));return r?(i.u=+r[0],t+r[0].length):-1}function P3(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.U=+r[0],t+r[0].length):-1}function F3(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.V=+r[0],t+r[0].length):-1}function N3(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.W=+r[0],t+r[0].length):-1}function lp(i,e,t){var r=mr.exec(e.slice(t,t+4));return r?(i.y=+r[0],t+r[0].length):-1}function dp(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function D3(i,e,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return r?(i.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function M3(i,e,t){var r=mr.exec(e.slice(t,t+1));return r?(i.q=r[0]*3-3,t+r[0].length):-1}function z3(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.m=r[0]-1,t+r[0].length):-1}function cp(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.d=+r[0],t+r[0].length):-1}function B3(i,e,t){var r=mr.exec(e.slice(t,t+3));return r?(i.m=0,i.d=+r[0],t+r[0].length):-1}function up(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.H=+r[0],t+r[0].length):-1}function U3(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.M=+r[0],t+r[0].length):-1}function G3(i,e,t){var r=mr.exec(e.slice(t,t+2));return r?(i.S=+r[0],t+r[0].length):-1}function j3(i,e,t){var r=mr.exec(e.slice(t,t+3));return r?(i.L=+r[0],t+r[0].length):-1}function H3(i,e,t){var r=mr.exec(e.slice(t,t+6));return r?(i.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function V3(i,e,t){var r=k3.exec(e.slice(t,t+1));return r?t+r[0].length:-1}function W3(i,e,t){var r=mr.exec(e.slice(t));return r?(i.Q=+r[0],t+r[0].length):-1}function q3(i,e,t){var r=mr.exec(e.slice(t));return r?(i.s=+r[0],t+r[0].length):-1}function fp(i,e){return Xt(i.getDate(),e,2)}function X3(i,e){return Xt(i.getHours(),e,2)}function Y3(i,e){return Xt(i.getHours()%12||12,e,2)}function K3(i,e){return Xt(1+Xs.count(bn(i),i),e,3)}function tv(i,e){return Xt(i.getMilliseconds(),e,3)}function Z3(i,e){return tv(i,e)+"000"}function J3(i,e){return Xt(i.getMonth()+1,e,2)}function Q3(i,e){return Xt(i.getMinutes(),e,2)}function eS(i,e){return Xt(i.getSeconds(),e,2)}function tS(i){var e=i.getDay();return e===0?7:e}function iS(i,e){return Xt(el.count(bn(i)-1,i),e,2)}function iv(i){var e=i.getDay();return e>=4||e===0?Bs(i):Bs.ceil(i)}function rS(i,e){return i=iv(i),Xt(Bs.count(bn(i),i)+(bn(i).getDay()===4),e,2)}function nS(i){return i.getDay()}function aS(i,e){return Xt(Ed.count(bn(i)-1,i),e,2)}function sS(i,e){return Xt(i.getFullYear()%100,e,2)}function oS(i,e){return i=iv(i),Xt(i.getFullYear()%100,e,2)}function lS(i,e){return Xt(i.getFullYear()%1e4,e,4)}function dS(i,e){var t=i.getDay();return i=t>=4||t===0?Bs(i):Bs.ceil(i),Xt(i.getFullYear()%1e4,e,4)}function cS(i){var e=i.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Xt(e/60|0,"0",2)+Xt(e%60,"0",2)}function hp(i,e){return Xt(i.getUTCDate(),e,2)}function uS(i,e){return Xt(i.getUTCHours(),e,2)}function fS(i,e){return Xt(i.getUTCHours()%12||12,e,2)}function hS(i,e){return Xt(1+xf.count(Ba(i),i),e,3)}function rv(i,e){return Xt(i.getUTCMilliseconds(),e,3)}function mS(i,e){return rv(i,e)+"000"}function pS(i,e){return Xt(i.getUTCMonth()+1,e,2)}function gS(i,e){return Xt(i.getUTCMinutes(),e,2)}function vS(i,e){return Xt(i.getUTCSeconds(),e,2)}function _S(i){var e=i.getUTCDay();return e===0?7:e}function bS(i,e){return Xt(ev.count(Ba(i)-1,i),e,2)}function nv(i){var e=i.getUTCDay();return e>=4||e===0?Us(i):Us.ceil(i)}function yS(i,e){return i=nv(i),Xt(Us.count(Ba(i),i)+(Ba(i).getUTCDay()===4),e,2)}function xS(i){return i.getUTCDay()}function wS(i,e){return Xt(Td.count(Ba(i)-1,i),e,2)}function SS(i,e){return Xt(i.getUTCFullYear()%100,e,2)}function ES(i,e){return i=nv(i),Xt(i.getUTCFullYear()%100,e,2)}function TS(i,e){return Xt(i.getUTCFullYear()%1e4,e,4)}function AS(i,e){var t=i.getUTCDay();return i=t>=4||t===0?Us(i):Us.ceil(i),Xt(i.getUTCFullYear()%1e4,e,4)}function IS(){return"+0000"}function mp(){return"%"}function pp(i){return+i}function gp(i){return Math.floor(+i/1e3)}var us,wn;CS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"]});function CS(i){return us=C3(i),wn=us.format,us.parse,us.utcFormat,us.utcParse,us}function kS(i){return new Date(i)}function $S(i){return i instanceof Date?+i:+new Date(+i)}function av(i,e,t,r,n,a,s,o,l,d){var c=X0(),u=c.invert,f=c.domain,h=d(".%L"),g=d(":%S"),S=d("%I:%M"),p=d("%I %p"),b=d("%a %d"),T=d("%b %d"),y=d("%B"),v=d("%Y");function L(z){return(l(z)>>0,f-=l,f*=l,l=f>>>0,f-=l,l+=f*4294967296}return(l>>>0)*23283064365386963e-26};return d}t&&t.exports?t.exports=s:this.alea=s})(Qi,i)})(wf);var PS=wf.exports,Sf={exports:{}};Sf.exports;(function(i){(function(e,t,r){function n(o){var l=this,d="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},o===(o|0)?l.x=o:d+=o;for(var c=0;c>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,h=(d.next()>>>0)/4294967296,g=(f+h)/(1<<21);while(g===0);return g},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xor128=s})(Qi,i)})(Sf);var FS=Sf.exports,Ef={exports:{}};Ef.exports;(function(i){(function(e,t,r){function n(o){var l=this,d="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,o===(o|0)?l.x=o:d+=o;for(var c=0;c>>4),l.next()}function a(o,l){return l.x=o.x,l.y=o.y,l.z=o.z,l.w=o.w,l.v=o.v,l.d=o.d,l}function s(o,l){var d=new n(o),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,h=(d.next()>>>0)/4294967296,g=(f+h)/(1<<21);while(g===0);return g},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xorwow=s})(Qi,i)})(Ef);var NS=Ef.exports,Tf={exports:{}};Tf.exports;(function(i){(function(e,t,r){function n(o){var l=this;l.next=function(){var c=l.x,u=l.i,f,h;return f=c[u],f^=f>>>7,h=f^f<<24,f=c[u+1&7],h^=f^f>>>10,f=c[u+3&7],h^=f^f>>>3,f=c[u+4&7],h^=f^f<<7,f=c[u+7&7],f=f^f<<13,h^=f^f<<9,c[u]=h,l.i=u+1&7,h};function d(c,u){var f,h=[];if(u===(u|0))h[0]=u;else for(u=""+u,f=0;f0;--f)c.next()}d(l,o)}function a(o,l){return l.x=o.x.slice(),l.i=o.i,l}function s(o,l){o==null&&(o=+new Date);var d=new n(o),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,h=(d.next()>>>0)/4294967296,g=(f+h)/(1<<21);while(g===0);return g},u.int32=d.next,u.quick=u,c&&(c.x&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xorshift7=s})(Qi,i)})(Tf);var DS=Tf.exports,Af={exports:{}};Af.exports;(function(i){(function(e,t,r){function n(o){var l=this;l.next=function(){var c=l.w,u=l.X,f=l.i,h,g;return l.w=c=c+1640531527|0,g=u[f+34&127],h=u[f=f+1&127],g^=g<<13,h^=h<<17,g^=g>>>15,h^=h>>>12,g=u[f]=g^h,l.i=f,g+(c^c>>>16)|0};function d(c,u){var f,h,g,S,p,b=[],T=128;for(u===(u|0)?(h=u,u=null):(u=u+"\0",h=0,T=Math.max(T,u.length)),g=0,S=-32;S>>15,h^=h<<4,h^=h>>>13,S>=0&&(p=p+1640531527|0,f=b[S&127]^=h+p,g=f==0?g+1:0);for(g>=128&&(b[(u&&u.length||0)&127]=-1),g=127,S=4*128;S>0;--S)h=b[g+34&127],f=b[g=g+1&127],h^=h<<13,f^=f<<17,h^=h>>>15,f^=f>>>12,b[g]=h^f;c.w=p,c.X=b,c.i=g}d(l,o)}function a(o,l){return l.i=o.i,l.w=o.w,l.X=o.X.slice(),l}function s(o,l){o==null&&(o=+new Date);var d=new n(o),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,h=(d.next()>>>0)/4294967296,g=(f+h)/(1<<21);while(g===0);return g},u.int32=d.next,u.quick=u,c&&(c.X&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xor4096=s})(Qi,i)})(Af);var MS=Af.exports,If={exports:{}};If.exports;(function(i){(function(e,t,r){function n(o){var l=this,d="";l.next=function(){var u=l.b,f=l.c,h=l.d,g=l.a;return u=u<<25^u>>>7^f,f=f-h|0,h=h<<24^h>>>8^g,g=g-u|0,l.b=u=u<<20^u>>>12^f,l.c=f=f-h|0,l.d=h<<16^f>>>16^g,l.a=g-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,o===Math.floor(o)?(l.a=o/4294967296|0,l.b=o|0):d+=o;for(var c=0;c>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,h=(d.next()>>>0)/4294967296,g=(f+h)/(1<<21);while(g===0);return g},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.tychei=s})(Qi,i)})(If);var zS=If.exports,sv={exports:{}};const BS={},US=Object.freeze(Object.defineProperty({__proto__:null,default:BS},Symbol.toStringTag,{value:"Module"})),GS=W0(US);(function(i){(function(e,t,r){var n=256,a=6,s=52,o="random",l=r.pow(n,a),d=r.pow(2,s),c=d*2,u=n-1,f;function h(v,L,z){var I=[];L=L==!0?{entropy:!0}:L||{};var O=b(p(L.entropy?[v,y(t)]:v==null?T():v,3),I),W=new g(I),he=function(){for(var ne=W.g(a),ie=l,P=0;ne=c;)ne/=2,ie/=2,P>>>=1;return(ne+P)/ie};return he.int32=function(){return W.g(4)|0},he.quick=function(){return W.g(4)/4294967296},he.double=he,b(y(W.S),t),(L.pass||z||function(ne,ie,P,C){return C&&(C.S&&S(C,W),ne.state=function(){return S(W,{})}),P?(r[o]=ne,ie):ne})(he,O,"global"in L?L.global:this==r,L.state)}function g(v){var L,z=v.length,I=this,O=0,W=I.i=I.j=0,he=I.S=[];for(z||(v=[z++]);O0)return t;throw new Error("Expected number to be positive, got "+t.n)},this.lessThan=function(r){if(t.n=r)return t;throw new Error("Expected number to be greater than or equal to "+r+", got "+t.n)},this.greaterThan=function(r){if(t.n>r)return t;throw new Error("Expected number to be greater than "+r+", got "+t.n)},this.n=e},rE=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),t===void 0&&(t=e===void 0?1:e,e=0),ln(e).isInt(),ln(t).isInt(),function(){return Math.floor(i.next()*(t-e+1)+e)}},nE=function(i){return function(){return i.next()>=.5}},aE=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),function(){var r,n,a;do r=i.next()*2-1,n=i.next()*2-1,a=r*r+n*n;while(!a||a>1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},sE=function(i,e,t){e===void 0&&(e=0),t===void 0&&(t=1);var r=i.normal(e,t);return function(){return Math.exp(r())}},oE=function(i,e){return e===void 0&&(e=.5),ln(e).greaterThanOrEqual(0).lessThan(1),function(){return Math.floor(i.next()+e)}},lE=function(i,e,t){return e===void 0&&(e=1),t===void 0&&(t=.5),ln(e).isInt().isPositive(),ln(t).greaterThanOrEqual(0).lessThan(1),function(){for(var r=0,n=0;r++l;)c=c-l,l=e*l/++d;return d}}else{var r=Math.sqrt(e),n=.931+2.53*r,a=-.059+.02483*n,s=1.1239+1.1328/(n-3.4),o=.9277-3.6224/(n-2);return function(){for(;;){var l=void 0,d=i.next();if(d<=.86*o)return l=d/o-.43,Math.floor((2*a/(.5-Math.abs(l))+n)*l+e+.445);d>=o?l=i.next()-.5:(l=d/o-.93,l=(l<0?-.5:.5)-l,d=i.next()*o);var c=.5-Math.abs(l);if(!(c<.013&&d>c)){var u=Math.floor((2*a/c+n)*l+e+.445);if(d=d*s/(a/(c*c)+n),u>=10){var f=(u+.5)*Math.log(e/u)-e-fE+u-(.08333333333333333-(.002777777777777778-1/(1260*u*u))/(u*u))/u;if(Math.log(d*r)<=f)return u}else if(u>=0){var h,g=(h=uE(u))!=null?h:0;if(Math.log(d)<=u*Math.log(e)-e-g)return u}}}}}},mE=function(i,e){return e===void 0&&(e=1),ln(e).isPositive(),function(){return-Math.log(1-i.next())/e}},pE=function(i,e){return e===void 0&&(e=1),ln(e).isInt().greaterThanOrEqual(0),function(){for(var t=0,r=0;r0){var a=this.uniformInt(0,n-1)();return r[a]}else return},e._memoize=function(r,n){var a=[].slice.call(arguments,2),s=""+a.join(";"),o=this._cache[r];return(o===void 0||o.key!==s)&&(o={key:s,distribution:n.apply(void 0,[this].concat(a))},this._cache[r]=o),o.distribution},Cf(i,[{key:"rng",get:function(){return this._rng}}]),i}();new lv;const Uu={capture:!0,passive:!1};function Gu(i){i.preventDefault(),i.stopImmediatePropagation()}function dv(i){var e=i.document.documentElement,t=Vi(i).on("dragstart.drag",Gu,Uu);"onselectstart"in e?t.on("selectstart.drag",Gu,Uu):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function cv(i,e){var t=i.document.documentElement,r=Vi(i).on("dragstart.drag",null);e&&(r.on("click.drag",Gu,Uu),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in t?r.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}const Vl=i=>()=>i;function bE(i,{sourceEvent:e,target:t,transform:r,dispatch:n}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:n}})}function Un(i,e,t){this.k=i,this.x=e,this.y=t}Un.prototype={constructor:Un,scale:function(i){return i===1?this:new Un(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new Un(this.k,this.x+this.k*i,this.y+this.k*e)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Fo=new Un(1,0,0);Un.prototype;function ou(i){i.stopImmediatePropagation()}function wo(i){i.preventDefault(),i.stopImmediatePropagation()}function yE(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function xE(){var i=this;return i instanceof SVGElement?(i=i.ownerSVGElement||i,i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]):[[0,0],[i.clientWidth,i.clientHeight]]}function xp(){return this.__zoom||Fo}function wE(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function SE(){return navigator.maxTouchPoints||"ontouchstart"in this}function EE(i,e,t){var r=i.invertX(e[0][0])-t[0][0],n=i.invertX(e[1][0])-t[1][0],a=i.invertY(e[0][1])-t[0][1],s=i.invertY(e[1][1])-t[1][1];return i.translate(n>r?(r+n)/2:Math.min(0,r)||Math.max(0,n),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function TE(){var i=yE,e=xE,t=EE,r=wE,n=SE,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,l=_w,d=Dd("start","zoom","end"),c,u,f,h=500,g=150,S=0,p=10;function b(C){C.property("__zoom",xp).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",he).filter(n).on("touchstart.zoom",ne).on("touchmove.zoom",ie).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(C,Y,U,ee){var Fe=C.selection?C.selection():C;Fe.property("__zoom",xp),C!==Fe?L(C,Y,U,ee):Fe.interrupt().each(function(){z(this,arguments).event(ee).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},b.scaleBy=function(C,Y,U,ee){b.scaleTo(C,function(){var Fe=this.__zoom.k,xe=typeof Y=="function"?Y.apply(this,arguments):Y;return Fe*xe},U,ee)},b.scaleTo=function(C,Y,U,ee){b.transform(C,function(){var Fe=e.apply(this,arguments),xe=this.__zoom,ke=U==null?v(Fe):typeof U=="function"?U.apply(this,arguments):U,Ge=xe.invert(ke),Ye=typeof Y=="function"?Y.apply(this,arguments):Y;return t(y(T(xe,Ye),ke,Ge),Fe,s)},U,ee)},b.translateBy=function(C,Y,U,ee){b.transform(C,function(){return t(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof U=="function"?U.apply(this,arguments):U),e.apply(this,arguments),s)},null,ee)},b.translateTo=function(C,Y,U,ee,Fe){b.transform(C,function(){var xe=e.apply(this,arguments),ke=this.__zoom,Ge=ee==null?v(xe):typeof ee=="function"?ee.apply(this,arguments):ee;return t(Fo.translate(Ge[0],Ge[1]).scale(ke.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof U=="function"?-U.apply(this,arguments):-U),xe,s)},ee,Fe)};function T(C,Y){return Y=Math.max(a[0],Math.min(a[1],Y)),Y===C.k?C:new Un(Y,C.x,C.y)}function y(C,Y,U){var ee=Y[0]-U[0]*C.k,Fe=Y[1]-U[1]*C.k;return ee===C.x&&Fe===C.y?C:new Un(C.k,ee,Fe)}function v(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function L(C,Y,U,ee){C.on("start.zoom",function(){z(this,arguments).event(ee).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(ee).end()}).tween("zoom",function(){var Fe=this,xe=arguments,ke=z(Fe,xe).event(ee),Ge=e.apply(Fe,xe),Ye=U==null?v(Ge):typeof U=="function"?U.apply(Fe,xe):U,ce=Math.max(Ge[1][0]-Ge[0][0],Ge[1][1]-Ge[0][1]),ft=Fe.__zoom,yt=typeof Y=="function"?Y.apply(Fe,xe):Y,ot=l(ft.invert(Ye).concat(ce/ft.k),yt.invert(Ye).concat(ce/yt.k));return function(xt){if(xt===1)xt=yt;else{var ge=ot(xt),oe=ce/ge[2];xt=new Un(oe,Ye[0]-ge[0]*oe,Ye[1]-ge[1]*oe)}ke.zoom(null,xt)}})}function z(C,Y,U){return!U&&C.__zooming||new I(C,Y)}function I(C,Y){this.that=C,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=e.apply(C,Y),this.taps=0}I.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,Y){return this.mouse&&C!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var Y=Vi(this.that).datum();d.call(C,this.that,new bE(C,{sourceEvent:this.sourceEvent,target:b,type:C,transform:this.that.__zoom,dispatch:d}),Y)}};function O(C,...Y){if(!i.apply(this,arguments))return;var U=z(this,Y).event(C),ee=this.__zoom,Fe=Math.max(a[0],Math.min(a[1],ee.k*Math.pow(2,r.apply(this,arguments)))),xe=Dn(C);if(U.wheel)(U.mouse[0][0]!==xe[0]||U.mouse[0][1]!==xe[1])&&(U.mouse[1]=ee.invert(U.mouse[0]=xe)),clearTimeout(U.wheel);else{if(ee.k===Fe)return;U.mouse=[xe,ee.invert(xe)],Is(this),U.start()}wo(C),U.wheel=setTimeout(ke,g),U.zoom("mouse",t(y(T(ee,Fe),U.mouse[0],U.mouse[1]),U.extent,s));function ke(){U.wheel=null,U.end()}}function W(C,...Y){if(f||!i.apply(this,arguments))return;var U=C.currentTarget,ee=z(this,Y,!0).event(C),Fe=Vi(C.view).on("mousemove.zoom",Ye,!0).on("mouseup.zoom",ce,!0),xe=Dn(C,U),ke=C.clientX,Ge=C.clientY;dv(C.view),ou(C),ee.mouse=[xe,this.__zoom.invert(xe)],Is(this),ee.start();function Ye(ft){if(wo(ft),!ee.moved){var yt=ft.clientX-ke,ot=ft.clientY-Ge;ee.moved=yt*yt+ot*ot>S}ee.event(ft).zoom("mouse",t(y(ee.that.__zoom,ee.mouse[0]=Dn(ft,U),ee.mouse[1]),ee.extent,s))}function ce(ft){Fe.on("mousemove.zoom mouseup.zoom",null),cv(ft.view,ee.moved),wo(ft),ee.event(ft).end()}}function he(C,...Y){if(i.apply(this,arguments)){var U=this.__zoom,ee=Dn(C.changedTouches?C.changedTouches[0]:C,this),Fe=U.invert(ee),xe=U.k*(C.shiftKey?.5:2),ke=t(y(T(U,xe),ee,Fe),e.apply(this,Y),s);wo(C),o>0?Vi(this).transition().duration(o).call(L,ke,ee,C):Vi(this).call(b.transform,ke,ee,C)}}function ne(C,...Y){if(i.apply(this,arguments)){var U=C.touches,ee=U.length,Fe=z(this,Y,C.changedTouches.length===ee).event(C),xe,ke,Ge,Ye;for(ou(C),ke=0;ketypeof i=="function",gv=i=>Array.isArray(i),LE=i=>i instanceof Object,OE=i=>i instanceof Object?i.constructor.name!=="Function"&&i.constructor.name!=="Object":!1,Sp=i=>LE(i)&&!gv(i)&&!pv(i)&&!OE(i);function No(i,e,t){return pv(e)?e(i,t):e}function Gs(i){var e;let t;if(gv(i))t=i;else{const r=Gn(i),n=r==null?void 0:r.rgb();t=[(n==null?void 0:n.r)||0,(n==null?void 0:n.g)||0,(n==null?void 0:n.b)||0,(e=r==null?void 0:r.opacity)!==null&&e!==void 0?e:1]}return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function la(i,e){let t=new Float32Array;return i({framebuffer:e})(()=>{t=i.read()}),t}function RE(i,e,t){return Math.min(Math.max(i,e),t)}class PE{constructor(){this.disableSimulation=Ft.disableSimulation,this.backgroundColor=CE,this.spaceSize=Ft.spaceSize,this.nodeColor=uv,this.nodeGreyoutOpacity=AE,this.nodeSize=fv,this.nodeSizeScale=Ft.nodeSizeScale,this.renderHighlightedNodeRing=!0,this.highlightedNodeRingColor=void 0,this.renderHoveredNodeRing=!0,this.hoveredNodeRingColor=Ft.hoveredNodeRingColor,this.focusedNodeRingColor=Ft.focusedNodeRingColor,this.linkColor=hv,this.linkGreyoutOpacity=IE,this.linkWidth=mv,this.linkWidthScale=Ft.linkWidthScale,this.renderLinks=Ft.renderLinks,this.curvedLinks=Ft.curvedLinks,this.curvedLinkSegments=Ft.curvedLinkSegments,this.curvedLinkWeight=Ft.curvedLinkWeight,this.curvedLinkControlPointDistance=Ft.curvedLinkControlPointDistance,this.linkArrows=Ft.arrowLinks,this.linkArrowsSizeScale=Ft.arrowSizeScale,this.linkVisibilityDistanceRange=Ft.linkVisibilityDistanceRange,this.linkVisibilityMinTransparency=Ft.linkVisibilityMinTransparency,this.useQuadtree=Ft.useQuadtree,this.simulation={decay:Ft.simulation.decay,gravity:Ft.simulation.gravity,center:Ft.simulation.center,repulsion:Ft.simulation.repulsion,repulsionTheta:Ft.simulation.repulsionTheta,repulsionQuadtreeLevels:Ft.simulation.repulsionQuadtreeLevels,linkSpring:Ft.simulation.linkSpring,linkDistance:Ft.simulation.linkDistance,linkDistRandomVariationRange:Ft.simulation.linkDistRandomVariationRange,repulsionFromMouse:Ft.simulation.repulsionFromMouse,friction:Ft.simulation.friction,onStart:void 0,onTick:void 0,onEnd:void 0,onPause:void 0,onRestart:void 0},this.events={onClick:void 0,onMouseMove:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onZoomStart:void 0,onZoom:void 0,onZoomEnd:void 0},this.showFPSMonitor=Ft.showFPSMonitor,this.pixelRatio=Ft.pixelRatio,this.scaleNodesOnZoom=Ft.scaleNodesOnZoom,this.initialZoomLevel=void 0,this.disableZoom=Ft.disableZoom,this.fitViewOnInit=Ft.fitViewOnInit,this.fitViewDelay=Ft.fitViewDelay,this.fitViewByNodesInRect=void 0,this.randomSeed=void 0,this.nodeSamplingDistance=Ft.nodeSamplingDistance}init(e){Object.keys(e).forEach(t=>{this.deepMergeConfig(this.getConfig(),e,t)})}deepMergeConfig(e,t,r){Sp(e[r])&&Sp(t[r])?Object.keys(t[r]).forEach(n=>{this.deepMergeConfig(e[r],t[r],n)}):e[r]=t[r]}getConfig(){return this}}class ma{constructor(e,t,r,n,a){this.reglInstance=e,this.config=t,this.store=r,this.data=n,a&&(this.points=a)}}var FE=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -varying vec4 rgba;void main(){gl_FragColor=rgba;}`,NE=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform float pointsTextureSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.xy,1.0,0.0);gl_Position=vec4(0.0,0.0,0.0,1.0);gl_PointSize=1.0;}`,DE=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform sampler2D centermass;uniform float center;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec4 centermassValues=texture2D(centermass,vec2(0.0));vec2 centermassPosition=centermassValues.xy/centermassValues.b;vec2 distVector=centermassPosition-pointPosition.xy;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*center*dist*0.01;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;function gr(i){return{buffer:i.buffer(new Float32Array([-1,-1,1,-1,-1,1,1,1])),size:2}}function ks(i,e){const t=new Float32Array(e*e*2);for(let n=0;nthis.centermassFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:ks(e,r.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>r.pointsTextureSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.runCommand=e({frag:DE,vert:Er,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,centermass:()=>this.centermassFbo,center:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.center},alpha:()=>r.alpha}})}run(){var e,t,r;(e=this.clearCentermassCommand)===null||e===void 0||e.call(this),(t=this.calculateCentermassCommand)===null||t===void 0||t.call(this),(r=this.runCommand)===null||r===void 0||r.call(this)}destroy(){Mi(this.centermassFbo)}}var zE=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform float gravity;uniform float spaceSize;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 centerPosition=vec2(spaceSize/2.0);vec2 distVector=centerPosition-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*gravity*dist*0.1;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;class BE extends ma{initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:zE,vert:Er,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,gravity:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.gravity},spaceSize:()=>r.adjustedSpaceSize,alpha:()=>r.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}function UE(i){return` -#ifdef GL_ES -precision highp float; -#endif - -uniform sampler2D position; -uniform float linkSpring; -uniform float linkDistance; -uniform vec2 linkDistRandomVariationRange; - -uniform sampler2D linkFirstIndicesAndAmount; -uniform sampler2D linkIndices; -uniform sampler2D linkBiasAndStrength; -uniform sampler2D linkRandomDistanceFbo; - -uniform float pointsTextureSize; -uniform float linksTextureSize; -uniform float alpha; - -varying vec2 index; - -const float MAX_LINKS = ${i}.0; - -void main() { - vec4 pointPosition = texture2D(position, index); - vec4 velocity = vec4(0.0); - - vec4 linkFirstIJAndAmount = texture2D(linkFirstIndicesAndAmount, index); - float iCount = linkFirstIJAndAmount.r; - float jCount = linkFirstIJAndAmount.g; - float linkAmount = linkFirstIJAndAmount.b; - if (linkAmount > 0.0) { - for (float i = 0.0; i < MAX_LINKS; i += 1.0) { - if (i < linkAmount) { - if (iCount >= linksTextureSize) { - iCount = 0.0; - jCount += 1.0; - } - vec2 linkTextureIndex = (vec2(iCount, jCount) + 0.5) / linksTextureSize; - vec4 connectedPointIndex = texture2D(linkIndices, linkTextureIndex); - vec4 biasAndStrength = texture2D(linkBiasAndStrength, linkTextureIndex); - vec4 randomMinDistance = texture2D(linkRandomDistanceFbo, linkTextureIndex); - float bias = biasAndStrength.r; - float strength = biasAndStrength.g; - float randomMinLinkDist = randomMinDistance.r * (linkDistRandomVariationRange.g - linkDistRandomVariationRange.r) + linkDistRandomVariationRange.r; - randomMinLinkDist *= linkDistance; - - iCount += 1.0; - - vec4 connectedPointPosition = texture2D(position, (connectedPointIndex.rg + 0.5) / pointsTextureSize); - float x = connectedPointPosition.x - (pointPosition.x + velocity.x); - float y = connectedPointPosition.y - (pointPosition.y + velocity.y); - float l = sqrt(x * x + y * y); - l = max(l, randomMinLinkDist * 0.99); - l = (l - randomMinLinkDist) / l; - l *= linkSpring * alpha; - l *= strength; - l *= bias; - x *= l; - y *= l; - velocity.x += x; - velocity.y += y; - } - } - } - - gl_FragColor = vec4(velocity.rg, 0.0, 0.0); -} - `}var Wo;(function(i){i.OUTGOING="outgoing",i.INCOMING="incoming"})(Wo||(Wo={}));class Ep extends ma{constructor(){super(...arguments),this.linkFirstIndicesAndAmount=new Float32Array,this.indices=new Float32Array,this.maxPointDegree=0}create(e){const{reglInstance:t,store:{pointsTextureSize:r,linksTextureSize:n},data:a}=this;if(!r||!n)return;this.linkFirstIndicesAndAmount=new Float32Array(r*r*4),this.indices=new Float32Array(n*n*4);const s=new Float32Array(n*n*4),o=new Float32Array(n*n*4),l=e===Wo.INCOMING?a.groupedSourceToTargetLinks:a.groupedTargetToSourceLinks;this.maxPointDegree=0;let d=0;l.forEach((c,u)=>{this.linkFirstIndicesAndAmount[u*4+0]=d%n,this.linkFirstIndicesAndAmount[u*4+1]=Math.floor(d/n),this.linkFirstIndicesAndAmount[u*4+2]=c.size,c.forEach(f=>{var h,g;this.indices[d*4+0]=f%r,this.indices[d*4+1]=Math.floor(f/r);const S=(h=a.degree[a.getInputIndexBySortedIndex(f)])!==null&&h!==void 0?h:0,p=(g=a.degree[a.getInputIndexBySortedIndex(u)])!==null&&g!==void 0?g:0,b=S/(S+p);let T=1/Math.min(S,p);T=Math.sqrt(T),s[d*4+0]=b,s[d*4+1]=T,o[d*4]=this.store.getRandomFloat(0,1),d+=1}),this.maxPointDegree=Math.max(this.maxPointDegree,c.size)}),this.linkFirstIndicesAndAmountFbo=t.framebuffer({color:t.texture({data:this.linkFirstIndicesAndAmount,shape:[r,r,4],type:"float"}),depth:!1,stencil:!1}),this.indicesFbo=t.framebuffer({color:t.texture({data:this.indices,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.biasAndStrengthFbo=t.framebuffer({color:t.texture({data:s,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.randomDistanceFbo=t.framebuffer({color:t.texture({data:o,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1})}initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:()=>UE(this.maxPointDegree),vert:Er,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,linkSpring:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkSpring},linkDistance:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkDistance},linkDistRandomVariationRange:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkDistRandomVariationRange},linkFirstIndicesAndAmount:()=>this.linkFirstIndicesAndAmountFbo,linkIndices:()=>this.indicesFbo,linkBiasAndStrength:()=>this.biasAndStrengthFbo,linkRandomDistanceFbo:()=>this.randomDistanceFbo,pointsTextureSize:()=>r.pointsTextureSize,linksTextureSize:()=>r.linksTextureSize,alpha:()=>r.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}destroy(){Mi(this.linkFirstIndicesAndAmountFbo),Mi(this.indicesFbo),Mi(this.biasAndStrengthFbo),Mi(this.randomDistanceFbo)}}var vv=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -varying vec4 rgba;void main(){gl_FragColor=rgba;}`,_v=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform float pointsTextureSize;uniform float levelTextureSize;uniform float cellSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.rg,1.0,0.0);float n=floor(pointPosition.x/cellSize);float m=floor(pointPosition.y/cellSize);vec2 levelPosition=2.0*(vec2(n,m)+0.5)/levelTextureSize-1.0;gl_Position=vec4(levelPosition,0.0,1.0);gl_PointSize=1.0;}`,GE=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform sampler2D levelFbo;uniform float level;uniform float levels;uniform float levelTextureSize;uniform float repulsion;uniform float alpha;uniform float spaceSize;uniform float theta;varying vec2 index;const float MAX_LEVELS_NUM=14.0;vec2 calcAdd(vec2 ij,vec2 pp){vec2 add=vec2(0.0);vec4 centermass=texture2D(levelFbo,ij);if(centermass.r>0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(l0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(lo.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)}}),this.calculateLevelsCommand=e({frag:vv,vert:_v,framebuffer:(s,o)=>o.levelFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:ks(e,r.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>r.pointsTextureSize,levelTextureSize:(s,o)=>o.levelTextureSize,cellSize:(s,o)=>o.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceCommand=e({frag:GE,vert:Er,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,level:(s,o)=>o.level,levels:this.quadtreeLevels,levelFbo:(s,o)=>o.levelFbo,levelTextureSize:(s,o)=>o.levelTextureSize,alpha:()=>r.alpha,repulsion:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsion},spaceSize:()=>r.adjustedSpaceSize,theta:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsionTheta}},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceFromItsOwnCentermassCommand=e({frag:jE,vert:Er,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,randomValues:()=>this.randomValuesFbo,levelFbo:(s,o)=>o.levelFbo,levelTextureSize:(s,o)=>o.levelTextureSize,alpha:()=>r.alpha,repulsion:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsion},spaceSize:()=>r.adjustedSpaceSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.clearVelocityCommand=e({frag:js,vert:Er,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)}})}run(){var e,t,r,n,a;const{store:s}=this;for(let o=0;o{Mi(e)}),this.levelsFbos.clear()}}function VE(i,e){i=Math.min(i,e);const t=e-i,r=` - float dist = sqrt(l); - if (dist > 0.0) { - float c = alpha * repulsion * centermass.b; - addVelocity += calcAdd(vec2(x, y), l, c); - addVelocity += addVelocity * random.rg; - } - `;function n(a){if(a>=e)return r;{const s=Math.pow(2,a+1),o=new Array(a+1-t).fill(0).map((d,c)=>`pow(2.0, ${a-(c+t)}.0) * i${c+t}`).join("+"),l=new Array(a+1-t).fill(0).map((d,c)=>`pow(2.0, ${a-(c+t)}.0) * j${c+t}`).join("+");return` - for (float ij${a} = 0.0; ij${a} < 4.0; ij${a} += 1.0) { - float i${a} = 0.0; - float j${a} = 0.0; - if (ij${a} == 1.0 || ij${a} == 3.0) i${a} = 1.0; - if (ij${a} == 2.0 || ij${a} == 3.0) j${a} = 1.0; - float i = pow(2.0, ${i}.0) * n / width${a+1} + ${o}; - float j = pow(2.0, ${i}.0) * m / width${a+1} + ${l}; - float groupPosX = (i + 0.5) / ${s}.0; - float groupPosY = (j + 0.5) / ${s}.0; - - vec4 centermass = texture2D(level[${a}], vec2(groupPosX, groupPosY)); - if (centermass.r > 0.0 && centermass.g > 0.0 && centermass.b > 0.0) { - float x = centermass.r / centermass.b - pointPosition.r; - float y = centermass.g / centermass.b - pointPosition.g; - float l = x * x + y * y; - if ((width${a+1} * width${a+1}) / theta < l) { - ${r} - } else { - ${n(a+1)} - } - } - } - `}}return` -#ifdef GL_ES -precision highp float; -#endif - -uniform sampler2D position; -uniform sampler2D randomValues; -uniform float spaceSize; -uniform float repulsion; -uniform float theta; -uniform float alpha; -uniform sampler2D level[${e}]; -varying vec2 index; - -vec2 calcAdd(vec2 xy, float l, float c) { - float distanceMin2 = 1.0; - if (l < distanceMin2) l = sqrt(distanceMin2 * l); - float add = c / l; - return add * xy; -} - -void main() { - vec4 pointPosition = texture2D(position, index); - vec4 random = texture2D(randomValues, index); - - float width0 = spaceSize; - - vec2 velocity = vec2(0.0); - vec2 addVelocity = vec2(0.0); - - ${new Array(e).fill(0).map((a,s)=>`float width${s+1} = width${s} / 2.0;`).join(` -`)} - - for (float n = 0.0; n < pow(2.0, ${t}.0); n += 1.0) { - for (float m = 0.0; m < pow(2.0, ${t}.0); m += 1.0) { - ${n(t)} - } - } - - velocity -= addVelocity; - - gl_FragColor = vec4(velocity, 0.0, 0.0); -} -`}class WE extends ma{constructor(){super(...arguments),this.levelsFbos=new Map,this.quadtreeLevels=0}create(){const{reglInstance:e,store:t}=this;if(!t.pointsTextureSize)return;this.quadtreeLevels=Math.log2(t.adjustedSpaceSize);for(let n=0;nd.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(r)}}),this.calculateLevelsCommand=r({frag:vv,vert:_v,framebuffer:(l,d)=>d.levelFbo,primitive:"points",count:()=>s.nodes.length,attributes:{indexes:ks(r,a.pointsTextureSize)},uniforms:{position:()=>o==null?void 0:o.previousPositionFbo,pointsTextureSize:()=>a.pointsTextureSize,levelTextureSize:(l,d)=>d.levelTextureSize,cellSize:(l,d)=>d.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.quadtreeCommand=r({frag:VE((t=(e=n.simulation)===null||e===void 0?void 0:e.repulsionQuadtreeLevels)!==null&&t!==void 0?t:this.quadtreeLevels,this.quadtreeLevels),vert:Er,framebuffer:()=>o==null?void 0:o.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(r)},uniforms:wi({position:()=>o==null?void 0:o.previousPositionFbo,randomValues:()=>this.randomValuesFbo,spaceSize:()=>a.adjustedSpaceSize,repulsion:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsion},theta:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsionTheta},alpha:()=>a.alpha},Object.fromEntries(this.levelsFbos))})}run(){var e,t,r;const{store:n}=this;for(let a=0;a{Mi(e)}),this.levelsFbos.clear()}}var qE=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform float repulsion;uniform vec2 mousePos;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 mouse=mousePos;vec2 distVector=mouse-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));dist=max(dist,10.0);float angle=atan(distVector.y,distVector.x);float addV=100.0*repulsion/(dist*dist);velocity.rg-=addV*vec2(cos(angle),sin(angle));gl_FragColor=velocity;}`;class XE extends ma{initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:qE,vert:Er,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,mousePos:()=>r.mousePosition,repulsion:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.repulsionFromMouse}}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}var YE=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},bv={exports:{}};(function(i,e){(function(t,r){i.exports=r()})(YE,function(){var t=`
    - - 00 FPS - - - - - - - - - - - - - - -
    `,r=`#gl-bench { - position:absolute; - left:0; - top:0; - z-index:1000; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} - -#gl-bench div { - position: relative; - display: block; - margin: 4px; - padding: 0 7px 0 10px; - background: #6c6; - border-radius: 15px; - cursor: pointer; - opacity: 0.9; -} - -#gl-bench svg { - height: 60px; - margin: 0 -1px; -} - -#gl-bench text { - font-size: 12px; - font-family: Helvetica,Arial,sans-serif; - font-weight: 700; - dominant-baseline: middle; - text-anchor: middle; -} - -#gl-bench .gl-mem { - font-size: 9px; -} - -#gl-bench line { - stroke-width: 5; - stroke: #112211; - stroke-linecap: round; -} - -#gl-bench polyline { - fill: none; - stroke: #112211; - stroke-linecap: round; - stroke-linejoin: round; - stroke-width: 3.5; -} - -#gl-bench rect { - fill: #448844; -} - -#gl-bench .opacity { - stroke: #448844; -} -`;class n{constructor(s,o={}){this.css=r,this.svg=t,this.paramLogger=()=>{},this.chartLogger=()=>{},this.chartLen=20,this.chartHz=20,this.names=[],this.cpuAccums=[],this.gpuAccums=[],this.activeAccums=[],this.chart=new Array(this.chartLen),this.now=()=>performance&&performance.now?performance.now():Date.now(),this.updateUI=()=>{[].forEach.call(this.nodes["gl-gpu-svg"],f=>{f.style.display=this.trackGPU?"inline":"none"})},Object.assign(this,o),this.detected=0,this.finished=[],this.isFramebuffer=0,this.frameId=0;let l,d=0,c,u=f=>{++d<20?l=requestAnimationFrame(u):(this.detected=Math.ceil(1e3*d/(f-c)/70),cancelAnimationFrame(l)),c||(c=f)};if(requestAnimationFrame(u),s){const f=(g,S)=>se(this,null,function*(){return Promise.resolve(setTimeout(()=>{s.getError();const p=this.now()-g;S.forEach((b,T)=>{b&&(this.gpuAccums[T]+=p)})},0))}),h=(g,S,p)=>function(){const b=S.now();g.apply(p,arguments),S.trackGPU&&S.finished.push(f(b,S.activeAccums.slice(0)))};["drawArrays","drawElements","drawArraysInstanced","drawBuffers","drawElementsInstanced","drawRangeElements"].forEach(g=>{s[g]&&(s[g]=h(s[g],this,s))}),s.getExtension=((g,S)=>function(){let p=g.apply(s,arguments);return p&&["drawElementsInstancedANGLE","drawBuffersWEBGL"].forEach(b=>{p[b]&&(p[b]=h(p[b],S,p))}),p})(s.getExtension,this)}if(!this.withoutUI){this.dom||(this.dom=document.body);let f=document.createElement("div");f.id="gl-bench",this.dom.appendChild(f),this.dom.insertAdjacentHTML("afterbegin",'"),this.dom=f,this.dom.addEventListener("click",()=>{this.trackGPU=!this.trackGPU,this.updateUI()}),this.paramLogger=((h,g,S)=>{const p=["gl-cpu","gl-gpu","gl-mem","gl-fps","gl-gpu-svg","gl-chart"],b=Object.assign({},p);return p.forEach(T=>b[T]=g.getElementsByClassName(T)),this.nodes=b,(T,y,v,L,z,I,O)=>{b["gl-cpu"][T].style.strokeDasharray=(y*.27).toFixed(0)+" 100",b["gl-gpu"][T].style.strokeDasharray=(v*.27).toFixed(0)+" 100",b["gl-mem"][T].innerHTML=S[T]?S[T]:L?"mem: "+L.toFixed(0)+"mb":"",b["gl-fps"][T].innerHTML=z.toFixed(0)+" FPS",h(S[T],y,v,L,z,I,O)}})(this.paramLogger,this.dom,this.names),this.chartLogger=((h,g)=>{let S={"gl-chart":g.getElementsByClassName("gl-chart")};return(p,b,T)=>{let y="",v=b.length;for(let L=0;L=1e3){const d=this.frameId-this.paramFrame,c=d/l*1e3;for(let u=0;u{this.gpuAccums[u]=0,this.finished=[]})}this.paramFrame=this.frameId,this.paramTime=o}}if(!this.detected||!this.chartFrame)this.chartFrame=this.frameId,this.chartTime=o,this.circularId=0;else{let l=o-this.chartTime,d=this.chartHz*l/1e3;for(;--d>0&&this.detected;){const u=(this.frameId-this.chartFrame)/l*1e3;this.chart[this.circularId%this.chartLen]=u;for(let f=0;f{this.idToNodeMap.set(n.id,n),this.inputIndexToIdMap.set(a,n.id),this.idToIndegreeMap.set(n.id,0),this.idToOutdegreeMap.set(n.id,0)}),this.completeLinks.clear(),t.forEach(n=>{const a=this.idToNodeMap.get(n.source),s=this.idToNodeMap.get(n.target);if(a!==void 0&&s!==void 0){this.completeLinks.add(n);const o=this.idToOutdegreeMap.get(a.id);o!==void 0&&this.idToOutdegreeMap.set(a.id,o+1);const l=this.idToIndegreeMap.get(s.id);l!==void 0&&this.idToIndegreeMap.set(s.id,l+1)}}),this.degree=new Array(e.length),e.forEach((n,a)=>{const s=this.idToOutdegreeMap.get(n.id),o=this.idToIndegreeMap.get(n.id);this.degree[a]=(s!=null?s:0)+(o!=null?o:0)}),this.sortedIndexToInputIndexMap.clear(),this.inputIndexToSortedIndexMap.clear(),Object.entries(this.degree).sort((n,a)=>n[1]-a[1]).forEach(([n],a)=>{const s=+n;this.sortedIndexToInputIndexMap.set(a,s),this.inputIndexToSortedIndexMap.set(s,a),this.idToSortedIndexMap.set(this.inputIndexToIdMap.get(s),a)}),this.groupedSourceToTargetLinks.clear(),this.groupedTargetToSourceLinks.clear(),t.forEach(n=>{const a=this.idToSortedIndexMap.get(n.source),s=this.idToSortedIndexMap.get(n.target);if(a!==void 0&&s!==void 0){this.groupedSourceToTargetLinks.get(a)===void 0&&this.groupedSourceToTargetLinks.set(a,new Set);const o=this.groupedSourceToTargetLinks.get(a);o==null||o.add(s),this.groupedTargetToSourceLinks.get(s)===void 0&&this.groupedTargetToSourceLinks.set(s,new Set);const l=this.groupedTargetToSourceLinks.get(s);l==null||l.add(a)}}),this._nodes=e,this._links=t}getNodeById(e){return this.idToNodeMap.get(e)}getNodeByIndex(e){return this._nodes[e]}getSortedIndexByInputIndex(e){return this.inputIndexToSortedIndexMap.get(e)}getInputIndexBySortedIndex(e){return this.sortedIndexToInputIndexMap.get(e)}getSortedIndexById(e){return e!==void 0?this.idToSortedIndexMap.get(e):void 0}getInputIndexById(e){if(e===void 0)return;const t=this.getSortedIndexById(e);if(t!==void 0)return this.getInputIndexBySortedIndex(t)}getAdjacentNodes(e){var t,r;const n=this.getSortedIndexById(e);if(n===void 0)return;const a=(t=this.groupedSourceToTargetLinks.get(n))!==null&&t!==void 0?t:[],s=(r=this.groupedTargetToSourceLinks.get(n))!==null&&r!==void 0?r:[];return[...new Set([...a,...s])].map(o=>this.getNodeByIndex(this.getInputIndexBySortedIndex(o)))}}var QE=`precision highp float; -#define GLSLIFY 1 -varying vec4 rgbaColor;varying vec2 pos;varying float arrowLength;varying float linkWidthArrowWidthRatio;varying float smoothWidthRatio;varying float useArrow;float map(float value,float min1,float max1,float min2,float max2){return min2+(value-min1)*(max2-min2)/(max1-min1);}void main(){float opacity=1.0;vec3 color=rgbaColor.rgb;float smoothDelta=smoothWidthRatio/2.0;if(useArrow>0.5){float end_arrow=0.5+arrowLength/2.0;float start_arrow=end_arrow-arrowLength;float arrowWidthDelta=linkWidthArrowWidthRatio/2.0;float linkOpacity=rgbaColor.a*smoothstep(0.5-arrowWidthDelta,0.5-arrowWidthDelta-smoothDelta,abs(pos.y));float arrowOpacity=1.0;if(pos.x>start_arrow&&pos.x0.5){linkWidth+=arrowExtraWidth;}smoothWidthRatio=smoothWidth/linkWidth;linkWidthArrowWidthRatio=arrowExtraWidth/linkWidth;float linkWidthPx=linkWidth/transform[0][0];vec3 rgbColor=color.rgb;float opacity=color.a*max(linkVisibilityMinTransparency,map(linkDistPx,linkVisibilityDistanceRange.g,linkVisibilityDistanceRange.r,0.0,1.0));if(greyoutStatusA.r>0.0||greyoutStatusB.r>0.0){opacity*=greyoutOpacity;}rgbaColor=vec4(rgbColor,opacity);float t=position.x;float w=curvedWeight;float tPrev=t-1.0/curvedLinkSegments;float tNext=t+1.0/curvedLinkSegments;vec2 pointCurr=conicParametricCurve(a,b,controlPoint,t,w);vec2 pointPrev=conicParametricCurve(a,b,controlPoint,max(0.0,tPrev),w);vec2 pointNext=conicParametricCurve(a,b,controlPoint,min(tNext,1.0),w);vec2 xBasisCurved=pointNext-pointPrev;vec2 yBasisCurved=normalize(vec2(-xBasisCurved.y,xBasisCurved.x));pointCurr+=yBasisCurved*linkWidthPx*position.y;vec2 p=2.0*pointCurr/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`;const tT=i=>{const e=Q0().exponent(2).range([0,1]).domain([-1,1]),t=Mu(0,i).map(n=>-.5+n/i);t.push(.5);const r=new Array(t.length*2);return t.forEach((n,a)=>{r[a*2]=[e(n*2),.5],r[a*2+1]=[e(n*2),-.5]}),r};class iT extends ma{create(){this.updateColor(),this.updateWidth(),this.updateArrow(),this.updateCurveLineGeometry()}initPrograms(){const{reglInstance:e,config:t,store:r,data:n,points:a}=this,{pointsTextureSize:s}=r,o=[];n.completeLinks.forEach(d=>{const c=n.getSortedIndexById(d.target),u=n.getSortedIndexById(d.source),f=u%s,h=Math.floor(u/s),g=c%s,S=Math.floor(c/s);o.push([f,h]),o.push([g,S])});const l=e.buffer(o);this.drawCurveCommand=e({vert:eT,frag:QE,attributes:{position:{buffer:()=>this.curveLineBuffer,divisor:0},pointA:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},pointB:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*2,stride:Float32Array.BYTES_PER_ELEMENT*4},color:{buffer:()=>this.colorBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},width:{buffer:()=>this.widthBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1},arrow:{buffer:()=>this.arrowBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1}},uniforms:{positions:()=>a==null?void 0:a.currentPositionFbo,particleGreyoutStatus:()=>a==null?void 0:a.greyoutStatusFbo,transform:()=>r.transform,pointsTextureSize:()=>r.pointsTextureSize,nodeSizeScale:()=>t.nodeSizeScale,widthScale:()=>t.linkWidthScale,arrowSizeScale:()=>t.linkArrowsSizeScale,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,ratio:()=>t.pixelRatio,linkVisibilityDistanceRange:()=>t.linkVisibilityDistanceRange,linkVisibilityMinTransparency:()=>t.linkVisibilityMinTransparency,greyoutOpacity:()=>t.linkGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,curvedWeight:()=>t.curvedLinkWeight,curvedLinkControlPointDistance:()=>t.curvedLinkControlPointDistance,curvedLinkSegments:()=>{var d;return t.curvedLinks?(d=t.curvedLinkSegments)!==null&&d!==void 0?d:Ft.curvedLinkSegments:1}},cull:{enable:!0,face:"back"},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},count:()=>{var d,c;return(c=(d=this.curveLineGeometry)===null||d===void 0?void 0:d.length)!==null&&c!==void 0?c:0},instances:()=>n.linksNumber,primitive:"triangle strip"})}draw(){var e;!this.colorBuffer||!this.widthBuffer||!this.curveLineBuffer||(e=this.drawCurveCommand)===null||e===void 0||e.call(this)}updateColor(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{var s;const o=(s=No(a,t.linkColor))!==null&&s!==void 0?s:hv,l=Gs(o);n.push(l)}),this.colorBuffer=e.buffer(n)}updateWidth(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{const s=No(a,t.linkWidth);n.push([s!=null?s:mv])}),this.widthBuffer=e.buffer(n)}updateArrow(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{var s;const o=(s=No(a,t.linkArrows))!==null&&s!==void 0?s:Ft.arrowLinks;n.push([o?1:0])}),this.arrowBuffer=e.buffer(n)}updateCurveLineGeometry(){const{reglInstance:e,config:{curvedLinks:t,curvedLinkSegments:r}}=this;this.curveLineGeometry=tT(t?r!=null?r:Ft.curvedLinkSegments:1),this.curveLineBuffer=e.buffer(this.curveLineGeometry)}destroy(){Wl(this.colorBuffer),Wl(this.widthBuffer),Wl(this.arrowBuffer),Wl(this.curveLineBuffer)}}function rT(i,e,t,r){var n;if(t===0)return;const a=new Float32Array(t*t*4);for(let o=0;o0.0){alpha*=greyoutOpacity;}}`,oT=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 selection[2];uniform bool scaleNodesOnZoom;uniform float maxPointSize;varying vec2 index;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize*ratio);}void main(){vec4 pointPosition=texture2D(position,index);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,index);float size=pSize.r*sizeScale;float left=2.0*(selection[0].x-0.5*pointSize(size))/screenSize.x-1.0;float right=2.0*(selection[1].x+0.5*pointSize(size))/screenSize.x-1.0;float top=2.0*(selection[0].y-0.5*pointSize(size))/screenSize.y-1.0;float bottom=2.0*(selection[1].y+0.5*pointSize(size))/screenSize.y-1.0;gl_FragColor=vec4(0.0,0.0,pointPosition.rg);if(final.x>=left&&final.x<=right&&final.y>=top&&final.y<=bottom){gl_FragColor.r=1.0;}}`,lT=`precision mediump float; -#define GLSLIFY 1 -uniform vec4 color;uniform float width;varying vec2 pos;varying float particleOpacity;const float smoothing=1.05;void main(){vec2 cxy=pos;float r=dot(cxy,cxy);float opacity=smoothstep(r,r*smoothing,1.0);float stroke=smoothstep(width,width*smoothing,r);gl_FragColor=vec4(color.rgb,opacity*stroke*color.a*particleOpacity);}`,dT=`precision mediump float; -#define GLSLIFY 1 -attribute vec2 quad;uniform sampler2D positions;uniform sampler2D particleColor;uniform sampler2D particleGreyoutStatus;uniform sampler2D particleSize;uniform mat3 transform;uniform float pointsTextureSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform bool scaleNodesOnZoom;uniform float pointIndex;uniform float maxPointSize;uniform vec4 color;uniform float greyoutOpacity;varying vec2 pos;varying float particleOpacity;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*transform[0][0];}else{pSize=size*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize);}const float relativeRingRadius=1.3;void main(){pos=quad;vec2 ij=vec2(mod(pointIndex,pointsTextureSize),floor(pointIndex/pointsTextureSize))+0.5;vec4 pointPosition=texture2D(positions,ij/pointsTextureSize);vec4 pSize=texture2D(particleSize,ij/pointsTextureSize);vec4 pColor=texture2D(particleColor,ij/pointsTextureSize);particleOpacity=pColor.a;vec4 greyoutStatus=texture2D(particleGreyoutStatus,ij/pointsTextureSize);if(greyoutStatus.r>0.0){particleOpacity*=greyoutOpacity;}float size=(pointSize(pSize.r*sizeScale)*relativeRingRadius)/transform[0][0];float radius=size*0.5;vec2 a=pointPosition.xy;vec2 b=pointPosition.xy+vec2(0.0,radius);vec2 xBasis=b-a;vec2 yBasis=normalize(vec2(-xBasis.y,xBasis.x));vec2 point=a+xBasis*quad.x+yBasis*radius*quad.y;vec2 p=2.0*point/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`,cT=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -varying vec4 rgba;void main(){gl_FragColor=rgba;}`,uT=`#ifdef GL_ES -precision highp float; -#define GLSLIFY 1 -#endif -uniform sampler2D position;uniform float pointsTextureSize;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 mousePosition;uniform bool scaleNodesOnZoom;uniform float maxPointSize;attribute vec2 indexes;varying vec4 rgba;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize*ratio);}float euclideanDistance(float x1,float x2,float y1,float y2){return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));}void main(){vec4 pointPosition=texture2D(position,(indexes+0.5)/pointsTextureSize);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,indexes/pointsTextureSize);float size=pSize.r*sizeScale;float pointRadius=0.5*pointSize(size);vec2 pointScreenPosition=(final.xy+1.0)*screenSize/2.0;rgba=vec4(0.0);gl_Position=vec4(0.5,0.5,0.0,1.0);if(euclideanDistance(pointScreenPosition.x,mousePosition.x,pointScreenPosition.y,mousePosition.y)this.currentPositionFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>this.previousPositionFbo,velocity:()=>this.velocityFbo,friction:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.friction},spaceSize:()=>r.adjustedSpaceSize}})),this.drawCommand=e({frag:aT,vert:sT,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:ks(e,r.pointsTextureSize)},uniforms:{positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleGreyoutStatus:()=>this.greyoutStatusFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,greyoutOpacity:()=>t.nodeGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.findPointsOnAreaSelectionCommand=e({frag:oT,vert:Er,framebuffer:()=>this.selectedFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,sizeScale:()=>t.nodeSizeScale,transform:()=>r.transform,ratio:()=>t.pixelRatio,"selection[0]":()=>r.selectedArea[0],"selection[1]":()=>r.selectedArea[1],scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize}}),this.clearHoveredFboCommand=e({frag:js,vert:Er,framebuffer:this.hoveredFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)}}),this.findHoveredPointCommand=e({frag:cT,vert:uT,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.hoveredFbo,attributes:{indexes:ks(e,r.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,mousePosition:()=>r.screenMousePosition,maxPointSize:()=>r.maxPointSize},depth:{enable:!1,mask:!1}}),this.clearSampledNodesFboCommand=e({frag:js,vert:Er,framebuffer:()=>this.sampledNodesFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)}}),this.fillSampledNodesFboCommand=e({frag:fT,vert:hT,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.sampledNodesFbo,attributes:{indexes:ks(e,r.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize},depth:{enable:!1,mask:!1}}),this.drawHighlightedCommand=e({frag:lT,vert:dT,attributes:{quad:gr(e)},primitive:"triangle strip",count:4,uniforms:{color:e.prop("color"),width:e.prop("width"),pointIndex:e.prop("pointIndex"),positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleSize:()=>this.sizeFbo,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize,particleGreyoutStatus:()=>this.greyoutStatusFbo,greyoutOpacity:()=>t.nodeGreyoutOpacity},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.trackPointsCommand=e({frag:bT,vert:Er,framebuffer:()=>this.trackedPositionsFbo,primitive:"triangle strip",count:4,attributes:{quad:gr(e)},uniforms:{position:()=>this.currentPositionFbo,trackedIndices:()=>this.trackedIndicesFbo,pointsTextureSize:()=>r.pointsTextureSize}})}updateColor(){const{reglInstance:e,config:t,store:{pointsTextureSize:r},data:n}=this;r&&(this.colorFbo=rT(n,e,r,t.nodeColor))}updateGreyoutStatus(){const{reglInstance:e,store:t}=this;this.greyoutStatusFbo=nT(t.selectedIndices,e,t.pointsTextureSize)}updateSize(){const{reglInstance:e,config:t,store:{pointsTextureSize:r},data:n}=this;r&&(this.sizeByIndex=new Float32Array(n.nodes.length),this.sizeFbo=pT(n,e,r,t.nodeSize,this.sizeByIndex))}updateSampledNodesGrid(){const{store:{screenSize:e},config:{nodeSamplingDistance:t},reglInstance:r}=this,n=t!=null?t:Math.min(...e)/2,a=Math.ceil(e[0]/n),s=Math.ceil(e[1]/n);Mi(this.sampledNodesFbo),this.sampledNodesFbo=r.framebuffer({shape:[a,s],depth:!1,stencil:!1,colorType:"float"})}trackPoints(){var e;!this.trackedIndicesFbo||!this.trackedPositionsFbo||(e=this.trackPointsCommand)===null||e===void 0||e.call(this)}draw(){var e,t,r;const{config:{renderHoveredNodeRing:n,renderHighlightedNodeRing:a},store:s}=this;(e=this.drawCommand)===null||e===void 0||e.call(this),(n!=null?n:a)&&s.hoveredNode&&((t=this.drawHighlightedCommand)===null||t===void 0||t.call(this,{width:.85,color:s.hoveredNodeRingColor,pointIndex:s.hoveredNode.index})),s.focusedNode&&((r=this.drawHighlightedCommand)===null||r===void 0||r.call(this,{width:.75,color:s.focusedNodeRingColor,pointIndex:s.focusedNode.index}))}updatePosition(){var e;(e=this.updatePositionCommand)===null||e===void 0||e.call(this),this.swapFbo()}findPointsOnAreaSelection(){var e;(e=this.findPointsOnAreaSelectionCommand)===null||e===void 0||e.call(this)}findHoveredPoint(){var e,t;(e=this.clearHoveredFboCommand)===null||e===void 0||e.call(this),(t=this.findHoveredPointCommand)===null||t===void 0||t.call(this)}getNodeRadiusByIndex(e){var t;return(t=this.sizeByIndex)===null||t===void 0?void 0:t[e]}trackNodesByIds(e){this.trackedIds=e.length?e:void 0,this.trackedPositionsById.clear();const t=e.map(r=>this.data.getSortedIndexById(r)).filter(r=>r!==void 0);Mi(this.trackedIndicesFbo),this.trackedIndicesFbo=void 0,Mi(this.trackedPositionsFbo),this.trackedPositionsFbo=void 0,t.length&&(this.trackedIndicesFbo=_T(t,this.store.pointsTextureSize,this.reglInstance),this.trackedPositionsFbo=vT(t,this.reglInstance)),this.trackPoints()}getTrackedPositions(){if(!this.trackedIds)return this.trackedPositionsById;const e=la(this.reglInstance,this.trackedPositionsFbo);return this.trackedIds.forEach((t,r)=>{const n=e[r*4],a=e[r*4+1];n!==void 0&&a!==void 0&&this.trackedPositionsById.set(t,[n,a])}),this.trackedPositionsById}getSampledNodePositionsMap(){var e,t,r;const n=new Map;if(!this.sampledNodesFbo)return n;(e=this.clearSampledNodesFboCommand)===null||e===void 0||e.call(this),(t=this.fillSampledNodesFboCommand)===null||t===void 0||t.call(this);const a=la(this.reglInstance,this.sampledNodesFbo);for(let s=0;sp.x).filter(p=>p!==void 0);if(r.length===0)return;const n=e.map(p=>p.y).filter(p=>p!==void 0);if(n.length===0)return;const[a,s]=Vo(r);if(a===void 0||s===void 0)return;const[o,l]=Vo(n);if(o===void 0||l===void 0)return;const d=s-a,c=l-o,u=Math.max(d,c),f=(u-d)/2,h=(u-c)/2,g=zs().range([0,t!=null?t:Ft.spaceSize]).domain([a-f,s+f]),S=zs().range([0,t!=null?t:Ft.spaceSize]).domain([o-h,l+h]);e.forEach(p=>{p.x=g(p.x),p.y=S(p.y)})}}const ju=.001,Hu=64;class xT{constructor(){this.pointsTextureSize=0,this.linksTextureSize=0,this.alpha=1,this.transform=OS(),this.backgroundColor=[0,0,0,0],this.screenSize=[0,0],this.mousePosition=[0,0],this.screenMousePosition=[0,0],this.selectedArea=[[0,0],[0,0]],this.isSimulationRunning=!1,this.simulationProgress=0,this.selectedIndices=null,this.maxPointSize=Hu,this.hoveredNode=void 0,this.focusedNode=void 0,this.adjustedSpaceSize=Ft.spaceSize,this.hoveredNodeRingColor=[1,1,1,kE],this.focusedNodeRingColor=[1,1,1,$E],this.alphaTarget=0,this.scaleNodeX=zs(),this.scaleNodeY=zs(),this.random=new lv,this.alphaDecay=e=>1-Math.pow(ju,1/e)}addRandomSeed(e){this.random=this.random.clone(e)}getRandomFloat(e,t){return this.random.float(e,t)}adjustSpaceSize(e,t){e>=t?(this.adjustedSpaceSize=t/2,console.warn(`The \`spaceSize\` has been reduced to ${this.adjustedSpaceSize} due to WebGL limits`)):this.adjustedSpaceSize=e}updateScreenSize(e,t){const{adjustedSpaceSize:r}=this;this.screenSize=[e,t],this.scaleNodeX.domain([0,r]).range([(e-r)/2,(e+r)/2]),this.scaleNodeY.domain([r,0]).range([(t-r)/2,(t+r)/2])}scaleX(e){return this.scaleNodeX(e)}scaleY(e){return this.scaleNodeY(e)}setHoveredNodeRingColor(e){const t=Gs(e);this.hoveredNodeRingColor[0]=t[0],this.hoveredNodeRingColor[1]=t[1],this.hoveredNodeRingColor[2]=t[2]}setFocusedNodeRingColor(e){const t=Gs(e);this.focusedNodeRingColor[0]=t[0],this.focusedNodeRingColor[1]=t[1],this.focusedNodeRingColor[2]=t[2]}setFocusedNode(e,t){e&&t!==void 0?this.focusedNode={node:e,index:t}:this.focusedNode=void 0}addAlpha(e){return(this.alphaTarget-this.alpha)*this.alphaDecay(e)}}class wT{constructor(e,t){this.eventTransform=Fo,this.behavior=TE().scaleExtent([.001,1/0]).on("start",r=>{var n,a,s;this.isRunning=!0;const o=!!r.sourceEvent;(s=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoomStart)===null||s===void 0||s.call(a,r,o)}).on("zoom",r=>{var n,a,s;this.eventTransform=r.transform;const{eventTransform:{x:o,y:l,k:d},store:{transform:c,screenSize:u}}=this,f=u[0],h=u[1];RS(c,f,h),_p(c,c,[o,l]),su(c,c,[d,d]),_p(c,c,[f/2,h/2]),su(c,c,[f/2,h/2]),su(c,c,[1,-1]);const g=!!r.sourceEvent;(s=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoom)===null||s===void 0||s.call(a,r,g)}).on("end",r=>{var n,a,s;this.isRunning=!1;const o=!!r.sourceEvent;(s=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoomEnd)===null||s===void 0||s.call(a,r,o)}),this.isRunning=!1,this.store=e,this.config=t}getTransform(e,t,r=.1){if(e.length===0)return this.eventTransform;const{store:{screenSize:n}}=this,a=n[0],s=n[1],o=Vo(e.map(b=>b[0])),l=Vo(e.map(b=>b[1]));o[0]=this.store.scaleX(o[0]),o[1]=this.store.scaleX(o[1]),l[0]=this.store.scaleY(l[0]),l[1]=this.store.scaleY(l[1]);const d=a*(1-r*2)/(o[1]-o[0]),c=s*(1-r*2)/(l[0]-l[1]),u=RE(t!=null?t:Math.min(d,c),...this.behavior.scaleExtent()),f=(o[1]+o[0])/2,h=(l[1]+l[0])/2,g=a/2-f*u,S=s/2-h*u;return Fo.translate(g,S).scale(u)}getDistanceToPoint(e){const{x:t,y:r,k:n}=this.eventTransform,a=this.getTransform([e],n),s=t-a.x,o=r-a.y;return Math.sqrt(s*s+o*o)}getMiddlePointTransform(e){const{store:{screenSize:t},eventTransform:{x:r,y:n,k:a}}=this,s=t[0],o=t[1],l=(s/2-r)/a,d=(o/2-n)/a,c=this.store.scaleX(e[0]),u=this.store.scaleY(e[1]),f=(l+c)/2,h=(d+u)/2,g=1,S=s/2-f*g,p=o/2-h*g;return Fo.translate(S,p).scale(g)}convertScreenToSpacePosition(e){const{eventTransform:{x:t,y:r,k:n},store:{screenSize:a}}=this,s=a[0],o=a[1],l=(e[0]-t)/n,d=(e[1]-r)/n,c=[l,o-d];return c[0]-=(s-this.store.adjustedSpaceSize)/2,c[1]-=(o-this.store.adjustedSpaceSize)/2,c}convertSpaceToScreenPosition(e){const t=this.eventTransform.applyX(this.store.scaleX(e[0])),r=this.eventTransform.applyY(this.store.scaleY(e[1]));return[t,r]}convertSpaceToScreenRadius(e){const{config:{scaleNodesOnZoom:t},store:{maxPointSize:r},eventTransform:{k:n}}=this;let a=e*2;return t?a*=n:a*=Math.min(5,Math.max(1,n*.01)),Math.min(a,r)/2}}class ST{constructor(e,t){var r,n;this.config=new PE,this.graph=new JE,this.requestAnimationFrameId=0,this.isRightClickMouse=!1,this.store=new xT,this.zoomInstance=new wT(this.store,this.config),this.hasParticleSystemDestroyed=!1,this._findHoveredPointExecutionCount=0,this._isMouseOnCanvas=!1,this._isFirstDataAfterInit=!0,t&&this.config.init(t);const a=e.clientWidth,s=e.clientHeight;e.width=a*this.config.pixelRatio,e.height=s*this.config.pixelRatio,e.style.width===""&&e.style.height===""&&Vi(e).style("width","100%").style("height","100%"),this.canvas=e,this.canvasD3Selection=Vi(e),this.canvasD3Selection.on("mouseenter.cosmos",()=>{this._isMouseOnCanvas=!0}).on("mouseleave.cosmos",()=>{this._isMouseOnCanvas=!1}),this.zoomInstance.behavior.on("start.detect",o=>{this.currentEvent=o}).on("zoom.detect",o=>{!!o.sourceEvent&&this.updateMousePosition(o.sourceEvent),this.currentEvent=o}).on("end.detect",o=>{this.currentEvent=o}),this.canvasD3Selection.call(this.zoomInstance.behavior).on("click",this.onClick.bind(this)).on("mousemove",this.onMouseMove.bind(this)).on("contextmenu",this.onRightClickMouse.bind(this)),this.config.disableZoom&&this.disableZoom(),this.setZoomLevel((r=this.config.initialZoomLevel)!==null&&r!==void 0?r:1),this.reglInstance=A2({canvas:this.canvas,attributes:{antialias:!1,preserveDrawingBuffer:!0},extensions:["OES_texture_float","ANGLE_instanced_arrays"]}),this.store.maxPointSize=((n=this.reglInstance.limits.pointSizeDims[1])!==null&&n!==void 0?n:Hu)/this.config.pixelRatio,this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.store.updateScreenSize(a,s),this.points=new yT(this.reglInstance,this.config,this.store,this.graph),this.lines=new iT(this.reglInstance,this.config,this.store,this.graph,this.points),this.config.disableSimulation||(this.forceGravity=new BE(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceCenter=new ME(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceManyBody=this.config.useQuadtree?new WE(this.reglInstance,this.config,this.store,this.graph,this.points):new HE(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkIncoming=new Ep(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkOutgoing=new Ep(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceMouse=new XE(this.reglInstance,this.config,this.store,this.graph,this.points)),this.store.backgroundColor=Gs(this.config.backgroundColor),this.config.highlightedNodeRingColor?(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)):(this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor)),this.config.showFPSMonitor&&(this.fpsMonitor=new Tp(this.canvas)),this.config.randomSeed!==void 0&&this.store.addRandomSeed(this.config.randomSeed)}get progress(){return this.store.simulationProgress}get isSimulationRunning(){return this.store.isSimulationRunning}get maxPointSize(){return this.store.maxPointSize}setConfig(e){var t,r;const n=wi({},this.config);this.config.init(e),n.linkColor!==this.config.linkColor&&this.lines.updateColor(),n.nodeColor!==this.config.nodeColor&&this.points.updateColor(),n.nodeSize!==this.config.nodeSize&&this.points.updateSize(),n.linkWidth!==this.config.linkWidth&&this.lines.updateWidth(),n.linkArrows!==this.config.linkArrows&&this.lines.updateArrow(),(n.curvedLinkSegments!==this.config.curvedLinkSegments||n.curvedLinks!==this.config.curvedLinks)&&this.lines.updateCurveLineGeometry(),n.backgroundColor!==this.config.backgroundColor&&(this.store.backgroundColor=Gs(this.config.backgroundColor)),n.highlightedNodeRingColor!==this.config.highlightedNodeRingColor&&(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)),n.hoveredNodeRingColor!==this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),n.focusedNodeRingColor!==this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor),(n.spaceSize!==this.config.spaceSize||n.simulation.repulsionQuadtreeLevels!==this.config.simulation.repulsionQuadtreeLevels)&&(this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.resizeCanvas(!0),this.update(this.store.isSimulationRunning)),n.showFPSMonitor!==this.config.showFPSMonitor&&(this.config.showFPSMonitor?this.fpsMonitor=new Tp(this.canvas):((t=this.fpsMonitor)===null||t===void 0||t.destroy(),this.fpsMonitor=void 0)),n.pixelRatio!==this.config.pixelRatio&&(this.store.maxPointSize=((r=this.reglInstance.limits.pointSizeDims[1])!==null&&r!==void 0?r:Hu)/this.config.pixelRatio),n.disableZoom!==this.config.disableZoom&&(this.config.disableZoom?this.disableZoom():this.enableZoom())}setData(e,t,r=!0){const{fitViewOnInit:n,fitViewDelay:a,fitViewByNodesInRect:s,initialZoomLevel:o}=this.config;if(!e.length&&!t.length){this.destroyParticleSystem(),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0});return}this.graph.setData(e,t),this._isFirstDataAfterInit&&n&&o===void 0&&(this._fitViewOnInitTimeoutID=window.setTimeout(()=>{s?this.setZoomTransformByNodePositions(s,void 0,void 0,0):this.fitView()},a)),this._isFirstDataAfterInit=!1,this.update(r)}zoomToNodeById(e,t=700,r=wp,n=!0){const a=this.graph.getNodeById(e);a&&this.zoomToNode(a,t,r,n)}zoomToNodeByIndex(e,t=700,r=wp,n=!0){const a=this.graph.getNodeByIndex(e);a&&this.zoomToNode(a,t,r,n)}zoom(e,t=0){this.setZoomLevel(e,t)}setZoomLevel(e,t=0){t===0?this.canvasD3Selection.call(this.zoomInstance.behavior.scaleTo,e):this.canvasD3Selection.transition().duration(t).call(this.zoomInstance.behavior.scaleTo,e)}getZoomLevel(){return this.zoomInstance.eventTransform.k}getNodePositions(){if(this.hasParticleSystemDestroyed)return{};const e=la(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((t,r)=>{const n=this.graph.getSortedIndexById(r.id),a=e[n*4+0],s=e[n*4+1];return a!==void 0&&s!==void 0&&(t[r.id]={x:a,y:s}),t},{})}getNodePositionsMap(){const e=new Map;if(this.hasParticleSystemDestroyed)return e;const t=la(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((r,n)=>{const a=this.graph.getSortedIndexById(n.id),s=t[a*4+0],o=t[a*4+1];return s!==void 0&&o!==void 0&&r.set(n.id,[s,o]),r},e)}getNodePositionsArray(){const e=[];if(this.hasParticleSystemDestroyed)return[];const t=la(this.reglInstance,this.points.currentPositionFbo);e.length=this.graph.nodes.length;for(let r=0;rn.get(s)).filter(s=>s!==void 0);this.setZoomTransformByNodePositions(a,t,void 0,r)}selectNodesInRange(e){if(e){const t=this.store.screenSize[1];this.store.selectedArea=[[e[0][0],t-e[1][1]],[e[1][0],t-e[0][1]]],this.points.findPointsOnAreaSelection();const r=la(this.reglInstance,this.points.selectedFbo);this.store.selectedIndices=r.map((n,a)=>a%4===0&&n!==0?a/4:-1).filter(n=>n!==-1)}else this.store.selectedIndices=null;this.points.updateGreyoutStatus()}selectNodeById(e,t=!1){var r;if(t){const n=(r=this.graph.getAdjacentNodes(e))!==null&&r!==void 0?r:[];this.selectNodesByIds([e,...n.map(a=>a.id)])}else this.selectNodesByIds([e])}selectNodeByIndex(e,t=!1){const r=this.graph.getNodeByIndex(e);r&&this.selectNodeById(r.id,t)}selectNodesByIds(e){this.selectNodesByIndices(e==null?void 0:e.map(t=>this.graph.getSortedIndexById(t)))}selectNodesByIndices(e){e?e.length===0?this.store.selectedIndices=new Float32Array:this.store.selectedIndices=new Float32Array(e.filter(t=>t!==void 0)):this.store.selectedIndices=null,this.points.updateGreyoutStatus()}unselectNodes(){this.store.selectedIndices=null,this.points.updateGreyoutStatus()}getSelectedNodes(){const{selectedIndices:e}=this.store;if(!e)return null;const t=new Array(e.length);for(const[r,n]of e.entries())if(n!==void 0){const a=this.graph.getInputIndexBySortedIndex(n);a!==void 0&&(t[r]=this.graph.nodes[a])}return t}getAdjacentNodes(e){return this.graph.getAdjacentNodes(e)}setFocusedNodeById(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeById(e),this.graph.getSortedIndexById(e))}setFocusedNodeByIndex(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeByIndex(e),e)}spaceToScreenPosition(e){return this.zoomInstance.convertSpaceToScreenPosition(e)}spaceToScreenRadius(e){return this.zoomInstance.convertSpaceToScreenRadius(e)}getNodeRadiusByIndex(e){return this.points.getNodeRadiusByIndex(e)}getNodeRadiusById(e){const t=this.graph.getInputIndexById(e);if(t!==void 0)return this.points.getNodeRadiusByIndex(t)}trackNodePositionsByIds(e){this.points.trackNodesByIds(e)}trackNodePositionsByIndices(e){this.points.trackNodesByIds(e.map(t=>this.graph.getNodeByIndex(t)).filter(t=>t!==void 0).map(t=>t.id))}getTrackedNodePositionsMap(){return this.points.getTrackedPositions()}getSampledNodePositionsMap(){return this.points.getSampledNodePositionsMap()}start(e=1){var t,r;this.graph.nodes.length&&(this.store.isSimulationRunning=!0,this.store.alpha=e,this.store.simulationProgress=0,(r=(t=this.config.simulation).onStart)===null||r===void 0||r.call(t),this.stopFrames(),this.frame())}pause(){var e,t;this.store.isSimulationRunning=!1,(t=(e=this.config.simulation).onPause)===null||t===void 0||t.call(e)}restart(){var e,t;this.store.isSimulationRunning=!0,(t=(e=this.config.simulation).onRestart)===null||t===void 0||t.call(e)}step(){this.store.isSimulationRunning=!1,this.stopFrames(),this.frame()}destroy(){var e,t;window.clearTimeout(this._fitViewOnInitTimeoutID),this.stopFrames(),this.destroyParticleSystem(),(e=this.fpsMonitor)===null||e===void 0||e.destroy(),(t=document.getElementById("gl-bench-style"))===null||t===void 0||t.remove()}create(){var e,t,r,n;this.points.create(),this.lines.create(),(e=this.forceManyBody)===null||e===void 0||e.create(),(t=this.forceLinkIncoming)===null||t===void 0||t.create(Wo.INCOMING),(r=this.forceLinkOutgoing)===null||r===void 0||r.create(Wo.OUTGOING),(n=this.forceCenter)===null||n===void 0||n.create(),this.hasParticleSystemDestroyed=!1}destroyParticleSystem(){var e,t,r,n;this.hasParticleSystemDestroyed||(this.points.destroy(),this.lines.destroy(),(e=this.forceCenter)===null||e===void 0||e.destroy(),(t=this.forceLinkIncoming)===null||t===void 0||t.destroy(),(r=this.forceLinkOutgoing)===null||r===void 0||r.destroy(),(n=this.forceManyBody)===null||n===void 0||n.destroy(),this.reglInstance.destroy(),this.hasParticleSystemDestroyed=!0)}update(e){const{graph:t}=this;this.store.pointsTextureSize=Math.ceil(Math.sqrt(t.nodes.length)),this.store.linksTextureSize=Math.ceil(Math.sqrt(t.linksNumber*2)),this.destroyParticleSystem(),this.create(),this.initPrograms(),this.setFocusedNodeById(),this.store.hoveredNode=void 0,e?this.start():this.step()}initPrograms(){var e,t,r,n,a,s;this.points.initPrograms(),this.lines.initPrograms(),(e=this.forceGravity)===null||e===void 0||e.initPrograms(),(t=this.forceLinkIncoming)===null||t===void 0||t.initPrograms(),(r=this.forceLinkOutgoing)===null||r===void 0||r.initPrograms(),(n=this.forceMouse)===null||n===void 0||n.initPrograms(),(a=this.forceManyBody)===null||a===void 0||a.initPrograms(),(s=this.forceCenter)===null||s===void 0||s.initPrograms()}frame(){const{config:{simulation:e,renderLinks:t,disableSimulation:r},store:{alpha:n,isSimulationRunning:a}}=this;n{var o,l,d,c,u,f,h,g,S,p,b,T,y;(o=this.fpsMonitor)===null||o===void 0||o.begin(),this.resizeCanvas(),this.findHoveredPoint(),r||(this.isRightClickMouse&&(a||this.start(.1),(l=this.forceMouse)===null||l===void 0||l.run(),this.points.updatePosition()),a&&!this.zoomInstance.isRunning&&(e.gravity&&((d=this.forceGravity)===null||d===void 0||d.run(),this.points.updatePosition()),e.center&&((c=this.forceCenter)===null||c===void 0||c.run(),this.points.updatePosition()),(u=this.forceManyBody)===null||u===void 0||u.run(),this.points.updatePosition(),this.store.linksTextureSize&&((f=this.forceLinkIncoming)===null||f===void 0||f.run(),this.points.updatePosition(),(h=this.forceLinkOutgoing)===null||h===void 0||h.run(),this.points.updatePosition()),this.store.alpha+=this.store.addAlpha((g=this.config.simulation.decay)!==null&&g!==void 0?g:Ft.simulation.decay),this.isRightClickMouse&&(this.store.alpha=Math.max(this.store.alpha,.1)),this.store.simulationProgress=Math.sqrt(Math.min(1,ju/this.store.alpha)),(p=(S=this.config.simulation).onTick)===null||p===void 0||p.call(S,this.store.alpha,(b=this.store.hoveredNode)===null||b===void 0?void 0:b.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(T=this.store.hoveredNode)===null||T===void 0?void 0:T.position)),this.points.trackPoints()),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0}),t&&this.store.linksTextureSize&&this.lines.draw(),this.points.draw(),(y=this.fpsMonitor)===null||y===void 0||y.end(s),this.currentEvent=void 0,this.frame()}))}stopFrames(){this.requestAnimationFrameId&&window.cancelAnimationFrame(this.requestAnimationFrameId)}end(){var e,t;this.store.isSimulationRunning=!1,this.store.simulationProgress=1,(t=(e=this.config.simulation).onEnd)===null||t===void 0||t.call(e)}onClick(e){var t,r,n,a;(r=(t=this.config.events).onClick)===null||r===void 0||r.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(a=this.store.hoveredNode)===null||a===void 0?void 0:a.position,e)}updateMousePosition(e){if(!e||e.offsetX===void 0||e.offsetY===void 0)return;const t=e.offsetX,r=e.offsetY;this.store.mousePosition=this.zoomInstance.convertScreenToSpacePosition([t,r]),this.store.screenMousePosition=[t,this.store.screenSize[1]-r]}onMouseMove(e){var t,r,n,a;this.currentEvent=e,this.updateMousePosition(e),this.isRightClickMouse=e.which===3,(r=(t=this.config.events).onMouseMove)===null||r===void 0||r.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(a=this.store.hoveredNode)===null||a===void 0?void 0:a.position,this.currentEvent)}onRightClickMouse(e){e.preventDefault()}resizeCanvas(e=!1){const t=this.canvas.width,r=this.canvas.height,n=this.canvas.clientWidth,a=this.canvas.clientHeight;if(e||t!==n*this.config.pixelRatio||r!==a*this.config.pixelRatio){const[s,o]=this.store.screenSize,{k:l}=this.zoomInstance.eventTransform,d=this.zoomInstance.convertScreenToSpacePosition([s/2,o/2]);this.store.updateScreenSize(n,a),this.canvas.width=n*this.config.pixelRatio,this.canvas.height=a*this.config.pixelRatio,this.reglInstance.poll(),this.canvasD3Selection.call(this.zoomInstance.behavior.transform,this.zoomInstance.getTransform([d],l)),this.points.updateSampledNodesGrid()}}setZoomTransformByNodePositions(e,t=250,r,n){this.resizeCanvas();const a=this.zoomInstance.getTransform(e,r,n);this.canvasD3Selection.transition().ease(y2).duration(t).call(this.zoomInstance.behavior.transform,a)}zoomToNode(e,t,r,n){const{graph:a,store:{screenSize:s}}=this,o=la(this.reglInstance,this.points.currentPositionFbo),l=a.getSortedIndexById(e.id);if(l===void 0)return;const d=o[l*4+0],c=o[l*4+1];if(d===void 0||c===void 0)return;const u=this.zoomInstance.getDistanceToPoint([d,c]),f=n?r:Math.max(this.getZoomLevel(),r);if(u{if(So)return;So=document.createElement("style"),So.innerHTML=` - :root { - --css-label-background-color: #1e2428; - --css-label-brightness: brightness(150%); - } - - .${Vu} { - position: absolute; - top: 0; - left: 0; - - font-weight: 500; - cursor: pointer; - - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - filter: var(--css-label-brightness); - pointer-events: none; - background-color: var(--css-label-background-color); - font-weight: 700; - border-radius: 6px; - - transition: opacity 600ms; - opacity: 1; - } - - .${yv} { - opacity: 0 !important; - } -`;const i=document.head.getElementsByTagName("style")[0];i?document.head.insertBefore(So,i):document.head.appendChild(So)};class xv{constructor(e,t){this.element=document.createElement("div"),this.fontWidthHeightRatio=.6,this._x=0,this._y=0,this._estimatedWidth=0,this._estimatedHeight=0,this._visible=!1,this._prevVisible=!1,this._weight=0,this._customFontSize=ql,this._customColor=void 0,this._customOpacity=void 0,this._shouldBeShown=!1,this._text="",this._customPadding={left:hs,top:fs,right:hs,bottom:fs},TT(),this._container=e,this._updateClasses(),t&&this.setText(t),this.resetFontSize(),this.resetPadding()}setText(e){this._text!==e&&(this._text=e,this.element.innerHTML=e,this._measureText())}setPosition(e,t){this._x=e,this._y=t}setStyle(e){if(this._customStyle!==e&&(this._customStyle=e,this.element.style.cssText=this._customStyle,this._customColor&&(this.element.style.color=this._customColor),this._customOpacity&&(this.element.style.opacity=String(this._customOpacity)),this._customPointerEvents&&(this.element.style.pointerEvents=this._customPointerEvents),this._customFontSize&&(this.element.style.fontSize=`${this._customFontSize}px`),this._customPadding)){const{top:t,right:r,bottom:n,left:a}=this._customPadding;this.element.style.padding=`${t}px ${r}px ${n}px ${a}px`}}setClassName(e){this._customClassName!==e&&(this._customClassName=e,this._updateClasses())}setFontSize(e=ql){this._customFontSize!==e&&(this.element.style.fontSize=`${e}px`,this._customFontSize=e,this._measureText())}resetFontSize(){this.element.style.fontSize=`${ql}px`,this._customFontSize=ql,this._measureText()}setColor(e){this._customColor!==e&&(this.element.style.color=e,this._customColor=e)}resetColor(){this.element.style.removeProperty("color"),this._customColor=void 0}setOpacity(e){this._customOpacity!==e&&(this.element.style.opacity=String(e),this._customOpacity=e)}resetOpacity(){this.element.style.removeProperty("opacity"),this._customOpacity=void 0}setPointerEvents(e){this._customPointerEvents!==e&&(this.element.style.pointerEvents=`${e}`,this._customPointerEvents=e)}resetPointerEvents(){this.element.style.removeProperty("pointer-events"),this._customPointerEvents=void 0}setPadding(e={left:hs,top:fs,right:hs,bottom:fs}){(this._customPadding.left!==e.left||this._customPadding.top!==e.top||this._customPadding.right!==e.right||this._customPadding.bottom!==e.bottom)&&(this._customPadding=e,this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._measureText())}resetPadding(){const e={left:hs,top:fs,right:hs,bottom:fs};this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._customPadding=e,this._measureText()}setForceShow(e){this._shouldBeShown=e}getForceShow(){return this._shouldBeShown}draw(){const e=this.getVisibility();e!==this._prevVisible&&(this._prevVisible===!1?this._container.appendChild(this.element):this._container.removeChild(this.element),this._updateClasses(),this._prevVisible=e),e&&(this.element.style.transform=` - translate(-50%, -100%) - translate3d(${this._x}px, ${this._y}px, 0) - `)}overlaps(e){return ET({height:this._estimatedHeight,width:this._estimatedWidth,x:this._x,y:this._y},{height:e._estimatedHeight,width:e._estimatedWidth,x:e._x,y:e._y})}setVisibility(e=!0){this._visible=e}getVisibility(){return this._visible}isOnScreen(){return this._x>0&&this._y>0&&this._x{this.element.className=`${Vu} ${this._customClassName||""}`}):this.element.className=`${Vu} ${this._customClassName||""} ${yv}`}_measureText(){const{left:e,top:t,right:r,bottom:n}=this._customPadding;this._estimatedWidth=this._customFontSize*this.fontWidthHeightRatio*this.element.innerHTML.length+e+r,this._estimatedHeight=this._customFontSize+t+n}}const ld="css-label--labels-container",wv="css-label--labels-container-hidden";let Eo;const AT=()=>{if(Eo)return;Eo=document.createElement("style"),Eo.innerHTML=` - .${ld} { - transition: opacity 100ms; - position: absolute; - width: 100%; - height: 100%; - overflow: hidden; - top: 0%; - pointer-events: none; - opacity: 1; - } - .${wv} { - opacity: 0; - - div { - pointer-events: none; - } - } -`;const i=document.head.getElementsByTagName("style")[0];i?document.head.insertBefore(Eo,i):document.head.appendChild(Eo)};class IT{constructor(e,t){this._cssLabels=new Map,this._elementToData=new Map,AT(),this._container=e,e.addEventListener("click",this._onClick.bind(this)),this._container.className=ld,t!=null&&t.onLabelClick&&(this._onClickCallback=t.onLabelClick),t!=null&&t.padding&&(this._padding=t.padding),t!=null&&t.pointerEvents&&(this._pointerEvents=t.pointerEvents),t!=null&&t.dispatchWheelEventElement&&(this._dispatchWheelEventElement=t.dispatchWheelEventElement,this._container.addEventListener("wheel",this._onWheel.bind(this)))}setLabels(e){const t=new Map(this._cssLabels);e.forEach(r=>{const{x:n,y:a,fontSize:s,color:o,text:l,weight:d,opacity:c,shouldBeShown:u,style:f,className:h}=r;if(t.get(r.id))t.delete(r.id);else{const p=new xv(this._container,r.text);this._cssLabels.set(r.id,p),this._elementToData.set(p.element,r)}const S=this._cssLabels.get(r.id);S&&(S.setText(l),S.setPosition(n,a),f!==void 0&&S.setStyle(f),d!==void 0&&S.setWeight(d),s!==void 0&&S.setFontSize(s),o!==void 0&&S.setColor(o),this._padding!==void 0&&S.setPadding(this._padding),this._pointerEvents!==void 0&&S.setPointerEvents(this._pointerEvents),c!==void 0&&S.setOpacity(c),u!==void 0&&S.setForceShow(u),h!==void 0&&S.setClassName(h))});for(const[r]of t){const n=this._cssLabels.get(r);n&&(this._elementToData.delete(n.element),n.destroy()),this._cssLabels.delete(r)}}draw(e=!0){e&&this._intersectLabels(),this._cssLabels.forEach(t=>t.draw())}show(){this._container.className=ld}hide(){this._container.className=`${ld} ${wv}`}destroy(){this._container.removeEventListener("click",this._onClick.bind(this)),this._container.removeEventListener("wheel",this._onWheel.bind(this)),this._cssLabels.forEach(e=>e.destroy())}_onClick(e){var t;const r=this._elementToData.get(e.target);r&&((t=this._onClickCallback)===null||t===void 0||t.call(this,e,r))}_onWheel(e){var t;e.preventDefault();const r=new WheelEvent("wheel",e);(t=this._dispatchWheelEventElement)===null||t===void 0||t.dispatchEvent(r)}_intersectLabels(){const e=Array.from(this._cssLabels.values());e.forEach(t=>t.setVisibility(t.isOnScreen()));for(let t=0;tr.getWeight()?r.setVisibility(a.getForceShow()?!1:r.getForceShow()):a.setVisibility(r.getForceShow()?!1:a.getForceShow());continue}}}}}var Da=[],CT=function(){return Da.some(function(i){return i.activeTargets.length>0})},kT=function(){return Da.some(function(i){return i.skippedTargets.length>0})},Ap="ResizeObserver loop completed with undelivered notifications.",$T=function(){var i;typeof ErrorEvent=="function"?i=new ErrorEvent("error",{message:Ap}):(i=document.createEvent("Event"),i.initEvent("error",!1,!1),i.message=Ap),window.dispatchEvent(i)},qo;(function(i){i.BORDER_BOX="border-box",i.CONTENT_BOX="content-box",i.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(qo||(qo={}));var Ma=function(i){return Object.freeze(i)},LT=function(){function i(e,t){this.inlineSize=e,this.blockSize=t,Ma(this)}return i}(),Sv=function(){function i(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ma(this)}return i.prototype.toJSON=function(){var e=this,t=e.x,r=e.y,n=e.top,a=e.right,s=e.bottom,o=e.left,l=e.width,d=e.height;return{x:t,y:r,top:n,right:a,bottom:s,left:o,width:l,height:d}},i.fromRect=function(e){return new i(e.x,e.y,e.width,e.height)},i}(),kf=function(i){return i instanceof SVGElement&&"getBBox"in i},Ev=function(i){if(kf(i)){var e=i.getBBox(),t=e.width,r=e.height;return!t&&!r}var n=i,a=n.offsetWidth,s=n.offsetHeight;return!(a||s||i.getClientRects().length)},Ip=function(i){var e;if(i instanceof Element)return!0;var t=(e=i==null?void 0:i.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(t&&i instanceof t.Element)},OT=function(i){switch(i.tagName){case"INPUT":if(i.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Do=typeof window!="undefined"?window:{},Xl=new WeakMap,Cp=/auto|scroll/,RT=/^tb|vertical/,PT=/msie|trident/i.test(Do.navigator&&Do.navigator.userAgent),mn=function(i){return parseFloat(i||"0")},$s=function(i,e,t){return i===void 0&&(i=0),e===void 0&&(e=0),t===void 0&&(t=!1),new LT((t?e:i)||0,(t?i:e)||0)},kp=Ma({devicePixelContentBoxSize:$s(),borderBoxSize:$s(),contentBoxSize:$s(),contentRect:new Sv(0,0,0,0)}),Tv=function(i,e){if(e===void 0&&(e=!1),Xl.has(i)&&!e)return Xl.get(i);if(Ev(i))return Xl.set(i,kp),kp;var t=getComputedStyle(i),r=kf(i)&&i.ownerSVGElement&&i.getBBox(),n=!PT&&t.boxSizing==="border-box",a=RT.test(t.writingMode||""),s=!r&&Cp.test(t.overflowY||""),o=!r&&Cp.test(t.overflowX||""),l=r?0:mn(t.paddingTop),d=r?0:mn(t.paddingRight),c=r?0:mn(t.paddingBottom),u=r?0:mn(t.paddingLeft),f=r?0:mn(t.borderTopWidth),h=r?0:mn(t.borderRightWidth),g=r?0:mn(t.borderBottomWidth),S=r?0:mn(t.borderLeftWidth),p=u+d,b=l+c,T=S+h,y=f+g,v=o?i.offsetHeight-y-i.clientHeight:0,L=s?i.offsetWidth-T-i.clientWidth:0,z=n?p+T:0,I=n?b+y:0,O=r?r.width:mn(t.width)-z-L,W=r?r.height:mn(t.height)-I-v,he=O+p+L+T,ne=W+b+v+y,ie=Ma({devicePixelContentBoxSize:$s(Math.round(O*devicePixelRatio),Math.round(W*devicePixelRatio),a),borderBoxSize:$s(he,ne,a),contentBoxSize:$s(O,W,a),contentRect:new Sv(u,l,O,W)});return Xl.set(i,ie),ie},Av=function(i,e,t){var r=Tv(i,t),n=r.borderBoxSize,a=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case qo.DEVICE_PIXEL_CONTENT_BOX:return s;case qo.BORDER_BOX:return n;default:return a}},FT=function(){function i(e){var t=Tv(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Ma([t.borderBoxSize]),this.contentBoxSize=Ma([t.contentBoxSize]),this.devicePixelContentBoxSize=Ma([t.devicePixelContentBoxSize])}return i}(),Iv=function(i){if(Ev(i))return 1/0;for(var e=0,t=i.parentNode;t;)e+=1,t=t.parentNode;return e},NT=function(){var i=1/0,e=[];Da.forEach(function(s){if(s.activeTargets.length!==0){var o=[];s.activeTargets.forEach(function(d){var c=new FT(d.target),u=Iv(d.target);o.push(c),d.lastReportedSize=Av(d.target,d.observedBox),ui?t.activeTargets.push(n):t.skippedTargets.push(n))})})},DT=function(){var i=0;for($p(i);CT();)i=NT(),$p(i);return kT()&&$T(),i>0},lu,Cv=[],MT=function(){return Cv.splice(0).forEach(function(i){return i()})},zT=function(i){if(!lu){var e=0,t=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return MT()}).observe(t,r),lu=function(){t.textContent="".concat(e?e--:e++)}}Cv.push(i),lu()},BT=function(i){zT(function(){requestAnimationFrame(i)})},dd=0,UT=function(){return!!dd},GT=250,jT={attributes:!0,characterData:!0,childList:!0,subtree:!0},Lp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Op=function(i){return i===void 0&&(i=0),Date.now()+i},du=!1,HT=function(){function i(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return i.prototype.run=function(e){var t=this;if(e===void 0&&(e=GT),!du){du=!0;var r=Op(e);BT(function(){var n=!1;try{n=DT()}finally{if(du=!1,e=r-Op(),!UT())return;n?t.run(1e3):e>0?t.run(e):t.start()}})}},i.prototype.schedule=function(){this.stop(),this.run()},i.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,jT)};document.body?t():Do.addEventListener("DOMContentLoaded",t)},i.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Lp.forEach(function(t){return Do.addEventListener(t,e.listener,!0)}))},i.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Lp.forEach(function(t){return Do.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},i}(),Wu=new HT,Rp=function(i){!dd&&i>0&&Wu.start(),dd+=i,!dd&&Wu.stop()},VT=function(i){return!kf(i)&&!OT(i)&&getComputedStyle(i).display==="inline"},WT=function(){function i(e,t){this.target=e,this.observedBox=t||qo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return i.prototype.isActive=function(){var e=Av(this.target,this.observedBox,!0);return VT(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},i}(),qT=function(){function i(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return i}(),Yl=new WeakMap,Pp=function(i,e){for(var t=0;t=0&&(a&&Da.splice(Da.indexOf(r),1),r.observationTargets.splice(n,1),Rp(-1))},i.disconnect=function(e){var t=this,r=Yl.get(e);r.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),r.activeTargets.splice(0,r.activeTargets.length)},i}(),qu=function(){function i(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Kl.connect(this,e)}return i.prototype.observe=function(e,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Kl.observe(this,e,t)},i.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Kl.unobserve(this,e)},i.prototype.disconnect=function(){Kl.disconnect(this)},i.toString=function(){return"function ResizeObserver () { [polyfill code] }"},i}();function XT(i){return i}var YT=3,Fp=1e-6;function KT(i){return"translate("+i+",0)"}function ZT(i){return e=>+i(e)}function JT(i,e){return e=Math.max(0,i.bandwidth()-e*2)/2,i.round()&&(e=Math.round(e)),t=>+i(t)+e}function QT(){return!this.__axis}function eA(i,e){var t=[],r=null,n=null,a=6,s=6,o=3,l=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,d=1,c="y",u=KT;function f(h){var g=r==null?e.ticks?e.ticks.apply(e,t):e.domain():r,S=n==null?e.tickFormat?e.tickFormat.apply(e,t):XT:n,p=Math.max(a,0)+o,b=e.range(),T=+b[0]+l,y=+b[b.length-1]+l,v=(e.bandwidth?JT:ZT)(e.copy(),l),L=h.selection?h.selection():h,z=L.selectAll(".domain").data([null]),I=L.selectAll(".tick").data(g,e).order(),O=I.exit(),W=I.enter().append("g").attr("class","tick"),he=I.select("line"),ne=I.select("text");z=z.merge(z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(W),he=he.merge(W.append("line").attr("stroke","currentColor").attr(c+"2",d*a)),ne=ne.merge(W.append("text").attr("fill","currentColor").attr(c,d*p).attr("dy","0.71em")),h!==L&&(z=z.transition(h),I=I.transition(h),he=he.transition(h),ne=ne.transition(h),O=O.transition(h).attr("opacity",Fp).attr("transform",function(ie){return isFinite(ie=v(ie))?u(ie+l):this.getAttribute("transform")}),W.attr("opacity",Fp).attr("transform",function(ie){var P=this.parentNode.__axis;return u((P&&isFinite(P=P(ie))?P:v(ie))+l)})),O.remove(),z.attr("d",s?"M"+T+","+d*s+"V"+l+"H"+y+"V"+d*s:"M"+T+","+l+"H"+y),I.attr("opacity",1).attr("transform",function(ie){return u(v(ie)+l)}),he.attr(c+"2",d*a),ne.attr(c,d*p).text(S),L.filter(QT).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","middle"),L.each(function(){this.__axis=v})}return f.scale=function(h){return arguments.length?(e=h,f):e},f.ticks=function(){return t=Array.from(arguments),f},f.tickArguments=function(h){return arguments.length?(t=h==null?[]:Array.from(h),f):t.slice()},f.tickValues=function(h){return arguments.length?(r=h==null?null:Array.from(h),f):r&&r.slice()},f.tickFormat=function(h){return arguments.length?(n=h,f):n},f.tickSize=function(h){return arguments.length?(a=s=+h,f):a},f.tickSizeInner=function(h){return arguments.length?(a=+h,f):a},f.tickSizeOuter=function(h){return arguments.length?(s=+h,f):s},f.tickPadding=function(h){return arguments.length?(o=+h,f):o},f.offset=function(h){return arguments.length?(l=+h,f):l},f}function Np(i){return eA(YT,i)}const cu=i=>()=>i;function tA(i,{sourceEvent:e,target:t,selection:r,mode:n,dispatch:a}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function iA(i){i.stopImmediatePropagation()}function uu(i){i.preventDefault(),i.stopImmediatePropagation()}var Dp={name:"drag"},fu={name:"space"},ms={name:"handle"},ps={name:"center"};const{abs:Mp,max:xr,min:wr}=Math;function zp(i){return[+i[0],+i[1]]}function Bp(i){return[zp(i[0]),zp(i[1])]}var cd={name:"x",handles:["w","e"].map(Ad),input:function(i,e){return i==null?null:[[+i[0],e[0][1]],[+i[1],e[1][1]]]},output:function(i){return i&&[i[0][0],i[1][0]]}},hu={name:"y",handles:["n","s"].map(Ad),input:function(i,e){return i==null?null:[[e[0][0],+i[0]],[e[1][0],+i[1]]]},output:function(i){return i&&[i[0][1],i[1][1]]}},Nn={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Up={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Gp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},rA={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},nA={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ad(i){return{type:i}}function aA(i){return!i.ctrlKey&&!i.button}function sA(){var i=this.ownerSVGElement||this;return i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]}function oA(){return navigator.maxTouchPoints||"ontouchstart"in this}function mu(i){for(;!i.__brush;)if(!(i=i.parentNode))return;return i.__brush}function lA(i){return i[0][0]===i[1][0]||i[0][1]===i[1][1]}function dA(){return cA(cd)}function cA(i){var e=sA,t=aA,r=oA,n=!0,a=Dd("start","brush","end"),s=6,o;function l(p){var b=p.property("__brush",S).selectAll(".overlay").data([Ad("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Nn.overlay).merge(b).each(function(){var y=mu(this).extent;Vi(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),p.selectAll(".selection").data([Ad("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Nn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var T=p.selectAll(".handle").data(i.handles,function(y){return y.type});T.exit().remove(),T.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return Nn[y.type]}),p.each(d).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(p,b,T){p.tween?p.on("start.brush",function(y){c(this,arguments).beforestart().start(y)}).on("interrupt.brush end.brush",function(y){c(this,arguments).end(y)}).tween("brush",function(){var y=this,v=y.__brush,L=c(y,arguments),z=v.selection,I=i.input(typeof b=="function"?b.apply(this,arguments):b,v.extent),O=Bd(z,I);function W(he){v.selection=he===1&&I===null?null:O(he),d.call(y),L.brush()}return z!==null&&I!==null?W:W(1)}):p.each(function(){var y=this,v=arguments,L=y.__brush,z=i.input(typeof b=="function"?b.apply(y,v):b,L.extent),I=c(y,v).beforestart();Is(y),L.selection=z===null?null:z,d.call(y),I.start(T).brush(T).end(T)})},l.clear=function(p,b){l.move(p,null,b)};function d(){var p=Vi(this),b=mu(this).selection;b?(p.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),p.selectAll(".handle").style("display",null).attr("x",function(T){return T.type[T.type.length-1]==="e"?b[1][0]-s/2:b[0][0]-s/2}).attr("y",function(T){return T.type[0]==="s"?b[1][1]-s/2:b[0][1]-s/2}).attr("width",function(T){return T.type==="n"||T.type==="s"?b[1][0]-b[0][0]+s:s}).attr("height",function(T){return T.type==="e"||T.type==="w"?b[1][1]-b[0][1]+s:s})):p.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(p,b,T){var y=p.__brush.emitter;return y&&(!T||!y.clean)?y:new u(p,b,T)}function u(p,b,T){this.that=p,this.args=b,this.state=p.__brush,this.active=0,this.clean=T}u.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(p,b){return this.starting?(this.starting=!1,this.emit("start",p,b)):this.emit("brush",p),this},brush:function(p,b){return this.emit("brush",p,b),this},end:function(p,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",p,b)),this},emit:function(p,b,T){var y=Vi(this.that).datum();a.call(p,this.that,new tA(p,{sourceEvent:b,target:l,selection:i.output(this.state.selection),mode:T,dispatch:a}),y)}};function f(p){if(o&&!p.touches||!t.apply(this,arguments))return;var b=this,T=p.target.__data__.type,y=(n&&p.metaKey?T="overlay":T)==="selection"?Dp:n&&p.altKey?ps:ms,v=i===hu?null:rA[T],L=i===cd?null:nA[T],z=mu(b),I=z.extent,O=z.selection,W=I[0][0],he,ne,ie=I[0][1],P,C,Y=I[1][0],U,ee,Fe=I[1][1],xe,ke,Ge=0,Ye=0,ce,ft=v&&L&&n&&p.shiftKey,yt,ot,xt=Array.from(p.touches||[p],ht=>{const Et=ht.identifier;return ht=Dn(ht,b),ht.point0=ht.slice(),ht.identifier=Et,ht});Is(b);var ge=c(b,arguments,!0).beforestart();if(T==="overlay"){O&&(ce=!0);const ht=[xt[0],xt[1]||xt[0]];z.selection=O=[[he=i===hu?W:wr(ht[0][0],ht[1][0]),P=i===cd?ie:wr(ht[0][1],ht[1][1])],[U=i===hu?Y:xr(ht[0][0],ht[1][0]),xe=i===cd?Fe:xr(ht[0][1],ht[1][1])]],xt.length>1&&It(p)}else he=O[0][0],P=O[0][1],U=O[1][0],xe=O[1][1];ne=he,C=P,ee=U,ke=xe;var oe=Vi(b).attr("pointer-events","none"),Qe=oe.selectAll(".overlay").attr("cursor",Nn[T]);if(p.touches)ge.moved=we,ge.ended=Ct;else{var lt=Vi(p.view).on("mousemove.brush",we,!0).on("mouseup.brush",Ct,!0);n&<.on("keydown.brush",Qt,!0).on("keyup.brush",ui,!0),dv(p.view)}d.call(b),ge.start(p,y.name);function we(ht){for(const Et of ht.changedTouches||[ht])for(const ve of xt)ve.identifier===Et.identifier&&(ve.cur=Dn(Et,b));if(ft&&!yt&&!ot&&xt.length===1){const Et=xt[0];Mp(Et.cur[0]-Et[0])>Mp(Et.cur[1]-Et[1])?ot=!0:yt=!0}for(const Et of xt)Et.cur&&(Et[0]=Et.cur[0],Et[1]=Et.cur[1]);ce=!0,uu(ht),It(ht)}function It(ht){const Et=xt[0],ve=Et.point0;var at;switch(Ge=Et[0]-ve[0],Ye=Et[1]-ve[1],y){case fu:case Dp:{v&&(Ge=xr(W-he,wr(Y-U,Ge)),ne=he+Ge,ee=U+Ge),L&&(Ye=xr(ie-P,wr(Fe-xe,Ye)),C=P+Ye,ke=xe+Ye);break}case ms:{xt[1]?(v&&(ne=xr(W,wr(Y,xt[0][0])),ee=xr(W,wr(Y,xt[1][0])),v=1),L&&(C=xr(ie,wr(Fe,xt[0][1])),ke=xr(ie,wr(Fe,xt[1][1])),L=1)):(v<0?(Ge=xr(W-he,wr(Y-he,Ge)),ne=he+Ge,ee=U):v>0&&(Ge=xr(W-U,wr(Y-U,Ge)),ne=he,ee=U+Ge),L<0?(Ye=xr(ie-P,wr(Fe-P,Ye)),C=P+Ye,ke=xe):L>0&&(Ye=xr(ie-xe,wr(Fe-xe,Ye)),C=P,ke=xe+Ye));break}case ps:{v&&(ne=xr(W,wr(Y,he-Ge*v)),ee=xr(W,wr(Y,U+Ge*v))),L&&(C=xr(ie,wr(Fe,P-Ye*L)),ke=xr(ie,wr(Fe,xe+Ye*L)));break}}ee0&&(he=ne-Ge),L<0?xe=ke-Ye:L>0&&(P=C-Ye),y=fu,Qe.attr("cursor",Nn.selection),It(ht));break}default:return}uu(ht)}function ui(ht){switch(ht.keyCode){case 16:{ft&&(yt=ot=ft=!1,It(ht));break}case 18:{y===ps&&(v<0?U=ee:v>0&&(he=ne),L<0?xe=ke:L>0&&(P=C),y=ms,It(ht));break}case 32:{y===fu&&(ht.altKey?(v&&(U=ee-Ge*v,he=ne+Ge*v),L&&(xe=ke-Ye*L,P=C+Ye*L),y=ps):(v<0?U=ee:v>0&&(he=ne),L<0?xe=ke:L>0&&(P=C),y=ms),Qe.attr("cursor",Nn[T]),It(ht));break}default:return}uu(ht)}}function h(p){c(this,arguments).moved(p)}function g(p){c(this,arguments).ended(p)}function S(){var p=this.__brush||{selection:null};return p.extent=Bp(e.apply(this,arguments)),p.dim=i,p}return l.extent=function(p){return arguments.length?(e=typeof p=="function"?p:cu(Bp(p)),l):e},l.filter=function(p){return arguments.length?(t=typeof p=="function"?p:cu(!!p),l):t},l.touchable=function(p){return arguments.length?(r=typeof p=="function"?p:cu(!!p),l):r},l.handleSize=function(p){return arguments.length?(s=+p,l):s},l.keyModifiers=function(p){return arguments.length?(n=!!p,l):n},l.on=function(){var p=a.on.apply(a,arguments);return p===a?l:p},l}const uA='',fA='',hA=wn(".%L"),mA=wn(":%S"),pA=wn("%I:%M"),gA=wn("%I %p"),vA=wn("%a %d"),_A=wn("%b %d"),bA=wn("%b"),yA=wn("%Y"),xA=i=>{const e=new Date(i);return(Pa(e)typeof i=="function",SA=i=>Array.isArray(i),EA=i=>i instanceof Object,Id=i=>i.constructor.name!=="Function"&&i.constructor.name!=="Object",Xu=i=>EA(i)&&!SA(i)&&!wA(i)&&!Id(i),Cd=(i,e=new Map)=>{if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i.getTime());if(i instanceof Array){const t=[];e.set(i,t);for(const r of i)t.push(e.has(r)?e.get(r):Cd(r,e));return i}if(Id(i))return i;if(i instanceof Object){const t={};e.set(i,t);const r=i;return Object.keys(i).reduce((n,a)=>(n[a]=e.has(r[a])?e.get(r[a]):Cd(r[a],e),n),t),t}return i},yn=(i,e,t=new Map)=>{const r=Id(i)?i:Cd(i);return i===e?i:t.has(e)?t.get(e):(t.set(e,r),Object.keys(e).forEach(n=>{Xu(i[n])&&Xu(e[n])?r[n]=yn(i[n],e[n],t):Id(e)?r[n]=e:r[n]=Cd(e[n])}),r)},TA=(i,e,t)=>i>=+e&&+i<=+t,AA=(i,e)=>{const[t,r]=e,n=Array.from(i.keys());let a=0;return n.forEach(s=>{var o;TA(+s,+t,+r)&&(a+=(o=i.get(s))!==null&&o!==void 0?o:0)}),a},IA=i=>{const e=getComputedStyle(i);let t=i.clientWidth,r=i.clientHeight;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),{height:r,width:t}};let CA=class{init(e){const t=this;return Object.keys(e).forEach(r=>{Xu(t[r])?t[r]=yn(t[r],e[r]):t[r]=e[r]}),this}};const kA={top:1,left:0,bottom:1,right:0};let jp=class extends CA{constructor(){super(...arguments),this.allowSelection=!0,this.showAnimationControls=!1,this.animationSpeed=50,this.padding=kA,this.axisTickHeight=25,this.selectionRadius=3,this.selectionPadding=8,this.barCount=100,this.barRadius=1,this.barPadding=.1,this.barTopMargin=3,this.minBarHeight=1,this.dataStep=void 0,this.tickStep=void 0,this.formatter=xA,this.events={onBrush:void 0,onBarHover:void 0,onAnimationPlay:void 0,onAnimationPause:void 0}}};var Hp=[],To=[];function tl(i,e){if(i&&typeof document!="undefined"){var t,r=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var s=Hp.indexOf(a);s===-1&&(s=Hp.push(a)-1,To[s]={}),t=To[s]&&To[s][r]?To[s][r]:To[s][r]=o()}else t=o();i.charCodeAt(0)===65279&&(i=i.substring(1)),t.styleSheet?t.styleSheet.cssText+=i:t.appendChild(document.createTextNode(i))}function o(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var d=Object.keys(e.attributes),c=0;c{n.preventDefault(),this._isAnimationRunning?this.pauseAnimation():this.playAnimation()},this._disableAnimation=()=>{var n,a;this.pauseAnimation(),(n=this._animationControlDiv)===null||n===void 0||n.removeEventListener("click",this._toggleAnimation),(a=this._animationControlDiv)===null||a===void 0||a.remove()},this.playAnimation=()=>{var n,a,s,o;clearInterval(this._animationInterval),this._currentSelectionInPixels&&(this._animationInterval=setInterval(this._animateSelection,this._config.animationSpeed),this._isAnimationRunning=!0,(a=(n=this._config.events).onAnimationPlay)===null||a===void 0||a.call(n,this._isAnimationRunning,this._currentSelection)),(s=this._pauseButtonSvg)===null||s===void 0||s.classList.remove(ii.hidden),(o=this._playButtonSvg)===null||o===void 0||o.classList.add(ii.hidden)},this.pauseAnimation=()=>{var n,a,s,o;clearInterval(this._animationInterval),this._isAnimationRunning=!1,(a=(n=this._config.events).onAnimationPause)===null||a===void 0||a.call(n,this._isAnimationRunning,this._currentSelection),(s=this._pauseButtonSvg)===null||s===void 0||s.classList.add(ii.hidden),(o=this._playButtonSvg)===null||o===void 0||o.classList.remove(ii.hidden)},this.stopAnimation=()=>{var n,a;this.pauseAnimation(),this.setSelection(void 0),(a=(n=this._config.events).onBrush)===null||a===void 0||a.call(n,void 0)},this._animateSelection=()=>{var n,a;const s=this._currentSelectionInPixels;s&&s[0]!==void 0&&s[1]!==void 0&&(this.setSelectionInPixels([s[0]+this._barWidth,s[1]+this._barWidth]),s[1]!==((n=this._currentSelectionInPixels)===null||n===void 0?void 0:n[1])&&((a=this._currentSelectionInPixels)===null||a===void 0?void 0:a[1])!==void 0||this.stopAnimation())},this._checkLastTickPosition=()=>{var n;const a=this._axisGroup.selectAll(".tick:last-of-type").nodes();if(a!=null&&a.length){const s=a[0],o=s==null?void 0:s.getBoundingClientRect().right,l=(n=this._svg)===null||n===void 0?void 0:n.getBoundingClientRect().right;s.style.display=o>=l?"none":"inherit"}},this.destroy=()=>{this._containerNode.innerHTML="",clearInterval(this._animationInterval)},t&&this._config.init(t),this._containerNode=e,this._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._svg.classList.add(ii.timelineSvg),this._animationControlDiv=document.createElement("div"),this._animationControlDiv.classList.add(ii.animationControl),this._containerNode.classList.add(ii.timeline),this._containerNode.appendChild(this._svg),this._noDataDiv=document.createElement("div"),Vi(this._noDataDiv).style("display","none").attr("class",ii.noData).append("div").text("No timeline data"),this._containerNode.appendChild(this._noDataDiv),(r=this._config)===null||r===void 0?void 0:r.showAnimationControls){const n=setInterval(()=>{this._containerNode!==null&&(this._initAnimationControls(),clearInterval(n))},100)}this._barsGroup=Vi(this._svg).append("g").attr("class",ii.bars),this._axisGroup=Vi(this._svg).append("g").attr("class",ii.axis),this._brushGroup=Vi(this._svg).append("g").attr("class",ii.brush),this._timeAxis.tickFormat(this._config.formatter),this._numAxis.tickFormat(this._config.formatter),this._resizeObserver=new qu(n=>{window.requestAnimationFrame(()=>{Array.isArray(n)&&n.length&&this.resize()})}),this._resizeObserver=new qu(()=>{this.resize()}),this._resizeObserver.observe(this._containerNode)}get _barPadding(){return this._barWidth*this._config.barPadding}getCurrentSelection(){return this._currentSelection}getCurrentSelectionInPixels(){return this._currentSelectionInPixels}getBarWidth(){return this._barWidth-this._barPadding}getConfig(){return this._config}getIsAnimationRunning(){return this._isAnimationRunning}setConfig(e){var t,r,n,a,s,o;const l=JSON.parse(JSON.stringify(this._config));e?this._config.init(e):this._config=new jp,!((t=this._config)===null||t===void 0)&&t.showAnimationControls?!((r=this._animationControlDiv)===null||r===void 0)&&r.isConnected||this._initAnimationControls():this._animationControlDiv&&this._disableAnimation(),this._config.allowSelection||this._disableBrush(),this._config.formatter&&(this._timeAxis.tickFormat(this._config.formatter),this._numAxis.tickFormat(this._config.formatter)),((n=this._config)===null||n===void 0?void 0:n.dataStep)===((a=l.config)===null||a===void 0?void 0:a.dataStep)&&((s=this._config)===null||s===void 0?void 0:s.barCount)===((o=l.config)===null||o===void 0?void 0:o.barCount)||this._updateTimelineData(),this.resize()}setTimeData(e){var t,r,n;this._timeData=e==null?void 0:e.filter(a=>!isNaN(+a)&&a!==void 0),this._currentSelection=void 0,(r=(t=this._config.events).onBrush)===null||r===void 0||r.call(t,this._currentSelection),this._updateScales(),Vi(this._noDataDiv).style("display","none"),!((n=this._timeData)===null||n===void 0)&&n.length?(this._dateExtent=Vo(this._timeData),this._updateTimelineData()):(this._barsData=[],this._axisGroup.selectAll("*").remove(),this._barsGroup.selectAll("*").remove(),this._brushGroup.selectAll("*").remove(),Vi(this._noDataDiv).style("display","block"),this._firstRender=!0)}_getBarsData(e,t){var r,n;if(!(e[1]<=e[0])&&(!((r=this._timeData)===null||r===void 0)&&r.length)&&this._dateExtent){const a=D2(this._timeData,c=>c.length,c=>c),s=(n=this._config.dataStep)!==null&&n!==void 0?n:(e[1]-e[0])/(this._config.barCount-1);if(s===0)return;this._bandIntervals=Mu(+e[0],+e[1],s);const o=this._bandIntervals[this._bandIntervals.length-1];let l=this._config.dataStep?+o+s:e[1];t&&(this._bandIntervals=this._bandIntervals.map(c=>new Date(c)),l=new Date(l)),o({rangeStart:c[0],rangeEnd:c[1],count:AA(a,c)}))}}_updateTimelineData(){var e;if(!((e=this._timeData)===null||e===void 0)&&e.length&&this._dateExtent){if(this._isNumericTimeline=!(this._timeData[0]instanceof Date),this._isNumericTimeline)this._getBarsData(this._dateExtent);else{this._timeData=this._timeData.map(r=>new Date(r));const t=this._dateExtent.map(r=>{var n;return(n=r.getTime())!==null&&n!==void 0?n:0});this._getBarsData(t)}this._maxCount=Math.max(...this._barsData.map(t=>t.count))}}setSelection(e,t=!1){var r,n,a,s;const o=this._currentSelection;e&&this._dateExtent&&e[0]>=this._dateExtent[0]&&e[1]<=this._dateExtent[1]&&e[0]0&&e[1]this._activeAxisScale.invert(o)),this._currentSelectionInPixels=(t=this._currentSelection)===null||t===void 0?void 0:t.map(this._activeAxisScale),(r=this._animationControlDiv)===null||r===void 0||r.classList.remove(ii.disabled)):(this._currentSelection=void 0,this._currentSelectionInPixels=void 0,(n=this._animationControlDiv)===null||n===void 0||n.classList.add(ii.disabled)),this._brushInstance&&!this._firstRender&&this._brushGroup.call(this._brushInstance.move,this._currentSelectionInPixels),(s=(a=this._config.events).onBrush)===null||s===void 0||s.call(a,this._currentSelection)}resize(){const{height:e,width:t}=IA(this._containerNode),{offsetWidth:r}=this._animationControlDiv;this._width=t,this._height=e,this._timelineWidth=this._width-this._config.padding.left-this._config.padding.right-r,this._timelineHeight=this._height-this._config.padding.top-this._config.padding.bottom,this._timelineHeight>this._config.padding.top+this._config.padding.bottom&&(this._updateScales(),this._checkLastTickPosition(),this._currentSelection&&this.setSelection(this._currentSelection,!0),this.render())}render(){this._updateBrush(),this._updateBars(),this._updateAxis(),this._firstRender&&(this._firstRender=!1)}_updateAxis(){this._timeData&&(this._axisGroup.style("transform",`translate(${this._config.padding.left}px, ${this._config.padding.top+this._config.axisTickHeight+1+this._config.selectionPadding/2}px)`).call(this._isNumericTimeline?this._numAxis:this._timeAxis).call(e=>e.select(".domain").remove()),this._axisGroup.selectAll(".tick").select("text").attr("class",ii.axisTick).attr("y",0).attr("dy",-this._config.axisTickHeight).attr("dx","5px"),this._axisGroup.selectAll("line").attr("class",ii.axisLine).attr("y2",-this._config.axisTickHeight))}_updateBrush(){var e;this._config.allowSelection&&(this._brushGroup.style("transform",`translate(${this._config.padding.left}px, ${this._config.padding.top}px)`),this._brushInstance=dA().extent([[0,0],[this._timelineWidth,this._timelineHeight]]),this._brushInstance.on("end",({selection:t,sourceEvent:r})=>{var n,a,s,o,l,d,c;r&&(t?(this._currentSelection=t.map(u=>this._activeAxisScale.invert(u)),this._currentSelectionInPixels=(n=this._currentSelection)===null||n===void 0?void 0:n.map(this._activeAxisScale),(a=this._animationControlDiv)===null||a===void 0||a.classList.remove(ii.disabled),(o=(s=this._config.events).onBrush)===null||o===void 0||o.call(s,this._currentSelection)):(this._currentSelection=void 0,this._currentSelectionInPixels=void 0,(d=(l=this._config.events).onBrush)===null||d===void 0||d.call(l,void 0),(c=this._animationControlDiv)===null||c===void 0||c.classList.add(ii.disabled)))}),this._brushGroup.call(this._brushInstance),this._currentSelection?(this._currentSelectionInPixels=this._currentSelection.map(this._activeAxisScale),this._brushGroup.call(this._brushInstance.move,this._currentSelectionInPixels)):(e=this._brushInstance)===null||e===void 0||e.clear(this._brushGroup),this._brushGroup.select("rect.selection").classed(ii.selection,!0).attr("rx",this._config.selectionRadius).attr("ry",this._config.selectionRadius))}_updateBars(){this._barsGroup.style("transform",`translate(${this._config.padding.left}px, ${this._config.padding.top-this._config.selectionPadding/2}px)`);const e=this._barsGroup.selectAll(`.${ii.bar}`).data(this._barsData).join("rect").attr("class",ii.bar).attr("x",t=>this._activeAxisScale(+t.rangeStart)+this._barPadding/2).attr("width",this.getBarWidth()).attr("rx",this._config.barRadius).attr("ry",this._config.barRadius).attr("y",-this._timelineHeight);this._config.events.onBarHover&&e.on("mouseover",this._config.events.onBarHover),e.transition().duration(300).attr("height",t=>this._yScale(t.count)).style("opacity",t=>this._yScale(t.count)===this._config.minBarHeight?.25:1)}_updateScales(){if(!this._dateExtent||!this._barsData.length)return;const e=this._barsData[this._barsData.length-1];if(this._config.tickStep){const n=Mu(+this._dateExtent[0],+this._dateExtent[1],this._config.tickStep);this._isNumericTimeline?this._numAxis.tickValues(n):this._timeAxis.tickValues(n.map(a=>new Date(a)))}this._yScale.range([this._config.minBarHeight,this._timelineHeight-this._config.barTopMargin-this._config.selectionPadding]).domain([0,this._maxCount]).clamp(!0),this._isNumericTimeline?(this._numScale.domain([this._dateExtent[0],e.rangeEnd]).range([0,this._timelineWidth]).clamp(!0),this._activeAxisScale=this._numScale):(this._timeScale.domain([this._dateExtent[0],e.rangeEnd]).range([0,this._timelineWidth]).clamp(!0),this._activeAxisScale=this._timeScale);const t=this._barsData[0],r=this._activeAxisScale(t.rangeEnd)-this._activeAxisScale(t.rangeStart);this._barWidth=r}_disableBrush(){var e,t;(e=this._brushInstance)===null||e===void 0||e.clear(this._brushGroup),this._currentSelectionInPixels=void 0,this._currentSelection=void 0,this.pauseAnimation(),this._brushGroup.selectAll("*").remove(),this._config.showAnimationControls&&((t=this._animationControlDiv)===null||t===void 0||t.classList.add(ii.disabled))}_initAnimationControls(){return se(this,null,function*(){this._containerNode.insertBefore(this._animationControlDiv,this._svg),yield se(this,null,function*(){var e,t;if(!this._animationControlDiv.firstChild){const r=this._svgParser.parseFromString(fA,"image/svg+xml").firstChild,n=this._svgParser.parseFromString(uA,"image/svg+xml").firstChild;this._pauseButtonSvg=(e=this._animationControlDiv)===null||e===void 0?void 0:e.appendChild(n),this._playButtonSvg=(t=this._animationControlDiv)===null||t===void 0?void 0:t.appendChild(r)}}).then(()=>{var e,t,r,n,a;this._isAnimationRunning?((r=this._playButtonSvg)===null||r===void 0||r.classList.add(ii.playAnimation,ii.hidden),(n=this._pauseButtonSvg)===null||n===void 0||n.classList.add(ii.pauseAnimation)):((e=this._playButtonSvg)===null||e===void 0||e.classList.add(ii.playAnimation),(t=this._pauseButtonSvg)===null||t===void 0||t.classList.add(ii.pauseAnimation,ii.hidden)),this._currentSelection||(a=this._animationControlDiv)===null||a===void 0||a.classList.add(ii.disabled),this._animationControlDiv.addEventListener("click",this._toggleAnimation)})})}};var OA=":root{--cosmograph-histogram-text-color:#fff;--cosmograph-histogram-axis-color:#d7d7d7;--cosmograph-histogram-selection-color:#777;--cosmograph-histogram-selection-opacity:0.5;--cosmograph-histogram-bar-color:#7a7a7a;--cosmograph-histogram-highlighted-bar-color:#fff;--cosmograph-histogram-font-family:inherit;--cosmograph-histogram-font-size:11px;--cosmograph-histogram-background:#222}.style_module_histogram__ee5eb209{background:var(--cosmograph-histogram-background);display:flex;position:relative;width:100%}.style_module_histogramSvg__ee5eb209{height:100%;position:relative;width:100%}.style_module_selection__ee5eb209{fill:var(--cosmograph-histogram-selection-color);fill-opacity:var(--cosmograph-histogram-selection-opacity);stroke:none}.style_module_axisTick__ee5eb209{alignment-baseline:text-before-edge;text-anchor:initial;font-size:var(--cosmograph-histogram-font-size);font-weight:400;opacity:1;user-select:none}.style_module_bar__ee5eb209{fill:var(--cosmograph-histogram-bar-color);transform:scaleY(-1)}.style_module_highlightedBar__ee5eb209{fill:var(--cosmograph-histogram-highlighted-bar-color);pointer-events:none;transform:scaleY(-1)}.style_module_axis__ee5eb209{color:var(--cosmograph-histogram-axis-color)}.style_module_noData__ee5eb209{height:100%;position:absolute;top:0;width:100%}.style_module_noData__ee5eb209 div{align-items:center;display:flex;font-size:calc(var(--cosmograph-histogram-font-size));font-weight:300;height:100%;justify-content:center;letter-spacing:1;opacity:.25;user-select:none}";tl(OA,{});const Mo={isDisabled:!1,minMatch:1,limitSuggestions:50,truncateValues:100,maxVisibleItems:10,openListUpwards:!1,placeholder:"Search...",activeAccessorIndex:void 0,accessors:[{label:"id",accessor:i=>i.id}],matchPalette:["#fbb4ae80","#b3cde380","#ccebc580","#decbe480","#fed9a680","#ffffcc80","#e5d8bd80","#fddaec80"],ordering:void 0,events:{onSelect:void 0,onSearch:void 0,onEnter:void 0,onAccessorSelect:void 0}};var vn;(function(i){i.Input="input",i.Select="select",i.Enter="enter",i.AccessorSelect="accessorSelect"})(vn||(vn={}));function Si(){}function St(i,e){for(const t in e)i[t]=e[t];return i}function kv(i){return i()}function Vp(){return Object.create(null)}function Xi(i){i.forEach(kv)}function Ri(i){return typeof i=="function"}function er(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}function RA(i){return Object.keys(i).length===0}function PA(i,...e){if(i==null)return Si;const t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function $v(i,e,t){i.$$.on_destroy.push(PA(e,t))}function hi(i,e,t,r){if(i){const n=Lv(i,e,t,r);return i[0](n)}}function Lv(i,e,t,r){return i[1]&&r?St(t.ctx.slice(),i[1](r(e))):t.ctx}function mi(i,e,t,r){if(i[2]&&r){const n=i[2](r(t));if(e.dirty===void 0)return n;if(typeof n=="object"){const a=[],s=Math.max(e.dirty.length,n.length);for(let o=0;o32){const e=[],t=i.ctx.length/32;for(let r=0;ri.removeEventListener(e,t,r)}function di(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}const MA=["width","height"];function Pi(i,e){const t=Object.getOwnPropertyDescriptors(i.__proto__);for(const r in e)e[r]==null?i.removeAttribute(r):r==="style"?i.style.cssText=e[r]:r==="__value"?i.value=i[r]=e[r]:t[r]&&t[r].set&&MA.indexOf(r)===-1?i[r]=e[r]:di(i,r,e[r])}function Wp(i,e){for(const t in e)di(i,t,e[t])}function zA(i,e){Object.keys(e).forEach(t=>{BA(i,t,e[t])})}function BA(i,e,t){e in i?i[e]=typeof i[e]=="boolean"&&t===""||t:di(i,e,t)}function kd(i){return/-/.test(i)?zA:Pi}function UA(i){return Array.from(i.childNodes)}function Ha(i,e){e=""+e,i.data!==e&&(i.data=e)}function qp(i,e){i.value=e==null?"":e}function ha(i,e,t,r){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,r?"important":"")}function fa(i,e,t){i.classList[t?"add":"remove"](e)}function GA(i,e,{bubbles:t=!1,cancelable:r=!1}={}){const n=document.createEvent("CustomEvent");return n.initCustomEvent(i,t,r,e),n}function Hs(i,e){return new i(e)}let Xo;function zo(i){Xo=i}function dr(){if(!Xo)throw new Error("Function called outside component initialization");return Xo}function Xr(i){dr().$$.on_mount.push(i)}function Va(i){dr().$$.on_destroy.push(i)}function jA(){const i=dr();return(e,t,{cancelable:r=!1}={})=>{const n=i.$$.callbacks[e];if(n){const a=GA(e,t,{cancelable:r});return n.slice().forEach(s=>{s.call(i,a)}),!a.defaultPrevented}return!0}}function Or(i,e){return dr().$$.context.set(i,e),e}function Pr(i){return dr().$$.context.get(i)}function $d(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const Ts=[],Nt=[];let Ls=[];const Ku=[],Ov=Promise.resolve();let Zu=!1;function Rv(){Zu||(Zu=!0,Ov.then(Pv))}function HA(){return Rv(),Ov}function Ju(i){Ls.push(i)}function an(i){Ku.push(i)}const pu=new Set;let gs=0;function Pv(){if(gs!==0)return;const i=Xo;do{try{for(;gsi.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),Ls=e}const ud=new Set;let Fa;function sr(){Fa={r:0,c:[],p:Fa}}function or(){Fa.r||Xi(Fa.c),Fa=Fa.p}function Le(i,e){i&&i.i&&(ud.delete(i),i.i(e))}function je(i,e,t,r){if(i&&i.o){if(ud.has(i))return;ud.add(i),Fa.c.push(()=>{ud.delete(i),r&&(t&&i.d(1),r())}),i.o(e)}else r&&r()}function qA(i,e){i.d(1),e.delete(i.key)}function XA(i,e){je(i,1,1,()=>{e.delete(i.key)})}function Fv(i,e,t,r,n,a,s,o,l,d,c,u){let f=i.length,h=a.length,g=f;const S={};for(;g--;)S[i[g].key]=g;const p=[],b=new Map,T=new Map,y=[];for(g=h;g--;){const I=u(n,a,g),O=t(I);let W=s.get(O);W?y.push(()=>W.p(I,e)):(W=d(O,I),W.c()),b.set(O,p[g]=W),O in S&&T.set(O,Math.abs(g-S[O]))}const v=new Set,L=new Set;function z(I){Le(I,1),I.m(o,c),s.set(I.key,I),c=I.first,h--}for(;f&&h;){const I=p[h-1],O=i[f-1],W=I.key,he=O.key;I===O?(c=I.first,f--,h--):b.has(he)?!s.has(W)||v.has(W)?z(I):L.has(he)?f--:T.get(W)>T.get(he)?(L.add(W),z(I)):(v.add(he),f--):(l(O,s),f--)}for(;f--;){const I=i[f];b.has(I.key)||l(I,s)}for(;h;)z(p[h-1]);return Xi(y),p}function Ei(i,e){const t={},r={},n={$$scope:1};let a=i.length;for(;a--;){const s=i[a],o=e[a];if(o){for(const l in s)l in o||(r[l]=1);for(const l in o)n[l]||(t[l]=o[l],n[l]=1);i[a]=o}else for(const l in s)n[l]=1}for(const s in r)s in t||(t[s]=void 0);return t}function ar(i){return typeof i=="object"&&i!==null?i:{}}function sn(i,e,t){const r=i.$$.props[e];r!==void 0&&(i.$$.bound[r]=t,t(i.$$.ctx[r]))}function Jt(i){i&&i.c()}function Yt(i,e,t,r){const{fragment:n,after_update:a}=i.$$;n&&n.m(e,t),r||Ju(()=>{const s=i.$$.on_mount.map(kv).filter(Ri);i.$$.on_destroy?i.$$.on_destroy.push(...s):Xi(s),i.$$.on_mount=[]}),a.forEach(Ju)}function Kt(i,e){const t=i.$$;t.fragment!==null&&(WA(t.after_update),Xi(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function vr(i,e,t,r,n,a,s,o=[-1]){const l=Xo;zo(i);const d=i.$$={fragment:null,ctx:[],props:a,update:Si,not_equal:n,bound:Vp(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Vp(),dirty:o,skip_bound:!1,root:e.target||l.$$.root};s&&s(d.root);let c=!1;if(d.ctx=t?t(i,e.props||{},(u,f,...h)=>{const g=h.length?h[0]:f;return d.ctx&&n(d.ctx[u],d.ctx[u]=g)&&(!d.skip_bound&&d.bound[u]&&d.bound[u](g),c&&function(S,p){S.$$.dirty[0]===-1&&(Ts.push(S),Rv(),S.$$.dirty.fill(0)),S.$$.dirty[p/31|0]|=1<{const n=r.indexOf(t);n!==-1&&r.splice(n,1)}}$set(e){this.$$set&&!RA(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Xp(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */function YA(i,e){if(i.closest)return i.closest(e);for(var t=i;t;){if(Nv(t,e))return t;t=t.parentElement}return null}function Nv(i,e){return(i.matches||i.webkitMatchesSelector||i.msMatchesSelector).call(i,e)}function KA(i){var e=i;if(e.offsetParent!==null)return e.scrollWidth;var t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);var r=t.scrollWidth;return document.documentElement.removeChild(t),r}const $f=Object.freeze(Object.defineProperty({__proto__:null,closest:YA,estimateScrollWidth:KA,matches:Nv},Symbol.toStringTag,{value:"Module"}));function Zt(i){return Object.entries(i).filter(([e,t])=>e!==""&&t).map(([e])=>e).join(" ")}function Oi(i,e,t,r={bubbles:!0},n=!1){if(typeof Event=="undefined")throw new Error("Event not defined.");if(!i)throw new Error("Tried to dipatch event without element.");const a=new CustomEvent(e,Object.assign(Object.assign({},r),{detail:t}));if(i==null||i.dispatchEvent(a),n&&e.startsWith("SMUI")){const s=new CustomEvent(e.replace(/^SMUI/g,()=>"MDC"),Object.assign(Object.assign({},r),{detail:t}));i==null||i.dispatchEvent(s),s.defaultPrevented&&a.preventDefault()}return a}const Yp=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,ZA=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function Mr(i){let e,t=[];function r(n){const a=i.$$.callbacks[n.type];a&&a.slice().forEach(s=>s.call(this,n))}return i.$on=(n,a)=>{let s=n,o=()=>{};return e?o=e(s,a):t.push([s,a]),s.match(Yp)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',s),()=>{o()}},n=>{const a=[],s={};e=(o,l)=>{let d=o,c=l,u=!1;const f=d.match(Yp),h=d.match(ZA),g=f||h;if(d.match(/^SMUI:\w+:/)){const T=d.split(":");let y="";for(let v=0;vL.slice(0,1).toUpperCase()+L.slice(1)).join("");console.warn(`The event ${d.split("$")[0]} has been renamed to ${y.split("$")[0]}.`),d=y}if(g){const T=d.split(f?":":"$");d=T[0];const y=T.slice(1).reduce((v,L)=>(v[L]=!0,v),{});y.passive&&(u=u||{},u.passive=!0),y.nonpassive&&(u=u||{},u.passive=!1),y.capture&&(u=u||{},u.capture=!0),y.once&&(u=u||{},u.once=!0),y.preventDefault&&(S=c,c=function(v){return v.preventDefault(),S.call(this,v)}),y.stopPropagation&&(c=function(v){return function(L){return L.stopPropagation(),v.call(this,L)}}(c)),y.stopImmediatePropagation&&(c=function(v){return function(L){return L.stopImmediatePropagation(),v.call(this,L)}}(c)),y.self&&(c=function(v,L){return function(z){if(z.target===v)return L.call(this,z)}}(n,c)),y.trusted&&(c=function(v){return function(L){if(L.isTrusted)return v.call(this,L)}}(c))}var S;const p=Kp(n,d,c,u),b=()=>{p();const T=a.indexOf(b);T>-1&&a.splice(T,1)};return a.push(b),d in s||(s[d]=Kp(n,d,r)),b};for(let o=0;o{for(let o=0;oi.removeEventListener(e,t,r)}function zr(i,e){let t=[];if(e)for(let r=0;r1?t.push(a(i,n[1])):t.push(a(i))}return{update(r){if((r&&r.length||0)!=t.length)throw new Error("You must not change the length of an actions array.");if(r)for(let n=0;n1?a.update(s[1]):a.update()}}},destroy(){for(let r=0;r{s[c]=null}),or(),t=s[e],t?t.p(l,d):(t=s[e]=a[e](l),t.c()),Le(t,1),t.m(r.parentNode,r))},i(l){n||(Le(t),n=!0)},o(l){je(t),n=!1},d(l){s[e].d(l),l&&vt(r)}}}function iI(i,e,t){let r;const n=["use","tag","getElement"];let a=ci(e,n),{$$slots:s={},$$scope:o}=e,{use:l=[]}=e,{tag:d}=e;const c=Mr(dr());let u;return i.$$set=f=>{e=St(St({},e),Dr(f)),t(5,a=ci(e,n)),"use"in f&&t(0,l=f.use),"tag"in f&&t(1,d=f.tag),"$$scope"in f&&t(7,o=f.$$scope)},i.$$.update=()=>{2&i.$$.dirty&&t(3,r=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].indexOf(d)>-1)},[l,d,u,r,c,a,function(){return u},o,s,function(f){Nt[f?"unshift":"push"](()=>{u=f,t(2,u)})},function(f){Nt[f?"unshift":"push"](()=>{u=f,t(2,u)})},function(f){Nt[f?"unshift":"push"](()=>{u=f,t(2,u)})}]}let Vs=class extends _r{constructor(e){super(),vr(this,e,iI,tI,er,{use:0,tag:1,getElement:6})}get getElement(){return this.$$.ctx[6]}};var Qu=function(i,e){return Qu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},Qu(i,e)};function Vn(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}Qu(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var qi=function(){return qi=Object.assign||function(i){for(var e,t=1,r=arguments.length;t=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zp(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r,n,a=t.call(i),s=[];try{for(;(e===void 0||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return s}function rI(i,e,t){if(arguments.length===2)for(var r,n=0,a=e.length;nc&&!u(g[p].index)){b=p;break}return b!==-1?(f.sortedIndexCursor=b,g[f.sortedIndexCursor].index):-1}(a,s,l,e):function(d,c,u){var f=u.typeaheadBuffer[0],h=d.get(f);if(!h)return-1;var g=h[u.sortedIndexCursor];if(g.text.lastIndexOf(u.typeaheadBuffer,0)===0&&!c(g.index))return g.index;for(var S=(u.sortedIndexCursor+1)%h.length,p=-1;S!==u.sortedIndexCursor;){var b=h[S],T=b.text.lastIndexOf(u.typeaheadBuffer,0)===0,y=!c(b.index);if(T&&y){p=S;break}S=(S+1)%h.length}return p!==-1?(u.sortedIndexCursor=p,h[u.sortedIndexCursor].index):-1}(a,l,e),t===-1||o||n(t),t}function Dv(i){return i.typeaheadBuffer.length>0}function Mv(i){i.typeaheadBuffer=""}function Jp(i,e){var t=i.event,r=i.isTargetListItem,n=i.focusedItemIndex,a=i.focusItemAtIndex,s=i.sortedIndexByFirstChar,o=i.isItemAtIndexDisabled,l=Sr(t)==="ArrowLeft",d=Sr(t)==="ArrowUp",c=Sr(t)==="ArrowRight",u=Sr(t)==="ArrowDown",f=Sr(t)==="Home",h=Sr(t)==="End",g=Sr(t)==="Enter",S=Sr(t)==="Spacebar";return t.altKey||t.ctrlKey||t.metaKey||l||d||c||u||f||h||g?-1:S||t.key.length!==1?S?(r&&Wr(t),r&&Dv(e)?ef({focusItemAtIndex:a,focusedItemIndex:n,nextChar:" ",sortedIndexByFirstChar:s,skipFocus:!1,isItemAtIndexDisabled:o},e):-1):-1:(Wr(t),ef({focusItemAtIndex:a,focusedItemIndex:n,nextChar:t.key.toLowerCase(),sortedIndexByFirstChar:s,skipFocus:!1,isItemAtIndexDisabled:o},e))}/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var xI=["Alt","Control","Meta","Shift"];function Qp(i){var e=new Set(i?xI.filter(function(t){return i.getModifierState(t)}):[]);return function(t){return t.every(function(r){return e.has(r)})&&t.length===e.size}}var wI=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.wrapFocus=!1,r.isVertical=!0,r.isSingleSelectionList=!1,r.areDisabledItemsFocusable=!0,r.selectedIndex=ji.UNSET_INDEX,r.focusedItemIndex=ji.UNSET_INDEX,r.useActivatedClass=!1,r.useSelectedAttr=!1,r.ariaCurrentAttrValue=null,r.isCheckboxList=!1,r.isRadioList=!1,r.lastSelectedIndex=null,r.hasTypeahead=!1,r.typeaheadState=bI(),r.sortedIndexByFirstChar=new Map,r}return Vn(e,i),Object.defineProperty(e,"strings",{get:function(){return ra},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return jt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return ji},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.adapter.getListItemCount()!==0&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},e.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},e.prototype.setWrapFocus=function(t){this.wrapFocus=t},e.prototype.setVerticalOrientation=function(t){this.isVertical=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},e.prototype.setDisabledItemsFocusable=function(t){this.areDisabledItemsFocusable=t},e.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==ji.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,jt.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},e.prototype.getSelectedIndexFromDOM=function(){for(var t=ji.UNSET_INDEX,r=this.adapter.getListItemCount(),n=0;n=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},e.prototype.handleFocusOut=function(t){var r=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){r.adapter.isFocusInsideList()||r.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.isIndexDisabled=function(t){return this.adapter.listItemAtIndexHasClass(t,jt.LIST_ITEM_DISABLED_CLASS)},e.prototype.handleKeydown=function(t,r,n){var a,s=this,o=Sr(t)==="ArrowLeft",l=Sr(t)==="ArrowUp",d=Sr(t)==="ArrowRight",c=Sr(t)==="ArrowDown",u=Sr(t)==="Home",f=Sr(t)==="End",h=Sr(t)==="Enter",g=Sr(t)==="Spacebar",S=this.isVertical&&c||!this.isVertical&&d,p=this.isVertical&&l||!this.isVertical&&o,b=t.key==="A"||t.key==="a",T=Qp(t);if(this.adapter.isRootFocused()){if((p||f)&&T([])?(t.preventDefault(),this.focusLastElement()):(S||u)&&T([])?(t.preventDefault(),this.focusFirstElement()):p&&T(["Shift"])&&this.isCheckboxList?(t.preventDefault(),(L=this.focusLastElement())!==-1&&this.setSelectedIndexOnAction(L,!1)):S&&T(["Shift"])&&this.isCheckboxList&&(t.preventDefault(),(L=this.focusFirstElement())!==-1&&this.setSelectedIndexOnAction(L,!1)),this.hasTypeahead){var y={event:t,focusItemAtIndex:function(I){s.focusItemAtIndex(I)},focusedItemIndex:-1,isTargetListItem:r,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(I){return s.isIndexDisabled(I)}};Jp(y,this.typeaheadState)}}else{var v=this.adapter.getFocusedElementIndex();if(!(v===-1&&(v=n)<0)){if(S&&T([]))Wr(t),this.focusNextElement(v);else if(p&&T([]))Wr(t),this.focusPrevElement(v);else if(S&&T(["Shift"])&&this.isCheckboxList)Wr(t),(L=this.focusNextElement(v))!==-1&&this.setSelectedIndexOnAction(L,!1);else if(p&&T(["Shift"])&&this.isCheckboxList){var L;Wr(t),(L=this.focusPrevElement(v))!==-1&&this.setSelectedIndexOnAction(L,!1)}else if(u&&T([]))Wr(t),this.focusFirstElement();else if(f&&T([]))Wr(t),this.focusLastElement();else if(u&&T(["Control","Shift"])&&this.isCheckboxList){if(Wr(t),this.isIndexDisabled(v))return;this.focusFirstElement(),this.toggleCheckboxRange(0,v,v)}else if(f&&T(["Control","Shift"])&&this.isCheckboxList){if(Wr(t),this.isIndexDisabled(v))return;this.focusLastElement(),this.toggleCheckboxRange(v,this.adapter.getListItemCount()-1,v)}else if(b&&T(["Control"])&&this.isCheckboxList)t.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===ji.UNSET_INDEX?[]:this.selectedIndex,!0);else if((h||g)&&T([])){if(r){if((z=t.target)&&z.tagName==="A"&&h||(Wr(t),this.isIndexDisabled(v)))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(v,!1),this.adapter.notifyAction(v))}}else if((h||g)&&T(["Shift"])&&this.isCheckboxList){var z;if((z=t.target)&&z.tagName==="A"&&h||(Wr(t),this.isIndexDisabled(v)))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange((a=this.lastSelectedIndex)!==null&&a!==void 0?a:v,v,v),this.adapter.notifyAction(v))}this.hasTypeahead&&(y={event:t,focusItemAtIndex:function(I){s.focusItemAtIndex(I)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:r,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(I){return s.isIndexDisabled(I)}},Jp(y,this.typeaheadState))}}},e.prototype.handleClick=function(t,r,n){var a,s=Qp(n);t!==ji.UNSET_INDEX&&(this.isIndexDisabled(t)||(s([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(t,r),this.adapter.notifyAction(t)):this.isCheckboxList&&s(["Shift"])&&(this.toggleCheckboxRange((a=this.lastSelectedIndex)!==null&&a!==void 0?a:t,t,t),this.adapter.notifyAction(t))))},e.prototype.focusNextElement=function(t){var r=this.adapter.getListItemCount(),n=t,a=null;do{if(++n>=r){if(!this.wrapFocus)return t;n=0}if(n===a)return-1;a=a!=null?a:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var r=this.adapter.getListItemCount(),n=t,a=null;do{if(--n<0){if(!this.wrapFocus)return t;n=r-1}if(n===a)return-1;a=a!=null?a:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},e.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,r){this.isIndexValid(t,!1)&&(r?(this.adapter.removeClassForElementIndex(t,jt.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,ra.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,jt.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,ra.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex=function(t,r){if(r===void 0&&(r={}),this.selectedIndex!==t||r.forceUpdate){var n=jt.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=jt.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==ji.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==ji.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t,r.isUserInteraction&&!r.forceUpdate&&this.adapter.notifySelectionChange([t])}},e.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===ji.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,ra.ARIA_CURRENT));var r=this.ariaCurrentAttrValue!==null,n=r?ra.ARIA_CURRENT:ra.ARIA_SELECTED;if(this.selectedIndex!==ji.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==ji.UNSET_INDEX){var a=r?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,n,a)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?ra.ARIA_SELECTED:ra.ARIA_CHECKED},e.prototype.setRadioAtIndex=function(t,r){r===void 0&&(r={});var n=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),(this.selectedIndex!==t||r.forceUpdate)&&(this.selectedIndex!==ji.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),this.adapter.setAttributeForElementIndex(t,n,"true"),this.selectedIndex=t,r.isUserInteraction&&!r.forceUpdate&&this.adapter.notifySelectionChange([t]))},e.prototype.setCheckboxAtIndex=function(t,r){r===void 0&&(r={});for(var n=this.selectedIndex,a=r.isUserInteraction?new Set(n===ji.UNSET_INDEX?[]:n):null,s=this.getSelectionAttribute(),o=[],l=0;l=0;c!==d&&o.push(l),this.adapter.setCheckedCheckboxOrRadioAtIndex(l,c),this.adapter.setAttributeForElementIndex(l,s,c?"true":"false")}this.selectedIndex=t,r.isUserInteraction&&o.length&&this.adapter.notifySelectionChange(o)},e.prototype.toggleCheckboxRange=function(t,r,n){this.lastSelectedIndex=n;for(var a=new Set(this.selectedIndex===ji.UNSET_INDEX?[]:this.selectedIndex),s=!(a!=null&&a.has(n)),o=Zp([t,r].sort(),2),l=o[0],d=o[1],c=this.getSelectionAttribute(),u=[],f=l;f<=d;f++)this.isIndexDisabled(f)||s!==a.has(f)&&(u.push(f),this.adapter.setCheckedCheckboxOrRadioAtIndex(f,s),this.adapter.setAttributeForElementIndex(f,c,""+s),s?a.add(f):a.delete(f));u.length&&(this.selectedIndex=rI([],Zp(a)),this.adapter.notifySelectionChange(u))},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===ji.UNSET_INDEX&&t!==0?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==ji.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?typeof this.selectedIndex=="number"&&this.selectedIndex!==ji.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce(function(t,r){return Math.min(t,r)}):0:Math.max(this.focusedItemIndex,0)},e.prototype.isIndexValid=function(t,r){var n=this;if(r===void 0&&(r=!0),t instanceof Array){if(!this.isCheckboxList&&r)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return t.length===0||t.some(function(a){return n.isIndexInRange(a)})}if(typeof t=="number"){if(this.isCheckboxList&&r)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===ji.UNSET_INDEX}return!1},e.prototype.isIndexInRange=function(t){var r=this.adapter.getListItemCount();return t>=0&&t-1)&&a.push(s);this.setCheckboxAtIndex(a,{isUserInteraction:r})}},e.prototype.typeaheadMatchItem=function(t,r,n){var a=this;n===void 0&&(n=!1);var s={focusItemAtIndex:function(o){a.focusItemAtIndex(o)},focusedItemIndex:r||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(o){return a.isIndexDisabled(o)}};return ef(s,this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return yI(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){Mv(this.typeaheadState)},e}(Wn);function SI(i){let e;const t=i[42].default,r=hi(t,i,i[44],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||8192&a[1])&&pi(r,t,n,n[44],e?mi(t,n[44],a,null):gi(n[44]),null)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function EI(i){let e,t,r;const n=[{tag:i[13]},{use:[i[16],...i[0]]},{class:Zt({[i[1]]:!0,"mdc-deprecated-list":!0,"mdc-deprecated-list--non-interactive":i[2],"mdc-deprecated-list--dense":i[3],"mdc-deprecated-list--textual-list":i[4],"mdc-deprecated-list--avatar-list":i[5]||i[17],"mdc-deprecated-list--icon-list":i[6],"mdc-deprecated-list--image-list":i[7],"mdc-deprecated-list--thumbnail-list":i[8],"mdc-deprecated-list--video-list":i[9],"mdc-deprecated-list--two-line":i[10],"smui-list--three-line":i[11]&&!i[10]})},{role:i[15]},i[25]];var a=i[12];function s(o){let l={$$slots:{default:[SI]},$$scope:{ctx:o}};for(let d=0;d{Kt(c,1)}),or()}a?(e=Hs(a,s(o)),o[43](e),e.$on("keydown",o[20]),e.$on("focusin",o[21]),e.$on("focusout",o[22]),e.$on("click",o[23]),e.$on("SMUIListItem:mount",o[18]),e.$on("SMUIListItem:unmount",o[19]),e.$on("SMUI:action",o[24]),Jt(e.$$.fragment),Le(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(o){r||(e&&Le(e.$$.fragment,o),r=!0)},o(o){e&&je(e.$$.fragment,o),r=!1},d(o){i[43](null),o&&vt(t),e&&Kt(e,o)}}}function TI(i,e,t){const r=["use","class","nonInteractive","dense","textualList","avatarList","iconList","imageList","thumbnailList","videoList","twoLine","threeLine","vertical","wrapFocus","singleSelection","disabledItemsFocusable","selectedIndex","radioList","checkList","hasTypeahead","component","tag","layout","setEnabled","getTypeaheadInProgress","getSelectedIndex","getFocusedItemIndex","focusItemAtIndex","getElement"];let n=ci(e,r),{$$slots:a={},$$scope:s}=e;var o;const{closest:l,matches:d}=$f,c=Mr(dr());let u,f,{use:h=[]}=e,{class:g=""}=e,{nonInteractive:S=!1}=e,{dense:p=!1}=e,{textualList:b=!1}=e,{avatarList:T=!1}=e,{iconList:y=!1}=e,{imageList:v=!1}=e,{thumbnailList:L=!1}=e,{videoList:z=!1}=e,{twoLine:I=!1}=e,{threeLine:O=!1}=e,{vertical:W=!0}=e,{wrapFocus:he=(o=Pr("SMUI:list:wrapFocus"))!==null&&o!==void 0&&o}=e,{singleSelection:ne=!1}=e,{disabledItemsFocusable:ie=!1}=e,{selectedIndex:P=-1}=e,{radioList:C=!1}=e,{checkList:Y=!1}=e,{hasTypeahead:U=!1}=e,ee=[],Fe=Pr("SMUI:list:role"),xe=Pr("SMUI:list:nav");const ke=new WeakMap;let Ge,Ye=Pr("SMUI:dialog:selection"),ce=Pr("SMUI:addLayoutListener"),{component:ft=Vs}=e,{tag:yt=ft===Vs?xe?"nav":"ul":void 0}=e;function ot(){return u==null?[]:[...Et().children].map(ve=>ke.get(ve)).filter(ve=>ve&&ve._smui_list_item_accessor)}function xt(ve,at){var gt;const ei=ot()[ve];return(gt=ei&&ei.hasClass(at))!==null&>!==void 0&>}function ge(ve,at){const gt=ot()[ve];gt&>.addClass(at)}function oe(ve,at){const gt=ot()[ve];gt&>.removeClass(at)}function Qe(ve,at,gt){const ei=ot()[ve];ei&&ei.addAttr(at,gt)}function lt(ve,at){const gt=ot()[ve];gt&>.removeAttr(at)}function we(ve,at){const gt=ot()[ve];return gt?gt.getAttr(at):null}function It(ve){var at;const gt=ot()[ve];return(at=gt&>.getPrimaryText())!==null&&at!==void 0?at:""}function Ct(ve){const at=l(ve,".mdc-deprecated-list-item, .mdc-deprecated-list");return at&&d(at,".mdc-deprecated-list-item")?ot().map(gt=>gt==null?void 0:gt.element).indexOf(at):-1}function Qt(){return f.layout()}function ui(){return f.getSelectedIndex()}function ht(ve){const at=ot()[ve];at&&"focus"in at.element&&at.element.focus()}function Et(){return u.getElement()}return Or("SMUI:list:nonInteractive",S),Or("SMUI:separator:context","list"),Fe||(ne?(Fe="listbox",Or("SMUI:list:item:role","option")):C?(Fe="radiogroup",Or("SMUI:list:item:role","radio")):Y?(Fe="group",Or("SMUI:list:item:role","checkbox")):(Fe="list",Or("SMUI:list:item:role",void 0))),ce&&(Ge=ce(Qt)),Xr(()=>{t(41,f=new wI({addClassForElementIndex:ge,focusItemAtIndex:ht,getAttributeForElementIndex:(at,gt)=>{var ei,E;return(E=(ei=ot()[at])===null||ei===void 0?void 0:ei.getAttr(gt))!==null&&E!==void 0?E:null},getFocusedElementIndex:()=>document.activeElement?ot().map(at=>at.element).indexOf(document.activeElement):-1,getListItemCount:()=>ee.length,getPrimaryTextAtIndex:It,hasCheckboxAtIndex:at=>{var gt,ei;return(ei=(gt=ot()[at])===null||gt===void 0?void 0:gt.hasCheckbox)!==null&&ei!==void 0&&ei},hasRadioAtIndex:at=>{var gt,ei;return(ei=(gt=ot()[at])===null||gt===void 0?void 0:gt.hasRadio)!==null&&ei!==void 0&&ei},isCheckboxCheckedAtIndex:at=>{var gt;const ei=ot()[at];return(gt=(ei==null?void 0:ei.hasCheckbox)&&ei.checked)!==null&>!==void 0&>},isFocusInsideList:()=>u!=null&&Et()!==document.activeElement&&Et().contains(document.activeElement),isRootFocused:()=>u!=null&&document.activeElement===Et(),listItemAtIndexHasClass:xt,notifyAction:at=>{t(26,P=at),u!=null&&Oi(Et(),"SMUIList:action",{index:at},void 0,!0)},notifySelectionChange:at=>{u!=null&&Oi(Et(),"SMUIList:selectionChange",{changedIndices:at})},removeClassForElementIndex:oe,setAttributeForElementIndex:Qe,setCheckedCheckboxOrRadioAtIndex:(at,gt)=>{ot()[at].checked=gt},setTabIndexForListItemChildren:(at,gt)=>{const ei=ot()[at];Array.prototype.forEach.call(ei.element.querySelectorAll("button:not(:disabled), a"),E=>{E.setAttribute("tabindex",gt)})}}));const ve={get element(){return Et()},get items(){return ee},get typeaheadInProgress(){return f.isTypeaheadInProgress()},typeaheadMatchItem:(at,gt)=>f.typeaheadMatchItem(at,gt,!0),getOrderedList:ot,focusItemAtIndex:ht,addClassForElementIndex:ge,removeClassForElementIndex:oe,setAttributeForElementIndex:Qe,removeAttributeForElementIndex:lt,getAttributeFromElementIndex:we,getPrimaryTextAtIndex:It};return Oi(Et(),"SMUIList:mount",ve),f.init(),f.layout(),()=>{f.destroy()}}),Va(()=>{Ge&&Ge()}),i.$$set=ve=>{e=St(St({},e),Dr(ve)),t(25,n=ci(e,r)),"use"in ve&&t(0,h=ve.use),"class"in ve&&t(1,g=ve.class),"nonInteractive"in ve&&t(2,S=ve.nonInteractive),"dense"in ve&&t(3,p=ve.dense),"textualList"in ve&&t(4,b=ve.textualList),"avatarList"in ve&&t(5,T=ve.avatarList),"iconList"in ve&&t(6,y=ve.iconList),"imageList"in ve&&t(7,v=ve.imageList),"thumbnailList"in ve&&t(8,L=ve.thumbnailList),"videoList"in ve&&t(9,z=ve.videoList),"twoLine"in ve&&t(10,I=ve.twoLine),"threeLine"in ve&&t(11,O=ve.threeLine),"vertical"in ve&&t(27,W=ve.vertical),"wrapFocus"in ve&&t(28,he=ve.wrapFocus),"singleSelection"in ve&&t(29,ne=ve.singleSelection),"disabledItemsFocusable"in ve&&t(30,ie=ve.disabledItemsFocusable),"selectedIndex"in ve&&t(26,P=ve.selectedIndex),"radioList"in ve&&t(31,C=ve.radioList),"checkList"in ve&&t(32,Y=ve.checkList),"hasTypeahead"in ve&&t(33,U=ve.hasTypeahead),"component"in ve&&t(12,ft=ve.component),"tag"in ve&&t(13,yt=ve.tag),"$$scope"in ve&&t(44,s=ve.$$scope)},i.$$.update=()=>{134217728&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setVerticalOrientation(W),268435456&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setWrapFocus(he),1028&i.$$.dirty[1]&&f&&f.setHasTypeahead(U),536870912&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setSingleSelection(ne),1073741824&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setDisabledItemsFocusable(ie),603979776&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&ne&&ui()!==P&&f.setSelectedIndex(P)},[h,g,S,p,b,T,y,v,L,z,I,O,ft,yt,u,Fe,c,Ye,function(ve){ee.push(ve.detail),ke.set(ve.detail.element,ve.detail),ne&&ve.detail.selected&&t(26,P=Ct(ve.detail.element)),ve.stopPropagation()},function(ve){var at;const gt=(at=ve.detail&&ee.indexOf(ve.detail))!==null&&at!==void 0?at:-1;gt!==-1&&(ee.splice(gt,1),ke.delete(ve.detail.element)),ve.stopPropagation()},function(ve){f&&ve.target&&f.handleKeydown(ve,ve.target.classList.contains("mdc-deprecated-list-item"),Ct(ve.target))},function(ve){f&&ve.target&&f.handleFocusIn(Ct(ve.target))},function(ve){f&&ve.target&&f.handleFocusOut(Ct(ve.target))},function(ve){f&&ve.target&&f.handleClick(Ct(ve.target),!d(ve.target,'input[type="checkbox"], input[type="radio"]'),ve)},function(ve){if(C||Y){const at=Ct(ve.target);if(at!==-1){const gt=ot()[at];gt&&(C&&!gt.checked||Y)&&(d(ve.detail.target,'input[type="checkbox"], input[type="radio"]')||(gt.checked=!gt.checked),gt.activateRipple(),window.requestAnimationFrame(()=>{gt.deactivateRipple()}))}}},n,P,W,he,ne,ie,C,Y,U,Qt,function(ve,at){return f.setEnabled(ve,at)},function(){return f.isTypeaheadInProgress()},ui,function(){return f.getFocusedItemIndex()},ht,Et,f,a,function(ve){Nt[ve?"unshift":"push"](()=>{u=ve,t(14,u)})},s]}let AI=class extends _r{constructor(e){super(),vr(this,e,TI,EI,er,{use:0,class:1,nonInteractive:2,dense:3,textualList:4,avatarList:5,iconList:6,imageList:7,thumbnailList:8,videoList:9,twoLine:10,threeLine:11,vertical:27,wrapFocus:28,singleSelection:29,disabledItemsFocusable:30,selectedIndex:26,radioList:31,checkList:32,hasTypeahead:33,component:12,tag:13,layout:34,setEnabled:35,getTypeaheadInProgress:36,getSelectedIndex:37,getFocusedItemIndex:38,focusItemAtIndex:39,getElement:40},null,[-1,-1])}get layout(){return this.$$.ctx[34]}get setEnabled(){return this.$$.ctx[35]}get getTypeaheadInProgress(){return this.$$.ctx[36]}get getSelectedIndex(){return this.$$.ctx[37]}get getFocusedItemIndex(){return this.$$.ctx[38]}get focusItemAtIndex(){return this.$$.ctx[39]}get getElement(){return this.$$.ctx[40]}};/** - * @license - * Copyright 2019 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */function II(i){return i===void 0&&(i=window),!!function(e){e===void 0&&(e=window);var t=!1;try{var r={get passive(){return t=!0,!1}},n=function(){};e.document.addEventListener("test",n,r),e.document.removeEventListener("test",n,r)}catch(a){t=!1}return t}(i)&&{passive:!0}}const zv=Object.freeze(Object.defineProperty({__proto__:null,applyPassive:II},Symbol.toStringTag,{value:"Module"}));/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var CI={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},kI={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},eg={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},_u;function $I(i,e){e===void 0&&(e=!1);var t,r=i.CSS;if(typeof _u=="boolean"&&!e)return _u;if(!(r&&typeof r.supports=="function"))return!1;var n=r.supports("--css-vars","yes"),a=r.supports("(--css-vars: yes)")&&r.supports("color","#00000000");return t=n||a,e||(_u=t),t}function LI(i,e,t){if(!i)return{x:0,y:0};var r,n,a=e.x,s=e.y,o=a+t.left,l=s+t.top;if(i.type==="touchstart"){var d=i;r=d.changedTouches[0].pageX-o,n=d.changedTouches[0].pageY-l}else{var c=i;r=c.pageX-o,n=c.pageY-l}return{x:r,y:n}}/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var tg=["touchstart","pointerdown","mousedown","keydown"],ig=["touchend","pointerup","mouseup","contextmenu"],Zl=[],OI=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(n){r.activateImpl(n)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return Vn(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return CI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return kI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return eg},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,r=this.supportsPressRipple();if(this.registerRootHandlers(r),r){var n=e.cssClasses,a=n.ROOT,s=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(a),t.adapter.isUnbounded()&&(t.adapter.addClass(s),t.layoutInternal())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var r=e.cssClasses,n=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(n),t.adapter.removeClass(a),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},e.prototype.setUnbounded=function(t){var r=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var r,n;if(t){try{for(var a=on(tg),s=a.next();!s.done;s=a.next()){var o=s.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var r,n;if(t.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var a=on(ig),s=a.next();!s.done;s=a.next()){var o=s.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},e.prototype.deregisterRootHandlers=function(){var t,r;try{for(var n=on(tg),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.deregisterInteractionHandler(s,this.activateHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,r;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=on(ig),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.deregisterDocumentInteractionHandler(s,this.deactivateHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,r=e.strings;Object.keys(r).forEach(function(n){n.indexOf("VAR_")===0&&t.adapter.updateCssVariable(r[n],null)})},e.prototype.activateImpl=function(t){var r=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var a=this.previousActivationEvent;a&&t!==void 0&&a.type!==t.type||(n.isActivated=!0,n.isProgrammatic=t===void 0,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&t!==void 0&&(t.type==="mousedown"||t.type==="touchstart"||t.type==="pointerdown"),t!==void 0&&Zl.length>0&&Zl.some(function(s){return r.adapter.containsEventTarget(s)})?this.resetActivationState():(t!==void 0&&(Zl.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){Zl=[],n.wasElementMadeActive||t===void 0||t.key!==" "&&t.keyCode!==32||(n.wasElementMadeActive=r.checkElementMadeActive(t),n.wasElementMadeActive&&r.animateActivation()),n.wasElementMadeActive||(r.activationState=r.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return t===void 0||t.type!=="keydown"||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,r=e.strings,n=r.VAR_FG_TRANSLATE_START,a=r.VAR_FG_TRANSLATE_END,s=e.cssClasses,o=s.FG_DEACTIVATION,l=s.FG_ACTIVATION,d=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",u="";if(!this.adapter.isUnbounded()){var f=this.getFgTranslationCoordinates(),h=f.startPoint,g=f.endPoint;c=h.x+"px, "+h.y+"px",u=g.x+"px, "+g.y+"px"}this.adapter.updateCssVariable(n,c),this.adapter.updateCssVariable(a,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(l),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},d)},e.prototype.getFgTranslationCoordinates=function(){var t,r=this.activationState,n=r.activationEvent;return{startPoint:t={x:(t=r.wasActivatedByPointer?LI(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,r=e.cssClasses.FG_DEACTIVATION,n=this.activationState,a=n.hasDeactivationUXRun,s=n.isActivated;(a||!s)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(r),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(r)},eg.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,r=this.activationState;if(r.isActivated){var n=qi({},r);r.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(n)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()}))}},e.prototype.animateDeactivation=function(t){var r=t.wasActivatedByPointer,n=t.wasElementMadeActive;(r||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var r=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?r:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var n=Math.floor(r*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize=n-1:this.initialSize=n,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,r=t.VAR_FG_SIZE,n=t.VAR_LEFT,a=t.VAR_TOP,s=t.VAR_FG_SCALE;this.adapter.updateCssVariable(r,this.initialSize+"px"),this.adapter.updateCssVariable(s,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(n,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(a,this.unboundedCoords.top+"px"))},e}(Wn);const{applyPassive:Jl}=zv,{matches:RI}=$f;function Ld(i,{ripple:e=!0,surface:t=!1,unbounded:r=!1,disabled:n=!1,color:a,active:s,rippleElement:o,eventTarget:l,activeTarget:d,addClass:c=g=>i.classList.add(g),removeClass:u=g=>i.classList.remove(g),addStyle:f=(g,S)=>i.style.setProperty(g,S),initPromise:h=Promise.resolve()}={}){let g,S,p=Pr("SMUI:addLayoutListener"),b=s,T=l,y=d;function v(){t?(c("mdc-ripple-surface"),a==="primary"?(c("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")):a==="secondary"?(u("smui-ripple-surface--primary"),c("smui-ripple-surface--secondary")):(u("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary"))):(u("mdc-ripple-surface"),u("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")),g&&b!==s&&(b=s,s?g.activate():s===!1&&g.deactivate()),e&&!g?(g=new OI({addClass:c,browserSupportsCssVars:()=>$I(window),computeBoundingRect:()=>(o||i).getBoundingClientRect(),containsEventTarget:L=>i.contains(L),deregisterDocumentInteractionHandler:(L,z)=>document.documentElement.removeEventListener(L,z,Jl()),deregisterInteractionHandler:(L,z)=>(l||i).removeEventListener(L,z,Jl()),deregisterResizeHandler:L=>window.removeEventListener("resize",L),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>s==null?RI(d||i,":active"):s,isSurfaceDisabled:()=>!!n,isUnbounded:()=>!!r,registerDocumentInteractionHandler:(L,z)=>document.documentElement.addEventListener(L,z,Jl()),registerInteractionHandler:(L,z)=>(l||i).addEventListener(L,z,Jl()),registerResizeHandler:L=>window.addEventListener("resize",L),removeClass:u,updateCssVariable:f}),h.then(()=>{g&&(g.init(),g.setUnbounded(r))})):g&&!e&&h.then(()=>{g&&(g.destroy(),g=void 0)}),!g||T===l&&y===d||(T=l,y=d,g.destroy(),requestAnimationFrame(()=>{g&&(g.init(),g.setUnbounded(r))})),!e&&r&&c("mdc-ripple-upgraded--unbounded")}return v(),p&&(S=p(function(){g&&g.layout()})),{update(L){({ripple:e,surface:t,unbounded:r,disabled:n,color:a,active:s,rippleElement:o,eventTarget:l,activeTarget:d,addClass:c,removeClass:u,addStyle:f,initPromise:h}=Object.assign({ripple:!0,surface:!1,unbounded:!1,disabled:!1,color:void 0,active:void 0,rippleElement:void 0,eventTarget:void 0,activeTarget:void 0,addClass:z=>i.classList.add(z),removeClass:z=>i.classList.remove(z),addStyle:(z,I)=>i.style.setProperty(z,I),initPromise:Promise.resolve()},L)),v()},destroy(){g&&(g.destroy(),g=void 0,u("mdc-ripple-surface"),u("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")),S&&S()}}}function rg(i){let e;return{c(){e=ni("span"),di(e,"class","mdc-deprecated-list-item__ripple")},m(t,r){_t(t,e,r)},d(t){t&&vt(e)}}}function PI(i){let e,t,r=i[7]&&rg();const n=i[34].default,a=hi(n,i,i[37],null);return{c(){r&&r.c(),e=Tr(),a&&a.c()},m(s,o){r&&r.m(s,o),_t(s,e,o),a&&a.m(s,o),t=!0},p(s,o){s[7]?r||(r=rg(),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),a&&a.p&&(!t||64&o[1])&&pi(a,n,s,s[37],t?mi(n,s[37],o,null):gi(s[37]),null)},i(s){t||(Le(a,s),t=!0)},o(s){je(a,s),t=!1},d(s){r&&r.d(s),s&&vt(e),a&&a.d(s)}}}function FI(i){let e,t,r;const n=[{tag:i[14]},{use:[...i[6]?[]:[[Ld,{ripple:!i[16],unbounded:!1,color:(i[1]||i[0])&&i[5]==null?"primary":i[5],disabled:i[10],addClass:i[24],removeClass:i[25],addStyle:i[26]}]],i[22],...i[2]]},{class:Zt(wi({[i[3]]:!0,"mdc-deprecated-list-item":!i[8],"mdc-deprecated-list-item__wrapper":i[8],"mdc-deprecated-list-item--activated":i[1],"mdc-deprecated-list-item--selected":i[0],"mdc-deprecated-list-item--disabled":i[10],"mdc-menu-item--selected":!i[23]&&i[9]==="menuitem"&&i[0],"smui-menu-item--non-interactive":i[6]},i[18]))},{style:Object.entries(i[19]).map(ng).concat([i[4]]).join(" ")},i[23]&&i[1]?{"aria-current":"page"}:{},!i[23]||i[8]?{role:i[9]}:{},i[23]||i[9]!=="option"?{}:{"aria-selected":i[0]?"true":"false"},i[23]||i[9]!=="radio"&&i[9]!=="checkbox"?{}:{"aria-checked":i[16]&&i[16].checked?"true":"false"},i[23]?{}:{"aria-disabled":i[10]?"true":"false"},{"data-menu-item-skip-restore-focus":i[11]||void 0},{tabindex:i[21]},{href:i[12]},i[20],i[29]];var a=i[13];function s(o){let l={$$slots:{default:[PI]},$$scope:{ctx:o}};for(let d=0;d{Kt(c,1)}),or()}a?(e=Hs(a,s(o)),o[35](e),e.$on("click",o[15]),e.$on("keydown",o[27]),e.$on("SMUIGenericInput:mount",o[28]),e.$on("SMUIGenericInput:unmount",o[36]),Jt(e.$$.fragment),Le(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(o){r||(e&&Le(e.$$.fragment,o),r=!0)},o(o){e&&je(e.$$.fragment,o),r=!1},d(o){i[35](null),o&&vt(t),e&&Kt(e,o)}}}let NI=0;const ng=([i,e])=>`${i}: ${e};`;function DI(i,e,t){let r;const n=["use","class","style","color","nonInteractive","ripple","wrapper","activated","role","selected","disabled","skipRestoreFocus","tabindex","inputId","href","component","tag","action","getPrimaryText","getElement"];let a=ci(e,n),{$$slots:s={},$$scope:o}=e;var l;const d=Mr(dr());let c=()=>{},{use:u=[]}=e,{class:f=""}=e,{style:h=""}=e,{color:g}=e,{nonInteractive:S=(l=Pr("SMUI:list:nonInteractive"))!==null&&l!==void 0&&l}=e;Or("SMUI:list:nonInteractive",void 0);let{ripple:p=!S}=e,{wrapper:b=!1}=e,{activated:T=!1}=e,{role:y=b?"presentation":Pr("SMUI:list:item:role")}=e;Or("SMUI:list:item:role",void 0);let v,L,z,{selected:I=!1}=e,{disabled:O=!1}=e,{skipRestoreFocus:W=!1}=e,{tabindex:he=c}=e,{inputId:ne="SMUI-form-field-list-"+NI++}=e,{href:ie}=e,P={},C={},Y={},U=Pr("SMUI:list:item:nav"),{component:ee=Vs}=e,{tag:Fe=ee===Vs?U?ie?"a":"span":"li":void 0}=e;function xe(ge){return ge in P?P[ge]:xt().classList.contains(ge)}function ke(ge){P[ge]||t(18,P[ge]=!0,P)}function Ge(ge){ge in P&&!P[ge]||t(18,P[ge]=!1,P)}function Ye(ge){var oe;return ge in Y?(oe=Y[ge])!==null&&oe!==void 0?oe:null:xt().getAttribute(ge)}function ce(ge,oe){Y[ge]!==oe&&t(20,Y[ge]=oe,Y)}function ft(ge){ge in Y&&Y[ge]==null||t(20,Y[ge]=void 0,Y)}function yt(ge){O||Oi(xt(),"SMUI:action",ge)}function ot(){var ge,oe,Qe;const lt=xt(),we=lt.querySelector(".mdc-deprecated-list-item__primary-text");if(we)return(ge=we.textContent)!==null&&ge!==void 0?ge:"";const It=lt.querySelector(".mdc-deprecated-list-item__text");return It?(oe=It.textContent)!==null&&oe!==void 0?oe:"":(Qe=lt.textContent)!==null&&Qe!==void 0?Qe:""}function xt(){return v.getElement()}return Or("SMUI:generic:input:props",{id:ne}),Or("SMUI:separator:context",void 0),Xr(()=>{if(!I&&!S){let oe=!0,Qe=v.getElement();for(;Qe.previousSibling;)if(Qe=Qe.previousSibling,Qe.nodeType===1&&Qe.classList.contains("mdc-deprecated-list-item")&&!Qe.classList.contains("mdc-deprecated-list-item--disabled")){oe=!1;break}oe&&(z=window.requestAnimationFrame(()=>function(lt){let we=!0;for(;lt.nextElementSibling;)if((lt=lt.nextElementSibling).nodeType===1&<.classList.contains("mdc-deprecated-list-item")){const It=lt.attributes.getNamedItem("tabindex");if(It&&It.value==="0"){we=!1;break}}we&&t(21,r=0)}(Qe)))}const ge={_smui_list_item_accessor:!0,get element(){return xt()},get selected(){return I},set selected(oe){t(0,I=oe)},hasClass:xe,addClass:ke,removeClass:Ge,getAttr:Ye,addAttr:ce,removeAttr:ft,getPrimaryText:ot,get checked(){var oe;return(oe=L&&L.checked)!==null&&oe!==void 0&&oe},set checked(oe){L&&t(16,L.checked=!!oe,L)},get hasCheckbox(){return!(!L||!("_smui_checkbox_accessor"in L))},get hasRadio(){return!(!L||!("_smui_radio_accessor"in L))},activateRipple(){L&&L.activateRipple()},deactivateRipple(){L&&L.deactivateRipple()},getValue:()=>a.value,action:yt,get tabindex(){return r},set tabindex(oe){t(30,he=oe)},get disabled(){return O},get activated(){return T},set activated(oe){t(1,T=oe)}};return Oi(xt(),"SMUIListItem:mount",ge),()=>{Oi(xt(),"SMUIListItem:unmount",ge)}}),Va(()=>{z&&window.cancelAnimationFrame(z)}),i.$$set=ge=>{e=St(St({},e),Dr(ge)),t(29,a=ci(e,n)),"use"in ge&&t(2,u=ge.use),"class"in ge&&t(3,f=ge.class),"style"in ge&&t(4,h=ge.style),"color"in ge&&t(5,g=ge.color),"nonInteractive"in ge&&t(6,S=ge.nonInteractive),"ripple"in ge&&t(7,p=ge.ripple),"wrapper"in ge&&t(8,b=ge.wrapper),"activated"in ge&&t(1,T=ge.activated),"role"in ge&&t(9,y=ge.role),"selected"in ge&&t(0,I=ge.selected),"disabled"in ge&&t(10,O=ge.disabled),"skipRestoreFocus"in ge&&t(11,W=ge.skipRestoreFocus),"tabindex"in ge&&t(30,he=ge.tabindex),"inputId"in ge&&t(31,ne=ge.inputId),"href"in ge&&t(12,ie=ge.href),"component"in ge&&t(13,ee=ge.component),"tag"in ge&&t(14,Fe=ge.tag),"$$scope"in ge&&t(37,o=ge.$$scope)},i.$$.update=()=>{1073808449&i.$$.dirty[0]&&t(21,r=he===c?S||O||!(I||L&&L.checked)?-1:0:he)},[I,T,u,f,h,g,S,p,b,y,O,W,ie,ee,Fe,yt,L,v,P,C,Y,r,d,U,ke,Ge,function(ge,oe){C[ge]!=oe&&(oe===""||oe==null?(delete C[ge],t(19,C)):t(19,C[ge]=oe,C))},function(ge){const oe=ge.key==="Enter",Qe=ge.key==="Space";(oe||Qe)&&yt(ge)},function(ge){("_smui_checkbox_accessor"in ge.detail||"_smui_radio_accessor"in ge.detail)&&t(16,L=ge.detail)},a,he,ne,ot,xt,s,function(ge){Nt[ge?"unshift":"push"](()=>{v=ge,t(17,v)})},()=>t(16,L=void 0),o]}let Lf=class extends _r{constructor(e){super(),vr(this,e,DI,FI,er,{use:2,class:3,style:4,color:5,nonInteractive:6,ripple:7,wrapper:8,activated:1,role:9,selected:0,disabled:10,skipRestoreFocus:11,tabindex:30,inputId:31,href:12,component:13,tag:14,action:15,getPrimaryText:32,getElement:33},null,[-1,-1])}get action(){return this.$$.ctx[15]}get getPrimaryText(){return this.$$.ctx[32]}get getElement(){return this.$$.ctx[33]}};function MI(i){let e;const t=i[11].default,r=hi(t,i,i[13],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||8192&a)&&pi(r,t,n,n[13],e?mi(t,n[13],a,null):gi(n[13]),null)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function zI(i){let e,t,r;const n=[{tag:i[3]},{use:[i[8],...i[0]]},{class:Zt(wi({[i[1]]:!0,[i[6]]:!0},i[5]))},i[7],i[9]];var a=i[2];function s(o){let l={$$slots:{default:[MI]},$$scope:{ctx:o}};for(let d=0;d{Kt(c,1)}),or()}a?(e=Hs(a,s(o)),o[12](e),Jt(e.$$.fragment),Le(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(o){r||(e&&Le(e.$$.fragment,o),r=!0)},o(o){e&&je(e.$$.fragment,o),r=!1},d(o){i[12](null),o&&vt(t),e&&Kt(e,o)}}}const Mn={component:Vs,tag:"div",class:"",classMap:{},contexts:{},props:{}};function BI(i,e,t){const r=["use","class","component","tag","getElement"];let n,a=ci(e,r),{$$slots:s={},$$scope:o}=e,{use:l=[]}=e,{class:d=""}=e;const c=Mn.class,u={},f=[],h=Mn.contexts,g=Mn.props;let{component:S=Mn.component}=e,{tag:p=S===Vs?Mn.tag:void 0}=e;Object.entries(Mn.classMap).forEach(([T,y])=>{const v=Pr(y);v&&"subscribe"in v&&f.push(v.subscribe(L=>{t(5,u[T]=L,u)}))});const b=Mr(dr());for(let T in h)h.hasOwnProperty(T)&&Or(T,h[T]);return Va(()=>{for(const T of f)T()}),i.$$set=T=>{e=St(St({},e),Dr(T)),t(9,a=ci(e,r)),"use"in T&&t(0,l=T.use),"class"in T&&t(1,d=T.class),"component"in T&&t(2,S=T.component),"tag"in T&&t(3,p=T.tag),"$$scope"in T&&t(13,o=T.$$scope)},[l,d,S,p,n,u,c,g,b,a,function(){return n.getElement()},s,function(T){Nt[T?"unshift":"push"](()=>{n=T,t(4,n)})},o]}let UI=class extends _r{constructor(e){super(),vr(this,e,BI,zI,er,{use:0,class:1,component:2,tag:3,getElement:10})}get getElement(){return this.$$.ctx[10]}};const ag=Object.assign({},Mn);function En(i){return new Proxy(UI,{construct:function(e,t){return Object.assign(Mn,ag,i),new e(...t)},get:function(e,t){return Object.assign(Mn,ag,i),e[t]}})}var Bv=En({class:"mdc-deprecated-list-item__text",tag:"span"});En({class:"mdc-deprecated-list-item__primary-text",tag:"span"});En({class:"mdc-deprecated-list-item__secondary-text",tag:"span"});En({class:"mdc-deprecated-list-item__meta",tag:"span"});En({class:"mdc-deprecated-list-group",tag:"div"});En({class:"mdc-deprecated-list-group__subheader",tag:"h3"});function Od(i,e){let t=Object.getOwnPropertyNames(i);const r={};for(let n=0;n{r.delete(o),r.size===0&&t&&(t(),t=null)}}}}function jI(i){let e;const t=i[4].default,r=hi(t,i,i[3],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,[a]){r&&r.p&&(!e||8&a)&&pi(r,t,n,n[3],e?mi(t,n[3],a,null):gi(n[3]),null)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function HI(i,e,t){let r,{$$slots:n={},$$scope:a}=e,{key:s}=e,{value:o}=e;const l=GI(o);return $v(i,l,d=>t(5,r=d)),Or(s,l),Va(()=>{l.set(void 0)}),i.$$set=d=>{"key"in d&&t(1,s=d.key),"value"in d&&t(2,o=d.value),"$$scope"in d&&t(3,a=d.$$scope)},i.$$.update=()=>{4&i.$$.dirty&&NA(l,r=o,r)},[l,s,o,a,n]}let Rd=class extends _r{constructor(e){super(),vr(this,e,HI,jI,er,{key:1,value:2})}};/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var VI={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var WI=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return Vn(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return VI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var r=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.float=function(t){var r=e.cssClasses,n=r.LABEL_FLOAT_ABOVE,a=r.LABEL_SHAKE;t?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(a))},e.prototype.setRequired=function(t){var r=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e}(Wn);function qI(i){let e,t,r,n,a,s,o,l;const d=i[22].default,c=hi(d,i,i[21],null);let u=[{class:t=Zt(wi({[i[3]]:!0,"mdc-floating-label":!0,"mdc-floating-label--float-above":i[0],"mdc-floating-label--required":i[1]},i[8]))},{style:r=Object.entries(i[9]).map(og).concat([i[4]]).join(" ")},{for:n=i[5]||(i[11]?i[11].id:void 0)},i[12]],f={};for(let h=0;h{s[c]=null}),or(),t=s[e],t?t.p(l,d):(t=s[e]=a[e](l),t.c()),Le(t,1),t.m(r.parentNode,r))},i(l){n||(Le(t),n=!0)},o(l){je(t),n=!1},d(l){s[e].d(l),l&&vt(r)}}}const sg=([i,e])=>`${i}: ${e};`,og=([i,e])=>`${i}: ${e};`;function KI(i,e,t){const r=["use","class","style","for","floatAbove","required","wrapped","shake","float","setRequired","getWidth","getElement"];let n=ci(e,r),{$$slots:a={},$$scope:s}=e;var o;const l=Mr(dr());let d,c,{use:u=[]}=e,{class:f=""}=e,{style:h=""}=e,{for:g}=e,{floatAbove:S=!1}=e,{required:p=!1}=e,{wrapped:b=!1}=e,T={},y={},v=(o=Pr("SMUI:generic:input:props"))!==null&&o!==void 0?o:{},L=S,z=p;function I(ie){T[ie]||t(8,T[ie]=!0,T)}function O(ie){ie in T&&!T[ie]||t(8,T[ie]=!1,T)}function W(ie,P){y[ie]!=P&&(P===""||P==null?(delete y[ie],t(9,y)):t(9,y[ie]=P,y))}function he(ie){ie in y&&(delete y[ie],t(9,y))}function ne(){return d}return Xr(()=>{t(18,c=new WI({addClass:I,removeClass:O,getWidth:()=>{var P,C;const Y=ne(),U=Y.cloneNode(!0);(P=Y.parentNode)===null||P===void 0||P.appendChild(U),U.classList.add("smui-floating-label--remove-transition"),U.classList.add("smui-floating-label--force-size"),U.classList.remove("mdc-floating-label--float-above");const ee=U.scrollWidth;return(C=Y.parentNode)===null||C===void 0||C.removeChild(U),ee},registerInteractionHandler:(P,C)=>ne().addEventListener(P,C),deregisterInteractionHandler:(P,C)=>ne().removeEventListener(P,C)}));const ie={get element(){return ne()},addStyle:W,removeStyle:he};return Oi(d,"SMUIFloatingLabel:mount",ie),c.init(),()=>{Oi(d,"SMUIFloatingLabel:unmount",ie),c.destroy()}}),i.$$set=ie=>{e=St(St({},e),Dr(ie)),t(12,n=ci(e,r)),"use"in ie&&t(2,u=ie.use),"class"in ie&&t(3,f=ie.class),"style"in ie&&t(4,h=ie.style),"for"in ie&&t(5,g=ie.for),"floatAbove"in ie&&t(0,S=ie.floatAbove),"required"in ie&&t(1,p=ie.required),"wrapped"in ie&&t(6,b=ie.wrapped),"$$scope"in ie&&t(21,s=ie.$$scope)},i.$$.update=()=>{786433&i.$$.dirty&&c&&L!==S&&(t(19,L=S),c.float(S)),1310722&i.$$.dirty&&c&&z!==p&&(t(20,z=p),c.setRequired(p))},[S,p,u,f,h,g,b,d,T,y,l,v,n,function(ie){c.shake(ie)},function(ie){t(0,S=ie)},function(ie){t(1,p=ie)},function(){return c.getWidth()},ne,c,L,z,s,a,function(ie){Nt[ie?"unshift":"push"](()=>{d=ie,t(7,d)})},function(ie){Nt[ie?"unshift":"push"](()=>{d=ie,t(7,d)})}]}let Uv=class extends _r{constructor(e){super(),vr(this,e,KI,YI,er,{use:2,class:3,style:4,for:5,floatAbove:0,required:1,wrapped:6,shake:13,float:14,setRequired:15,getWidth:16,getElement:17})}get shake(){return this.$$.ctx[13]}get float(){return this.$$.ctx[14]}get setRequired(){return this.$$.ctx[15]}get getWidth(){return this.$$.ctx[16]}get getElement(){return this.$$.ctx[17]}};/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var Ca={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"};/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var ZI=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.transitionEndHandler=function(n){r.handleTransitionEnd(n)},r}return Vn(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return Ca},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(Ca.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Ca.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(Ca.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var r=this.adapter.hasClass(Ca.LINE_RIPPLE_DEACTIVATING);t.propertyName==="opacity"&&r&&(this.adapter.removeClass(Ca.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Ca.LINE_RIPPLE_DEACTIVATING))},e}(Wn);function JI(i){let e,t,r,n,a,s,o=[{class:t=Zt(wi({[i[1]]:!0,"mdc-line-ripple":!0,"mdc-line-ripple--active":i[3]},i[5]))},{style:r=Object.entries(i[6]).map(lg).concat([i[2]]).join(" ")},i[8]],l={};for(let d=0;d`${i}: ${e};`;function QI(i,e,t){const r=["use","class","style","active","activate","deactivate","setRippleCenter","getElement"];let n=ci(e,r);const a=Mr(dr());let s,o,{use:l=[]}=e,{class:d=""}=e,{style:c=""}=e,{active:u=!1}=e,f={},h={};function g(y){return y in f?f[y]:T().classList.contains(y)}function S(y){f[y]||t(5,f[y]=!0,f)}function p(y){y in f&&!f[y]||t(5,f[y]=!1,f)}function b(y,v){h[y]!=v&&(v===""||v==null?(delete h[y],t(6,h)):t(6,h[y]=v,h))}function T(){return s}return Xr(()=>(o=new ZI({addClass:S,removeClass:p,hasClass:g,setStyle:b,registerEventHandler:(y,v)=>T().addEventListener(y,v),deregisterEventHandler:(y,v)=>T().removeEventListener(y,v)}),o.init(),()=>{o.destroy()})),i.$$set=y=>{e=St(St({},e),Dr(y)),t(8,n=ci(e,r)),"use"in y&&t(0,l=y.use),"class"in y&&t(1,d=y.class),"style"in y&&t(2,c=y.style),"active"in y&&t(3,u=y.active)},[l,d,c,u,s,f,h,a,n,function(){o.activate()},function(){o.deactivate()},function(y){o.setRippleCenter(y)},T,function(y){Nt[y?"unshift":"push"](()=>{s=y,t(4,s)})}]}class e4 extends _r{constructor(e){super(),vr(this,e,QI,JI,er,{use:0,class:1,style:2,active:3,activate:9,deactivate:10,setRippleCenter:11,getElement:12})}get activate(){return this.$$.ctx[9]}get deactivate(){return this.$$.ctx[10]}get setRippleCenter(){return this.$$.ctx[11]}get getElement(){return this.$$.ctx[12]}}/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var t4={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},dg={NOTCH_ELEMENT_PADDING:8},i4={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};/** - * @license - * Copyright 2017 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var r4=function(i){function e(t){return i.call(this,qi(qi({},e.defaultAdapter),t))||this}return Vn(e,i),Object.defineProperty(e,"strings",{get:function(){return t4},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return i4},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return dg},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var r=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=dg.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(r)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e}(Wn);function cg(i){let e,t,r;const n=i[15].default,a=hi(n,i,i[14],null);return{c(){e=ni("div"),a&&a.c(),di(e,"class","mdc-notched-outline__notch"),di(e,"style",t=Object.entries(i[7]).map(ug).join(" "))},m(s,o){_t(s,e,o),a&&a.m(e,null),r=!0},p(s,o){a&&a.p&&(!r||16384&o)&&pi(a,n,s,s[14],r?mi(n,s[14],o,null):gi(s[14]),null),(!r||128&o&&t!==(t=Object.entries(s[7]).map(ug).join(" ")))&&di(e,"style",t)},i(s){r||(Le(a,s),r=!0)},o(s){je(a,s),r=!1},d(s){s&&vt(e),a&&a.d(s)}}}function n4(i){let e,t,r,n,a,s,o,l,d,c,u=!i[3]&&cg(i),f=[{class:s=Zt(wi({[i[1]]:!0,"mdc-notched-outline":!0,"mdc-notched-outline--notched":i[2],"mdc-notched-outline--no-label":i[3]},i[6]))},i[10]],h={};for(let g=0;g{u=null}),or()):u?(u.p(g,S),8&S&&Le(u,1)):(u=cg(g),u.c(),Le(u,1),u.m(e,n)),Pi(e,h=Ei(f,[(!l||78&S&&s!==(s=Zt(wi({[g[1]]:!0,"mdc-notched-outline":!0,"mdc-notched-outline--notched":g[2],"mdc-notched-outline--no-label":g[3]},g[6]))))&&{class:s},1024&S&&g[10]])),o&&Ri(o.update)&&1&S&&o.update.call(null,g[0])},i(g){l||(Le(u),l=!0)},o(g){je(u),l=!1},d(g){g&&vt(e),u&&u.d(),i[16](null),d=!1,Xi(c)}}}const ug=([i,e])=>`${i}: ${e};`;function a4(i,e,t){const r=["use","class","notched","noLabel","notch","closeNotch","getElement"];let n=ci(e,r),{$$slots:a={},$$scope:s}=e;const o=Mr(dr());let l,d,c,{use:u=[]}=e,{class:f=""}=e,{notched:h=!1}=e,{noLabel:g=!1}=e,S={},p={};function b(y){S[y]||t(6,S[y]=!0,S)}function T(y){y in S&&!S[y]||t(6,S[y]=!1,S)}return Xr(()=>(d=new r4({addClass:b,removeClass:T,setNotchWidthProperty:y=>{return L=y+"px",void(p[v="width"]!=L&&(L===""||L==null?(delete p[v],t(7,p)):t(7,p[v]=L,p)));var v,L},removeNotchWidthProperty:()=>{var y;(y="width")in p&&(delete p[y],t(7,p))}}),d.init(),()=>{d.destroy()})),i.$$set=y=>{e=St(St({},e),Dr(y)),t(10,n=ci(e,r)),"use"in y&&t(0,u=y.use),"class"in y&&t(1,f=y.class),"notched"in y&&t(2,h=y.notched),"noLabel"in y&&t(3,g=y.noLabel),"$$scope"in y&&t(14,s=y.$$scope)},i.$$.update=()=>{16&i.$$.dirty&&(c?(c.addStyle("transition-duration","0s"),b("mdc-notched-outline--upgraded"),requestAnimationFrame(()=>{c&&c.removeStyle("transition-duration")})):T("mdc-notched-outline--upgraded"))},[u,f,h,g,c,l,S,p,o,function(y){t(4,c=y.detail)},n,function(y){d.notch(y)},function(){d.closeNotch()},function(){return l},s,a,function(y){Nt[y?"unshift":"push"](()=>{l=y,t(5,l)})},()=>t(4,c=void 0)]}let s4=class extends _r{constructor(e){super(),vr(this,e,a4,n4,er,{use:0,class:1,notched:2,noLabel:3,notch:11,closeNotch:12,getElement:13})}get notch(){return this.$$.ctx[11]}get closeNotch(){return this.$$.ctx[12]}get getElement(){return this.$$.ctx[13]}};var o4=En({class:"mdc-text-field-helper-line",tag:"div"}),l4=En({class:"mdc-text-field__affix mdc-text-field__affix--prefix",tag:"span"}),d4=En({class:"mdc-text-field__affix mdc-text-field__affix--suffix",tag:"span"});function c4(i){let e,t,r,n,a,s=[{class:t=Zt({[i[1]]:!0,"mdc-text-field__input":!0})},{type:i[2]},{placeholder:i[3]},i[4],i[6],i[10]],o={};for(let l=0;l{},{use:o=[]}=e,{class:l=""}=e,{type:d="text"}=e,{placeholder:c=" "}=e,{value:u=s}=e;const f=function(O){return O===s}(u);f&&(u="");let{files:h=null}=e,{dirty:g=!1}=e,{invalid:S=!1}=e,{updateInvalid:p=!0}=e,{emptyValueNull:b=u===null}=e;f&&b&&(u=null);let T,{emptyValueUndefined:y=u===void 0}=e;f&&y&&(u=void 0);let v={},L={};function z(O){if(d!=="file")if(O.currentTarget.value===""&&b)t(11,u=null);else if(O.currentTarget.value===""&&y)t(11,u=void 0);else switch(d){case"number":case"range":t(11,u=function(W){return W===""?Number.NaN:+W}(O.currentTarget.value));break;default:t(11,u=O.currentTarget.value)}else t(12,h=O.currentTarget.files)}function I(){return T}return Xr(()=>{p&&t(14,S=T.matches(":invalid"))}),i.$$set=O=>{e=St(St({},e),Dr(O)),t(10,n=ci(e,r)),"use"in O&&t(0,o=O.use),"class"in O&&t(1,l=O.class),"type"in O&&t(2,d=O.type),"placeholder"in O&&t(3,c=O.placeholder),"value"in O&&t(11,u=O.value),"files"in O&&t(12,h=O.files),"dirty"in O&&t(13,g=O.dirty),"invalid"in O&&t(14,S=O.invalid),"updateInvalid"in O&&t(15,p=O.updateInvalid),"emptyValueNull"in O&&t(16,b=O.emptyValueNull),"emptyValueUndefined"in O&&t(17,y=O.emptyValueUndefined)},i.$$.update=()=>{2068&i.$$.dirty&&(d==="file"?(delete L.value,t(4,L),t(2,d),t(11,u)):t(4,L.value=u==null?"":u,L))},[o,l,d,c,L,T,v,a,z,function(O){d!=="file"&&d!=="range"||z(O),t(13,g=!0),p&&t(14,S=T.matches(":invalid"))},n,u,h,g,S,p,b,y,function(O){var W;return O in v?(W=v[O])!==null&&W!==void 0?W:null:I().getAttribute(O)},function(O,W){v[O]!==W&&t(6,v[O]=W,v)},function(O){O in v&&v[O]==null||t(6,v[O]=void 0,v)},function(){I().focus()},function(){I().blur()},I,function(O){$d.call(this,i,O)},function(O){$d.call(this,i,O)},function(O){Nt[O?"unshift":"push"](()=>{T=O,t(5,T)})},O=>d!=="file"&&z(O)]}let f4=class extends _r{constructor(e){super(),vr(this,e,u4,c4,er,{use:0,class:1,type:2,placeholder:3,value:11,files:12,dirty:13,invalid:14,updateInvalid:15,emptyValueNull:16,emptyValueUndefined:17,getAttr:18,addAttr:19,removeAttr:20,focus:21,blur:22,getElement:23})}get getAttr(){return this.$$.ctx[18]}get addAttr(){return this.$$.ctx[19]}get removeAttr(){return this.$$.ctx[20]}get focus(){return this.$$.ctx[21]}get blur(){return this.$$.ctx[22]}get getElement(){return this.$$.ctx[23]}};function h4(i){let e,t,r,n,a,s,o=[{class:t=Zt({[i[2]]:!0,"mdc-text-field__input":!0})},{style:r=`${i[4]?"":"resize: none; "}${i[3]}`},i[6],i[9]],l={};for(let d=0;d{h&&t(11,f=s.matches(":invalid"))}),i.$$set=b=>{e=St(St({},e),Dr(b)),t(9,n=ci(e,r)),"use"in b&&t(1,o=b.use),"class"in b&&t(2,l=b.class),"style"in b&&t(3,d=b.style),"value"in b&&t(0,c=b.value),"dirty"in b&&t(10,u=b.dirty),"invalid"in b&&t(11,f=b.invalid),"updateInvalid"in b&&t(12,h=b.updateInvalid),"resizable"in b&&t(4,g=b.resizable)},[c,o,l,d,g,s,S,a,function(){t(10,u=!0),h&&t(11,f=s.matches(":invalid"))},n,u,f,h,function(b){var T;return b in S?(T=S[b])!==null&&T!==void 0?T:null:p().getAttribute(b)},function(b,T){S[b]!==T&&t(6,S[b]=T,S)},function(b){b in S&&S[b]==null||t(6,S[b]=void 0,S)},function(){p().focus()},function(){p().blur()},p,function(b){$d.call(this,i,b)},function(b){$d.call(this,i,b)},function(b){Nt[b?"unshift":"push"](()=>{s=b,t(5,s)})},function(){c=this.value,t(0,c)}]}let p4=class extends _r{constructor(e){super(),vr(this,e,m4,h4,er,{use:1,class:2,style:3,value:0,dirty:10,invalid:11,updateInvalid:12,resizable:4,getAttr:13,addAttr:14,removeAttr:15,focus:16,blur:17,getElement:18})}get getAttr(){return this.$$.ctx[13]}get addAttr(){return this.$$.ctx[14]}get removeAttr(){return this.$$.ctx[15]}get focus(){return this.$$.ctx[16]}get blur(){return this.$$.ctx[17]}get getElement(){return this.$$.ctx[18]}};/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var bu={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},g4={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},fg={LABEL_SCALE:.75},v4=["pattern","min","max","required","step","minlength","maxlength"],_4=["color","date","datetime-local","month","range","time","week"];/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var hg=["mousedown","touchstart"],mg=["click","keydown"],b4=function(i){function e(t,r){r===void 0&&(r={});var n=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return n.isFocused=!1,n.receivedUserInput=!1,n.valid=!0,n.useNativeValidation=!0,n.validateOnValueChange=!0,n.helperText=r.helperText,n.characterCounter=r.characterCounter,n.leadingIcon=r.leadingIcon,n.trailingIcon=r.trailingIcon,n.inputFocusHandler=function(){n.activateFocus()},n.inputBlurHandler=function(){n.deactivateFocus()},n.inputInputHandler=function(){n.handleInput()},n.setPointerXOffset=function(a){n.setTransformOrigin(a)},n.textFieldInteractionHandler=function(){n.handleTextFieldInteraction()},n.validationAttributeChangeHandler=function(a){n.handleValidationAttributeChange(a)},n}return Vn(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return g4},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return bu},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return fg},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return _4.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,r,n,a;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var s=on(hg),o=s.next();!o.done;o=s.next()){var l=o.value;this.adapter.registerInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}try{for(var d=on(mg),c=d.next();!c.done;c=d.next())l=c.value,this.adapter.registerTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,r,n,a;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var s=on(hg),o=s.next();!o.done;o=s.next()){var l=o.value;this.adapter.deregisterInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}try{for(var d=on(mg),c=d.next();!c.done;c=d.next())l=c.value,this.adapter.deregisterTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var r=this;t.some(function(n){return v4.indexOf(n)>-1&&(r.styleValidity(!0),r.adapter.setLabelRequired(r.getNativeInput().required),!0)}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var r=this.adapter.getLabelWidth()*fg.LABEL_SCALE;this.adapter.notchOutline(r)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},e.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var r=t.touches,n=r?r[0]:t,a=n.target.getBoundingClientRect(),s=n.clientX-a.left;this.adapter.setLineRippleTransformOrigin(s)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var r=this.isValid();this.styleValidity(r)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var r=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(r)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var r=this.getNativeInput().maxLength;if(r===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,r)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var r=e.cssClasses.INVALID;if(t?this.adapter.removeClass(r):this.adapter.addClass(r),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var n=this.helperText.isVisible(),a=this.helperText.getId();n&&a?this.adapter.setInputAttr(bu.ARIA_DESCRIBEDBY,a):this.adapter.removeInputAttr(bu.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var r=e.cssClasses.FOCUSED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.styleDisabled=function(t){var r=e.cssClasses,n=r.DISABLED,a=r.INVALID;t?(this.adapter.addClass(n),this.adapter.removeClass(a)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var r=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}(Wn);const y4=i=>({}),pg=i=>({}),x4=i=>({}),gg=i=>({}),w4=i=>({}),vg=i=>({}),S4=i=>({}),_g=i=>({}),E4=i=>({}),bg=i=>({}),T4=i=>({}),yg=i=>({}),A4=i=>({}),xg=i=>({}),I4=i=>({}),wg=i=>({}),C4=i=>({}),Sg=i=>({}),k4=i=>({}),Eg=i=>({}),$4=i=>({}),Tg=i=>({}),L4=i=>({}),Ag=i=>({});function O4(i){let e,t,r,n,a,s,o,l,d,c,u,f,h,g;const S=i[56].label,p=hi(S,i,i[87],bg);r=new Rd({props:{key:"SMUI:textfield:icon:leading",value:!0,$$slots:{default:[P4]},$$scope:{ctx:i}}});const b=i[56].default,T=hi(b,i,i[87],null);s=new Rd({props:{key:"SMUI:textfield:icon:leading",value:!1,$$slots:{default:[F4]},$$scope:{ctx:i}}});const y=i[56].ripple,v=hi(y,i,i[87],gg);let L=[{class:l=Zt(wi({[i[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":i[12],"mdc-text-field--textarea":i[14],"mdc-text-field--filled":i[15]==="filled","mdc-text-field--outlined":i[15]==="outlined","smui-text-field--standard":i[15]==="standard"&&!i[14],"mdc-text-field--no-label":i[16]||!i[47].label,"mdc-text-field--with-leading-icon":i[47].leadingIcon,"mdc-text-field--with-trailing-icon":i[47].trailingIcon,"mdc-text-field--invalid":i[1]},i[25]))},{style:d=Object.entries(i[26]).map(Dg).concat([i[10]]).join(" ")},Od(i[46],["input$","label$","ripple$","outline$","helperLine$"])],z={};for(let I=0;I{y=null}),or()):y?(y.p(P,C),49152&C[0]&&Le(y,1)):(y=Ig(P),y.c(),Le(y,1),y.m(e,t)),P[14]||P[15]==="outlined"?v?(v.p(P,C),49152&C[0]&&Le(v,1)):(v=$g(P),v.c(),Le(v,1),v.m(e,r)):v&&(sr(),je(v,1,1,()=>{v=null}),or());const Y={};33554432&C[2]&&(Y.$$scope={dirty:C,ctx:P}),n.$set(Y),z&&z.p&&(!p||33554432&C[2])&&pi(z,L,P,P[87],p?mi(L,P[87],C,null):gi(P[87]),null);let U=o;o=W(P),o===U?O[o].p(P,C):(sr(),je(O[U],1,1,()=>{O[U]=null}),or(),l=O[o],l?l.p(P,C):(l=O[o]=I[o](P),l.c()),Le(l,1),l.m(e,d));const ee={};33554432&C[2]&&(ee.$$scope={dirty:C,ctx:P}),c.$set(ee),!P[14]&&P[15]!=="outlined"&&P[11]?he?(he.p(P,C),51200&C[0]&&Le(he,1)):(he=Pg(P),he.c(),Le(he,1),he.m(e,null)):he&&(sr(),je(he,1,1,()=>{he=null}),or()),Pi(e,ie=Ei(ne,[(!p||314823171&C[0]|65536&C[1]&&f!==(f=Zt(wi({[P[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":P[12],"mdc-text-field--textarea":P[14],"mdc-text-field--filled":P[15]==="filled","mdc-text-field--outlined":P[15]==="outlined","smui-text-field--standard":P[15]==="standard"&&!P[14],"mdc-text-field--no-label":P[16]||P[17]==null&&!P[47].label,"mdc-text-field--label-floating":P[28]||P[0]!=null&&P[0]!=="","mdc-text-field--with-leading-icon":P[35](P[22])?P[47].leadingIcon:P[22],"mdc-text-field--with-trailing-icon":P[35](P[23])?P[47].trailingIcon:P[23],"mdc-text-field--with-internal-counter":P[14]&&P[47].internalCounter,"mdc-text-field--invalid":P[1]},P[25]))))&&{class:f},(!p||67109888&C[0]&&h!==(h=Object.entries(P[26]).map(Ng).concat([P[10]]).join(" ")))&&{style:h},{for:void 0},32768&C[1]&&Od(P[46],["input$","label$","ripple$","outline$","helperLine$"])])),g&&Ri(g.update)&&49152&C[0]|4&C[1]&&g.update.call(null,{ripple:!P[14]&&P[15]==="filled",unbounded:!1,addClass:P[43],removeClass:P[44],addStyle:P[45],eventTarget:P[33],activeTarget:P[33],initPromise:P[37]}),S&&Ri(S.update)&&256&C[0]&&S.update.call(null,P[8])},i(P){p||(Le(y),Le(v),Le(n.$$.fragment,P),Le(z,P),Le(l),Le(c.$$.fragment,P),Le(he),p=!0)},o(P){je(y),je(v),je(n.$$.fragment,P),je(z,P),je(l),je(c.$$.fragment,P),je(he),p=!1},d(P){P&&vt(e),y&&y.d(),v&&v.d(),Kt(n),z&&z.d(P),O[o].d(),Kt(c),he&&he.d(),i[78](null),b=!1,Xi(T)}}}function P4(i){let e;const t=i[56].leadingIcon,r=hi(t,i,i[87],_g);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&pi(r,t,n,n[87],e?mi(t,n[87],a,S4):gi(n[87]),_g)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function F4(i){let e;const t=i[56].trailingIcon,r=hi(t,i,i[87],vg);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&pi(r,t,n,n[87],e?mi(t,n[87],a,w4):gi(n[87]),vg)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function Ig(i){let e,t,r,n=i[15]==="filled"&&Cg(),a=!i[16]&&(i[17]!=null||i[47].label)&&kg(i);return{c(){n&&n.c(),e=Ai(),a&&a.c(),t=Tr()},m(s,o){n&&n.m(s,o),_t(s,e,o),a&&a.m(s,o),_t(s,t,o),r=!0},p(s,o){s[15]==="filled"?n||(n=Cg(),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),s[16]||s[17]==null&&!s[47].label?a&&(sr(),je(a,1,1,()=>{a=null}),or()):a?(a.p(s,o),196608&o[0]|65536&o[1]&&Le(a,1)):(a=kg(s),a.c(),Le(a,1),a.m(t.parentNode,t))},i(s){r||(Le(a),r=!0)},o(s){je(a),r=!1},d(s){n&&n.d(s),s&&vt(e),a&&a.d(s),s&&vt(t)}}}function Cg(i){let e;return{c(){e=ni("span"),di(e,"class","mdc-text-field__ripple")},m(t,r){_t(t,e,r)},d(t){t&&vt(e)}}}function kg(i){let e,t;const r=[{floatAbove:i[28]||i[0]!=null&&i[0]!==""&&(typeof i[0]!="number"||!isNaN(i[0]))},{required:i[13]},{wrapped:!0},Nr(i[46],"label$")];let n={$$slots:{default:[N4]},$$scope:{ctx:i}};for(let a=0;a{r=null}),or()):r?(r.p(n,a),196608&a[0]|65536&a[1]&&Le(r,1)):(r=Lg(n),r.c(),Le(r,1),r.m(e.parentNode,e))},i(n){t||(Le(r),t=!0)},o(n){je(r),t=!1},d(n){r&&r.d(n),n&&vt(e)}}}function z4(i){let e;const t=i[56].leadingIcon,r=hi(t,i,i[87],Eg);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&pi(r,t,n,n[87],e?mi(t,n[87],a,k4):gi(n[87]),Eg)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function B4(i){let e,t,r,n,a,s,o,l,d,c;const u=i[56].prefix,f=hi(u,i,i[87],wg);let h=i[20]!=null&&Og(i);const g=[{type:i[18]},{disabled:i[12]},{required:i[13]},{updateInvalid:i[19]},{"aria-controls":i[27]},{"aria-describedby":i[27]},i[16]&&i[17]!=null?{placeholder:i[17]}:{},Nr(i[46],"input$")];function S(I){i[69](I)}function p(I){i[70](I)}function b(I){i[71](I)}function T(I){i[72](I)}let y={};for(let I=0;Isn(r,"value",S)),Nt.push(()=>sn(r,"files",p)),Nt.push(()=>sn(r,"dirty",b)),Nt.push(()=>sn(r,"invalid",T)),r.$on("blur",i[73]),r.$on("focus",i[74]),r.$on("blur",i[75]),r.$on("focus",i[76]);let v=i[21]!=null&&Rg(i);const L=i[56].suffix,z=hi(L,i,i[87],xg);return{c(){f&&f.c(),e=Ai(),h&&h.c(),t=Ai(),Jt(r.$$.fragment),l=Ai(),v&&v.c(),d=Ai(),z&&z.c()},m(I,O){f&&f.m(I,O),_t(I,e,O),h&&h.m(I,O),_t(I,t,O),Yt(r,I,O),_t(I,l,O),v&&v.m(I,O),_t(I,d,O),z&&z.m(I,O),c=!0},p(I,O){f&&f.p&&(!c||33554432&O[2])&&pi(f,u,I,I[87],c?mi(u,I[87],O,I4):gi(I[87]),wg),I[20]!=null?h?(h.p(I,O),1048576&O[0]&&Le(h,1)):(h=Og(I),h.c(),Le(h,1),h.m(t.parentNode,t)):h&&(sr(),je(h,1,1,()=>{h=null}),or());const W=135213056&O[0]|32768&O[1]?Ei(g,[262144&O[0]&&{type:I[18]},4096&O[0]&&{disabled:I[12]},8192&O[0]&&{required:I[13]},524288&O[0]&&{updateInvalid:I[19]},134217728&O[0]&&{"aria-controls":I[27]},134217728&O[0]&&{"aria-describedby":I[27]},196608&O[0]&&ar(I[16]&&I[17]!=null?{placeholder:I[17]}:{}),32768&O[1]&&ar(Nr(I[46],"input$"))]):{};!n&&1&O[0]&&(n=!0,W.value=I[0],an(()=>n=!1)),!a&&8&O[0]&&(a=!0,W.files=I[3],an(()=>a=!1)),!s&&16&O[0]&&(s=!0,W.dirty=I[4],an(()=>s=!1)),!o&&2&O[0]&&(o=!0,W.invalid=I[1],an(()=>o=!1)),r.$set(W),I[21]!=null?v?(v.p(I,O),2097152&O[0]&&Le(v,1)):(v=Rg(I),v.c(),Le(v,1),v.m(d.parentNode,d)):v&&(sr(),je(v,1,1,()=>{v=null}),or()),z&&z.p&&(!c||33554432&O[2])&&pi(z,L,I,I[87],c?mi(L,I[87],O,A4):gi(I[87]),xg)},i(I){c||(Le(f,I),Le(h),Le(r.$$.fragment,I),Le(v),Le(z,I),c=!0)},o(I){je(f,I),je(h),je(r.$$.fragment,I),je(v),je(z,I),c=!1},d(I){f&&f.d(I),I&&vt(e),h&&h.d(I),I&&vt(t),i[68](null),Kt(r,I),I&&vt(l),v&&v.d(I),I&&vt(d),z&&z.d(I)}}}function U4(i){let e,t,r,n,a,s,o,l;const d=[{disabled:i[12]},{required:i[13]},{updateInvalid:i[19]},{"aria-controls":i[27]},{"aria-describedby":i[27]},Nr(i[46],"input$")];function c(p){i[61](p)}function u(p){i[62](p)}function f(p){i[63](p)}let h={};for(let p=0;psn(t,"value",c)),Nt.push(()=>sn(t,"dirty",u)),Nt.push(()=>sn(t,"invalid",f)),t.$on("blur",i[64]),t.$on("focus",i[65]),t.$on("blur",i[66]),t.$on("focus",i[67]);const g=i[56].internalCounter,S=hi(g,i,i[87],Sg);return{c(){e=ni("span"),Jt(t.$$.fragment),s=Ai(),S&&S.c(),di(e,"class",o=Zt({"mdc-text-field__resizer":!("input$resizable"in i[46])||i[46].input$resizable}))},m(p,b){_t(p,e,b),Yt(t,e,null),Wi(e,s),S&&S.m(e,null),l=!0},p(p,b){const T=134754304&b[0]|32768&b[1]?Ei(d,[4096&b[0]&&{disabled:p[12]},8192&b[0]&&{required:p[13]},524288&b[0]&&{updateInvalid:p[19]},134217728&b[0]&&{"aria-controls":p[27]},134217728&b[0]&&{"aria-describedby":p[27]},32768&b[1]&&ar(Nr(p[46],"input$"))]):{};!r&&1&b[0]&&(r=!0,T.value=p[0],an(()=>r=!1)),!n&&16&b[0]&&(n=!0,T.dirty=p[4],an(()=>n=!1)),!a&&2&b[0]&&(a=!0,T.invalid=p[1],an(()=>a=!1)),t.$set(T),S&&S.p&&(!l||33554432&b[2])&&pi(S,g,p,p[87],l?mi(g,p[87],b,C4):gi(p[87]),Sg),(!l||32768&b[1]&&o!==(o=Zt({"mdc-text-field__resizer":!("input$resizable"in p[46])||p[46].input$resizable})))&&di(e,"class",o)},i(p){l||(Le(t.$$.fragment,p),Le(S,p),l=!0)},o(p){je(t.$$.fragment,p),je(S,p),l=!1},d(p){p&&vt(e),i[60](null),Kt(t),S&&S.d(p)}}}function Og(i){let e,t;return e=new l4({props:{$$slots:{default:[G4]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};1048576&n[0]|33554432&n[2]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||(Le(e.$$.fragment,r),t=!0)},o(r){je(e.$$.fragment,r),t=!1},d(r){Kt(e,r)}}}function G4(i){let e;return{c(){e=Sn(i[20])},m(t,r){_t(t,e,r)},p(t,r){1048576&r[0]&&Ha(e,t[20])},d(t){t&&vt(e)}}}function Rg(i){let e,t;return e=new d4({props:{$$slots:{default:[j4]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};2097152&n[0]|33554432&n[2]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||(Le(e.$$.fragment,r),t=!0)},o(r){je(e.$$.fragment,r),t=!1},d(r){Kt(e,r)}}}function j4(i){let e;return{c(){e=Sn(i[21])},m(t,r){_t(t,e,r)},p(t,r){2097152&r[0]&&Ha(e,t[21])},d(t){t&&vt(e)}}}function H4(i){let e;const t=i[56].trailingIcon,r=hi(t,i,i[87],yg);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&pi(r,t,n,n[87],e?mi(t,n[87],a,T4):gi(n[87]),yg)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function Pg(i){let e,t;const r=[Nr(i[46],"ripple$")];let n={};for(let a=0;a{l=null}),or())},i(d){a||(Le(t),Le(l),a=!0)},o(d){je(t),je(l),a=!1},d(d){o[e].d(d),d&&vt(r),l&&l.d(d),d&&vt(n)}}}const Ng=([i,e])=>`${i}: ${e};`,Dg=([i,e])=>`${i}: ${e};`;function q4(i,e,t){let r;const n=["use","class","style","ripple","disabled","required","textarea","variant","noLabel","label","type","value","files","invalid","updateInvalid","dirty","prefix","suffix","validateOnValueChange","useNativeValidation","withLeadingIcon","withTrailingIcon","input","floatingLabel","lineRipple","notchedOutline","focus","blur","layout","getElement"];let a=ci(e,n),{$$slots:s={},$$scope:o}=e;const l=FA(s),{applyPassive:d}=zv,c=Mr(dr());let u=()=>{};function f(K){return K===u}let{use:h=[]}=e,{class:g=""}=e,{style:S=""}=e,{ripple:p=!0}=e,{disabled:b=!1}=e,{required:T=!1}=e,{textarea:y=!1}=e,{variant:v=y?"outlined":"standard"}=e,{noLabel:L=!1}=e,{label:z}=e,{type:I="text"}=e,{value:O=a.input$emptyValueUndefined?void 0:u}=e,{files:W=u}=e;const he=!f(O)||!f(W);f(O)&&(O=void 0),f(W)&&(W=null);let{invalid:ne=u}=e,{updateInvalid:ie=f(ne)}=e;f(ne)&&(ne=!1);let P,C,Y,U,ee,Fe,xe,ke,Ge,{dirty:Ye=!1}=e,{prefix:ce}=e,{suffix:ft}=e,{validateOnValueChange:yt=ie}=e,{useNativeValidation:ot=ie}=e,{withLeadingIcon:xt=u}=e,{withTrailingIcon:ge=u}=e,{input:oe}=e,{floatingLabel:Qe}=e,{lineRipple:lt}=e,{notchedOutline:we}=e,It={},Ct={},Qt=!1,ui=Pr("SMUI:addLayoutListener"),ht=new Promise(K=>ee=K),Et=O;function ve(K){var bi;return K in It?(bi=It[K])!==null&&bi!==void 0?bi:null:E().classList.contains(K)}function at(K){It[K]||t(25,It[K]=!0,It)}function gt(K){K in It&&!It[K]||t(25,It[K]=!1,It)}function ei(){if(C){const K=C.shouldFloat;C.notchOutline(K)}}function E(){return P}return ui&&(U=ui(ei)),Xr(()=>{if(t(54,C=new b4({addClass:at,removeClass:gt,hasClass:ve,registerTextFieldInteractionHandler:(K,bi)=>E().addEventListener(K,bi),deregisterTextFieldInteractionHandler:(K,bi)=>E().removeEventListener(K,bi),registerValidationAttributeChangeHandler:K=>{const bi=new MutationObserver(it=>{ot&&K((nt=>nt.map(pe=>pe.attributeName).filter(pe=>pe))(it))}),Xa={attributes:!0};return oe&&bi.observe(oe.getElement(),Xa),bi},deregisterValidationAttributeChangeHandler:K=>{K.disconnect()},getNativeInput:()=>{var K;return(K=oe==null?void 0:oe.getElement())!==null&&K!==void 0?K:null},setInputAttr:(K,bi)=>{oe==null||oe.addAttr(K,bi)},removeInputAttr:K=>{oe==null||oe.removeAttr(K)},isFocused:()=>document.activeElement===(oe==null?void 0:oe.getElement()),registerInputInteractionHandler:(K,bi)=>{oe==null||oe.getElement().addEventListener(K,bi,d())},deregisterInputInteractionHandler:(K,bi)=>{oe==null||oe.getElement().removeEventListener(K,bi,d())},floatLabel:K=>Qe&&Qe.float(K),getLabelWidth:()=>Qe?Qe.getWidth():0,hasLabel:()=>!!Qe,shakeLabel:K=>Qe&&Qe.shake(K),setLabelRequired:K=>Qe&&Qe.setRequired(K),activateLineRipple:()=>lt&<.activate(),deactivateLineRipple:()=>lt&<.deactivate(),setLineRippleTransformOrigin:K=>lt&<.setRippleCenter(K),closeOutline:()=>we&&we.closeNotch(),hasOutline:()=>!!we,notchOutline:K=>we&&we.notch(K)},{get helperText(){return ke},get characterCounter(){return Ge},get leadingIcon(){return Fe},get trailingIcon(){return xe}})),he){if(oe==null)throw new Error("SMUI Textfield initialized without Input component.");C.init()}else HA().then(()=>{if(oe==null)throw new Error("SMUI Textfield initialized without Input component.");C.init()});return ee(),()=>{C.destroy()}}),Va(()=>{U&&U()}),i.$$set=K=>{e=St(St({},e),Dr(K)),t(46,a=ci(e,n)),"use"in K&&t(8,h=K.use),"class"in K&&t(9,g=K.class),"style"in K&&t(10,S=K.style),"ripple"in K&&t(11,p=K.ripple),"disabled"in K&&t(12,b=K.disabled),"required"in K&&t(13,T=K.required),"textarea"in K&&t(14,y=K.textarea),"variant"in K&&t(15,v=K.variant),"noLabel"in K&&t(16,L=K.noLabel),"label"in K&&t(17,z=K.label),"type"in K&&t(18,I=K.type),"value"in K&&t(0,O=K.value),"files"in K&&t(3,W=K.files),"invalid"in K&&t(1,ne=K.invalid),"updateInvalid"in K&&t(19,ie=K.updateInvalid),"dirty"in K&&t(4,Ye=K.dirty),"prefix"in K&&t(20,ce=K.prefix),"suffix"in K&&t(21,ft=K.suffix),"validateOnValueChange"in K&&t(48,yt=K.validateOnValueChange),"useNativeValidation"in K&&t(49,ot=K.useNativeValidation),"withLeadingIcon"in K&&t(22,xt=K.withLeadingIcon),"withTrailingIcon"in K&&t(23,ge=K.withTrailingIcon),"input"in K&&t(2,oe=K.input),"floatingLabel"in K&&t(5,Qe=K.floatingLabel),"lineRipple"in K&&t(6,lt=K.lineRipple),"notchedOutline"in K&&t(7,we=K.notchedOutline),"$$scope"in K&&t(87,o=K.$$scope)},i.$$.update=()=>{if(4&i.$$.dirty[0]&&t(33,r=oe&&oe.getElement()),524290&i.$$.dirty[0]|8388608&i.$$.dirty[1]&&C&&C.isValid()!==!ne&&(ie?t(1,ne=!C.isValid()):C.setValid(!ne)),8519680&i.$$.dirty[1]&&C&&C.getValidateOnValueChange()!==yt&&C.setValidateOnValueChange(!f(yt)&&yt),8650752&i.$$.dirty[1]&&C&&C.setUseNativeValidation(!!f(ot)||ot),4096&i.$$.dirty[0]|8388608&i.$$.dirty[1]&&C&&C.setDisabled(b),1&i.$$.dirty[0]|25165824&i.$$.dirty[1]&&C&&he&&Et!==O){t(55,Et=O);const K=`${O}`;C.getValue()!==K&&C.setValue(K)}},[O,ne,oe,W,Ye,Qe,lt,we,h,g,S,p,b,T,y,v,L,z,I,ie,ce,ft,xt,ge,P,It,Ct,Y,Qt,Fe,xe,ke,Ge,r,c,f,he,ht,function(K){t(29,Fe=K.detail)},function(K){t(30,xe=K.detail)},function(K){t(32,Ge=K.detail)},function(K){t(27,Y=K.detail)},function(K){t(31,ke=K.detail)},at,gt,function(K,bi){Ct[K]!=bi&&(bi===""||bi==null?(delete Ct[K],t(26,Ct)):t(26,Ct[K]=bi,Ct))},a,l,yt,ot,function(){oe==null||oe.focus()},function(){oe==null||oe.blur()},ei,E,C,Et,s,function(K){Nt[K?"unshift":"push"](()=>{Qe=K,t(5,Qe)})},function(K){Nt[K?"unshift":"push"](()=>{Qe=K,t(5,Qe)})},function(K){Nt[K?"unshift":"push"](()=>{we=K,t(7,we)})},function(K){Nt[K?"unshift":"push"](()=>{oe=K,t(2,oe)})},function(K){O=K,t(0,O)},function(K){Ye=K,t(4,Ye)},function(K){ne=K,t(1,ne),t(54,C),t(19,ie)},()=>t(28,Qt=!1),()=>t(28,Qt=!0),K=>Oi(P,"blur",K),K=>Oi(P,"focus",K),function(K){Nt[K?"unshift":"push"](()=>{oe=K,t(2,oe)})},function(K){O=K,t(0,O)},function(K){W=K,t(3,W)},function(K){Ye=K,t(4,Ye)},function(K){ne=K,t(1,ne),t(54,C),t(19,ie)},()=>t(28,Qt=!1),()=>t(28,Qt=!0),K=>Oi(P,"blur",K),K=>Oi(P,"focus",K),function(K){Nt[K?"unshift":"push"](()=>{lt=K,t(6,lt)})},function(K){Nt[K?"unshift":"push"](()=>{P=K,t(24,P)})},()=>t(29,Fe=void 0),()=>t(30,xe=void 0),()=>t(32,Ge=void 0),function(K){Nt[K?"unshift":"push"](()=>{P=K,t(24,P)})},()=>t(29,Fe=void 0),()=>t(30,xe=void 0),()=>{t(27,Y=void 0),t(31,ke=void 0)},()=>t(32,Ge=void 0),o]}let X4=class extends _r{constructor(e){super(),vr(this,e,q4,W4,er,{use:8,class:9,style:10,ripple:11,disabled:12,required:13,textarea:14,variant:15,noLabel:16,label:17,type:18,value:0,files:3,invalid:1,updateInvalid:19,dirty:4,prefix:20,suffix:21,validateOnValueChange:48,useNativeValidation:49,withLeadingIcon:22,withTrailingIcon:23,input:2,floatingLabel:5,lineRipple:6,notchedOutline:7,focus:50,blur:51,layout:52,getElement:53},null,[-1,-1,-1,-1])}get focus(){return this.$$.ctx[50]}get blur(){return this.$$.ctx[51]}get layout(){return this.$$.ctx[52]}get getElement(){return this.$$.ctx[53]}};/** - * @license - * Copyright 2016 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var Mg={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},Y4={ROOT:"mdc-text-field__icon"};/** - * @license - * Copyright 2017 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var zg=["click","keydown"],K4=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.savedTabIndex=null,r.interactionHandler=function(n){r.handleInteraction(n)},r}return Vn(e,i),Object.defineProperty(e,"strings",{get:function(){return Mg},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return Y4},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,r;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var n=on(zg),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.registerInteractionHandler(s,this.interactionHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,r;try{for(var n=on(zg),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.deregisterInteractionHandler(s,this.interactionHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",Mg.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var r=t.key==="Enter"||t.keyCode===13;(t.type==="click"||r)&&(t.preventDefault(),this.adapter.notifyIconAction())},e}(Wn);function Z4(i){let e;return{c(){e=Sn(i[7])},m(t,r){_t(t,e,r)},p(t,r){128&r&&Ha(e,t[7])},i:Si,o:Si,d(t){t&&vt(e)}}}function J4(i){let e;const t=i[15].default,r=hi(t,i,i[14],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||16384&a)&&pi(r,t,n,n[14],e?mi(t,n[14],a,null):gi(n[14]),null)},i(n){e||(Le(r,n),e=!0)},o(n){je(r,n),e=!1},d(n){r&&r.d(n)}}}function Q4(i){let e,t,r,n,a,s,o,l,d,c;const u=[J4,Z4],f=[];function h(p,b){return p[7]==null?0:1}t=h(i),r=f[t]=u[t](i);let g=[{class:n=Zt({[i[1]]:!0,"mdc-text-field__icon":!0,"mdc-text-field__icon--leading":i[11],"mdc-text-field__icon--trailing":!i[11]})},{"aria-hidden":a=i[3]===-1?"true":"false"},{"aria-disabled":s=i[2]==="button"?i[4]?"true":"false":void 0},i[8],i[6],i[12]],S={};for(let p=0;p{f[T]=null}),or(),r=f[t],r?r.p(p,b):(r=f[t]=u[t](p),r.c()),Le(r,1),r.m(e,null)),Pi(e,S=Ei(g,[(!l||2&b&&n!==(n=Zt({[p[1]]:!0,"mdc-text-field__icon":!0,"mdc-text-field__icon--leading":p[11],"mdc-text-field__icon--trailing":!p[11]})))&&{class:n},(!l||8&b&&a!==(a=p[3]===-1?"true":"false"))&&{"aria-hidden":a},(!l||20&b&&s!==(s=p[2]==="button"?p[4]?"true":"false":void 0))&&{"aria-disabled":s},256&b&&p[8],64&b&&p[6],4096&b&&p[12]])),o&&Ri(o.update)&&1&b&&o.update.call(null,p[0])},i(p){l||(Le(r),l=!0)},o(p){je(r),l=!1},d(p){p&&vt(e),f[t].d(),i[16](null),d=!1,Xi(c)}}}function e5(i,e,t){let r;const n=["use","class","role","tabindex","disabled","getElement"];let a,s=ci(e,n),{$$slots:o={},$$scope:l}=e;const d=Mr(dr());let c,u,{use:f=[]}=e,{class:h=""}=e,{role:g}=e,{tabindex:S=g==="button"?0:-1}=e,{disabled:p=!1}=e,b={};const T=Pr("SMUI:textfield:icon:leading");$v(i,T,W=>t(18,a=W));const y=a;let v;function L(W){var he;return W in b?(he=b[W])!==null&&he!==void 0?he:null:O().getAttribute(W)}function z(W,he){b[W]!==he&&t(6,b[W]=he,b)}function I(W){W in b&&b[W]==null||t(6,b[W]=void 0,b)}function O(){return c}return Xr(()=>(u=new K4({getAttr:L,setAttr:z,removeAttr:I,setContent:W=>{t(7,v=W)},registerInteractionHandler:(W,he)=>O().addEventListener(W,he),deregisterInteractionHandler:(W,he)=>O().removeEventListener(W,he),notifyIconAction:()=>Oi(O(),"SMUITextField:icon",void 0,void 0,!0)}),Oi(O(),y?"SMUITextfieldLeadingIcon:mount":"SMUITextfieldTrailingIcon:mount",u),u.init(),()=>{Oi(O(),y?"SMUITextfieldLeadingIcon:unmount":"SMUITextfieldTrailingIcon:unmount",u),u.destroy()})),i.$$set=W=>{e=St(St({},e),Dr(W)),t(12,s=ci(e,n)),"use"in W&&t(0,f=W.use),"class"in W&&t(1,h=W.class),"role"in W&&t(2,g=W.role),"tabindex"in W&&t(3,S=W.tabindex),"disabled"in W&&t(4,p=W.disabled),"$$scope"in W&&t(14,l=W.$$scope)},i.$$.update=()=>{12&i.$$.dirty&&t(8,r={role:g,tabindex:S})},[f,h,g,S,p,c,b,v,r,d,T,y,s,O,l,o,function(W){Nt[W?"unshift":"push"](()=>{c=W,t(5,c)})}]}class Gv extends _r{constructor(e){super(),vr(this,e,e5,Q4,er,{use:0,class:1,role:2,tabindex:3,disabled:4,getElement:13})}get getElement(){return this.$$.ctx[13]}}/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var Hi,Os,t5={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},i5={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Ao={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};(function(i){i[i.BOTTOM=1]="BOTTOM",i[i.CENTER=2]="CENTER",i[i.RIGHT=4]="RIGHT",i[i.FLIP_RTL=8]="FLIP_RTL"})(Hi||(Hi={})),function(i){i[i.TOP_LEFT=0]="TOP_LEFT",i[i.TOP_RIGHT=4]="TOP_RIGHT",i[i.BOTTOM_LEFT=1]="BOTTOM_LEFT",i[i.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",i[i.TOP_START=8]="TOP_START",i[i.TOP_END=12]="TOP_END",i[i.BOTTOM_START=9]="BOTTOM_START",i[i.BOTTOM_END=13]="BOTTOM_END"}(Os||(Os={}));/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var jv=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.isSurfaceOpen=!1,r.isQuickOpen=!1,r.isHoistedElement=!1,r.isFixedPosition=!1,r.isHorizontallyCenteredOnViewport=!1,r.maxHeight=0,r.openBottomBias=0,r.openAnimationEndTimerId=0,r.closeAnimationEndTimerId=0,r.animationRequestId=0,r.anchorCorner=Os.TOP_START,r.originCorner=Os.TOP_START,r.anchorMargin={top:0,right:0,bottom:0,left:0},r.position={x:0,y:0},r}return Vn(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return t5},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return i5},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ao},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return Os},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,r=t.ROOT,n=t.OPEN;if(!this.adapter.hasClass(r))throw new Error(r+" class required in root element.");this.adapter.hasClass(n)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^Hi.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,r){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(r)?r:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},Ao.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var r=this;if(t===void 0&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){r.adapter.removeClass(e.cssClasses.OPEN),r.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),r.closeAnimationEndTimerId=setTimeout(function(){r.closeAnimationEndTimerId=0,r.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),r.adapter.notifyClose()},Ao.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var r=t.target;this.adapter.isElementInContainer(r)||this.close()},e.prototype.handleKeydown=function(t){var r=t.keyCode;(t.key==="Escape"||r===27)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var r=this.getoriginCorner(),n=this.getMenuSurfaceMaxHeight(r),a=this.hasBit(r,Hi.BOTTOM)?"bottom":"top",s=this.hasBit(r,Hi.RIGHT)?"right":"left",o=this.getHorizontalOriginOffset(r),l=this.getVerticalOriginOffset(r),d=this.measurements,c=d.anchorSize,u=d.surfaceSize,f=((t={})[s]=o,t[a]=l,t);c.width/u.width>Ao.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(s="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(f),this.adapter.setTransformOrigin(s+" "+a),this.adapter.setPosition(f),this.adapter.setMaxHeight(n?n+"px":""),this.hasBit(r,Hi.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),r=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),a=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:r,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:a}},e.prototype.getoriginCorner=function(){var t,r,n=this.originCorner,a=this.measurements,s=a.viewportDistance,o=a.anchorSize,l=a.surfaceSize,d=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,Hi.BOTTOM)?(t=s.top-d+this.anchorMargin.bottom,r=s.bottom-d-this.anchorMargin.bottom):(t=s.top-d+this.anchorMargin.top,r=s.bottom-d+o.height-this.anchorMargin.top),!(r-l.height>0)&&t>r+this.openBottomBias&&(n=this.setBit(n,Hi.BOTTOM));var c,u,f=this.adapter.isRtl(),h=this.hasBit(this.anchorCorner,Hi.FLIP_RTL),g=this.hasBit(this.anchorCorner,Hi.RIGHT)||this.hasBit(n,Hi.RIGHT),S=!1;(S=f&&h?!g:g)?(c=s.left+o.width+this.anchorMargin.right,u=s.right-this.anchorMargin.right):(c=s.left+this.anchorMargin.left,u=s.right+o.width-this.anchorMargin.left);var p=c-l.width>0,b=u-l.width>0,T=this.hasBit(n,Hi.FLIP_RTL)&&this.hasBit(n,Hi.RIGHT);return b&&T&&f||!p&&T?n=this.unsetBit(n,Hi.RIGHT):(p&&S&&f||p&&!S&&g||!b&&c>=u)&&(n=this.setBit(n,Hi.RIGHT)),n},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var r=this.measurements.viewportDistance,n=0,a=this.hasBit(t,Hi.BOTTOM),s=this.hasBit(this.anchorCorner,Hi.BOTTOM),o=e.numbers.MARGIN_TO_EDGE;return a?(n=r.top+this.anchorMargin.top-o,s||(n+=this.measurements.anchorSize.height)):(n=r.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-o,s&&(n-=this.measurements.anchorSize.height)),n},e.prototype.getHorizontalOriginOffset=function(t){var r=this.measurements.anchorSize,n=this.hasBit(t,Hi.RIGHT),a=this.hasBit(this.anchorCorner,Hi.RIGHT);if(n){var s=a?r.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?s-(this.measurements.viewportSize.width-this.measurements.bodySize.width):s}return a?r.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var r=this.measurements.anchorSize,n=this.hasBit(t,Hi.BOTTOM),a=this.hasBit(this.anchorCorner,Hi.BOTTOM);return n?a?r.height-this.anchorMargin.top:-this.anchorMargin.bottom:a?r.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var r,n,a=this.measurements,s=a.windowScroll,o=a.viewportDistance,l=a.surfaceSize,d=a.viewportSize,c=Object.keys(t);try{for(var u=on(c),f=u.next();!f.done;f=u.next()){var h=f.value,g=t[h]||0;!this.isHorizontallyCenteredOnViewport||h!=="left"&&h!=="right"?(g+=o[h],this.isFixedPosition||(h==="top"?g+=s.y:h==="bottom"?g-=s.y:h==="left"?g+=s.x:g-=s.x),t[h]=g):t[h]=(d.width-l.width)/2}}catch(S){r={error:S}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,r=this.adapter.isFocused(),n=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,a=n.activeElement&&this.adapter.isElementInContainer(n.activeElement);(r||a)&&setTimeout(function(){t.adapter.restoreFocus()},Ao.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,r){return!!(t&r)},e.prototype.setBit=function(t,r){return t|r},e.prototype.unsetBit=function(t,r){return t^r},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e}(Wn);const{document:r5}=DA;function n5(i){let e,t,r,n,a,s,o,l;const d=i[34].default,c=hi(d,i,i[33],null);let u=[{class:r=Zt(wi({[i[1]]:!0,"mdc-menu-surface":!0,"mdc-menu-surface--fixed":i[4],"mdc-menu-surface--open":i[3],"smui-menu-surface--static":i[3],"mdc-menu-surface--fullwidth":i[5]},i[8]))},{style:n=Object.entries(i[9]).map(Bg).concat([i[2]]).join(" ")},i[12]],f={};for(let h=0;h`${i}: ${e};`;function a5(i,e,t){const r=["use","class","style","static","anchor","fixed","open","managed","fullWidth","quickOpen","anchorElement","anchorCorner","anchorMargin","maxHeight","horizontallyCenteredOnViewport","openBottomBias","neverRestoreFocus","isOpen","setOpen","setAbsolutePosition","setIsHoisted","isFixed","getElement"];let n=ci(e,r),{$$slots:a={},$$scope:s}=e;var o,l,d;const c=Mr(dr());let u,f,h,{use:g=[]}=e,{class:S=""}=e,{style:p=""}=e,{static:b=!1}=e,{anchor:T=!0}=e,{fixed:y=!1}=e,{open:v=b}=e,{managed:L=!1}=e,{fullWidth:z=!1}=e,{quickOpen:I=!1}=e,{anchorElement:O}=e,{anchorCorner:W}=e,{anchorMargin:he={top:0,right:0,bottom:0,left:0}}=e,{maxHeight:ne=0}=e,{horizontallyCenteredOnViewport:ie=!1}=e,{openBottomBias:P=0}=e,{neverRestoreFocus:C=!1}=e,Y={},U={};Or("SMUI:list:role","menu"),Or("SMUI:list:item:role","menuitem");const ee=Os;function Fe(ce){return ce in Y?Y[ce]:Ye().classList.contains(ce)}function xe(ce){Y[ce]||t(8,Y[ce]=!0,Y)}function ke(ce){ce in Y&&!Y[ce]||t(8,Y[ce]=!1,Y)}function Ge(ce){f.close(ce),t(13,v=!1)}function Ye(){return u}return Xr(()=>(t(7,f=new jv({addClass:xe,removeClass:ke,hasClass:Fe,hasAnchor:()=>!!O,notifyClose:()=>{L||t(13,v=b),v||Oi(u,"SMUIMenuSurface:closed",void 0,void 0,!0)},notifyClosing:()=>{L||t(13,v=b),v||Oi(u,"SMUIMenuSurface:closing",void 0,void 0,!0)},notifyOpen:()=>{L||t(13,v=!0),v&&Oi(u,"SMUIMenuSurface:opened",void 0,void 0,!0)},notifyOpening:()=>{v||Oi(u,"SMUIMenuSurface:opening",void 0,void 0,!0)},isElementInContainer:ce=>u.contains(ce),isRtl:()=>getComputedStyle(u).getPropertyValue("direction")==="rtl",setTransformOrigin:ce=>{t(9,U["transform-origin"]=ce,U)},isFocused:()=>document.activeElement===u,saveFocus:()=>{var ce;h=(ce=document.activeElement)!==null&&ce!==void 0?ce:void 0},restoreFocus:()=>{!C&&(!u||u.contains(document.activeElement))&&h&&document.contains(h)&&"focus"in h&&h.focus()},getInnerDimensions:()=>({width:u.offsetWidth,height:u.offsetHeight}),getAnchorDimensions:()=>O?O.getBoundingClientRect():null,getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:ce=>{t(9,U.left="left"in ce?`${ce.left}px`:"",U),t(9,U.right="right"in ce?`${ce.right}px`:"",U),t(9,U.top="top"in ce?`${ce.top}px`:"",U),t(9,U.bottom="bottom"in ce?`${ce.bottom}px`:"",U)},setMaxHeight:ce=>{t(9,U["max-height"]=ce,U)}})),Oi(u,"SMUIMenuSurface:mount",{get open(){return v},set open(ce){t(13,v=ce)},closeProgrammatic:Ge}),f.init(),()=>{var ce;const ft=f.isHoistedElement;f.destroy(),ft&&((ce=u.parentNode)===null||ce===void 0||ce.removeChild(u))})),Va(()=>{var ce;T&&u&&((ce=u.parentElement)===null||ce===void 0||ce.classList.remove("mdc-menu-surface--anchor"))}),i.$$set=ce=>{e=St(St({},e),Dr(ce)),t(12,n=ci(e,r)),"use"in ce&&t(0,g=ce.use),"class"in ce&&t(1,S=ce.class),"style"in ce&&t(2,p=ce.style),"static"in ce&&t(3,b=ce.static),"anchor"in ce&&t(15,T=ce.anchor),"fixed"in ce&&t(4,y=ce.fixed),"open"in ce&&t(13,v=ce.open),"managed"in ce&&t(16,L=ce.managed),"fullWidth"in ce&&t(5,z=ce.fullWidth),"quickOpen"in ce&&t(17,I=ce.quickOpen),"anchorElement"in ce&&t(14,O=ce.anchorElement),"anchorCorner"in ce&&t(18,W=ce.anchorCorner),"anchorMargin"in ce&&t(19,he=ce.anchorMargin),"maxHeight"in ce&&t(20,ne=ce.maxHeight),"horizontallyCenteredOnViewport"in ce&&t(21,ie=ce.horizontallyCenteredOnViewport),"openBottomBias"in ce&&t(22,P=ce.openBottomBias),"neverRestoreFocus"in ce&&t(23,C=ce.neverRestoreFocus),"$$scope"in ce&&t(33,s=ce.$$scope)},i.$$.update=()=>{1073774656&i.$$.dirty[0]|3&i.$$.dirty[1]&&u&&T&&!(!(t(30,o=u.parentElement)===null||o===void 0)&&o.classList.contains("mdc-menu-surface--anchor"))&&(t(31,l=u.parentElement)===null||l===void 0||l.classList.add("mdc-menu-surface--anchor"),t(14,O=t(32,d=u.parentElement)!==null&&d!==void 0?d:void 0)),8320&i.$$.dirty[0]&&f&&f.isOpen()!==v&&(v?f.open():f.close()),131200&i.$$.dirty[0]&&f&&f.setQuickOpen(I),144&i.$$.dirty[0]&&f&&f.setFixedPosition(y),1048704&i.$$.dirty[0]&&f&&f.setMaxHeight(ne),2097280&i.$$.dirty[0]&&f&&f.setIsHorizontallyCenteredOnViewport(ie),262272&i.$$.dirty[0]&&f&&W!=null&&(typeof W=="string"?f.setAnchorCorner(ee[W]):f.setAnchorCorner(W)),524416&i.$$.dirty[0]&&f&&f.setAnchorMargin(he),4194432&i.$$.dirty[0]&&f&&f.setOpenBottomBias(P)},[g,S,p,b,y,z,u,f,Y,U,c,function(ce){f&&v&&!L&&f.handleBodyClick(ce)},n,v,O,T,L,I,W,he,ne,ie,P,C,function(){return v},function(ce){t(13,v=ce)},function(ce,ft){return f.setAbsolutePosition(ce,ft)},function(ce){return f.setIsHoisted(ce)},function(){return f.isFixed()},Ye,o,l,d,s,a,function(ce){Nt[ce?"unshift":"push"](()=>{u=ce,t(6,u)})}]}class s5 extends _r{constructor(e){super(),vr(this,e,a5,n5,er,{use:0,class:1,style:2,static:3,anchor:15,fixed:4,open:13,managed:16,fullWidth:5,quickOpen:17,anchorElement:14,anchorCorner:18,anchorMargin:19,maxHeight:20,horizontallyCenteredOnViewport:21,openBottomBias:22,neverRestoreFocus:23,isOpen:24,setOpen:25,setAbsolutePosition:26,setIsHoisted:27,isFixed:28,getElement:29},null,[-1,-1])}get isOpen(){return this.$$.ctx[24]}get setOpen(){return this.$$.ctx[25]}get setAbsolutePosition(){return this.$$.ctx[26]}get setIsHoisted(){return this.$$.ctx[27]}get isFixed(){return this.$$.ctx[28]}get getElement(){return this.$$.ctx[29]}}/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var As,Rs={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},ys={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},o5={FOCUS_ROOT_INDEX:-1};(function(i){i[i.NONE=0]="NONE",i[i.LIST_ROOT=1]="LIST_ROOT",i[i.FIRST_ITEM=2]="FIRST_ITEM",i[i.LAST_ITEM=3]="LAST_ITEM"})(As||(As={}));/** - * @license - * Copyright 2018 Google Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */var l5=function(i){function e(t){var r=i.call(this,qi(qi({},e.defaultAdapter),t))||this;return r.closeAnimationEndTimerId=0,r.defaultFocusState=As.LIST_ROOT,r.selectedIndex=-1,r}return Vn(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return Rs},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ys},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return o5},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var r=t.key,n=t.keyCode;(r==="Tab"||n===9)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var r=this,n=this.adapter.getElementIndex(t);if(!(n<0)){this.adapter.notifySelected({index:n});var a=this.adapter.getAttributeFromElementAtIndex(n,ys.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(a),this.closeAnimationEndTimerId=setTimeout(function(){var s=r.adapter.getElementIndex(t);s>=0&&r.adapter.isSelectableItemAtIndex(s)&&r.setSelectedIndex(s)},jv.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case As.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case As.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case As.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var r=this.adapter.getSelectedSiblingOfItemAtIndex(t);r>=0&&(this.adapter.removeAttributeFromElementAtIndex(r,ys.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(r,Rs.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,Rs.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,ys.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,r){this.validatedIndex(t),r?(this.adapter.removeClassFromElementAtIndex(t,jt.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,ys.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,jt.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,ys.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var r=this.adapter.getMenuItemCount();if(!(t>=0&&tsn(e,"open",a)),e.$on("SMUIMenuSurface:mount",i[7]),e.$on("SMUIList:mount",i[8]),e.$on("SMUIMenuSurface:opened",i[20]),e.$on("keydown",i[6]),e.$on("SMUIList:action",i[21]),{c(){Jt(e.$$.fragment)},m(o,l){Yt(e,o,l),r=!0},p(o,[l]){const d=546&l?Ei(n,[32&l&&{use:o[5]},2&l&&{class:Zt({[o[1]]:!0,"mdc-menu":!0})},512&l&&ar(o[9])]):{};4194304&l&&(d.$$scope={dirty:l,ctx:o}),!t&&1&l&&(t=!0,d.open=o[0],an(()=>t=!1)),e.$set(d)},i(o){r||(Le(e.$$.fragment,o),r=!0)},o(o){je(e.$$.fragment,o),r=!1},d(o){i[18](null),Kt(e,o)}}}function u5(i,e,t){let r;const n=["use","class","open","isOpen","setOpen","setDefaultFocusState","getSelectedIndex","getMenuSurface","getElement"];let a=ci(e,n),{$$slots:s={},$$scope:o}=e;const{closest:l}=$f,d=Mr(dr());let c,u,f,h,{use:g=[]}=e,{class:S=""}=e,{open:p=!1}=e;function b(){return c.getElement()}return Xr(()=>(t(3,u=new l5({addClassToElementAtIndex:(T,y)=>{h.addClassForElementIndex(T,y)},removeClassFromElementAtIndex:(T,y)=>{h.removeClassForElementIndex(T,y)},addAttributeToElementAtIndex:(T,y,v)=>{h.setAttributeForElementIndex(T,y,v)},removeAttributeFromElementAtIndex:(T,y)=>{h.removeAttributeForElementIndex(T,y)},getAttributeFromElementAtIndex:(T,y)=>h.getAttributeFromElementIndex(T,y),elementContainsClass:(T,y)=>T.classList.contains(y),closeSurface:T=>{f.closeProgrammatic(T),Oi(b(),"SMUIMenu:closedProgrammatically")},getElementIndex:T=>h.getOrderedList().map(y=>y.element).indexOf(T),notifySelected:T=>Oi(b(),"SMUIMenu:selected",{index:T.index,item:h.getOrderedList()[T.index].element},void 0,!0),getMenuItemCount:()=>h.items.length,focusItemAtIndex:T=>h.focusItemAtIndex(T),focusListRoot:()=>"focus"in h.element&&h.element.focus(),isSelectableItemAtIndex:T=>!!l(h.getOrderedList()[T].element,`.${Rs.MENU_SELECTION_GROUP}`),getSelectedSiblingOfItemAtIndex:T=>{const y=h.getOrderedList(),v=l(y[T].element,`.${Rs.MENU_SELECTION_GROUP}`),L=v==null?void 0:v.querySelector(`.${Rs.MENU_SELECTED_LIST_ITEM}`);return L?y.map(z=>z.element).indexOf(L):-1}})),Oi(b(),"SMUIMenu:mount",u),u.init(),()=>{u.destroy()})),i.$$set=T=>{e=St(St({},e),Dr(T)),t(9,a=ci(e,n)),"use"in T&&t(10,g=T.use),"class"in T&&t(1,S=T.class),"open"in T&&t(0,p=T.open),"$$scope"in T&&t(22,o=T.$$scope)},i.$$.update=()=>{1024&i.$$.dirty&&t(5,r=[d,...g])},[p,S,c,u,h,r,function(T){u&&u.handleKeydown(T)},function(T){f||(f=T.detail)},function(T){h||t(4,h=T.detail)},a,g,function(){return p},function(T){t(0,p=T)},function(T){u.setDefaultFocusState(T)},function(){return u.getSelectedIndex()},function(){return c},b,s,function(T){Nt[T?"unshift":"push"](()=>{c=T,t(2,c)})},function(T){p=T,t(0,p)},()=>u&&u.handleMenuSurfaceOpened(),T=>u&&u.handleItemAction(h.getOrderedList()[T.detail.index].element),o]}class f5 extends _r{constructor(e){super(),vr(this,e,u5,c5,er,{use:10,class:1,open:0,isOpen:11,setOpen:12,setDefaultFocusState:13,getSelectedIndex:14,getMenuSurface:15,getElement:16})}get isOpen(){return this.$$.ctx[11]}get setOpen(){return this.$$.ctx[12]}get setDefaultFocusState(){return this.$$.ctx[13]}get getSelectedIndex(){return this.$$.ctx[14]}get getMenuSurface(){return this.$$.ctx[15]}get getElement(){return this.$$.ctx[16]}}function h5(i){let e,t,r,n,a,s;const o=i[8].default,l=hi(o,i,i[7],null);let d=[{class:t=Zt({[i[1]]:!0,"mdc-deprecated-list-item__graphic":!0,"mdc-menu__selection-group-icon":i[4]})},i[5]],c={};for(let u=0;u{e=St(St({},e),Dr(f)),t(5,n=ci(e,r)),"use"in f&&t(0,d=f.use),"class"in f&&t(1,c=f.class),"$$scope"in f&&t(7,s=f.$$scope)},[d,c,l,o,u,n,function(){return l},s,a,function(f){Nt[f?"unshift":"push"](()=>{l=f,t(2,l)})}]}class p5 extends _r{constructor(e){super(),vr(this,e,m5,h5,er,{use:0,class:1,getElement:6})}get getElement(){return this.$$.ctx[6]}}En({class:"mdc-menu__selection-group-icon",component:p5});function g5(i){let e,t;return{c(){e=Yu("svg"),t=Yu("path"),di(t,"fill","currentColor"),di(t,"d","M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"),di(e,"aria-hidden","true"),di(e,"focusable","false"),di(e,"data-prefix","fas"),di(e,"data-icon","search"),di(e,"class","svg-inline--fa fa-search fa-w-16"),di(e,"role","img"),di(e,"xmlns","http://www.w3.org/2000/svg"),ha(e,"width","16px"),ha(e,"height","16px"),di(e,"viewBox","0 0 512 512")},m(r,n){_t(r,e,n),Wi(e,t)},p:Si,i:Si,o:Si,d(r){r&&vt(e)}}}class v5 extends _r{constructor(e){super(),vr(this,e,null,g5,er,{})}}var _5='.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:text;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);left:0;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.15rem;overflow:hidden;position:absolute;text-align:left;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);-webkit-transform-origin:left top;transform-origin:left top;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1);white-space:nowrap;will-change:transform}.mdc-floating-label[dir=rtl],[dir=rtl] .mdc-floating-label{left:auto;right:0;text-align:right;-webkit-transform-origin:right top;transform-origin:right top}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:after{content:"*";margin-left:1px;margin-right:0}.mdc-floating-label--required[dir=rtl]:after,[dir=rtl] .mdc-floating-label--required:after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard .25s 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(0) translateY(-106%) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-106%) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-106%) scale(.75)}to{transform:translateX(0) translateY(-106%) scale(.75)}}.smui-floating-label--remove-transition{transition:unset!important}.smui-floating-label--force-size{position:absolute!important;transform:unset!important}.mdc-line-ripple:after,.mdc-line-ripple:before{border-bottom-style:solid;bottom:0;content:"";left:0;position:absolute;width:100%}.mdc-line-ripple:before{border-bottom-width:1px;z-index:1}.mdc-line-ripple:after{border-bottom-width:2px;opacity:0;transform:scaleX(0);transition:transform .18s cubic-bezier(.4,0,.2,1),opacity .18s cubic-bezier(.4,0,.2,1);z-index:2}.mdc-line-ripple--active:after{opacity:1;transform:scaleX(1)}.mdc-line-ripple--deactivating:after{opacity:0}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-deprecated-list-item__graphic{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item__meta{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{opacity:.38}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__secondary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-deprecated-list-item--activated,.mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-deprecated-list-item--selected,.mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list--dense{font-size:.812rem;padding-bottom:4px;padding-top:4px}.mdc-deprecated-list-item__wrapper{display:block}.mdc-deprecated-list-item{align-items:center;display:flex;height:48px;justify-content:flex-start;overflow:hidden;padding:0 16px;position:relative}.mdc-deprecated-list-item:focus{outline:none}.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border-color:CanvasText}}.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border-color:CanvasText}}.mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item{height:72px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px;padding-left:0;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item{padding-left:16px;padding-right:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:20px;margin-left:0;margin-right:16px;width:20px}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list-item__graphic{fill:currentColor;align-items:center;flex-shrink:0;height:24px;justify-content:center;margin-left:0;margin-right:32px;object-fit:cover;width:24px}.mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{height:24px;margin-left:0;margin-right:32px;width:24px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{border-radius:50%;height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:56px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:100px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list .mdc-deprecated-list-item__graphic{display:inline-flex}.mdc-deprecated-list-item__meta{margin-left:auto;margin-right:0}.mdc-deprecated-list-item__meta:not(.material-icons){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-deprecated-list-item[dir=rtl] .mdc-deprecated-list-item__meta,[dir=rtl] .mdc-deprecated-list-item .mdc-deprecated-list-item__meta{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-deprecated-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:40px}.mdc-deprecated-list--two-line .mdc-deprecated-list-item__text{align-self:flex-start}.mdc-deprecated-list--two-line .mdc-deprecated-list-item{height:64px}.mdc-deprecated-list--two-line.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--image-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px}.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{align-self:flex-start;margin-top:16px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:36px;margin-left:0;margin-right:16px;width:36px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{cursor:pointer}a.mdc-deprecated-list-item{color:inherit;text-decoration:none}.mdc-deprecated-list-divider{border:none;border-bottom:1px solid;border-bottom-color:rgba(0,0,0,.12);height:0;margin:0}.mdc-deprecated-list-divider--padded{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--padded{margin-left:0;margin-right:16px}.mdc-deprecated-list-divider--inset{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list-divider--inset[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset{margin-left:0;margin-right:72px}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:0;margin-right:72px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:88px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:88px;margin-right:0;width:calc(100% - 104px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:116px;margin-right:0;width:calc(100% - 116px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:116px;margin-right:0;width:calc(100% - 132px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0;width:100%}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0}.mdc-deprecated-list-group .mdc-deprecated-list{padding:0}.mdc-deprecated-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-item__primary-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.mdc-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-list-item__overline-text{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-list-item__end{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end,.mdc-list-item--disabled .mdc-list-item__start{opacity:.38}.mdc-list-item--disabled .mdc-list-item__overline-text,.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--disabled.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-list-item--activated .mdc-list-item__primary-text,.mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--selected .mdc-list-item__primary-text,.mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list-group__subheader{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-list-divider:after{border-bottom:1px solid #fff;content:"";display:block}}.mdc-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{align-items:center;align-items:stretch;cursor:pointer;display:flex;justify-content:flex-start;overflow:hidden;padding:0;position:relative}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus:before{border:3px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:focus:before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor}.mdc-list-item__end,.mdc-list-item__start{flex-shrink:0;pointer-events:none}.mdc-list-item__content{align-self:center;flex:1;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__content,.mdc-list-item--with-two-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__primary-text,.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:after,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{line-height:20px;white-space:normal}.mdc-list-item--with-overline .mdc-list-item__secondary-text{line-height:auto;white-space:nowrap}.mdc-list-item__overline-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-overline-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-overline-font-size,.75rem);font-weight:500;font-weight:var(--mdc-typography-overline-font-weight,500);letter-spacing:.1666666667em;letter-spacing:var(--mdc-typography-overline-letter-spacing,.1666666667em);line-height:2rem;line-height:var(--mdc-typography-overline-line-height,2rem);overflow:hidden;text-decoration:none;text-decoration:var(--mdc-typography-overline-text-decoration,none);text-overflow:ellipsis;text-transform:uppercase;text-transform:var(--mdc-typography-overline-text-transform,uppercase);white-space:nowrap}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon .mdc-list-item__start{height:24px;width:24px}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image .mdc-list-item__start{height:56px;width:56px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line,.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{height:56px;width:100px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line,.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch .mdc-list-item__start{height:20px;width:36px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-icon .mdc-list-item__end{height:24px;width:24px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch .mdc-list-item__end{height:20px;width:36px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item,.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-divider{background-clip:content-box;background-color:rgba(0,0,0,.12);height:1px;padding:0}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:16px}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:0}.mdc-list-divider[dir=rtl],[dir=rtl] .mdc-list-divider{padding:0}@keyframes mdc-ripple-fg-radius-in{0%{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{0%{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{0%{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-deprecated-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-deprecated-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-deprecated-list-item--disabled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}:not(.mdc-list-item--disabled).mdc-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-list-item--disabled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:none;overflow:hidden;position:relative;will-change:transform,opacity}.mdc-ripple-surface:after,.mdc-ripple-surface:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-ripple-surface:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface:after,.mdc-ripple-surface:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-ripple-surface.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:before,.mdc-ripple-upgraded--unbounded:after,.mdc-ripple-upgraded--unbounded:before{height:100%;left:0;top:0;width:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:before{height:var(--mdc-ripple-fg-size,100%);left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface:after,.mdc-ripple-surface:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover:before,.mdc-ripple-surface:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused:before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-ripple-surface:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--primary:after,.smui-ripple-surface--primary:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.smui-ripple-surface--primary.mdc-ripple-surface--hover:before,.smui-ripple-surface--primary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--primary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--secondary:after,.smui-ripple-surface--secondary:before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.smui-ripple-surface--secondary.mdc-ripple-surface--hover:before,.smui-ripple-surface--secondary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--secondary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-list--three-line .mdc-deprecated-list-item__text{align-self:flex-start}.smui-list--three-line .mdc-deprecated-list-item{height:88px}.smui-list--three-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:76px}.mdc-deprecated-list-item.smui-menu-item--non-interactive{cursor:auto}.mdc-elevation-overlay{background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff);border-radius:inherit;opacity:0;opacity:var(--mdc-elevation-overlay-opacity,0);pointer-events:none;position:absolute;transition:opacity .28s cubic-bezier(.4,0,.2,1)}.mdc-menu{min-width:112px;min-width:var(--mdc-menu-min-width,112px)}.mdc-menu .mdc-deprecated-list-item__graphic,.mdc-menu .mdc-deprecated-list-item__meta{color:rgba(0,0,0,.87)}.mdc-menu .mdc-menu-item--submenu-open .mdc-deprecated-list-item__ripple:before,.mdc-menu .mdc-menu-item--submenu-open .mdc-list-item__ripple:before{opacity:.04}.mdc-menu .mdc-deprecated-list{color:rgba(0,0,0,.87)}.mdc-menu .mdc-deprecated-list,.mdc-menu .mdc-list{position:relative}.mdc-menu .mdc-deprecated-list .mdc-elevation-overlay,.mdc-menu .mdc-list .mdc-elevation-overlay{height:100%;left:0;top:0;width:100%}.mdc-menu .mdc-deprecated-list-divider{margin:8px 0}.mdc-menu .mdc-deprecated-list-item{user-select:none}.mdc-menu .mdc-deprecated-list-item--disabled{cursor:auto}.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__graphic,.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__text{pointer-events:none}.mdc-menu__selection-group{fill:currentColor;padding:0}.mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:56px;padding-right:16px}.mdc-menu__selection-group .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:16px;padding-right:56px}.mdc-menu__selection-group .mdc-menu__selection-group-icon{display:none;left:16px;position:absolute;right:auto;top:50%;transform:translateY(-50%)}.mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon{left:auto;right:16px}.mdc-menu-item--selected .mdc-menu__selection-group-icon{display:inline}.mdc-menu-surface{transform-origin-left:top left;transform-origin-right:top right;background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-sizing:border-box;color:#000;color:var(--mdc-theme-on-surface,#000);display:none;margin:0;max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height,calc(100vh - 32px));max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width,calc(100vw - 32px));opacity:0;overflow:auto;padding:0;position:absolute;transform:scale(1);transform-origin:top left;transition:opacity .03s linear,transform .12s cubic-bezier(0,0,.2,1),height .25s cubic-bezier(0,0,.2,1);will-change:transform,opacity;z-index:8}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;opacity:0;transform:scale(.8)}.mdc-menu-surface--open{display:inline-block;opacity:1;transform:scale(1)}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity 75ms linear}.mdc-menu-surface[dir=rtl],[dir=rtl] .mdc-menu-surface{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{overflow:visible;position:relative}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.smui-menu-surface--static{display:inline-block;opacity:1;position:static;transform:scale(1);z-index:0}.mdc-menu__selection-group .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:none}.mdc-menu-item--selected .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:inline}.mdc-notched-outline{box-sizing:border-box;display:flex;height:100%;left:0;max-width:100%;pointer-events:none;position:absolute;right:0;text-align:left;top:0;width:100%}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-bottom:1px solid;border-top:1px solid;box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],.mdc-notched-outline__trailing,[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;max-width:calc(100% - 24px);width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;max-width:100%;position:relative}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{border-top:none;padding-left:0;padding-right:8px}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-text-field--filled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-text-field--filled .mdc-text-field__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-text-field--filled .mdc-text-field__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-text-field__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-text-field{align-items:baseline;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);box-sizing:border-box;display:inline-flex;overflow:hidden;padding:0 16px;position:relative;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0,0,0,.87)}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0,0,0,.54)}}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0,0,0,.6)}.mdc-text-field .mdc-floating-label{pointer-events:none;top:50%;transform:translateY(-50%)}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;appearance:none;background:none;border:none;border-radius:0;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);min-width:0;padding:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;width:100%}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media{.mdc-text-field__input::placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field__input:-ms-input-placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field--focused .mdc-text-field__input::placeholder,.mdc-text-field--no-label .mdc-text-field__input::placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}@media{.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens:none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field__affix--prefix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl],.mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field__affix--suffix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{background-color:rgba(0,0,0,.87);background-color:var(--mdc-ripple-color,rgba(0,0,0,.87))}.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple:before,.mdc-text-field--filled:hover .mdc-text-field__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple:before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-text-field--filled:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.mdc-text-field--filled .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem;transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem;transform:translateY(-34.75px) scale(.75)}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(0) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-34.75px) scale(.75)}to{transform:translateX(0) translateY(-34.75px) scale(.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}@supports(top:max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined,.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple:after,.mdc-text-field--outlined .mdc-text-field__ripple:before{background-color:transparent;background-color:var(--mdc-ripple-color,transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--outlined .mdc-text-field__input{background-color:transparent;border:none!important;display:flex}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{align-items:center;flex-direction:column;height:auto;padding:0;transition:none;width:auto}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{box-sizing:border-box;flex-grow:1;height:auto;line-height:1.5rem;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;padding:0 16px;resize:none}.mdc-text-field--textarea.mdc-text-field--filled:before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(0) translateY(-10.25px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-10.25px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-10.25px) scale(.75)}to{transform:translateX(0) translateY(-10.25px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-bottom:9px;margin-top:23px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-bottom:16px;margin-top:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem;transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem;transform:translateY(-24.75px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(0) translateY(-24.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-24.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-24.75px) scale(.75)}to{transform:translateX(0) translateY(-24.75px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-bottom:16px;margin-top:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter:after{content:"";display:inline-block;height:16px;vertical-align:-16px;width:0}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter:before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(1px) translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:48px;max-width:calc(100% - 48px);right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:auto;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:auto;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(-32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(-32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% + 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% + 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-trailing-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 128px)}.mdc-text-field-helper-line{box-sizing:border-box;display:flex;justify-content:space-between}.mdc-text-field+.mdc-text-field-helper-line{padding-left:16px;padding-right:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98,0,238,.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after,.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0,0,0,.38)}@media{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0,0,0,.38)}}@media{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.38)}}.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.06)}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix,.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:GrayText}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input{text-align:left}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{direction:ltr}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading{order:1}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{order:2}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{order:3}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{order:4}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing{order:5}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-right:12px}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px}.smui-text-field--standard{height:56px;padding:0}.smui-text-field--standard:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.smui-text-field--standard:not(.mdc-text-field--disabled){background-color:transparent}.smui-text-field--standard:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.smui-text-field--standard:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.smui-text-field--standard .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.smui-text-field--standard .mdc-floating-label{left:0;right:auto}.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-floating-label{left:auto;right:0}.smui-text-field--standard .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__input{height:100%}.smui-text-field--standard.mdc-text-field--no-label .mdc-floating-label,.smui-text-field--standard.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:32px;max-width:calc(100% - 32px);right:auto}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:auto;right:32px}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 64px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 36px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 48px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 68px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 90.66667px)}.mdc-text-field+.mdc-text-field-helper-line{padding-left:0;padding-right:0}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin-left:auto;margin-right:0;margin-top:0;padding-left:16px;padding-right:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);white-space:nowrap}.mdc-text-field-character-counter:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{margin-left:0;margin-right:auto;padding-left:0;padding-right:16px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin:0;opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;will-change:opacity}.mdc-text-field-helper-text:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-helper-text--persistent{opacity:1;transition:none;will-change:auto}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}.mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .mdc-text-field__icon--leading{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px}.mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .mdc-text-field__icon--trailing{margin-left:0;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--leading{margin-left:0;margin-right:8px}.smui-text-field--standard .mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--leading{margin-left:8px;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px 0 12px 12px}.smui-text-field--standard .mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding-left:0;padding-right:12px}';tl(_5,{});var b5=":root *{--scrollbar-background:hsla(0,0%,100%,.1);scrollbar-track-color:transparent;scrollbar-face-color:var(--scrollbar-background);scrollbar-color:var(--scrollbar-background) transparent;scrollbar-width:thin;text-underline-offset:.5px}:root ::-webkit-scrollbar{border-radius:.3rem;height:5px;width:5px}:root ::-webkit-scrollbar-track{border-radius:.3rem}:root ::-webkit-scrollbar-corner{background:none!important}:root ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-background);border:3px solid var(--scrollbar-background);border-radius:20px;transition:background-color .5s}";tl(b5,{});var y5=":root{--cosmograph-search-text-color:#fff;--cosmograph-search-list-background:#222;--cosmograph-search-font-family:inherit;--cosmograph-search-input-background:#222;--cosmograph-search-mark-background:hsla(0,0%,100%,.2);--cosmograph-search-accessor-background:hsla(0,0%,100%,.2);--cosmograph-search-interactive-background:hsla(0,0%,100%,.4);--cosmograph-search-hover-color:hsla(0,0%,100%,.05)}.search-icon.svelte-1xknafk.svelte-1xknafk{color:var(--cosmograph-search-text-color)!important;opacity:.6}.search.svelte-1xknafk .cosmograph-search-accessor{align-content:center;background-color:var(--cosmograph-search-accessor-background);border-radius:10px;color:var(--cosmograph-search-text-color);cursor:pointer;display:flex;display:block;font-size:12px;font-style:normal;justify-content:center;line-height:1;margin-right:.5rem;overflow:hidden;padding:5px 8px;text-overflow:ellipsis;transition:background .15s linear;white-space:nowrap;z-index:1}.search.svelte-1xknafk .cosmograph-search-accessor.active,.search.svelte-1xknafk .cosmograph-search-accessor:hover{background-color:var(--cosmograph-search-interactive-background)}.search.svelte-1xknafk .disabled{cursor:default;pointer-events:none}.search.svelte-1xknafk.svelte-1xknafk{background:var(--cosmograph-search-input-background);display:flex;flex-direction:column;font-family:var(--cosmograph-search-font-family),sans-serif;text-align:left;width:100%}.search.svelte-1xknafk mark{background:var(--cosmograph-search-mark-background);border-radius:2px;color:var(--cosmograph-search-text-color);padding:1px 0}.search.svelte-1xknafk .cosmograph-search-match{-webkit-box-orient:vertical;cursor:pointer;display:-webkit-box;line-height:1.35;overflow:hidden;padding:calc(var(--margin-v)*1px) calc(var(--margin-h)*1px);text-overflow:ellipsis;white-space:normal}.search.svelte-1xknafk .cosmograph-search-match:hover{background:var(--cosmograph-search-hover-color)}.search.svelte-1xknafk .cosmograph-search-result{display:inline;font-size:12px;font-weight:600;text-transform:uppercase}.search.svelte-1xknafk .cosmograph-search-result>span{font-weight:400;letter-spacing:1;margin-left:4px}.search.svelte-1xknafk .cosmograph-search-result>span>t{margin-right:4px}.search.svelte-1xknafk .mdc-menu-surface{background-color:var(--cosmograph-search-list-background)!important;max-height:none!important}.search.svelte-1xknafk .openListUpwards.svelte-1xknafk .mdc-menu-surface{bottom:55px!important;top:unset!important}.search.svelte-1xknafk .mdc-text-field__input{caret-color:var(--cosmograph-search-text-color)!important;height:100%;letter-spacing:-.01em;line-height:2;line-height:2!important;padding-top:15px!important}.search.svelte-1xknafk .mdc-floating-label,.search.svelte-1xknafk .mdc-text-field__input{color:var(--cosmograph-search-text-color)!important;font-family:var(--cosmograph-search-font-family),sans-serif!important}.search.svelte-1xknafk .mdc-floating-label{opacity:.65;pointer-events:none!important}.search.svelte-1xknafk .mdc-line-ripple:after,.search.svelte-1xknafk .mdc-line-ripple:before{border-bottom-color:var(--cosmograph-search-text-color)!important;opacity:.1}.search.svelte-1xknafk .mdc-deprecated-list{background:var(--cosmograph-search-list-background);color:var(--cosmograph-search-text-color)!important;font-size:14px!important;padding-top:4px!important}.search.svelte-1xknafk .mdc-deprecated-list-item{height:28px!important}.search.svelte-1xknafk .mdc-text-field__icon--leading{margin-right:10px!important}.search.svelte-1xknafk .mdc-floating-label--float-above{left:26px!important;pointer-events:none!important}.search.svelte-1xknafk .mdc-text-field__icon--trailing{cursor:default!important;max-width:35%}.search.svelte-1xknafk .cosmograph-search-first-field{font-size:12.5px;font-weight:400;opacity:.8;text-transform:uppercase}";tl(y5,{});function Ug(i,e,t){const r=i.slice();return r[53]=e[t],r[52]=t,r}function Gg(i,e,t){const r=i.slice();return r[50]=e[t],r[52]=t,r}function x5(i){let e,t,r;return t=new v5({}),{c(){e=ni("div"),Jt(t.$$.fragment),di(e,"class","search-icon svelte-1xknafk")},m(n,a){_t(n,e,a),Yt(t,e,null),r=!0},p:Si,i(n){r||(Le(t.$$.fragment,n),r=!0)},o(n){je(t.$$.fragment,n),r=!1},d(n){n&&vt(e),Kt(t)}}}function w5(i){let e,t;return e=new Gv({props:{slot:"leadingIcon",$$slots:{default:[x5]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||(Le(e.$$.fragment,r),t=!0)},o(r){je(e.$$.fragment,r),t=!1},d(r){Kt(e,r)}}}function jg(i){let e,t,r=i[11].label+"";return{c(){e=ni("div"),t=Sn(r),di(e,"class","cosmograph-search-accessor"),fa(e,"active",i[2]),fa(e,"disabled",!i[9])},m(n,a){_t(n,e,a),Wi(e,t)},p(n,a){2048&a[0]&&r!==(r=n[11].label+"")&&Ha(t,r),4&a[0]&&fa(e,"active",n[2]),512&a[0]&&fa(e,"disabled",!n[9])},d(n){n&&vt(e)}}}function S5(i){let e,t=i[11]&&jg(i);return{c(){t&&t.c(),e=Tr()},m(r,n){t&&t.m(r,n),_t(r,e,n)},p(r,n){r[11]?t?t.p(r,n):(t=jg(r),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(r){t&&t.d(r),r&&vt(e)}}}function E5(i){let e,t;return e=new Gv({props:{role:"button",style:"display: flex;",slot:"trailingIcon",$$slots:{default:[S5]},$$scope:{ctx:i}}}),e.$on("SMUITextField:icon",i[14]),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};2564&n[0]|16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||(Le(e.$$.fragment,r),t=!0)},o(r){je(e.$$.fragment,r),t=!1},d(r){Kt(e,r)}}}function T5(i){let e,t,r;return t=new Lf({props:{$$slots:{default:[k5]},$$scope:{ctx:i}}}),{c(){e=ni("div"),Jt(t.$$.fragment),ha(e,"pointer-events","none")},m(n,a){_t(n,e,a),Yt(t,e,null),r=!0},p(n,a){const s={};16777216&a[1]&&(s.$$scope={dirty:a,ctx:n}),t.$set(s)},i(n){r||(Le(t.$$.fragment,n),r=!0)},o(n){je(t.$$.fragment,n),r=!1},d(n){n&&vt(e),Kt(t)}}}function A5(i){let e,t=[],r=new Map,n=i[4];const a=s=>s[52];for(let s=0;s{r=null}),or())},i(s){t||(Le(r),t=!0)},o(s){je(r),t=!1},d(s){r&&r.d(s),s&&vt(e)}}}function C5(i){let e;return{c(){e=Sn("No matches found")},m(t,r){_t(t,e,r)},d(t){t&&vt(e)}}}function k5(i){let e,t;return e=new Bv({props:{$$slots:{default:[C5]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||(Le(e.$$.fragment,r),t=!0)},o(r){je(e.$$.fragment,r),t=!1},d(r){Kt(e,r)}}}function Hg(i,e){let t,r,n,a,s,o=e[19](e[53])+"";return{key:i,first:null,c(){t=ni("div"),r=ni("div"),n=Ai(),di(t,"class","cosmograph-search-match"),ha(t,"--margin-v",N5),ha(t,"--margin-h",D5),this.first=t},m(l,d){_t(l,t,d),Wi(t,r),r.innerHTML=o,Wi(t,n),a||(s=[Ii(t,"click",function(){Ri(e[17](e[53]))&&e[17](e[53]).apply(this,arguments)}),Ii(t,"keydown",function(){Ri(e[17](e[53]))&&e[17](e[53]).apply(this,arguments)})],a=!0)},p(l,d){e=l,16&d[0]&&o!==(o=e[19](e[53])+"")&&(r.innerHTML=o)},d(l){l&&vt(t),a=!1,Xi(s)}}}function Vg(i){var c;let e,t,r,n,a,s=[],o=new Map;t=new Lf({props:{$$slots:{default:[$5]},$$scope:{ctx:i}}});let l=(c=i[1])==null?void 0:c.accessors;const d=u=>u[52];for(let u=0;u{s[c]=null}),or(),r=s[t],r?r.p(l,d):(r=s[t]=a[t](l),r.c()),Le(r,1),r.m(e,null))},i(l){n||(Le(r),n=!0)},o(l){je(r),n=!1},d(l){l&&vt(e),s[t].d(),i[28](null)}}}function P5(i){let e,t;return e=new AI({props:{style:"max-height: "+i[8]+"px; transition: max-height 0.1s linear;",$$slots:{default:[R5]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};256&n[0]&&(a.style="max-height: "+r[8]+"px; transition: max-height 0.1s linear;"),86&n[0]|16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||(Le(e.$$.fragment,r),t=!0)},o(r){je(e.$$.fragment,r),t=!1},d(r){Kt(e,r)}}}function F5(i){let e,t,r,n,a,s,o,l,d;function c(S){i[26](S)}function u(S){i[27](S)}let f={style:"opacity: "+(i[1].isDisabled?.5:1),label:i[1].placeholder,$$slots:{trailingIcon:[E5],leadingIcon:[w5]},$$scope:{ctx:i}};function h(S){i[29](S)}i[0]!==void 0&&(f.value=i[0]),i[12]!==void 0&&(f.disabled=i[12]),t=new X4({props:f}),i[25](t),Nt.push(()=>sn(t,"value",c)),Nt.push(()=>sn(t,"disabled",u)),t.$on("click",i[18]),t.$on("focus",i[20]),t.$on("input",i[16]),t.$on("keydown",i[15]);let g={style:"width: 100%; bottom: initial;",$$slots:{default:[P5]},$$scope:{ctx:i}};return i[3]!==void 0&&(g.open=i[3]),o=new f5({props:g}),Nt.push(()=>sn(o,"open",h)),i[30](o),{c(){e=ni("div"),Jt(t.$$.fragment),a=Ai(),s=ni("div"),Jt(o.$$.fragment),ha(s,"position","relative"),di(s,"class","svelte-1xknafk"),fa(s,"openListUpwards",i[1].openListUpwards),fa(s,"accessors",i[2]),di(e,"class","search svelte-1xknafk")},m(S,p){_t(S,e,p),Yt(t,e,null),Wi(e,a),Wi(e,s),Yt(o,s,null),i[31](e),d=!0},p(S,p){const b={};2&p[0]&&(b.style="opacity: "+(S[1].isDisabled?.5:1)),2&p[0]&&(b.label=S[1].placeholder),2564&p[0]|16777216&p[1]&&(b.$$scope={dirty:p,ctx:S}),!r&&1&p[0]&&(r=!0,b.value=S[0],an(()=>r=!1)),!n&&4096&p[0]&&(n=!0,b.disabled=S[12],an(()=>n=!1)),t.$set(b);const T={};342&p[0]|16777216&p[1]&&(T.$$scope={dirty:p,ctx:S}),!l&&8&p[0]&&(l=!0,T.open=S[3],an(()=>l=!1)),o.$set(T),(!d||2&p[0])&&fa(s,"openListUpwards",S[1].openListUpwards),(!d||4&p[0])&&fa(s,"accessors",S[2])},i(S){d||(Le(t.$$.fragment,S),Le(o.$$.fragment,S),d=!0)},o(S){je(t.$$.fragment,S),je(o.$$.fragment,S),d=!1},d(S){S&&vt(e),i[25](null),Kt(t),i[30](null),Kt(o),i[31](null)}}}const N5=4,D5=12;function M5(i,e,t){let r;var n,a;const s=jA();let o,l,d,c,u,f,{config:h}=e,{data:g=[]}=e,{textInput:S=""}=e,p=!0,b=!1,T=!1,y=[];const v=new Set,L=new DOMParser;let z;const I=P=>{if(!g)return;if(!P.trim())return void t(4,y=[]);let C=0;const Y=new RegExp(Xp(P),"i"),U=ee=>String(z.accessor(ee));t(4,y=g.filter(ee=>{if(h.limitSuggestions&&C>=h.limitSuggestions)return!1;const Fe=U(ee).match(Y);return Fe&&(C+=1),Fe})),y.length>0&&y.sort((ee,Fe)=>{const xe=U(ee).toLowerCase(),ke=U(Fe).toLowerCase(),Ge=P.toLowerCase();if(xe===Ge&&ke!==Ge)return-1;if(ke===Ge&&xe!==Ge)return 1;const Ye=xe.indexOf(Ge),ce=ke.indexOf(Ge);return Ye!==ce?Ye-ce:xe.localeCompare(ke)}),s(vn.Input,y)},O=P=>{return RegExp.prototype.test.bind(/(<([^>]+)>)/i)(P)?(C=P,L.parseFromString(C,"text/html").documentElement.textContent||""):P;var C},W=P=>P.replace(/[&<>]/g,C=>({"&":"&","<":"<",">":">"})[C]||C),he=(P,C)=>{const Y=O(P),U=h&&h.truncateValues?h.truncateValues:Y.length,ee=(ft=>new RegExp(Xp(ft),"i"))(S),Fe=C?((ft,yt)=>ft.search(yt))(Y,ee):-1;if(Fe===-1)return Y.substring(0,+U)+(Y.length>U?"...":"");const{startPosition:xe,endPosition:ke}=((ft,yt,ot)=>{let xt=Math.max(0,ft-Math.floor(yt/2));const ge=Math.min(ot,xt+yt);return ge-ft0?"...":"",ce=ke`${ft}`):Ge}${ce}`},ne=()=>{setTimeout(()=>{var P;let C,Y=0;const U=(P=h.maxVisibleItems)!==null&&P!==void 0?P:Mo.maxVisibleItems;l.querySelectorAll(`.cosmograph-search-match:nth-child(-n+${U})`).forEach(ee=>{Y+=ee.offsetHeight}),Y=y.length?Y+6:46,C=h.openListUpwards?d.getBoundingClientRect().top-window.scrollY-60:window.innerHeight-d.getBoundingClientRect().bottom-60,Y>C&&(Y=C),t(8,u=Y)},0)},ie=()=>{setTimeout(()=>{var P;let C=0;const Y=(P=h.maxVisibleItems)!==null&&P!==void 0?P:Mo.maxVisibleItems;l.querySelectorAll(`li:nth-child(-n+${Y})`).forEach(U=>{C+=U.offsetHeight}),t(8,u=C+24)},0)};return Xr(()=>{c=new qu(()=>{c&&l&&(y&&ne(),b&&ie())}),c.observe(d)}),Va(()=>{c.disconnect()}),i.$$set=P=>{"config"in P&&t(1,h=P.config),"data"in P&&t(21,g=P.data),"textInput"in P&&t(0,S=P.textInput)},i.$$.update=()=>{if(25165826&i.$$.dirty[0]){t(11,z=(()=>{var C,Y,U;return h.activeAccessorIndex!=null&&(!((C=h.accessors)===null||C===void 0)&&C[h.activeAccessorIndex])?h.accessors[h.activeAccessorIndex]:z&&h.accessors?h.accessors.find(ee=>ee===z)||((Y=h.accessors)===null||Y===void 0?void 0:Y[0]):(U=h.accessors)===null||U===void 0?void 0:U[0]})());const P=t(24,a=t(23,n=h.accessors)===null||n===void 0?void 0:n.length)!==null&&a!==void 0?a:0;t(9,p=P>1)}12&i.$$.dirty[0]&&b&&!T&&setTimeout(()=>{t(2,b=!1)},100),2097158&i.$$.dirty[0]&&t(12,r=!g.length||b||!!h.isDisabled),16&i.$$.dirty[0]&&y&&ne(),4&i.$$.dirty[0]&&b&&ie()},[S,h,b,T,y,o,l,d,u,p,f,z,r,(P,C)=>{h.activeAccessorIndex===void 0&&t(11,z=P),f==null||f.setOpen(!1),setTimeout(()=>{t(2,b=!1)},100),s(vn.AccessorSelect,{index:C,accessor:z})},()=>{p&&(t(0,S=""),f==null||f.setOpen(!1),setTimeout(()=>{f==null||f.setOpen(!0),t(2,b=!0)},100))},P=>{P.key==="Enter"&&h.minMatch!==void 0&&S.length>=h.minMatch&&s(vn.Enter,{textInput:S,accessor:z})},P=>{const C=P==null?void 0:P.target;b||(h.minMatch!==void 0&&C.value.lengthC=>{document.activeElement!==null&&document.activeElement.blur(),f.setOpen(!1),v.size>=5&&v.delete(v.values().next().value),v.add(P),s(vn.Select,P)},()=>{setTimeout(()=>{b||T||S.length!==0||(v.size?t(4,y=Array.from(v)):g.length&&t(4,y=g.slice(0,h.maxVisibleItems)),f.setOpen(!0))},110)},P=>(C=>{var Fe;var Y;const xe=C,{[Fe=z.label]:U}=xe,ee=Rm(xe,[Om(Fe)]);if(Object.keys(ee).length>0){const ke=(Y=h.matchPalette)!==null&&Y!==void 0?Y:Mo.matchPalette,Ge=ce=>`color: ${ke[ce%ke.length]}`,Ye=Object.entries(ee).map(([ce,ft],yt)=>{const ot=he(typeof ft=="object"?JSON.stringify(ft):String(ft));return`·${W(ce)}: ${ot}`});return` - ${W(z.label)}: - ${he(String(U),!0)} -
    - ${Ye.join("")} -
    - `}return he(String(U),!0)})((C=>{const Y={},U=Object.keys(C),ee=z.accessor(C);if(ee&&(Y[z.label]=ee),!h.ordering||!h.ordering.order&&!h.ordering.include){const ke=Object.entries(C).findIndex(([Ge,Ye])=>z.accessor({[Ge]:Ye}));ke!==-1&&U.splice(ke,1);for(const Ge of U)Y[Ge]=C[Ge];return Y}const Fe=h.ordering.order||[];let xe=h.ordering.include?new Set(h.ordering.include):null;if(xe||(xe=new Set(U)),Fe.length>0)for(const ke of Fe)ke in C&&(Y[ke]=C[ke]);for(const ke in C)!Object.prototype.hasOwnProperty.call(Y,ke)&&xe.has(ke)&&(Y[ke]=C[ke]);return Y})(P)),P=>{P.preventDefault()},g,P=>{f==null||f.setOpen(P)},n,a,function(P){Nt[P?"unshift":"push"](()=>{o=P,t(5,o)})},function(P){S=P,t(0,S)},function(P){r=P,t(12,r),t(21,g),t(2,b),t(1,h),t(3,T)},function(P){Nt[P?"unshift":"push"](()=>{l=P,t(6,l)})},function(P){T=P,t(3,T)},function(P){Nt[P?"unshift":"push"](()=>{f=P,t(10,f)})},function(P){Nt[P?"unshift":"push"](()=>{d=P,t(7,d)})}]}class z5 extends _r{constructor(e){super(),vr(this,e,M5,F5,er,{config:1,data:21,textInput:0,setListState:22},null,[-1,-1])}get setListState(){return this.$$.ctx[22]}}let B5=class{constructor(e,t){this._config={},this._containerNode=e,this._config=yn(Mo,t!=null?t:{}),this._search=new z5({target:e,props:{config:this._config}}),this._search.$on(vn.Input,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onSearch)===null||a===void 0?void 0:a.call(n,r)}),this._search.$on(vn.Select,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onSelect)===null||a===void 0?void 0:a.call(n,r)}),this._search.$on(vn.Enter,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onEnter)===null||a===void 0?void 0:a.call(n,r)}),this._search.$on(vn.AccessorSelect,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onAccessorSelect)===null||a===void 0?void 0:a.call(n,r)})}setData(e){this._search.$set({data:e,textInput:""})}setConfig(e){this._config=yn(Mo,e!=null?e:{}),this._search.$set({config:this._config,textInput:""})}setListState(e){this._search.setListState(e)}clearInput(){this._search.$set({textInput:""})}getConfig(){return this._config}destroy(){this._containerNode.innerHTML=""}};const U5='',G5="modulepreload",j5=function(i){return"/static/"+i},qg={},Ws=function(e,t,r){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=Promise.allSettled(t.map(l=>{if(l=j5(l),l in qg)return;qg[l]=!0;const d=l.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const u=document.createElement("link");if(u.rel=d?"stylesheet":G5,d||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),d)return new Promise((f,h)=>{u.addEventListener("load",f),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return n.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return e().catch(a)})},H5=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Ws(()=>se(void 0,null,function*(){const{default:r}=yield Promise.resolve().then(()=>Ys);return{default:r}}),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)};class Of extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}}class V5 extends Of{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class W5 extends Of{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class q5 extends Of{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var tf;(function(i){i.Any="any",i.ApNortheast1="ap-northeast-1",i.ApNortheast2="ap-northeast-2",i.ApSouth1="ap-south-1",i.ApSoutheast1="ap-southeast-1",i.ApSoutheast2="ap-southeast-2",i.CaCentral1="ca-central-1",i.EuCentral1="eu-central-1",i.EuWest1="eu-west-1",i.EuWest2="eu-west-2",i.EuWest3="eu-west-3",i.SaEast1="sa-east-1",i.UsEast1="us-east-1",i.UsWest1="us-west-1",i.UsWest2="us-west-2"})(tf||(tf={}));var X5=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};class Y5{constructor(e,{headers:t={},customFetch:r,region:n=tf.Any}={}){this.url=e,this.headers=t,this.region=n,this.fetch=H5(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var r;return X5(this,void 0,void 0,function*(){try{const{headers:n,method:a,body:s}=t;let o={},{region:l}=t;l||(l=this.region),l&&l!=="any"&&(o["x-region"]=l);let d;s&&(n&&!Object.prototype.hasOwnProperty.call(n,"Content-Type")||!n)&&(typeof Blob!="undefined"&&s instanceof Blob||s instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",d=s):typeof s=="string"?(o["Content-Type"]="text/plain",d=s):typeof FormData!="undefined"&&s instanceof FormData?d=s:(o["Content-Type"]="application/json",d=JSON.stringify(s)));const c=yield this.fetch(`${this.url}/${e}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),n),body:d}).catch(g=>{throw new V5(g)}),u=c.headers.get("x-relay-error");if(u&&u==="true")throw new W5(c);if(!c.ok)throw new q5(c);let f=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),h;return f==="application/json"?h=yield c.json():f==="application/octet-stream"?h=yield c.blob():f==="text/event-stream"?h=c:f==="multipart/form-data"?h=yield c.formData():h=yield c.text(),{data:h,error:null}}catch(n){return{data:null,error:n}}})}}var Rr={},Rf={},qd={},il={},Xd={},Yd={},K5=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("unable to locate global object")},qs=K5();const Z5=qs.fetch,Hv=qs.fetch.bind(qs),Vv=qs.Headers,J5=qs.Request,Q5=qs.Response,Ys=Object.freeze(Object.defineProperty({__proto__:null,Headers:Vv,Request:J5,Response:Q5,default:Hv,fetch:Z5},Symbol.toStringTag,{value:"Module"})),eC=W0(Ys);var Kd={};Object.defineProperty(Kd,"__esModule",{value:!0});class tC extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}Kd.default=tC;var Wv=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Yd,"__esModule",{value:!0});const iC=Wv(eC),rC=Wv(Kd);let nC=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch=="undefined"?this.fetch=iC.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let n=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(a=>se(this,null,function*(){var s,o,l;let d=null,c=null,u=null,f=a.status,h=a.statusText;if(a.ok){if(this.method!=="HEAD"){const b=yield a.text();b===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=b:c=JSON.parse(b))}const S=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),p=(o=a.headers.get("content-range"))===null||o===void 0?void 0:o.split("/");S&&p&&p.length>1&&(u=parseInt(p[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(d={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,u=null,f=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const S=yield a.text();try{d=JSON.parse(S),Array.isArray(d)&&a.status===404&&(c=[],d=null,f=200,h="OK")}catch(p){a.status===404&&S===""?(f=204,h="No Content"):d={message:S}}if(d&&this.isMaybeSingle&&(!((l=d==null?void 0:d.details)===null||l===void 0)&&l.includes("0 rows"))&&(d=null,f=200,h="OK"),d&&this.shouldThrowOnError)throw new rC.default(d)}return{error:d,data:c,count:u,status:f,statusText:h}}));return this.shouldThrowOnError||(n=n.catch(a=>{var s,o,l;return{error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:`${(o=a==null?void 0:a.stack)!==null&&o!==void 0?o:""}`,hint:"",code:`${(l=a==null?void 0:a.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}};Yd.default=nC;var aC=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xd,"__esModule",{value:!0});const sC=aC(Yd);let oC=class extends sC.default{select(e){let t=!1;const r=(e!=null?e:"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:a=n}={}){const s=a?`${a}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r=="undefined"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const a=typeof n=="undefined"?"offset":`${n}.offset`,s=typeof n=="undefined"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(s,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:a=!1,format:s="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,a?"wal":null].filter(Boolean).join("|"),d=(o=this.headers.Accept)!==null&&o!==void 0?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${d}"; options=${l};`,s==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};Xd.default=oC;var lC=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(il,"__esModule",{value:!0});const dC=lC(Xd);let cC=class extends dC.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&new RegExp("[,()]").test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let a="";n==="plain"?a="pl":n==="phrase"?a="ph":n==="websearch"&&(a="w");const s=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${a}fts${s}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}};il.default=cC;var uC=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(qd,"__esModule",{value:!0});const Io=uC(il);let fC=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=t,this.schema=r,this.fetch=n}select(e,{head:t=!1,count:r}={}){const n=t?"HEAD":"GET";let a=!1;const s=(e!=null?e:"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join("");return this.url.searchParams.set("select",s),r&&(this.headers.Prefer=`count=${r}`),new Io.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:r=!0}={}){const n="POST",a=[];if(this.headers.Prefer&&a.push(this.headers.Prefer),t&&a.push(`count=${t}`),r||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const s=e.reduce((o,l)=>o.concat(Object.keys(l)),[]);if(s.length>0){const o=[...new Set(s)].map(l=>`"${l}"`);this.url.searchParams.set("columns",o.join(","))}}return new Io.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:a=!0}={}){const s="POST",o=[`resolution=${r?"ignore":"merge"}-duplicates`];if(t!==void 0&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),a||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const l=e.reduce((d,c)=>d.concat(Object.keys(c)),[]);if(l.length>0){const d=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",d.join(","))}}return new Io.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const r="PATCH",n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new Io.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t="DELETE",r=[];return e&&r.push(`count=${e}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Io.default({method:t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};qd.default=fC;var Zd={},Jd={};Object.defineProperty(Jd,"__esModule",{value:!0});Jd.version=void 0;Jd.version="0.0.0-automated";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.DEFAULT_HEADERS=void 0;const hC=Jd;Zd.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${hC.version}`};var qv=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Rf,"__esModule",{value:!0});const mC=qv(qd),pC=qv(il),gC=Zd;let vC=class Xv{constructor(e,{headers:t={},schema:r,fetch:n}={}){this.url=e,this.headers=Object.assign(Object.assign({},gC.DEFAULT_HEADERS),t),this.schemaName=r,this.fetch=n}from(e){const t=new URL(`${this.url}/${e}`);return new mC.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new Xv(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:r=!1,get:n=!1,count:a}={}){let s;const o=new URL(`${this.url}/rpc/${e}`);let l;r||n?(s=r?"HEAD":"GET",Object.entries(t).filter(([c,u])=>u!==void 0).map(([c,u])=>[c,Array.isArray(u)?`{${u.join(",")}}`:`${u}`]).forEach(([c,u])=>{o.searchParams.append(c,u)})):(s="POST",l=t);const d=Object.assign({},this.headers);return a&&(d.Prefer=`count=${a}`),new pC.default({method:s,url:o,headers:d,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};Rf.default=vC;var Ks=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.PostgrestError=Rr.PostgrestBuilder=Rr.PostgrestTransformBuilder=Rr.PostgrestFilterBuilder=Rr.PostgrestQueryBuilder=Rr.PostgrestClient=void 0;const Yv=Ks(Rf);Rr.PostgrestClient=Yv.default;const Kv=Ks(qd);Rr.PostgrestQueryBuilder=Kv.default;const Zv=Ks(il);Rr.PostgrestFilterBuilder=Zv.default;const Jv=Ks(Xd);Rr.PostgrestTransformBuilder=Jv.default;const Qv=Ks(Yd);Rr.PostgrestBuilder=Qv.default;const e_=Ks(Kd);Rr.PostgrestError=e_.default;var _C=Rr.default={PostgrestClient:Yv.default,PostgrestQueryBuilder:Kv.default,PostgrestFilterBuilder:Zv.default,PostgrestTransformBuilder:Jv.default,PostgrestBuilder:Qv.default,PostgrestError:e_.default};const{PostgrestClient:bC,PostgrestQueryBuilder:q6,PostgrestFilterBuilder:X6,PostgrestTransformBuilder:Y6,PostgrestBuilder:K6}=_C,yC="2.10.7",xC={"X-Client-Info":`realtime-js/${yC}`},wC="1.0.0",t_=1e4,SC=1e3;var Ps;(function(i){i[i.connecting=0]="connecting",i[i.open=1]="open",i[i.closing=2]="closing",i[i.closed=3]="closed"})(Ps||(Ps={}));var Ur;(function(i){i.closed="closed",i.errored="errored",i.joined="joined",i.joining="joining",i.leaving="leaving"})(Ur||(Ur={}));var tn;(function(i){i.close="phx_close",i.error="phx_error",i.join="phx_join",i.reply="phx_reply",i.leave="phx_leave",i.access_token="access_token"})(tn||(tn={}));var rf;(function(i){i.websocket="websocket"})(rf||(rf={}));var Oa;(function(i){i.Connecting="connecting",i.Open="open",i.Closing="closing",i.Closed="closed"})(Oa||(Oa={}));class EC{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,t,r)}_decodeBroadcast(e,t,r){const n=t.getUint8(1),a=t.getUint8(2);let s=this.HEADER_LENGTH+2;const o=r.decode(e.slice(s,s+n));s=s+n;const l=r.decode(e.slice(s,s+a));s=s+a;const d=JSON.parse(r.decode(e.slice(s,e.byteLength)));return{ref:null,topic:o,event:l,payload:d}}}class i_{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var _i;(function(i){i.abstime="abstime",i.bool="bool",i.date="date",i.daterange="daterange",i.float4="float4",i.float8="float8",i.int2="int2",i.int4="int4",i.int4range="int4range",i.int8="int8",i.int8range="int8range",i.json="json",i.jsonb="jsonb",i.money="money",i.numeric="numeric",i.oid="oid",i.reltime="reltime",i.text="text",i.time="time",i.timestamp="timestamp",i.timestamptz="timestamptz",i.timetz="timetz",i.tsrange="tsrange",i.tstzrange="tstzrange"})(_i||(_i={}));const Xg=(i,e,t={})=>{var r;const n=(r=t.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((a,s)=>(a[s]=TC(s,i,e,n),a),{})},TC=(i,e,t,r)=>{const n=e.find(o=>o.name===i),a=n==null?void 0:n.type,s=t[i];return a&&!r.includes(a)?r_(a,s):nf(s)},r_=(i,e)=>{if(i.charAt(0)==="_"){const t=i.slice(1,i.length);return kC(e,t)}switch(i){case _i.bool:return AC(e);case _i.float4:case _i.float8:case _i.int2:case _i.int4:case _i.int8:case _i.numeric:case _i.oid:return IC(e);case _i.json:case _i.jsonb:return CC(e);case _i.timestamp:return $C(e);case _i.abstime:case _i.date:case _i.daterange:case _i.int4range:case _i.int8range:case _i.money:case _i.reltime:case _i.text:case _i.time:case _i.timestamptz:case _i.timetz:case _i.tsrange:case _i.tstzrange:return nf(e);default:return nf(e)}},nf=i=>i,AC=i=>{switch(i){case"t":return!0;case"f":return!1;default:return i}},IC=i=>{if(typeof i=="string"){const e=parseFloat(i);if(!Number.isNaN(e))return e}return i},CC=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(e){return console.log(`JSON parse error: ${e}`),i}return i},kC=(i,e)=>{if(typeof i!="string")return i;const t=i.length-1,r=i[t];if(i[0]==="{"&&r==="}"){let a;const s=i.slice(1,t);try{a=JSON.parse("["+s+"]")}catch(o){a=s?s.split(","):[]}return a.map(o=>r_(e,o))}return i},$C=i=>typeof i=="string"?i.replace(" ","T"):i,n_=i=>{let e=i;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")};class yu{constructor(e,t,r={},n=t_){this.channel=e,this.event=t,this.payload=r,this.timeout=n,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var r;return this._hasReceived(e)&&t((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=t,this._matchReceive(t)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Yg;(function(i){i.SYNC="sync",i.JOIN="join",i.LEAVE="leave"})(Yg||(Yg={}));class Bo{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(t==null?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},n=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Bo.syncState(this.state,n,a,s),this.pendingDiffs.forEach(l=>{this.state=Bo.syncDiff(this.state,l,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},n=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(n):(this.state=Bo.syncDiff(this.state,n,a,s),o())}),this.onJoin((n,a,s)=>{this.channel._trigger("presence",{event:"join",key:n,currentPresences:a,newPresences:s})}),this.onLeave((n,a,s)=>{this.channel._trigger("presence",{event:"leave",key:n,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,r,n){const a=this.cloneDeep(e),s=this.transformState(t),o={},l={};return this.map(a,(d,c)=>{s[d]||(l[d]=c)}),this.map(s,(d,c)=>{const u=a[d];if(u){const f=c.map(p=>p.presence_ref),h=u.map(p=>p.presence_ref),g=c.filter(p=>h.indexOf(p.presence_ref)<0),S=u.filter(p=>f.indexOf(p.presence_ref)<0);g.length>0&&(o[d]=g),S.length>0&&(l[d]=S)}else o[d]=c}),this.syncDiff(a,{joins:o,leaves:l},r,n)}static syncDiff(e,t,r,n){const{joins:a,leaves:s}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return r||(r=()=>{}),n||(n=()=>{}),this.map(a,(o,l)=>{var d;const c=(d=e[o])!==null&&d!==void 0?d:[];if(e[o]=this.cloneDeep(l),c.length>0){const u=e[o].map(h=>h.presence_ref),f=c.filter(h=>u.indexOf(h.presence_ref)<0);e[o].unshift(...f)}r(o,c,l)}),this.map(s,(o,l)=>{let d=e[o];if(!d)return;const c=l.map(u=>u.presence_ref);d=d.filter(u=>c.indexOf(u.presence_ref)<0),e[o]=d,n(o,d,l),d.length===0&&delete e[o]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,r)=>{const n=e[r];return"metas"in n?t[r]=n.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):t[r]=n,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Kg;(function(i){i.ALL="*",i.INSERT="INSERT",i.UPDATE="UPDATE",i.DELETE="DELETE"})(Kg||(Kg={}));var Zg;(function(i){i.BROADCAST="broadcast",i.PRESENCE="presence",i.POSTGRES_CHANGES="postgres_changes",i.SYSTEM="system"})(Zg||(Zg={}));var Jg;(function(i){i.SUBSCRIBED="SUBSCRIBED",i.TIMED_OUT="TIMED_OUT",i.CLOSED="CLOSED",i.CHANNEL_ERROR="CHANNEL_ERROR"})(Jg||(Jg={}));class Pf{constructor(e,t={config:{}},r){this.topic=e,this.params=t,this.socket=r,this.bindings={},this.state=Ur.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new yu(this,tn.join,this.params,this.timeout),this.rejoinTimer=new i_(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ur.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ur.closed,this.socket._remove(this)}),this._onError(n=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,n),this.state=Ur.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ur.errored,this.rejoinTimer.scheduleTimeout())}),this._on(tn.reply,{},(n,a)=>{this._trigger(this._replyEventName(a),n)}),this.presence=new Bo(this),this.broadcastEndpointURL=n_(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,t=this.timeout){var r,n;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:a,presence:s,private:o}}=this.params;this._onError(c=>e&&e("CHANNEL_ERROR",c)),this._onClose(()=>e&&e("CLOSED"));const l={},d={broadcast:a,presence:s,postgres_changes:(n=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&n!==void 0?n:[],private:o};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:d},l)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:c})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){e&&e("SUBSCRIBED");return}else{const f=this.bindings.postgres_changes,h=(u=f==null?void 0:f.length)!==null&&u!==void 0?u:0,g=[];for(let S=0;S{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}track(r){return se(this,arguments,function*(e,t={}){return yield this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)})}untrack(){return se(this,arguments,function*(e={}){return yield this.send({type:"presence",event:"untrack"},e)})}on(e,t,r){return this._on(e,t,r)}send(r){return se(this,arguments,function*(e,t={}){var n,a;if(!this._canPush()&&e.type==="broadcast"){const{event:s,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o,private:this.private}]})};try{const d=yield this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=t.timeout)!==null&&n!==void 0?n:this.timeout);return yield(a=d.body)===null||a===void 0?void 0:a.cancel(),d.ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,l,d;const c=this._push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((d=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||d===void 0)&&d.ack)&&s("ok"),c.receive("ok",()=>s("ok")),c.receive("error",()=>s("error")),c.receive("timeout",()=>s("timed out"))})})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Ur.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(tn.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const n=new yu(this,tn.leave,{},e);n.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),n.send(),this._canPush()||n.trigger("ok",{})})}_fetchWithTimeout(e,t,r){return se(this,null,function*(){const n=new AbortController,a=setTimeout(()=>n.abort(),r),s=yield this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(a),s})}_push(e,t,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let n=new yu(this,e,t,r);return this._canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}_onMessage(e,t,r){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,r){var n,a;const s=e.toLocaleLowerCase(),{close:o,error:l,leave:d,join:c}=tn;if(r&&[o,l,d,c].indexOf(s)>=0&&r!==this._joinRef())return;let f=this._onMessage(s,t,r);if(t&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(n=this.bindings.postgres_changes)===null||n===void 0||n.filter(h=>{var g,S,p;return((g=h.filter)===null||g===void 0?void 0:g.event)==="*"||((p=(S=h.filter)===null||S===void 0?void 0:S.event)===null||p===void 0?void 0:p.toLocaleLowerCase())===s}).map(h=>h.callback(f,r)):(a=this.bindings[s])===null||a===void 0||a.filter(h=>{var g,S,p,b,T,y;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in h){const v=h.id,L=(g=h.filter)===null||g===void 0?void 0:g.event;return v&&((S=t.ids)===null||S===void 0?void 0:S.includes(v))&&(L==="*"||(L==null?void 0:L.toLocaleLowerCase())===((p=t.data)===null||p===void 0?void 0:p.type.toLocaleLowerCase()))}else{const v=(T=(b=h==null?void 0:h.filter)===null||b===void 0?void 0:b.event)===null||T===void 0?void 0:T.toLocaleLowerCase();return v==="*"||v===((y=t==null?void 0:t.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===s}).map(h=>{if(typeof f=="object"&&"ids"in f){const g=f.data,{schema:S,table:p,commit_timestamp:b,type:T,errors:y}=g;f=Object.assign(Object.assign({},{schema:S,table:p,commit_timestamp:b,eventType:T,new:{},old:{},errors:y}),this._getPayloadRecords(g))}h.callback(f,r)})}_isClosed(){return this.state===Ur.closed}_isJoined(){return this.state===Ur.joined}_isJoining(){return this.state===Ur.joining}_isLeaving(){return this.state===Ur.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,r){const n=e.toLocaleLowerCase(),a={type:n,filter:t,callback:r};return this.bindings[n]?this.bindings[n].push(a):this.bindings[n]=[a],this}_off(e,t){const r=e.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(n=>{var a;return!(((a=n.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&Pf.isEqual(n.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(tn.close,{},e)}_onError(e){this._on(tn.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ur.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=Xg(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=Xg(e.columns,e.old_record)),t}}const LC=()=>{},OC=typeof WebSocket!="undefined",RC=` - addEventListener("message", (e) => { - if (e.data.event === "start") { - setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); - } - });`;class PC{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=xC,this.params={},this.timeout=t_,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=LC,this.conn=null,this.sendBuffer=[],this.serializer=new EC,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let s;return a?s=a:typeof fetch=="undefined"?s=(...o)=>Ws(()=>se(this,null,function*(){const{default:l}=yield Promise.resolve().then(()=>Ys);return{default:l}}),void 0).then(({default:l})=>l(...o)):s=fetch,(...o)=>s(...o)},this.endPoint=`${e}/${rf.websocket}`,this.httpEndpoint=n_(e),t!=null&&t.transport?this.transport=t.transport:this.transport=null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t!=null&&t.timeout&&(this.timeout=t.timeout),t!=null&&t.logger&&(this.logger=t.logger),t!=null&&t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const n=(r=t==null?void 0:t.params)===null||r===void 0?void 0:r.apikey;if(n&&(this.accessToken=n,this.apiKey=n),this.reconnectAfterMs=t!=null&&t.reconnectAfterMs?t.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=t!=null&&t.encode?t.encode:(a,s)=>s(JSON.stringify(a)),this.decode=t!=null&&t.decode?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new i_(()=>se(this,null,function*(){this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(t==null?void 0:t.fetch),t!=null&&t.worker){if(typeof window!="undefined"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(t==null?void 0:t.worker)||!1,this.workerUrl=t==null?void 0:t.workerUrl}}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(OC){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new FC(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Ws(()=>se(this,null,function*(){const{default:e}=yield import("./browser-CBdNgIts.js").then(t=>t.b);return{default:e}}),[]).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,t!=null?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}removeChannel(e){return se(this,null,function*(){const t=yield e.unsubscribe();return this.channels.length===0&&this.disconnect(),t})}removeAllChannels(){return se(this,null,function*(){const e=yield Promise.all(this.channels.map(t=>t.unsubscribe()));return this.disconnect(),e})}log(e,t,r){this.logger(e,t,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Ps.connecting:return Oa.Connecting;case Ps.open:return Oa.Open;case Ps.closing:return Oa.Closing;default:return Oa.Closed}}isConnected(){return this.connectionState()===Oa.Open}channel(e,t={config:{}}){const r=new Pf(`realtime:${e}`,t,this);return this.channels.push(r),r}push(e){const{topic:t,event:r,payload:n,ref:a}=e,s=()=>{this.encode(e,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${t} ${r} (${a})`,n),this.isConnected()?s():this.sendBuffer.push(s)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(tn.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:wC}))}_onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:a,ref:s}=t;(s&&s===this.pendingHeartbeatRef||n===(a==null?void 0:a.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${a.status||""} ${r} ${n} ${s&&"("+s+")"||""}`,a),this.channels.filter(o=>o._isMember(r)).forEach(o=>o._trigger(n,a,s)),this.stateChangeCallbacks.message.forEach(o=>o(t))})}_onConnOpen(){return se(this,null,function*(){if(this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=t=>{this.log("worker","worker error",t.message),this.workerRef.terminate()},this.workerRef.onmessage=t=>{t.data.event==="keepAlive"&&this._sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(e=>e())})}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(tn.error))}_appendParams(e,t){if(Object.keys(t).length===0)return e;const r=e.match(/\?/)?"&":"?",n=new URLSearchParams(t);return`${e}${r}${n}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(SC,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}_workerObjectUrl(e){let t;if(e)t=e;else{const r=new Blob([RC],{type:"application/javascript"});t=URL.createObjectURL(r)}return t}}class FC{constructor(e,t,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=Ps.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=r.close}}class Ff extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function hr(i){return typeof i=="object"&&i!==null&&"__isStorageError"in i}class NC extends Ff{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class af extends Ff{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var DC=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const a_=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Ws(()=>se(void 0,null,function*(){const{default:r}=yield Promise.resolve().then(()=>Ys);return{default:r}}),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},MC=()=>DC(void 0,void 0,void 0,function*(){return typeof Response=="undefined"?(yield Ws(()=>Promise.resolve().then(()=>Ys),void 0)).Response:Response}),sf=i=>{if(Array.isArray(i))return i.map(t=>sf(t));if(typeof i=="function"||i!==Object(i))return i;const e={};return Object.entries(i).forEach(([t,r])=>{const n=t.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[n]=sf(r)}),e};var Wa=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const xu=i=>i.msg||i.message||i.error_description||i.error||JSON.stringify(i),zC=(i,e,t)=>Wa(void 0,void 0,void 0,function*(){const r=yield MC();i instanceof r&&!(t!=null&&t.noResolveJson)?i.json().then(n=>{e(new NC(xu(n),i.status||500))}).catch(n=>{e(new af(xu(n),n))}):e(new af(xu(i),i))}),BC=(i,e,t,r)=>{const n={method:i,headers:(e==null?void 0:e.headers)||{}};return i==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),r&&(n.body=JSON.stringify(r)),Object.assign(Object.assign({},n),t))};function rl(i,e,t,r,n,a){return Wa(this,void 0,void 0,function*(){return new Promise((s,o)=>{i(t,BC(e,r,n,a)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>zC(l,o,r))})})}function Pd(i,e,t,r){return Wa(this,void 0,void 0,function*(){return rl(i,"GET",e,t,r)})}function da(i,e,t,r,n){return Wa(this,void 0,void 0,function*(){return rl(i,"POST",e,r,n,t)})}function UC(i,e,t,r,n){return Wa(this,void 0,void 0,function*(){return rl(i,"PUT",e,r,n,t)})}function GC(i,e,t,r){return Wa(this,void 0,void 0,function*(){return rl(i,"HEAD",e,Object.assign(Object.assign({},t),{noResolveJson:!0}),r)})}function s_(i,e,t,r,n){return Wa(this,void 0,void 0,function*(){return rl(i,"DELETE",e,r,n,t)})}var $r=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const jC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Qg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class HC{constructor(e,t={},r,n){this.url=e,this.headers=t,this.bucketId=r,this.fetch=a_(n)}uploadOrUpdate(e,t,r,n){return $r(this,void 0,void 0,function*(){try{let a;const s=Object.assign(Object.assign({},Qg),n);let o=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(s.upsert)});const l=s.metadata;typeof Blob!="undefined"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),l&&a.append("metadata",this.encodeMetadata(l)),a.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(a=r,a.append("cacheControl",s.cacheControl),l&&a.append("metadata",this.encodeMetadata(l))):(a=r,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType,l&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),n!=null&&n.headers&&(o=Object.assign(Object.assign({},o),n.headers));const d=this._removeEmptyFolders(t),c=this._getFinalPath(d),u=yield this.fetch(`${this.url}/object/${c}`,Object.assign({method:e,body:a,headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{})),f=yield u.json();return u.ok?{data:{path:d,id:f.Id,fullPath:f.Key},error:null}:{data:null,error:f}}catch(a){if(hr(a))return{data:null,error:a};throw a}})}upload(e,t,r){return $r(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,n){return $r(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(e),s=this._getFinalPath(a),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",t);try{let l;const d=Object.assign({upsert:Qg.upsert},n),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(d.upsert)});typeof Blob!="undefined"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",d.cacheControl),l.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(l=r,l.append("cacheControl",d.cacheControl)):(l=r,c["cache-control"]=`max-age=${d.cacheControl}`,c["content-type"]=d.contentType);const u=yield this.fetch(o.toString(),{method:"PUT",body:l,headers:c}),f=yield u.json();return u.ok?{data:{path:a,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(hr(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,t){return $r(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e);const n=Object.assign({},this.headers);t!=null&&t.upsert&&(n["x-upsert"]="true");const a=yield da(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:n}),s=new URL(this.url+a.url),o=s.searchParams.get("token");if(!o)throw new Ff("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:o},error:null}}catch(r){if(hr(r))return{data:null,error:r};throw r}})}update(e,t,r){return $r(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t,r){return $r(this,void 0,void 0,function*(){try{return{data:yield da(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(n){if(hr(n))return{data:null,error:n};throw n}})}copy(e,t,r){return $r(this,void 0,void 0,function*(){try{return{data:{path:(yield da(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(n){if(hr(n))return{data:null,error:n};throw n}})}createSignedUrl(e,t,r){return $r(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),a=yield da(this.fetch,`${this.url}/object/sign/${n}`,Object.assign({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${s}`)},{data:a,error:null}}catch(n){if(hr(n))return{data:null,error:n};throw n}})}createSignedUrls(e,t,r){return $r(this,void 0,void 0,function*(){try{const n=yield da(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:n.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${a}`):null})),error:null}}catch(n){if(hr(n))return{data:null,error:n};throw n}})}download(e,t){return $r(this,void 0,void 0,function*(){const n=typeof(t==null?void 0:t.transform)!="undefined"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=a?`?${a}`:"";try{const o=this._getFinalPath(e);return{data:yield(yield Pd(this.fetch,`${this.url}/${n}/${o}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(o){if(hr(o))return{data:null,error:o};throw o}})}info(e){return $r(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{const r=yield Pd(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:sf(r),error:null}}catch(r){if(hr(r))return{data:null,error:r};throw r}})}exists(e){return $r(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{return yield GC(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(hr(r)&&r instanceof af){const n=r.originalError;if([400,404].includes(n==null?void 0:n.status))return{data:!1,error:r}}throw r}})}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],a=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";a!==""&&n.push(a);const o=typeof(t==null?void 0:t.transform)!="undefined"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&n.push(l);let d=n.join("&");return d!==""&&(d=`?${d}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${d}`)}}}remove(e){return $r(this,void 0,void 0,function*(){try{return{data:yield s_(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(hr(t))return{data:null,error:t};throw t}})}list(e,t,r){return $r(this,void 0,void 0,function*(){try{const n=Object.assign(Object.assign(Object.assign({},jC),t),{prefix:e||""});return{data:yield da(this.fetch,`${this.url}/object/list/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(hr(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer!="undefined"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const VC="2.7.1",WC={"X-Client-Info":`storage-js/${VC}`};var xs=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};class qC{constructor(e,t={},r){this.url=e,this.headers=Object.assign(Object.assign({},WC),t),this.fetch=a_(r)}listBuckets(){return xs(this,void 0,void 0,function*(){try{return{data:yield Pd(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(hr(e))return{data:null,error:e};throw e}})}getBucket(e){return xs(this,void 0,void 0,function*(){try{return{data:yield Pd(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(hr(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return xs(this,void 0,void 0,function*(){try{return{data:yield da(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(hr(r))return{data:null,error:r};throw r}})}updateBucket(e,t){return xs(this,void 0,void 0,function*(){try{return{data:yield UC(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(hr(r))return{data:null,error:r};throw r}})}emptyBucket(e){return xs(this,void 0,void 0,function*(){try{return{data:yield da(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(hr(t))return{data:null,error:t};throw t}})}deleteBucket(e){return xs(this,void 0,void 0,function*(){try{return{data:yield s_(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(hr(t))return{data:null,error:t};throw t}})}}class XC extends qC{constructor(e,t={},r){super(e,t,r)}from(e){return new HC(this.url,this.headers,e,this.fetch)}}const YC="2.46.1";let Po="";typeof Deno!="undefined"?Po="deno":typeof document!="undefined"?Po="web":typeof navigator!="undefined"&&navigator.product==="ReactNative"?Po="react-native":Po="node";const KC={"X-Client-Info":`supabase-js-${Po}/${YC}`},ZC={headers:KC},JC={schema:"public"},QC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ek={};var tk=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const ik=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=Hv:e=fetch,(...t)=>e(...t)},rk=()=>typeof Headers=="undefined"?Vv:Headers,nk=(i,e,t)=>{const r=ik(t),n=rk();return(a,s)=>tk(void 0,void 0,void 0,function*(){var o;const l=(o=yield e())!==null&&o!==void 0?o:i;let d=new n(s==null?void 0:s.headers);return d.has("apikey")||d.set("apikey",i),d.has("Authorization")||d.set("Authorization",`Bearer ${l}`),r(a,Object.assign(Object.assign({},s),{headers:d}))})};var ak=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};function sk(i){return i.replace(/\/$/,"")}function ok(i,e){const{db:t,auth:r,realtime:n,global:a}=i,{db:s,auth:o,realtime:l,global:d}=e,c={db:Object.assign(Object.assign({},s),t),auth:Object.assign(Object.assign({},o),r),realtime:Object.assign(Object.assign({},l),n),global:Object.assign(Object.assign({},d),a),accessToken:()=>ak(this,void 0,void 0,function*(){return""})};return i.accessToken?c.accessToken=i.accessToken:delete c.accessToken,c}const o_="2.65.1",lk="http://localhost:9999",dk="supabase.auth.token",ck={"X-Client-Info":`gotrue-js/${o_}`},e0=10,of="X-Supabase-Api-Version",l_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function uk(i){return Math.round(Date.now()/1e3)+i}function fk(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const e=Math.random()*16|0;return(i=="x"?e:e&3|8).toString(16)})}const en=()=>typeof document!="undefined",ka={tested:!1,writable:!1},Uo=()=>{if(!en())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch(e){return!1}if(ka.tested)return ka.writable;const i=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(i,i),globalThis.localStorage.removeItem(i),ka.tested=!0,ka.writable=!0}catch(e){ka.tested=!0,ka.writable=!1}return ka.writable};function wu(i){const e={},t=new URL(i);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((n,a)=>{e[a]=n})}catch(r){}return t.searchParams.forEach((r,n)=>{e[n]=r}),e}const d_=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Ws(()=>se(void 0,null,function*(){const{default:r}=yield Promise.resolve().then(()=>Ys);return{default:r}}),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},hk=i=>typeof i=="object"&&i!==null&&"status"in i&&"ok"in i&&"json"in i&&typeof i.json=="function",c_=(i,e,t)=>se(void 0,null,function*(){yield i.setItem(e,JSON.stringify(t))}),Ql=(i,e)=>se(void 0,null,function*(){const t=yield i.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(r){return t}}),ed=(i,e)=>se(void 0,null,function*(){yield i.removeItem(e)});function mk(i){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t="",r,n,a,s,o,l,d,c=0;for(i=i.replace("-","+").replace("_","/");c>4,n=(o&15)<<4|l>>2,a=(l&3)<<6|d,t=t+String.fromCharCode(r),l!=64&&n!=0&&(t=t+String.fromCharCode(n)),d!=64&&a!=0&&(t=t+String.fromCharCode(a));return t}class Qd{constructor(){this.promise=new Qd.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}Qd.promiseConstructor=Promise;function t0(i){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,t=i.split(".");if(t.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=t[1];return JSON.parse(mk(r))}function pk(i){return se(this,null,function*(){return yield new Promise(e=>{setTimeout(()=>e(null),i)})})}function gk(i,e){return new Promise((r,n)=>{se(this,null,function*(){for(let a=0;a<1/0;a++)try{const s=yield i(a);if(!e(a,null,s)){r(s);return}}catch(s){if(!e(a,s)){n(s);return}}})})}function vk(i){return("0"+i.toString(16)).substr(-2)}function _k(){const e=new Uint32Array(56);if(typeof crypto=="undefined"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=t.length;let n="";for(let a=0;a<56;a++)n+=t.charAt(Math.floor(Math.random()*r));return n}return crypto.getRandomValues(e),Array.from(e,vk).join("")}function bk(i){return se(this,null,function*(){const t=new TextEncoder().encode(i),r=yield crypto.subtle.digest("SHA-256",t),n=new Uint8Array(r);return Array.from(n).map(a=>String.fromCharCode(a)).join("")})}function yk(i){return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function xk(i){return se(this,null,function*(){if(!(typeof crypto!="undefined"&&typeof crypto.subtle!="undefined"&&typeof TextEncoder!="undefined"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),i;const t=yield bk(i);return yk(t)})}function ws(i,e,t=!1){return se(this,null,function*(){const r=_k();let n=r;t&&(n+="/PASSWORD_RECOVERY"),yield c_(i,`${e}-code-verifier`,n);const a=yield xk(r);return[a,r===a?"plain":"s256"]})}const wk=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Sk(i){const e=i.headers.get(of);if(!e||!e.match(wk))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch(t){return null}}class Nf extends Error{constructor(e,t,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=r}}function zt(i){return typeof i=="object"&&i!==null&&"__isAuthError"in i}class Ek extends Nf{constructor(e,t,r){super(e,t,r),this.name="AuthApiError",this.status=t,this.code=r}}function Tk(i){return zt(i)&&i.name==="AuthApiError"}class u_ extends Nf{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class qa extends Nf{constructor(e,t,r,n){super(e,r,n),this.name=t,this.status=r}}class sa extends qa{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ak(i){return zt(i)&&i.name==="AuthSessionMissingError"}class Su extends qa{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class td extends qa{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class id extends qa{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class i0 extends qa{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class lf extends qa{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function Eu(i){return zt(i)&&i.name==="AuthRetryableFetchError"}class r0 extends qa{constructor(e,t,r){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=r}}var Ik=function(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);ni.msg||i.message||i.error_description||i.error||JSON.stringify(i),Ck=[502,503,504];function n0(i){return se(this,null,function*(){var e;if(!hk(i))throw new lf($a(i),0);if(Ck.includes(i.status))throw new lf($a(i),i.status);let t;try{t=yield i.json()}catch(a){throw new u_($a(a),a)}let r;const n=Sk(i);if(n&&n.getTime()>=l_["2024-01-01"].timestamp&&typeof t=="object"&&t&&typeof t.code=="string"?r=t.code:typeof t=="object"&&t&&typeof t.error_code=="string"&&(r=t.error_code),r){if(r==="weak_password")throw new r0($a(t),i.status,((e=t.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new sa}else if(typeof t=="object"&&t&&typeof t.weak_password=="object"&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new r0($a(t),i.status,t.weak_password.reasons);throw new Ek($a(t),i.status||500,r)})}const kk=(i,e,t,r)=>{const n={method:i,headers:(e==null?void 0:e.headers)||{}};return i==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),n.body=JSON.stringify(r),Object.assign(Object.assign({},n),t))};function Ht(i,e,t,r){return se(this,null,function*(){var n;const a=Object.assign({},r==null?void 0:r.headers);a[of]||(a[of]=l_["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const s=(n=r==null?void 0:r.query)!==null&&n!==void 0?n:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=yield $k(i,e,t+o,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}})}function $k(i,e,t,r,n,a){return se(this,null,function*(){const s=kk(e,r,n,a);let o;try{o=yield i(t,Object.assign({},s))}catch(l){throw console.error(l),new lf($a(l),0)}if(o.ok||(yield n0(o)),r!=null&&r.noResolveJson)return o;try{return yield o.json()}catch(l){yield n0(l)}})}function oa(i){var e;let t=null;Pk(i)&&(t=Object.assign({},i),i.expires_at||(t.expires_at=uk(i.expires_in)));const r=(e=i.user)!==null&&e!==void 0?e:i;return{data:{session:t,user:r},error:null}}function a0(i){const e=oa(i);return!e.error&&i.weak_password&&typeof i.weak_password=="object"&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.message&&typeof i.weak_password.message=="string"&&i.weak_password.reasons.reduce((t,r)=>t&&typeof r=="string",!0)&&(e.data.weak_password=i.weak_password),e}function ca(i){var e;return{data:{user:(e=i.user)!==null&&e!==void 0?e:i},error:null}}function Lk(i){return{data:i,error:null}}function Ok(i){const{action_link:e,email_otp:t,hashed_token:r,redirect_to:n,verification_type:a}=i,s=Ik(i,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:e,email_otp:t,hashed_token:r,redirect_to:n,verification_type:a},l=Object.assign({},s);return{data:{properties:o,user:l},error:null}}function Rk(i){return i}function Pk(i){return i.access_token&&i.refresh_token&&i.expires_in}var Fk=function(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);n0&&(h.forEach(g=>{const S=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),p=JSON.parse(g.split(";")[1].split("=")[1]);d[`${p}Page`]=S}),d.total=parseInt(f)),{data:Object.assign(Object.assign({},u),d),error:null}}catch(d){if(zt(d))return{data:{users:[]},error:d};throw d}})}getUserById(e){return se(this,null,function*(){try{return yield Ht(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ca})}catch(t){if(zt(t))return{data:{user:null},error:t};throw t}})}updateUserById(e,t){return se(this,null,function*(){try{return yield Ht(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:ca})}catch(r){if(zt(r))return{data:{user:null},error:r};throw r}})}deleteUser(e,t=!1){return se(this,null,function*(){try{return yield Ht(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:ca})}catch(r){if(zt(r))return{data:{user:null},error:r};throw r}})}_listFactors(e){return se(this,null,function*(){try{const{data:t,error:r}=yield Ht(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:n=>({data:{factors:n},error:null})});return{data:t,error:r}}catch(t){if(zt(t))return{data:null,error:t};throw t}})}_deleteFactor(e){return se(this,null,function*(){try{return{data:yield Ht(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(zt(t))return{data:null,error:t};throw t}})}}const Dk={getItem:i=>Uo()?globalThis.localStorage.getItem(i):null,setItem:(i,e)=>{Uo()&&globalThis.localStorage.setItem(i,e)},removeItem:i=>{Uo()&&globalThis.localStorage.removeItem(i)}};function s0(i={}){return{getItem:e=>i[e]||null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]}}}function Mk(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(i){typeof self!="undefined"&&(self.globalThis=self)}}const Ss={debug:!!(globalThis&&Uo()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class f_ extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class zk extends f_{}function Bk(i,e,t){return se(this,null,function*(){Ss.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",i,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),Ss.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",i)},e),yield globalThis.navigator.locks.request(i,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},n=>se(this,null,function*(){if(n){Ss.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",i,n.name);try{return yield t()}finally{Ss.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",i,n.name)}}else{if(e===0)throw Ss.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",i),new zk(`Acquiring an exclusive Navigator LockManager lock "${i}" immediately failed`);if(Ss.debug)try{const a=yield globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),yield t()}}))})}Mk();const Uk={url:lk,storageKey:dk,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ck,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Co=30*1e3,o0=3;function l0(i,e,t){return se(this,null,function*(){return yield t()})}class Yo{constructor(e){var t,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Yo.nextInstanceID,Yo.nextInstanceID+=1,this.instanceID>0&&en()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const n=Object.assign(Object.assign({},Uk),e);if(this.logDebugMessages=!!n.debug,typeof n.debug=="function"&&(this.logger=n.debug),this.persistSession=n.persistSession,this.storageKey=n.storageKey,this.autoRefreshToken=n.autoRefreshToken,this.admin=new Nk({url:n.url,headers:n.headers,fetch:n.fetch}),this.url=n.url,this.headers=n.headers,this.fetch=d_(n.fetch),this.lock=n.lock||l0,this.detectSessionInUrl=n.detectSessionInUrl,this.flowType=n.flowType,this.hasCustomAuthorizationHeader=n.hasCustomAuthorizationHeader,n.lock?this.lock=n.lock:en()&&(!((t=globalThis==null?void 0:globalThis.navigator)===null||t===void 0)&&t.locks)?this.lock=Bk:this.lock=l0,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?n.storage?this.storage=n.storage:Uo()?this.storage=Dk:(this.memoryStorage={},this.storage=s0(this.memoryStorage)):(this.memoryStorage={},this.storage=s0(this.memoryStorage)),en()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",a=>se(this,null,function*(){this._debug("received broadcast notification from other tab or client",a),yield this._notifyAllSubscribers(a.data.event,a.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${o_}) ${new Date().toISOString()}`,...e),this}initialize(){return se(this,null,function*(){return this.initializePromise?yield this.initializePromise:(this.initializePromise=se(this,null,function*(){return yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._initialize()}))}),yield this.initializePromise)})}_initialize(){return se(this,null,function*(){try{const e=en()?yield this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:r}=yield this._getSessionFromURL(e);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.code)==="identity_already_exists"?{error:r}:(yield this._removeSession(),{error:r});const{session:n,redirectType:a}=t;return this._debug("#_initialize()","detected session in URL",n,"redirect type",a),yield this._saveSession(n),setTimeout(()=>se(this,null,function*(){a==="recovery"?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",n):yield this._notifyAllSubscribers("SIGNED_IN",n)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(e){return zt(e)?{error:e}:{error:new u_("Unexpected error during initialization",e)}}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signInAnonymously(e){return se(this,null,function*(){var t,r,n;try{const a=yield Ht(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}},xform:oa}),{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,d=s.user;return s.session&&(yield this._saveSession(s.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(a){if(zt(a))return{data:{user:null,session:null},error:a};throw a}})}signUp(e){return se(this,null,function*(){var t,r,n;try{let a;if("email"in e){const{email:c,password:u,options:f}=e;let h=null,g=null;this.flowType==="pkce"&&([h,g]=yield ws(this.storage,this.storageKey)),a=yield Ht(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:u,data:(t=f==null?void 0:f.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:g},xform:oa})}else if("phone"in e){const{phone:c,password:u,options:f}=e;a=yield Ht(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:u,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(n=f==null?void 0:f.channel)!==null&&n!==void 0?n:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:oa})}else throw new td("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,d=s.user;return s.session&&(yield this._saveSession(s.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(a){if(zt(a))return{data:{user:null,session:null},error:a};throw a}})}signInWithPassword(e){return se(this,null,function*(){try{let t;if("email"in e){const{email:a,password:s,options:o}=e;t=yield Ht(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:a0})}else if("phone"in e){const{phone:a,password:s,options:o}=e;t=yield Ht(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:a0})}else throw new td("You must provide either an email or phone number and a password");const{data:r,error:n}=t;return n?{data:{user:null,session:null},error:n}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Su}:(r.session&&(yield this._saveSession(r.session),yield this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:n})}catch(t){if(zt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOAuth(e){return se(this,null,function*(){var t,r,n,a;return yield this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(n=e.options)===null||n===void 0?void 0:n.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})})}exchangeCodeForSession(e){return se(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>se(this,null,function*(){return this._exchangeCodeForSession(e)}))})}_exchangeCodeForSession(e){return se(this,null,function*(){const t=yield Ql(this.storage,`${this.storageKey}-code-verifier`),[r,n]=(t!=null?t:"").split("/");try{const{data:a,error:s}=yield Ht(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:oa});if(yield ed(this.storage,`${this.storageKey}-code-verifier`),s)throw s;return!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Su}:(a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:n!=null?n:null}),error:s})}catch(a){if(zt(a))return{data:{user:null,session:null,redirectType:null},error:a};throw a}})}signInWithIdToken(e){return se(this,null,function*(){try{const{options:t,provider:r,token:n,access_token:a,nonce:s}=e,o=yield Ht(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:n,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:oa}),{data:l,error:d}=o;return d?{data:{user:null,session:null},error:d}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Su}:(l.session&&(yield this._saveSession(l.session),yield this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:d})}catch(t){if(zt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOtp(e){return se(this,null,function*(){var t,r,n,a,s;try{if("email"in e){const{email:o,options:l}=e;let d=null,c=null;this.flowType==="pkce"&&([d,c]=yield ws(this.storage,this.storageKey));const{error:u}=yield Ht(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(t=l==null?void 0:l.data)!==null&&t!==void 0?t:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:d,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:u}}if("phone"in e){const{phone:o,options:l}=e,{data:d,error:c}=yield Ht(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:c}}throw new td("You must provide either an email or phone number.")}catch(o){if(zt(o))return{data:{user:null,session:null},error:o};throw o}})}verifyOtp(e){return se(this,null,function*(){var t,r;try{let n,a;"options"in e&&(n=(t=e.options)===null||t===void 0?void 0:t.redirectTo,a=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:o}=yield Ht(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:n,xform:oa});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,d=s.user;return l!=null&&l.access_token&&(yield this._saveSession(l),yield this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(n){if(zt(n))return{data:{user:null,session:null},error:n};throw n}})}signInWithSSO(e){return se(this,null,function*(){var t,r,n;try{let a=null,s=null;return this.flowType==="pkce"&&([a,s]=yield ws(this.storage,this.storageKey)),yield Ht(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&r!==void 0?r:void 0}),!((n=e==null?void 0:e.options)===null||n===void 0)&&n.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:s}),headers:this.headers,xform:Lk})}catch(a){if(zt(a))return{data:null,error:a};throw a}})}reauthenticate(){return se(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return se(this,null,function*(){try{return yield this._useSession(e=>se(this,null,function*(){const{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new sa;const{error:n}=yield Ht(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:n}}))}catch(e){if(zt(e))return{data:{user:null,session:null},error:e};throw e}})}resend(e){return se(this,null,function*(){try{const t=`${this.url}/resend`;if("email"in e){const{email:r,type:n,options:a}=e,{error:s}=yield Ht(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:n,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in e){const{phone:r,type:n,options:a}=e,{data:s,error:o}=yield Ht(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:n,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o}}throw new td("You must provide either an email or phone number and a type")}catch(t){if(zt(t))return{data:{user:null,session:null},error:t};throw t}})}getSession(){return se(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return this._useSession(t=>se(this,null,function*(){return t}))}))})}_acquireLock(e,t){return se(this,null,function*(){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=se(this,null,function*(){return yield r,yield t()});return this.pendingInLock.push(se(this,null,function*(){try{yield n}catch(a){}})),n}return yield this.lock(`lock:${this.storageKey}`,e,()=>se(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=t();for(this.pendingInLock.push(se(this,null,function*(){try{yield r}catch(n){}})),yield r;this.pendingInLock.length;){const n=[...this.pendingInLock];yield Promise.all(n),this.pendingInLock.splice(0,n.length)}return yield r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(e){return se(this,null,function*(){this._debug("#_useSession","begin");try{const t=yield this.__loadSession();return yield e(t)}finally{this._debug("#_useSession","end")}})}__loadSession(){return se(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=yield Ql(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.storage.isServer){let s=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,d,c)=>(!s&&d==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),s=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,d,c))})}return{data:{session:e},error:null}}const{session:n,error:a}=yield this._callRefreshToken(e.refresh_token);return a?{data:{session:null},error:a}:{data:{session:n},error:null}}finally{this._debug("#__loadSession()","end")}})}getUser(e){return se(this,null,function*(){return e?yield this._getUser(e):(yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._getUser()})))})}_getUser(e){return se(this,null,function*(){try{return e?yield Ht(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ca}):yield this._useSession(t=>se(this,null,function*(){var r,n,a;const{data:s,error:o}=t;if(o)throw o;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new sa}:yield Ht(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(n=s.session)===null||n===void 0?void 0:n.access_token)!==null&&a!==void 0?a:void 0,xform:ca})}))}catch(t){if(zt(t))return Ak(t)&&(yield this._removeSession(),yield ed(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:t};throw t}})}updateUser(r){return se(this,arguments,function*(e,t={}){return yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._updateUser(e,t)}))})}_updateUser(r){return se(this,arguments,function*(e,t={}){try{return yield this._useSession(n=>se(this,null,function*(){const{data:a,error:s}=n;if(s)throw s;if(!a.session)throw new sa;const o=a.session;let l=null,d=null;this.flowType==="pkce"&&e.email!=null&&([l,d]=yield ws(this.storage,this.storageKey));const{data:c,error:u}=yield Ht(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:d}),jwt:o.access_token,xform:ca});if(u)throw u;return o.user=c.user,yield this._saveSession(o),yield this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}}))}catch(n){if(zt(n))return{data:{user:null},error:n};throw n}})}_decodeJWT(e){return t0(e)}setSession(e){return se(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._setSession(e)}))})}_setSession(e){return se(this,null,function*(){try{if(!e.access_token||!e.refresh_token)throw new sa;const t=Date.now()/1e3;let r=t,n=!0,a=null;const s=t0(e.access_token);if(s.exp&&(r=s.exp,n=r<=t),n){const{session:o,error:l}=yield this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:l}=yield this._getUser(e.access_token);if(l)throw l;a={access_token:e.access_token,refresh_token:e.refresh_token,user:o.user,token_type:"bearer",expires_in:r-t,expires_at:r},yield this._saveSession(a),yield this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(t){if(zt(t))return{data:{session:null,user:null},error:t};throw t}})}refreshSession(e){return se(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._refreshSession(e)}))})}_refreshSession(e){return se(this,null,function*(){try{return yield this._useSession(t=>se(this,null,function*(){var r;if(!e){const{data:s,error:o}=t;if(o)throw o;e=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new sa;const{session:n,error:a}=yield this._callRefreshToken(e.refresh_token);return a?{data:{user:null,session:null},error:a}:n?{data:{user:n.user,session:n},error:null}:{data:{user:null,session:null},error:null}}))}catch(t){if(zt(t))return{data:{user:null,session:null},error:t};throw t}})}_getSessionFromURL(e){return se(this,null,function*(){try{if(!en())throw new id("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new id("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new i0("Not a valid PKCE flow url.");const t=wu(window.location.href);if(e){if(!t.code)throw new i0("No code detected.");const{data:T,error:y}=yield this._exchangeCodeForSession(t.code);if(y)throw y;const v=new URL(window.location.href);return v.searchParams.delete("code"),window.history.replaceState(window.history.state,"",v.toString()),{data:{session:T.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new id(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:n,access_token:a,refresh_token:s,expires_in:o,expires_at:l,token_type:d}=t;if(!a||!o||!s||!d)throw new id("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(o);let f=c+u;l&&(f=parseInt(l));const h=f-c;h*1e3<=Co&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${u}s`);const g=f-u;c-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,f,c):c-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,f,c);const{data:S,error:p}=yield this._getUser(a);if(p)throw p;const b={provider_token:r,provider_refresh_token:n,access_token:a,expires_in:u,expires_at:f,refresh_token:s,token_type:d,user:S.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:b,redirectType:t.type},error:null}}catch(t){if(zt(t))return{data:{session:null,redirectType:null},error:t};throw t}})}_isImplicitGrantFlow(){const e=wu(window.location.href);return!!(en()&&(e.access_token||e.error_description))}_isPKCEFlow(){return se(this,null,function*(){const e=wu(window.location.href),t=yield Ql(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)})}signOut(){return se(this,arguments,function*(e={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){return yield this._signOut(e)}))})}_signOut(){return se(this,arguments,function*({scope:e}={scope:"global"}){return yield this._useSession(t=>se(this,null,function*(){var r;const{data:n,error:a}=t;if(a)return{error:a};const s=(r=n.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:o}=yield this.admin.signOut(s,e);if(o&&!(Tk(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return e!=="others"&&(yield this._removeSession(),yield ed(this.storage,`${this.storageKey}-code-verifier`)),{error:null}}))})}onAuthStateChange(e){const t=fk(),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),se(this,null,function*(){yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){this._emitInitialSession(t)}))}),{data:{subscription:r}}}_emitInitialSession(e){return se(this,null,function*(){return yield this._useSession(t=>se(this,null,function*(){var r,n;try{const{data:{session:a},error:s}=t;if(s)throw s;yield(r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){yield(n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",e,"error",a),console.error(a)}}))})}resetPasswordForEmail(r){return se(this,arguments,function*(e,t={}){let n=null,a=null;this.flowType==="pkce"&&([n,a]=yield ws(this.storage,this.storageKey,!0));try{return yield Ht(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:a,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(s){if(zt(s))return{data:null,error:s};throw s}})}getUserIdentities(){return se(this,null,function*(){var e;try{const{data:t,error:r}=yield this.getUser();if(r)throw r;return{data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(t){if(zt(t))return{data:null,error:t};throw t}})}linkIdentity(e){return se(this,null,function*(){var t;try{const{data:r,error:n}=yield this._useSession(a=>se(this,null,function*(){var s,o,l,d,c;const{data:u,error:f}=a;if(f)throw f;const h=yield this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=e.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return yield Ht(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(d=u.session)===null||d===void 0?void 0:d.access_token)!==null&&c!==void 0?c:void 0})}));if(n)throw n;return en()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(zt(r))return{data:{provider:e.provider,url:null},error:r};throw r}})}unlinkIdentity(e){return se(this,null,function*(){try{return yield this._useSession(t=>se(this,null,function*(){var r,n;const{data:a,error:s}=t;if(s)throw s;return yield Ht(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(n=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&n!==void 0?n:void 0})}))}catch(t){if(zt(t))return{data:null,error:t};throw t}})}_refreshAccessToken(e){return se(this,null,function*(){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const r=Date.now();return yield gk(n=>se(this,null,function*(){return n>0&&(yield pk(200*Math.pow(2,n-1))),this._debug(t,"refreshing attempt",n),yield Ht(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:oa})}),(n,a)=>{const s=200*Math.pow(2,n);return a&&Eu(a)&&Date.now()+s-rse(this,null,function*(){try{yield o.callback(e,t)}catch(l){a.push(l)}}));if(yield Promise.all(s),a.length>0){for(let o=0;othis._autoRefreshTokenTick(),Co);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno!="undefined"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(()=>se(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0)})}_stopAutoRefresh(){return se(this,null,function*(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)})}startAutoRefresh(){return se(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return se(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return se(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>se(this,null,function*(){try{const e=Date.now();try{return yield this._useSession(t=>se(this,null,function*(){const{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const n=Math.floor((r.expires_at*1e3-e)/Co);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts ${Co}ms, refresh threshold is ${o0} ticks`),n<=o0&&(yield this._callRefreshToken(r.refresh_token))}))}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(e.isAcquireTimeout||e instanceof f_)this._debug("auto refresh token tick lock not available");else throw e}})}_handleVisibilityChange(){return se(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!en()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>se(this,null,function*(){return yield this._onVisibilityChanged(!1)}),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}})}_onVisibilityChanged(e){return se(this,null,function*(){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(yield this.initializePromise,yield this._acquireLock(-1,()=>se(this,null,function*(){if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}yield this._recoverAndRefresh()})))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(e,t,r){return se(this,null,function*(){const n=[`provider=${encodeURIComponent(t)}`];if(r!=null&&r.redirectTo&&n.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&n.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,s]=yield ws(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});n.push(o.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);n.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&n.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${n.join("&")}`})}_unenroll(e){return se(this,null,function*(){try{return yield this._useSession(t=>se(this,null,function*(){var r;const{data:n,error:a}=t;return a?{data:null,error:a}:yield Ht(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token})}))}catch(t){if(zt(t))return{data:null,error:t};throw t}})}_enroll(e){return se(this,null,function*(){try{return yield this._useSession(t=>se(this,null,function*(){var r,n;const{data:a,error:s}=t;if(s)return{data:null,error:s};const o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:d}=yield Ht(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return d?{data:null,error:d}:(e.factorType==="totp"&&(!((n=l==null?void 0:l.totp)===null||n===void 0)&&n.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})}))}catch(t){if(zt(t))return{data:null,error:t};throw t}})}_verify(e){return se(this,null,function*(){return this._acquireLock(-1,()=>se(this,null,function*(){try{return yield this._useSession(t=>se(this,null,function*(){var r;const{data:n,error:a}=t;if(a)return{data:null,error:a};const{data:s,error:o}=yield Ht(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return o?{data:null,error:o}:(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:o})}))}catch(t){if(zt(t))return{data:null,error:t};throw t}}))})}_challenge(e){return se(this,null,function*(){return this._acquireLock(-1,()=>se(this,null,function*(){try{return yield this._useSession(t=>se(this,null,function*(){var r;const{data:n,error:a}=t;return a?{data:null,error:a}:yield Ht(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token})}))}catch(t){if(zt(t))return{data:null,error:t};throw t}}))})}_challengeAndVerify(e){return se(this,null,function*(){const{data:t,error:r}=yield this._challenge({factorId:e.factorId});return r?{data:null,error:r}:yield this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})})}_listFactors(){return se(this,null,function*(){const{data:{user:e},error:t}=yield this.getUser();if(t)return{data:null,error:t};const r=(e==null?void 0:e.factors)||[],n=r.filter(s=>s.factor_type==="totp"&&s.status==="verified"),a=r.filter(s=>s.factor_type==="phone"&&s.status==="verified");return{data:{all:r,totp:n,phone:a},error:null}})}_getAuthenticatorAssuranceLevel(){return se(this,null,function*(){return this._acquireLock(-1,()=>se(this,null,function*(){return yield this._useSession(e=>se(this,null,function*(){var t,r;const{data:{session:n},error:a}=e;if(a)return{data:null,error:a};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const s=this._decodeJWT(n.access_token);let o=null;s.aal&&(o=s.aal);let l=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(u=>u.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=s.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}))})}}Yo.nextInstanceID=0;const Gk=Yo;class jk extends Gk{constructor(e){super(e)}}var Hk=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};class Vk{constructor(e,t,r){var n,a,s;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const o=sk(e);this.realtimeUrl=`${o}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${o}/auth/v1`,this.storageUrl=`${o}/storage/v1`,this.functionsUrl=`${o}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,d={db:JC,realtime:ek,auth:Object.assign(Object.assign({},QC),{storageKey:l}),global:ZC},c=ok(r!=null?r:{},d);this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(u,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((s=c.auth)!==null&&s!==void 0?s:{},this.headers,c.global.fetch),this.fetch=nk(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new bC(`${o}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),c.accessToken||this._listenForAuthEvents()}get functions(){return new Y5(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new XC(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return Hk(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(t=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&t!==void 0?t:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,storageKey:a,flowType:s,lock:o,debug:l},d,c){var u;const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new jk({url:this.authUrl,headers:Object.assign(Object.assign({},f),d),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,flowType:s,lock:o,debug:l,fetch:c,hasCustomAuthorizationHeader:(u="Authorization"in this.headers)!==null&&u!==void 0?u:!1})}_initRealtimeClient(e){return new PC(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,r)=>{this._handleTokenChanged(t,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r!=null?r:null),this.changedAccessToken=r):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const Wk=(i,e,t)=>new Vk(i,e,t),qk=Wk("https://xovkkfhojasbjinfslpx.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhvdmtrZmhvamFzYmppbmZzbHB4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTM1ODQ0ODAsImV4cCI6MjAwOTE2MDQ4MH0.L3-X0p_un0oSTNubPwtfGo0D8g2bkPIfz7CaZ-iRYXY");function Xk(i){return se(this,null,function*(){const{error:e}=yield qk.from("metrics").insert(i);return e})}var d0=[],ko=[];function Yk(i,e){if(i&&typeof document!="undefined"){var t,r=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var s=d0.indexOf(a);s===-1&&(s=d0.push(a)-1,ko[s]={}),t=ko[s]&&ko[s][r]?ko[s][r]:ko[s][r]=o()}else t=o();i.charCodeAt(0)===65279&&(i=i.substring(1)),t.styleSheet?t.styleSheet.cssText+=i:t.appendChild(document.createTextNode(i))}function o(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var d=Object.keys(e.attributes),c=0;ci.id,nodeLabelClassName:void 0,nodeLabelColor:void 0,hoveredNodeLabelClassName:void 0,hoveredNodeLabelColor:void 0,onSetData:void 0,onNodesFiltered:void 0,onLinksFiltered:void 0,onLabelClick:void 0};let Df=Fs,u0=Fs,f0=Fs,h_=p_,m_=g_;typeof Uint8Array!="undefined"&&(Df=function(i){return new Uint8Array(i)},u0=function(i){return new Uint16Array(i)},f0=function(i){return new Uint32Array(i)},h_=function(i,e){if(i.length>=e)return i;var t=new i.constructor(e);return t.set(i),t},m_=function(i,e){var t;switch(e){case 16:t=u0(i.length);break;case 32:t=f0(i.length);break;default:throw new Error("invalid array width!")}return t.set(i),t});function Fs(i){for(var e=new Array(i),t=-1;++t32)throw new Error("invalid array width!");return i}function Tn(i){this.length=i,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=Df(i)}Tn.prototype.lengthen=function(i){var e,t;for(e=0,t=this.subarrays;e>>0,!(e>=32&&!t))return e<32&&t&1<=i;r--)this[e][r]=0;this.length=i};Tn.prototype.zero=function(i){var e,t;for(e=0,t=this.subarrays;e>>0),a!=(s===r?n:0))return!1;return!0};const ua={array8:Fs,array16:Fs,array32:Fs,arrayLengthen:p_,arrayWiden:g_,bitarray:Tn},Zk=(i,e)=>function(t){var r=t.length;return[i.left(t,e,0,r),i.right(t,e,0,r)]},Jk=(i,e)=>{var t=e[0],r=e[1];return function(n){var a=n.length;return[i.left(n,t,0,a),i.left(n,r,0,a)]}},Qk=i=>[0,i.length],Es={filterExact:Zk,filterRange:Jk,filterAll:Qk},Ko=i=>i,pn=()=>null,rd=()=>0;function v_(i){function e(n,a,s){for(var o=s-a,l=(o>>>1)+1;--l>0;)r(n,l,o,a);return n}function t(n,a,s){for(var o=s-a,l;--o>0;)l=n[a],n[a]=n[a+o],n[a+o]=l,r(n,1,o,a);return n}function r(n,a,s,o){for(var l=n[--o+a],d=i(l),c;(c=a<<1)<=s&&(ci(n[o+c+1])&&c++,!(d<=i(n[o+c])));)n[o+a]=n[o+c],a=c;n[o+a]=l}return e.sort=t,e}const ec=v_(Ko);ec.by=v_;function __(i){var e=ec.by(i);function t(r,n,a,s){var o=new Array(s=Math.min(a-n,s)),l,d,c;for(d=0;dl&&(o[0]=c,l=i(e(o,0,s)[0]));while(++n>>1;i(r[o])>>1;n{for(var r=0,n=e.length,a=t?JSON.parse(JSON.stringify(i)):new Array(n);ri+1,t6=i=>i-1,i6=i=>function(e,t){return e+ +i(t)},r6=i=>function(e,t){return e-i(t)},na={reduceIncrement:e6,reduceDecrement:t6,reduceAdd:i6,reduceSubtract:r6};function n6(i,e,t,r,n){for(n in r=(t=t.split(".")).splice(-1,1),t)e=e[t[n]]=e[t[n]]||{};return i(e,r)}const a6=(i,e)=>{const t=i[e];return typeof t=="function"?t.call(i):t},s6=/\[([\w\d]+)\]/g,o6=(i,e)=>n6(a6,i,e.replace(s6,".$1"));var aa=-1;nl.heap=ec;nl.heapselect=Mf;nl.bisect=Fd;nl.permute=fd;function nl(){var i={add:l,remove:d,dimension:f,groupAll:h,size:g,all:S,allFiltered:p,onChange:b,isElementFiltered:u},e=[],t=0,r,n=[],a=[],s=[],o=[];r=new ua.bitarray(0);function l(y){var v=t,L=y.length;return L&&(e=e.concat(y),r.lengthen(t+=L),a.forEach(function(z){z(y,v,L)}),T("dataAdded")),i}function d(y){for(var v=new Array(t),L=[],z=typeof y=="function",I=function(ie){return z?y(e[ie],ie):r.zero(ie)},O=0,W=0;O>7]&=~(1<<(I&63));return O}function u(y,v){var L=c(v||[]);return r.zeroExceptMask(y,L)}function f(y,v){if(typeof y=="string"){var L=y;y=function(it){return o6(it,L)}}var z={filter:Ct,filterExact:Qt,filterRange:ui,filterFunction:Et,filterAll:ht,currentFilter:at,hasCurrentFilter:gt,top:ei,bottom:E,group:K,groupAll:bi,dispose:Xa,remove:Xa,accessor:y,id:function(){return he}},I,O,W,he,ne,ie,P,C,Y,U,ee=[],Fe=function(it){return Tu(it).sort(function(nt,pe){var ae=P[nt],kt=P[pe];return aekt?1:nt-pe})},xe=Es.filterAll,ke,Ge,Ye,ce=[],ft=[],yt=0,ot=0,xt=0,ge;a.unshift(Qe),a.push(lt),s.push(we);var oe=r.add();W=oe.offset,I=oe.one,O=~I,he=W<<7|Math.log(I)/Math.log(2),Qe(e,0,t),lt(e,0,t);function Qe(it,nt,pe){var ae,kt;if(v){xt=0,pr=0,ge=[];for(var dt=0;dtyt)for(ae=yt,kt=Math.min(nt,ot);aeot)for(ae=Math.max(nt,ot),kt=pe;ae0&&(dt=nt);--ae>=yt&&it>0;)r.zero(kt=ie[ae])&&(dt>0?--dt:(pe.push(e[kt]),--it));if(v)for(ae=0;ae0;ae++)r.zero(kt=ee[ae])&&(dt>0?--dt:(pe.push(e[kt]),--it));return pe}function E(it,nt){var pe=[],ae,kt,dt=0;if(nt&&nt>0&&(dt=nt),v)for(ae=0;ae0;ae++)r.zero(kt=ee[ae])&&(dt>0?--dt:(pe.push(e[kt]),--it));for(ae=yt;ae0;)r.zero(kt=ie[ae])&&(dt>0?--dt:(pe.push(e[kt]),--it)),ae++;return pe}function K(it){var nt={top:tc,all:Ki,reduce:Zs,reduceCount:al,reduceSum:ic,order:sl,orderNatural:ol,size:ll,dispose:yi,remove:yi};ft.push(nt);var pe,ae,kt=8,dt=h0(kt),ct=0,ai,Wt,Fi,Ci,br,Ti=pn,si=pn,Yi=!0,Ar=it===pn,Yr;arguments.length<1&&(it=Ko),n.push(Ti),ce.push(An),s.push(pa),An(ne,ie,0,t);function An(rt,Mt,Vt,zi){v&&(Yr=Vt,Vt=ne.length-rt.length,zi=rt.length);var Bt=pe,Rt=v?[]:La(ct,dt),qt=Fi,oi=Ci,Zi=br,tr=ct,ir=0,In=0,jr,Xn,Ya,Cn,kn,Js;for(Yi&&(qt=Zi=pn),Yi&&(oi=Zi=pn),pe=new Array(ct),ct=0,v?ae=tr?ae:[]:ae=tr>1?ua.arrayLengthen(ae,t):La(t,dt),tr&&(Ya=(Xn=Bt[0]).key);In=Cn);)++In;for(;In=zi));)Cn=it(rt[In]);dl()}for(;irir)if(v)for(ir=0;ir1||v?(Ti=qn,si=ga):(!ct&&Ar&&(ct=1,pe=[{key:null,value:Zi()}]),ct===1?(Ti=fi,si=pr):(Ti=pn,si=pn),ae=null),n[jr]=Ti;function dl(){if(v){ct++;return}++ct===dt&&(Rt=ua.arrayWiden(Rt,kt<<=1),ae=ua.arrayWiden(ae,kt),dt=h0(kt))}}function pa(rt){if(ct>1||v){var Mt=ct,Vt=pe,zi=La(Mt,Mt),Bt,Rt,qt;if(v){for(Bt=0,qt=0;Bt1||v)if(v)for(Bt=0;Bt1||v?(si=ga,Ti=qn):ct===1?(si=pr,Ti=fi):si=Ti=pn}else if(ct===1){if(Ar)return;for(var oi=0;oi=0&&n.splice(rt,1),rt=ce.indexOf(An),rt>=0&&ce.splice(rt,1),rt=s.indexOf(pa),rt>=0&&s.splice(rt,1),rt=ft.indexOf(nt),rt>=0&&ft.splice(rt,1),nt}return al().orderNatural()}function bi(){var it=K(pn),nt=it.all;return delete it.all,delete it.top,delete it.order,delete it.orderNatural,delete it.size,it.value=function(){return nt()[0].value},it}function Xa(){ft.forEach(function(nt){nt.dispose()});var it=a.indexOf(Qe);return it>=0&&a.splice(it,1),it=a.indexOf(lt),it>=0&&a.splice(it,1),it=s.indexOf(we),it>=0&&s.splice(it,1),r.masks[W]&=O,ht()}return z}function h(){var y={reduce:ie,reduceCount:P,reduceSum:C,value:Y,dispose:U,remove:U},v,L,z,I,O=!0;n.push(he),a.push(W),W(e,0);function W(ee,Fe){var xe;if(!O)for(xe=Fe;xe=0&&n.splice(ee,1),ee=a.indexOf(W),ee>=0&&a.splice(ee,1),y}return P()}function g(){return t}function S(){return e}function p(y){var v=[],L=0,z=c(y||[]);for(L=0;L{var r,n,a;switch(t){case"filtered":(r=this.onFiltered)===null||r===void 0||r.call(this),this._filters.forEach(s=>{var o;(o=s.onFiltered)===null||o===void 0||o.call(s)});break;case"dataAdded":(n=this.onDataAdded)===null||n===void 0||n.call(this),this._filters.forEach(s=>{var o;(o=s.onDataAdded)===null||o===void 0||o.call(s)});break;case"dataRemoved":(a=this.onDataRemoved)===null||a===void 0||a.call(this),this._filters.forEach(s=>{var o;(o=s.onDataRemoved)===null||o===void 0||o.call(s)})}})}addRecords(e){const{_crossfilter:t}=this;this._records=e,t.remove(),t.add(e)}getFilteredRecords(e){const{_crossfilter:t}=this;return(e==null?void 0:e.getFilteredRecords())||t.allFiltered()}addFilter(e=!0){const t=new l6(this._crossfilter,()=>{this._filters.delete(t)},e?this._syncUpFunction:void 0);return this._filters.add(t),t}clearFilters(){this._filters.forEach(e=>{e.clear()})}isAnyFiltersActive(e){for(const t of this._filters.values())if(t!==e&&t.isActive())return!0;return!1}getAllRecords(){return this._records}}class d6{constructor(e,t){var r;this._data={nodes:[],links:[]},this._previousData={nodes:[],links:[]},this._cosmographConfig={},this._cosmosConfig={},this._nodesForTopLabels=new Set,this._nodesForForcedLabels=new Set,this._trackedNodeToLabel=new Map,this._isLabelsDestroyed=!1,this._svgParser=new DOMParser,this._nodesCrossfilter=new m0(this._applyLinksFilter.bind(this)),this._linksCrossfilter=new m0(this._applyNodesFilter.bind(this)),this._nodesFilter=this._nodesCrossfilter.addFilter(!1),this._linksFilter=this._linksCrossfilter.addFilter(!1),this._selectedNodesFilter=this._nodesCrossfilter.addFilter(),this._isDataDifferent=()=>{const a=JSON.stringify(this._data.nodes),s=JSON.stringify(this._previousData.nodes),o=JSON.stringify(this._data.links),l=JSON.stringify(this._previousData.links);return a!==s||o!==l},this._onClick=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onClick)===null||o===void 0||o.call(s,...a)},this._onLabelClick=(a,s)=>{var o,l,d;const c=(o=this._cosmos)===null||o===void 0?void 0:o.graph.getNodeById(s.id);c&&((d=(l=this._cosmographConfig).onLabelClick)===null||d===void 0||d.call(l,c,a))},this._onHoveredNodeClick=a=>{var s,o;this._hoveredNode&&((o=(s=this._cosmographConfig).onLabelClick)===null||o===void 0||o.call(s,this._hoveredNode,a))},this._onNodeMouseOver=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onNodeMouseOver)===null||o===void 0||o.call(s,...a);const[l,,d]=a;this._hoveredNode=l,this._renderLabelForHovered(l,d)},this._onNodeMouseOut=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onNodeMouseOut)===null||o===void 0||o.call(s,...a),this._renderLabelForHovered()},this._onMouseMove=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onMouseMove)===null||o===void 0||o.call(s,...a);const[l,,d]=a;this._renderLabelForHovered(l,d)},this._onZoomStart=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onZoomStart)===null||o===void 0||o.call(s,...a)},this._onZoom=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onZoom)===null||o===void 0||o.call(s,...a),this._renderLabelForHovered(),this._renderLabels()},this._onZoomEnd=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onZoomEnd)===null||o===void 0||o.call(s,...a)},this._onStart=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationStart)===null||o===void 0||o.call(s,...a)},this._onTick=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationTick)===null||o===void 0||o.call(s,...a),this._renderLabels()},this._onEnd=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationEnd)===null||o===void 0||o.call(s,...a)},this._onPause=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationPause)===null||o===void 0||o.call(s,...a)},this._onRestart=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationRestart)===null||o===void 0||o.call(s,...a)},this._containerNode=e,this._containerNode.classList.add($o.cosmograph),this._cosmographConfig=yn(c0,t!=null?t:{}),this._cosmosConfig=this._createCosmosConfig(t),this._canvasElement=document.createElement("canvas"),this._labelsDivElement=document.createElement("div"),this._watermarkDivElement=document.createElement("div"),this._watermarkDivElement.classList.add($o.watermark),this._watermarkDivElement.onclick=()=>{var a;return(a=window.open("https://cosmograph.app/","_blank"))===null||a===void 0?void 0:a.focus()},e.appendChild(this._canvasElement),e.appendChild(this._labelsDivElement),e.appendChild(this._watermarkDivElement),this._cssLabelsRenderer=new IT(this._labelsDivElement,{dispatchWheelEventElement:this._canvasElement,pointerEvents:"all",onLabelClick:this._onLabelClick.bind(this)}),this._hoveredCssLabel=new xv(this._labelsDivElement),this._hoveredCssLabel.setPointerEvents("all"),this._hoveredCssLabel.element.addEventListener("click",this._onHoveredNodeClick.bind(this)),this._linksFilter.setAccessor(a=>[a.source,a.target]),this._nodesFilter.setAccessor(a=>a.id),this._selectedNodesFilter.setAccessor(a=>a.id),this._nodesCrossfilter.onFiltered=()=>{var a,s,o,l;let d;this._nodesCrossfilter.isAnyFiltersActive()?(d=this._nodesCrossfilter.getFilteredRecords(),(a=this._cosmos)===null||a===void 0||a.selectNodesByIds(d.map(c=>c.id))):(s=this._cosmos)===null||s===void 0||s.unselectNodes(),this._updateSelectedNodesSet(d),(l=(o=this._cosmographConfig).onNodesFiltered)===null||l===void 0||l.call(o,d)},this._linksCrossfilter.onFiltered=()=>{var a,s;let o;this._linksCrossfilter.isAnyFiltersActive()&&(o=this._linksCrossfilter.getFilteredRecords()),(s=(a=this._cosmographConfig).onLinksFiltered)===null||s===void 0||s.call(a,o)};const n=this._svgParser.parseFromString(U5,"image/svg+xml").firstChild;(r=this._watermarkDivElement)===null||r===void 0||r.appendChild(n)}get data(){return this._data}get progress(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.progress}get isSimulationRunning(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.isSimulationRunning}get maxPointSize(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.maxPointSize}setData(e,t,r=!0){var n,a,s,o;const{_cosmographConfig:l}=this;this._data={nodes:e,links:t};const d=l.disableSimulation===null?!t.length:l.disableSimulation;this._cosmos||(this._disableSimulation=d,this._cosmosConfig.disableSimulation=this._disableSimulation,this._cosmos=new ST(this._canvasElement,this._cosmosConfig),this.cosmos=this._cosmos),this._disableSimulation!==d&&console.warn(`The \`disableSimulation\` was initialized to \`${this._disableSimulation}\` during initialization and will not be modified.`),this._cosmos.setData(e,t,r),this._nodesCrossfilter.addRecords(e),this._linksCrossfilter.addRecords(t),this._updateLabels(),(a=(n=this._cosmographConfig).onSetData)===null||a===void 0||a.call(n,e,t),this._isDataDifferent()&&(["cosmograph.app"].includes(window.location.hostname)||Xk({browser:navigator.userAgent,hostname:window.location.hostname,mode:null,is_library_metric:!0,links_count:t.length,links_have_time:null,links_raw_columns:t.length&&(s=Object.keys(t==null?void 0:t[0]).length)!==null&&s!==void 0?s:0,links_raw_lines:null,nodes_count:e.length,nodes_have_time:null,nodes_raw_columns:e.length&&(o=Object.keys(e==null?void 0:e[0]).length)!==null&&o!==void 0?o:0,nodes_raw_lines:null})),this._previousData={nodes:e,links:t}}setConfig(e){var t,r;if(this._cosmographConfig=yn(c0,e!=null?e:{}),this._cosmosConfig=this._createCosmosConfig(e),(t=this._cosmos)===null||t===void 0||t.setConfig(this._cosmosConfig),e==null?void 0:e.backgroundColor){const n=(r=Gn(e==null?void 0:e.backgroundColor))===null||r===void 0?void 0:r.formatHex();if(n){const a=this._checkBrightness(n),s=document.querySelector(":root");a>.65?s==null||s.style.setProperty("--cosmograph-watermark-color","#000000"):s==null||s.style.setProperty("--cosmograph-watermark-color","#ffffff")}}this._updateLabels()}addNodesFilter(){return this._nodesCrossfilter.addFilter()}addLinksFilter(){return this._linksCrossfilter.addFilter()}selectNodesInRange(e){var t;if(!this._cosmos)return;this._cosmos.selectNodesInRange(e);const r=new Set(((t=this.getSelectedNodes())!==null&&t!==void 0?t:[]).map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>r.has(n))}selectNodes(e){if(!this._cosmos)return;const t=new Set(e.map(r=>r.id));this._selectedNodesFilter.applyFilter(r=>t.has(r))}selectNode(e,t=!1){if(!this._cosmos)return;const r=new Set([e,...t&&this._cosmos.getAdjacentNodes(e.id)||[]].map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>r.has(n))}unselectNodes(){this._cosmos&&this._selectedNodesFilter.clear()}getSelectedNodes(){if(this._cosmos)return this._cosmos.getSelectedNodes()}zoomToNode(e){this._cosmos&&this._cosmos.zoomToNodeById(e.id)}setZoomLevel(e,t=0){this._cosmos&&this._cosmos.setZoomLevel(e,t)}getZoomLevel(){if(this._cosmos)return this._cosmos.getZoomLevel()}getNodePositions(){if(this._cosmos)return this._cosmos.getNodePositions()}getNodePositionsMap(){if(this._cosmos)return this._cosmos.getNodePositionsMap()}getNodePositionsArray(){if(this._cosmos)return this._cosmos.getNodePositionsArray()}fitView(e=250){this._cosmos&&this._cosmos.fitView(e)}fitViewByNodeIds(e,t=250){this._cosmos&&this._cosmos.fitViewByNodeIds(e,t)}focusNode(e){this._cosmos&&this._cosmos.setFocusedNodeById(e==null?void 0:e.id)}getAdjacentNodes(e){if(this._cosmos)return this._cosmos.getAdjacentNodes(e)}spaceToScreenPosition(e){if(this._cosmos)return this._cosmos.spaceToScreenPosition(e)}spaceToScreenRadius(e){if(this._cosmos)return this._cosmos.spaceToScreenRadius(e)}getNodeRadiusByIndex(e){if(this._cosmos)return this._cosmos.getNodeRadiusByIndex(e)}getNodeRadiusById(e){if(this._cosmos)return this._cosmos.getNodeRadiusById(e)}getSampledNodePositionsMap(){if(this._cosmos)return this._cosmos.getSampledNodePositionsMap()}start(e=1){this._cosmos&&this._cosmos.start(e)}pause(){this._cosmos&&this._cosmos.pause()}restart(){this._cosmos&&this._cosmos.restart()}step(){this._cosmos&&this._cosmos.step()}remove(){var e;(e=this._cosmos)===null||e===void 0||e.destroy(),this._isLabelsDestroyed||(this._containerNode.innerHTML="",this._isLabelsDestroyed=!0,this._hoveredCssLabel.element.removeEventListener("click",this._onHoveredNodeClick.bind(this)),this._hoveredCssLabel.destroy(),this._cssLabelsRenderer.destroy())}create(){this._cosmos&&this._cosmos.create()}getNodeDegrees(){if(this._cosmos)return this._cosmos.graph.degree}_createCosmosConfig(e){const t=vo(wi({},e),{simulation:vo(wi({},Object.keys(e!=null?e:{}).filter(r=>r.indexOf("simulation")!==-1).reduce((r,n)=>{const a=n.replace("simulation","");return r[a.charAt(0).toLowerCase()+a.slice(1)]=e==null?void 0:e[n],r},{})),{onStart:this._onStart.bind(this),onTick:this._onTick.bind(this),onEnd:this._onEnd.bind(this),onPause:this._onPause.bind(this),onRestart:this._onRestart.bind(this)}),events:{onClick:this._onClick.bind(this),onNodeMouseOver:this._onNodeMouseOver.bind(this),onNodeMouseOut:this._onNodeMouseOut.bind(this),onMouseMove:this._onMouseMove.bind(this),onZoomStart:this._onZoomStart.bind(this),onZoom:this._onZoom.bind(this),onZoomEnd:this._onZoomEnd.bind(this)}});return delete t.disableSimulation,t}_updateLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,data:{nodes:t},_cosmographConfig:{showTopLabels:r,showTopLabelsLimit:n,showLabelsFor:a,showTopLabelsValueKey:s,nodeLabelAccessor:o}}=this;if(this._nodesForTopLabels.clear(),r&&n){let l;l=s?[...t].sort((d,c)=>{const u=d[s],f=c[s];return typeof u=="number"&&typeof f=="number"?f-u:0}):Object.entries(e.graph.degree).sort((d,c)=>c[1]-d[1]).slice(0,n).map(d=>e.graph.getNodeByIndex(+d[0]));for(let d=0;d=t.length);d++){const c=l[d];c&&this._nodesForTopLabels.add(c)}}this._nodesForForcedLabels.clear(),a==null||a.forEach(this._nodesForForcedLabels.add,this._nodesForForcedLabels),this._trackedNodeToLabel.clear(),e.trackNodePositionsByIds([...r?this._nodesForTopLabels:[],...this._nodesForForcedLabels].map(l=>{var d;return this._trackedNodeToLabel.set(l,(d=o==null?void 0:o(l))!==null&&d!==void 0?d:l.id),l.id})),this._renderLabels()}_updateSelectedNodesSet(e){this._isLabelsDestroyed||(e?(this._selectedNodesSet=new Set,e==null||e.forEach(this._selectedNodesSet.add,this._selectedNodesSet)):this._selectedNodesSet=void 0,this._renderLabels())}_renderLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,_selectedNodesSet:t,_cosmographConfig:{showDynamicLabels:r,nodeLabelAccessor:n,nodeLabelColor:a,nodeLabelClassName:s}}=this;let o=[];const l=e.getTrackedNodePositionsMap(),d=new Map;if(r){const c=this.getSampledNodePositionsMap();c==null||c.forEach((u,f)=>{var h;const g=e.graph.getNodeById(f);g&&d.set(g,[(h=n==null?void 0:n(g))!==null&&h!==void 0?h:g.id,u,$o.cosmographShowDynamicLabels,.7])})}this._nodesForTopLabels.forEach(c=>{d.set(c,[this._trackedNodeToLabel.get(c),l.get(c.id),$o.cosmographShowTopLabels,.9])}),this._nodesForForcedLabels.forEach(c=>{d.set(c,[this._trackedNodeToLabel.get(c),l.get(c.id),$o.cosmographShowLabelsFor,1])}),o=[...d.entries()].map(([c,[u,f,h,g]])=>{var S,p,b;const T=this.spaceToScreenPosition([(S=f==null?void 0:f[0])!==null&&S!==void 0?S:0,(p=f==null?void 0:f[1])!==null&&p!==void 0?p:0]),y=this.spaceToScreenRadius(e.config.nodeSizeScale*this.getNodeRadiusById(c.id)),v=!!t,L=t==null?void 0:t.has(c);return{id:c.id,text:u!=null?u:"",x:T[0],y:T[1]-(y+2),weight:v&&!L?.1:g,shouldBeShown:this._nodesForForcedLabels.has(c),style:v&&!L?"opacity: 0.1;":"",color:a&&(typeof a=="string"?a:a==null?void 0:a(c)),className:(b=typeof s=="string"?s:s==null?void 0:s(c))!==null&&b!==void 0?b:h}}),this._cssLabelsRenderer.setLabels(o),this._cssLabelsRenderer.draw(!0)}_renderLabelForHovered(e,t){var r,n;if(!this._cosmos)return;const{_cosmographConfig:{showHoveredNodeLabel:a,nodeLabelAccessor:s,hoveredNodeLabelClassName:o,hoveredNodeLabelColor:l}}=this;if(!this._isLabelsDestroyed){if(a&&e&&t){const d=this.spaceToScreenPosition(t),c=this.spaceToScreenRadius(this.getNodeRadiusById(e.id));this._hoveredCssLabel.setText((r=s==null?void 0:s(e))!==null&&r!==void 0?r:e.id),this._hoveredCssLabel.setVisibility(!0),this._hoveredCssLabel.setPosition(d[0],d[1]-(c+2)),this._hoveredCssLabel.setClassName(typeof o=="string"?o:(n=o==null?void 0:o(e))!==null&&n!==void 0?n:"");const u=l&&(typeof l=="string"?l:l==null?void 0:l(e));u&&this._hoveredCssLabel.setColor(u)}else this._hoveredCssLabel.setVisibility(!1);this._hoveredCssLabel.draw()}}_applyLinksFilter(){if(this._nodesCrossfilter.isAnyFiltersActive(this._nodesFilter)){const e=this._nodesCrossfilter.getFilteredRecords(this._nodesFilter),t=new Set(e.map(r=>r.id));this._linksFilter.applyFilter(r=>{const n=r==null?void 0:r[0],a=r==null?void 0:r[1];return t.has(n)&&t.has(a)})}else this._linksFilter.clear()}_applyNodesFilter(){if(this._linksCrossfilter.isAnyFiltersActive(this._linksFilter)){const e=this._linksCrossfilter.getFilteredRecords(this._linksFilter),t=new Set(e.map(r=>[r.source,r.target]).flat());this._nodesFilter.applyFilter(r=>t.has(r))}else this._nodesFilter.clear()}_checkBrightness(e){const t=(r=>{const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return n?{r:parseInt((n[1]||0).toString(),16),g:parseInt((n[2]||0).toString(),16),b:parseInt((n[3]||0).toString(),16)}:{r:0,g:0,b:0}})(e);return(.2126*t.r+.7152*t.g+.0722*t.b)/255}}const p0={onSelectResult:void 0,accessors:void 0};class c6{constructor(e,t,r){this._config={},this._data=[],this._defaultAccessors=[],this._createDefaultAccessorOptions=n=>n.length>0&&n[0]?Object.keys(n[0]).map(a=>({label:a,accessor:s=>String(s[a])})):[{label:"id",accessor:a=>a.id}],this._onSelect=(...n)=>{this._onSelectResult(...n)},this._onSearch=(...n)=>{var a,s;(s=(a=this._config).onSearch)===null||s===void 0||s.call(a,...n)},this._onEnter=(...n)=>{var a,s;(s=(a=this._config).onEnter)===null||s===void 0||s.call(a,...n)},this._onAccessorSelect=(...n)=>{var a,s;(s=(a=this._config).onAccessorSelect)===null||s===void 0||s.call(a,...n)},this._cosmograph=e,this._config=yn(p0,r!=null?r:{}),this.search=new B5(t,this._createSearchConfig(r)),this._filter=this._cosmograph.addNodesFilter(),this._filter.onDataAdded=()=>{this._updateData()},this._updateData()}setConfig(e){const t=yn(p0,e!=null?e:{});this._data.length&&t.accessors===void 0&&(t.accessors=this._defaultAccessors),this.search.setConfig(this._createSearchConfig(t)),this._config=t}_updateData(){const e=this._cosmograph.data.nodes;e!=null&&e.length&&(this._data=e,this.search.setData(this._data),this._config.accessors===void 0&&(this._defaultAccessors=this._createDefaultAccessorOptions(this._data),this.setConfig({accessors:this._defaultAccessors})))}getConfig(){return this._config}remove(){this.search.destroy()}setListState(e){this.search.setListState(e)}clearInput(){this.search.clearInput()}_onSelectResult(e){var t,r;this._cosmograph.pause(),this._cosmograph.zoomToNode(e),this._cosmograph.selectNode(e),(r=(t=this._config).onSelectResult)===null||r===void 0||r.call(t,e)}_createSearchConfig(e){return vo(wi({},e),{events:{onSelect:this._onSelect.bind(this),onSearch:this._onSearch.bind(this),onEnter:this._onEnter.bind(this),onAccessorSelect:this._onAccessorSelect.bind(this)}})}}var Zo;(function(i){i.Nodes="nodes",i.Links="links"})(Zo||(Zo={}));const g0={accessor:i=>i.date,filterType:Zo.Links};class u6{constructor(e,t,r){this._config={},this.playAnimation=()=>{this.timeline.playAnimation()},this.pauseAnimation=()=>{this.timeline.pauseAnimation()},this.stopAnimation=()=>{this.timeline.stopAnimation()},this._onBrush=(n,a)=>{var s,o;this._applyFilter(n),(o=(s=this._config).onSelection)===null||o===void 0||o.call(s,n,a)},this._onBarHover=(...n)=>{var a,s;(s=(a=this._config).onBarHover)===null||s===void 0||s.call(a,...n)},this._onAnimationPlay=(...n)=>{var a,s;(s=(a=this._config).onAnimationPlay)===null||s===void 0||s.call(a,...n)},this._onAnimationPause=(...n)=>{var a,s;(s=(a=this._config).onAnimationPause)===null||s===void 0||s.call(a,...n)},this._config=yn(g0,r!=null?r:{}),this.timeline=new LA(t,this._createTimelineConfig(r)),this._cosmograph=e,this._filter=this._config.filterType===Zo.Nodes?this._cosmograph.addNodesFilter():this._cosmograph.addLinksFilter(),this._filter.onDataAdded=()=>{this._updateData()},this._updateDimension(),this._updateData()}setConfig(e){var t,r;const n=yn(g0,e!=null?e:{});this.timeline.setConfig(this._createTimelineConfig(e)),((t=this._config.accessor)===null||t===void 0?void 0:t.toString())!==((r=n.accessor)===null||r===void 0?void 0:r.toString())&&this._updateData(),this._config=n}getCurrentSelection(){return this.timeline.getCurrentSelection()}getCurrentSelectionInPixels(){return this.timeline.getCurrentSelectionInPixels()}getBarWidth(){return this.timeline.getBarWidth()}getIsAnimationRunning(){return this.timeline.getIsAnimationRunning()}setSelection(e){this.timeline.setSelection(e)}setSelectionInPixels(e){this.timeline.setSelectionInPixels(e)}_updateData(){const e=this._filter.getAllValues();e&&this.timeline.setTimeData(e),this.timeline.render(),this.timeline.resize()}_updateDimension(){const{_config:{accessor:e},_filter:t}=this;t.setAccessor(e)}_applyFilter(e){const{_filter:t}=this;e?t.applyFilter(r=>r>=e[0]&&r<=e[1]):t.clear()}getConfig(){return this._config}remove(){this.timeline.destroy()}_createTimelineConfig(e){return vo(wi({},e),{events:{onBrush:this._onBrush.bind(this),onBarHover:this._onBarHover.bind(this),onAnimationPlay:this._onAnimationPlay.bind(this),onAnimationPause:this._onAnimationPause.bind(this)}})}}Zo.Nodes;var v0={},Au={},Iu=34,Lo=10,Cu=13;function y_(i){return new Function("d","return {"+i.map(function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'}).join(",")+"}")}function f6(i,e){var t=y_(i);return function(r,n){return e(t(r),n,i)}}function _0(i){var e=Object.create(null),t=[];return i.forEach(function(r){for(var n in r)n in e||t.push(e[n]=n)}),t}function Lr(i,e){var t=i+"",r=t.length;return r9999?"+"+Lr(i,6):Lr(i,4)}function m6(i){var e=i.getUTCHours(),t=i.getUTCMinutes(),r=i.getUTCSeconds(),n=i.getUTCMilliseconds();return isNaN(i)?"Invalid Date":h6(i.getUTCFullYear())+"-"+Lr(i.getUTCMonth()+1,2)+"-"+Lr(i.getUTCDate(),2)+(n?"T"+Lr(e,2)+":"+Lr(t,2)+":"+Lr(r,2)+"."+Lr(n,3)+"Z":r?"T"+Lr(e,2)+":"+Lr(t,2)+":"+Lr(r,2)+"Z":t||e?"T"+Lr(e,2)+":"+Lr(t,2)+"Z":"")}function p6(i){var e=new RegExp('["'+i+` -\r]`),t=i.charCodeAt(0);function r(u,f){var h,g,S=n(u,function(p,b){if(h)return h(p,b-1);g=p,h=f?f6(p,f):y_(p)});return S.columns=g||[],S}function n(u,f){var h=[],g=u.length,S=0,p=0,b,T=g<=0,y=!1;u.charCodeAt(g-1)===Lo&&--g,u.charCodeAt(g-1)===Cu&&--g;function v(){if(T)return Au;if(y)return y=!1,v0;var z,I=S,O;if(u.charCodeAt(I)===Iu){for(;S++=g?T=!0:(O=u.charCodeAt(S++))===Lo?y=!0:O===Cu&&(y=!0,u.charCodeAt(S)===Lo&&++S),u.slice(I+1,z-1).replace(/""/g,'"')}for(;S{const t=i.map(d=>({source:parseInt(d.source),target:parseInt(d.target),date:Date.parse(d.date)})),r=e.map(d=>({id:parseInt(d.id),label:d.label,color:d.color})),n=document.getElementById("app");A6.classList.add("visually-hidden"),I6.style.visibility="visible",T6.classList.add("visually-hidden"),n.appendChild(b0);const a=document.createElement("div");n.appendChild(a);const s={nodeColor:d=>d.color,nodeLabelAccessor:d=>d.label,showTopLabels:!0,showDynamicLabels:!1,linkGreyoutOpacity:0,nodeLabelColor:"white",hoveredNodeLabelColor:"white",linkWidth:1,linkArrows:!1,onClick:d=>alert(d.label)},o=new d6(b0,s),l=document.createElement("div");new u6(o,l),new c6(o,a),o.setData(r,t),n.appendChild(l)});export{V0 as g}; diff --git a/static/vite/main-Dnusw_Zv.js b/static/vite/main-Dnusw_Zv.js new file mode 100644 index 0000000..f836844 --- /dev/null +++ b/static/vite/main-Dnusw_Zv.js @@ -0,0 +1,899 @@ +var mb=Object.defineProperty,pb=Object.defineProperties;var gb=Object.getOwnPropertyDescriptors;var Uh=Object.getOwnPropertySymbols;var vb=Object.prototype.hasOwnProperty,_b=Object.prototype.propertyIsEnumerable;var jh=(i,e,t)=>e in i?mb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,on=(i,e)=>{for(var t in e||(e={}))vb.call(e,t)&&jh(i,t,e[t]);if(Uh)for(var t of Uh(e))_b.call(e,t)&&jh(i,t,e[t]);return i},Xo=(i,e)=>pb(i,gb(e));var Y=(i,e,t)=>new Promise((r,n)=>{var a=l=>{try{o(t.next(l))}catch(d){n(d)}},s=l=>{try{o(t.throw(l))}catch(d){n(d)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);o((t=t.apply(i,e)).next())});var Mc="http://www.w3.org/1999/xhtml";const Hh={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bl(i){var e=i+="",t=e.indexOf(":");return t>=0&&(e=i.slice(0,t))!=="xmlns"&&(i=i.slice(t+1)),Hh.hasOwnProperty(e)?{space:Hh[e],local:i}:i}function bb(i){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Mc&&e.documentElement.namespaceURI===Mc?e.createElement(i):e.createElementNS(t,i)}}function yb(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function Xp(i){var e=Bl(i);return(e.local?yb:bb)(e)}function xb(){}function vu(i){return i==null?xb:function(){return this.querySelector(i)}}function wb(i){typeof i!="function"&&(i=vu(i));for(var e=this._groups,t=e.length,r=new Array(t),n=0;n=U&&(U=$+1);!(M=I[U])&&++U=0;)(s=r[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Xb(i){i||(i=qb);function e(u,h){return u&&h?i(u.__data__,h.__data__):!u-!h}for(var t=this._groups,r=t.length,n=new Array(r),a=0;ae?1:i>=e?0:NaN}function Yb(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function Kb(){return Array.from(this)}function Zb(){for(var i=this._groups,e=0,t=i.length;e1?this.each((e==null?ly:typeof e=="function"?cy:dy)(i,e,t==null?"":t)):Ba(this.node(),i)}function Ba(i,e){return i.style.getPropertyValue(e)||Jp(i).getComputedStyle(i,null).getPropertyValue(e)}function fy(i){return function(){delete this[i]}}function hy(i,e){return function(){this[i]=e}}function my(i,e){return function(){var t=e.apply(this,arguments);t==null?delete this[i]:this[i]=t}}function py(i,e){return arguments.length>1?this.each((e==null?fy:typeof e=="function"?my:hy)(i,e)):this.node()[i]}function Qp(i){return i.trim().split(/^|\s+/)}function _u(i){return i.classList||new eg(i)}function eg(i){this._node=i,this._names=Qp(i.getAttribute("class")||"")}eg.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function tg(i,e){for(var t=_u(i),r=-1,n=e.length;++r=0&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function jy(i){return function(){var e=this.__on;if(e){for(var t=0,r=-1,n=e.length,a;t{}};function $l(){for(var i=0,e=arguments.length,t={},r;i=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}cl.prototype=$l.prototype={constructor:cl,on:function(i,e){var t=this._,r=Qy(i+"",t),n,a=-1,s=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(n),r=0,n,a;r=0&&i._call.call(void 0,e),i=i._next;--$a}function Wh(){Xn=(xl=Hs.now())+Gl,$a=Fs=0;try{ix()}finally{$a=0,nx(),Xn=0}}function rx(){var i=Hs.now(),e=i-xl;e>ag&&(Gl-=e,xl=i)}function nx(){for(var i,e=yl,t,r=1/0;e;)e._call?(r>e._time&&(r=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:yl=t);Ds=i,Bc(r)}function Bc(i){if(!$a){Fs&&(Fs=clearTimeout(Fs));var e=i-Xn;e>24?(i<1/0&&(Fs=setTimeout(Wh,i-Hs.now()-Gl)),xs&&(xs=clearInterval(xs))):(xs||(xl=Hs.now(),xs=setInterval(rx,ag)),$a=1,sg(Wh))}}function Xh(i,e,t){var r=new wl;return e=e==null?0:+e,r.restart(n=>{r.stop(),i(n+e)},e,t),r}var ax=$l("start","end","cancel","interrupt"),sx=[],lg=0,qh=1,$c=2,ul=3,Yh=4,Gc=5,fl=6;function Ul(i,e,t,r,n,a){var s=i.__transition;if(!s)i.__transition={};else if(t in s)return;ox(i,t,{name:e,index:r,group:n,on:ax,tween:sx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:lg})}function yu(i,e){var t=hr(i,e);if(t.state>lg)throw new Error("too late; already scheduled");return t}function Er(i,e){var t=hr(i,e);if(t.state>ul)throw new Error("too late; already running");return t}function hr(i,e){var t=i.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function ox(i,e,t){var r=i.__transition,n;r[e]=t,t.timer=og(a,0,t.time);function a(d){t.state=qh,t.timer.restart(s,t.delay,t.time),t.delay<=d&&s(d-t.delay)}function s(d){var c,u,h,g;if(t.state!==qh)return l();for(c in r)if(g=r[c],g.name===t.name){if(g.state===ul)return Xh(s);g.state===Yh?(g.state=fl,g.timer.stop(),g.on.call("interrupt",i,i.__data__,g.index,g.group),delete r[c]):+c$c&&r.state>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=cx.exec(i))?new Vi(e[1],e[2],e[3],1):(e=ux.exec(i))?new Vi(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=fx.exec(i))?qo(e[1],e[2],e[3],e[4]):(e=hx.exec(i))?qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=mx.exec(i))?im(e[1],e[2]/100,e[3]/100,1):(e=px.exec(i))?im(e[1],e[2]/100,e[3]/100,e[4]):Kh.hasOwnProperty(i)?Qh(Kh[i]):i==="transparent"?new Vi(NaN,NaN,NaN,0):null}function Qh(i){return new Vi(i>>16&255,i>>8&255,i&255,1)}function qo(i,e,t,r){return r<=0&&(i=e=t=NaN),new Vi(i,e,t,r)}function _x(i){return i instanceof to||(i=Hr(i)),i?(i=i.rgb(),new Vi(i.r,i.g,i.b,i.opacity)):new Vi}function Uc(i,e,t,r){return arguments.length===1?_x(i):new Vi(i,e,t,r==null?1:r)}function Vi(i,e,t,r){this.r=+i,this.g=+e,this.b=+t,this.opacity=+r}xu(Vi,Uc,dg(to,{brighter(i){return i=i==null?Sl:Math.pow(Sl,i),new Vi(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?Vs:Math.pow(Vs,i),new Vi(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Vi(jn(this.r),jn(this.g),jn(this.b),El(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:em,formatHex:em,formatHex8:bx,formatRgb:tm,toString:tm}));function em(){return`#${$n(this.r)}${$n(this.g)}${$n(this.b)}`}function bx(){return`#${$n(this.r)}${$n(this.g)}${$n(this.b)}${$n((isNaN(this.opacity)?1:this.opacity)*255)}`}function tm(){const i=El(this.opacity);return`${i===1?"rgb(":"rgba("}${jn(this.r)}, ${jn(this.g)}, ${jn(this.b)}${i===1?")":`, ${i})`}`}function El(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function jn(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function $n(i){return i=jn(i),(i<16?"0":"")+i.toString(16)}function im(i,e,t,r){return r<=0?i=e=t=NaN:t<=0||t>=1?i=e=NaN:e<=0&&(i=NaN),new cr(i,e,t,r)}function cg(i){if(i instanceof cr)return new cr(i.h,i.s,i.l,i.opacity);if(i instanceof to||(i=Hr(i)),!i)return new cr;if(i instanceof cr)return i;i=i.rgb();var e=i.r/255,t=i.g/255,r=i.b/255,n=Math.min(e,t,r),a=Math.max(e,t,r),s=NaN,o=a-n,l=(a+n)/2;return o?(e===a?s=(t-r)/o+(t0&&l<1?0:s,new cr(s,o,l,i.opacity)}function yx(i,e,t,r){return arguments.length===1?cg(i):new cr(i,e,t,r==null?1:r)}function cr(i,e,t,r){this.h=+i,this.s=+e,this.l=+t,this.opacity=+r}xu(cr,yx,dg(to,{brighter(i){return i=i==null?Sl:Math.pow(Sl,i),new cr(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?Vs:Math.pow(Vs,i),new cr(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*e,n=2*t-r;return new Vi(uc(i>=240?i-240:i+120,n,r),uc(i,n,r),uc(i<120?i+240:i-120,n,r),this.opacity)},clamp(){return new cr(rm(this.h),Yo(this.s),Yo(this.l),El(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=El(this.opacity);return`${i===1?"hsl(":"hsla("}${rm(this.h)}, ${Yo(this.s)*100}%, ${Yo(this.l)*100}%${i===1?")":`, ${i})`}`}}));function rm(i){return i=(i||0)%360,i<0?i+360:i}function Yo(i){return Math.max(0,Math.min(1,i||0))}function uc(i,e,t){return(i<60?e+(t-e)*i/60:i<180?t:i<240?e+(t-e)*(240-i)/60:e)*255}const wu=i=>()=>i;function xx(i,e){return function(t){return i+t*e}}function wx(i,e,t){return i=Math.pow(i,t),e=Math.pow(e,t)-i,t=1/t,function(r){return Math.pow(i+r*e,t)}}function Sx(i){return(i=+i)==1?ug:function(e,t){return t-e?wx(e,t,i):wu(isNaN(e)?t:e)}}function ug(i,e){var t=e-i;return t?xx(i,t):wu(isNaN(i)?e:i)}const Tl=function i(e){var t=Sx(e);function r(n,a){var s=t((n=Uc(n)).r,(a=Uc(a)).r),o=t(n.g,a.g),l=t(n.b,a.b),d=ug(n.opacity,a.opacity);return function(c){return n.r=s(c),n.g=o(c),n.b=l(c),n.opacity=d(c),n+""}}return r.gamma=i,r}(1);function Ex(i,e){e||(e=[]);var t=i?Math.min(e.length,i.length):0,r=e.slice(),n;return function(a){for(n=0;nt&&(a=e.slice(t,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:dr(r,n)})),t=fc.lastIndex;return t180?c+=360:c-d>180&&(d+=360),h.push({i:u.push(n(u)+"rotate(",null,r)-2,x:dr(d,c)})):c&&u.push(n(u)+"rotate("+c+r)}function o(d,c,u,h){d!==c?h.push({i:u.push(n(u)+"skewX(",null,r)-2,x:dr(d,c)}):c&&u.push(n(u)+"skewX("+c+r)}function l(d,c,u,h,g,C){if(d!==u||c!==h){var G=g.push(n(g)+"scale(",null,",",null,")");C.push({i:G-4,x:dr(d,u)},{i:G-2,x:dr(c,h)})}else(u!==1||h!==1)&&g.push(n(g)+"scale("+u+","+h+")")}return function(d,c){var u=[],h=[];return d=i(d),c=i(c),a(d.translateX,d.translateY,c.translateX,c.translateY,u,h),s(d.rotate,c.rotate,u,h),o(d.skewX,c.skewX,u,h),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,u,h),d=c=null,function(g){for(var C=-1,G=h.length,I;++C=0&&(e=e.slice(0,t)),!e||e==="start"})}function m1(i,e,t){var r,n,a=h1(e)?yu:Er;return function(){var s=a(this,i),o=s.on;o!==r&&(n=(r=o).copy()).on(e,t),s.on=n}}function p1(i,e){var t=this._id;return arguments.length<2?hr(this.node(),t).on.on(i):this.each(m1(t,i,e))}function g1(i){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==i)return;e&&e.removeChild(this)}}function v1(){return this.on("end.remove",g1(this._id))}function _1(i){var e=this._name,t=this._id;typeof i!="function"&&(i=vu(i));for(var r=this._groups,n=r.length,a=new Array(n),s=0;s=0&&(f|0)===f||s("invalid parameter type, ("+f+")"+l(p)+". must be a nonnegative integer")}function C(f,p,w){p.indexOf(f)<0&&s("invalid value"+l(w)+". must be one of: "+p)}var G=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function I(f){Object.keys(f).forEach(function(p){G.indexOf(p)<0&&s('invalid regl constructor argument "'+p+'". must be one of '+G)})}function L(f,p){for(f=f+"";f.length0&&p.push(new T("unknown",0,w))}}),p}function Te(f,p){p.forEach(function(w){var H=f[w.file];if(H){var J=H.index[w.line];if(J){J.errors.push(w),H.hasErrors=!0;return}}f.unknown.hasErrors=!0,f.unknown.lines[0].errors.push(w)})}function Ke(f,p,w,H,J){if(!f.getShaderParameter(p,f.COMPILE_STATUS)){var j=f.getShaderInfoLog(p),X=H===f.FRAGMENT_SHADER?"fragment":"vertex";ne(w,"string",X+" shader source must be a string",J);var oe=re(w,J),se=Se(j);Te(oe,se),Object.keys(oe).forEach(function(he){var pe=oe[he];if(!pe.hasErrors)return;var me=[""],ye=[""];function le(ue,P){me.push(ue),ye.push(P||"")}le("file number "+he+": "+pe.name+` +`,"color:red;text-decoration:underline;font-weight:bold"),pe.lines.forEach(function(ue){if(ue.errors.length>0){le(L(ue.number,4)+"| ","background-color:yellow; font-weight:bold"),le(ue.line+n,"color:red; background-color:yellow; font-weight:bold");var P=0;ue.errors.forEach(function(W){var ce=W.message,Pe=/^\s*'(.*)'\s*:\s*(.*)$/.exec(ce);if(Pe){var ie=Pe[1];switch(ce=Pe[2],ie){case"assign":ie="=";break}P=Math.max(ue.line.indexOf(ie,P),0)}else P=0;le(L("| ",6)),le(L("^^^",P+3)+n,"font-weight:bold"),le(L("| ",6)),le(ce+n,"font-weight:bold")}),le(L("| ",6)+n)}else le(L(ue.number,4)+"| "),le(ue.line+n,"color:red")}),typeof document!="undefined"&&!window.chrome?(ye[0]=me.join("%c"),console.log.apply(console,ye)):console.log(me.join(""))}),o.raise("Error compiling "+X+" shader, "+oe[0].name)}}function fe(f,p,w,H,J){if(!f.getProgramParameter(p,f.LINK_STATUS)){var j=f.getProgramInfoLog(p),X=re(w,J),oe=re(H,J),se='Error linking program with vertex shader, "'+oe[0].name+'", and fragment shader "'+X[0].name+'"';typeof document!="undefined"?console.log("%c"+se+n+"%c"+j,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(se+n+j),o.raise(se)}}function Ge(f){f._commandRef=M()}function He(f,p,w,H){Ge(f);function J(se){return se?H.id(se):0}f._fragId=J(f.static.frag),f._vertId=J(f.static.vert);function j(se,he){Object.keys(he).forEach(function(pe){se[H.id(pe)]=!0})}var X=f._uniformSet={};j(X,p.static),j(X,p.dynamic);var oe=f._attributeSet={};j(oe,w.static),j(oe,w.dynamic),f._hasCount="count"in f.static||"count"in f.dynamic||"elements"in f.static||"elements"in f.dynamic}function N(f,p){var w=ee();s(f+" in command "+(p||M())+(w==="unknown"?"":" called from "+w))}function we(f,p,w){f||N(p,w||M())}function K(f,p,w,H){f in p||N("unknown parameter ("+f+")"+l(w)+". possible values: "+Object.keys(p).join(),H||M())}function ne(f,p,w,H){u(f,p)||N("invalid parameter type"+l(w)+". expected "+p+", got "+typeof f,H||M())}function qe(f){f()}function Oe(f,p,w){f.texture?C(f.texture._texture.internalformat,p,"unsupported texture format for attachment"):C(f.renderbuffer._renderbuffer.format,w,"unsupported renderbuffer format for attachment")}var Xe=33071,it=9728,rt=9984,Bt=9985,Tt=9986,Ct=9987,Rt=5120,wt=5121,$t=5122,Ve=5123,dt=5124,gt=5125,be=5126,Mt=32819,Lt=32820,ai=33635,si=34042,at=36193,bt={};bt[Rt]=bt[wt]=1,bt[$t]=bt[Ve]=bt[at]=bt[ai]=bt[Mt]=bt[Lt]=2,bt[dt]=bt[gt]=bt[be]=bt[si]=4;function tr(f,p){return f===Lt||f===Mt||f===ai?2:f===si?4:bt[f]*p}function Mi(f){return!(f&f-1)&&!!f}function cd(f,p,w){var H,J=p.width,j=p.height,X=p.channels;o(J>0&&J<=w.maxTextureSize&&j>0&&j<=w.maxTextureSize,"invalid texture shape"),(f.wrapS!==Xe||f.wrapT!==Xe)&&o(Mi(J)&&Mi(j),"incompatible wrap mode for texture, both width and height must be power of 2"),p.mipmask===1?J!==1&&j!==1&&o(f.minFilter!==rt&&f.minFilter!==Tt&&f.minFilter!==Bt&&f.minFilter!==Ct,"min filter requires mipmap"):(o(Mi(J)&&Mi(j),"texture must be a square power of 2 to support mipmapping"),o(p.mipmask===(J<<1)-1,"missing or incomplete mipmap data")),p.type===be&&(w.extensions.indexOf("oes_texture_float_linear")<0&&o(f.minFilter===it&&f.magFilter===it,"filter not supported, must enable oes_texture_float_linear"),o(!f.genMipmaps,"mipmap generation not supported with float textures"));var oe=p.images;for(H=0;H<16;++H)if(oe[H]){var se=J>>H,he=j>>H;o(p.mipmask&1<0&&J<=H.maxTextureSize&&j>0&&j<=H.maxTextureSize,"invalid texture shape"),o(J===j,"cube map must be square"),o(p.wrapS===Xe&&p.wrapT===Xe,"wrap mode not supported by cube map");for(var oe=0;oe>pe,le=j>>pe;o(se.mipmask&1<1&&p===w&&(p==='"'||p==="'"))return['"'+ae(f.substr(1,f.length-2))+'"'];var H=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(f);if(H)return q(f.substr(0,H.index)).concat(q(H[1])).concat(q(f.substr(H.index+H[0].length)));var J=f.split(".");if(J.length===1)return['"'+ae(f)+'"'];for(var j=[],X=0;X0,"invalid pixel ratio"))):_.raise("invalid arguments to regl"),w&&(w.nodeName.toLowerCase()==="canvas"?J=w:H=w),!j){if(!J){_(typeof document!="undefined","must manually specify webgl context outside of DOM environments");var le=Kt(H||document.body,me,he);if(!le)return null;J=le.canvas,ye=le.onDestroy}X.premultipliedAlpha===void 0&&(X.premultipliedAlpha=!0),j=Ut(J,X)}return j?{gl:j,canvas:J,container:H,extensions:oe,optionalExtensions:se,pixelRatio:he,profile:pe,onDone:me,onDestroy:ye}:(ye(),me("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Jr(f,p){var w={};function H(X){_.type(X,"string","extension name must be string");var oe=X.toLowerCase(),se;try{se=w[oe]=f.getExtension(oe)}catch(he){}return!!se}for(var J=0;J65535)<<4,f>>>=p,w=(f>255)<<3,f>>>=w,p|=w,w=(f>15)<<2,f>>>=w,p|=w,w=(f>3)<<1,f>>>=w,p|=w,p|f>>1}function po(){var f=Vt(8,function(){return[]});function p(j){var X=ho(j),oe=f[mo(X)>>2];return oe.length>0?oe.pop():new ArrayBuffer(X)}function w(j){f[mo(j.byteLength)>>2].push(j)}function H(j,X){var oe=null;switch(j){case Sn:oe=new Int8Array(p(X),0,X);break;case Li:oe=new Uint8Array(p(X),0,X);break;case gi:oe=new Int16Array(p(2*X),0,X);break;case hd:oe=new Uint16Array(p(2*X),0,X);break;case is:oe=new Int32Array(p(4*X),0,X);break;case fo:oe=new Uint32Array(p(4*X),0,X);break;case md:oe=new Float32Array(p(4*X),0,X);break;default:return null}return oe.length!==X?oe.subarray(0,X):oe}function J(j){w(j.buffer)}return{alloc:p,free:w,allocType:H,freeType:J}}var qt=po();qt.zero=po();var je=3408,yt=3410,Ot=3411,oi=3412,St=3413,mt=3414,Ft=3415,jt=33901,vi=33902,yi=3379,xi=3386,Cr=34921,Yi=36347,Qr=36348,ta=35661,Lr=35660,Or=34930,rs=36349,rr=34076,go=34024,G0=7936,U0=7937,j0=7938,H0=35724,V0=34047,W0=36063,X0=34852,vo=3553,Zu=34067,q0=34069,Y0=33984,ns=6408,pd=5126,Ju=5121,gd=36160,K0=36053,Z0=36064,J0=16384,Q0=function(f,p){var w=1;p.ext_texture_filter_anisotropic&&(w=f.getParameter(V0));var H=1,J=1;p.webgl_draw_buffers&&(H=f.getParameter(X0),J=f.getParameter(W0));var j=!!p.oes_texture_float;if(j){var X=f.createTexture();f.bindTexture(vo,X),f.texImage2D(vo,0,ns,1,1,0,ns,pd,null);var oe=f.createFramebuffer();if(f.bindFramebuffer(gd,oe),f.framebufferTexture2D(gd,Z0,vo,X,0),f.bindTexture(vo,null),f.checkFramebufferStatus(gd)!==K0)j=!1;else{f.viewport(0,0,1,1),f.clearColor(1,0,0,1),f.clear(J0);var se=qt.allocType(pd,4);f.readPixels(0,0,1,1,ns,pd,se),f.getError()?j=!1:(f.deleteFramebuffer(oe),f.deleteTexture(X),j=se[0]===1),qt.freeType(se)}}var he=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),pe=!0;if(!he){var me=f.createTexture(),ye=qt.allocType(Ju,36);f.activeTexture(Y0),f.bindTexture(Zu,me),f.texImage2D(q0,0,ns,3,3,0,ns,Ju,ye),qt.freeType(ye),f.bindTexture(Zu,null),f.deleteTexture(me),pe=!f.getError()}return{colorBits:[f.getParameter(yt),f.getParameter(Ot),f.getParameter(oi),f.getParameter(St)],depthBits:f.getParameter(mt),stencilBits:f.getParameter(Ft),subpixelBits:f.getParameter(je),extensions:Object.keys(p).filter(function(le){return!!p[le]}),maxAnisotropic:w,maxDrawbuffers:H,maxColorAttachments:J,pointSizeDims:f.getParameter(jt),lineWidthDims:f.getParameter(vi),maxViewportDims:f.getParameter(xi),maxCombinedTextureUnits:f.getParameter(ta),maxCubeMapSize:f.getParameter(rr),maxRenderbufferSize:f.getParameter(go),maxTextureUnits:f.getParameter(Or),maxTextureSize:f.getParameter(yi),maxAttributes:f.getParameter(Cr),maxVertexUniforms:f.getParameter(Yi),maxVertexTextureUnits:f.getParameter(Lr),maxVaryingVectors:f.getParameter(Qr),maxFragmentUniforms:f.getParameter(rs),glsl:f.getParameter(H0),renderer:f.getParameter(U0),vendor:f.getParameter(G0),version:f.getParameter(j0),readFloat:j,npotTextureCube:pe}};function nr(f){return!!f&&typeof f=="object"&&Array.isArray(f.shape)&&Array.isArray(f.stride)&&typeof f.offset=="number"&&f.shape.length===f.stride.length&&(Array.isArray(f.data)||t(f.data))}var Wi=function(f){return Object.keys(f).map(function(p){return f[p]})},_o={shape:rv,flatten:iv};function ev(f,p,w){for(var H=0;H0){var Ye;if(Array.isArray(W[0])){Ie=tf(W);for(var Q=1,Z=1;Z0)if(typeof Q[0]=="number"){var de=qt.allocType(ie.dtype,Q.length);nf(de,Q),Ie(de,Ne),qt.freeType(de)}else if(Array.isArray(Q[0])||t(Q[0])){xe=tf(Q);var Ee=_d(Q,xe,ie.dtype);Ie(Ee,Ne),qt.freeType(Ee)}else _.raise("invalid buffer data")}else if(nr(Q)){xe=Q.shape;var Ae=Q.stride,ot=0,nt=0,ke=0,Re=0;xe.length===1?(ot=xe[0],nt=1,ke=Ae[0],Re=0):xe.length===2?(ot=xe[0],nt=xe[1],ke=Ae[0],Re=Ae[1]):_.raise("invalid shape");var et=Array.isArray(Q.data)?ie.dtype:yo(Q.data),st=qt.allocType(et,ot*nt);af(st,Q.data,ot,nt,ke,Re,Q.offset),Ie(st,Ne),qt.freeType(st)}else _.raise("invalid data for buffer subdata");return Le}return ce||Le(P),Le._reglType="buffer",Le._buffer=ie,Le.subdata=Ye,w.profile&&(Le.stats=ie.stats),Le.destroy=function(){ye(ie)},Le}function ue(){Wi(j).forEach(function(P){P.buffer=f.createBuffer(),f.bindBuffer(P.type,P.buffer),f.bufferData(P.type,P.persistentData||P.byteLength,P.usage)})}return w.profile&&(p.getTotalBufferSize=function(){var P=0;return Object.keys(j).forEach(function(W){P+=j[W].stats.size}),P}),{create:le,createStream:se,destroyStream:he,clear:function(){Wi(j).forEach(ye),oe.forEach(ye)},getBuffer:function(P){return P&&P._buffer instanceof X?P._buffer:null},restore:ue,_initBuffer:me}}var gv=0,vv=0,_v=1,bv=1,yv=4,xv=4,tn={points:gv,point:vv,lines:_v,line:bv,triangles:yv,triangle:xv,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},wv=0,Sv=1,as=4,Ev=5120,ia=5121,sf=5122,ra=5123,of=5124,Tn=5125,xd=34963,Tv=35040,Av=35044;function Iv(f,p,w,H){var J={},j=0,X={uint8:ia,uint16:ra};p.oes_element_index_uint&&(X.uint32=Tn);function oe(ue){this.id=j++,J[this.id]=this,this.buffer=ue,this.primType=as,this.vertCount=0,this.type=0}oe.prototype.bind=function(){this.buffer.bind()};var se=[];function he(ue){var P=se.pop();return P||(P=new oe(w.create(null,xd,!0,!1)._buffer)),me(P,ue,Tv,-1,-1,0,0),P}function pe(ue){se.push(ue)}function me(ue,P,W,ce,Pe,ie,Le){ue.buffer.bind();var Ie;if(P){var Ye=Le;!Le&&(!t(P)||nr(P)&&!t(P.data))&&(Ye=p.oes_element_index_uint?Tn:ra),w._initBuffer(ue.buffer,P,W,Ye,3)}else f.bufferData(xd,ie,W),ue.buffer.dtype=Ie||ia,ue.buffer.usage=W,ue.buffer.dimension=3,ue.buffer.byteLength=ie;if(Ie=Le,!Le){switch(ue.buffer.dtype){case ia:case Ev:Ie=ia;break;case ra:case sf:Ie=ra;break;case Tn:case of:Ie=Tn;break;default:_.raise("unsupported type for element array")}ue.buffer.dtype=Ie}ue.type=Ie,_(Ie!==Tn||!!p.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var Q=Pe;Q<0&&(Q=ue.buffer.byteLength,Ie===ra?Q>>=1:Ie===Tn&&(Q>>=2)),ue.vertCount=Q;var Z=ce;if(ce<0){Z=as;var Ne=ue.buffer.dimension;Ne===1&&(Z=wv),Ne===2&&(Z=Sv),Ne===3&&(Z=as)}ue.primType=Z}function ye(ue){H.elementsCount--,_(ue.buffer!==null,"must not double destroy elements"),delete J[ue.id],ue.buffer.destroy(),ue.buffer=null}function le(ue,P){var W=w.create(null,xd,!0),ce=new oe(W._buffer);H.elementsCount++;function Pe(ie){if(!ie)W(),ce.primType=as,ce.vertCount=0,ce.type=ia;else if(typeof ie=="number")W(ie),ce.primType=as,ce.vertCount=ie|0,ce.type=ia;else{var Le=null,Ie=Av,Ye=-1,Q=-1,Z=0,Ne=0;Array.isArray(ie)||t(ie)||nr(ie)?Le=ie:(_.type(ie,"object","invalid arguments for elements"),"data"in ie&&(Le=ie.data,_(Array.isArray(Le)||t(Le)||nr(Le),"invalid data for element buffer")),"usage"in ie&&(_.parameter(ie.usage,bo,"invalid element buffer usage"),Ie=bo[ie.usage]),"primitive"in ie&&(_.parameter(ie.primitive,tn,"invalid element buffer primitive"),Ye=tn[ie.primitive]),"count"in ie&&(_(typeof ie.count=="number"&&ie.count>=0,"invalid vertex count for elements"),Q=ie.count|0),"type"in ie&&(_.parameter(ie.type,X,"invalid buffer type"),Ne=X[ie.type]),"length"in ie?Z=ie.length|0:(Z=Q,Ne===ra||Ne===sf?Z*=2:(Ne===Tn||Ne===of)&&(Z*=4))),me(ce,Le,Ie,Ye,Q,Z,Ne)}return Pe}return Pe(ue),Pe._reglType="elements",Pe._elements=ce,Pe.subdata=function(ie,Le){return W.subdata(ie,Le),Pe},Pe.destroy=function(){ye(ce)},Pe}return{create:le,createStream:he,destroyStream:pe,getElements:function(ue){return typeof ue=="function"&&ue._elements instanceof oe?ue._elements:null},clear:function(){Wi(J).forEach(ye)}}}var lf=new Float32Array(1),kv=new Uint32Array(lf.buffer),Cv=5123;function df(f){for(var p=qt.allocType(Cv,f.length),w=0;w>>31<<15,j=(H<<1>>>24)-127,X=H>>13&1023;if(j<-24)p[w]=J;else if(j<-14){var oe=-14-j;p[w]=J+(X+1024>>oe)}else j>15?p[w]=J+31744:p[w]=J+(j+15<<10)+X}return p}function Jt(f){return Array.isArray(f)||t(f)}var cf=function(f){return!(f&f-1)&&!!f},Lv=34467,mr=3553,wd=34067,xo=34069,An=6408,Sd=6406,wo=6407,ss=6409,So=6410,uf=32854,Ed=32855,ff=36194,Ov=32819,Rv=32820,Pv=33635,Fv=34042,Td=6402,Eo=34041,Ad=35904,Id=35906,na=36193,kd=33776,Cd=33777,Ld=33778,Od=33779,hf=35986,mf=35987,pf=34798,gf=35840,vf=35841,_f=35842,bf=35843,yf=36196,aa=5121,Rd=5123,Pd=5125,os=5126,Dv=10242,Nv=10243,zv=10497,Fd=33071,Mv=33648,Bv=10240,$v=10241,Dd=9728,Gv=9729,Nd=9984,xf=9985,wf=9986,zd=9987,Uv=33170,To=4352,jv=4353,Hv=4354,Vv=34046,Wv=3317,Xv=37440,qv=37441,Yv=37443,Sf=37444,ls=33984,Kv=[Nd,wf,xf,zd],Ao=[0,ss,So,wo,An],Ki={};Ki[ss]=Ki[Sd]=Ki[Td]=1,Ki[Eo]=Ki[So]=2,Ki[wo]=Ki[Ad]=3,Ki[An]=Ki[Id]=4;function sa(f){return"[object "+f+"]"}var Ef=sa("HTMLCanvasElement"),Tf=sa("OffscreenCanvas"),Af=sa("CanvasRenderingContext2D"),If=sa("ImageBitmap"),kf=sa("HTMLImageElement"),Cf=sa("HTMLVideoElement"),Zv=Object.keys(vd).concat([Ef,Tf,Af,If,kf,Cf]),oa=[];oa[aa]=1,oa[os]=4,oa[na]=2,oa[Rd]=2,oa[Pd]=4;var Ti=[];Ti[uf]=2,Ti[Ed]=2,Ti[ff]=2,Ti[Eo]=4,Ti[kd]=.5,Ti[Cd]=.5,Ti[Ld]=1,Ti[Od]=1,Ti[hf]=.5,Ti[mf]=1,Ti[pf]=1,Ti[gf]=.5,Ti[vf]=.25,Ti[_f]=.5,Ti[bf]=.25,Ti[yf]=.5;function Lf(f){return Array.isArray(f)&&(f.length===0||typeof f[0]=="number")}function Of(f){if(!Array.isArray(f))return!1;var p=f.length;return!(p===0||!Jt(f[0]))}function In(f){return Object.prototype.toString.call(f)}function Rf(f){return In(f)===Ef}function Pf(f){return In(f)===Tf}function Jv(f){return In(f)===Af}function Qv(f){return In(f)===If}function e_(f){return In(f)===kf}function t_(f){return In(f)===Cf}function Md(f){if(!f)return!1;var p=In(f);return Zv.indexOf(p)>=0?!0:Lf(f)||Of(f)||nr(f)}function Ff(f){return vd[Object.prototype.toString.call(f)]|0}function i_(f,p){var w=p.length;switch(f.type){case aa:case Rd:case Pd:case os:var H=qt.allocType(f.type,w);H.set(p),f.data=H;break;case na:f.data=df(p);break;default:_.raise("unsupported texture type, must specify a typed array")}}function Df(f,p){return qt.allocType(f.type===na?os:f.type,p)}function Nf(f,p){f.type===na?(f.data=df(p),qt.freeType(p)):f.data=p}function r_(f,p,w,H,J,j){for(var X=f.width,oe=f.height,se=f.channels,he=X*oe*se,pe=Df(f,he),me=0,ye=0;ye=1;)oe+=X*se*se,se/=2;return oe}else return X*w*H}function n_(f,p,w,H,J,j,X){var oe={"don't care":To,"dont care":To,nice:Hv,fast:jv},se={repeat:zv,clamp:Fd,mirror:Mv},he={nearest:Dd,linear:Gv},pe=r({mipmap:zd,"nearest mipmap nearest":Nd,"linear mipmap nearest":xf,"nearest mipmap linear":wf,"linear mipmap linear":zd},he),me={none:0,browser:Sf},ye={uint8:aa,rgba4:Ov,rgb565:Pv,"rgb5 a1":Rv},le={alpha:Sd,luminance:ss,"luminance alpha":So,rgb:wo,rgba:An,rgba4:uf,"rgb5 a1":Ed,rgb565:ff},ue={};p.ext_srgb&&(le.srgb=Ad,le.srgba=Id),p.oes_texture_float&&(ye.float32=ye.float=os),p.oes_texture_half_float&&(ye.float16=ye["half float"]=na),p.webgl_depth_texture&&(r(le,{depth:Td,"depth stencil":Eo}),r(ye,{uint16:Rd,uint32:Pd,"depth stencil":Fv})),p.webgl_compressed_texture_s3tc&&r(ue,{"rgb s3tc dxt1":kd,"rgba s3tc dxt1":Cd,"rgba s3tc dxt3":Ld,"rgba s3tc dxt5":Od}),p.webgl_compressed_texture_atc&&r(ue,{"rgb atc":hf,"rgba atc explicit alpha":mf,"rgba atc interpolated alpha":pf}),p.webgl_compressed_texture_pvrtc&&r(ue,{"rgb pvrtc 4bppv1":gf,"rgb pvrtc 2bppv1":vf,"rgba pvrtc 4bppv1":_f,"rgba pvrtc 2bppv1":bf}),p.webgl_compressed_texture_etc1&&(ue["rgb etc1"]=yf);var P=Array.prototype.slice.call(f.getParameter(Lv));Object.keys(ue).forEach(function(x){var V=ue[x];P.indexOf(V)>=0&&(le[x]=V)});var W=Object.keys(le);w.textureFormats=W;var ce=[];Object.keys(le).forEach(function(x){var V=le[x];ce[V]=x});var Pe=[];Object.keys(ye).forEach(function(x){var V=ye[x];Pe[V]=x});var ie=[];Object.keys(he).forEach(function(x){var V=he[x];ie[V]=x});var Le=[];Object.keys(pe).forEach(function(x){var V=pe[x];Le[V]=x});var Ie=[];Object.keys(se).forEach(function(x){var V=se[x];Ie[V]=x});var Ye=W.reduce(function(x,V){var B=le[V];return B===ss||B===Sd||B===ss||B===So||B===Td||B===Eo||p.ext_srgb&&(B===Ad||B===Id)?x[B]=B:B===Ed||V.indexOf("rgba")>=0?x[B]=An:x[B]=wo,x},{});function Q(){this.internalformat=An,this.format=An,this.type=aa,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Sf,this.width=0,this.height=0,this.channels=0}function Z(x,V){x.internalformat=V.internalformat,x.format=V.format,x.type=V.type,x.compressed=V.compressed,x.premultiplyAlpha=V.premultiplyAlpha,x.flipY=V.flipY,x.unpackAlignment=V.unpackAlignment,x.colorSpace=V.colorSpace,x.width=V.width,x.height=V.height,x.channels=V.channels}function Ne(x,V){if(!(typeof V!="object"||!V)){if("premultiplyAlpha"in V&&(_.type(V.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),x.premultiplyAlpha=V.premultiplyAlpha),"flipY"in V&&(_.type(V.flipY,"boolean","invalid texture flip"),x.flipY=V.flipY),"alignment"in V&&(_.oneOf(V.alignment,[1,2,4,8],"invalid texture unpack alignment"),x.unpackAlignment=V.alignment),"colorSpace"in V&&(_.parameter(V.colorSpace,me,"invalid colorSpace"),x.colorSpace=me[V.colorSpace]),"type"in V){var B=V.type;_(p.oes_texture_float||!(B==="float"||B==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),_(p.oes_texture_half_float||!(B==="half float"||B==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),_(p.webgl_depth_texture||!(B==="uint16"||B==="uint32"||B==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),_.parameter(B,ye,"invalid texture type"),x.type=ye[B]}var De=x.width,ut=x.height,b=x.channels,m=!1;"shape"in V?(_(Array.isArray(V.shape)&&V.shape.length>=2,"shape must be an array"),De=V.shape[0],ut=V.shape[1],V.shape.length===3&&(b=V.shape[2],_(b>0&&b<=4,"invalid number of channels"),m=!0),_(De>=0&&De<=w.maxTextureSize,"invalid width"),_(ut>=0&&ut<=w.maxTextureSize,"invalid height")):("radius"in V&&(De=ut=V.radius,_(De>=0&&De<=w.maxTextureSize,"invalid radius")),"width"in V&&(De=V.width,_(De>=0&&De<=w.maxTextureSize,"invalid width")),"height"in V&&(ut=V.height,_(ut>=0&&ut<=w.maxTextureSize,"invalid height")),"channels"in V&&(b=V.channels,_(b>0&&b<=4,"invalid number of channels"),m=!0)),x.width=De|0,x.height=ut|0,x.channels=b|0;var E=!1;if("format"in V){var R=V.format;_(p.webgl_depth_texture||!(R==="depth"||R==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),_.parameter(R,le,"invalid texture format");var D=x.internalformat=le[R];x.format=Ye[D],R in ye&&("type"in V||(x.type=ye[R])),R in ue&&(x.compressed=!0),E=!0}!m&&E?x.channels=Ki[x.format]:m&&!E?x.channels!==Ao[x.format]&&(x.format=x.internalformat=Ao[x.channels]):E&&m&&_(x.channels===Ki[x.format],"number of channels inconsistent with specified format")}}function xe(x){f.pixelStorei(Xv,x.flipY),f.pixelStorei(qv,x.premultiplyAlpha),f.pixelStorei(Yv,x.colorSpace),f.pixelStorei(Wv,x.unpackAlignment)}function de(){Q.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ee(x,V){var B=null;if(Md(V)?B=V:V&&(_.type(V,"object","invalid pixel data type"),Ne(x,V),"x"in V&&(x.xOffset=V.x|0),"y"in V&&(x.yOffset=V.y|0),Md(V.data)&&(B=V.data)),_(!x.compressed||B instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),V.copy){_(!B,"can not specify copy and data field for the same texture");var De=J.viewportWidth,ut=J.viewportHeight;x.width=x.width||De-x.xOffset,x.height=x.height||ut-x.yOffset,x.needsCopy=!0,_(x.xOffset>=0&&x.xOffset=0&&x.yOffset0&&x.width<=De&&x.height>0&&x.height<=ut,"copy texture read out of bounds")}else if(!B)x.width=x.width||1,x.height=x.height||1,x.channels=x.channels||4;else if(t(B))x.channels=x.channels||4,x.data=B,!("type"in V)&&x.type===aa&&(x.type=Ff(B));else if(Lf(B))x.channels=x.channels||4,i_(x,B),x.alignment=1,x.needsFree=!0;else if(nr(B)){var b=B.data;!Array.isArray(b)&&x.type===aa&&(x.type=Ff(b));var m=B.shape,E=B.stride,R,D,k,A,O,v;m.length===3?(k=m[2],v=E[2]):(_(m.length===2,"invalid ndarray pixel data, must be 2 or 3D"),k=1,v=1),R=m[0],D=m[1],A=E[0],O=E[1],x.alignment=1,x.width=R,x.height=D,x.channels=k,x.format=x.internalformat=Ao[k],x.needsFree=!0,r_(x,b,A,O,v,B.offset)}else if(Rf(B)||Pf(B)||Jv(B))Rf(B)||Pf(B)?x.element=B:x.element=B.canvas,x.width=x.element.width,x.height=x.element.height,x.channels=4;else if(Qv(B))x.element=B,x.width=B.width,x.height=B.height,x.channels=4;else if(e_(B))x.element=B,x.width=B.naturalWidth,x.height=B.naturalHeight,x.channels=4;else if(t_(B))x.element=B,x.width=B.videoWidth,x.height=B.videoHeight,x.channels=4;else if(Of(B)){var S=x.width||B[0].length,y=x.height||B.length,F=x.channels;Jt(B[0][0])?F=F||B[0][0].length:F=F||1;for(var z=_o.shape(B),te=1,ve=0;ve=0,"oes_texture_float extension not enabled"):x.type===na&&_(w.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function Ae(x,V,B){var De=x.element,ut=x.data,b=x.internalformat,m=x.format,E=x.type,R=x.width,D=x.height;xe(x),De?f.texImage2D(V,B,m,m,E,De):x.compressed?f.compressedTexImage2D(V,B,b,R,D,0,ut):x.needsCopy?(H(),f.copyTexImage2D(V,B,m,x.xOffset,x.yOffset,R,D,0)):f.texImage2D(V,B,m,R,D,0,m,E,ut||null)}function ot(x,V,B,De,ut){var b=x.element,m=x.data,E=x.internalformat,R=x.format,D=x.type,k=x.width,A=x.height;xe(x),b?f.texSubImage2D(V,ut,B,De,R,D,b):x.compressed?f.compressedTexSubImage2D(V,ut,B,De,E,k,A,m):x.needsCopy?(H(),f.copyTexSubImage2D(V,ut,B,De,x.xOffset,x.yOffset,k,A)):f.texSubImage2D(V,ut,B,De,k,A,R,D,m)}var nt=[];function ke(){return nt.pop()||new de}function Re(x){x.needsFree&&qt.freeType(x.data),de.call(x),nt.push(x)}function et(){Q.call(this),this.genMipmaps=!1,this.mipmapHint=To,this.mipmask=0,this.images=Array(16)}function st(x,V,B){var De=x.images[0]=ke();x.mipmask=1,De.width=x.width=V,De.height=x.height=B,De.channels=x.channels=4}function ft(x,V){var B=null;if(Md(V))B=x.images[0]=ke(),Z(B,x),Ee(B,V),x.mipmask=1;else if(Ne(x,V),Array.isArray(V.mipmap))for(var De=V.mipmap,ut=0;ut>=ut,B.height>>=ut,Ee(B,De[ut]),x.mipmask|=1<=0&&!("faces"in V)&&(x.genMipmaps=!0)}if("mag"in V){var De=V.mag;_.parameter(De,he),x.magFilter=he[De]}var ut=x.wrapS,b=x.wrapT;if("wrap"in V){var m=V.wrap;typeof m=="string"?(_.parameter(m,se),ut=b=se[m]):Array.isArray(m)&&(_.parameter(m[0],se),_.parameter(m[1],se),ut=se[m[0]],b=se[m[1]])}else{if("wrapS"in V){var E=V.wrapS;_.parameter(E,se),ut=se[E]}if("wrapT"in V){var R=V.wrapT;_.parameter(R,se),b=se[R]}}if(x.wrapS=ut,x.wrapT=b,"anisotropic"in V){var D=V.anisotropic;_(typeof D=="number"&&D>=1&&D<=w.maxAnisotropic,"aniso samples must be between 1 and "),x.anisotropic=V.anisotropic}if("mipmap"in V){var k=!1;switch(typeof V.mipmap){case"string":_.parameter(V.mipmap,oe,"invalid mipmap hint"),x.mipmapHint=oe[V.mipmap],x.genMipmaps=!0,k=!0;break;case"boolean":k=x.genMipmaps=V.mipmap;break;case"object":_(Array.isArray(V.mipmap),"invalid mipmap type"),x.genMipmaps=!1,k=!0;break;default:_.raise("invalid mipmap type")}k&&!("min"in V)&&(x.minFilter=Nd)}}function di(x,V){f.texParameteri(V,$v,x.minFilter),f.texParameteri(V,Bv,x.magFilter),f.texParameteri(V,Dv,x.wrapS),f.texParameteri(V,Nv,x.wrapT),p.ext_texture_filter_anisotropic&&f.texParameteri(V,Vv,x.anisotropic),x.genMipmaps&&(f.hint(Uv,x.mipmapHint),f.generateMipmap(V))}var ci=0,wi={},Ai=w.maxTextureUnits,Qt=Array(Ai).map(function(){return null});function lt(x){Q.call(this),this.mipmask=0,this.internalformat=An,this.id=ci++,this.refCount=1,this.target=x,this.texture=f.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ht,X.profile&&(this.stats={size:0})}function Ii(x){f.activeTexture(ls),f.bindTexture(x.target,x.texture)}function At(){var x=Qt[0];x?f.bindTexture(x.target,x.texture):f.bindTexture(mr,null)}function Qe(x){var V=x.texture;_(V,"must not double destroy texture");var B=x.unit,De=x.target;B>=0&&(f.activeTexture(ls+B),f.bindTexture(De,null),Qt[B]=null),f.deleteTexture(V),x.texture=null,x.params=null,x.pixels=null,x.refCount=0,delete wi[x.id],j.textureCount--}r(lt.prototype,{bind:function(){var x=this;x.bindCount+=1;var V=x.unit;if(V<0){for(var B=0;B0)continue;De.unit=-1}Qt[B]=x,V=B;break}V>=Ai&&_.raise("insufficient number of texture units"),X.profile&&j.maxTextureUnits>O)-k,v.height=v.height||(B.height>>O)-A,_(B.type===v.type&&B.format===v.format&&B.internalformat===v.internalformat,"incompatible format for texture.subimage"),_(k>=0&&A>=0&&k+v.width<=B.width&&A+v.height<=B.height,"texture.subimage write out of bounds"),_(B.mipmask&1<>k;++k){var A=R>>k,O=D>>k;if(!A||!O)break;f.texImage2D(mr,k,B.format,A,O,0,B.format,B.type,null)}return At(),X.profile&&(B.stats.size=Io(B.internalformat,B.type,R,D,!1,!1)),De}return De(x,V),De.subimage=ut,De.resize=b,De._reglType="texture2d",De._texture=B,X.profile&&(De.stats=B.stats),De.destroy=function(){B.decRef()},De}function _t(x,V,B,De,ut,b){var m=new lt(wd);wi[m.id]=m,j.cubeCount++;var E=new Array(6);function R(A,O,v,S,y,F){var z,te=m.texInfo;for(Ht.call(te),z=0;z<6;++z)E[z]=pt();if(typeof A=="number"||!A){var ve=A|0||1;for(z=0;z<6;++z)st(E[z],ve,ve)}else if(typeof A=="object")if(O)ft(E[0],A),ft(E[1],O),ft(E[2],v),ft(E[3],S),ft(E[4],y),ft(E[5],F);else if(ri(te,A),Ne(m,A),"faces"in A){var _e=A.faces;for(_(Array.isArray(_e)&&_e.length===6,"cube faces must be a length 6 array"),z=0;z<6;++z)_(typeof _e[z]=="object"&&!!_e[z],"invalid input for cube map face"),Z(E[z],m),ft(E[z],_e[z])}else for(z=0;z<6;++z)ft(E[z],A);else _.raise("invalid arguments to cube map");for(Z(m,E[0]),_.optional(function(){w.npotTextureCube||_(cf(m.width)&&cf(m.height),"your browser does not support non power or two texture dimensions")}),te.genMipmaps?m.mipmask=(E[0].width<<1)-1:m.mipmask=E[0].mipmask,_.textureCube(m,te,E,w),m.internalformat=E[0].internalformat,R.width=E[0].width,R.height=E[0].height,Ii(m),z=0;z<6;++z)Wt(E[z],xo+z);for(di(te,wd),At(),X.profile&&(m.stats.size=Io(m.internalformat,m.type,R.width,R.height,te.genMipmaps,!0)),R.format=ce[m.internalformat],R.type=Pe[m.type],R.mag=ie[te.magFilter],R.min=Le[te.minFilter],R.wrapS=Ie[te.wrapS],R.wrapT=Ie[te.wrapT],z=0;z<6;++z)li(E[z]);return R}function D(A,O,v,S,y){_(!!O,"must specify image data"),_(typeof A=="number"&&A===(A|0)&&A>=0&&A<6,"invalid face");var F=v|0,z=S|0,te=y|0,ve=ke();return Z(ve,m),ve.width=0,ve.height=0,Ee(ve,O),ve.width=ve.width||(m.width>>te)-F,ve.height=ve.height||(m.height>>te)-z,_(m.type===ve.type&&m.format===ve.format&&m.internalformat===ve.internalformat,"incompatible format for texture.subimage"),_(F>=0&&z>=0&&F+ve.width<=m.width&&z+ve.height<=m.height,"texture.subimage write out of bounds"),_(m.mipmask&1<>S;++S)f.texImage2D(xo+v,S,m.format,O>>S,O>>S,0,m.format,m.type,null);return At(),X.profile&&(m.stats.size=Io(m.internalformat,m.type,R.width,R.height,!1,!0)),R}}return R(x,V,B,De,ut,b),R.subimage=D,R.resize=k,R._reglType="textureCube",R._texture=m,X.profile&&(R.stats=m.stats),R.destroy=function(){m.decRef()},R}function ei(){for(var x=0;x>De,B.height>>De,0,B.internalformat,B.type,null);else for(var ut=0;ut<6;++ut)f.texImage2D(xo+ut,De,B.internalformat,B.width>>De,B.height>>De,0,B.internalformat,B.type,null);di(B.texInfo,B.target)})}function Fn(){for(var x=0;x=2,"invalid renderbuffer shape"),Le=Z[0]|0,Ie=Z[1]|0}else"radius"in Q&&(Le=Ie=Q.radius|0),"width"in Q&&(Le=Q.width|0),"height"in Q&&(Ie=Q.height|0);"format"in Q&&(_.parameter(Q.format,j,"invalid renderbuffer format"),Ye=j[Q.format])}else typeof Pe=="number"?(Le=Pe|0,typeof ie=="number"?Ie=ie|0:Ie=Le):Pe?_.raise("invalid arguments to renderbuffer constructor"):Le=Ie=1;if(_(Le>0&&Ie>0&&Le<=w.maxRenderbufferSize&&Ie<=w.maxRenderbufferSize,"invalid renderbuffer size"),!(Le===P.width&&Ie===P.height&&Ye===P.format))return W.width=P.width=Le,W.height=P.height=Ie,P.format=Ye,f.bindRenderbuffer(rn,P.renderbuffer),f.renderbufferStorage(rn,Ye,Le,Ie),_(f.getError()===0,"invalid render buffer format"),J.profile&&(P.stats.size=Wf(P.format,P.width,P.height)),W.format=X[P.format],W}function ce(Pe,ie){var Le=Pe|0,Ie=ie|0||Le;return Le===P.width&&Ie===P.height||(_(Le>0&&Ie>0&&Le<=w.maxRenderbufferSize&&Ie<=w.maxRenderbufferSize,"invalid renderbuffer size"),W.width=P.width=Le,W.height=P.height=Ie,f.bindRenderbuffer(rn,P.renderbuffer),f.renderbufferStorage(rn,P.format,Le,Ie),_(f.getError()===0,"invalid render buffer format"),J.profile&&(P.stats.size=Wf(P.format,P.width,P.height))),W}return W(le,ue),W.resize=ce,W._reglType="renderbuffer",W._renderbuffer=P,J.profile&&(W.stats=P.stats),W.destroy=function(){P.decRef()},W}J.profile&&(H.getTotalRenderbufferSize=function(){var le=0;return Object.keys(se).forEach(function(ue){le+=se[ue].stats.size}),le});function ye(){Wi(se).forEach(function(le){le.renderbuffer=f.createRenderbuffer(),f.bindRenderbuffer(rn,le.renderbuffer),f.renderbufferStorage(rn,le.format,le.width,le.height)}),f.bindRenderbuffer(rn,null)}return{create:me,clear:function(){Wi(se).forEach(pe)},restore:ye}},Rr=36160,Bd=36161,kn=3553,Co=34069,Xf=36064,qf=36096,Yf=36128,Kf=33306,Zf=36053,s_=36054,o_=36055,l_=36057,d_=36061,c_=36193,u_=5121,f_=5126,Jf=6407,Qf=6408,h_=6402,m_=[Jf,Qf],$d=[];$d[Qf]=4,$d[Jf]=3;var Lo=[];Lo[u_]=1,Lo[f_]=4,Lo[c_]=2;var p_=32854,g_=32855,v_=36194,__=33189,b_=36168,eh=34041,y_=35907,x_=34836,w_=34842,S_=34843,E_=[p_,g_,v_,y_,w_,S_,x_],la={};la[Zf]="complete",la[s_]="incomplete attachment",la[l_]="incomplete dimensions",la[o_]="incomplete, missing attachment",la[d_]="unsupported";function T_(f,p,w,H,J,j){var X={cur:null,next:null,dirty:!1,setFBO:null},oe=["rgba"],se=["rgba4","rgb565","rgb5 a1"];p.ext_srgb&&se.push("srgba"),p.ext_color_buffer_half_float&&se.push("rgba16f","rgb16f"),p.webgl_color_buffer_float&&se.push("rgba32f");var he=["uint8"];p.oes_texture_half_float&&he.push("half float","float16"),p.oes_texture_float&&he.push("float","float32");function pe(de,Ee,Ae){this.target=de,this.texture=Ee,this.renderbuffer=Ae;var ot=0,nt=0;Ee?(ot=Ee.width,nt=Ee.height):Ae&&(ot=Ae.width,nt=Ae.height),this.width=ot,this.height=nt}function me(de){de&&(de.texture&&de.texture._texture.decRef(),de.renderbuffer&&de.renderbuffer._renderbuffer.decRef())}function ye(de,Ee,Ae){if(de)if(de.texture){var ot=de.texture._texture,nt=Math.max(1,ot.width),ke=Math.max(1,ot.height);_(nt===Ee&&ke===Ae,"inconsistent width/height for supplied texture"),ot.refCount+=1}else{var Re=de.renderbuffer._renderbuffer;_(Re.width===Ee&&Re.height===Ae,"inconsistent width/height for renderbuffer"),Re.refCount+=1}}function le(de,Ee){Ee&&(Ee.texture?f.framebufferTexture2D(Rr,de,Ee.target,Ee.texture._texture.texture,0):f.framebufferRenderbuffer(Rr,de,Bd,Ee.renderbuffer._renderbuffer.renderbuffer))}function ue(de){var Ee=kn,Ae=null,ot=null,nt=de;typeof de=="object"&&(nt=de.data,"target"in de&&(Ee=de.target|0)),_.type(nt,"function","invalid attachment data");var ke=nt._reglType;return ke==="texture2d"?(Ae=nt,_(Ee===kn)):ke==="textureCube"?(Ae=nt,_(Ee>=Co&&Ee=2,"invalid shape for framebuffer"),st=Ii[0],ft=Ii[1]}else"radius"in lt&&(st=ft=lt.radius),"width"in lt&&(st=lt.width),"height"in lt&&(ft=lt.height);("color"in lt||"colors"in lt)&&(pt=lt.color||lt.colors,Array.isArray(pt)&&_(pt.length===1||p.webgl_draw_buffers,"multiple render targets not supported")),pt||("colorCount"in lt&&(di=lt.colorCount|0,_(di>0,"invalid color buffer count")),"colorTexture"in lt&&(li=!!lt.colorTexture,Ht="rgba4"),"colorType"in lt&&(ri=lt.colorType,li?(_(p.oes_texture_float||!(ri==="float"||ri==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),_(p.oes_texture_half_float||!(ri==="half float"||ri==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):ri==="half float"||ri==="float16"?(_(p.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),Ht="rgba16f"):(ri==="float"||ri==="float32")&&(_(p.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),Ht="rgba32f"),_.oneOf(ri,he,"invalid color type")),"colorFormat"in lt&&(Ht=lt.colorFormat,oe.indexOf(Ht)>=0?li=!0:se.indexOf(Ht)>=0?li=!1:_.optional(function(){li?_.oneOf(lt.colorFormat,oe,"invalid color format for texture"):_.oneOf(lt.colorFormat,se,"invalid color format for renderbuffer")}))),("depthTexture"in lt||"depthStencilTexture"in lt)&&(Qt=!!(lt.depthTexture||lt.depthStencilTexture),_(!Qt||p.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in lt&&(typeof lt.depth=="boolean"?Wt=lt.depth:(ci=lt.depth,Yt=!1)),"stencil"in lt&&(typeof lt.stencil=="boolean"?Yt=lt.stencil:(wi=lt.stencil,Wt=!1)),"depthStencil"in lt&&(typeof lt.depthStencil=="boolean"?Wt=Yt=lt.depthStencil:(Ai=lt.depthStencil,Wt=!1,Yt=!1))}var At=null,Qe=null,ht=null,_t=null;if(Array.isArray(pt))At=pt.map(ue);else if(pt)At=[ue(pt)];else for(At=new Array(di),et=0;et=0||At[et].renderbuffer&&E_.indexOf(At[et].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+et+" is invalid"),At[et]&&At[et].texture){var gr=$d[At[et].texture._texture.format]*Lo[At[et].texture._texture.type];ei===null?ei=gr:_(ei===gr,"all color attachments much have the same number of bits per pixel.")}return ye(Qe,st,ft),_(!Qe||Qe.texture&&Qe.texture._texture.format===h_||Qe.renderbuffer&&Qe.renderbuffer._renderbuffer.format===__,"invalid depth attachment for framebuffer object"),ye(ht,st,ft),_(!ht||ht.renderbuffer&&ht.renderbuffer._renderbuffer.format===b_,"invalid stencil attachment for framebuffer object"),ye(_t,st,ft),_(!_t||_t.texture&&_t.texture._texture.format===eh||_t.renderbuffer&&_t.renderbuffer._renderbuffer.format===eh,"invalid depth-stencil attachment for framebuffer object"),Ie(Ae),Ae.width=st,Ae.height=ft,Ae.colorAttachments=At,Ae.depthAttachment=Qe,Ae.stencilAttachment=ht,Ae.depthStencilAttachment=_t,ot.color=At.map(W),ot.depth=W(Qe),ot.stencil=W(ht),ot.depthStencil=W(_t),ot.width=Ae.width,ot.height=Ae.height,Q(Ae),ot}function nt(ke,Re){_(X.next!==Ae,"can not resize a framebuffer which is currently in use");var et=Math.max(ke|0,1),st=Math.max(Re|0||et,1);if(et===Ae.width&&st===Ae.height)return ot;for(var ft=Ae.colorAttachments,Wt=0;Wt=2,"invalid shape for framebuffer"),_(li[0]===li[1],"cube framebuffer must be square"),et=li[0]}else"radius"in pt&&(et=pt.radius|0),"width"in pt?(et=pt.width|0,"height"in pt&&_(pt.height===et,"must be square")):"height"in pt&&(et=pt.height|0);("color"in pt||"colors"in pt)&&(st=pt.color||pt.colors,Array.isArray(st)&&_(st.length===1||p.webgl_draw_buffers,"multiple render targets not supported")),st||("colorCount"in pt&&(Yt=pt.colorCount|0,_(Yt>0,"invalid color buffer count")),"colorType"in pt&&(_.oneOf(pt.colorType,he,"invalid color type"),Wt=pt.colorType),"colorFormat"in pt&&(ft=pt.colorFormat,_.oneOf(pt.colorFormat,oe,"invalid color format for texture"))),"depth"in pt&&(Re.depth=pt.depth),"stencil"in pt&&(Re.stencil=pt.stencil),"depthStencil"in pt&&(Re.depthStencil=pt.depthStencil)}var Ht;if(st)if(Array.isArray(st))for(Ht=[],ke=0;ke0&&(Re.depth=Ee[0].depth,Re.stencil=Ee[0].stencil,Re.depthStencil=Ee[0].depthStencil),Ee[ke]?Ee[ke](Re):Ee[ke]=Z(Re)}return r(Ae,{width:et,height:et,color:Ht})}function ot(nt){var ke,Re=nt|0;if(_(Re>0&&Re<=w.maxCubeMapSize,"invalid radius for cube fbo"),Re===Ae.width)return Ae;var et=Ae.color;for(ke=0;ke{for(var Wt=Object.keys(xe),Yt=0;Yt=0,'invalid option for vao: "'+Wt[Yt]+'" valid options are '+ih)}),_(Array.isArray(de),"attributes must be an array")}_(de.length0,"must specify at least one attribute");var Ae={},ot=Z.attributes;ot.length=de.length;for(var nt=0;nt=et.byteLength?st.subdata(et):(st.destroy(),Z.buffers[nt]=null)),Z.buffers[nt]||(st=Z.buffers[nt]=J.create(ke,th,!1,!0)),Re.buffer=J.getBuffer(st),Re.size=Re.buffer.dimension|0,Re.normalized=!1,Re.type=Re.buffer.dtype,Re.offset=0,Re.stride=0,Re.divisor=0,Re.state=1,Ae[nt]=1}else J.getBuffer(ke)?(Re.buffer=J.getBuffer(ke),Re.size=Re.buffer.dimension|0,Re.normalized=!1,Re.type=Re.buffer.dtype,Re.offset=0,Re.stride=0,Re.divisor=0,Re.state=1):J.getBuffer(ke.buffer)?(Re.buffer=J.getBuffer(ke.buffer),Re.size=(+ke.size||Re.buffer.dimension)|0,Re.normalized=!!ke.normalized||!1,"type"in ke?(_.parameter(ke.type,En,"invalid buffer type"),Re.type=En[ke.type]):Re.type=Re.buffer.dtype,Re.offset=(ke.offset||0)|0,Re.stride=(ke.stride||0)|0,Re.divisor=(ke.divisor||0)|0,Re.state=1,_(Re.size>=1&&Re.size<=4,"size must be between 1 and 4"),_(Re.offset>=0,"invalid offset"),_(Re.stride>=0&&Re.stride<=255,"stride must be between 0 and 255"),_(Re.divisor>=0,"divisor must be positive"),_(!Re.divisor||!!p.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in ke?(_(nt>0,"first attribute must not be a constant"),Re.x=+ke.x||0,Re.y=+ke.y||0,Re.z=+ke.z||0,Re.w=+ke.w||0,Re.state=2):_(!1,"invalid attribute spec for location "+nt)}for(var ft=0;ft1)for(var xe=0;xeP&&(P=W.stats.uniformsCount)}),P},w.getMaxAttributesCount=function(){var P=0;return pe.forEach(function(W){W.stats.attributesCount>P&&(P=W.stats.attributesCount)}),P});function ue(){J={},j={};for(var P=0;P=0,"missing vertex shader",ce),_.command(W>=0,"missing fragment shader",ce);var ie=he[W];ie||(ie=he[W]={});var Le=ie[P];if(Le&&(Le.refCount++,!Pe))return Le;var Ie=new ye(W,P);return w.shaderCount++,le(Ie,ce,Pe),Le||(ie[P]=Ie),pe.push(Ie),r(Ie,{destroy:function(){if(Ie.refCount--,Ie.refCount<=0){f.deleteProgram(Ie.program);var Ye=pe.indexOf(Ie);pe.splice(Ye,1),w.shaderCount--}ie[Ie.vertId].refCount<=0&&(f.deleteShader(j[Ie.vertId]),delete j[Ie.vertId],delete he[Ie.fragId][Ie.vertId]),Object.keys(he[Ie.fragId]).length||(f.deleteShader(J[Ie.fragId]),delete J[Ie.fragId],delete he[Ie.fragId])}})},restore:ue,shader:se,frag:-1,vert:-1}}var R_=6408,ds=5121,P_=3333,Ro=5126;function F_(f,p,w,H,J,j,X){function oe(pe){var me;p.next===null?(_(J.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),me=ds):(_(p.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),me=p.next.colorAttachments[0].texture._texture.type,_.optional(function(){j.oes_texture_float?(_(me===ds||me===Ro,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),me===Ro&&_(X.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):_(me===ds,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var ye=0,le=0,ue=H.framebufferWidth,P=H.framebufferHeight,W=null;t(pe)?W=pe:pe&&(_.type(pe,"object","invalid arguments to regl.read()"),ye=pe.x|0,le=pe.y|0,_(ye>=0&&ye=0&&le0&&ue+ye<=H.framebufferWidth,"invalid width for read pixels"),_(P>0&&P+le<=H.framebufferHeight,"invalid height for read pixels"),w();var ce=ue*P*4;return W||(me===ds?W=new Uint8Array(ce):me===Ro&&(W=W||new Float32Array(ce))),_.isTypedArray(W,"data buffer for regl.read() must be a typedarray"),_(W.byteLength>=ce,"data buffer for regl.read() too small"),f.pixelStorei(P_,4),f.readPixels(ye,le,ue,P,R_,me,W),W}function se(pe){var me;return p.setFBO({framebuffer:pe.framebuffer},function(){me=oe(pe)}),me}function he(pe){return!pe||!("framebuffer"in pe)?oe(pe):se(pe)}return he}function da(f){return Array.prototype.slice.call(f)}function ca(f){return da(f).join("")}function D_(){var f=0,p=[],w=[];function H(me){for(var ye=0;ye0&&(me.push(P,"="),me.push.apply(me,da(arguments)),me.push(";")),P}return r(ye,{def:ue,toString:function(){return ca([le.length>0?"var "+le.join(",")+";":"",ca(me)])}})}function j(){var me=J(),ye=J(),le=me.toString,ue=ye.toString;function P(W,ce){ye(W,ce,"=",me.def(W,ce),";")}return r(function(){me.apply(me,da(arguments))},{def:me.def,entry:me,exit:ye,save:P,set:function(W,ce,Pe){P(W,ce),me(W,ce,"=",Pe,";")},toString:function(){return le()+ue()}})}function X(){var me=ca(arguments),ye=j(),le=j(),ue=ye.toString,P=le.toString;return r(ye,{then:function(){return ye.apply(ye,da(arguments)),this},else:function(){return le.apply(le,da(arguments)),this},toString:function(){var W=P();return W&&(W="else{"+W+"}"),ca(["if(",me,"){",ue(),"}",W])}})}var oe=J(),se={};function he(me,ye){var le=[];function ue(){var ie="a"+le.length;return le.push(ie),ie}ye=ye||0;for(var P=0;P":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},an={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Rh={frag:B_,vert:$_},cc={cw:Ah,ccw:dc};function Wo(f){return Array.isArray(f)||t(f)||nr(f)}function Ph(f){return f.sort(function(p,w){return p===Pr?-1:w===Pr?1:p=1,H>=2,p)}else if(w===Po){var J=f.data;return new _i(J.thisDep,J.contextDep,J.propDep,p)}else{if(w===ah)return new _i(!1,!1,!1,p);if(w===sh){for(var j=!1,X=!1,oe=!1,se=0;se=1&&(X=!0),pe>=2&&(oe=!0)}else he.type===Po&&(j=j||he.data.thisDep,X=X||he.data.contextDep,oe=oe||he.data.propDep)}return new _i(j,X,oe,p)}else return new _i(w===Wd,w===Vd,w===Hd,p)}}var Fh=new _i(!1,!1,!1,function(){});function ib(f,p,w,H,J,j,X,oe,se,he,pe,me,ye,le,ue){var P=he.Record,W={add:32774,subtract:32778,"reverse subtract":32779};w.ext_blend_minmax&&(W.min=Z_,W.max=J_);var ce=w.angle_instanced_arrays,Pe=w.webgl_draw_buffers,ie=w.oes_vertex_array_object,Le={dirty:!0,profile:ue.profile},Ie={},Ye=[],Q={},Z={};function Ne(b){return b.replace(".","_")}function xe(b,m,E){var R=Ne(b);Ye.push(b),Ie[R]=Le[R]=!!E,Q[R]=m}function de(b,m,E){var R=Ne(b);Ye.push(b),Array.isArray(E)?(Le[R]=E.slice(),Ie[R]=E.slice()):Le[R]=Ie[R]=E,Z[R]=m}xe(oh,H_),xe(lh,j_),de(dh,"blendColor",[0,0,0,0]),de(Xd,"blendEquationSeparate",[Ch,Ch]),de(qd,"blendFuncSeparate",[kh,Ih,kh,Ih]),xe(ch,W_,!0),de(uh,"depthFunc",eb),de(fh,"depthRange",[0,1]),de(hh,"depthMask",!0),de(Yd,Yd,[!0,!0,!0,!0]),xe(mh,U_),de(ph,"cullFace",Pn),de(Kd,Kd,dc),de(Zd,Zd,1),xe(gh,q_),de(Jd,"polygonOffset",[0,0]),xe(vh,Y_),xe(_h,K_),de(Qd,"sampleCoverage",[1,!1]),xe(bh,V_),de(yh,"stencilMask",-1),de(ec,"stencilFunc",[Q_,0,-1]),de(tc,"stencilOpSeparate",[ys,nn,nn,nn]),de(cs,"stencilOpSeparate",[Pn,nn,nn,nn]),xe(xh,X_),de(Fo,"scissor",[0,0,f.drawingBufferWidth,f.drawingBufferHeight]),de(Pr,Pr,[0,0,f.drawingBufferWidth,f.drawingBufferHeight]);var Ee={gl:f,context:ye,strings:p,next:Ie,current:Le,draw:me,elements:j,buffer:J,shader:pe,attributes:he.state,vao:he,uniforms:se,framebuffer:oe,extensions:w,timer:le,isBufferArgs:Wo},Ae={primTypes:tn,compareFuncs:ga,blendFuncs:pr,blendEquations:W,stencilOps:an,glTypes:En,orientationType:cc};_.optional(function(){Ee.isArrayLike=Jt}),Pe&&(Ae.backBuffer=[Pn],Ae.drawBuffer=Vt(H.maxDrawbuffers,function(b){return b===0?[0]:Vt(b,function(m){return tb+m})}));var ot=0;function nt(){var b=D_(),m=b.link,E=b.global;b.id=ot++,b.batchId="0";var R=m(Ee),D=b.shared={props:"a0"};Object.keys(Ee).forEach(function(S){D[S]=E.def(R,".",S)}),_.optional(function(){b.CHECK=m(_),b.commandStr=_.guessCommand(),b.command=m(b.commandStr),b.assert=function(S,y,F){S("if(!(",y,"))",this.CHECK,".commandRaise(",m(F),",",this.command,");")},Ae.invalidBlendCombinations=Oh});var k=b.next={},A=b.current={};Object.keys(Z).forEach(function(S){Array.isArray(Le[S])&&(k[S]=E.def(D.next,".",S),A[S]=E.def(D.current,".",S))});var O=b.constants={};Object.keys(Ae).forEach(function(S){O[S]=E.def(JSON.stringify(Ae[S]))}),b.invoke=function(S,y){switch(y.type){case jd:var F=["this",D.context,D.props,b.batchId];return S.def(m(y.data),".call(",F.slice(0,Math.max(y.data.length+1,4)),")");case Hd:return S.def(D.props,y.data);case Vd:return S.def(D.context,y.data);case Wd:return S.def("this",y.data);case Po:return y.data.append(b,S),y.data.ref;case ah:return y.data.toString();case sh:return y.data.map(function(z){return b.invoke(S,z)})}},b.attribCache={};var v={};return b.scopeAttrib=function(S){var y=p.id(S);if(y in v)return v[y];var F=he.scope[y];F||(F=he.scope[y]=new P);var z=v[y]=m(F);return z},b}function ke(b){var m=b.static,E=b.dynamic,R;if(us in m){var D=!!m[us];R=ii(function(A,O){return D}),R.enable=D}else if(us in E){var k=E[us];R=Ui(k,function(A,O){return A.invoke(O,k)})}return R}function Re(b,m){var E=b.static,R=b.dynamic;if(Cn in E){var D=E[Cn];return D?(D=oe.getFramebuffer(D),_.command(D,"invalid framebuffer object"),ii(function(A,O){var v=A.link(D),S=A.shared;O.set(S.framebuffer,".next",v);var y=S.context;return O.set(y,"."+ha,v+".width"),O.set(y,"."+ma,v+".height"),v})):ii(function(A,O){var v=A.shared;O.set(v.framebuffer,".next","null");var S=v.context;return O.set(S,"."+ha,S+"."+Sh),O.set(S,"."+ma,S+"."+Eh),"null"})}else if(Cn in R){var k=R[Cn];return Ui(k,function(A,O){var v=A.invoke(O,k),S=A.shared,y=S.framebuffer,F=O.def(y,".getFramebuffer(",v,")");_.optional(function(){A.assert(O,"!"+v+"||"+F,"invalid framebuffer object")}),O.set(y,".next",F);var z=S.context;return O.set(z,"."+ha,F+"?"+F+".width:"+z+"."+Sh),O.set(z,"."+ma,F+"?"+F+".height:"+z+"."+Eh),F})}else return null}function et(b,m,E){var R=b.static,D=b.dynamic;function k(v){if(v in R){var S=R[v];_.commandType(S,"object","invalid "+v,E.commandStr);var y=!0,F=S.x|0,z=S.y|0,te,ve;return"width"in S?(te=S.width|0,_.command(te>=0,"invalid "+v,E.commandStr)):y=!1,"height"in S?(ve=S.height|0,_.command(ve>=0,"invalid "+v,E.commandStr)):y=!1,new _i(!y&&m&&m.thisDep,!y&&m&&m.contextDep,!y&&m&&m.propDep,function(ge,Be){var Fe=ge.shared.context,ze=te;"width"in S||(ze=Be.def(Fe,".",ha,"-",F));var Me=ve;return"height"in S||(Me=Be.def(Fe,".",ma,"-",z)),[F,z,ze,Me]})}else if(v in D){var _e=D[v],Ce=Ui(_e,function(ge,Be){var Fe=ge.invoke(Be,_e);_.optional(function(){ge.assert(Be,Fe+"&&typeof "+Fe+'==="object"',"invalid "+v)});var ze=ge.shared.context,Me=Be.def(Fe,".x|0"),$e=Be.def(Fe,".y|0"),tt=Be.def('"width" in ',Fe,"?",Fe,".width|0:","(",ze,".",ha,"-",Me,")"),Nt=Be.def('"height" in ',Fe,"?",Fe,".height|0:","(",ze,".",ma,"-",$e,")");return _.optional(function(){ge.assert(Be,tt+">=0&&"+Nt+">=0","invalid "+v)}),[Me,$e,tt,Nt]});return m&&(Ce.thisDep=Ce.thisDep||m.thisDep,Ce.contextDep=Ce.contextDep||m.contextDep,Ce.propDep=Ce.propDep||m.propDep),Ce}else return m?new _i(m.thisDep,m.contextDep,m.propDep,function(ge,Be){var Fe=ge.shared.context;return[0,0,Be.def(Fe,".",ha),Be.def(Fe,".",ma)]}):null}var A=k(Pr);if(A){var O=A;A=new _i(A.thisDep,A.contextDep,A.propDep,function(v,S){var y=O.append(v,S),F=v.shared.context;return S.set(F,"."+N_,y[2]),S.set(F,"."+z_,y[3]),y})}return{viewport:A,scissor_box:k(Fo)}}function st(b,m){var E=b.static,R=typeof E[hs]=="string"&&typeof E[fs]=="string";if(R){if(Object.keys(m.dynamic).length>0)return null;var D=m.static,k=Object.keys(D);if(k.length>0&&typeof D[k[0]]=="number"){for(var A=[],O=0;O=0,"invalid "+Be,m.commandStr),ii(function($e,tt){return Fe&&($e.OFFSET=ze),ze})}else if(Be in R){var Me=R[Be];return Ui(Me,function($e,tt){var Nt=$e.invoke(tt,Me);return Fe&&($e.OFFSET=Nt,_.optional(function(){$e.assert(tt,Nt+">=0","invalid "+Be)})),Nt})}else if(Fe){if(v)return ii(function($e,tt){return $e.OFFSET=0,0});if(k)return new _i(O.thisDep,O.contextDep,O.propDep,function($e,tt){return tt.def($e.shared.vao+".currentVAO?"+$e.shared.vao+".currentVAO.offset:0")})}else if(k)return new _i(O.thisDep,O.contextDep,O.propDep,function($e,tt){return tt.def($e.shared.vao+".currentVAO?"+$e.shared.vao+".currentVAO.instances:-1")});return null}var te=z(Do,!0);function ve(){if(Rn in E){var Be=E[Rn]|0;return D.count=Be,_.command(typeof Be=="number"&&Be>=0,"invalid vertex count",m.commandStr),ii(function(){return Be})}else if(Rn in R){var Fe=R[Rn];return Ui(Fe,function(tt,Nt){var Si=tt.invoke(Nt,Fe);return _.optional(function(){tt.assert(Nt,"typeof "+Si+'==="number"&&'+Si+">=0&&"+Si+"===("+Si+"|0)","invalid vertex count")}),Si})}else if(v)if(sn(y)){if(y)return te?new _i(te.thisDep,te.contextDep,te.propDep,function(tt,Nt){var Si=Nt.def(tt.ELEMENTS,".vertCount-",tt.OFFSET);return _.optional(function(){tt.assert(Nt,Si+">=0","invalid vertex offset/element buffer too small")}),Si}):ii(function(tt,Nt){return Nt.def(tt.ELEMENTS,".vertCount")});var ze=ii(function(){return-1});return _.optional(function(){ze.MISSING=!0}),ze}else{var Me=new _i(y.thisDep||te.thisDep,y.contextDep||te.contextDep,y.propDep||te.propDep,function(tt,Nt){var Si=tt.ELEMENTS;return tt.OFFSET?Nt.def(Si,"?",Si,".vertCount-",tt.OFFSET,":-1"):Nt.def(Si,"?",Si,".vertCount:-1")});return _.optional(function(){Me.DYNAMIC=!0}),Me}else if(k){var $e=new _i(O.thisDep,O.contextDep,O.propDep,function(tt,Nt){return Nt.def(tt.shared.vao,".currentVAO?",tt.shared.vao,".currentVAO.count:-1")});return $e}return null}var _e=F(),Ce=ve(),ge=z(No,!1);return{elements:y,primitive:_e,count:Ce,instances:ge,offset:te,vao:O,vaoActive:k,elementsActive:v,static:D}}function Yt(b,m){var E=b.static,R=b.dynamic,D={};return Ye.forEach(function(k){var A=Ne(k);function O(v,S){if(k in E){var y=v(E[k]);D[A]=ii(function(){return y})}else if(k in R){var F=R[k];D[A]=Ui(F,function(z,te){return S(z,te,z.invoke(te,F))})}}switch(k){case mh:case lh:case oh:case bh:case ch:case xh:case gh:case vh:case _h:case hh:return O(function(v){return _.commandType(v,"boolean",k,m.commandStr),v},function(v,S,y){return _.optional(function(){v.assert(S,"typeof "+y+'==="boolean"',"invalid flag "+k,v.commandStr)}),y});case uh:return O(function(v){return _.commandParameter(v,ga,"invalid "+k,m.commandStr),ga[v]},function(v,S,y){var F=v.constants.compareFuncs;return _.optional(function(){v.assert(S,y+" in "+F,"invalid "+k+", must be one of "+Object.keys(ga))}),S.def(F,"[",y,"]")});case fh:return O(function(v){return _.command(Jt(v)&&v.length===2&&typeof v[0]=="number"&&typeof v[1]=="number"&&v[0]<=v[1],"depth range is 2d array",m.commandStr),v},function(v,S,y){_.optional(function(){v.assert(S,v.shared.isArrayLike+"("+y+")&&"+y+".length===2&&typeof "+y+'[0]==="number"&&typeof '+y+'[1]==="number"&&'+y+"[0]<="+y+"[1]","depth range must be a 2d array")});var F=S.def("+",y,"[0]"),z=S.def("+",y,"[1]");return[F,z]});case qd:return O(function(v){_.commandType(v,"object","blend.func",m.commandStr);var S="srcRGB"in v?v.srcRGB:v.src,y="srcAlpha"in v?v.srcAlpha:v.src,F="dstRGB"in v?v.dstRGB:v.dst,z="dstAlpha"in v?v.dstAlpha:v.dst;return _.commandParameter(S,pr,A+".srcRGB",m.commandStr),_.commandParameter(y,pr,A+".srcAlpha",m.commandStr),_.commandParameter(F,pr,A+".dstRGB",m.commandStr),_.commandParameter(z,pr,A+".dstAlpha",m.commandStr),_.command(Oh.indexOf(S+", "+F)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+S+", "+F+")",m.commandStr),[pr[S],pr[F],pr[y],pr[z]]},function(v,S,y){var F=v.constants.blendFuncs;_.optional(function(){v.assert(S,y+"&&typeof "+y+'==="object"',"invalid blend func, must be an object")});function z(Fe,ze){var Me=S.def('"',Fe,ze,'" in ',y,"?",y,".",Fe,ze,":",y,".",Fe);return _.optional(function(){v.assert(S,Me+" in "+F,"invalid "+k+"."+Fe+ze+", must be one of "+Object.keys(pr))}),Me}var te=z("src","RGB"),ve=z("dst","RGB");_.optional(function(){var Fe=v.constants.invalidBlendCombinations;v.assert(S,Fe+".indexOf("+te+'+", "+'+ve+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var _e=S.def(F,"[",te,"]"),Ce=S.def(F,"[",z("src","Alpha"),"]"),ge=S.def(F,"[",ve,"]"),Be=S.def(F,"[",z("dst","Alpha"),"]");return[_e,ge,Ce,Be]});case Xd:return O(function(v){if(typeof v=="string")return _.commandParameter(v,W,"invalid "+k,m.commandStr),[W[v],W[v]];if(typeof v=="object")return _.commandParameter(v.rgb,W,k+".rgb",m.commandStr),_.commandParameter(v.alpha,W,k+".alpha",m.commandStr),[W[v.rgb],W[v.alpha]];_.commandRaise("invalid blend.equation",m.commandStr)},function(v,S,y){var F=v.constants.blendEquations,z=S.def(),te=S.def(),ve=v.cond("typeof ",y,'==="string"');return _.optional(function(){function _e(Ce,ge,Be){v.assert(Ce,Be+" in "+F,"invalid "+ge+", must be one of "+Object.keys(W))}_e(ve.then,k,y),v.assert(ve.else,y+"&&typeof "+y+'==="object"',"invalid "+k),_e(ve.else,k+".rgb",y+".rgb"),_e(ve.else,k+".alpha",y+".alpha")}),ve.then(z,"=",te,"=",F,"[",y,"];"),ve.else(z,"=",F,"[",y,".rgb];",te,"=",F,"[",y,".alpha];"),S(ve),[z,te]});case dh:return O(function(v){return _.command(Jt(v)&&v.length===4,"blend.color must be a 4d array",m.commandStr),Vt(4,function(S){return+v[S]})},function(v,S,y){return _.optional(function(){v.assert(S,v.shared.isArrayLike+"("+y+")&&"+y+".length===4","blend.color must be a 4d array")}),Vt(4,function(F){return S.def("+",y,"[",F,"]")})});case yh:return O(function(v){return _.commandType(v,"number",A,m.commandStr),v|0},function(v,S,y){return _.optional(function(){v.assert(S,"typeof "+y+'==="number"',"invalid stencil.mask")}),S.def(y,"|0")});case ec:return O(function(v){_.commandType(v,"object",A,m.commandStr);var S=v.cmp||"keep",y=v.ref||0,F="mask"in v?v.mask:-1;return _.commandParameter(S,ga,k+".cmp",m.commandStr),_.commandType(y,"number",k+".ref",m.commandStr),_.commandType(F,"number",k+".mask",m.commandStr),[ga[S],y,F]},function(v,S,y){var F=v.constants.compareFuncs;_.optional(function(){function _e(){v.assert(S,Array.prototype.join.call(arguments,""),"invalid stencil.func")}_e(y+"&&typeof ",y,'==="object"'),_e('!("cmp" in ',y,")||(",y,".cmp in ",F,")")});var z=S.def('"cmp" in ',y,"?",F,"[",y,".cmp]",":",nn),te=S.def(y,".ref|0"),ve=S.def('"mask" in ',y,"?",y,".mask|0:-1");return[z,te,ve]});case tc:case cs:return O(function(v){_.commandType(v,"object",A,m.commandStr);var S=v.fail||"keep",y=v.zfail||"keep",F=v.zpass||"keep";return _.commandParameter(S,an,k+".fail",m.commandStr),_.commandParameter(y,an,k+".zfail",m.commandStr),_.commandParameter(F,an,k+".zpass",m.commandStr),[k===cs?Pn:ys,an[S],an[y],an[F]]},function(v,S,y){var F=v.constants.stencilOps;_.optional(function(){v.assert(S,y+"&&typeof "+y+'==="object"',"invalid "+k)});function z(te){return _.optional(function(){v.assert(S,'!("'+te+'" in '+y+")||("+y+"."+te+" in "+F+")","invalid "+k+"."+te+", must be one of "+Object.keys(an))}),S.def('"',te,'" in ',y,"?",F,"[",y,".",te,"]:",nn)}return[k===cs?Pn:ys,z("fail"),z("zfail"),z("zpass")]});case Jd:return O(function(v){_.commandType(v,"object",A,m.commandStr);var S=v.factor|0,y=v.units|0;return _.commandType(S,"number",A+".factor",m.commandStr),_.commandType(y,"number",A+".units",m.commandStr),[S,y]},function(v,S,y){_.optional(function(){v.assert(S,y+"&&typeof "+y+'==="object"',"invalid "+k)});var F=S.def(y,".factor|0"),z=S.def(y,".units|0");return[F,z]});case ph:return O(function(v){var S=0;return v==="front"?S=ys:v==="back"&&(S=Pn),_.command(!!S,A,m.commandStr),S},function(v,S,y){return _.optional(function(){v.assert(S,y+'==="front"||'+y+'==="back"',"invalid cull.face")}),S.def(y,'==="front"?',ys,":",Pn)});case Zd:return O(function(v){return _.command(typeof v=="number"&&v>=H.lineWidthDims[0]&&v<=H.lineWidthDims[1],"invalid line width, must be a positive number between "+H.lineWidthDims[0]+" and "+H.lineWidthDims[1],m.commandStr),v},function(v,S,y){return _.optional(function(){v.assert(S,"typeof "+y+'==="number"&&'+y+">="+H.lineWidthDims[0]+"&&"+y+"<="+H.lineWidthDims[1],"invalid line width")}),y});case Kd:return O(function(v){return _.commandParameter(v,cc,A,m.commandStr),cc[v]},function(v,S,y){return _.optional(function(){v.assert(S,y+'==="cw"||'+y+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),S.def(y+'==="cw"?'+Ah+":"+dc)});case Yd:return O(function(v){return _.command(Jt(v)&&v.length===4,"color.mask must be length 4 array",m.commandStr),v.map(function(S){return!!S})},function(v,S,y){return _.optional(function(){v.assert(S,v.shared.isArrayLike+"("+y+")&&"+y+".length===4","invalid color.mask")}),Vt(4,function(F){return"!!"+y+"["+F+"]"})});case Qd:return O(function(v){_.command(typeof v=="object"&&v,A,m.commandStr);var S="value"in v?v.value:1,y=!!v.invert;return _.command(typeof S=="number"&&S>=0&&S<=1,"sample.coverage.value must be a number between 0 and 1",m.commandStr),[S,y]},function(v,S,y){_.optional(function(){v.assert(S,y+"&&typeof "+y+'==="object"',"invalid sample.coverage")});var F=S.def('"value" in ',y,"?+",y,".value:1"),z=S.def("!!",y,".invert");return[F,z]})}}),D}function pt(b,m){var E=b.static,R=b.dynamic,D={};return Object.keys(E).forEach(function(k){var A=E[k],O;if(typeof A=="number"||typeof A=="boolean")O=ii(function(){return A});else if(typeof A=="function"){var v=A._reglType;v==="texture2d"||v==="textureCube"?O=ii(function(S){return S.link(A)}):v==="framebuffer"||v==="framebufferCube"?(_.command(A.color.length>0,'missing color attachment for framebuffer sent to uniform "'+k+'"',m.commandStr),O=ii(function(S){return S.link(A.color[0])})):_.commandRaise('invalid data for uniform "'+k+'"',m.commandStr)}else Jt(A)?O=ii(function(S){var y=S.global.def("[",Vt(A.length,function(F){return _.command(typeof A[F]=="number"||typeof A[F]=="boolean","invalid uniform "+k,S.commandStr),A[F]}),"]");return y}):_.commandRaise('invalid or missing data for uniform "'+k+'"',m.commandStr);O.value=A,D[k]=O}),Object.keys(R).forEach(function(k){var A=R[k];D[k]=Ui(A,function(O,v){return O.invoke(v,A)})}),D}function li(b,m){var E=b.static,R=b.dynamic,D={};return Object.keys(E).forEach(function(k){var A=E[k],O=p.id(k),v=new P;if(Wo(A))v.state=fa,v.buffer=J.getBuffer(J.create(A,pa,!1,!0)),v.type=0;else{var S=J.getBuffer(A);if(S)v.state=fa,v.buffer=S,v.type=0;else if(_.command(typeof A=="object"&&A,"invalid data for attribute "+k,m.commandStr),"constant"in A){var y=A.constant;v.buffer="null",v.state=Ud,typeof y=="number"?v.x=y:(_.command(Jt(y)&&y.length>0&&y.length<=4,"invalid constant for attribute "+k,m.commandStr),ua.forEach(function(ge,Be){Be=0,'invalid offset for attribute "'+k+'"',m.commandStr);var z=A.stride|0;_.command(z>=0&&z<256,'invalid stride for attribute "'+k+'", must be integer betweeen [0, 255]',m.commandStr);var te=A.size|0;_.command(!("size"in A)||te>0&&te<=4,'invalid size for attribute "'+k+'", must be 1,2,3,4',m.commandStr);var ve=!!A.normalized,_e=0;"type"in A&&(_.commandParameter(A.type,En,"invalid type for attribute "+k,m.commandStr),_e=En[A.type]);var Ce=A.divisor|0;_.optional(function(){"divisor"in A&&(_.command(Ce===0||ce,'cannot specify divisor for attribute "'+k+'", instancing not supported',m.commandStr),_.command(Ce>=0,'invalid divisor for attribute "'+k+'"',m.commandStr));var ge=m.commandStr,Be=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(A).forEach(function(Fe){_.command(Be.indexOf(Fe)>=0,'unknown parameter "'+Fe+'" for attribute pointer "'+k+'" (valid parameters are '+Be+")",ge)})}),v.buffer=S,v.state=fa,v.size=te,v.normalized=ve,v.type=_e||S.dtype,v.offset=F,v.stride=z,v.divisor=Ce}}D[k]=ii(function(ge,Be){var Fe=ge.attribCache;if(O in Fe)return Fe[O];var ze={isStream:!1};return Object.keys(v).forEach(function(Me){ze[Me]=v[Me]}),v.buffer&&(ze.buffer=ge.link(v.buffer),ze.type=ze.type||ze.buffer+".dtype"),Fe[O]=ze,ze})}),Object.keys(R).forEach(function(k){var A=R[k];function O(v,S){var y=v.invoke(S,A),F=v.shared,z=v.constants,te=F.isBufferArgs,ve=F.buffer;_.optional(function(){v.assert(S,y+"&&(typeof "+y+'==="object"||typeof '+y+'==="function")&&('+te+"("+y+")||"+ve+".getBuffer("+y+")||"+ve+".getBuffer("+y+".buffer)||"+te+"("+y+'.buffer)||("constant" in '+y+"&&(typeof "+y+'.constant==="number"||'+F.isArrayLike+"("+y+".constant))))",'invalid dynamic attribute "'+k+'"')});var _e={isStream:S.def(!1)},Ce=new P;Ce.state=fa,Object.keys(Ce).forEach(function(ze){_e[ze]=S.def(""+Ce[ze])});var ge=_e.buffer,Be=_e.type;S("if(",te,"(",y,")){",_e.isStream,"=true;",ge,"=",ve,".createStream(",pa,",",y,");",Be,"=",ge,".dtype;","}else{",ge,"=",ve,".getBuffer(",y,");","if(",ge,"){",Be,"=",ge,".dtype;",'}else if("constant" in ',y,"){",_e.state,"=",Ud,";","if(typeof "+y+'.constant === "number"){',_e[ua[0]],"=",y,".constant;",ua.slice(1).map(function(ze){return _e[ze]}).join("="),"=0;","}else{",ua.map(function(ze,Me){return _e[ze]+"="+y+".constant.length>"+Me+"?"+y+".constant["+Me+"]:0;"}).join(""),"}}else{","if(",te,"(",y,".buffer)){",ge,"=",ve,".createStream(",pa,",",y,".buffer);","}else{",ge,"=",ve,".getBuffer(",y,".buffer);","}",Be,'="type" in ',y,"?",z.glTypes,"[",y,".type]:",ge,".dtype;",_e.normalized,"=!!",y,".normalized;");function Fe(ze){S(_e[ze],"=",y,".",ze,"|0;")}return Fe("size"),Fe("offset"),Fe("stride"),Fe("divisor"),S("}}"),S.exit("if(",_e.isStream,"){",ve,".destroyStream(",ge,");","}"),_e}D[k]=Ui(A,O)}),D}function Ht(b){var m=b.static,E=b.dynamic,R={};return Object.keys(m).forEach(function(D){var k=m[D];R[D]=ii(function(A,O){return typeof k=="number"||typeof k=="boolean"?""+k:A.link(k)})}),Object.keys(E).forEach(function(D){var k=E[D];R[D]=Ui(k,function(A,O){return A.invoke(O,k)})}),R}function ri(b,m,E,R,D){var k=b.static,A=b.dynamic;_.optional(function(){var Fe=[Cn,fs,hs,Ln,On,Do,Rn,No,us,ms].concat(Ye);function ze(Me){Object.keys(Me).forEach(function($e){_.command(Fe.indexOf($e)>=0,'unknown parameter "'+$e+'"',D.commandStr)})}ze(k),ze(A)});var O=st(b,m),v=Re(b),S=et(b,v,D),y=Wt(b,D),F=Yt(b,D),z=ft(b,D,O);function te(Fe){var ze=S[Fe];ze&&(F[Fe]=ze)}te(Pr),te(Ne(Fo));var ve=Object.keys(F).length>0,_e={framebuffer:v,draw:y,shader:z,state:F,dirty:ve,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(_e.profile=ke(b),_e.uniforms=pt(E,D),_e.drawVAO=_e.scopeVAO=y.vao,!_e.drawVAO&&z.program&&!O&&w.angle_instanced_arrays&&y.static.elements){var Ce=!0,ge=z.program.attributes.map(function(Fe){var ze=m.static[Fe];return Ce=Ce&&!!ze,ze});if(Ce&&ge.length>0){var Be=he.getVAO(he.createVAO({attributes:ge,elements:y.static.elements}));_e.drawVAO=new _i(null,null,null,function(Fe,ze){return Fe.link(Be)}),_e.useVAO=!0}}return O?_e.useVAO=!0:_e.attributes=li(m,D),_e.context=Ht(R),_e}function di(b,m,E){var R=b.shared,D=R.context,k=b.scope();Object.keys(E).forEach(function(A){m.save(D,"."+A);var O=E[A],v=O.append(b,m);Array.isArray(v)?k(D,".",A,"=[",v.join(),"];"):k(D,".",A,"=",v,";")}),m(k)}function ci(b,m,E,R){var D=b.shared,k=D.gl,A=D.framebuffer,O;Pe&&(O=m.def(D.extensions,".webgl_draw_buffers"));var v=b.constants,S=v.drawBuffer,y=v.backBuffer,F;E?F=E.append(b,m):F=m.def(A,".next"),R||m("if(",F,"!==",A,".cur){"),m("if(",F,"){",k,".bindFramebuffer(",Lh,",",F,".framebuffer);"),Pe&&m(O,".drawBuffersWEBGL(",S,"[",F,".colorAttachments.length]);"),m("}else{",k,".bindFramebuffer(",Lh,",null);"),Pe&&m(O,".drawBuffersWEBGL(",y,");"),m("}",A,".cur=",F,";"),R||m("}")}function wi(b,m,E){var R=b.shared,D=R.gl,k=b.current,A=b.next,O=R.current,v=R.next,S=b.cond(O,".dirty");Ye.forEach(function(y){var F=Ne(y);if(!(F in E.state)){var z,te;if(F in A){z=A[F],te=k[F];var ve=Vt(Le[F].length,function(Ce){return S.def(z,"[",Ce,"]")});S(b.cond(ve.map(function(Ce,ge){return Ce+"!=="+te+"["+ge+"]"}).join("||")).then(D,".",Z[F],"(",ve,");",ve.map(function(Ce,ge){return te+"["+ge+"]="+Ce}).join(";"),";"))}else{z=S.def(v,".",F);var _e=b.cond(z,"!==",O,".",F);S(_e),F in Q?_e(b.cond(z).then(D,".enable(",Q[F],");").else(D,".disable(",Q[F],");"),O,".",F,"=",z,";"):_e(D,".",Z[F],"(",z,");",O,".",F,"=",z,";")}}}),Object.keys(E.state).length===0&&S(O,".dirty=false;"),m(S)}function Ai(b,m,E,R){var D=b.shared,k=b.current,A=D.current,O=D.gl;Ph(Object.keys(E)).forEach(function(v){var S=E[v];if(!(R&&!R(S))){var y=S.append(b,m);if(Q[v]){var F=Q[v];sn(S)?y?m(O,".enable(",F,");"):m(O,".disable(",F,");"):m(b.cond(y).then(O,".enable(",F,");").else(O,".disable(",F,");")),m(A,".",v,"=",y,";")}else if(Jt(y)){var z=k[v];m(O,".",Z[v],"(",y,");",y.map(function(te,ve){return z+"["+ve+"]="+te}).join(";"),";")}else m(O,".",Z[v],"(",y,");",A,".",v,"=",y,";")}})}function Qt(b,m){ce&&(b.instancing=m.def(b.shared.extensions,".angle_instanced_arrays"))}function lt(b,m,E,R,D){var k=b.shared,A=b.stats,O=k.current,v=k.timer,S=E.profile;function y(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var F,z;function te(Fe){F=m.def(),Fe(F,"=",y(),";"),typeof D=="string"?Fe(A,".count+=",D,";"):Fe(A,".count++;"),le&&(R?(z=m.def(),Fe(z,"=",v,".getNumPendingQueries();")):Fe(v,".beginQuery(",A,");"))}function ve(Fe){Fe(A,".cpuTime+=",y(),"-",F,";"),le&&(R?Fe(v,".pushScopeStats(",z,",",v,".getNumPendingQueries(),",A,");"):Fe(v,".endQuery();"))}function _e(Fe){var ze=m.def(O,".profile");m(O,".profile=",Fe,";"),m.exit(O,".profile=",ze,";")}var Ce;if(S){if(sn(S)){S.enable?(te(m),ve(m.exit),_e("true")):_e("false");return}Ce=S.append(b,m),_e(Ce)}else Ce=m.def(O,".profile");var ge=b.block();te(ge),m("if(",Ce,"){",ge,"}");var Be=b.block();ve(Be),m.exit("if(",Ce,"){",Be,"}")}function Ii(b,m,E,R,D){var k=b.shared;function A(v){switch(v){case zo:case $o:case jo:return 2;case Mo:case Go:case Ho:return 3;case Bo:case Uo:case Vo:return 4;default:return 1}}function O(v,S,y){var F=k.gl,z=m.def(v,".location"),te=m.def(k.attributes,"[",z,"]"),ve=y.state,_e=y.buffer,Ce=[y.x,y.y,y.z,y.w],ge=["buffer","normalized","offset","stride"];function Be(){m("if(!",te,".buffer){",F,".enableVertexAttribArray(",z,");}");var ze=y.type,Me;if(y.size?Me=m.def(y.size,"||",S):Me=S,m("if(",te,".type!==",ze,"||",te,".size!==",Me,"||",ge.map(function(tt){return te+"."+tt+"!=="+y[tt]}).join("||"),"){",F,".bindBuffer(",pa,",",_e,".buffer);",F,".vertexAttribPointer(",[z,Me,ze,y.normalized,y.stride,y.offset],");",te,".type=",ze,";",te,".size=",Me,";",ge.map(function(tt){return te+"."+tt+"="+y[tt]+";"}).join(""),"}"),ce){var $e=y.divisor;m("if(",te,".divisor!==",$e,"){",b.instancing,".vertexAttribDivisorANGLE(",[z,$e],");",te,".divisor=",$e,";}")}}function Fe(){m("if(",te,".buffer){",F,".disableVertexAttribArray(",z,");",te,".buffer=null;","}if(",ua.map(function(ze,Me){return te+"."+ze+"!=="+Ce[Me]}).join("||"),"){",F,".vertexAttrib4f(",z,",",Ce,");",ua.map(function(ze,Me){return te+"."+ze+"="+Ce[Me]+";"}).join(""),"}")}ve===fa?Be():ve===Ud?Fe():(m("if(",ve,"===",fa,"){"),Be(),m("}else{"),Fe(),m("}"))}R.forEach(function(v){var S=v.name,y=E.attributes[S],F;if(y){if(!D(y))return;F=y.append(b,m)}else{if(!D(Fh))return;var z=b.scopeAttrib(S);_.optional(function(){b.assert(m,z+".state","missing attribute "+S)}),F={},Object.keys(new P).forEach(function(te){F[te]=m.def(z,".",te)})}O(b.link(v),A(v.info.type),F)})}function At(b,m,E,R,D,k){for(var A=b.shared,O=A.gl,v,S=0;S1){for(var Si=[],Fr=[],Dr=0;Dr=0","missing vertex count")})):($e=tt.def(A,".",Rn),_.optional(function(){b.assert(tt,$e+">=0","missing vertex count")})),$e}var y=v();function F(Me){var $e=O[Me];return $e?$e.contextDep&&R.contextDynamic||$e.propDep?$e.append(b,E):$e.append(b,m):m.def(A,".",Me)}var z=F(On),te=F(Do),ve=S();if(typeof ve=="number"){if(ve===0)return}else E("if(",ve,"){"),E.exit("}");var _e,Ce;ce&&(_e=F(No),Ce=b.instancing);var ge=y+".type",Be=O.elements&&sn(O.elements)&&!O.vaoActive;function Fe(){function Me(){E(Ce,".drawElementsInstancedANGLE(",[z,ve,ge,te+"<<(("+ge+"-"+nh+")>>1)",_e],");")}function $e(){E(Ce,".drawArraysInstancedANGLE(",[z,te,ve,_e],");")}y&&y!=="null"?Be?Me():(E("if(",y,"){"),Me(),E("}else{"),$e(),E("}")):$e()}function ze(){function Me(){E(k+".drawElements("+[z,ve,ge,te+"<<(("+ge+"-"+nh+")>>1)"]+");")}function $e(){E(k+".drawArrays("+[z,te,ve]+");")}y&&y!=="null"?Be?Me():(E("if(",y,"){"),Me(),E("}else{"),$e(),E("}")):$e()}ce&&(typeof _e!="number"||_e>=0)?typeof _e=="string"?(E("if(",_e,">0){"),Fe(),E("}else if(",_e,"<0){"),ze(),E("}")):Fe():ze()}function ht(b,m,E,R,D){var k=nt(),A=k.proc("body",D);return _.optional(function(){k.commandStr=m.commandStr,k.command=k.link(m.commandStr)}),ce&&(k.instancing=A.def(k.shared.extensions,".angle_instanced_arrays")),b(k,A,E,R),k.compile().body}function _t(b,m,E,R){Qt(b,m),E.useVAO?E.drawVAO?m(b.shared.vao,".setVAO(",E.drawVAO.append(b,m),");"):m(b.shared.vao,".setVAO(",b.shared.vao,".targetVAO);"):(m(b.shared.vao,".setVAO(null);"),Ii(b,m,E,R.attributes,function(){return!0})),At(b,m,E,R.uniforms,function(){return!0},!1),Qe(b,m,m,E)}function ei(b,m){var E=b.proc("draw",1);Qt(b,E),di(b,E,m.context),ci(b,E,m.framebuffer),wi(b,E,m),Ai(b,E,m.state),lt(b,E,m,!1,!0);var R=m.shader.progVar.append(b,E);if(E(b.shared.gl,".useProgram(",R,".program);"),m.shader.program)_t(b,E,m,m.shader.program);else{E(b.shared.vao,".setVAO(null);");var D=b.global.def("{}"),k=E.def(R,".id"),A=E.def(D,"[",k,"]");E(b.cond(A).then(A,".call(this,a0);").else(A,"=",D,"[",k,"]=",b.link(function(O){return ht(_t,b,m,O,1)}),"(",R,");",A,".call(this,a0);"))}Object.keys(m.state).length>0&&E(b.shared.current,".dirty=true;"),b.shared.vao&&E(b.shared.vao,".setVAO(null);")}function gr(b,m,E,R){b.batchId="a1",Qt(b,m);function D(){return!0}Ii(b,m,E,R.attributes,D),At(b,m,E,R.uniforms,D,!1),Qe(b,m,m,E)}function Fn(b,m,E,R){Qt(b,m);var D=E.contextDep,k=m.def(),A="a0",O="a1",v=m.def();b.shared.props=v,b.batchId=k;var S=b.scope(),y=b.scope();m(S.entry,"for(",k,"=0;",k,"<",O,";++",k,"){",v,"=",A,"[",k,"];",y,"}",S.exit);function F(ge){return ge.contextDep&&D||ge.propDep}function z(ge){return!F(ge)}if(E.needsContext&&di(b,y,E.context),E.needsFramebuffer&&ci(b,y,E.framebuffer),Ai(b,y,E.state,F),E.profile&&F(E.profile)&<(b,y,E,!1,!0),R)E.useVAO?E.drawVAO?F(E.drawVAO)?y(b.shared.vao,".setVAO(",E.drawVAO.append(b,y),");"):S(b.shared.vao,".setVAO(",E.drawVAO.append(b,S),");"):S(b.shared.vao,".setVAO(",b.shared.vao,".targetVAO);"):(S(b.shared.vao,".setVAO(null);"),Ii(b,S,E,R.attributes,z),Ii(b,y,E,R.attributes,F)),At(b,S,E,R.uniforms,z,!1),At(b,y,E,R.uniforms,F,!0),Qe(b,S,y,E);else{var te=b.global.def("{}"),ve=E.shader.progVar.append(b,y),_e=y.def(ve,".id"),Ce=y.def(te,"[",_e,"]");y(b.shared.gl,".useProgram(",ve,".program);","if(!",Ce,"){",Ce,"=",te,"[",_e,"]=",b.link(function(ge){return ht(gr,b,E,ge,2)}),"(",ve,");}",Ce,".call(this,a0[",k,"],",k,");")}}function x(b,m){var E=b.proc("batch",2);b.batchId="0",Qt(b,E);var R=!1,D=!0;Object.keys(m.context).forEach(function(te){R=R||m.context[te].propDep}),R||(di(b,E,m.context),D=!1);var k=m.framebuffer,A=!1;k?(k.propDep?R=A=!0:k.contextDep&&R&&(A=!0),A||ci(b,E,k)):ci(b,E,null),m.state.viewport&&m.state.viewport.propDep&&(R=!0);function O(te){return te.contextDep&&R||te.propDep}wi(b,E,m),Ai(b,E,m.state,function(te){return!O(te)}),(!m.profile||!O(m.profile))&<(b,E,m,!1,"a1"),m.contextDep=R,m.needsContext=D,m.needsFramebuffer=A;var v=m.shader.progVar;if(v.contextDep&&R||v.propDep)Fn(b,E,m,null);else{var S=v.append(b,E);if(E(b.shared.gl,".useProgram(",S,".program);"),m.shader.program)Fn(b,E,m,m.shader.program);else{E(b.shared.vao,".setVAO(null);");var y=b.global.def("{}"),F=E.def(S,".id"),z=E.def(y,"[",F,"]");E(b.cond(z).then(z,".call(this,a0,a1);").else(z,"=",y,"[",F,"]=",b.link(function(te){return ht(Fn,b,m,te,2)}),"(",S,");",z,".call(this,a0,a1);"))}}Object.keys(m.state).length>0&&E(b.shared.current,".dirty=true;"),b.shared.vao&&E(b.shared.vao,".setVAO(null);")}function V(b,m){var E=b.proc("scope",3);b.batchId="a2";var R=b.shared,D=R.current;di(b,E,m.context),m.framebuffer&&m.framebuffer.append(b,E),Ph(Object.keys(m.state)).forEach(function(A){var O=m.state[A],v=O.append(b,E);Jt(v)?v.forEach(function(S,y){E.set(b.next[A],"["+y+"]",S)}):E.set(R.next,"."+A,v)}),lt(b,E,m,!0,!0),[Ln,Do,Rn,No,On].forEach(function(A){var O=m.draw[A];O&&E.set(R.draw,"."+A,""+O.append(b,E))}),Object.keys(m.uniforms).forEach(function(A){var O=m.uniforms[A].append(b,E);Array.isArray(O)&&(O="["+O.join()+"]"),E.set(R.uniforms,"["+p.id(A)+"]",O)}),Object.keys(m.attributes).forEach(function(A){var O=m.attributes[A].append(b,E),v=b.scopeAttrib(A);Object.keys(new P).forEach(function(S){E.set(v,"."+S,O[S])})}),m.scopeVAO&&E.set(R.vao,".targetVAO",m.scopeVAO.append(b,E));function k(A){var O=m.shader[A];O&&E.set(R.shader,"."+A,O.append(b,E))}k(fs),k(hs),Object.keys(m.state).length>0&&(E(D,".dirty=true;"),E.exit(D,".dirty=true;")),E("a1(",b.shared.context,",a0,",b.batchId,");")}function B(b){if(!(typeof b!="object"||Jt(b))){for(var m=Object.keys(b),E=0;E=0;--Qe){var ht=Ae[Qe];ht&&ht(le,null,0)}w.flush(),he&&he.update()}function st(){!Re&&Ae.length>0&&(Re=ti.next(et))}function ft(){Re&&(ti.cancel(et),Re=null)}function Wt(Qe){Qe.preventDefault(),J=!0,ft(),ot.forEach(function(ht){ht()})}function Yt(Qe){w.getError(),J=!1,j.restore(),Ie.restore(),ce.restore(),Ye.restore(),Q.restore(),Z.restore(),ie.restore(),he&&he.restore(),Ne.procs.refresh(),st(),nt.forEach(function(ht){ht()})}Ee&&(Ee.addEventListener(Nh,Wt,!1),Ee.addEventListener(zh,Yt,!1));function pt(){Ae.length=0,ft(),Ee&&(Ee.removeEventListener(Nh,Wt),Ee.removeEventListener(zh,Yt)),Ie.clear(),Z.clear(),Q.clear(),ie.clear(),Ye.clear(),Pe.clear(),ce.clear(),he&&he.clear(),ke.forEach(function(Qe){Qe()})}function li(Qe){_(!!Qe,"invalid args to regl({...})"),_.type(Qe,"object","invalid args to regl({...})");function ht(D){var k=r({},D);delete k.uniforms,delete k.attributes,delete k.context,delete k.vao,"stencil"in k&&k.stencil.op&&(k.stencil.opBack=k.stencil.opFront=k.stencil.op,delete k.stencil.op);function A(O){if(O in k){var v=k[O];delete k[O],Object.keys(v).forEach(function(S){k[O+"."+S]=v[S]})}}return A("blend"),A("depth"),A("cull"),A("stencil"),A("polygonOffset"),A("scissor"),A("sample"),"vao"in D&&(k.vao=D.vao),k}function _t(D,k){var A={},O={};return Object.keys(D).forEach(function(v){var S=D[v];if(Pt.isDynamic(S)){O[v]=Pt.unbox(S,v);return}else if(k&&Array.isArray(S)){for(var y=0;y0)return ut.call(this,E(D|0),D|0)}else if(Array.isArray(D)){if(D.length)return ut.call(this,D,D.length)}else return De.call(this,D)}return r(R,{stats:V,destroy:function(){B.destroy()}})}var Ht=Z.setFBO=li({framebuffer:Pt.define.call(null,Mh,"framebuffer")});function ri(Qe,ht){var _t=0;Ne.procs.poll();var ei=ht.color;ei&&(w.clearColor(+ei[0]||0,+ei[1]||0,+ei[2]||0,+ei[3]||0),_t|=ob),"depth"in ht&&(w.clearDepth(+ht.depth),_t|=lb),"stencil"in ht&&(w.clearStencil(ht.stencil|0),_t|=db),_(!!_t,"called regl.clear with no buffer specified"),w.clear(_t)}function di(Qe){if(_(typeof Qe=="object"&&Qe,"regl.clear() takes an object as input"),"framebuffer"in Qe)if(Qe.framebuffer&&Qe.framebuffer_reglType==="framebufferCube")for(var ht=0;ht<6;++ht)Ht(r({framebuffer:Qe.framebuffer.faces[ht]},Qe),ri);else Ht(Qe,ri);else ri(null,Qe)}function ci(Qe){_.type(Qe,"function","regl.frame() callback must be a function"),Ae.push(Qe);function ht(){var _t=Bh(Ae,Qe);_(_t>=0,"cannot cancel a frame twice");function ei(){var gr=Bh(Ae,ei);Ae[gr]=Ae[Ae.length-1],Ae.length-=1,Ae.length<=0&&ft()}Ae[_t]=ei}return st(),{cancel:ht}}function wi(){var Qe=de.viewport,ht=de.scissor_box;Qe[0]=Qe[1]=ht[0]=ht[1]=0,le.viewportWidth=le.framebufferWidth=le.drawingBufferWidth=Qe[2]=ht[2]=w.drawingBufferWidth,le.viewportHeight=le.framebufferHeight=le.drawingBufferHeight=Qe[3]=ht[3]=w.drawingBufferHeight}function Ai(){le.tick+=1,le.time=lt(),wi(),Ne.procs.poll()}function Qt(){Ye.refresh(),wi(),Ne.procs.refresh(),he&&he.update()}function lt(){return(Zt()-pe)/1e3}Qt();function Ii(Qe,ht){_.type(ht,"function","listener callback must be a function");var _t;switch(Qe){case"frame":return ci(ht);case"lost":_t=ot;break;case"restore":_t=nt;break;case"destroy":_t=ke;break;default:_.raise("invalid event, must be one of frame,lost,restore,destroy")}return _t.push(ht),{cancel:function(){for(var ei=0;ei<_t.length;++ei)if(_t[ei]===ht){_t[ei]=_t[_t.length-1],_t.pop();return}}}}var At=r(li,{clear:di,prop:Pt.define.bind(null,Mh),context:Pt.define.bind(null,ub),this:Pt.define.bind(null,fb),draw:li({}),buffer:function(Qe){return ce.create(Qe,cb,!1,!1)},elements:function(Qe){return Pe.create(Qe,!1)},texture:Ye.create2D,cube:Ye.createCube,renderbuffer:Q.create,framebuffer:Z.create,framebufferCube:Z.createCube,vao:ie.createVAO,attributes:H,frame:ci,on:Ii,limits:W,hasExtension:function(Qe){return W.extensions.indexOf(Qe.toLowerCase())>=0},read:xe,destroy:pt,_gl:w,_refresh:Qt,poll:function(){Ai(),he&&he.update()},now:lt,stats:oe});return p.onDone(null,At),At}return hb})})(yg);var W1=yg.exports;const X1=_g(W1);function hl(i,e){return i==null||e==null?NaN:ie?1:i>=e?0:NaN}function q1(i,e){return i==null||e==null?NaN:ei?1:e>=i?0:NaN}function Eu(i){let e,t,r;i.length!==2?(e=hl,t=(o,l)=>hl(i(o),l),r=(o,l)=>i(o)-l):(e=i===hl||i===q1?i:Y1,t=i,r=i);function n(o,l,d=0,c=o.length){if(d>>1;t(o[u],l)<0?d=u+1:c=u}while(d>>1;t(o[u],l)<=0?d=u+1:c=u}while(dd&&r(o[u-1],l)>-r(o[u],l)?u-1:u}return{left:n,center:s,right:a}}function Y1(){return 0}function K1(i){return i===null?NaN:+i}const Z1=Eu(hl),J1=Z1.right;Eu(K1).center;function Xs(i,e){let t,r;for(const n of i)n!=null&&(t===void 0?n>=n&&(t=r=n):(t>n&&(t=n),r=r.length)return t(a);const o=new Q1,l=r[s++];let d=-1;for(const c of a){const u=l(c,++d,a),h=o.get(u);h?h.push(c):o.set(u,[c])}for(const[c,u]of o)o.set(c,n(u,s));return e(o)}(i,0)}const sw=Math.sqrt(50),ow=Math.sqrt(10),lw=Math.sqrt(2);function Al(i,e,t){const r=(e-i)/Math.max(0,t),n=Math.floor(Math.log10(r)),a=r/Math.pow(10,n),s=a>=sw?10:a>=ow?5:a>=lw?2:1;let o,l,d;return n<0?(d=Math.pow(10,-n)/s,o=Math.round(i*d),l=Math.round(e*d),o/de&&--l,d=-d):(d=Math.pow(10,n)*s,o=Math.round(i/d),l=Math.round(e/d),o*de&&--l),l0))return[];if(i===e)return[i];const r=e=n))return[];const o=a-n+1,l=new Array(o);if(r)if(s<0)for(let d=0;de&&(t=i,i=e,e=t),function(r){return Math.max(i,Math.min(e,r))}}function pw(i,e,t){var r=i[0],n=i[1],a=e[0],s=e[1];return n2?gw:pw,l=d=null,u}function u(h){return h==null||isNaN(h=+h)?a:(l||(l=o(i.map(r),e,t)))(r(s(h)))}return u.invert=function(h){return s(n((d||(d=o(e,i.map(r),dr)))(h)))},u.domain=function(h){return arguments.length?(i=Array.from(h,hw),c()):i.slice()},u.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},u.rangeRound=function(h){return e=Array.from(h),t=Ox,c()},u.clamp=function(h){return arguments.length?(s=h?!0:yr,c()):s!==yr},u.interpolate=function(h){return arguments.length?(t=h,c()):t},u.unknown=function(h){return arguments.length?(a=h,u):a},function(h,g){return r=h,n=g,c()}}function xg(){return Tu()(yr,yr)}function vw(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function Il(i,e){if((t=(i=e?i.toExponential(e-1):i.toExponential()).indexOf("e"))<0)return null;var t,r=i.slice(0,t);return[r.length>1?r[0]+r.slice(2):r,+i.slice(t+1)]}function Ga(i){return i=Il(Math.abs(i)),i?i[1]:NaN}function _w(i,e){return function(t,r){for(var n=t.length,a=[],s=0,o=i[0],l=0;n>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(t.substring(n-=o,n+o)),!((l+=o+1)>r));)o=i[s=(s+1)%i.length];return a.reverse().join(e)}}function bw(i){return function(e){return e.replace(/[0-9]/g,function(t){return i[+t]})}}var yw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kl(i){if(!(e=yw.exec(i)))throw new Error("invalid format: "+i);var e;return new Au({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}kl.prototype=Au.prototype;function Au(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}Au.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function xw(i){e:for(var e=i.length,t=1,r=-1,n;t0&&(r=0);break}return r>0?i.slice(0,r)+i.slice(n+1):i}var wg;function ww(i,e){var t=Il(i,e);if(!t)return i+"";var r=t[0],n=t[1],a=n-(wg=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Il(i,Math.max(0,e+a-1))[0]}function lm(i,e){var t=Il(i,e);if(!t)return i+"";var r=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}const dm={"%":(i,e)=>(i*100).toFixed(e),b:i=>Math.round(i).toString(2),c:i=>i+"",d:vw,e:(i,e)=>i.toExponential(e),f:(i,e)=>i.toFixed(e),g:(i,e)=>i.toPrecision(e),o:i=>Math.round(i).toString(8),p:(i,e)=>lm(i*100,e),r:lm,s:ww,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function cm(i){return i}var um=Array.prototype.map,fm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Sw(i){var e=i.grouping===void 0||i.thousands===void 0?cm:_w(um.call(i.grouping,Number),i.thousands+""),t=i.currency===void 0?"":i.currency[0]+"",r=i.currency===void 0?"":i.currency[1]+"",n=i.decimal===void 0?".":i.decimal+"",a=i.numerals===void 0?cm:bw(um.call(i.numerals,String)),s=i.percent===void 0?"%":i.percent+"",o=i.minus===void 0?"−":i.minus+"",l=i.nan===void 0?"NaN":i.nan+"";function d(u){u=kl(u);var h=u.fill,g=u.align,C=u.sign,G=u.symbol,I=u.zero,L=u.width,$=u.comma,U=u.precision,T=u.trim,M=u.type;M==="n"?($=!0,M="g"):dm[M]||(U===void 0&&(U=12),T=!0,M="g"),(I||h==="0"&&g==="=")&&(I=!0,h="0",g="=");var ee=G==="$"?t:G==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",re=G==="$"?r:/[%p]/.test(M)?s:"",Se=dm[M],Te=/[defgprs%]/.test(M);U=U===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,U)):Math.max(0,Math.min(20,U));function Ke(fe){var Ge=ee,He=re,N,we,K;if(M==="c")He=Se(fe)+He,fe="";else{fe=+fe;var ne=fe<0||1/fe<0;if(fe=isNaN(fe)?l:Se(Math.abs(fe),U),T&&(fe=xw(fe)),ne&&+fe==0&&C!=="+"&&(ne=!1),Ge=(ne?C==="("?C:o:C==="-"||C==="("?"":C)+Ge,He=(M==="s"?fm[8+wg/3]:"")+He+(ne&&C==="("?")":""),Te){for(N=-1,we=fe.length;++NK||K>57){He=(K===46?n+fe.slice(N+1):fe.slice(N))+He,fe=fe.slice(0,N);break}}}$&&!I&&(fe=e(fe,1/0));var qe=Ge.length+fe.length+He.length,Oe=qe>1)+Ge+fe+He+Oe.slice(qe);break;default:fe=Oe+Ge+fe+He;break}return a(fe)}return Ke.toString=function(){return u+""},Ke}function c(u,h){var g=d((u=kl(u),u.type="f",u)),C=Math.max(-8,Math.min(8,Math.floor(Ga(h)/3)))*3,G=Math.pow(10,-C),I=fm[8+C/3];return function(L){return g(G*L)+I}}return{format:d,formatPrefix:c}}var Zo,Sg,Eg;Ew({thousands:",",grouping:[3],currency:["$",""]});function Ew(i){return Zo=Sw(i),Sg=Zo.format,Eg=Zo.formatPrefix,Zo}function Tw(i){return Math.max(0,-Ga(Math.abs(i)))}function Aw(i,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ga(e)/3)))*3-Ga(Math.abs(i)))}function Iw(i,e){return i=Math.abs(i),e=Math.abs(e)-i,Math.max(0,Ga(e)-Ga(i))+1}function kw(i,e,t,r){var n=Wc(i,e,t),a;switch(r=kl(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(i),Math.abs(e));return r.precision==null&&!isNaN(a=Aw(n,s))&&(r.precision=a),Eg(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Iw(n,Math.max(Math.abs(i),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Tw(n))&&(r.precision=a-(r.type==="%")*2);break}}return Sg(r)}function Iu(i){var e=i.domain;return i.ticks=function(t){var r=e();return dw(r[0],r[r.length-1],t==null?10:t)},i.tickFormat=function(t,r){var n=e();return kw(n[0],n[n.length-1],t==null?10:t,r)},i.nice=function(t){t==null&&(t=10);var r=e(),n=0,a=r.length-1,s=r[n],o=r[a],l,d,c=10;for(o0;){if(d=Vc(s,o,t),d===l)return r[n]=s,r[a]=o,e(r);if(d>0)s=Math.floor(s/d)*d,o=Math.ceil(o/d)*d;else if(d<0)s=Math.ceil(s*d)/d,o=Math.floor(o*d)/d;else break;l=d}return i},i}function Ua(){var i=xg();return i.copy=function(){return Vl(i,Ua())},Hl.apply(i,arguments),Iu(i)}function Cw(i,e){i=i.slice();var t=0,r=i.length-1,n=i[t],a=i[r],s;return a(i(a=new Date(+a)),a),n.ceil=a=>(i(a=new Date(a-1)),e(a,1),i(a),a),n.round=a=>{const s=n(a),o=n.ceil(a);return a-s(e(a=new Date(+a),s==null?1:Math.floor(s)),a),n.range=(a,s,o)=>{const l=[];if(a=n.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let d;do l.push(d=new Date(+a)),e(a,o),i(a);while(dEi(s=>{if(s>=s)for(;i(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),t&&(n.count=(a,s)=>(hc.setTime(+a),mc.setTime(+s),i(hc),i(mc),Math.floor(t(hc,mc))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(r?s=>r(s)%a===0:s=>n.count(0,s)%a===0):n)),n}const Cl=Ei(()=>{},(i,e)=>{i.setTime(+i+e)},(i,e)=>e-i);Cl.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?Ei(e=>{e.setTime(Math.floor(e/i)*i)},(e,t)=>{e.setTime(+e+t*i)},(e,t)=>(t-e)/i):Cl);Cl.range;const Gr=1e3,Qi=Gr*60,Ur=Qi*60,Wr=Ur*24,ku=Wr*7,gm=Wr*30,pc=Wr*365,Gn=Ei(i=>{i.setTime(i-i.getMilliseconds())},(i,e)=>{i.setTime(+i+e*Gr)},(i,e)=>(e-i)/Gr,i=>i.getUTCSeconds());Gn.range;const Wl=Ei(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*Gr)},(i,e)=>{i.setTime(+i+e*Qi)},(i,e)=>(e-i)/Qi,i=>i.getMinutes());Wl.range;const Fw=Ei(i=>{i.setUTCSeconds(0,0)},(i,e)=>{i.setTime(+i+e*Qi)},(i,e)=>(e-i)/Qi,i=>i.getUTCMinutes());Fw.range;const Xl=Ei(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*Gr-i.getMinutes()*Qi)},(i,e)=>{i.setTime(+i+e*Ur)},(i,e)=>(e-i)/Ur,i=>i.getHours());Xl.range;const Dw=Ei(i=>{i.setUTCMinutes(0,0,0)},(i,e)=>{i.setTime(+i+e*Ur)},(i,e)=>(e-i)/Ur,i=>i.getUTCHours());Dw.range;const Ja=Ei(i=>i.setHours(0,0,0,0),(i,e)=>i.setDate(i.getDate()+e),(i,e)=>(e-i-(e.getTimezoneOffset()-i.getTimezoneOffset())*Qi)/Wr,i=>i.getDate()-1);Ja.range;const Cu=Ei(i=>{i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCDate(i.getUTCDate()+e)},(i,e)=>(e-i)/Wr,i=>i.getUTCDate()-1);Cu.range;const Nw=Ei(i=>{i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCDate(i.getUTCDate()+e)},(i,e)=>(e-i)/Wr,i=>Math.floor(i/Wr));Nw.range;function Yn(i){return Ei(e=>{e.setDate(e.getDate()-(e.getDay()+7-i)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qi)/ku)}const io=Yn(0),Ll=Yn(1),zw=Yn(2),Mw=Yn(3),ja=Yn(4),Bw=Yn(5),$w=Yn(6);io.range;Ll.range;zw.range;Mw.range;ja.range;Bw.range;$w.range;function Kn(i){return Ei(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-i)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/ku)}const Ig=Kn(0),Ol=Kn(1),Gw=Kn(2),Uw=Kn(3),Ha=Kn(4),jw=Kn(5),Hw=Kn(6);Ig.range;Ol.range;Gw.range;Uw.range;Ha.range;jw.range;Hw.range;const ql=Ei(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,e)=>{i.setMonth(i.getMonth()+e)},(i,e)=>e.getMonth()-i.getMonth()+(e.getFullYear()-i.getFullYear())*12,i=>i.getMonth());ql.range;const Vw=Ei(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCMonth(i.getUTCMonth()+e)},(i,e)=>e.getUTCMonth()-i.getUTCMonth()+(e.getUTCFullYear()-i.getUTCFullYear())*12,i=>i.getUTCMonth());Vw.range;const wr=Ei(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,e)=>{i.setFullYear(i.getFullYear()+e)},(i,e)=>e.getFullYear()-i.getFullYear(),i=>i.getFullYear());wr.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:Ei(e=>{e.setFullYear(Math.floor(e.getFullYear()/i)*i),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*i)});wr.range;const qn=Ei(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCFullYear(i.getUTCFullYear()+e)},(i,e)=>e.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());qn.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:Ei(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/i)*i),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*i)});qn.range;function Ww(i,e,t,r,n,a){const s=[[Gn,1,Gr],[Gn,5,5*Gr],[Gn,15,15*Gr],[Gn,30,30*Gr],[a,1,Qi],[a,5,5*Qi],[a,15,15*Qi],[a,30,30*Qi],[n,1,Ur],[n,3,3*Ur],[n,6,6*Ur],[n,12,12*Ur],[r,1,Wr],[r,2,2*Wr],[t,1,ku],[e,1,gm],[e,3,3*gm],[i,1,pc]];function o(d,c,u){const h=cI).right(s,h);if(g===s.length)return i.every(Wc(d/pc,c/pc,u));if(g===0)return Cl.every(Math.max(Wc(d,c,u),1));const[C,G]=s[h/s[g-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(Lt=vc(ws(be.y,0,1)),ai=Lt.getUTCDay(),Lt=ai>4||ai===0?Ol.ceil(Lt):Ol(Lt),Lt=Cu.offset(Lt,(be.V-1)*7),be.y=Lt.getUTCFullYear(),be.m=Lt.getUTCMonth(),be.d=Lt.getUTCDate()+(be.w+6)%7):(Lt=gc(ws(be.y,0,1)),ai=Lt.getDay(),Lt=ai>4||ai===0?Ll.ceil(Lt):Ll(Lt),Lt=Ja.offset(Lt,(be.V-1)*7),be.y=Lt.getFullYear(),be.m=Lt.getMonth(),be.d=Lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),ai="Z"in be?vc(ws(be.y,0,1)).getUTCDay():gc(ws(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(ai+5)%7:be.w+be.U*7-(ai+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,vc(be)):gc(be)}}function Se(Ve,dt,gt,be){for(var Mt=0,Lt=dt.length,ai=gt.length,si,at;Mt=ai)return-1;if(si=dt.charCodeAt(Mt++),si===37){if(si=dt.charAt(Mt++),at=M[si in vm?dt.charAt(Mt++):si],!at||(be=at(Ve,gt,be))<0)return-1}else if(si!=gt.charCodeAt(be++))return-1}return be}function Te(Ve,dt,gt){var be=d.exec(dt.slice(gt));return be?(Ve.p=c.get(be[0].toLowerCase()),gt+be[0].length):-1}function Ke(Ve,dt,gt){var be=g.exec(dt.slice(gt));return be?(Ve.w=C.get(be[0].toLowerCase()),gt+be[0].length):-1}function fe(Ve,dt,gt){var be=u.exec(dt.slice(gt));return be?(Ve.w=h.get(be[0].toLowerCase()),gt+be[0].length):-1}function Ge(Ve,dt,gt){var be=L.exec(dt.slice(gt));return be?(Ve.m=$.get(be[0].toLowerCase()),gt+be[0].length):-1}function He(Ve,dt,gt){var be=G.exec(dt.slice(gt));return be?(Ve.m=I.get(be[0].toLowerCase()),gt+be[0].length):-1}function N(Ve,dt,gt){return Se(Ve,e,dt,gt)}function we(Ve,dt,gt){return Se(Ve,t,dt,gt)}function K(Ve,dt,gt){return Se(Ve,r,dt,gt)}function ne(Ve){return s[Ve.getDay()]}function qe(Ve){return a[Ve.getDay()]}function Oe(Ve){return l[Ve.getMonth()]}function Xe(Ve){return o[Ve.getMonth()]}function it(Ve){return n[+(Ve.getHours()>=12)]}function rt(Ve){return 1+~~(Ve.getMonth()/3)}function Bt(Ve){return s[Ve.getUTCDay()]}function Tt(Ve){return a[Ve.getUTCDay()]}function Ct(Ve){return l[Ve.getUTCMonth()]}function Rt(Ve){return o[Ve.getUTCMonth()]}function wt(Ve){return n[+(Ve.getUTCHours()>=12)]}function $t(Ve){return 1+~~(Ve.getUTCMonth()/3)}return{format:function(Ve){var dt=ee(Ve+="",U);return dt.toString=function(){return Ve},dt},parse:function(Ve){var dt=re(Ve+="",!1);return dt.toString=function(){return Ve},dt},utcFormat:function(Ve){var dt=ee(Ve+="",T);return dt.toString=function(){return Ve},dt},utcParse:function(Ve){var dt=re(Ve+="",!0);return dt.toString=function(){return Ve},dt}}}var vm={"-":"",_:" ",0:"0"},Ci=/^\s*\d+/,Kw=/^%/,Zw=/[\\^$*+?|[\]().{}]/g;function Dt(i,e,t){var r=i<0?"-":"",n=(r?-i:i)+"",a=n.length;return r+(a[e.toLowerCase(),t]))}function Qw(i,e,t){var r=Ci.exec(e.slice(t,t+1));return r?(i.w=+r[0],t+r[0].length):-1}function e2(i,e,t){var r=Ci.exec(e.slice(t,t+1));return r?(i.u=+r[0],t+r[0].length):-1}function t2(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.U=+r[0],t+r[0].length):-1}function i2(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.V=+r[0],t+r[0].length):-1}function r2(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.W=+r[0],t+r[0].length):-1}function _m(i,e,t){var r=Ci.exec(e.slice(t,t+4));return r?(i.y=+r[0],t+r[0].length):-1}function bm(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function n2(i,e,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return r?(i.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function a2(i,e,t){var r=Ci.exec(e.slice(t,t+1));return r?(i.q=r[0]*3-3,t+r[0].length):-1}function s2(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.m=r[0]-1,t+r[0].length):-1}function ym(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.d=+r[0],t+r[0].length):-1}function o2(i,e,t){var r=Ci.exec(e.slice(t,t+3));return r?(i.m=0,i.d=+r[0],t+r[0].length):-1}function xm(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.H=+r[0],t+r[0].length):-1}function l2(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.M=+r[0],t+r[0].length):-1}function d2(i,e,t){var r=Ci.exec(e.slice(t,t+2));return r?(i.S=+r[0],t+r[0].length):-1}function c2(i,e,t){var r=Ci.exec(e.slice(t,t+3));return r?(i.L=+r[0],t+r[0].length):-1}function u2(i,e,t){var r=Ci.exec(e.slice(t,t+6));return r?(i.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function f2(i,e,t){var r=Kw.exec(e.slice(t,t+1));return r?t+r[0].length:-1}function h2(i,e,t){var r=Ci.exec(e.slice(t));return r?(i.Q=+r[0],t+r[0].length):-1}function m2(i,e,t){var r=Ci.exec(e.slice(t));return r?(i.s=+r[0],t+r[0].length):-1}function wm(i,e){return Dt(i.getDate(),e,2)}function p2(i,e){return Dt(i.getHours(),e,2)}function g2(i,e){return Dt(i.getHours()%12||12,e,2)}function v2(i,e){return Dt(1+Ja.count(wr(i),i),e,3)}function kg(i,e){return Dt(i.getMilliseconds(),e,3)}function _2(i,e){return kg(i,e)+"000"}function b2(i,e){return Dt(i.getMonth()+1,e,2)}function y2(i,e){return Dt(i.getMinutes(),e,2)}function x2(i,e){return Dt(i.getSeconds(),e,2)}function w2(i){var e=i.getDay();return e===0?7:e}function S2(i,e){return Dt(io.count(wr(i)-1,i),e,2)}function Cg(i){var e=i.getDay();return e>=4||e===0?ja(i):ja.ceil(i)}function E2(i,e){return i=Cg(i),Dt(ja.count(wr(i),i)+(wr(i).getDay()===4),e,2)}function T2(i){return i.getDay()}function A2(i,e){return Dt(Ll.count(wr(i)-1,i),e,2)}function I2(i,e){return Dt(i.getFullYear()%100,e,2)}function k2(i,e){return i=Cg(i),Dt(i.getFullYear()%100,e,2)}function C2(i,e){return Dt(i.getFullYear()%1e4,e,4)}function L2(i,e){var t=i.getDay();return i=t>=4||t===0?ja(i):ja.ceil(i),Dt(i.getFullYear()%1e4,e,4)}function O2(i){var e=i.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Dt(e/60|0,"0",2)+Dt(e%60,"0",2)}function Sm(i,e){return Dt(i.getUTCDate(),e,2)}function R2(i,e){return Dt(i.getUTCHours(),e,2)}function P2(i,e){return Dt(i.getUTCHours()%12||12,e,2)}function F2(i,e){return Dt(1+Cu.count(qn(i),i),e,3)}function Lg(i,e){return Dt(i.getUTCMilliseconds(),e,3)}function D2(i,e){return Lg(i,e)+"000"}function N2(i,e){return Dt(i.getUTCMonth()+1,e,2)}function z2(i,e){return Dt(i.getUTCMinutes(),e,2)}function M2(i,e){return Dt(i.getUTCSeconds(),e,2)}function B2(i){var e=i.getUTCDay();return e===0?7:e}function $2(i,e){return Dt(Ig.count(qn(i)-1,i),e,2)}function Og(i){var e=i.getUTCDay();return e>=4||e===0?Ha(i):Ha.ceil(i)}function G2(i,e){return i=Og(i),Dt(Ha.count(qn(i),i)+(qn(i).getUTCDay()===4),e,2)}function U2(i){return i.getUTCDay()}function j2(i,e){return Dt(Ol.count(qn(i)-1,i),e,2)}function H2(i,e){return Dt(i.getUTCFullYear()%100,e,2)}function V2(i,e){return i=Og(i),Dt(i.getUTCFullYear()%100,e,2)}function W2(i,e){return Dt(i.getUTCFullYear()%1e4,e,4)}function X2(i,e){var t=i.getUTCDay();return i=t>=4||t===0?Ha(i):Ha.ceil(i),Dt(i.getUTCFullYear()%1e4,e,4)}function q2(){return"+0000"}function Em(){return"%"}function Tm(i){return+i}function Am(i){return Math.floor(+i/1e3)}var va,Tr;Y2({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"]});function Y2(i){return va=Yw(i),Tr=va.format,va.parse,va.utcFormat,va.utcParse,va}function K2(i){return new Date(i)}function Z2(i){return i instanceof Date?+i:+new Date(+i)}function Rg(i,e,t,r,n,a,s,o,l,d){var c=xg(),u=c.invert,h=c.domain,g=d(".%L"),C=d(":%S"),G=d("%I:%M"),I=d("%I %p"),L=d("%a %d"),$=d("%b %d"),U=d("%B"),T=d("%Y");function M(ee){return(l(ee)>>0,h-=l,h*=l,l=h>>>0,h-=l,l+=h*4294967296}return(l>>>0)*23283064365386963e-26};return d}t&&t.exports?t.exports=s:this.alea=s})(bi,i)})(Lu);var tS=Lu.exports,Ou={exports:{}};Ou.exports;(function(i){(function(e,t,r){function n(o){var l=this,d="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},o===(o|0)?l.x=o:d+=o;for(var c=0;c>>0)/4294967296};return u.double=function(){do var h=d.next()>>>11,g=(d.next()>>>0)/4294967296,C=(h+g)/(1<<21);while(C===0);return C},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xor128=s})(bi,i)})(Ou);var iS=Ou.exports,Ru={exports:{}};Ru.exports;(function(i){(function(e,t,r){function n(o){var l=this,d="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,o===(o|0)?l.x=o:d+=o;for(var c=0;c>>4),l.next()}function a(o,l){return l.x=o.x,l.y=o.y,l.z=o.z,l.w=o.w,l.v=o.v,l.d=o.d,l}function s(o,l){var d=new n(o),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var h=d.next()>>>11,g=(d.next()>>>0)/4294967296,C=(h+g)/(1<<21);while(C===0);return C},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xorwow=s})(bi,i)})(Ru);var rS=Ru.exports,Pu={exports:{}};Pu.exports;(function(i){(function(e,t,r){function n(o){var l=this;l.next=function(){var c=l.x,u=l.i,h,g;return h=c[u],h^=h>>>7,g=h^h<<24,h=c[u+1&7],g^=h^h>>>10,h=c[u+3&7],g^=h^h>>>3,h=c[u+4&7],g^=h^h<<7,h=c[u+7&7],h=h^h<<13,g^=h^h<<9,c[u]=g,l.i=u+1&7,g};function d(c,u){var h,g=[];if(u===(u|0))g[0]=u;else for(u=""+u,h=0;h0;--h)c.next()}d(l,o)}function a(o,l){return l.x=o.x.slice(),l.i=o.i,l}function s(o,l){o==null&&(o=+new Date);var d=new n(o),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var h=d.next()>>>11,g=(d.next()>>>0)/4294967296,C=(h+g)/(1<<21);while(C===0);return C},u.int32=d.next,u.quick=u,c&&(c.x&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xorshift7=s})(bi,i)})(Pu);var nS=Pu.exports,Fu={exports:{}};Fu.exports;(function(i){(function(e,t,r){function n(o){var l=this;l.next=function(){var c=l.w,u=l.X,h=l.i,g,C;return l.w=c=c+1640531527|0,C=u[h+34&127],g=u[h=h+1&127],C^=C<<13,g^=g<<17,C^=C>>>15,g^=g>>>12,C=u[h]=C^g,l.i=h,C+(c^c>>>16)|0};function d(c,u){var h,g,C,G,I,L=[],$=128;for(u===(u|0)?(g=u,u=null):(u=u+"\0",g=0,$=Math.max($,u.length)),C=0,G=-32;G<$;++G)u&&(g^=u.charCodeAt((G+32)%u.length)),G===0&&(I=g),g^=g<<10,g^=g>>>15,g^=g<<4,g^=g>>>13,G>=0&&(I=I+1640531527|0,h=L[G&127]^=g+I,C=h==0?C+1:0);for(C>=128&&(L[(u&&u.length||0)&127]=-1),C=127,G=4*128;G>0;--G)g=L[C+34&127],h=L[C=C+1&127],g^=g<<13,h^=h<<17,g^=g>>>15,h^=h>>>12,L[C]=g^h;c.w=I,c.X=L,c.i=C}d(l,o)}function a(o,l){return l.i=o.i,l.w=o.w,l.X=o.X.slice(),l}function s(o,l){o==null&&(o=+new Date);var d=new n(o),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var h=d.next()>>>11,g=(d.next()>>>0)/4294967296,C=(h+g)/(1<<21);while(C===0);return C},u.int32=d.next,u.quick=u,c&&(c.X&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.xor4096=s})(bi,i)})(Fu);var aS=Fu.exports,Du={exports:{}};Du.exports;(function(i){(function(e,t,r){function n(o){var l=this,d="";l.next=function(){var u=l.b,h=l.c,g=l.d,C=l.a;return u=u<<25^u>>>7^h,h=h-g|0,g=g<<24^g>>>8^C,C=C-u|0,l.b=u=u<<20^u>>>12^h,l.c=h=h-g|0,l.d=g<<16^h>>>16^C,l.a=C-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,o===Math.floor(o)?(l.a=o/4294967296|0,l.b=o|0):d+=o;for(var c=0;c>>0)/4294967296};return u.double=function(){do var h=d.next()>>>11,g=(d.next()>>>0)/4294967296,C=(h+g)/(1<<21);while(C===0);return C},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=s:this.tychei=s})(bi,i)})(Du);var sS=Du.exports,Pg={exports:{}};const oS={},lS=Object.freeze(Object.defineProperty({__proto__:null,default:oS},Symbol.toStringTag,{value:"Module"})),dS=bg(lS);(function(i){(function(e,t,r){var n=256,a=6,s=52,o="random",l=r.pow(n,a),d=r.pow(2,s),c=d*2,u=n-1,h;function g(T,M,ee){var re=[];M=M==!0?{entropy:!0}:M||{};var Se=L(I(M.entropy?[T,U(t)]:T==null?$():T,3),re),Te=new C(re),Ke=function(){for(var fe=Te.g(a),Ge=l,He=0;fe=c;)fe/=2,Ge/=2,He>>>=1;return(fe+He)/Ge};return Ke.int32=function(){return Te.g(4)|0},Ke.quick=function(){return Te.g(4)/4294967296},Ke.double=Ke,L(U(Te.S),t),(M.pass||ee||function(fe,Ge,He,N){return N&&(N.S&&G(N,Te),fe.state=function(){return G(Te,{})}),He?(r[o]=fe,Ge):fe})(Ke,Se,"global"in M?M.global:this==r,M.state)}function C(T){var M,ee=T.length,re=this,Se=0,Te=re.i=re.j=0,Ke=re.S=[];for(ee||(T=[ee++]);Se0)return t;throw new Error("Expected number to be positive, got "+t.n)},this.lessThan=function(r){if(t.n=r)return t;throw new Error("Expected number to be greater than or equal to "+r+", got "+t.n)},this.greaterThan=function(r){if(t.n>r)return t;throw new Error("Expected number to be greater than "+r+", got "+t.n)},this.n=e},ES=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),t===void 0&&(t=e===void 0?1:e,e=0),fr(e).isInt(),fr(t).isInt(),function(){return Math.floor(i.next()*(t-e+1)+e)}},TS=function(i){return function(){return i.next()>=.5}},AS=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),function(){var r,n,a;do r=i.next()*2-1,n=i.next()*2-1,a=r*r+n*n;while(!a||a>1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},IS=function(i,e,t){e===void 0&&(e=0),t===void 0&&(t=1);var r=i.normal(e,t);return function(){return Math.exp(r())}},kS=function(i,e){return e===void 0&&(e=.5),fr(e).greaterThanOrEqual(0).lessThan(1),function(){return Math.floor(i.next()+e)}},CS=function(i,e,t){return e===void 0&&(e=1),t===void 0&&(t=.5),fr(e).isInt().isPositive(),fr(t).greaterThanOrEqual(0).lessThan(1),function(){for(var r=0,n=0;r++l;)c=c-l,l=e*l/++d;return d}}else{var r=Math.sqrt(e),n=.931+2.53*r,a=-.059+.02483*n,s=1.1239+1.1328/(n-3.4),o=.9277-3.6224/(n-2);return function(){for(;;){var l=void 0,d=i.next();if(d<=.86*o)return l=d/o-.43,Math.floor((2*a/(.5-Math.abs(l))+n)*l+e+.445);d>=o?l=i.next()-.5:(l=d/o-.93,l=(l<0?-.5:.5)-l,d=i.next()*o);var c=.5-Math.abs(l);if(!(c<.013&&d>c)){var u=Math.floor((2*a/c+n)*l+e+.445);if(d=d*s/(a/(c*c)+n),u>=10){var h=(u+.5)*Math.log(e/u)-e-PS+u-(.08333333333333333-(.002777777777777778-1/(1260*u*u))/(u*u))/u;if(Math.log(d*r)<=h)return u}else if(u>=0){var g,C=(g=RS(u))!=null?g:0;if(Math.log(d)<=u*Math.log(e)-e-C)return u}}}}}},DS=function(i,e){return e===void 0&&(e=1),fr(e).isPositive(),function(){return-Math.log(1-i.next())/e}},NS=function(i,e){return e===void 0&&(e=1),fr(e).isInt().greaterThanOrEqual(0),function(){for(var t=0,r=0;r0){var a=this.uniformInt(0,n-1)();return r[a]}else return},e._memoize=function(r,n){var a=[].slice.call(arguments,2),s=""+a.join(";"),o=this._cache[r];return(o===void 0||o.key!==s)&&(o={key:s,distribution:n.apply(void 0,[this].concat(a))},this._cache[r]=o),o.distribution},Nu(i,[{key:"rng",get:function(){return this._rng}}]),i}();new Dg;const Kc={capture:!0,passive:!1};function Zc(i){i.preventDefault(),i.stopImmediatePropagation()}function Ng(i){var e=i.document.documentElement,t=hi(i).on("dragstart.drag",Zc,Kc);"onselectstart"in e?t.on("selectstart.drag",Zc,Kc):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function zg(i,e){var t=i.document.documentElement,r=hi(i).on("dragstart.drag",null);e&&(r.on("click.drag",Zc,Kc),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in t?r.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}const Jo=i=>()=>i;function $S(i,{sourceEvent:e,target:t,transform:r,dispatch:n}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:n}})}function jr(i,e,t){this.k=i,this.x=e,this.y=t}jr.prototype={constructor:jr,scale:function(i){return i===1?this:new jr(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new jr(this.k,this.x+this.k*i,this.y+this.k*e)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zs=new jr(1,0,0);jr.prototype;function bc(i){i.stopImmediatePropagation()}function Ts(i){i.preventDefault(),i.stopImmediatePropagation()}function GS(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function US(){var i=this;return i instanceof SVGElement?(i=i.ownerSVGElement||i,i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]):[[0,0],[i.clientWidth,i.clientHeight]]}function Om(){return this.__zoom||zs}function jS(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function HS(){return navigator.maxTouchPoints||"ontouchstart"in this}function VS(i,e,t){var r=i.invertX(e[0][0])-t[0][0],n=i.invertX(e[1][0])-t[1][0],a=i.invertY(e[0][1])-t[0][1],s=i.invertY(e[1][1])-t[1][1];return i.translate(n>r?(r+n)/2:Math.min(0,r)||Math.max(0,n),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function WS(){var i=GS,e=US,t=VS,r=jS,n=HS,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,l=Bx,d=$l("start","zoom","end"),c,u,h,g=500,C=150,G=0,I=10;function L(N){N.property("__zoom",Om).on("wheel.zoom",Se,{passive:!1}).on("mousedown.zoom",Te).on("dblclick.zoom",Ke).filter(n).on("touchstart.zoom",fe).on("touchmove.zoom",Ge).on("touchend.zoom touchcancel.zoom",He).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}L.transform=function(N,we,K,ne){var qe=N.selection?N.selection():N;qe.property("__zoom",Om),N!==qe?M(N,we,K,ne):qe.interrupt().each(function(){ee(this,arguments).event(ne).start().zoom(null,typeof we=="function"?we.apply(this,arguments):we).end()})},L.scaleBy=function(N,we,K,ne){L.scaleTo(N,function(){var qe=this.__zoom.k,Oe=typeof we=="function"?we.apply(this,arguments):we;return qe*Oe},K,ne)},L.scaleTo=function(N,we,K,ne){L.transform(N,function(){var qe=e.apply(this,arguments),Oe=this.__zoom,Xe=K==null?T(qe):typeof K=="function"?K.apply(this,arguments):K,it=Oe.invert(Xe),rt=typeof we=="function"?we.apply(this,arguments):we;return t(U($(Oe,rt),Xe,it),qe,s)},K,ne)},L.translateBy=function(N,we,K,ne){L.transform(N,function(){return t(this.__zoom.translate(typeof we=="function"?we.apply(this,arguments):we,typeof K=="function"?K.apply(this,arguments):K),e.apply(this,arguments),s)},null,ne)},L.translateTo=function(N,we,K,ne,qe){L.transform(N,function(){var Oe=e.apply(this,arguments),Xe=this.__zoom,it=ne==null?T(Oe):typeof ne=="function"?ne.apply(this,arguments):ne;return t(zs.translate(it[0],it[1]).scale(Xe.k).translate(typeof we=="function"?-we.apply(this,arguments):-we,typeof K=="function"?-K.apply(this,arguments):-K),Oe,s)},ne,qe)};function $(N,we){return we=Math.max(a[0],Math.min(a[1],we)),we===N.k?N:new jr(we,N.x,N.y)}function U(N,we,K){var ne=we[0]-K[0]*N.k,qe=we[1]-K[1]*N.k;return ne===N.x&&qe===N.y?N:new jr(N.k,ne,qe)}function T(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function M(N,we,K,ne){N.on("start.zoom",function(){ee(this,arguments).event(ne).start()}).on("interrupt.zoom end.zoom",function(){ee(this,arguments).event(ne).end()}).tween("zoom",function(){var qe=this,Oe=arguments,Xe=ee(qe,Oe).event(ne),it=e.apply(qe,Oe),rt=K==null?T(it):typeof K=="function"?K.apply(qe,Oe):K,Bt=Math.max(it[1][0]-it[0][0],it[1][1]-it[0][1]),Tt=qe.__zoom,Ct=typeof we=="function"?we.apply(qe,Oe):we,Rt=l(Tt.invert(rt).concat(Bt/Tt.k),Ct.invert(rt).concat(Bt/Ct.k));return function(wt){if(wt===1)wt=Ct;else{var $t=Rt(wt),Ve=Bt/$t[2];wt=new jr(Ve,rt[0]-$t[0]*Ve,rt[1]-$t[1]*Ve)}Xe.zoom(null,wt)}})}function ee(N,we,K){return!K&&N.__zooming||new re(N,we)}function re(N,we){this.that=N,this.args=we,this.active=0,this.sourceEvent=null,this.extent=e.apply(N,we),this.taps=0}re.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,we){return this.mouse&&N!=="mouse"&&(this.mouse[1]=we.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=we.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=we.invert(this.touch1[0])),this.that.__zoom=we,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var we=hi(this.that).datum();d.call(N,this.that,new $S(N,{sourceEvent:this.sourceEvent,target:L,type:N,transform:this.that.__zoom,dispatch:d}),we)}};function Se(N,...we){if(!i.apply(this,arguments))return;var K=ee(this,we).event(N),ne=this.__zoom,qe=Math.max(a[0],Math.min(a[1],ne.k*Math.pow(2,r.apply(this,arguments)))),Oe=Br(N);if(K.wheel)(K.mouse[0][0]!==Oe[0]||K.mouse[0][1]!==Oe[1])&&(K.mouse[1]=ne.invert(K.mouse[0]=Oe)),clearTimeout(K.wheel);else{if(ne.k===qe)return;K.mouse=[Oe,ne.invert(Oe)],Ra(this),K.start()}Ts(N),K.wheel=setTimeout(Xe,C),K.zoom("mouse",t(U($(ne,qe),K.mouse[0],K.mouse[1]),K.extent,s));function Xe(){K.wheel=null,K.end()}}function Te(N,...we){if(h||!i.apply(this,arguments))return;var K=N.currentTarget,ne=ee(this,we,!0).event(N),qe=hi(N.view).on("mousemove.zoom",rt,!0).on("mouseup.zoom",Bt,!0),Oe=Br(N,K),Xe=N.clientX,it=N.clientY;Ng(N.view),bc(N),ne.mouse=[Oe,this.__zoom.invert(Oe)],Ra(this),ne.start();function rt(Tt){if(Ts(Tt),!ne.moved){var Ct=Tt.clientX-Xe,Rt=Tt.clientY-it;ne.moved=Ct*Ct+Rt*Rt>G}ne.event(Tt).zoom("mouse",t(U(ne.that.__zoom,ne.mouse[0]=Br(Tt,K),ne.mouse[1]),ne.extent,s))}function Bt(Tt){qe.on("mousemove.zoom mouseup.zoom",null),zg(Tt.view,ne.moved),Ts(Tt),ne.event(Tt).end()}}function Ke(N,...we){if(i.apply(this,arguments)){var K=this.__zoom,ne=Br(N.changedTouches?N.changedTouches[0]:N,this),qe=K.invert(ne),Oe=K.k*(N.shiftKey?.5:2),Xe=t(U($(K,Oe),ne,qe),e.apply(this,we),s);Ts(N),o>0?hi(this).transition().duration(o).call(M,Xe,ne,N):hi(this).call(L.transform,Xe,ne,N)}}function fe(N,...we){if(i.apply(this,arguments)){var K=N.touches,ne=K.length,qe=ee(this,we,N.changedTouches.length===ne).event(N),Oe,Xe,it,rt;for(bc(N),Xe=0;Xetypeof i=="function",jg=i=>Array.isArray(i),JS=i=>i instanceof Object,QS=i=>i instanceof Object?i.constructor.name!=="Function"&&i.constructor.name!=="Object":!1,Pm=i=>JS(i)&&!jg(i)&&!Ug(i)&&!QS(i);function Ms(i,e,t){return Ug(e)?e(i,t):e}function Va(i){var e;let t;if(jg(i))t=i;else{const r=Hr(i),n=r==null?void 0:r.rgb();t=[(n==null?void 0:n.r)||0,(n==null?void 0:n.g)||0,(n==null?void 0:n.b)||0,(e=r==null?void 0:r.opacity)!==null&&e!==void 0?e:1]}return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function pn(i,e){let t=new Float32Array;return i({framebuffer:e})(()=>{t=i.read()}),t}function e3(i,e,t){return Math.min(Math.max(i,e),t)}class t3{constructor(){this.disableSimulation=vt.disableSimulation,this.backgroundColor=YS,this.spaceSize=vt.spaceSize,this.nodeColor=Mg,this.nodeGreyoutOpacity=XS,this.nodeSize=Bg,this.nodeSizeScale=vt.nodeSizeScale,this.renderHighlightedNodeRing=!0,this.highlightedNodeRingColor=void 0,this.renderHoveredNodeRing=!0,this.hoveredNodeRingColor=vt.hoveredNodeRingColor,this.focusedNodeRingColor=vt.focusedNodeRingColor,this.linkColor=$g,this.linkGreyoutOpacity=qS,this.linkWidth=Gg,this.linkWidthScale=vt.linkWidthScale,this.renderLinks=vt.renderLinks,this.curvedLinks=vt.curvedLinks,this.curvedLinkSegments=vt.curvedLinkSegments,this.curvedLinkWeight=vt.curvedLinkWeight,this.curvedLinkControlPointDistance=vt.curvedLinkControlPointDistance,this.linkArrows=vt.arrowLinks,this.linkArrowsSizeScale=vt.arrowSizeScale,this.linkVisibilityDistanceRange=vt.linkVisibilityDistanceRange,this.linkVisibilityMinTransparency=vt.linkVisibilityMinTransparency,this.useQuadtree=vt.useQuadtree,this.simulation={decay:vt.simulation.decay,gravity:vt.simulation.gravity,center:vt.simulation.center,repulsion:vt.simulation.repulsion,repulsionTheta:vt.simulation.repulsionTheta,repulsionQuadtreeLevels:vt.simulation.repulsionQuadtreeLevels,linkSpring:vt.simulation.linkSpring,linkDistance:vt.simulation.linkDistance,linkDistRandomVariationRange:vt.simulation.linkDistRandomVariationRange,repulsionFromMouse:vt.simulation.repulsionFromMouse,friction:vt.simulation.friction,onStart:void 0,onTick:void 0,onEnd:void 0,onPause:void 0,onRestart:void 0},this.events={onClick:void 0,onMouseMove:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onZoomStart:void 0,onZoom:void 0,onZoomEnd:void 0},this.showFPSMonitor=vt.showFPSMonitor,this.pixelRatio=vt.pixelRatio,this.scaleNodesOnZoom=vt.scaleNodesOnZoom,this.initialZoomLevel=void 0,this.disableZoom=vt.disableZoom,this.fitViewOnInit=vt.fitViewOnInit,this.fitViewDelay=vt.fitViewDelay,this.fitViewByNodesInRect=void 0,this.randomSeed=void 0,this.nodeSamplingDistance=vt.nodeSamplingDistance}init(e){Object.keys(e).forEach(t=>{this.deepMergeConfig(this.getConfig(),e,t)})}deepMergeConfig(e,t,r){Pm(e[r])&&Pm(t[r])?Object.keys(t[r]).forEach(n=>{this.deepMergeConfig(e[r],t[r],n)}):e[r]=t[r]}getConfig(){return this}}class yn{constructor(e,t,r,n,a){this.reglInstance=e,this.config=t,this.store=r,this.data=n,a&&(this.points=a)}}var i3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,r3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.xy,1.0,0.0);gl_Position=vec4(0.0,0.0,0.0,1.0);gl_PointSize=1.0;}`,n3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D centermass;uniform float center;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec4 centermassValues=texture2D(centermass,vec2(0.0));vec2 centermassPosition=centermassValues.xy/centermassValues.b;vec2 distVector=centermassPosition-pointPosition.xy;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*center*dist*0.01;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;function Oi(i){return{buffer:i.buffer(new Float32Array([-1,-1,1,-1,-1,1,1,1])),size:2}}function Fa(i,e){const t=new Float32Array(e*e*2);for(let n=0;nthis.centermassFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:Fa(e,r.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>r.pointsTextureSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.runCommand=e({frag:n3,vert:zi,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,centermass:()=>this.centermassFbo,center:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.center},alpha:()=>r.alpha}})}run(){var e,t,r;(e=this.clearCentermassCommand)===null||e===void 0||e.call(this),(t=this.calculateCentermassCommand)===null||t===void 0||t.call(this),(r=this.runCommand)===null||r===void 0||r.call(this)}destroy(){ni(this.centermassFbo)}}var s3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float gravity;uniform float spaceSize;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 centerPosition=vec2(spaceSize/2.0);vec2 distVector=centerPosition-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*gravity*dist*0.1;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;class o3 extends yn{initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:s3,vert:zi,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,gravity:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.gravity},spaceSize:()=>r.adjustedSpaceSize,alpha:()=>r.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}function l3(i){return` +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D position; +uniform float linkSpring; +uniform float linkDistance; +uniform vec2 linkDistRandomVariationRange; + +uniform sampler2D linkFirstIndicesAndAmount; +uniform sampler2D linkIndices; +uniform sampler2D linkBiasAndStrength; +uniform sampler2D linkRandomDistanceFbo; + +uniform float pointsTextureSize; +uniform float linksTextureSize; +uniform float alpha; + +varying vec2 index; + +const float MAX_LINKS = ${i}.0; + +void main() { + vec4 pointPosition = texture2D(position, index); + vec4 velocity = vec4(0.0); + + vec4 linkFirstIJAndAmount = texture2D(linkFirstIndicesAndAmount, index); + float iCount = linkFirstIJAndAmount.r; + float jCount = linkFirstIJAndAmount.g; + float linkAmount = linkFirstIJAndAmount.b; + if (linkAmount > 0.0) { + for (float i = 0.0; i < MAX_LINKS; i += 1.0) { + if (i < linkAmount) { + if (iCount >= linksTextureSize) { + iCount = 0.0; + jCount += 1.0; + } + vec2 linkTextureIndex = (vec2(iCount, jCount) + 0.5) / linksTextureSize; + vec4 connectedPointIndex = texture2D(linkIndices, linkTextureIndex); + vec4 biasAndStrength = texture2D(linkBiasAndStrength, linkTextureIndex); + vec4 randomMinDistance = texture2D(linkRandomDistanceFbo, linkTextureIndex); + float bias = biasAndStrength.r; + float strength = biasAndStrength.g; + float randomMinLinkDist = randomMinDistance.r * (linkDistRandomVariationRange.g - linkDistRandomVariationRange.r) + linkDistRandomVariationRange.r; + randomMinLinkDist *= linkDistance; + + iCount += 1.0; + + vec4 connectedPointPosition = texture2D(position, (connectedPointIndex.rg + 0.5) / pointsTextureSize); + float x = connectedPointPosition.x - (pointPosition.x + velocity.x); + float y = connectedPointPosition.y - (pointPosition.y + velocity.y); + float l = sqrt(x * x + y * y); + l = max(l, randomMinLinkDist * 0.99); + l = (l - randomMinLinkDist) / l; + l *= linkSpring * alpha; + l *= strength; + l *= bias; + x *= l; + y *= l; + velocity.x += x; + velocity.y += y; + } + } + } + + gl_FragColor = vec4(velocity.rg, 0.0, 0.0); +} + `}var qs;(function(i){i.OUTGOING="outgoing",i.INCOMING="incoming"})(qs||(qs={}));class Fm extends yn{constructor(){super(...arguments),this.linkFirstIndicesAndAmount=new Float32Array,this.indices=new Float32Array,this.maxPointDegree=0}create(e){const{reglInstance:t,store:{pointsTextureSize:r,linksTextureSize:n},data:a}=this;if(!r||!n)return;this.linkFirstIndicesAndAmount=new Float32Array(r*r*4),this.indices=new Float32Array(n*n*4);const s=new Float32Array(n*n*4),o=new Float32Array(n*n*4),l=e===qs.INCOMING?a.groupedSourceToTargetLinks:a.groupedTargetToSourceLinks;this.maxPointDegree=0;let d=0;l.forEach((c,u)=>{this.linkFirstIndicesAndAmount[u*4+0]=d%n,this.linkFirstIndicesAndAmount[u*4+1]=Math.floor(d/n),this.linkFirstIndicesAndAmount[u*4+2]=c.size,c.forEach(h=>{var g,C;this.indices[d*4+0]=h%r,this.indices[d*4+1]=Math.floor(h/r);const G=(g=a.degree[a.getInputIndexBySortedIndex(h)])!==null&&g!==void 0?g:0,I=(C=a.degree[a.getInputIndexBySortedIndex(u)])!==null&&C!==void 0?C:0,L=G/(G+I);let $=1/Math.min(G,I);$=Math.sqrt($),s[d*4+0]=L,s[d*4+1]=$,o[d*4]=this.store.getRandomFloat(0,1),d+=1}),this.maxPointDegree=Math.max(this.maxPointDegree,c.size)}),this.linkFirstIndicesAndAmountFbo=t.framebuffer({color:t.texture({data:this.linkFirstIndicesAndAmount,shape:[r,r,4],type:"float"}),depth:!1,stencil:!1}),this.indicesFbo=t.framebuffer({color:t.texture({data:this.indices,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.biasAndStrengthFbo=t.framebuffer({color:t.texture({data:s,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.randomDistanceFbo=t.framebuffer({color:t.texture({data:o,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1})}initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:()=>l3(this.maxPointDegree),vert:zi,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,linkSpring:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkSpring},linkDistance:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkDistance},linkDistRandomVariationRange:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkDistRandomVariationRange},linkFirstIndicesAndAmount:()=>this.linkFirstIndicesAndAmountFbo,linkIndices:()=>this.indicesFbo,linkBiasAndStrength:()=>this.biasAndStrengthFbo,linkRandomDistanceFbo:()=>this.randomDistanceFbo,pointsTextureSize:()=>r.pointsTextureSize,linksTextureSize:()=>r.linksTextureSize,alpha:()=>r.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}destroy(){ni(this.linkFirstIndicesAndAmountFbo),ni(this.indicesFbo),ni(this.biasAndStrengthFbo),ni(this.randomDistanceFbo)}}var Hg=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,Vg=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;uniform float levelTextureSize;uniform float cellSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.rg,1.0,0.0);float n=floor(pointPosition.x/cellSize);float m=floor(pointPosition.y/cellSize);vec2 levelPosition=2.0*(vec2(n,m)+0.5)/levelTextureSize-1.0;gl_Position=vec4(levelPosition,0.0,1.0);gl_PointSize=1.0;}`,d3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D levelFbo;uniform float level;uniform float levels;uniform float levelTextureSize;uniform float repulsion;uniform float alpha;uniform float spaceSize;uniform float theta;varying vec2 index;const float MAX_LEVELS_NUM=14.0;vec2 calcAdd(vec2 ij,vec2 pp){vec2 add=vec2(0.0);vec4 centermass=texture2D(levelFbo,ij);if(centermass.r>0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(l0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(lo.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)}}),this.calculateLevelsCommand=e({frag:Hg,vert:Vg,framebuffer:(s,o)=>o.levelFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:Fa(e,r.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>r.pointsTextureSize,levelTextureSize:(s,o)=>o.levelTextureSize,cellSize:(s,o)=>o.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceCommand=e({frag:d3,vert:zi,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,level:(s,o)=>o.level,levels:this.quadtreeLevels,levelFbo:(s,o)=>o.levelFbo,levelTextureSize:(s,o)=>o.levelTextureSize,alpha:()=>r.alpha,repulsion:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsion},spaceSize:()=>r.adjustedSpaceSize,theta:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsionTheta}},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceFromItsOwnCentermassCommand=e({frag:c3,vert:zi,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,randomValues:()=>this.randomValuesFbo,levelFbo:(s,o)=>o.levelFbo,levelTextureSize:(s,o)=>o.levelTextureSize,alpha:()=>r.alpha,repulsion:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsion},spaceSize:()=>r.adjustedSpaceSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.clearVelocityCommand=e({frag:Wa,vert:zi,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)}})}run(){var e,t,r,n,a;const{store:s}=this;for(let o=0;o{ni(e)}),this.levelsFbos.clear()}}function f3(i,e){i=Math.min(i,e);const t=e-i,r=` + float dist = sqrt(l); + if (dist > 0.0) { + float c = alpha * repulsion * centermass.b; + addVelocity += calcAdd(vec2(x, y), l, c); + addVelocity += addVelocity * random.rg; + } + `;function n(a){if(a>=e)return r;{const s=Math.pow(2,a+1),o=new Array(a+1-t).fill(0).map((d,c)=>`pow(2.0, ${a-(c+t)}.0) * i${c+t}`).join("+"),l=new Array(a+1-t).fill(0).map((d,c)=>`pow(2.0, ${a-(c+t)}.0) * j${c+t}`).join("+");return` + for (float ij${a} = 0.0; ij${a} < 4.0; ij${a} += 1.0) { + float i${a} = 0.0; + float j${a} = 0.0; + if (ij${a} == 1.0 || ij${a} == 3.0) i${a} = 1.0; + if (ij${a} == 2.0 || ij${a} == 3.0) j${a} = 1.0; + float i = pow(2.0, ${i}.0) * n / width${a+1} + ${o}; + float j = pow(2.0, ${i}.0) * m / width${a+1} + ${l}; + float groupPosX = (i + 0.5) / ${s}.0; + float groupPosY = (j + 0.5) / ${s}.0; + + vec4 centermass = texture2D(level[${a}], vec2(groupPosX, groupPosY)); + if (centermass.r > 0.0 && centermass.g > 0.0 && centermass.b > 0.0) { + float x = centermass.r / centermass.b - pointPosition.r; + float y = centermass.g / centermass.b - pointPosition.g; + float l = x * x + y * y; + if ((width${a+1} * width${a+1}) / theta < l) { + ${r} + } else { + ${n(a+1)} + } + } + } + `}}return` +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D position; +uniform sampler2D randomValues; +uniform float spaceSize; +uniform float repulsion; +uniform float theta; +uniform float alpha; +uniform sampler2D level[${e}]; +varying vec2 index; + +vec2 calcAdd(vec2 xy, float l, float c) { + float distanceMin2 = 1.0; + if (l < distanceMin2) l = sqrt(distanceMin2 * l); + float add = c / l; + return add * xy; +} + +void main() { + vec4 pointPosition = texture2D(position, index); + vec4 random = texture2D(randomValues, index); + + float width0 = spaceSize; + + vec2 velocity = vec2(0.0); + vec2 addVelocity = vec2(0.0); + + ${new Array(e).fill(0).map((a,s)=>`float width${s+1} = width${s} / 2.0;`).join(` +`)} + + for (float n = 0.0; n < pow(2.0, ${t}.0); n += 1.0) { + for (float m = 0.0; m < pow(2.0, ${t}.0); m += 1.0) { + ${n(t)} + } + } + + velocity -= addVelocity; + + gl_FragColor = vec4(velocity, 0.0, 0.0); +} +`}class h3 extends yn{constructor(){super(...arguments),this.levelsFbos=new Map,this.quadtreeLevels=0}create(){const{reglInstance:e,store:t}=this;if(!t.pointsTextureSize)return;this.quadtreeLevels=Math.log2(t.adjustedSpaceSize);for(let n=0;nd.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(r)}}),this.calculateLevelsCommand=r({frag:Hg,vert:Vg,framebuffer:(l,d)=>d.levelFbo,primitive:"points",count:()=>s.nodes.length,attributes:{indexes:Fa(r,a.pointsTextureSize)},uniforms:{position:()=>o==null?void 0:o.previousPositionFbo,pointsTextureSize:()=>a.pointsTextureSize,levelTextureSize:(l,d)=>d.levelTextureSize,cellSize:(l,d)=>d.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.quadtreeCommand=r({frag:f3((t=(e=n.simulation)===null||e===void 0?void 0:e.repulsionQuadtreeLevels)!==null&&t!==void 0?t:this.quadtreeLevels,this.quadtreeLevels),vert:zi,framebuffer:()=>o==null?void 0:o.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(r)},uniforms:on({position:()=>o==null?void 0:o.previousPositionFbo,randomValues:()=>this.randomValuesFbo,spaceSize:()=>a.adjustedSpaceSize,repulsion:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsion},theta:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsionTheta},alpha:()=>a.alpha},Object.fromEntries(this.levelsFbos))})}run(){var e,t,r;const{store:n}=this;for(let a=0;a{ni(e)}),this.levelsFbos.clear()}}var m3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float repulsion;uniform vec2 mousePos;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 mouse=mousePos;vec2 distVector=mouse-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));dist=max(dist,10.0);float angle=atan(distVector.y,distVector.x);float addV=100.0*repulsion/(dist*dist);velocity.rg-=addV*vec2(cos(angle),sin(angle));gl_FragColor=velocity;}`;class p3 extends yn{initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:m3,vert:zi,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,mousePos:()=>r.mousePosition,repulsion:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.repulsionFromMouse}}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}var g3=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Wg={exports:{}};(function(i,e){(function(t,r){i.exports=r()})(g3,function(){var t=`
    + + 00 FPS + + + + + + + + + + + + + + +
    `,r=`#gl-bench { + position:absolute; + left:0; + top:0; + z-index:1000; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +#gl-bench div { + position: relative; + display: block; + margin: 4px; + padding: 0 7px 0 10px; + background: #6c6; + border-radius: 15px; + cursor: pointer; + opacity: 0.9; +} + +#gl-bench svg { + height: 60px; + margin: 0 -1px; +} + +#gl-bench text { + font-size: 12px; + font-family: Helvetica,Arial,sans-serif; + font-weight: 700; + dominant-baseline: middle; + text-anchor: middle; +} + +#gl-bench .gl-mem { + font-size: 9px; +} + +#gl-bench line { + stroke-width: 5; + stroke: #112211; + stroke-linecap: round; +} + +#gl-bench polyline { + fill: none; + stroke: #112211; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 3.5; +} + +#gl-bench rect { + fill: #448844; +} + +#gl-bench .opacity { + stroke: #448844; +} +`;class n{constructor(s,o={}){this.css=r,this.svg=t,this.paramLogger=()=>{},this.chartLogger=()=>{},this.chartLen=20,this.chartHz=20,this.names=[],this.cpuAccums=[],this.gpuAccums=[],this.activeAccums=[],this.chart=new Array(this.chartLen),this.now=()=>performance&&performance.now?performance.now():Date.now(),this.updateUI=()=>{[].forEach.call(this.nodes["gl-gpu-svg"],h=>{h.style.display=this.trackGPU?"inline":"none"})},Object.assign(this,o),this.detected=0,this.finished=[],this.isFramebuffer=0,this.frameId=0;let l,d=0,c,u=h=>{++d<20?l=requestAnimationFrame(u):(this.detected=Math.ceil(1e3*d/(h-c)/70),cancelAnimationFrame(l)),c||(c=h)};if(requestAnimationFrame(u),s){const h=(C,G)=>Y(this,null,function*(){return Promise.resolve(setTimeout(()=>{s.getError();const I=this.now()-C;G.forEach((L,$)=>{L&&(this.gpuAccums[$]+=I)})},0))}),g=(C,G,I)=>function(){const L=G.now();C.apply(I,arguments),G.trackGPU&&G.finished.push(h(L,G.activeAccums.slice(0)))};["drawArrays","drawElements","drawArraysInstanced","drawBuffers","drawElementsInstanced","drawRangeElements"].forEach(C=>{s[C]&&(s[C]=g(s[C],this,s))}),s.getExtension=((C,G)=>function(){let I=C.apply(s,arguments);return I&&["drawElementsInstancedANGLE","drawBuffersWEBGL"].forEach(L=>{I[L]&&(I[L]=g(I[L],G,I))}),I})(s.getExtension,this)}if(!this.withoutUI){this.dom||(this.dom=document.body);let h=document.createElement("div");h.id="gl-bench",this.dom.appendChild(h),this.dom.insertAdjacentHTML("afterbegin",'"),this.dom=h,this.dom.addEventListener("click",()=>{this.trackGPU=!this.trackGPU,this.updateUI()}),this.paramLogger=((g,C,G)=>{const I=["gl-cpu","gl-gpu","gl-mem","gl-fps","gl-gpu-svg","gl-chart"],L=Object.assign({},I);return I.forEach($=>L[$]=C.getElementsByClassName($)),this.nodes=L,($,U,T,M,ee,re,Se)=>{L["gl-cpu"][$].style.strokeDasharray=(U*.27).toFixed(0)+" 100",L["gl-gpu"][$].style.strokeDasharray=(T*.27).toFixed(0)+" 100",L["gl-mem"][$].innerHTML=G[$]?G[$]:M?"mem: "+M.toFixed(0)+"mb":"",L["gl-fps"][$].innerHTML=ee.toFixed(0)+" FPS",g(G[$],U,T,M,ee,re,Se)}})(this.paramLogger,this.dom,this.names),this.chartLogger=((g,C)=>{let G={"gl-chart":C.getElementsByClassName("gl-chart")};return(I,L,$)=>{let U="",T=L.length;for(let M=0;M=1e3){const d=this.frameId-this.paramFrame,c=d/l*1e3;for(let u=0;u{this.gpuAccums[u]=0,this.finished=[]})}this.paramFrame=this.frameId,this.paramTime=o}}if(!this.detected||!this.chartFrame)this.chartFrame=this.frameId,this.chartTime=o,this.circularId=0;else{let l=o-this.chartTime,d=this.chartHz*l/1e3;for(;--d>0&&this.detected;){const u=(this.frameId-this.chartFrame)/l*1e3;this.chart[this.circularId%this.chartLen]=u;for(let h=0;h{this.idToNodeMap.set(n.id,n),this.inputIndexToIdMap.set(a,n.id),this.idToIndegreeMap.set(n.id,0),this.idToOutdegreeMap.set(n.id,0)}),this.completeLinks.clear(),t.forEach(n=>{const a=this.idToNodeMap.get(n.source),s=this.idToNodeMap.get(n.target);if(a!==void 0&&s!==void 0){this.completeLinks.add(n);const o=this.idToOutdegreeMap.get(a.id);o!==void 0&&this.idToOutdegreeMap.set(a.id,o+1);const l=this.idToIndegreeMap.get(s.id);l!==void 0&&this.idToIndegreeMap.set(s.id,l+1)}}),this.degree=new Array(e.length),e.forEach((n,a)=>{const s=this.idToOutdegreeMap.get(n.id),o=this.idToIndegreeMap.get(n.id);this.degree[a]=(s!=null?s:0)+(o!=null?o:0)}),this.sortedIndexToInputIndexMap.clear(),this.inputIndexToSortedIndexMap.clear(),Object.entries(this.degree).sort((n,a)=>n[1]-a[1]).forEach(([n],a)=>{const s=+n;this.sortedIndexToInputIndexMap.set(a,s),this.inputIndexToSortedIndexMap.set(s,a),this.idToSortedIndexMap.set(this.inputIndexToIdMap.get(s),a)}),this.groupedSourceToTargetLinks.clear(),this.groupedTargetToSourceLinks.clear(),t.forEach(n=>{const a=this.idToSortedIndexMap.get(n.source),s=this.idToSortedIndexMap.get(n.target);if(a!==void 0&&s!==void 0){this.groupedSourceToTargetLinks.get(a)===void 0&&this.groupedSourceToTargetLinks.set(a,new Set);const o=this.groupedSourceToTargetLinks.get(a);o==null||o.add(s),this.groupedTargetToSourceLinks.get(s)===void 0&&this.groupedTargetToSourceLinks.set(s,new Set);const l=this.groupedTargetToSourceLinks.get(s);l==null||l.add(a)}}),this._nodes=e,this._links=t}getNodeById(e){return this.idToNodeMap.get(e)}getNodeByIndex(e){return this._nodes[e]}getSortedIndexByInputIndex(e){return this.inputIndexToSortedIndexMap.get(e)}getInputIndexBySortedIndex(e){return this.sortedIndexToInputIndexMap.get(e)}getSortedIndexById(e){return e!==void 0?this.idToSortedIndexMap.get(e):void 0}getInputIndexById(e){if(e===void 0)return;const t=this.getSortedIndexById(e);if(t!==void 0)return this.getInputIndexBySortedIndex(t)}getAdjacentNodes(e){var t,r;const n=this.getSortedIndexById(e);if(n===void 0)return;const a=(t=this.groupedSourceToTargetLinks.get(n))!==null&&t!==void 0?t:[],s=(r=this.groupedTargetToSourceLinks.get(n))!==null&&r!==void 0?r:[];return[...new Set([...a,...s])].map(o=>this.getNodeByIndex(this.getInputIndexBySortedIndex(o)))}}var y3=`precision highp float; +#define GLSLIFY 1 +varying vec4 rgbaColor;varying vec2 pos;varying float arrowLength;varying float linkWidthArrowWidthRatio;varying float smoothWidthRatio;varying float useArrow;float map(float value,float min1,float max1,float min2,float max2){return min2+(value-min1)*(max2-min2)/(max1-min1);}void main(){float opacity=1.0;vec3 color=rgbaColor.rgb;float smoothDelta=smoothWidthRatio/2.0;if(useArrow>0.5){float end_arrow=0.5+arrowLength/2.0;float start_arrow=end_arrow-arrowLength;float arrowWidthDelta=linkWidthArrowWidthRatio/2.0;float linkOpacity=rgbaColor.a*smoothstep(0.5-arrowWidthDelta,0.5-arrowWidthDelta-smoothDelta,abs(pos.y));float arrowOpacity=1.0;if(pos.x>start_arrow&&pos.x0.5){linkWidth+=arrowExtraWidth;}smoothWidthRatio=smoothWidth/linkWidth;linkWidthArrowWidthRatio=arrowExtraWidth/linkWidth;float linkWidthPx=linkWidth/transform[0][0];vec3 rgbColor=color.rgb;float opacity=color.a*max(linkVisibilityMinTransparency,map(linkDistPx,linkVisibilityDistanceRange.g,linkVisibilityDistanceRange.r,0.0,1.0));if(greyoutStatusA.r>0.0||greyoutStatusB.r>0.0){opacity*=greyoutOpacity;}rgbaColor=vec4(rgbColor,opacity);float t=position.x;float w=curvedWeight;float tPrev=t-1.0/curvedLinkSegments;float tNext=t+1.0/curvedLinkSegments;vec2 pointCurr=conicParametricCurve(a,b,controlPoint,t,w);vec2 pointPrev=conicParametricCurve(a,b,controlPoint,max(0.0,tPrev),w);vec2 pointNext=conicParametricCurve(a,b,controlPoint,min(tNext,1.0),w);vec2 xBasisCurved=pointNext-pointPrev;vec2 yBasisCurved=normalize(vec2(-xBasisCurved.y,xBasisCurved.x));pointCurr+=yBasisCurved*linkWidthPx*position.y;vec2 p=2.0*pointCurr/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`;const w3=i=>{const e=Ag().exponent(2).range([0,1]).domain([-1,1]),t=Xc(0,i).map(n=>-.5+n/i);t.push(.5);const r=new Array(t.length*2);return t.forEach((n,a)=>{r[a*2]=[e(n*2),.5],r[a*2+1]=[e(n*2),-.5]}),r};class S3 extends yn{create(){this.updateColor(),this.updateWidth(),this.updateArrow(),this.updateCurveLineGeometry()}initPrograms(){const{reglInstance:e,config:t,store:r,data:n,points:a}=this,{pointsTextureSize:s}=r,o=[];n.completeLinks.forEach(d=>{const c=n.getSortedIndexById(d.target),u=n.getSortedIndexById(d.source),h=u%s,g=Math.floor(u/s),C=c%s,G=Math.floor(c/s);o.push([h,g]),o.push([C,G])});const l=e.buffer(o);this.drawCurveCommand=e({vert:x3,frag:y3,attributes:{position:{buffer:()=>this.curveLineBuffer,divisor:0},pointA:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},pointB:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*2,stride:Float32Array.BYTES_PER_ELEMENT*4},color:{buffer:()=>this.colorBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},width:{buffer:()=>this.widthBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1},arrow:{buffer:()=>this.arrowBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1}},uniforms:{positions:()=>a==null?void 0:a.currentPositionFbo,particleGreyoutStatus:()=>a==null?void 0:a.greyoutStatusFbo,transform:()=>r.transform,pointsTextureSize:()=>r.pointsTextureSize,nodeSizeScale:()=>t.nodeSizeScale,widthScale:()=>t.linkWidthScale,arrowSizeScale:()=>t.linkArrowsSizeScale,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,ratio:()=>t.pixelRatio,linkVisibilityDistanceRange:()=>t.linkVisibilityDistanceRange,linkVisibilityMinTransparency:()=>t.linkVisibilityMinTransparency,greyoutOpacity:()=>t.linkGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,curvedWeight:()=>t.curvedLinkWeight,curvedLinkControlPointDistance:()=>t.curvedLinkControlPointDistance,curvedLinkSegments:()=>{var d;return t.curvedLinks?(d=t.curvedLinkSegments)!==null&&d!==void 0?d:vt.curvedLinkSegments:1}},cull:{enable:!0,face:"back"},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},count:()=>{var d,c;return(c=(d=this.curveLineGeometry)===null||d===void 0?void 0:d.length)!==null&&c!==void 0?c:0},instances:()=>n.linksNumber,primitive:"triangle strip"})}draw(){var e;!this.colorBuffer||!this.widthBuffer||!this.curveLineBuffer||(e=this.drawCurveCommand)===null||e===void 0||e.call(this)}updateColor(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{var s;const o=(s=Ms(a,t.linkColor))!==null&&s!==void 0?s:$g,l=Va(o);n.push(l)}),this.colorBuffer=e.buffer(n)}updateWidth(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{const s=Ms(a,t.linkWidth);n.push([s!=null?s:Gg])}),this.widthBuffer=e.buffer(n)}updateArrow(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{var s;const o=(s=Ms(a,t.linkArrows))!==null&&s!==void 0?s:vt.arrowLinks;n.push([o?1:0])}),this.arrowBuffer=e.buffer(n)}updateCurveLineGeometry(){const{reglInstance:e,config:{curvedLinks:t,curvedLinkSegments:r}}=this;this.curveLineGeometry=w3(t?r!=null?r:vt.curvedLinkSegments:1),this.curveLineBuffer=e.buffer(this.curveLineGeometry)}destroy(){Qo(this.colorBuffer),Qo(this.widthBuffer),Qo(this.arrowBuffer),Qo(this.curveLineBuffer)}}function E3(i,e,t,r){var n;if(t===0)return;const a=new Float32Array(t*t*4);for(let o=0;o0.0){alpha*=greyoutOpacity;}}`,k3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 selection[2];uniform bool scaleNodesOnZoom;uniform float maxPointSize;varying vec2 index;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize*ratio);}void main(){vec4 pointPosition=texture2D(position,index);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,index);float size=pSize.r*sizeScale;float left=2.0*(selection[0].x-0.5*pointSize(size))/screenSize.x-1.0;float right=2.0*(selection[1].x+0.5*pointSize(size))/screenSize.x-1.0;float top=2.0*(selection[0].y-0.5*pointSize(size))/screenSize.y-1.0;float bottom=2.0*(selection[1].y+0.5*pointSize(size))/screenSize.y-1.0;gl_FragColor=vec4(0.0,0.0,pointPosition.rg);if(final.x>=left&&final.x<=right&&final.y>=top&&final.y<=bottom){gl_FragColor.r=1.0;}}`,C3=`precision mediump float; +#define GLSLIFY 1 +uniform vec4 color;uniform float width;varying vec2 pos;varying float particleOpacity;const float smoothing=1.05;void main(){vec2 cxy=pos;float r=dot(cxy,cxy);float opacity=smoothstep(r,r*smoothing,1.0);float stroke=smoothstep(width,width*smoothing,r);gl_FragColor=vec4(color.rgb,opacity*stroke*color.a*particleOpacity);}`,L3=`precision mediump float; +#define GLSLIFY 1 +attribute vec2 quad;uniform sampler2D positions;uniform sampler2D particleColor;uniform sampler2D particleGreyoutStatus;uniform sampler2D particleSize;uniform mat3 transform;uniform float pointsTextureSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform bool scaleNodesOnZoom;uniform float pointIndex;uniform float maxPointSize;uniform vec4 color;uniform float greyoutOpacity;varying vec2 pos;varying float particleOpacity;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*transform[0][0];}else{pSize=size*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize);}const float relativeRingRadius=1.3;void main(){pos=quad;vec2 ij=vec2(mod(pointIndex,pointsTextureSize),floor(pointIndex/pointsTextureSize))+0.5;vec4 pointPosition=texture2D(positions,ij/pointsTextureSize);vec4 pSize=texture2D(particleSize,ij/pointsTextureSize);vec4 pColor=texture2D(particleColor,ij/pointsTextureSize);particleOpacity=pColor.a;vec4 greyoutStatus=texture2D(particleGreyoutStatus,ij/pointsTextureSize);if(greyoutStatus.r>0.0){particleOpacity*=greyoutOpacity;}float size=(pointSize(pSize.r*sizeScale)*relativeRingRadius)/transform[0][0];float radius=size*0.5;vec2 a=pointPosition.xy;vec2 b=pointPosition.xy+vec2(0.0,radius);vec2 xBasis=b-a;vec2 yBasis=normalize(vec2(-xBasis.y,xBasis.x));vec2 point=a+xBasis*quad.x+yBasis*radius*quad.y;vec2 p=2.0*point/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`,O3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,R3=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 mousePosition;uniform bool scaleNodesOnZoom;uniform float maxPointSize;attribute vec2 indexes;varying vec4 rgba;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize*ratio);}float euclideanDistance(float x1,float x2,float y1,float y2){return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));}void main(){vec4 pointPosition=texture2D(position,(indexes+0.5)/pointsTextureSize);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,indexes/pointsTextureSize);float size=pSize.r*sizeScale;float pointRadius=0.5*pointSize(size);vec2 pointScreenPosition=(final.xy+1.0)*screenSize/2.0;rgba=vec4(0.0);gl_Position=vec4(0.5,0.5,0.0,1.0);if(euclideanDistance(pointScreenPosition.x,mousePosition.x,pointScreenPosition.y,mousePosition.y)this.currentPositionFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>this.previousPositionFbo,velocity:()=>this.velocityFbo,friction:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.friction},spaceSize:()=>r.adjustedSpaceSize}})),this.drawCommand=e({frag:A3,vert:I3,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:Fa(e,r.pointsTextureSize)},uniforms:{positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleGreyoutStatus:()=>this.greyoutStatusFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,greyoutOpacity:()=>t.nodeGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.findPointsOnAreaSelectionCommand=e({frag:k3,vert:zi,framebuffer:()=>this.selectedFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,sizeScale:()=>t.nodeSizeScale,transform:()=>r.transform,ratio:()=>t.pixelRatio,"selection[0]":()=>r.selectedArea[0],"selection[1]":()=>r.selectedArea[1],scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize}}),this.clearHoveredFboCommand=e({frag:Wa,vert:zi,framebuffer:this.hoveredFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)}}),this.findHoveredPointCommand=e({frag:O3,vert:R3,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.hoveredFbo,attributes:{indexes:Fa(e,r.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,mousePosition:()=>r.screenMousePosition,maxPointSize:()=>r.maxPointSize},depth:{enable:!1,mask:!1}}),this.clearSampledNodesFboCommand=e({frag:Wa,vert:zi,framebuffer:()=>this.sampledNodesFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)}}),this.fillSampledNodesFboCommand=e({frag:P3,vert:F3,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.sampledNodesFbo,attributes:{indexes:Fa(e,r.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize},depth:{enable:!1,mask:!1}}),this.drawHighlightedCommand=e({frag:C3,vert:L3,attributes:{quad:Oi(e)},primitive:"triangle strip",count:4,uniforms:{color:e.prop("color"),width:e.prop("width"),pointIndex:e.prop("pointIndex"),positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleSize:()=>this.sizeFbo,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize,particleGreyoutStatus:()=>this.greyoutStatusFbo,greyoutOpacity:()=>t.nodeGreyoutOpacity},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.trackPointsCommand=e({frag:$3,vert:zi,framebuffer:()=>this.trackedPositionsFbo,primitive:"triangle strip",count:4,attributes:{quad:Oi(e)},uniforms:{position:()=>this.currentPositionFbo,trackedIndices:()=>this.trackedIndicesFbo,pointsTextureSize:()=>r.pointsTextureSize}})}updateColor(){const{reglInstance:e,config:t,store:{pointsTextureSize:r},data:n}=this;r&&(this.colorFbo=E3(n,e,r,t.nodeColor))}updateGreyoutStatus(){const{reglInstance:e,store:t}=this;this.greyoutStatusFbo=T3(t.selectedIndices,e,t.pointsTextureSize)}updateSize(){const{reglInstance:e,config:t,store:{pointsTextureSize:r},data:n}=this;r&&(this.sizeByIndex=new Float32Array(n.nodes.length),this.sizeFbo=N3(n,e,r,t.nodeSize,this.sizeByIndex))}updateSampledNodesGrid(){const{store:{screenSize:e},config:{nodeSamplingDistance:t},reglInstance:r}=this,n=t!=null?t:Math.min(...e)/2,a=Math.ceil(e[0]/n),s=Math.ceil(e[1]/n);ni(this.sampledNodesFbo),this.sampledNodesFbo=r.framebuffer({shape:[a,s],depth:!1,stencil:!1,colorType:"float"})}trackPoints(){var e;!this.trackedIndicesFbo||!this.trackedPositionsFbo||(e=this.trackPointsCommand)===null||e===void 0||e.call(this)}draw(){var e,t,r;const{config:{renderHoveredNodeRing:n,renderHighlightedNodeRing:a},store:s}=this;(e=this.drawCommand)===null||e===void 0||e.call(this),(n!=null?n:a)&&s.hoveredNode&&((t=this.drawHighlightedCommand)===null||t===void 0||t.call(this,{width:.85,color:s.hoveredNodeRingColor,pointIndex:s.hoveredNode.index})),s.focusedNode&&((r=this.drawHighlightedCommand)===null||r===void 0||r.call(this,{width:.75,color:s.focusedNodeRingColor,pointIndex:s.focusedNode.index}))}updatePosition(){var e;(e=this.updatePositionCommand)===null||e===void 0||e.call(this),this.swapFbo()}findPointsOnAreaSelection(){var e;(e=this.findPointsOnAreaSelectionCommand)===null||e===void 0||e.call(this)}findHoveredPoint(){var e,t;(e=this.clearHoveredFboCommand)===null||e===void 0||e.call(this),(t=this.findHoveredPointCommand)===null||t===void 0||t.call(this)}getNodeRadiusByIndex(e){var t;return(t=this.sizeByIndex)===null||t===void 0?void 0:t[e]}trackNodesByIds(e){this.trackedIds=e.length?e:void 0,this.trackedPositionsById.clear();const t=e.map(r=>this.data.getSortedIndexById(r)).filter(r=>r!==void 0);ni(this.trackedIndicesFbo),this.trackedIndicesFbo=void 0,ni(this.trackedPositionsFbo),this.trackedPositionsFbo=void 0,t.length&&(this.trackedIndicesFbo=B3(t,this.store.pointsTextureSize,this.reglInstance),this.trackedPositionsFbo=M3(t,this.reglInstance)),this.trackPoints()}getTrackedPositions(){if(!this.trackedIds)return this.trackedPositionsById;const e=pn(this.reglInstance,this.trackedPositionsFbo);return this.trackedIds.forEach((t,r)=>{const n=e[r*4],a=e[r*4+1];n!==void 0&&a!==void 0&&this.trackedPositionsById.set(t,[n,a])}),this.trackedPositionsById}getSampledNodePositionsMap(){var e,t,r;const n=new Map;if(!this.sampledNodesFbo)return n;(e=this.clearSampledNodesFboCommand)===null||e===void 0||e.call(this),(t=this.fillSampledNodesFboCommand)===null||t===void 0||t.call(this);const a=pn(this.reglInstance,this.sampledNodesFbo);for(let s=0;sI.x).filter(I=>I!==void 0);if(r.length===0)return;const n=e.map(I=>I.y).filter(I=>I!==void 0);if(n.length===0)return;const[a,s]=Xs(r);if(a===void 0||s===void 0)return;const[o,l]=Xs(n);if(o===void 0||l===void 0)return;const d=s-a,c=l-o,u=Math.max(d,c),h=(u-d)/2,g=(u-c)/2,C=Ua().range([0,t!=null?t:vt.spaceSize]).domain([a-h,s+h]),G=Ua().range([0,t!=null?t:vt.spaceSize]).domain([o-g,l+g]);e.forEach(I=>{I.x=C(I.x),I.y=G(I.y)})}}const Jc=.001,Qc=64;class U3{constructor(){this.pointsTextureSize=0,this.linksTextureSize=0,this.alpha=1,this.transform=Q2(),this.backgroundColor=[0,0,0,0],this.screenSize=[0,0],this.mousePosition=[0,0],this.screenMousePosition=[0,0],this.selectedArea=[[0,0],[0,0]],this.isSimulationRunning=!1,this.simulationProgress=0,this.selectedIndices=null,this.maxPointSize=Qc,this.hoveredNode=void 0,this.focusedNode=void 0,this.adjustedSpaceSize=vt.spaceSize,this.hoveredNodeRingColor=[1,1,1,KS],this.focusedNodeRingColor=[1,1,1,ZS],this.alphaTarget=0,this.scaleNodeX=Ua(),this.scaleNodeY=Ua(),this.random=new Dg,this.alphaDecay=e=>1-Math.pow(Jc,1/e)}addRandomSeed(e){this.random=this.random.clone(e)}getRandomFloat(e,t){return this.random.float(e,t)}adjustSpaceSize(e,t){e>=t?(this.adjustedSpaceSize=t/2,console.warn(`The \`spaceSize\` has been reduced to ${this.adjustedSpaceSize} due to WebGL limits`)):this.adjustedSpaceSize=e}updateScreenSize(e,t){const{adjustedSpaceSize:r}=this;this.screenSize=[e,t],this.scaleNodeX.domain([0,r]).range([(e-r)/2,(e+r)/2]),this.scaleNodeY.domain([r,0]).range([(t-r)/2,(t+r)/2])}scaleX(e){return this.scaleNodeX(e)}scaleY(e){return this.scaleNodeY(e)}setHoveredNodeRingColor(e){const t=Va(e);this.hoveredNodeRingColor[0]=t[0],this.hoveredNodeRingColor[1]=t[1],this.hoveredNodeRingColor[2]=t[2]}setFocusedNodeRingColor(e){const t=Va(e);this.focusedNodeRingColor[0]=t[0],this.focusedNodeRingColor[1]=t[1],this.focusedNodeRingColor[2]=t[2]}setFocusedNode(e,t){e&&t!==void 0?this.focusedNode={node:e,index:t}:this.focusedNode=void 0}addAlpha(e){return(this.alphaTarget-this.alpha)*this.alphaDecay(e)}}class j3{constructor(e,t){this.eventTransform=zs,this.behavior=WS().scaleExtent([.001,1/0]).on("start",r=>{var n,a,s;this.isRunning=!0;const o=!!r.sourceEvent;(s=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoomStart)===null||s===void 0||s.call(a,r,o)}).on("zoom",r=>{var n,a,s;this.eventTransform=r.transform;const{eventTransform:{x:o,y:l,k:d},store:{transform:c,screenSize:u}}=this,h=u[0],g=u[1];eS(c,h,g),km(c,c,[o,l]),_c(c,c,[d,d]),km(c,c,[h/2,g/2]),_c(c,c,[h/2,g/2]),_c(c,c,[1,-1]);const C=!!r.sourceEvent;(s=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoom)===null||s===void 0||s.call(a,r,C)}).on("end",r=>{var n,a,s;this.isRunning=!1;const o=!!r.sourceEvent;(s=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoomEnd)===null||s===void 0||s.call(a,r,o)}),this.isRunning=!1,this.store=e,this.config=t}getTransform(e,t,r=.1){if(e.length===0)return this.eventTransform;const{store:{screenSize:n}}=this,a=n[0],s=n[1],o=Xs(e.map(L=>L[0])),l=Xs(e.map(L=>L[1]));o[0]=this.store.scaleX(o[0]),o[1]=this.store.scaleX(o[1]),l[0]=this.store.scaleY(l[0]),l[1]=this.store.scaleY(l[1]);const d=a*(1-r*2)/(o[1]-o[0]),c=s*(1-r*2)/(l[0]-l[1]),u=e3(t!=null?t:Math.min(d,c),...this.behavior.scaleExtent()),h=(o[1]+o[0])/2,g=(l[1]+l[0])/2,C=a/2-h*u,G=s/2-g*u;return zs.translate(C,G).scale(u)}getDistanceToPoint(e){const{x:t,y:r,k:n}=this.eventTransform,a=this.getTransform([e],n),s=t-a.x,o=r-a.y;return Math.sqrt(s*s+o*o)}getMiddlePointTransform(e){const{store:{screenSize:t},eventTransform:{x:r,y:n,k:a}}=this,s=t[0],o=t[1],l=(s/2-r)/a,d=(o/2-n)/a,c=this.store.scaleX(e[0]),u=this.store.scaleY(e[1]),h=(l+c)/2,g=(d+u)/2,C=1,G=s/2-h*C,I=o/2-g*C;return zs.translate(G,I).scale(C)}convertScreenToSpacePosition(e){const{eventTransform:{x:t,y:r,k:n},store:{screenSize:a}}=this,s=a[0],o=a[1],l=(e[0]-t)/n,d=(e[1]-r)/n,c=[l,o-d];return c[0]-=(s-this.store.adjustedSpaceSize)/2,c[1]-=(o-this.store.adjustedSpaceSize)/2,c}convertSpaceToScreenPosition(e){const t=this.eventTransform.applyX(this.store.scaleX(e[0])),r=this.eventTransform.applyY(this.store.scaleY(e[1]));return[t,r]}convertSpaceToScreenRadius(e){const{config:{scaleNodesOnZoom:t},store:{maxPointSize:r},eventTransform:{k:n}}=this;let a=e*2;return t?a*=n:a*=Math.min(5,Math.max(1,n*.01)),Math.min(a,r)/2}}class H3{constructor(e,t){var r,n;this.config=new t3,this.graph=new b3,this.requestAnimationFrameId=0,this.isRightClickMouse=!1,this.store=new U3,this.zoomInstance=new j3(this.store,this.config),this.hasParticleSystemDestroyed=!1,this._findHoveredPointExecutionCount=0,this._isMouseOnCanvas=!1,this._isFirstDataAfterInit=!0,t&&this.config.init(t);const a=e.clientWidth,s=e.clientHeight;e.width=a*this.config.pixelRatio,e.height=s*this.config.pixelRatio,e.style.width===""&&e.style.height===""&&hi(e).style("width","100%").style("height","100%"),this.canvas=e,this.canvasD3Selection=hi(e),this.canvasD3Selection.on("mouseenter.cosmos",()=>{this._isMouseOnCanvas=!0}).on("mouseleave.cosmos",()=>{this._isMouseOnCanvas=!1}),this.zoomInstance.behavior.on("start.detect",o=>{this.currentEvent=o}).on("zoom.detect",o=>{!!o.sourceEvent&&this.updateMousePosition(o.sourceEvent),this.currentEvent=o}).on("end.detect",o=>{this.currentEvent=o}),this.canvasD3Selection.call(this.zoomInstance.behavior).on("click",this.onClick.bind(this)).on("mousemove",this.onMouseMove.bind(this)).on("contextmenu",this.onRightClickMouse.bind(this)),this.config.disableZoom&&this.disableZoom(),this.setZoomLevel((r=this.config.initialZoomLevel)!==null&&r!==void 0?r:1),this.reglInstance=X1({canvas:this.canvas,attributes:{antialias:!1,preserveDrawingBuffer:!0},extensions:["OES_texture_float","ANGLE_instanced_arrays"]}),this.store.maxPointSize=((n=this.reglInstance.limits.pointSizeDims[1])!==null&&n!==void 0?n:Qc)/this.config.pixelRatio,this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.store.updateScreenSize(a,s),this.points=new G3(this.reglInstance,this.config,this.store,this.graph),this.lines=new S3(this.reglInstance,this.config,this.store,this.graph,this.points),this.config.disableSimulation||(this.forceGravity=new o3(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceCenter=new a3(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceManyBody=this.config.useQuadtree?new h3(this.reglInstance,this.config,this.store,this.graph,this.points):new u3(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkIncoming=new Fm(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkOutgoing=new Fm(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceMouse=new p3(this.reglInstance,this.config,this.store,this.graph,this.points)),this.store.backgroundColor=Va(this.config.backgroundColor),this.config.highlightedNodeRingColor?(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)):(this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor)),this.config.showFPSMonitor&&(this.fpsMonitor=new Dm(this.canvas)),this.config.randomSeed!==void 0&&this.store.addRandomSeed(this.config.randomSeed)}get progress(){return this.store.simulationProgress}get isSimulationRunning(){return this.store.isSimulationRunning}get maxPointSize(){return this.store.maxPointSize}setConfig(e){var t,r;const n=on({},this.config);this.config.init(e),n.linkColor!==this.config.linkColor&&this.lines.updateColor(),n.nodeColor!==this.config.nodeColor&&this.points.updateColor(),n.nodeSize!==this.config.nodeSize&&this.points.updateSize(),n.linkWidth!==this.config.linkWidth&&this.lines.updateWidth(),n.linkArrows!==this.config.linkArrows&&this.lines.updateArrow(),(n.curvedLinkSegments!==this.config.curvedLinkSegments||n.curvedLinks!==this.config.curvedLinks)&&this.lines.updateCurveLineGeometry(),n.backgroundColor!==this.config.backgroundColor&&(this.store.backgroundColor=Va(this.config.backgroundColor)),n.highlightedNodeRingColor!==this.config.highlightedNodeRingColor&&(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)),n.hoveredNodeRingColor!==this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),n.focusedNodeRingColor!==this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor),(n.spaceSize!==this.config.spaceSize||n.simulation.repulsionQuadtreeLevels!==this.config.simulation.repulsionQuadtreeLevels)&&(this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.resizeCanvas(!0),this.update(this.store.isSimulationRunning)),n.showFPSMonitor!==this.config.showFPSMonitor&&(this.config.showFPSMonitor?this.fpsMonitor=new Dm(this.canvas):((t=this.fpsMonitor)===null||t===void 0||t.destroy(),this.fpsMonitor=void 0)),n.pixelRatio!==this.config.pixelRatio&&(this.store.maxPointSize=((r=this.reglInstance.limits.pointSizeDims[1])!==null&&r!==void 0?r:Qc)/this.config.pixelRatio),n.disableZoom!==this.config.disableZoom&&(this.config.disableZoom?this.disableZoom():this.enableZoom())}setData(e,t,r=!0){const{fitViewOnInit:n,fitViewDelay:a,fitViewByNodesInRect:s,initialZoomLevel:o}=this.config;if(!e.length&&!t.length){this.destroyParticleSystem(),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0});return}this.graph.setData(e,t),this._isFirstDataAfterInit&&n&&o===void 0&&(this._fitViewOnInitTimeoutID=window.setTimeout(()=>{s?this.setZoomTransformByNodePositions(s,void 0,void 0,0):this.fitView()},a)),this._isFirstDataAfterInit=!1,this.update(r)}zoomToNodeById(e,t=700,r=Rm,n=!0){const a=this.graph.getNodeById(e);a&&this.zoomToNode(a,t,r,n)}zoomToNodeByIndex(e,t=700,r=Rm,n=!0){const a=this.graph.getNodeByIndex(e);a&&this.zoomToNode(a,t,r,n)}zoom(e,t=0){this.setZoomLevel(e,t)}setZoomLevel(e,t=0){t===0?this.canvasD3Selection.call(this.zoomInstance.behavior.scaleTo,e):this.canvasD3Selection.transition().duration(t).call(this.zoomInstance.behavior.scaleTo,e)}getZoomLevel(){return this.zoomInstance.eventTransform.k}getNodePositions(){if(this.hasParticleSystemDestroyed)return{};const e=pn(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((t,r)=>{const n=this.graph.getSortedIndexById(r.id),a=e[n*4+0],s=e[n*4+1];return a!==void 0&&s!==void 0&&(t[r.id]={x:a,y:s}),t},{})}getNodePositionsMap(){const e=new Map;if(this.hasParticleSystemDestroyed)return e;const t=pn(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((r,n)=>{const a=this.graph.getSortedIndexById(n.id),s=t[a*4+0],o=t[a*4+1];return s!==void 0&&o!==void 0&&r.set(n.id,[s,o]),r},e)}getNodePositionsArray(){const e=[];if(this.hasParticleSystemDestroyed)return[];const t=pn(this.reglInstance,this.points.currentPositionFbo);e.length=this.graph.nodes.length;for(let r=0;rn.get(s)).filter(s=>s!==void 0);this.setZoomTransformByNodePositions(a,t,void 0,r)}selectNodesInRange(e){if(e){const t=this.store.screenSize[1];this.store.selectedArea=[[e[0][0],t-e[1][1]],[e[1][0],t-e[0][1]]],this.points.findPointsOnAreaSelection();const r=pn(this.reglInstance,this.points.selectedFbo);this.store.selectedIndices=r.map((n,a)=>a%4===0&&n!==0?a/4:-1).filter(n=>n!==-1)}else this.store.selectedIndices=null;this.points.updateGreyoutStatus()}selectNodeById(e,t=!1){var r;if(t){const n=(r=this.graph.getAdjacentNodes(e))!==null&&r!==void 0?r:[];this.selectNodesByIds([e,...n.map(a=>a.id)])}else this.selectNodesByIds([e])}selectNodeByIndex(e,t=!1){const r=this.graph.getNodeByIndex(e);r&&this.selectNodeById(r.id,t)}selectNodesByIds(e){this.selectNodesByIndices(e==null?void 0:e.map(t=>this.graph.getSortedIndexById(t)))}selectNodesByIndices(e){e?e.length===0?this.store.selectedIndices=new Float32Array:this.store.selectedIndices=new Float32Array(e.filter(t=>t!==void 0)):this.store.selectedIndices=null,this.points.updateGreyoutStatus()}unselectNodes(){this.store.selectedIndices=null,this.points.updateGreyoutStatus()}getSelectedNodes(){const{selectedIndices:e}=this.store;if(!e)return null;const t=new Array(e.length);for(const[r,n]of e.entries())if(n!==void 0){const a=this.graph.getInputIndexBySortedIndex(n);a!==void 0&&(t[r]=this.graph.nodes[a])}return t}getAdjacentNodes(e){return this.graph.getAdjacentNodes(e)}setFocusedNodeById(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeById(e),this.graph.getSortedIndexById(e))}setFocusedNodeByIndex(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeByIndex(e),e)}spaceToScreenPosition(e){return this.zoomInstance.convertSpaceToScreenPosition(e)}spaceToScreenRadius(e){return this.zoomInstance.convertSpaceToScreenRadius(e)}getNodeRadiusByIndex(e){return this.points.getNodeRadiusByIndex(e)}getNodeRadiusById(e){const t=this.graph.getInputIndexById(e);if(t!==void 0)return this.points.getNodeRadiusByIndex(t)}trackNodePositionsByIds(e){this.points.trackNodesByIds(e)}trackNodePositionsByIndices(e){this.points.trackNodesByIds(e.map(t=>this.graph.getNodeByIndex(t)).filter(t=>t!==void 0).map(t=>t.id))}getTrackedNodePositionsMap(){return this.points.getTrackedPositions()}getSampledNodePositionsMap(){return this.points.getSampledNodePositionsMap()}start(e=1){var t,r;this.graph.nodes.length&&(this.store.isSimulationRunning=!0,this.store.alpha=e,this.store.simulationProgress=0,(r=(t=this.config.simulation).onStart)===null||r===void 0||r.call(t),this.stopFrames(),this.frame())}pause(){var e,t;this.store.isSimulationRunning=!1,(t=(e=this.config.simulation).onPause)===null||t===void 0||t.call(e)}restart(){var e,t;this.store.isSimulationRunning=!0,(t=(e=this.config.simulation).onRestart)===null||t===void 0||t.call(e)}step(){this.store.isSimulationRunning=!1,this.stopFrames(),this.frame()}destroy(){var e,t;window.clearTimeout(this._fitViewOnInitTimeoutID),this.stopFrames(),this.destroyParticleSystem(),(e=this.fpsMonitor)===null||e===void 0||e.destroy(),(t=document.getElementById("gl-bench-style"))===null||t===void 0||t.remove()}create(){var e,t,r,n;this.points.create(),this.lines.create(),(e=this.forceManyBody)===null||e===void 0||e.create(),(t=this.forceLinkIncoming)===null||t===void 0||t.create(qs.INCOMING),(r=this.forceLinkOutgoing)===null||r===void 0||r.create(qs.OUTGOING),(n=this.forceCenter)===null||n===void 0||n.create(),this.hasParticleSystemDestroyed=!1}destroyParticleSystem(){var e,t,r,n;this.hasParticleSystemDestroyed||(this.points.destroy(),this.lines.destroy(),(e=this.forceCenter)===null||e===void 0||e.destroy(),(t=this.forceLinkIncoming)===null||t===void 0||t.destroy(),(r=this.forceLinkOutgoing)===null||r===void 0||r.destroy(),(n=this.forceManyBody)===null||n===void 0||n.destroy(),this.reglInstance.destroy(),this.hasParticleSystemDestroyed=!0)}update(e){const{graph:t}=this;this.store.pointsTextureSize=Math.ceil(Math.sqrt(t.nodes.length)),this.store.linksTextureSize=Math.ceil(Math.sqrt(t.linksNumber*2)),this.destroyParticleSystem(),this.create(),this.initPrograms(),this.setFocusedNodeById(),this.store.hoveredNode=void 0,e?this.start():this.step()}initPrograms(){var e,t,r,n,a,s;this.points.initPrograms(),this.lines.initPrograms(),(e=this.forceGravity)===null||e===void 0||e.initPrograms(),(t=this.forceLinkIncoming)===null||t===void 0||t.initPrograms(),(r=this.forceLinkOutgoing)===null||r===void 0||r.initPrograms(),(n=this.forceMouse)===null||n===void 0||n.initPrograms(),(a=this.forceManyBody)===null||a===void 0||a.initPrograms(),(s=this.forceCenter)===null||s===void 0||s.initPrograms()}frame(){const{config:{simulation:e,renderLinks:t,disableSimulation:r},store:{alpha:n,isSimulationRunning:a}}=this;n{var o,l,d,c,u,h,g,C,G,I,L,$,U;(o=this.fpsMonitor)===null||o===void 0||o.begin(),this.resizeCanvas(),this.findHoveredPoint(),r||(this.isRightClickMouse&&(a||this.start(.1),(l=this.forceMouse)===null||l===void 0||l.run(),this.points.updatePosition()),a&&!this.zoomInstance.isRunning&&(e.gravity&&((d=this.forceGravity)===null||d===void 0||d.run(),this.points.updatePosition()),e.center&&((c=this.forceCenter)===null||c===void 0||c.run(),this.points.updatePosition()),(u=this.forceManyBody)===null||u===void 0||u.run(),this.points.updatePosition(),this.store.linksTextureSize&&((h=this.forceLinkIncoming)===null||h===void 0||h.run(),this.points.updatePosition(),(g=this.forceLinkOutgoing)===null||g===void 0||g.run(),this.points.updatePosition()),this.store.alpha+=this.store.addAlpha((C=this.config.simulation.decay)!==null&&C!==void 0?C:vt.simulation.decay),this.isRightClickMouse&&(this.store.alpha=Math.max(this.store.alpha,.1)),this.store.simulationProgress=Math.sqrt(Math.min(1,Jc/this.store.alpha)),(I=(G=this.config.simulation).onTick)===null||I===void 0||I.call(G,this.store.alpha,(L=this.store.hoveredNode)===null||L===void 0?void 0:L.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,($=this.store.hoveredNode)===null||$===void 0?void 0:$.position)),this.points.trackPoints()),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0}),t&&this.store.linksTextureSize&&this.lines.draw(),this.points.draw(),(U=this.fpsMonitor)===null||U===void 0||U.end(s),this.currentEvent=void 0,this.frame()}))}stopFrames(){this.requestAnimationFrameId&&window.cancelAnimationFrame(this.requestAnimationFrameId)}end(){var e,t;this.store.isSimulationRunning=!1,this.store.simulationProgress=1,(t=(e=this.config.simulation).onEnd)===null||t===void 0||t.call(e)}onClick(e){var t,r,n,a;(r=(t=this.config.events).onClick)===null||r===void 0||r.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(a=this.store.hoveredNode)===null||a===void 0?void 0:a.position,e)}updateMousePosition(e){if(!e||e.offsetX===void 0||e.offsetY===void 0)return;const t=e.offsetX,r=e.offsetY;this.store.mousePosition=this.zoomInstance.convertScreenToSpacePosition([t,r]),this.store.screenMousePosition=[t,this.store.screenSize[1]-r]}onMouseMove(e){var t,r,n,a;this.currentEvent=e,this.updateMousePosition(e),this.isRightClickMouse=e.which===3,(r=(t=this.config.events).onMouseMove)===null||r===void 0||r.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(a=this.store.hoveredNode)===null||a===void 0?void 0:a.position,this.currentEvent)}onRightClickMouse(e){e.preventDefault()}resizeCanvas(e=!1){const t=this.canvas.width,r=this.canvas.height,n=this.canvas.clientWidth,a=this.canvas.clientHeight;if(e||t!==n*this.config.pixelRatio||r!==a*this.config.pixelRatio){const[s,o]=this.store.screenSize,{k:l}=this.zoomInstance.eventTransform,d=this.zoomInstance.convertScreenToSpacePosition([s/2,o/2]);this.store.updateScreenSize(n,a),this.canvas.width=n*this.config.pixelRatio,this.canvas.height=a*this.config.pixelRatio,this.reglInstance.poll(),this.canvasD3Selection.call(this.zoomInstance.behavior.transform,this.zoomInstance.getTransform([d],l)),this.points.updateSampledNodesGrid()}}setZoomTransformByNodePositions(e,t=250,r,n){this.resizeCanvas();const a=this.zoomInstance.getTransform(e,r,n);this.canvasD3Selection.transition().ease(G1).duration(t).call(this.zoomInstance.behavior.transform,a)}zoomToNode(e,t,r,n){const{graph:a,store:{screenSize:s}}=this,o=pn(this.reglInstance,this.points.currentPositionFbo),l=a.getSortedIndexById(e.id);if(l===void 0)return;const d=o[l*4+0],c=o[l*4+1];if(d===void 0||c===void 0)return;const u=this.zoomInstance.getDistanceToPoint([d,c]),h=n?r:Math.max(this.getZoomLevel(),r);if(u{if(As)return;As=document.createElement("style"),As.innerHTML=` + :root { + --css-label-background-color: #1e2428; + --css-label-brightness: brightness(150%); + } + + .${eu} { + position: absolute; + top: 0; + left: 0; + + font-weight: 500; + cursor: pointer; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + filter: var(--css-label-brightness); + pointer-events: none; + background-color: var(--css-label-background-color); + font-weight: 700; + border-radius: 6px; + + transition: opacity 600ms; + opacity: 1; + } + + .${Xg} { + opacity: 0 !important; + } +`;const i=document.head.getElementsByTagName("style")[0];i?document.head.insertBefore(As,i):document.head.appendChild(As)};class qg{constructor(e,t){this.element=document.createElement("div"),this.fontWidthHeightRatio=.6,this._x=0,this._y=0,this._estimatedWidth=0,this._estimatedHeight=0,this._visible=!1,this._prevVisible=!1,this._weight=0,this._customFontSize=el,this._customColor=void 0,this._customOpacity=void 0,this._shouldBeShown=!1,this._text="",this._customPadding={left:ba,top:_a,right:ba,bottom:_a},W3(),this._container=e,this._updateClasses(),t&&this.setText(t),this.resetFontSize(),this.resetPadding()}setText(e){this._text!==e&&(this._text=e,this.element.innerHTML=e,this._measureText())}setPosition(e,t){this._x=e,this._y=t}setStyle(e){if(this._customStyle!==e&&(this._customStyle=e,this.element.style.cssText=this._customStyle,this._customColor&&(this.element.style.color=this._customColor),this._customOpacity&&(this.element.style.opacity=String(this._customOpacity)),this._customPointerEvents&&(this.element.style.pointerEvents=this._customPointerEvents),this._customFontSize&&(this.element.style.fontSize=`${this._customFontSize}px`),this._customPadding)){const{top:t,right:r,bottom:n,left:a}=this._customPadding;this.element.style.padding=`${t}px ${r}px ${n}px ${a}px`}}setClassName(e){this._customClassName!==e&&(this._customClassName=e,this._updateClasses())}setFontSize(e=el){this._customFontSize!==e&&(this.element.style.fontSize=`${e}px`,this._customFontSize=e,this._measureText())}resetFontSize(){this.element.style.fontSize=`${el}px`,this._customFontSize=el,this._measureText()}setColor(e){this._customColor!==e&&(this.element.style.color=e,this._customColor=e)}resetColor(){this.element.style.removeProperty("color"),this._customColor=void 0}setOpacity(e){this._customOpacity!==e&&(this.element.style.opacity=String(e),this._customOpacity=e)}resetOpacity(){this.element.style.removeProperty("opacity"),this._customOpacity=void 0}setPointerEvents(e){this._customPointerEvents!==e&&(this.element.style.pointerEvents=`${e}`,this._customPointerEvents=e)}resetPointerEvents(){this.element.style.removeProperty("pointer-events"),this._customPointerEvents=void 0}setPadding(e={left:ba,top:_a,right:ba,bottom:_a}){(this._customPadding.left!==e.left||this._customPadding.top!==e.top||this._customPadding.right!==e.right||this._customPadding.bottom!==e.bottom)&&(this._customPadding=e,this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._measureText())}resetPadding(){const e={left:ba,top:_a,right:ba,bottom:_a};this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._customPadding=e,this._measureText()}setForceShow(e){this._shouldBeShown=e}getForceShow(){return this._shouldBeShown}draw(){const e=this.getVisibility();e!==this._prevVisible&&(this._prevVisible===!1?this._container.appendChild(this.element):this._container.removeChild(this.element),this._updateClasses(),this._prevVisible=e),e&&(this.element.style.transform=` + translate(-50%, -100%) + translate3d(${this._x}px, ${this._y}px, 0) + `)}overlaps(e){return V3({height:this._estimatedHeight,width:this._estimatedWidth,x:this._x,y:this._y},{height:e._estimatedHeight,width:e._estimatedWidth,x:e._x,y:e._y})}setVisibility(e=!0){this._visible=e}getVisibility(){return this._visible}isOnScreen(){return this._x>0&&this._y>0&&this._x{this.element.className=`${eu} ${this._customClassName||""}`}):this.element.className=`${eu} ${this._customClassName||""} ${Xg}`}_measureText(){const{left:e,top:t,right:r,bottom:n}=this._customPadding;this._estimatedWidth=this._customFontSize*this.fontWidthHeightRatio*this.element.innerHTML.length+e+r,this._estimatedHeight=this._customFontSize+t+n}}const ml="css-label--labels-container",Yg="css-label--labels-container-hidden";let Is;const X3=()=>{if(Is)return;Is=document.createElement("style"),Is.innerHTML=` + .${ml} { + transition: opacity 100ms; + position: absolute; + width: 100%; + height: 100%; + overflow: hidden; + top: 0%; + pointer-events: none; + opacity: 1; + } + .${Yg} { + opacity: 0; + + div { + pointer-events: none; + } + } +`;const i=document.head.getElementsByTagName("style")[0];i?document.head.insertBefore(Is,i):document.head.appendChild(Is)};class q3{constructor(e,t){this._cssLabels=new Map,this._elementToData=new Map,X3(),this._container=e,e.addEventListener("click",this._onClick.bind(this)),this._container.className=ml,t!=null&&t.onLabelClick&&(this._onClickCallback=t.onLabelClick),t!=null&&t.padding&&(this._padding=t.padding),t!=null&&t.pointerEvents&&(this._pointerEvents=t.pointerEvents),t!=null&&t.dispatchWheelEventElement&&(this._dispatchWheelEventElement=t.dispatchWheelEventElement,this._container.addEventListener("wheel",this._onWheel.bind(this)))}setLabels(e){const t=new Map(this._cssLabels);e.forEach(r=>{const{x:n,y:a,fontSize:s,color:o,text:l,weight:d,opacity:c,shouldBeShown:u,style:h,className:g}=r;if(t.get(r.id))t.delete(r.id);else{const I=new qg(this._container,r.text);this._cssLabels.set(r.id,I),this._elementToData.set(I.element,r)}const G=this._cssLabels.get(r.id);G&&(G.setText(l),G.setPosition(n,a),h!==void 0&&G.setStyle(h),d!==void 0&&G.setWeight(d),s!==void 0&&G.setFontSize(s),o!==void 0&&G.setColor(o),this._padding!==void 0&&G.setPadding(this._padding),this._pointerEvents!==void 0&&G.setPointerEvents(this._pointerEvents),c!==void 0&&G.setOpacity(c),u!==void 0&&G.setForceShow(u),g!==void 0&&G.setClassName(g))});for(const[r]of t){const n=this._cssLabels.get(r);n&&(this._elementToData.delete(n.element),n.destroy()),this._cssLabels.delete(r)}}draw(e=!0){e&&this._intersectLabels(),this._cssLabels.forEach(t=>t.draw())}show(){this._container.className=ml}hide(){this._container.className=`${ml} ${Yg}`}destroy(){this._container.removeEventListener("click",this._onClick.bind(this)),this._container.removeEventListener("wheel",this._onWheel.bind(this)),this._cssLabels.forEach(e=>e.destroy())}_onClick(e){var t;const r=this._elementToData.get(e.target);r&&((t=this._onClickCallback)===null||t===void 0||t.call(this,e,r))}_onWheel(e){var t;e.preventDefault();const r=new WheelEvent("wheel",e);(t=this._dispatchWheelEventElement)===null||t===void 0||t.dispatchEvent(r)}_intersectLabels(){const e=Array.from(this._cssLabels.values());e.forEach(t=>t.setVisibility(t.isOnScreen()));for(let t=0;tr.getWeight()?r.setVisibility(a.getForceShow()?!1:r.getForceShow()):a.setVisibility(r.getForceShow()?!1:a.getForceShow());continue}}}}}var Hn=[],Y3=function(){return Hn.some(function(i){return i.activeTargets.length>0})},K3=function(){return Hn.some(function(i){return i.skippedTargets.length>0})},Nm="ResizeObserver loop completed with undelivered notifications.",Z3=function(){var i;typeof ErrorEvent=="function"?i=new ErrorEvent("error",{message:Nm}):(i=document.createEvent("Event"),i.initEvent("error",!1,!1),i.message=Nm),window.dispatchEvent(i)},Ys;(function(i){i.BORDER_BOX="border-box",i.CONTENT_BOX="content-box",i.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ys||(Ys={}));var Vn=function(i){return Object.freeze(i)},J3=function(){function i(e,t){this.inlineSize=e,this.blockSize=t,Vn(this)}return i}(),Kg=function(){function i(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Vn(this)}return i.prototype.toJSON=function(){var e=this,t=e.x,r=e.y,n=e.top,a=e.right,s=e.bottom,o=e.left,l=e.width,d=e.height;return{x:t,y:r,top:n,right:a,bottom:s,left:o,width:l,height:d}},i.fromRect=function(e){return new i(e.x,e.y,e.width,e.height)},i}(),zu=function(i){return i instanceof SVGElement&&"getBBox"in i},Zg=function(i){if(zu(i)){var e=i.getBBox(),t=e.width,r=e.height;return!t&&!r}var n=i,a=n.offsetWidth,s=n.offsetHeight;return!(a||s||i.getClientRects().length)},zm=function(i){var e;if(i instanceof Element)return!0;var t=(e=i==null?void 0:i.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(t&&i instanceof t.Element)},Q3=function(i){switch(i.tagName){case"INPUT":if(i.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Bs=typeof window!="undefined"?window:{},tl=new WeakMap,Mm=/auto|scroll/,eE=/^tb|vertical/,tE=/msie|trident/i.test(Bs.navigator&&Bs.navigator.userAgent),_r=function(i){return parseFloat(i||"0")},Da=function(i,e,t){return i===void 0&&(i=0),e===void 0&&(e=0),t===void 0&&(t=!1),new J3((t?e:i)||0,(t?i:e)||0)},Bm=Vn({devicePixelContentBoxSize:Da(),borderBoxSize:Da(),contentBoxSize:Da(),contentRect:new Kg(0,0,0,0)}),Jg=function(i,e){if(e===void 0&&(e=!1),tl.has(i)&&!e)return tl.get(i);if(Zg(i))return tl.set(i,Bm),Bm;var t=getComputedStyle(i),r=zu(i)&&i.ownerSVGElement&&i.getBBox(),n=!tE&&t.boxSizing==="border-box",a=eE.test(t.writingMode||""),s=!r&&Mm.test(t.overflowY||""),o=!r&&Mm.test(t.overflowX||""),l=r?0:_r(t.paddingTop),d=r?0:_r(t.paddingRight),c=r?0:_r(t.paddingBottom),u=r?0:_r(t.paddingLeft),h=r?0:_r(t.borderTopWidth),g=r?0:_r(t.borderRightWidth),C=r?0:_r(t.borderBottomWidth),G=r?0:_r(t.borderLeftWidth),I=u+d,L=l+c,$=G+g,U=h+C,T=o?i.offsetHeight-U-i.clientHeight:0,M=s?i.offsetWidth-$-i.clientWidth:0,ee=n?I+$:0,re=n?L+U:0,Se=r?r.width:_r(t.width)-ee-M,Te=r?r.height:_r(t.height)-re-T,Ke=Se+I+M+$,fe=Te+L+T+U,Ge=Vn({devicePixelContentBoxSize:Da(Math.round(Se*devicePixelRatio),Math.round(Te*devicePixelRatio),a),borderBoxSize:Da(Ke,fe,a),contentBoxSize:Da(Se,Te,a),contentRect:new Kg(u,l,Se,Te)});return tl.set(i,Ge),Ge},Qg=function(i,e,t){var r=Jg(i,t),n=r.borderBoxSize,a=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Ys.DEVICE_PIXEL_CONTENT_BOX:return s;case Ys.BORDER_BOX:return n;default:return a}},iE=function(){function i(e){var t=Jg(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Vn([t.borderBoxSize]),this.contentBoxSize=Vn([t.contentBoxSize]),this.devicePixelContentBoxSize=Vn([t.devicePixelContentBoxSize])}return i}(),e0=function(i){if(Zg(i))return 1/0;for(var e=0,t=i.parentNode;t;)e+=1,t=t.parentNode;return e},rE=function(){var i=1/0,e=[];Hn.forEach(function(s){if(s.activeTargets.length!==0){var o=[];s.activeTargets.forEach(function(d){var c=new iE(d.target),u=e0(d.target);o.push(c),d.lastReportedSize=Qg(d.target,d.observedBox),ui?t.activeTargets.push(n):t.skippedTargets.push(n))})})},nE=function(){var i=0;for($m(i);Y3();)i=rE(),$m(i);return K3()&&Z3(),i>0},yc,t0=[],aE=function(){return t0.splice(0).forEach(function(i){return i()})},sE=function(i){if(!yc){var e=0,t=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return aE()}).observe(t,r),yc=function(){t.textContent="".concat(e?e--:e++)}}t0.push(i),yc()},oE=function(i){sE(function(){requestAnimationFrame(i)})},pl=0,lE=function(){return!!pl},dE=250,cE={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gm=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Um=function(i){return i===void 0&&(i=0),Date.now()+i},xc=!1,uE=function(){function i(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return i.prototype.run=function(e){var t=this;if(e===void 0&&(e=dE),!xc){xc=!0;var r=Um(e);oE(function(){var n=!1;try{n=nE()}finally{if(xc=!1,e=r-Um(),!lE())return;n?t.run(1e3):e>0?t.run(e):t.start()}})}},i.prototype.schedule=function(){this.stop(),this.run()},i.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,cE)};document.body?t():Bs.addEventListener("DOMContentLoaded",t)},i.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gm.forEach(function(t){return Bs.addEventListener(t,e.listener,!0)}))},i.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Gm.forEach(function(t){return Bs.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},i}(),tu=new uE,jm=function(i){!pl&&i>0&&tu.start(),pl+=i,!pl&&tu.stop()},fE=function(i){return!zu(i)&&!Q3(i)&&getComputedStyle(i).display==="inline"},hE=function(){function i(e,t){this.target=e,this.observedBox=t||Ys.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return i.prototype.isActive=function(){var e=Qg(this.target,this.observedBox,!0);return fE(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},i}(),mE=function(){function i(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return i}(),il=new WeakMap,Hm=function(i,e){for(var t=0;t=0&&(a&&Hn.splice(Hn.indexOf(r),1),r.observationTargets.splice(n,1),jm(-1))},i.disconnect=function(e){var t=this,r=il.get(e);r.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),r.activeTargets.splice(0,r.activeTargets.length)},i}(),Vm=function(){function i(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");rl.connect(this,e)}return i.prototype.observe=function(e,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!zm(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");rl.observe(this,e,t)},i.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!zm(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");rl.unobserve(this,e)},i.prototype.disconnect=function(){rl.disconnect(this)},i.toString=function(){return"function ResizeObserver () { [polyfill code] }"},i}();function pE(i){return i}var gE=3,Wm=1e-6;function vE(i){return"translate("+i+",0)"}function _E(i){return e=>+i(e)}function bE(i,e){return e=Math.max(0,i.bandwidth()-e*2)/2,i.round()&&(e=Math.round(e)),t=>+i(t)+e}function yE(){return!this.__axis}function xE(i,e){var t=[],r=null,n=null,a=6,s=6,o=3,l=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,d=1,c="y",u=vE;function h(g){var C=r==null?e.ticks?e.ticks.apply(e,t):e.domain():r,G=n==null?e.tickFormat?e.tickFormat.apply(e,t):pE:n,I=Math.max(a,0)+o,L=e.range(),$=+L[0]+l,U=+L[L.length-1]+l,T=(e.bandwidth?bE:_E)(e.copy(),l),M=g.selection?g.selection():g,ee=M.selectAll(".domain").data([null]),re=M.selectAll(".tick").data(C,e).order(),Se=re.exit(),Te=re.enter().append("g").attr("class","tick"),Ke=re.select("line"),fe=re.select("text");ee=ee.merge(ee.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),re=re.merge(Te),Ke=Ke.merge(Te.append("line").attr("stroke","currentColor").attr(c+"2",d*a)),fe=fe.merge(Te.append("text").attr("fill","currentColor").attr(c,d*I).attr("dy","0.71em")),g!==M&&(ee=ee.transition(g),re=re.transition(g),Ke=Ke.transition(g),fe=fe.transition(g),Se=Se.transition(g).attr("opacity",Wm).attr("transform",function(Ge){return isFinite(Ge=T(Ge))?u(Ge+l):this.getAttribute("transform")}),Te.attr("opacity",Wm).attr("transform",function(Ge){var He=this.parentNode.__axis;return u((He&&isFinite(He=He(Ge))?He:T(Ge))+l)})),Se.remove(),ee.attr("d",s?"M"+$+","+d*s+"V"+l+"H"+U+"V"+d*s:"M"+$+","+l+"H"+U),re.attr("opacity",1).attr("transform",function(Ge){return u(T(Ge)+l)}),Ke.attr(c+"2",d*a),fe.attr(c,d*I).text(G),M.filter(yE).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","middle"),M.each(function(){this.__axis=T})}return h.scale=function(g){return arguments.length?(e=g,h):e},h.ticks=function(){return t=Array.from(arguments),h},h.tickArguments=function(g){return arguments.length?(t=g==null?[]:Array.from(g),h):t.slice()},h.tickValues=function(g){return arguments.length?(r=g==null?null:Array.from(g),h):r&&r.slice()},h.tickFormat=function(g){return arguments.length?(n=g,h):n},h.tickSize=function(g){return arguments.length?(a=s=+g,h):a},h.tickSizeInner=function(g){return arguments.length?(a=+g,h):a},h.tickSizeOuter=function(g){return arguments.length?(s=+g,h):s},h.tickPadding=function(g){return arguments.length?(o=+g,h):o},h.offset=function(g){return arguments.length?(l=+g,h):l},h}function Xm(i){return xE(gE,i)}const wc=i=>()=>i;function wE(i,{sourceEvent:e,target:t,selection:r,mode:n,dispatch:a}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function SE(i){i.stopImmediatePropagation()}function Sc(i){i.preventDefault(),i.stopImmediatePropagation()}var qm={name:"drag"},Ec={name:"space"},ya={name:"handle"},xa={name:"center"};const{abs:Ym,max:Fi,min:Di}=Math;function Km(i){return[+i[0],+i[1]]}function Zm(i){return[Km(i[0]),Km(i[1])]}var gl={name:"x",handles:["w","e"].map(Rl),input:function(i,e){return i==null?null:[[+i[0],e[0][1]],[+i[1],e[1][1]]]},output:function(i){return i&&[i[0][0],i[1][0]]}},Tc={name:"y",handles:["n","s"].map(Rl),input:function(i,e){return i==null?null:[[e[0][0],+i[0]],[e[1][0],+i[1]]]},output:function(i){return i&&[i[0][1],i[1][1]]}},Mr={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Jm={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Qm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},EE={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},TE={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Rl(i){return{type:i}}function AE(i){return!i.ctrlKey&&!i.button}function IE(){var i=this.ownerSVGElement||this;return i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]}function kE(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ac(i){for(;!i.__brush;)if(!(i=i.parentNode))return;return i.__brush}function CE(i){return i[0][0]===i[1][0]||i[0][1]===i[1][1]}function LE(){return OE(gl)}function OE(i){var e=IE,t=AE,r=kE,n=!0,a=$l("start","brush","end"),s=6,o;function l(I){var L=I.property("__brush",G).selectAll(".overlay").data([Rl("overlay")]);L.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Mr.overlay).merge(L).each(function(){var U=Ac(this).extent;hi(this).attr("x",U[0][0]).attr("y",U[0][1]).attr("width",U[1][0]-U[0][0]).attr("height",U[1][1]-U[0][1])}),I.selectAll(".selection").data([Rl("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Mr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var $=I.selectAll(".handle").data(i.handles,function(U){return U.type});$.exit().remove(),$.enter().append("rect").attr("class",function(U){return"handle handle--"+U.type}).attr("cursor",function(U){return Mr[U.type]}),I.each(d).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",g).on("touchend.brush touchcancel.brush",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(I,L,$){I.tween?I.on("start.brush",function(U){c(this,arguments).beforestart().start(U)}).on("interrupt.brush end.brush",function(U){c(this,arguments).end(U)}).tween("brush",function(){var U=this,T=U.__brush,M=c(U,arguments),ee=T.selection,re=i.input(typeof L=="function"?L.apply(this,arguments):L,T.extent),Se=jl(ee,re);function Te(Ke){T.selection=Ke===1&&re===null?null:Se(Ke),d.call(U),M.brush()}return ee!==null&&re!==null?Te:Te(1)}):I.each(function(){var U=this,T=arguments,M=U.__brush,ee=i.input(typeof L=="function"?L.apply(U,T):L,M.extent),re=c(U,T).beforestart();Ra(U),M.selection=ee===null?null:ee,d.call(U),re.start($).brush($).end($)})},l.clear=function(I,L){l.move(I,null,L)};function d(){var I=hi(this),L=Ac(this).selection;L?(I.selectAll(".selection").style("display",null).attr("x",L[0][0]).attr("y",L[0][1]).attr("width",L[1][0]-L[0][0]).attr("height",L[1][1]-L[0][1]),I.selectAll(".handle").style("display",null).attr("x",function($){return $.type[$.type.length-1]==="e"?L[1][0]-s/2:L[0][0]-s/2}).attr("y",function($){return $.type[0]==="s"?L[1][1]-s/2:L[0][1]-s/2}).attr("width",function($){return $.type==="n"||$.type==="s"?L[1][0]-L[0][0]+s:s}).attr("height",function($){return $.type==="e"||$.type==="w"?L[1][1]-L[0][1]+s:s})):I.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(I,L,$){var U=I.__brush.emitter;return U&&(!$||!U.clean)?U:new u(I,L,$)}function u(I,L,$){this.that=I,this.args=L,this.state=I.__brush,this.active=0,this.clean=$}u.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(I,L){return this.starting?(this.starting=!1,this.emit("start",I,L)):this.emit("brush",I),this},brush:function(I,L){return this.emit("brush",I,L),this},end:function(I,L){return--this.active===0&&(delete this.state.emitter,this.emit("end",I,L)),this},emit:function(I,L,$){var U=hi(this.that).datum();a.call(I,this.that,new wE(I,{sourceEvent:L,target:l,selection:i.output(this.state.selection),mode:$,dispatch:a}),U)}};function h(I){if(o&&!I.touches||!t.apply(this,arguments))return;var L=this,$=I.target.__data__.type,U=(n&&I.metaKey?$="overlay":$)==="selection"?qm:n&&I.altKey?xa:ya,T=i===Tc?null:EE[$],M=i===gl?null:TE[$],ee=Ac(L),re=ee.extent,Se=ee.selection,Te=re[0][0],Ke,fe,Ge=re[0][1],He,N,we=re[1][0],K,ne,qe=re[1][1],Oe,Xe,it=0,rt=0,Bt,Tt=T&&M&&n&&I.shiftKey,Ct,Rt,wt=Array.from(I.touches||[I],at=>{const bt=at.identifier;return at=Br(at,L),at.point0=at.slice(),at.identifier=bt,at});Ra(L);var $t=c(L,arguments,!0).beforestart();if($==="overlay"){Se&&(Bt=!0);const at=[wt[0],wt[1]||wt[0]];ee.selection=Se=[[Ke=i===Tc?Te:Di(at[0][0],at[1][0]),He=i===gl?Ge:Di(at[0][1],at[1][1])],[K=i===Tc?we:Fi(at[0][0],at[1][0]),Oe=i===gl?qe:Fi(at[0][1],at[1][1])]],wt.length>1&&Mt(I)}else Ke=Se[0][0],He=Se[0][1],K=Se[1][0],Oe=Se[1][1];fe=Ke,N=He,ne=K,Xe=Oe;var Ve=hi(L).attr("pointer-events","none"),dt=Ve.selectAll(".overlay").attr("cursor",Mr[$]);if(I.touches)$t.moved=be,$t.ended=Lt;else{var gt=hi(I.view).on("mousemove.brush",be,!0).on("mouseup.brush",Lt,!0);n&>.on("keydown.brush",ai,!0).on("keyup.brush",si,!0),Ng(I.view)}d.call(L),$t.start(I,U.name);function be(at){for(const bt of at.changedTouches||[at])for(const tr of wt)tr.identifier===bt.identifier&&(tr.cur=Br(bt,L));if(Tt&&!Ct&&!Rt&&wt.length===1){const bt=wt[0];Ym(bt.cur[0]-bt[0])>Ym(bt.cur[1]-bt[1])?Rt=!0:Ct=!0}for(const bt of wt)bt.cur&&(bt[0]=bt.cur[0],bt[1]=bt.cur[1]);Bt=!0,Sc(at),Mt(at)}function Mt(at){const bt=wt[0],tr=bt.point0;var Mi;switch(it=bt[0]-tr[0],rt=bt[1]-tr[1],U){case Ec:case qm:{T&&(it=Fi(Te-Ke,Di(we-K,it)),fe=Ke+it,ne=K+it),M&&(rt=Fi(Ge-He,Di(qe-Oe,rt)),N=He+rt,Xe=Oe+rt);break}case ya:{wt[1]?(T&&(fe=Fi(Te,Di(we,wt[0][0])),ne=Fi(Te,Di(we,wt[1][0])),T=1),M&&(N=Fi(Ge,Di(qe,wt[0][1])),Xe=Fi(Ge,Di(qe,wt[1][1])),M=1)):(T<0?(it=Fi(Te-Ke,Di(we-Ke,it)),fe=Ke+it,ne=K):T>0&&(it=Fi(Te-K,Di(we-K,it)),fe=Ke,ne=K+it),M<0?(rt=Fi(Ge-He,Di(qe-He,rt)),N=He+rt,Xe=Oe):M>0&&(rt=Fi(Ge-Oe,Di(qe-Oe,rt)),N=He,Xe=Oe+rt));break}case xa:{T&&(fe=Fi(Te,Di(we,Ke-it*T)),ne=Fi(Te,Di(we,K+it*T))),M&&(N=Fi(Ge,Di(qe,He-rt*M)),Xe=Fi(Ge,Di(qe,Oe+rt*M)));break}}ne0&&(Ke=fe-it),M<0?Oe=Xe-rt:M>0&&(He=N-rt),U=Ec,dt.attr("cursor",Mr.selection),Mt(at));break}default:return}Sc(at)}function si(at){switch(at.keyCode){case 16:{Tt&&(Ct=Rt=Tt=!1,Mt(at));break}case 18:{U===xa&&(T<0?K=ne:T>0&&(Ke=fe),M<0?Oe=Xe:M>0&&(He=N),U=ya,Mt(at));break}case 32:{U===Ec&&(at.altKey?(T&&(K=ne-it*T,Ke=fe+it*T),M&&(Oe=Xe-rt*M,He=N+rt*M),U=xa):(T<0?K=ne:T>0&&(Ke=fe),M<0?Oe=Xe:M>0&&(He=N),U=ya),dt.attr("cursor",Mr[$]),Mt(at));break}default:return}Sc(at)}}function g(I){c(this,arguments).moved(I)}function C(I){c(this,arguments).ended(I)}function G(){var I=this.__brush||{selection:null};return I.extent=Zm(e.apply(this,arguments)),I.dim=i,I}return l.extent=function(I){return arguments.length?(e=typeof I=="function"?I:wc(Zm(I)),l):e},l.filter=function(I){return arguments.length?(t=typeof I=="function"?I:wc(!!I),l):t},l.touchable=function(I){return arguments.length?(r=typeof I=="function"?I:wc(!!I),l):r},l.handleSize=function(I){return arguments.length?(s=+I,l):s},l.keyModifiers=function(I){return arguments.length?(n=!!I,l):n},l.on=function(){var I=a.on.apply(a,arguments);return I===a?l:I},l}const RE='',PE='',FE=Tr(".%L"),DE=Tr(":%S"),NE=Tr("%I:%M"),zE=Tr("%I %p"),ME=Tr("%a %d"),BE=Tr("%b %d"),$E=Tr("%b"),GE=Tr("%Y"),UE=i=>{const e=new Date(i);return(Gn(e)typeof i=="function",HE=i=>Array.isArray(i),VE=i=>i instanceof Object,Pl=i=>i.constructor.name!=="Function"&&i.constructor.name!=="Object",iu=i=>VE(i)&&!HE(i)&&!jE(i)&&!Pl(i),Fl=(i,e=new Map)=>{if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i.getTime());if(i instanceof Array){const t=[];e.set(i,t);for(const r of i)t.push(e.has(r)?e.get(r):Fl(r,e));return i}if(Pl(i))return i;if(i instanceof Object){const t={};e.set(i,t);const r=i;return Object.keys(i).reduce((n,a)=>(n[a]=e.has(r[a])?e.get(r[a]):Fl(r[a],e),n),t),t}return i},Xa=(i,e,t=new Map)=>{const r=Pl(i)?i:Fl(i);return i===e?i:t.has(e)?t.get(e):(t.set(e,r),Object.keys(e).forEach(n=>{iu(i[n])&&iu(e[n])?r[n]=Xa(i[n],e[n],t):Pl(e)?r[n]=e:r[n]=Fl(e[n])}),r)},WE=(i,e,t)=>i>=+e&&+i<=+t,XE=(i,e)=>{const[t,r]=e,n=Array.from(i.keys());let a=0;return n.forEach(s=>{var o;WE(+s,+t,+r)&&(a+=(o=i.get(s))!==null&&o!==void 0?o:0)}),a},qE=i=>{const e=getComputedStyle(i);let t=i.clientWidth,r=i.clientHeight;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),{height:r,width:t}};let YE=class{init(e){const t=this;return Object.keys(e).forEach(r=>{iu(t[r])?t[r]=Xa(t[r],e[r]):t[r]=e[r]}),this}};const KE={top:1,left:0,bottom:1,right:0};let ep=class extends YE{constructor(){super(...arguments),this.allowSelection=!0,this.showAnimationControls=!1,this.animationSpeed=50,this.padding=KE,this.axisTickHeight=25,this.selectionRadius=3,this.selectionPadding=8,this.barCount=100,this.barRadius=1,this.barPadding=.1,this.barTopMargin=3,this.minBarHeight=1,this.dataStep=void 0,this.tickStep=void 0,this.formatter=UE,this.events={onBrush:void 0,onBarHover:void 0,onAnimationPlay:void 0,onAnimationPause:void 0}}};var tp=[],ks=[];function ro(i,e){if(i&&typeof document!="undefined"){var t,r=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var s=tp.indexOf(a);s===-1&&(s=tp.push(a)-1,ks[s]={}),t=ks[s]&&ks[s][r]?ks[s][r]:ks[s][r]=o()}else t=o();i.charCodeAt(0)===65279&&(i=i.substring(1)),t.styleSheet?t.styleSheet.cssText+=i:t.appendChild(document.createTextNode(i))}function o(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var d=Object.keys(e.attributes),c=0;c{n.preventDefault(),this._isAnimationRunning?this.pauseAnimation():this.playAnimation()},this._disableAnimation=()=>{var n,a;this.pauseAnimation(),(n=this._animationControlDiv)===null||n===void 0||n.removeEventListener("click",this._toggleAnimation),(a=this._animationControlDiv)===null||a===void 0||a.remove()},this.playAnimation=()=>{var n,a,s,o;clearInterval(this._animationInterval),this._currentSelectionInPixels&&(this._animationInterval=setInterval(this._animateSelection,this._config.animationSpeed),this._isAnimationRunning=!0,(a=(n=this._config.events).onAnimationPlay)===null||a===void 0||a.call(n,this._isAnimationRunning,this._currentSelection)),(s=this._pauseButtonSvg)===null||s===void 0||s.classList.remove(zt.hidden),(o=this._playButtonSvg)===null||o===void 0||o.classList.add(zt.hidden)},this.pauseAnimation=()=>{var n,a,s,o;clearInterval(this._animationInterval),this._isAnimationRunning=!1,(a=(n=this._config.events).onAnimationPause)===null||a===void 0||a.call(n,this._isAnimationRunning,this._currentSelection),(s=this._pauseButtonSvg)===null||s===void 0||s.classList.add(zt.hidden),(o=this._playButtonSvg)===null||o===void 0||o.classList.remove(zt.hidden)},this.stopAnimation=()=>{var n,a;this.pauseAnimation(),this.setSelection(void 0),(a=(n=this._config.events).onBrush)===null||a===void 0||a.call(n,void 0)},this._animateSelection=()=>{var n,a;const s=this._currentSelectionInPixels;s&&s[0]!==void 0&&s[1]!==void 0&&(this.setSelectionInPixels([s[0]+this._barWidth,s[1]+this._barWidth]),s[1]!==((n=this._currentSelectionInPixels)===null||n===void 0?void 0:n[1])&&((a=this._currentSelectionInPixels)===null||a===void 0?void 0:a[1])!==void 0||this.stopAnimation())},this._checkLastTickPosition=()=>{var n;const a=this._axisGroup.selectAll(".tick:last-of-type").nodes();if(a!=null&&a.length){const s=a[0],o=s==null?void 0:s.getBoundingClientRect().right,l=(n=this._svg)===null||n===void 0?void 0:n.getBoundingClientRect().right;s.style.display=o>=l?"none":"inherit"}},this.destroy=()=>{this._containerNode.innerHTML="",clearInterval(this._animationInterval)},t&&this._config.init(t),this._containerNode=e,this._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._svg.classList.add(zt.timelineSvg),this._animationControlDiv=document.createElement("div"),this._animationControlDiv.classList.add(zt.animationControl),this._containerNode.classList.add(zt.timeline),this._containerNode.appendChild(this._svg),this._noDataDiv=document.createElement("div"),hi(this._noDataDiv).style("display","none").attr("class",zt.noData).append("div").text("No timeline data"),this._containerNode.appendChild(this._noDataDiv),(r=this._config)===null||r===void 0?void 0:r.showAnimationControls){const n=setInterval(()=>{this._containerNode!==null&&(this._initAnimationControls(),clearInterval(n))},100)}this._barsGroup=hi(this._svg).append("g").attr("class",zt.bars),this._axisGroup=hi(this._svg).append("g").attr("class",zt.axis),this._brushGroup=hi(this._svg).append("g").attr("class",zt.brush),this._timeAxis.tickFormat(this._config.formatter),this._numAxis.tickFormat(this._config.formatter),this._resizeObserver=new Vm(n=>{window.requestAnimationFrame(()=>{Array.isArray(n)&&n.length&&this.resize()})}),this._resizeObserver=new Vm(()=>{this.resize()}),this._resizeObserver.observe(this._containerNode)}get _barPadding(){return this._barWidth*this._config.barPadding}getCurrentSelection(){return this._currentSelection}getCurrentSelectionInPixels(){return this._currentSelectionInPixels}getBarWidth(){return this._barWidth-this._barPadding}getConfig(){return this._config}getIsAnimationRunning(){return this._isAnimationRunning}setConfig(e){var t,r,n,a,s,o;const l=JSON.parse(JSON.stringify(this._config));e?this._config.init(e):this._config=new ep,!((t=this._config)===null||t===void 0)&&t.showAnimationControls?!((r=this._animationControlDiv)===null||r===void 0)&&r.isConnected||this._initAnimationControls():this._animationControlDiv&&this._disableAnimation(),this._config.allowSelection||this._disableBrush(),this._config.formatter&&(this._timeAxis.tickFormat(this._config.formatter),this._numAxis.tickFormat(this._config.formatter)),((n=this._config)===null||n===void 0?void 0:n.dataStep)===((a=l.config)===null||a===void 0?void 0:a.dataStep)&&((s=this._config)===null||s===void 0?void 0:s.barCount)===((o=l.config)===null||o===void 0?void 0:o.barCount)||this._updateTimelineData(),this.resize()}setTimeData(e){var t,r,n;this._timeData=e==null?void 0:e.filter(a=>!isNaN(+a)&&a!==void 0),this._currentSelection=void 0,(r=(t=this._config.events).onBrush)===null||r===void 0||r.call(t,this._currentSelection),this._updateScales(),hi(this._noDataDiv).style("display","none"),!((n=this._timeData)===null||n===void 0)&&n.length?(this._dateExtent=Xs(this._timeData),this._updateTimelineData()):(this._barsData=[],this._axisGroup.selectAll("*").remove(),this._barsGroup.selectAll("*").remove(),this._brushGroup.selectAll("*").remove(),hi(this._noDataDiv).style("display","block"),this._firstRender=!0)}_getBarsData(e,t){var r,n;if(!(e[1]<=e[0])&&(!((r=this._timeData)===null||r===void 0)&&r.length)&&this._dateExtent){const a=nw(this._timeData,c=>c.length,c=>c),s=(n=this._config.dataStep)!==null&&n!==void 0?n:(e[1]-e[0])/(this._config.barCount-1);if(s===0)return;this._bandIntervals=Xc(+e[0],+e[1],s);const o=this._bandIntervals[this._bandIntervals.length-1];let l=this._config.dataStep?+o+s:e[1];t&&(this._bandIntervals=this._bandIntervals.map(c=>new Date(c)),l=new Date(l)),o({rangeStart:c[0],rangeEnd:c[1],count:XE(a,c)}))}}_updateTimelineData(){var e;if(!((e=this._timeData)===null||e===void 0)&&e.length&&this._dateExtent){if(this._isNumericTimeline=!(this._timeData[0]instanceof Date),this._isNumericTimeline)this._getBarsData(this._dateExtent);else{this._timeData=this._timeData.map(r=>new Date(r));const t=this._dateExtent.map(r=>{var n;return(n=r.getTime())!==null&&n!==void 0?n:0});this._getBarsData(t)}this._maxCount=Math.max(...this._barsData.map(t=>t.count))}}setSelection(e,t=!1){var r,n,a,s;const o=this._currentSelection;e&&this._dateExtent&&e[0]>=this._dateExtent[0]&&e[1]<=this._dateExtent[1]&&e[0]0&&e[1]this._activeAxisScale.invert(o)),this._currentSelectionInPixels=(t=this._currentSelection)===null||t===void 0?void 0:t.map(this._activeAxisScale),(r=this._animationControlDiv)===null||r===void 0||r.classList.remove(zt.disabled)):(this._currentSelection=void 0,this._currentSelectionInPixels=void 0,(n=this._animationControlDiv)===null||n===void 0||n.classList.add(zt.disabled)),this._brushInstance&&!this._firstRender&&this._brushGroup.call(this._brushInstance.move,this._currentSelectionInPixels),(s=(a=this._config.events).onBrush)===null||s===void 0||s.call(a,this._currentSelection)}resize(){const{height:e,width:t}=qE(this._containerNode),{offsetWidth:r}=this._animationControlDiv;this._width=t,this._height=e,this._timelineWidth=this._width-this._config.padding.left-this._config.padding.right-r,this._timelineHeight=this._height-this._config.padding.top-this._config.padding.bottom,this._timelineHeight>this._config.padding.top+this._config.padding.bottom&&(this._updateScales(),this._checkLastTickPosition(),this._currentSelection&&this.setSelection(this._currentSelection,!0),this.render())}render(){this._updateBrush(),this._updateBars(),this._updateAxis(),this._firstRender&&(this._firstRender=!1)}_updateAxis(){this._timeData&&(this._axisGroup.style("transform",`translate(${this._config.padding.left}px, ${this._config.padding.top+this._config.axisTickHeight+1+this._config.selectionPadding/2}px)`).call(this._isNumericTimeline?this._numAxis:this._timeAxis).call(e=>e.select(".domain").remove()),this._axisGroup.selectAll(".tick").select("text").attr("class",zt.axisTick).attr("y",0).attr("dy",-this._config.axisTickHeight).attr("dx","5px"),this._axisGroup.selectAll("line").attr("class",zt.axisLine).attr("y2",-this._config.axisTickHeight))}_updateBrush(){var e;this._config.allowSelection&&(this._brushGroup.style("transform",`translate(${this._config.padding.left}px, ${this._config.padding.top}px)`),this._brushInstance=LE().extent([[0,0],[this._timelineWidth,this._timelineHeight]]),this._brushInstance.on("end",({selection:t,sourceEvent:r})=>{var n,a,s,o,l,d,c;r&&(t?(this._currentSelection=t.map(u=>this._activeAxisScale.invert(u)),this._currentSelectionInPixels=(n=this._currentSelection)===null||n===void 0?void 0:n.map(this._activeAxisScale),(a=this._animationControlDiv)===null||a===void 0||a.classList.remove(zt.disabled),(o=(s=this._config.events).onBrush)===null||o===void 0||o.call(s,this._currentSelection)):(this._currentSelection=void 0,this._currentSelectionInPixels=void 0,(d=(l=this._config.events).onBrush)===null||d===void 0||d.call(l,void 0),(c=this._animationControlDiv)===null||c===void 0||c.classList.add(zt.disabled)))}),this._brushGroup.call(this._brushInstance),this._currentSelection?(this._currentSelectionInPixels=this._currentSelection.map(this._activeAxisScale),this._brushGroup.call(this._brushInstance.move,this._currentSelectionInPixels)):(e=this._brushInstance)===null||e===void 0||e.clear(this._brushGroup),this._brushGroup.select("rect.selection").classed(zt.selection,!0).attr("rx",this._config.selectionRadius).attr("ry",this._config.selectionRadius))}_updateBars(){this._barsGroup.style("transform",`translate(${this._config.padding.left}px, ${this._config.padding.top-this._config.selectionPadding/2}px)`);const e=this._barsGroup.selectAll(`.${zt.bar}`).data(this._barsData).join("rect").attr("class",zt.bar).attr("x",t=>this._activeAxisScale(+t.rangeStart)+this._barPadding/2).attr("width",this.getBarWidth()).attr("rx",this._config.barRadius).attr("ry",this._config.barRadius).attr("y",-this._timelineHeight);this._config.events.onBarHover&&e.on("mouseover",this._config.events.onBarHover),e.transition().duration(300).attr("height",t=>this._yScale(t.count)).style("opacity",t=>this._yScale(t.count)===this._config.minBarHeight?.25:1)}_updateScales(){if(!this._dateExtent||!this._barsData.length)return;const e=this._barsData[this._barsData.length-1];if(this._config.tickStep){const n=Xc(+this._dateExtent[0],+this._dateExtent[1],this._config.tickStep);this._isNumericTimeline?this._numAxis.tickValues(n):this._timeAxis.tickValues(n.map(a=>new Date(a)))}this._yScale.range([this._config.minBarHeight,this._timelineHeight-this._config.barTopMargin-this._config.selectionPadding]).domain([0,this._maxCount]).clamp(!0),this._isNumericTimeline?(this._numScale.domain([this._dateExtent[0],e.rangeEnd]).range([0,this._timelineWidth]).clamp(!0),this._activeAxisScale=this._numScale):(this._timeScale.domain([this._dateExtent[0],e.rangeEnd]).range([0,this._timelineWidth]).clamp(!0),this._activeAxisScale=this._timeScale);const t=this._barsData[0],r=this._activeAxisScale(t.rangeEnd)-this._activeAxisScale(t.rangeStart);this._barWidth=r}_disableBrush(){var e,t;(e=this._brushInstance)===null||e===void 0||e.clear(this._brushGroup),this._currentSelectionInPixels=void 0,this._currentSelection=void 0,this.pauseAnimation(),this._brushGroup.selectAll("*").remove(),this._config.showAnimationControls&&((t=this._animationControlDiv)===null||t===void 0||t.classList.add(zt.disabled))}_initAnimationControls(){return Y(this,null,function*(){this._containerNode.insertBefore(this._animationControlDiv,this._svg),yield Y(this,null,function*(){var e,t;if(!this._animationControlDiv.firstChild){const r=this._svgParser.parseFromString(PE,"image/svg+xml").firstChild,n=this._svgParser.parseFromString(RE,"image/svg+xml").firstChild;this._pauseButtonSvg=(e=this._animationControlDiv)===null||e===void 0?void 0:e.appendChild(n),this._playButtonSvg=(t=this._animationControlDiv)===null||t===void 0?void 0:t.appendChild(r)}}).then(()=>{var e,t,r,n,a;this._isAnimationRunning?((r=this._playButtonSvg)===null||r===void 0||r.classList.add(zt.playAnimation,zt.hidden),(n=this._pauseButtonSvg)===null||n===void 0||n.classList.add(zt.pauseAnimation)):((e=this._playButtonSvg)===null||e===void 0||e.classList.add(zt.playAnimation),(t=this._pauseButtonSvg)===null||t===void 0||t.classList.add(zt.pauseAnimation,zt.hidden)),this._currentSelection||(a=this._animationControlDiv)===null||a===void 0||a.classList.add(zt.disabled),this._animationControlDiv.addEventListener("click",this._toggleAnimation)})})}};var QE=":root{--cosmograph-histogram-text-color:#fff;--cosmograph-histogram-axis-color:#d7d7d7;--cosmograph-histogram-selection-color:#777;--cosmograph-histogram-selection-opacity:0.5;--cosmograph-histogram-bar-color:#7a7a7a;--cosmograph-histogram-highlighted-bar-color:#fff;--cosmograph-histogram-font-family:inherit;--cosmograph-histogram-font-size:11px;--cosmograph-histogram-background:#222}.style_module_histogram__ee5eb209{background:var(--cosmograph-histogram-background);display:flex;position:relative;width:100%}.style_module_histogramSvg__ee5eb209{height:100%;position:relative;width:100%}.style_module_selection__ee5eb209{fill:var(--cosmograph-histogram-selection-color);fill-opacity:var(--cosmograph-histogram-selection-opacity);stroke:none}.style_module_axisTick__ee5eb209{alignment-baseline:text-before-edge;text-anchor:initial;font-size:var(--cosmograph-histogram-font-size);font-weight:400;opacity:1;user-select:none}.style_module_bar__ee5eb209{fill:var(--cosmograph-histogram-bar-color);transform:scaleY(-1)}.style_module_highlightedBar__ee5eb209{fill:var(--cosmograph-histogram-highlighted-bar-color);pointer-events:none;transform:scaleY(-1)}.style_module_axis__ee5eb209{color:var(--cosmograph-histogram-axis-color)}.style_module_noData__ee5eb209{height:100%;position:absolute;top:0;width:100%}.style_module_noData__ee5eb209 div{align-items:center;display:flex;font-size:calc(var(--cosmograph-histogram-font-size));font-weight:300;height:100%;justify-content:center;letter-spacing:1;opacity:.25;user-select:none}";ro(QE,{});var ip;(function(i){i.Input="input",i.Select="select",i.Enter="enter",i.AccessorSelect="accessorSelect"})(ip||(ip={}));function qa(){}function er(i,e){for(const t in e)i[t]=e[t];return i}function i0(i){return i()}function rp(){return Object.create(null)}function qr(i){i.forEach(i0)}function Jn(i){return typeof i=="function"}function no(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}function eT(i){return Object.keys(i).length===0}function Kl(i,e,t,r){if(i){const n=r0(i,e,t,r);return i[0](n)}}function r0(i,e,t,r){return i[1]&&r?er(t.ctx.slice(),i[1](r(e))):t.ctx}function Zl(i,e,t,r){if(i[2]&&r){const n=i[2](r(t));if(e.dirty===void 0)return n;if(typeof n=="object"){const a=[],s=Math.max(e.dirty.length,n.length);for(let o=0;o32){const e=[],t=i.ctx.length/32;for(let r=0;r{aT(i,t,e[t])})}function aT(i,e,t){e in i?i[e]=typeof i[e]=="boolean"&&t===""||t:$u(i,e,t)}function Dl(i){return/-/.test(i)?nT:ru}function sT(i){return Array.from(i.childNodes)}function ap(i,e){return new i(e)}let Ks;function $s(i){Ks=i}function Qa(){if(!Ks)throw new Error("Function called outside component initialization");return Ks}function oT(i){Qa().$$.on_destroy.push(i)}function lT(i,e){return Qa().$$.context.set(i,e),e}function n0(i){return Qa().$$.context.get(i)}const La=[],Wn=[];let Na=[];const sp=[],dT=Promise.resolve();let nu=!1;function cT(){nu||(nu=!0,dT.then(a0))}function au(i){Na.push(i)}const Ic=new Set;let wa=0;function a0(){if(wa!==0)return;const i=Ks;do{try{for(;wai.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),Na=e}const vl=new Set;let Un;function s0(){Un={r:0,c:[],p:Un}}function o0(){Un.r||qr(Un.c),Un=Un.p}function Sr(i,e){i&&i.i&&(vl.delete(i),i.i(e))}function Xr(i,e,t,r){if(i&&i.o){if(vl.has(i))return;vl.add(i),Un.c.push(()=>{vl.delete(i),r&&(t&&i.d(1),r())}),i.o(e)}else r&&r()}function ao(i,e){const t={},r={},n={$$scope:1};let a=i.length;for(;a--;){const s=i[a],o=e[a];if(o){for(const l in s)l in o||(r[l]=1);for(const l in o)n[l]||(t[l]=o[l],n[l]=1);i[a]=o}else for(const l in s)n[l]=1}for(const s in r)s in t||(t[s]=void 0);return t}function op(i){return typeof i=="object"&&i!==null?i:{}}function lp(i){i&&i.c()}function su(i,e,t,r){const{fragment:n,after_update:a}=i.$$;n&&n.m(e,t),r||au(()=>{const s=i.$$.on_mount.map(i0).filter(Jn);i.$$.on_destroy?i.$$.on_destroy.push(...s):qr(s),i.$$.on_mount=[]}),a.forEach(au)}function ou(i,e){const t=i.$$;t.fragment!==null&&(fT(t.after_update),qr(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gu(i,e,t,r,n,a,s,o=[-1]){const l=Ks;$s(i);const d=i.$$={fragment:null,ctx:[],props:a,update:qa,not_equal:n,bound:rp(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:rp(),dirty:o,skip_bound:!1,root:e.target||l.$$.root};let c=!1;if(d.ctx=t?t(i,e.props||{},(u,h,...g)=>{const C=g.length?g[0]:h;return d.ctx&&n(d.ctx[u],d.ctx[u]=C)&&(!d.skip_bound&&d.bound[u]&&d.bound[u](C),c&&function(G,I){G.$$.dirty[0]===-1&&(La.push(G),cT(),G.$$.dirty.fill(0)),G.$$.dirty[I/31|0]|=1<{const n=r.indexOf(t);n!==-1&&r.splice(n,1)}}$set(e){this.$$set&&!eT(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Nl(i){return Object.entries(i).filter(([e,t])=>e!==""&&t).map(([e])=>e).join(" ")}const dp=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,hT=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function ju(i){let e,t=[];function r(n){const a=i.$$.callbacks[n.type];a&&a.slice().forEach(s=>s.call(this,n))}return i.$on=(n,a)=>{let s=n,o=()=>{};return e?o=e(s,a):t.push([s,a]),s.match(dp)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',s),()=>{o()}},n=>{const a=[],s={};e=(o,l)=>{let d=o,c=l,u=!1;const h=d.match(dp),g=d.match(hT),C=h||g;if(d.match(/^SMUI:\w+:/)){const $=d.split(":");let U="";for(let T=0;T<$.length;T++)U+=T===$.length-1?":"+$[T]:$[T].split("-").map(M=>M.slice(0,1).toUpperCase()+M.slice(1)).join("");console.warn(`The event ${d.split("$")[0]} has been renamed to ${U.split("$")[0]}.`),d=U}if(C){const $=d.split(h?":":"$");d=$[0];const U=$.slice(1).reduce((T,M)=>(T[M]=!0,T),{});U.passive&&(u=u||{},u.passive=!0),U.nonpassive&&(u=u||{},u.passive=!1),U.capture&&(u=u||{},u.capture=!0),U.once&&(u=u||{},u.once=!0),U.preventDefault&&(G=c,c=function(T){return T.preventDefault(),G.call(this,T)}),U.stopPropagation&&(c=function(T){return function(M){return M.stopPropagation(),T.call(this,M)}}(c)),U.stopImmediatePropagation&&(c=function(T){return function(M){return M.stopImmediatePropagation(),T.call(this,M)}}(c)),U.self&&(c=function(T,M){return function(ee){if(ee.target===T)return M.call(this,ee)}}(n,c)),U.trusted&&(c=function(T){return function(M){if(M.isTrusted)return T.call(this,M)}}(c))}var G;const I=cp(n,d,c,u),L=()=>{I();const $=a.indexOf(L);$>-1&&a.splice($,1)};return a.push(L),d in s||(s[d]=cp(n,d,r)),L};for(let o=0;o{for(let o=0;oi.removeEventListener(e,t,r)}function td(i,e){let t=[];if(e)for(let r=0;r1?t.push(a(i,n[1])):t.push(a(i))}return{update(r){if((r&&r.length||0)!=t.length)throw new Error("You must not change the length of an actions array.");if(r)for(let n=0;n1?a.update(s[1]):a.update()}}},destroy(){for(let r=0;r{s[c]=null}),o0(),t=s[e],t?t.p(l,d):(t=s[e]=a[e](l),t.c()),Sr(t,1),t.m(r.parentNode,r))},i(l){n||(Sr(t),n=!0)},o(l){Xr(t),n=!1},d(l){s[e].d(l),l&&Yr(r)}}}function _T(i,e,t){let r;const n=["use","tag","getElement"];let a=Ya(e,n),{$$slots:s={},$$scope:o}=e,{use:l=[]}=e,{tag:d}=e;const c=ju(Qa());let u;return i.$$set=h=>{e=er(er({},e),Mu(h)),t(5,a=Ya(e,n)),"use"in h&&t(0,l=h.use),"tag"in h&&t(1,d=h.tag),"$$scope"in h&&t(7,o=h.$$scope)},i.$$.update=()=>{2&i.$$.dirty&&t(3,r=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].indexOf(d)>-1)},[l,d,u,r,c,a,function(){return u},o,s,function(h){Wn[h?"unshift":"push"](()=>{u=h,t(2,u)})},function(h){Wn[h?"unshift":"push"](()=>{u=h,t(2,u)})},function(h){Wn[h?"unshift":"push"](()=>{u=h,t(2,u)})}]}let l0=class extends Uu{constructor(e){super(),Gu(this,e,_T,vT,no,{use:0,tag:1,getElement:6})}get getElement(){return this.$$.ctx[6]}};var lu=function(i,e){return lu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},lu(i,e)};function Kr(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}lu(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var mi=function(){return mi=Object.assign||function(i){for(var e,t=1,r=arguments.length;t=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function up(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r,n,a=t.call(i),s=[];try{for(;(e===void 0||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return s}function bT(i,e,t){if(arguments.length===2)for(var r,n=0,a=e.length;nc&&!u(C[I].index)){L=I;break}return L!==-1?(h.sortedIndexCursor=L,C[h.sortedIndexCursor].index):-1}(a,s,l,e):function(d,c,u){var h=u.typeaheadBuffer[0],g=d.get(h);if(!g)return-1;var C=g[u.sortedIndexCursor];if(C.text.lastIndexOf(u.typeaheadBuffer,0)===0&&!c(C.index))return C.index;for(var G=(u.sortedIndexCursor+1)%g.length,I=-1;G!==u.sortedIndexCursor;){var L=g[G],$=L.text.lastIndexOf(u.typeaheadBuffer,0)===0,U=!c(L.index);if($&&U){I=G;break}G=(G+1)%g.length}return I!==-1?(u.sortedIndexCursor=I,g[u.sortedIndexCursor].index):-1}(a,l,e),t===-1||o||n(t),t}function d0(i){return i.typeaheadBuffer.length>0}function c0(i){i.typeaheadBuffer=""}function fp(i,e){var t=i.event,r=i.isTargetListItem,n=i.focusedItemIndex,a=i.focusItemAtIndex,s=i.sortedIndexByFirstChar,o=i.isItemAtIndexDisabled,l=Ni(t)==="ArrowLeft",d=Ni(t)==="ArrowUp",c=Ni(t)==="ArrowRight",u=Ni(t)==="ArrowDown",h=Ni(t)==="Home",g=Ni(t)==="End",C=Ni(t)==="Enter",G=Ni(t)==="Spacebar";return t.altKey||t.ctrlKey||t.metaKey||l||d||c||u||h||g||C?-1:G||t.key.length!==1?G?(r&&Ji(t),r&&d0(e)?du({focusItemAtIndex:a,focusedItemIndex:n,nextChar:" ",sortedIndexByFirstChar:s,skipFocus:!1,isItemAtIndexDisabled:o},e):-1):-1:(Ji(t),du({focusItemAtIndex:a,focusedItemIndex:n,nextChar:t.key.toLowerCase(),sortedIndexByFirstChar:s,skipFocus:!1,isItemAtIndexDisabled:o},e))}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var zT=["Alt","Control","Meta","Shift"];function hp(i){var e=new Set(i?zT.filter(function(t){return i.getModifierState(t)}):[]);return function(t){return t.every(function(r){return e.has(r)})&&t.length===e.size}}(function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.wrapFocus=!1,r.isVertical=!0,r.isSingleSelectionList=!1,r.areDisabledItemsFocusable=!0,r.selectedIndex=ui.UNSET_INDEX,r.focusedItemIndex=ui.UNSET_INDEX,r.useActivatedClass=!1,r.useSelectedAttr=!1,r.ariaCurrentAttrValue=null,r.isCheckboxList=!1,r.isRadioList=!1,r.lastSelectedIndex=null,r.hasTypeahead=!1,r.typeaheadState=DT(),r.sortedIndexByFirstChar=new Map,r}return Kr(e,i),Object.defineProperty(e,"strings",{get:function(){return cn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return It},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return ui},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.adapter.getListItemCount()!==0&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},e.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},e.prototype.setWrapFocus=function(t){this.wrapFocus=t},e.prototype.setVerticalOrientation=function(t){this.isVertical=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},e.prototype.setDisabledItemsFocusable=function(t){this.areDisabledItemsFocusable=t},e.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==ui.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,It.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},e.prototype.getSelectedIndexFromDOM=function(){for(var t=ui.UNSET_INDEX,r=this.adapter.getListItemCount(),n=0;n=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},e.prototype.handleFocusOut=function(t){var r=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){r.adapter.isFocusInsideList()||r.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.isIndexDisabled=function(t){return this.adapter.listItemAtIndexHasClass(t,It.LIST_ITEM_DISABLED_CLASS)},e.prototype.handleKeydown=function(t,r,n){var a,s=this,o=Ni(t)==="ArrowLeft",l=Ni(t)==="ArrowUp",d=Ni(t)==="ArrowRight",c=Ni(t)==="ArrowDown",u=Ni(t)==="Home",h=Ni(t)==="End",g=Ni(t)==="Enter",C=Ni(t)==="Spacebar",G=this.isVertical&&c||!this.isVertical&&d,I=this.isVertical&&l||!this.isVertical&&o,L=t.key==="A"||t.key==="a",$=hp(t);if(this.adapter.isRootFocused()){if((I||h)&&$([])?(t.preventDefault(),this.focusLastElement()):(G||u)&&$([])?(t.preventDefault(),this.focusFirstElement()):I&&$(["Shift"])&&this.isCheckboxList?(t.preventDefault(),(M=this.focusLastElement())!==-1&&this.setSelectedIndexOnAction(M,!1)):G&&$(["Shift"])&&this.isCheckboxList&&(t.preventDefault(),(M=this.focusFirstElement())!==-1&&this.setSelectedIndexOnAction(M,!1)),this.hasTypeahead){var U={event:t,focusItemAtIndex:function(re){s.focusItemAtIndex(re)},focusedItemIndex:-1,isTargetListItem:r,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(re){return s.isIndexDisabled(re)}};fp(U,this.typeaheadState)}}else{var T=this.adapter.getFocusedElementIndex();if(!(T===-1&&(T=n)<0)){if(G&&$([]))Ji(t),this.focusNextElement(T);else if(I&&$([]))Ji(t),this.focusPrevElement(T);else if(G&&$(["Shift"])&&this.isCheckboxList)Ji(t),(M=this.focusNextElement(T))!==-1&&this.setSelectedIndexOnAction(M,!1);else if(I&&$(["Shift"])&&this.isCheckboxList){var M;Ji(t),(M=this.focusPrevElement(T))!==-1&&this.setSelectedIndexOnAction(M,!1)}else if(u&&$([]))Ji(t),this.focusFirstElement();else if(h&&$([]))Ji(t),this.focusLastElement();else if(u&&$(["Control","Shift"])&&this.isCheckboxList){if(Ji(t),this.isIndexDisabled(T))return;this.focusFirstElement(),this.toggleCheckboxRange(0,T,T)}else if(h&&$(["Control","Shift"])&&this.isCheckboxList){if(Ji(t),this.isIndexDisabled(T))return;this.focusLastElement(),this.toggleCheckboxRange(T,this.adapter.getListItemCount()-1,T)}else if(L&&$(["Control"])&&this.isCheckboxList)t.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===ui.UNSET_INDEX?[]:this.selectedIndex,!0);else if((g||C)&&$([])){if(r){if((ee=t.target)&&ee.tagName==="A"&&g||(Ji(t),this.isIndexDisabled(T)))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(T,!1),this.adapter.notifyAction(T))}}else if((g||C)&&$(["Shift"])&&this.isCheckboxList){var ee;if((ee=t.target)&&ee.tagName==="A"&&g||(Ji(t),this.isIndexDisabled(T)))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange((a=this.lastSelectedIndex)!==null&&a!==void 0?a:T,T,T),this.adapter.notifyAction(T))}this.hasTypeahead&&(U={event:t,focusItemAtIndex:function(re){s.focusItemAtIndex(re)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:r,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(re){return s.isIndexDisabled(re)}},fp(U,this.typeaheadState))}}},e.prototype.handleClick=function(t,r,n){var a,s=hp(n);t!==ui.UNSET_INDEX&&(this.isIndexDisabled(t)||(s([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(t,r),this.adapter.notifyAction(t)):this.isCheckboxList&&s(["Shift"])&&(this.toggleCheckboxRange((a=this.lastSelectedIndex)!==null&&a!==void 0?a:t,t,t),this.adapter.notifyAction(t))))},e.prototype.focusNextElement=function(t){var r=this.adapter.getListItemCount(),n=t,a=null;do{if(++n>=r){if(!this.wrapFocus)return t;n=0}if(n===a)return-1;a=a!=null?a:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var r=this.adapter.getListItemCount(),n=t,a=null;do{if(--n<0){if(!this.wrapFocus)return t;n=r-1}if(n===a)return-1;a=a!=null?a:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},e.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,r){this.isIndexValid(t,!1)&&(r?(this.adapter.removeClassForElementIndex(t,It.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,cn.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,It.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,cn.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex=function(t,r){if(r===void 0&&(r={}),this.selectedIndex!==t||r.forceUpdate){var n=It.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=It.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==ui.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==ui.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t,r.isUserInteraction&&!r.forceUpdate&&this.adapter.notifySelectionChange([t])}},e.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===ui.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,cn.ARIA_CURRENT));var r=this.ariaCurrentAttrValue!==null,n=r?cn.ARIA_CURRENT:cn.ARIA_SELECTED;if(this.selectedIndex!==ui.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==ui.UNSET_INDEX){var a=r?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,n,a)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?cn.ARIA_SELECTED:cn.ARIA_CHECKED},e.prototype.setRadioAtIndex=function(t,r){r===void 0&&(r={});var n=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),(this.selectedIndex!==t||r.forceUpdate)&&(this.selectedIndex!==ui.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),this.adapter.setAttributeForElementIndex(t,n,"true"),this.selectedIndex=t,r.isUserInteraction&&!r.forceUpdate&&this.adapter.notifySelectionChange([t]))},e.prototype.setCheckboxAtIndex=function(t,r){r===void 0&&(r={});for(var n=this.selectedIndex,a=r.isUserInteraction?new Set(n===ui.UNSET_INDEX?[]:n):null,s=this.getSelectionAttribute(),o=[],l=0;l=0;c!==d&&o.push(l),this.adapter.setCheckedCheckboxOrRadioAtIndex(l,c),this.adapter.setAttributeForElementIndex(l,s,c?"true":"false")}this.selectedIndex=t,r.isUserInteraction&&o.length&&this.adapter.notifySelectionChange(o)},e.prototype.toggleCheckboxRange=function(t,r,n){this.lastSelectedIndex=n;for(var a=new Set(this.selectedIndex===ui.UNSET_INDEX?[]:this.selectedIndex),s=!(a!=null&&a.has(n)),o=up([t,r].sort(),2),l=o[0],d=o[1],c=this.getSelectionAttribute(),u=[],h=l;h<=d;h++)this.isIndexDisabled(h)||s!==a.has(h)&&(u.push(h),this.adapter.setCheckedCheckboxOrRadioAtIndex(h,s),this.adapter.setAttributeForElementIndex(h,c,""+s),s?a.add(h):a.delete(h));u.length&&(this.selectedIndex=bT([],up(a)),this.adapter.notifySelectionChange(u))},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===ui.UNSET_INDEX&&t!==0?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==ui.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?typeof this.selectedIndex=="number"&&this.selectedIndex!==ui.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce(function(t,r){return Math.min(t,r)}):0:Math.max(this.focusedItemIndex,0)},e.prototype.isIndexValid=function(t,r){var n=this;if(r===void 0&&(r=!0),t instanceof Array){if(!this.isCheckboxList&&r)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return t.length===0||t.some(function(a){return n.isIndexInRange(a)})}if(typeof t=="number"){if(this.isCheckboxList&&r)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===ui.UNSET_INDEX}return!1},e.prototype.isIndexInRange=function(t){var r=this.adapter.getListItemCount();return t>=0&&t-1)&&a.push(s);this.setCheckboxAtIndex(a,{isUserInteraction:r})}},e.prototype.typeaheadMatchItem=function(t,r,n){var a=this;n===void 0&&(n=!1);var s={focusItemAtIndex:function(o){a.focusItemAtIndex(o)},focusedItemIndex:r||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(o){return a.isIndexDisabled(o)}};return du(s,this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return NT(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){c0(this.typeaheadState)},e})(Zr);/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var MT={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},BT={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},mp={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};function $T(i,e,t){if(!i)return{x:0,y:0};var r,n,a=e.x,s=e.y,o=a+t.left,l=s+t.top;if(i.type==="touchstart"){var d=i;r=d.changedTouches[0].pageX-o,n=d.changedTouches[0].pageY-l}else{var c=i;r=c.pageX-o,n=c.pageY-l}return{x:r,y:n}}/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var pp=["touchstart","pointerdown","mousedown","keydown"],gp=["touchend","pointerup","mouseup","contextmenu"],nl=[];(function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(n){r.activateImpl(n)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return Kr(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return MT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return BT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return mp},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,r=this.supportsPressRipple();if(this.registerRootHandlers(r),r){var n=e.cssClasses,a=n.ROOT,s=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(a),t.adapter.isUnbounded()&&(t.adapter.addClass(s),t.layoutInternal())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var r=e.cssClasses,n=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(n),t.adapter.removeClass(a),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},e.prototype.setUnbounded=function(t){var r=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var r,n;if(t){try{for(var a=ur(pp),s=a.next();!s.done;s=a.next()){var o=s.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var r,n;if(t.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var a=ur(gp),s=a.next();!s.done;s=a.next()){var o=s.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},e.prototype.deregisterRootHandlers=function(){var t,r;try{for(var n=ur(pp),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.deregisterInteractionHandler(s,this.activateHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,r;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=ur(gp),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.deregisterDocumentInteractionHandler(s,this.deactivateHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,r=e.strings;Object.keys(r).forEach(function(n){n.indexOf("VAR_")===0&&t.adapter.updateCssVariable(r[n],null)})},e.prototype.activateImpl=function(t){var r=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var a=this.previousActivationEvent;a&&t!==void 0&&a.type!==t.type||(n.isActivated=!0,n.isProgrammatic=t===void 0,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&t!==void 0&&(t.type==="mousedown"||t.type==="touchstart"||t.type==="pointerdown"),t!==void 0&&nl.length>0&&nl.some(function(s){return r.adapter.containsEventTarget(s)})?this.resetActivationState():(t!==void 0&&(nl.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){nl=[],n.wasElementMadeActive||t===void 0||t.key!==" "&&t.keyCode!==32||(n.wasElementMadeActive=r.checkElementMadeActive(t),n.wasElementMadeActive&&r.animateActivation()),n.wasElementMadeActive||(r.activationState=r.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return t===void 0||t.type!=="keydown"||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,r=e.strings,n=r.VAR_FG_TRANSLATE_START,a=r.VAR_FG_TRANSLATE_END,s=e.cssClasses,o=s.FG_DEACTIVATION,l=s.FG_ACTIVATION,d=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",u="";if(!this.adapter.isUnbounded()){var h=this.getFgTranslationCoordinates(),g=h.startPoint,C=h.endPoint;c=g.x+"px, "+g.y+"px",u=C.x+"px, "+C.y+"px"}this.adapter.updateCssVariable(n,c),this.adapter.updateCssVariable(a,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(l),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},d)},e.prototype.getFgTranslationCoordinates=function(){var t,r=this.activationState,n=r.activationEvent;return{startPoint:t={x:(t=r.wasActivatedByPointer?$T(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,r=e.cssClasses.FG_DEACTIVATION,n=this.activationState,a=n.hasDeactivationUXRun,s=n.isActivated;(a||!s)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(r),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(r)},mp.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,r=this.activationState;if(r.isActivated){var n=mi({},r);r.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(n)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()}))}},e.prototype.animateDeactivation=function(t){var r=t.wasActivatedByPointer,n=t.wasElementMadeActive;(r||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var r=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?r:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var n=Math.floor(r*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize=n-1:this.initialSize=n,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,r=t.VAR_FG_SIZE,n=t.VAR_LEFT,a=t.VAR_TOP,s=t.VAR_FG_SCALE;this.adapter.updateCssVariable(r,this.initialSize+"px"),this.adapter.updateCssVariable(s,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(n,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(a,this.unboundedCoords.top+"px"))},e})(Zr);function GT(i){let e;const t=i[11].default,r=Kl(t,i,i[13],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||8192&a)&&Jl(r,t,n,n[13],e?Zl(t,n[13],a,null):Ql(n[13]),null)},i(n){e||(Sr(r,n),e=!0)},o(n){Xr(r,n),e=!1},d(n){r&&r.d(n)}}}function UT(i){let e,t,r;const n=[{tag:i[3]},{use:[i[8],...i[0]]},{class:Nl(on({[i[1]]:!0,[i[6]]:!0},i[5]))},i[7],i[9]];var a=i[2];function s(o){let l={$$slots:{default:[GT]},$$scope:{ctx:o}};for(let d=0;d{ou(c,1)}),o0()}a?(e=ap(a,s(o)),o[12](e),lp(e.$$.fragment),Sr(e.$$.fragment,1),su(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(o){r||(e&&Sr(e.$$.fragment,o),r=!0)},o(o){e&&Xr(e.$$.fragment,o),r=!1},d(o){i[12](null),o&&Yr(t),e&&ou(e,o)}}}const $r={component:l0,tag:"div",class:"",classMap:{},contexts:{},props:{}};function jT(i,e,t){const r=["use","class","component","tag","getElement"];let n,a=Ya(e,r),{$$slots:s={},$$scope:o}=e,{use:l=[]}=e,{class:d=""}=e;const c=$r.class,u={},h=[],g=$r.contexts,C=$r.props;let{component:G=$r.component}=e,{tag:I=G===l0?$r.tag:void 0}=e;Object.entries($r.classMap).forEach(([$,U])=>{const T=n0(U);T&&"subscribe"in T&&h.push(T.subscribe(M=>{t(5,u[$]=M,u)}))});const L=ju(Qa());for(let $ in g)g.hasOwnProperty($)&&lT($,g[$]);return oT(()=>{for(const $ of h)$()}),i.$$set=$=>{e=er(er({},e),Mu($)),t(9,a=Ya(e,r)),"use"in $&&t(0,l=$.use),"class"in $&&t(1,d=$.class),"component"in $&&t(2,G=$.component),"tag"in $&&t(3,I=$.tag),"$$scope"in $&&t(13,o=$.$$scope)},[l,d,G,I,n,u,c,C,L,a,function(){return n.getElement()},s,function($){Wn[$?"unshift":"push"](()=>{n=$,t(4,n)})},o]}class HT extends Uu{constructor(e){super(),Gu(this,e,jT,UT,no,{use:0,class:1,component:2,tag:3,getElement:10})}get getElement(){return this.$$.ctx[10]}}const vp=Object.assign({},$r);function Ar(i){return new Proxy(HT,{construct:function(e,t){return Object.assign($r,vp,i),new e(...t)},get:function(e,t){return Object.assign($r,vp,i),e[t]}})}Ar({class:"mdc-deprecated-list-item__text",tag:"span"});Ar({class:"mdc-deprecated-list-item__primary-text",tag:"span"});Ar({class:"mdc-deprecated-list-item__secondary-text",tag:"span"});Ar({class:"mdc-deprecated-list-item__meta",tag:"span"});Ar({class:"mdc-deprecated-list-group",tag:"div"});Ar({class:"mdc-deprecated-list-group__subheader",tag:"h3"});/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var VT={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return Kr(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return VT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var r=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.float=function(t){var r=e.cssClasses,n=r.LABEL_FLOAT_ABOVE,a=r.LABEL_SHAKE;t?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(a))},e.prototype.setRequired=function(t){var r=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e})(Zr);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Dn={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"};/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.transitionEndHandler=function(n){r.handleTransitionEnd(n)},r}return Kr(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return Dn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(Dn.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Dn.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(Dn.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var r=this.adapter.hasClass(Dn.LINE_RIPPLE_DEACTIVATING);t.propertyName==="opacity"&&r&&(this.adapter.removeClass(Dn.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Dn.LINE_RIPPLE_DEACTIVATING))},e})(Zr);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var WT={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},_p={NOTCH_ELEMENT_PADDING:8},XT={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(i){function e(t){return i.call(this,mi(mi({},e.defaultAdapter),t))||this}return Kr(e,i),Object.defineProperty(e,"strings",{get:function(){return WT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return XT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _p},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var r=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=_p.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(r)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e})(Zr);Ar({class:"mdc-text-field-helper-line",tag:"div"});Ar({class:"mdc-text-field__affix mdc-text-field__affix--prefix",tag:"span"});Ar({class:"mdc-text-field__affix mdc-text-field__affix--suffix",tag:"span"});/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Lc={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},qT={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},bp={LABEL_SCALE:.75},YT=["pattern","min","max","required","step","minlength","maxlength"],KT=["color","date","datetime-local","month","range","time","week"];/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var yp=["mousedown","touchstart"],xp=["click","keydown"];(function(i){function e(t,r){r===void 0&&(r={});var n=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return n.isFocused=!1,n.receivedUserInput=!1,n.valid=!0,n.useNativeValidation=!0,n.validateOnValueChange=!0,n.helperText=r.helperText,n.characterCounter=r.characterCounter,n.leadingIcon=r.leadingIcon,n.trailingIcon=r.trailingIcon,n.inputFocusHandler=function(){n.activateFocus()},n.inputBlurHandler=function(){n.deactivateFocus()},n.inputInputHandler=function(){n.handleInput()},n.setPointerXOffset=function(a){n.setTransformOrigin(a)},n.textFieldInteractionHandler=function(){n.handleTextFieldInteraction()},n.validationAttributeChangeHandler=function(a){n.handleValidationAttributeChange(a)},n}return Kr(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return qT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Lc},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return bp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return KT.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,r,n,a;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var s=ur(yp),o=s.next();!o.done;o=s.next()){var l=o.value;this.adapter.registerInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}try{for(var d=ur(xp),c=d.next();!c.done;c=d.next())l=c.value,this.adapter.registerTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,r,n,a;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var s=ur(yp),o=s.next();!o.done;o=s.next()){var l=o.value;this.adapter.deregisterInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}try{for(var d=ur(xp),c=d.next();!c.done;c=d.next())l=c.value,this.adapter.deregisterTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var r=this;t.some(function(n){return YT.indexOf(n)>-1&&(r.styleValidity(!0),r.adapter.setLabelRequired(r.getNativeInput().required),!0)}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var r=this.adapter.getLabelWidth()*bp.LABEL_SCALE;this.adapter.notchOutline(r)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},e.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var r=t.touches,n=r?r[0]:t,a=n.target.getBoundingClientRect(),s=n.clientX-a.left;this.adapter.setLineRippleTransformOrigin(s)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var r=this.isValid();this.styleValidity(r)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var r=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(r)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var r=this.getNativeInput().maxLength;if(r===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,r)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var r=e.cssClasses.INVALID;if(t?this.adapter.removeClass(r):this.adapter.addClass(r),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var n=this.helperText.isVisible(),a=this.helperText.getId();n&&a?this.adapter.setInputAttr(Lc.ARIA_DESCRIBEDBY,a):this.adapter.removeInputAttr(Lc.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var r=e.cssClasses.FOCUSED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.styleDisabled=function(t){var r=e.cssClasses,n=r.DISABLED,a=r.INVALID;t?(this.adapter.addClass(n),this.adapter.removeClass(a)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var r=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e})(Zr);/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var wp={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},ZT={ROOT:"mdc-text-field__icon"};/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Sp=["click","keydown"];(function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.savedTabIndex=null,r.interactionHandler=function(n){r.handleInteraction(n)},r}return Kr(e,i),Object.defineProperty(e,"strings",{get:function(){return wp},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return ZT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,r;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var n=ur(Sp),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.registerInteractionHandler(s,this.interactionHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,r;try{for(var n=ur(Sp),a=n.next();!a.done;a=n.next()){var s=a.value;this.adapter.deregisterInteractionHandler(s,this.interactionHandler)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",wp.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var r=t.key==="Enter"||t.keyCode===13;(t.type==="click"||r)&&(t.preventDefault(),this.adapter.notifyIconAction())},e})(Zr);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var fi,Gs,JT={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},QT={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Cs={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};(function(i){i[i.BOTTOM=1]="BOTTOM",i[i.CENTER=2]="CENTER",i[i.RIGHT=4]="RIGHT",i[i.FLIP_RTL=8]="FLIP_RTL"})(fi||(fi={})),function(i){i[i.TOP_LEFT=0]="TOP_LEFT",i[i.TOP_RIGHT=4]="TOP_RIGHT",i[i.BOTTOM_LEFT=1]="BOTTOM_LEFT",i[i.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",i[i.TOP_START=8]="TOP_START",i[i.TOP_END=12]="TOP_END",i[i.BOTTOM_START=9]="BOTTOM_START",i[i.BOTTOM_END=13]="BOTTOM_END"}(Gs||(Gs={}));/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var eA=function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.isSurfaceOpen=!1,r.isQuickOpen=!1,r.isHoistedElement=!1,r.isFixedPosition=!1,r.isHorizontallyCenteredOnViewport=!1,r.maxHeight=0,r.openBottomBias=0,r.openAnimationEndTimerId=0,r.closeAnimationEndTimerId=0,r.animationRequestId=0,r.anchorCorner=Gs.TOP_START,r.originCorner=Gs.TOP_START,r.anchorMargin={top:0,right:0,bottom:0,left:0},r.position={x:0,y:0},r}return Kr(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return JT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return QT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Cs},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return Gs},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,r=t.ROOT,n=t.OPEN;if(!this.adapter.hasClass(r))throw new Error(r+" class required in root element.");this.adapter.hasClass(n)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^fi.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,r){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(r)?r:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},Cs.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var r=this;if(t===void 0&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){r.adapter.removeClass(e.cssClasses.OPEN),r.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),r.closeAnimationEndTimerId=setTimeout(function(){r.closeAnimationEndTimerId=0,r.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),r.adapter.notifyClose()},Cs.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var r=t.target;this.adapter.isElementInContainer(r)||this.close()},e.prototype.handleKeydown=function(t){var r=t.keyCode;(t.key==="Escape"||r===27)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var r=this.getoriginCorner(),n=this.getMenuSurfaceMaxHeight(r),a=this.hasBit(r,fi.BOTTOM)?"bottom":"top",s=this.hasBit(r,fi.RIGHT)?"right":"left",o=this.getHorizontalOriginOffset(r),l=this.getVerticalOriginOffset(r),d=this.measurements,c=d.anchorSize,u=d.surfaceSize,h=((t={})[s]=o,t[a]=l,t);c.width/u.width>Cs.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(s="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(h),this.adapter.setTransformOrigin(s+" "+a),this.adapter.setPosition(h),this.adapter.setMaxHeight(n?n+"px":""),this.hasBit(r,fi.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),r=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),a=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:r,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:a}},e.prototype.getoriginCorner=function(){var t,r,n=this.originCorner,a=this.measurements,s=a.viewportDistance,o=a.anchorSize,l=a.surfaceSize,d=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,fi.BOTTOM)?(t=s.top-d+this.anchorMargin.bottom,r=s.bottom-d-this.anchorMargin.bottom):(t=s.top-d+this.anchorMargin.top,r=s.bottom-d+o.height-this.anchorMargin.top),!(r-l.height>0)&&t>r+this.openBottomBias&&(n=this.setBit(n,fi.BOTTOM));var c,u,h=this.adapter.isRtl(),g=this.hasBit(this.anchorCorner,fi.FLIP_RTL),C=this.hasBit(this.anchorCorner,fi.RIGHT)||this.hasBit(n,fi.RIGHT),G=!1;(G=h&&g?!C:C)?(c=s.left+o.width+this.anchorMargin.right,u=s.right-this.anchorMargin.right):(c=s.left+this.anchorMargin.left,u=s.right+o.width-this.anchorMargin.left);var I=c-l.width>0,L=u-l.width>0,$=this.hasBit(n,fi.FLIP_RTL)&&this.hasBit(n,fi.RIGHT);return L&&$&&h||!I&&$?n=this.unsetBit(n,fi.RIGHT):(I&&G&&h||I&&!G&&C||!L&&c>=u)&&(n=this.setBit(n,fi.RIGHT)),n},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var r=this.measurements.viewportDistance,n=0,a=this.hasBit(t,fi.BOTTOM),s=this.hasBit(this.anchorCorner,fi.BOTTOM),o=e.numbers.MARGIN_TO_EDGE;return a?(n=r.top+this.anchorMargin.top-o,s||(n+=this.measurements.anchorSize.height)):(n=r.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-o,s&&(n-=this.measurements.anchorSize.height)),n},e.prototype.getHorizontalOriginOffset=function(t){var r=this.measurements.anchorSize,n=this.hasBit(t,fi.RIGHT),a=this.hasBit(this.anchorCorner,fi.RIGHT);if(n){var s=a?r.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?s-(this.measurements.viewportSize.width-this.measurements.bodySize.width):s}return a?r.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var r=this.measurements.anchorSize,n=this.hasBit(t,fi.BOTTOM),a=this.hasBit(this.anchorCorner,fi.BOTTOM);return n?a?r.height-this.anchorMargin.top:-this.anchorMargin.bottom:a?r.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var r,n,a=this.measurements,s=a.windowScroll,o=a.viewportDistance,l=a.surfaceSize,d=a.viewportSize,c=Object.keys(t);try{for(var u=ur(c),h=u.next();!h.done;h=u.next()){var g=h.value,C=t[g]||0;!this.isHorizontallyCenteredOnViewport||g!=="left"&&g!=="right"?(C+=o[g],this.isFixedPosition||(g==="top"?C+=s.y:g==="bottom"?C-=s.y:g==="left"?C+=s.x:C-=s.x),t[g]=C):t[g]=(d.width-l.width)/2}}catch(G){r={error:G}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,r=this.adapter.isFocused(),n=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,a=n.activeElement&&this.adapter.isElementInContainer(n.activeElement);(r||a)&&setTimeout(function(){t.adapter.restoreFocus()},Cs.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,r){return!!(t&r)},e.prototype.setBit=function(t,r){return t|r},e.prototype.unsetBit=function(t,r){return t^r},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e}(Zr);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Oa,Oc={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Ta={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},tA={FOCUS_ROOT_INDEX:-1};(function(i){i[i.NONE=0]="NONE",i[i.LIST_ROOT=1]="LIST_ROOT",i[i.FIRST_ITEM=2]="FIRST_ITEM",i[i.LAST_ITEM=3]="LAST_ITEM"})(Oa||(Oa={}));/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(i){function e(t){var r=i.call(this,mi(mi({},e.defaultAdapter),t))||this;return r.closeAnimationEndTimerId=0,r.defaultFocusState=Oa.LIST_ROOT,r.selectedIndex=-1,r}return Kr(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return Oc},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Ta},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return tA},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var r=t.key,n=t.keyCode;(r==="Tab"||n===9)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var r=this,n=this.adapter.getElementIndex(t);if(!(n<0)){this.adapter.notifySelected({index:n});var a=this.adapter.getAttributeFromElementAtIndex(n,Ta.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(a),this.closeAnimationEndTimerId=setTimeout(function(){var s=r.adapter.getElementIndex(t);s>=0&&r.adapter.isSelectableItemAtIndex(s)&&r.setSelectedIndex(s)},eA.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case Oa.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Oa.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Oa.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var r=this.adapter.getSelectedSiblingOfItemAtIndex(t);r>=0&&(this.adapter.removeAttributeFromElementAtIndex(r,Ta.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(r,Oc.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,Oc.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,Ta.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,r){this.validatedIndex(t),r?(this.adapter.removeClassFromElementAtIndex(t,It.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,Ta.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,It.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,Ta.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var r=this.adapter.getMenuItemCount();if(!(t>=0&&t{e=er(er({},e),Mu(h)),t(5,n=Ya(e,r)),"use"in h&&t(0,d=h.use),"class"in h&&t(1,c=h.class),"$$scope"in h&&t(7,s=h.$$scope)},[d,c,l,o,u,n,function(){return l},s,a,function(h){Wn[h?"unshift":"push"](()=>{l=h,t(2,l)})}]}class nA extends Uu{constructor(e){super(),Gu(this,e,rA,iA,no,{use:0,class:1,getElement:6})}get getElement(){return this.$$.ctx[6]}}Ar({class:"mdc-menu__selection-group-icon",component:nA});var aA='.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:text;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);left:0;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.15rem;overflow:hidden;position:absolute;text-align:left;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);-webkit-transform-origin:left top;transform-origin:left top;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1);white-space:nowrap;will-change:transform}.mdc-floating-label[dir=rtl],[dir=rtl] .mdc-floating-label{left:auto;right:0;text-align:right;-webkit-transform-origin:right top;transform-origin:right top}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:after{content:"*";margin-left:1px;margin-right:0}.mdc-floating-label--required[dir=rtl]:after,[dir=rtl] .mdc-floating-label--required:after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard .25s 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(0) translateY(-106%) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-106%) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-106%) scale(.75)}to{transform:translateX(0) translateY(-106%) scale(.75)}}.smui-floating-label--remove-transition{transition:unset!important}.smui-floating-label--force-size{position:absolute!important;transform:unset!important}.mdc-line-ripple:after,.mdc-line-ripple:before{border-bottom-style:solid;bottom:0;content:"";left:0;position:absolute;width:100%}.mdc-line-ripple:before{border-bottom-width:1px;z-index:1}.mdc-line-ripple:after{border-bottom-width:2px;opacity:0;transform:scaleX(0);transition:transform .18s cubic-bezier(.4,0,.2,1),opacity .18s cubic-bezier(.4,0,.2,1);z-index:2}.mdc-line-ripple--active:after{opacity:1;transform:scaleX(1)}.mdc-line-ripple--deactivating:after{opacity:0}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-deprecated-list-item__graphic{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item__meta{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{opacity:.38}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__secondary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-deprecated-list-item--activated,.mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-deprecated-list-item--selected,.mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list--dense{font-size:.812rem;padding-bottom:4px;padding-top:4px}.mdc-deprecated-list-item__wrapper{display:block}.mdc-deprecated-list-item{align-items:center;display:flex;height:48px;justify-content:flex-start;overflow:hidden;padding:0 16px;position:relative}.mdc-deprecated-list-item:focus{outline:none}.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border-color:CanvasText}}.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border-color:CanvasText}}.mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item{height:72px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px;padding-left:0;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item{padding-left:16px;padding-right:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:20px;margin-left:0;margin-right:16px;width:20px}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list-item__graphic{fill:currentColor;align-items:center;flex-shrink:0;height:24px;justify-content:center;margin-left:0;margin-right:32px;object-fit:cover;width:24px}.mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{height:24px;margin-left:0;margin-right:32px;width:24px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{border-radius:50%;height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:56px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:100px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list .mdc-deprecated-list-item__graphic{display:inline-flex}.mdc-deprecated-list-item__meta{margin-left:auto;margin-right:0}.mdc-deprecated-list-item__meta:not(.material-icons){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-deprecated-list-item[dir=rtl] .mdc-deprecated-list-item__meta,[dir=rtl] .mdc-deprecated-list-item .mdc-deprecated-list-item__meta{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-deprecated-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:40px}.mdc-deprecated-list--two-line .mdc-deprecated-list-item__text{align-self:flex-start}.mdc-deprecated-list--two-line .mdc-deprecated-list-item{height:64px}.mdc-deprecated-list--two-line.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--image-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px}.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{align-self:flex-start;margin-top:16px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:36px;margin-left:0;margin-right:16px;width:36px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{cursor:pointer}a.mdc-deprecated-list-item{color:inherit;text-decoration:none}.mdc-deprecated-list-divider{border:none;border-bottom:1px solid;border-bottom-color:rgba(0,0,0,.12);height:0;margin:0}.mdc-deprecated-list-divider--padded{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--padded{margin-left:0;margin-right:16px}.mdc-deprecated-list-divider--inset{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list-divider--inset[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset{margin-left:0;margin-right:72px}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:0;margin-right:72px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:88px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:88px;margin-right:0;width:calc(100% - 104px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:116px;margin-right:0;width:calc(100% - 116px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:116px;margin-right:0;width:calc(100% - 132px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0;width:100%}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0}.mdc-deprecated-list-group .mdc-deprecated-list{padding:0}.mdc-deprecated-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-item__primary-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.mdc-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-list-item__overline-text{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-list-item__end{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end,.mdc-list-item--disabled .mdc-list-item__start{opacity:.38}.mdc-list-item--disabled .mdc-list-item__overline-text,.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--disabled.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-list-item--activated .mdc-list-item__primary-text,.mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--selected .mdc-list-item__primary-text,.mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list-group__subheader{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-list-divider:after{border-bottom:1px solid #fff;content:"";display:block}}.mdc-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{align-items:center;align-items:stretch;cursor:pointer;display:flex;justify-content:flex-start;overflow:hidden;padding:0;position:relative}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus:before{border:3px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:focus:before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor}.mdc-list-item__end,.mdc-list-item__start{flex-shrink:0;pointer-events:none}.mdc-list-item__content{align-self:center;flex:1;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__content,.mdc-list-item--with-two-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__primary-text,.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:after,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{line-height:20px;white-space:normal}.mdc-list-item--with-overline .mdc-list-item__secondary-text{line-height:auto;white-space:nowrap}.mdc-list-item__overline-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-overline-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-overline-font-size,.75rem);font-weight:500;font-weight:var(--mdc-typography-overline-font-weight,500);letter-spacing:.1666666667em;letter-spacing:var(--mdc-typography-overline-letter-spacing,.1666666667em);line-height:2rem;line-height:var(--mdc-typography-overline-line-height,2rem);overflow:hidden;text-decoration:none;text-decoration:var(--mdc-typography-overline-text-decoration,none);text-overflow:ellipsis;text-transform:uppercase;text-transform:var(--mdc-typography-overline-text-transform,uppercase);white-space:nowrap}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon .mdc-list-item__start{height:24px;width:24px}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image .mdc-list-item__start{height:56px;width:56px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line,.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{height:56px;width:100px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line,.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch .mdc-list-item__start{height:20px;width:36px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-icon .mdc-list-item__end{height:24px;width:24px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch .mdc-list-item__end{height:20px;width:36px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item,.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-divider{background-clip:content-box;background-color:rgba(0,0,0,.12);height:1px;padding:0}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:16px}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:0}.mdc-list-divider[dir=rtl],[dir=rtl] .mdc-list-divider{padding:0}@keyframes mdc-ripple-fg-radius-in{0%{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{0%{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{0%{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-deprecated-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-deprecated-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-deprecated-list-item--disabled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}:not(.mdc-list-item--disabled).mdc-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-list-item--disabled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:none;overflow:hidden;position:relative;will-change:transform,opacity}.mdc-ripple-surface:after,.mdc-ripple-surface:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-ripple-surface:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface:after,.mdc-ripple-surface:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-ripple-surface.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:before,.mdc-ripple-upgraded--unbounded:after,.mdc-ripple-upgraded--unbounded:before{height:100%;left:0;top:0;width:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:before{height:var(--mdc-ripple-fg-size,100%);left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface:after,.mdc-ripple-surface:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover:before,.mdc-ripple-surface:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused:before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-ripple-surface:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--primary:after,.smui-ripple-surface--primary:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.smui-ripple-surface--primary.mdc-ripple-surface--hover:before,.smui-ripple-surface--primary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--primary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--secondary:after,.smui-ripple-surface--secondary:before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.smui-ripple-surface--secondary.mdc-ripple-surface--hover:before,.smui-ripple-surface--secondary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--secondary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-list--three-line .mdc-deprecated-list-item__text{align-self:flex-start}.smui-list--three-line .mdc-deprecated-list-item{height:88px}.smui-list--three-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:76px}.mdc-deprecated-list-item.smui-menu-item--non-interactive{cursor:auto}.mdc-elevation-overlay{background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff);border-radius:inherit;opacity:0;opacity:var(--mdc-elevation-overlay-opacity,0);pointer-events:none;position:absolute;transition:opacity .28s cubic-bezier(.4,0,.2,1)}.mdc-menu{min-width:112px;min-width:var(--mdc-menu-min-width,112px)}.mdc-menu .mdc-deprecated-list-item__graphic,.mdc-menu .mdc-deprecated-list-item__meta{color:rgba(0,0,0,.87)}.mdc-menu .mdc-menu-item--submenu-open .mdc-deprecated-list-item__ripple:before,.mdc-menu .mdc-menu-item--submenu-open .mdc-list-item__ripple:before{opacity:.04}.mdc-menu .mdc-deprecated-list{color:rgba(0,0,0,.87)}.mdc-menu .mdc-deprecated-list,.mdc-menu .mdc-list{position:relative}.mdc-menu .mdc-deprecated-list .mdc-elevation-overlay,.mdc-menu .mdc-list .mdc-elevation-overlay{height:100%;left:0;top:0;width:100%}.mdc-menu .mdc-deprecated-list-divider{margin:8px 0}.mdc-menu .mdc-deprecated-list-item{user-select:none}.mdc-menu .mdc-deprecated-list-item--disabled{cursor:auto}.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__graphic,.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__text{pointer-events:none}.mdc-menu__selection-group{fill:currentColor;padding:0}.mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:56px;padding-right:16px}.mdc-menu__selection-group .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:16px;padding-right:56px}.mdc-menu__selection-group .mdc-menu__selection-group-icon{display:none;left:16px;position:absolute;right:auto;top:50%;transform:translateY(-50%)}.mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon{left:auto;right:16px}.mdc-menu-item--selected .mdc-menu__selection-group-icon{display:inline}.mdc-menu-surface{transform-origin-left:top left;transform-origin-right:top right;background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-sizing:border-box;color:#000;color:var(--mdc-theme-on-surface,#000);display:none;margin:0;max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height,calc(100vh - 32px));max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width,calc(100vw - 32px));opacity:0;overflow:auto;padding:0;position:absolute;transform:scale(1);transform-origin:top left;transition:opacity .03s linear,transform .12s cubic-bezier(0,0,.2,1),height .25s cubic-bezier(0,0,.2,1);will-change:transform,opacity;z-index:8}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;opacity:0;transform:scale(.8)}.mdc-menu-surface--open{display:inline-block;opacity:1;transform:scale(1)}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity 75ms linear}.mdc-menu-surface[dir=rtl],[dir=rtl] .mdc-menu-surface{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{overflow:visible;position:relative}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.smui-menu-surface--static{display:inline-block;opacity:1;position:static;transform:scale(1);z-index:0}.mdc-menu__selection-group .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:none}.mdc-menu-item--selected .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:inline}.mdc-notched-outline{box-sizing:border-box;display:flex;height:100%;left:0;max-width:100%;pointer-events:none;position:absolute;right:0;text-align:left;top:0;width:100%}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-bottom:1px solid;border-top:1px solid;box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],.mdc-notched-outline__trailing,[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;max-width:calc(100% - 24px);width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;max-width:100%;position:relative}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{border-top:none;padding-left:0;padding-right:8px}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-text-field--filled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-text-field--filled .mdc-text-field__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-text-field--filled .mdc-text-field__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-text-field__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-text-field{align-items:baseline;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);box-sizing:border-box;display:inline-flex;overflow:hidden;padding:0 16px;position:relative;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0,0,0,.87)}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0,0,0,.54)}}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0,0,0,.6)}.mdc-text-field .mdc-floating-label{pointer-events:none;top:50%;transform:translateY(-50%)}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;appearance:none;background:none;border:none;border-radius:0;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);min-width:0;padding:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;width:100%}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media{.mdc-text-field__input::placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field__input:-ms-input-placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field--focused .mdc-text-field__input::placeholder,.mdc-text-field--no-label .mdc-text-field__input::placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}@media{.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens:none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field__affix--prefix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl],.mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field__affix--suffix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{background-color:rgba(0,0,0,.87);background-color:var(--mdc-ripple-color,rgba(0,0,0,.87))}.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple:before,.mdc-text-field--filled:hover .mdc-text-field__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple:before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-text-field--filled:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.mdc-text-field--filled .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem;transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem;transform:translateY(-34.75px) scale(.75)}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(0) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-34.75px) scale(.75)}to{transform:translateX(0) translateY(-34.75px) scale(.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}@supports(top:max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined,.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple:after,.mdc-text-field--outlined .mdc-text-field__ripple:before{background-color:transparent;background-color:var(--mdc-ripple-color,transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--outlined .mdc-text-field__input{background-color:transparent;border:none!important;display:flex}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{align-items:center;flex-direction:column;height:auto;padding:0;transition:none;width:auto}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{box-sizing:border-box;flex-grow:1;height:auto;line-height:1.5rem;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;padding:0 16px;resize:none}.mdc-text-field--textarea.mdc-text-field--filled:before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(0) translateY(-10.25px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-10.25px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-10.25px) scale(.75)}to{transform:translateX(0) translateY(-10.25px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-bottom:9px;margin-top:23px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-bottom:16px;margin-top:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem;transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem;transform:translateY(-24.75px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(0) translateY(-24.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-24.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-24.75px) scale(.75)}to{transform:translateX(0) translateY(-24.75px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-bottom:16px;margin-top:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter:after{content:"";display:inline-block;height:16px;vertical-align:-16px;width:0}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter:before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(1px) translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:48px;max-width:calc(100% - 48px);right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:auto;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:auto;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(-32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(-32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% + 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% + 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-trailing-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 128px)}.mdc-text-field-helper-line{box-sizing:border-box;display:flex;justify-content:space-between}.mdc-text-field+.mdc-text-field-helper-line{padding-left:16px;padding-right:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98,0,238,.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after,.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0,0,0,.38)}@media{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0,0,0,.38)}}@media{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.38)}}.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.06)}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix,.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:GrayText}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input{text-align:left}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{direction:ltr}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading{order:1}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{order:2}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{order:3}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{order:4}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing{order:5}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-right:12px}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px}.smui-text-field--standard{height:56px;padding:0}.smui-text-field--standard:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.smui-text-field--standard:not(.mdc-text-field--disabled){background-color:transparent}.smui-text-field--standard:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.smui-text-field--standard:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.smui-text-field--standard .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.smui-text-field--standard .mdc-floating-label{left:0;right:auto}.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-floating-label{left:auto;right:0}.smui-text-field--standard .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__input{height:100%}.smui-text-field--standard.mdc-text-field--no-label .mdc-floating-label,.smui-text-field--standard.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:32px;max-width:calc(100% - 32px);right:auto}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:auto;right:32px}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 64px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 36px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 48px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 68px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 90.66667px)}.mdc-text-field+.mdc-text-field-helper-line{padding-left:0;padding-right:0}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin-left:auto;margin-right:0;margin-top:0;padding-left:16px;padding-right:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);white-space:nowrap}.mdc-text-field-character-counter:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{margin-left:0;margin-right:auto;padding-left:0;padding-right:16px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin:0;opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;will-change:opacity}.mdc-text-field-helper-text:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-helper-text--persistent{opacity:1;transition:none;will-change:auto}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}.mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .mdc-text-field__icon--leading{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px}.mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .mdc-text-field__icon--trailing{margin-left:0;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--leading{margin-left:0;margin-right:8px}.smui-text-field--standard .mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--leading{margin-left:8px;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px 0 12px 12px}.smui-text-field--standard .mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding-left:0;padding-right:12px}';ro(aA,{});var sA=":root *{--scrollbar-background:hsla(0,0%,100%,.1);scrollbar-track-color:transparent;scrollbar-face-color:var(--scrollbar-background);scrollbar-color:var(--scrollbar-background) transparent;scrollbar-width:thin;text-underline-offset:.5px}:root ::-webkit-scrollbar{border-radius:.3rem;height:5px;width:5px}:root ::-webkit-scrollbar-track{border-radius:.3rem}:root ::-webkit-scrollbar-corner{background:none!important}:root ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-background);border:3px solid var(--scrollbar-background);border-radius:20px;transition:background-color .5s}";ro(sA,{});var oA=":root{--cosmograph-search-text-color:#fff;--cosmograph-search-list-background:#222;--cosmograph-search-font-family:inherit;--cosmograph-search-input-background:#222;--cosmograph-search-mark-background:hsla(0,0%,100%,.2);--cosmograph-search-accessor-background:hsla(0,0%,100%,.2);--cosmograph-search-interactive-background:hsla(0,0%,100%,.4);--cosmograph-search-hover-color:hsla(0,0%,100%,.05)}.search-icon.svelte-1xknafk.svelte-1xknafk{color:var(--cosmograph-search-text-color)!important;opacity:.6}.search.svelte-1xknafk .cosmograph-search-accessor{align-content:center;background-color:var(--cosmograph-search-accessor-background);border-radius:10px;color:var(--cosmograph-search-text-color);cursor:pointer;display:flex;display:block;font-size:12px;font-style:normal;justify-content:center;line-height:1;margin-right:.5rem;overflow:hidden;padding:5px 8px;text-overflow:ellipsis;transition:background .15s linear;white-space:nowrap;z-index:1}.search.svelte-1xknafk .cosmograph-search-accessor.active,.search.svelte-1xknafk .cosmograph-search-accessor:hover{background-color:var(--cosmograph-search-interactive-background)}.search.svelte-1xknafk .disabled{cursor:default;pointer-events:none}.search.svelte-1xknafk.svelte-1xknafk{background:var(--cosmograph-search-input-background);display:flex;flex-direction:column;font-family:var(--cosmograph-search-font-family),sans-serif;text-align:left;width:100%}.search.svelte-1xknafk mark{background:var(--cosmograph-search-mark-background);border-radius:2px;color:var(--cosmograph-search-text-color);padding:1px 0}.search.svelte-1xknafk .cosmograph-search-match{-webkit-box-orient:vertical;cursor:pointer;display:-webkit-box;line-height:1.35;overflow:hidden;padding:calc(var(--margin-v)*1px) calc(var(--margin-h)*1px);text-overflow:ellipsis;white-space:normal}.search.svelte-1xknafk .cosmograph-search-match:hover{background:var(--cosmograph-search-hover-color)}.search.svelte-1xknafk .cosmograph-search-result{display:inline;font-size:12px;font-weight:600;text-transform:uppercase}.search.svelte-1xknafk .cosmograph-search-result>span{font-weight:400;letter-spacing:1;margin-left:4px}.search.svelte-1xknafk .cosmograph-search-result>span>t{margin-right:4px}.search.svelte-1xknafk .mdc-menu-surface{background-color:var(--cosmograph-search-list-background)!important;max-height:none!important}.search.svelte-1xknafk .openListUpwards.svelte-1xknafk .mdc-menu-surface{bottom:55px!important;top:unset!important}.search.svelte-1xknafk .mdc-text-field__input{caret-color:var(--cosmograph-search-text-color)!important;height:100%;letter-spacing:-.01em;line-height:2;line-height:2!important;padding-top:15px!important}.search.svelte-1xknafk .mdc-floating-label,.search.svelte-1xknafk .mdc-text-field__input{color:var(--cosmograph-search-text-color)!important;font-family:var(--cosmograph-search-font-family),sans-serif!important}.search.svelte-1xknafk .mdc-floating-label{opacity:.65;pointer-events:none!important}.search.svelte-1xknafk .mdc-line-ripple:after,.search.svelte-1xknafk .mdc-line-ripple:before{border-bottom-color:var(--cosmograph-search-text-color)!important;opacity:.1}.search.svelte-1xknafk .mdc-deprecated-list{background:var(--cosmograph-search-list-background);color:var(--cosmograph-search-text-color)!important;font-size:14px!important;padding-top:4px!important}.search.svelte-1xknafk .mdc-deprecated-list-item{height:28px!important}.search.svelte-1xknafk .mdc-text-field__icon--leading{margin-right:10px!important}.search.svelte-1xknafk .mdc-floating-label--float-above{left:26px!important;pointer-events:none!important}.search.svelte-1xknafk .mdc-text-field__icon--trailing{cursor:default!important;max-width:35%}.search.svelte-1xknafk .cosmograph-search-first-field{font-size:12.5px;font-weight:400;opacity:.8;text-transform:uppercase}";ro(oA,{});const lA='',dA="modulepreload",cA=function(i){return"/static/"+i},Ep={},Ka=function(e,t,r){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=Promise.allSettled(t.map(l=>{if(l=cA(l),l in Ep)return;Ep[l]=!0;const d=l.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const u=document.createElement("link");if(u.rel=d?"stylesheet":dA,d||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),d)return new Promise((h,g)=>{u.addEventListener("load",h),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return n.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return e().catch(a)})},uA=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Ka(()=>Y(void 0,null,function*(){const{default:r}=yield Promise.resolve().then(()=>es);return{default:r}}),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)};class Hu extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}}class fA extends Hu{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class hA extends Hu{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class mA extends Hu{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var cu;(function(i){i.Any="any",i.ApNortheast1="ap-northeast-1",i.ApNortheast2="ap-northeast-2",i.ApSouth1="ap-south-1",i.ApSoutheast1="ap-southeast-1",i.ApSoutheast2="ap-southeast-2",i.CaCentral1="ca-central-1",i.EuCentral1="eu-central-1",i.EuWest1="eu-west-1",i.EuWest2="eu-west-2",i.EuWest3="eu-west-3",i.SaEast1="sa-east-1",i.UsEast1="us-east-1",i.UsWest1="us-west-1",i.UsWest2="us-west-2"})(cu||(cu={}));var pA=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};class gA{constructor(e,{headers:t={},customFetch:r,region:n=cu.Any}={}){this.url=e,this.headers=t,this.region=n,this.fetch=uA(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var r;return pA(this,void 0,void 0,function*(){try{const{headers:n,method:a,body:s}=t;let o={},{region:l}=t;l||(l=this.region),l&&l!=="any"&&(o["x-region"]=l);let d;s&&(n&&!Object.prototype.hasOwnProperty.call(n,"Content-Type")||!n)&&(typeof Blob!="undefined"&&s instanceof Blob||s instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",d=s):typeof s=="string"?(o["Content-Type"]="text/plain",d=s):typeof FormData!="undefined"&&s instanceof FormData?d=s:(o["Content-Type"]="application/json",d=JSON.stringify(s)));const c=yield this.fetch(`${this.url}/${e}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),n),body:d}).catch(C=>{throw new fA(C)}),u=c.headers.get("x-relay-error");if(u&&u==="true")throw new hA(c);if(!c.ok)throw new mA(c);let h=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),g;return h==="application/json"?g=yield c.json():h==="application/octet-stream"?g=yield c.blob():h==="text/event-stream"?g=c:h==="multipart/form-data"?g=yield c.formData():g=yield c.text(),{data:g,error:null}}catch(n){return{data:null,error:n}}})}}var Hi={},Vu={},id={},so={},rd={},nd={},vA=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("unable to locate global object")},Za=vA();const _A=Za.fetch,u0=Za.fetch.bind(Za),f0=Za.Headers,bA=Za.Request,yA=Za.Response,es=Object.freeze(Object.defineProperty({__proto__:null,Headers:f0,Request:bA,Response:yA,default:u0,fetch:_A},Symbol.toStringTag,{value:"Module"})),xA=bg(es);var ad={};Object.defineProperty(ad,"__esModule",{value:!0});class wA extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}ad.default=wA;var h0=bi&&bi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(nd,"__esModule",{value:!0});const SA=h0(xA),EA=h0(ad);let TA=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch=="undefined"?this.fetch=SA.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let n=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(a=>Y(this,null,function*(){var s,o,l;let d=null,c=null,u=null,h=a.status,g=a.statusText;if(a.ok){if(this.method!=="HEAD"){const L=yield a.text();L===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=L:c=JSON.parse(L))}const G=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),I=(o=a.headers.get("content-range"))===null||o===void 0?void 0:o.split("/");G&&I&&I.length>1&&(u=parseInt(I[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(d={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,u=null,h=406,g="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const G=yield a.text();try{d=JSON.parse(G),Array.isArray(d)&&a.status===404&&(c=[],d=null,h=200,g="OK")}catch(I){a.status===404&&G===""?(h=204,g="No Content"):d={message:G}}if(d&&this.isMaybeSingle&&(!((l=d==null?void 0:d.details)===null||l===void 0)&&l.includes("0 rows"))&&(d=null,h=200,g="OK"),d&&this.shouldThrowOnError)throw new EA.default(d)}return{error:d,data:c,count:u,status:h,statusText:g}}));return this.shouldThrowOnError||(n=n.catch(a=>{var s,o,l;return{error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:`${(o=a==null?void 0:a.stack)!==null&&o!==void 0?o:""}`,hint:"",code:`${(l=a==null?void 0:a.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}};nd.default=TA;var AA=bi&&bi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rd,"__esModule",{value:!0});const IA=AA(nd);let kA=class extends IA.default{select(e){let t=!1;const r=(e!=null?e:"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:a=n}={}){const s=a?`${a}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r=="undefined"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const a=typeof n=="undefined"?"offset":`${n}.offset`,s=typeof n=="undefined"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(s,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:a=!1,format:s="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,a?"wal":null].filter(Boolean).join("|"),d=(o=this.headers.Accept)!==null&&o!==void 0?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${d}"; options=${l};`,s==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};rd.default=kA;var CA=bi&&bi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(so,"__esModule",{value:!0});const LA=CA(rd);let OA=class extends LA.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&new RegExp("[,()]").test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let a="";n==="plain"?a="pl":n==="phrase"?a="ph":n==="websearch"&&(a="w");const s=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${a}fts${s}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}};so.default=OA;var RA=bi&&bi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(id,"__esModule",{value:!0});const Ls=RA(so);let PA=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=t,this.schema=r,this.fetch=n}select(e,{head:t=!1,count:r}={}){const n=t?"HEAD":"GET";let a=!1;const s=(e!=null?e:"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join("");return this.url.searchParams.set("select",s),r&&(this.headers.Prefer=`count=${r}`),new Ls.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:r=!0}={}){const n="POST",a=[];if(this.headers.Prefer&&a.push(this.headers.Prefer),t&&a.push(`count=${t}`),r||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const s=e.reduce((o,l)=>o.concat(Object.keys(l)),[]);if(s.length>0){const o=[...new Set(s)].map(l=>`"${l}"`);this.url.searchParams.set("columns",o.join(","))}}return new Ls.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:a=!0}={}){const s="POST",o=[`resolution=${r?"ignore":"merge"}-duplicates`];if(t!==void 0&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),a||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const l=e.reduce((d,c)=>d.concat(Object.keys(c)),[]);if(l.length>0){const d=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",d.join(","))}}return new Ls.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const r="PATCH",n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new Ls.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t="DELETE",r=[];return e&&r.push(`count=${e}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Ls.default({method:t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};id.default=PA;var sd={},od={};Object.defineProperty(od,"__esModule",{value:!0});od.version=void 0;od.version="0.0.0-automated";Object.defineProperty(sd,"__esModule",{value:!0});sd.DEFAULT_HEADERS=void 0;const FA=od;sd.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${FA.version}`};var m0=bi&&bi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vu,"__esModule",{value:!0});const DA=m0(id),NA=m0(so),zA=sd;let MA=class p0{constructor(e,{headers:t={},schema:r,fetch:n}={}){this.url=e,this.headers=Object.assign(Object.assign({},zA.DEFAULT_HEADERS),t),this.schemaName=r,this.fetch=n}from(e){const t=new URL(`${this.url}/${e}`);return new DA.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new p0(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:r=!1,get:n=!1,count:a}={}){let s;const o=new URL(`${this.url}/rpc/${e}`);let l;r||n?(s=r?"HEAD":"GET",Object.entries(t).filter(([c,u])=>u!==void 0).map(([c,u])=>[c,Array.isArray(u)?`{${u.join(",")}}`:`${u}`]).forEach(([c,u])=>{o.searchParams.append(c,u)})):(s="POST",l=t);const d=Object.assign({},this.headers);return a&&(d.Prefer=`count=${a}`),new NA.default({method:s,url:o,headers:d,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};Vu.default=MA;var ts=bi&&bi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.PostgrestError=Hi.PostgrestBuilder=Hi.PostgrestTransformBuilder=Hi.PostgrestFilterBuilder=Hi.PostgrestQueryBuilder=Hi.PostgrestClient=void 0;const g0=ts(Vu);Hi.PostgrestClient=g0.default;const v0=ts(id);Hi.PostgrestQueryBuilder=v0.default;const _0=ts(so);Hi.PostgrestFilterBuilder=_0.default;const b0=ts(rd);Hi.PostgrestTransformBuilder=b0.default;const y0=ts(nd);Hi.PostgrestBuilder=y0.default;const x0=ts(ad);Hi.PostgrestError=x0.default;var BA=Hi.default={PostgrestClient:g0.default,PostgrestQueryBuilder:v0.default,PostgrestFilterBuilder:_0.default,PostgrestTransformBuilder:b0.default,PostgrestBuilder:y0.default,PostgrestError:x0.default};const{PostgrestClient:$A,PostgrestQueryBuilder:Uk,PostgrestFilterBuilder:jk,PostgrestTransformBuilder:Hk,PostgrestBuilder:Vk}=BA,GA="2.10.7",UA={"X-Client-Info":`realtime-js/${GA}`},jA="1.0.0",w0=1e4,HA=1e3;var za;(function(i){i[i.connecting=0]="connecting",i[i.open=1]="open",i[i.closing=2]="closing",i[i.closed=3]="closed"})(za||(za={}));var Xi;(function(i){i.closed="closed",i.errored="errored",i.joined="joined",i.joining="joining",i.leaving="leaving"})(Xi||(Xi={}));var lr;(function(i){i.close="phx_close",i.error="phx_error",i.join="phx_join",i.reply="phx_reply",i.leave="phx_leave",i.access_token="access_token"})(lr||(lr={}));var uu;(function(i){i.websocket="websocket"})(uu||(uu={}));var Bn;(function(i){i.Connecting="connecting",i.Open="open",i.Closing="closing",i.Closed="closed"})(Bn||(Bn={}));class VA{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,t,r)}_decodeBroadcast(e,t,r){const n=t.getUint8(1),a=t.getUint8(2);let s=this.HEADER_LENGTH+2;const o=r.decode(e.slice(s,s+n));s=s+n;const l=r.decode(e.slice(s,s+a));s=s+a;const d=JSON.parse(r.decode(e.slice(s,e.byteLength)));return{ref:null,topic:o,event:l,payload:d}}}class S0{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Xt;(function(i){i.abstime="abstime",i.bool="bool",i.date="date",i.daterange="daterange",i.float4="float4",i.float8="float8",i.int2="int2",i.int4="int4",i.int4range="int4range",i.int8="int8",i.int8range="int8range",i.json="json",i.jsonb="jsonb",i.money="money",i.numeric="numeric",i.oid="oid",i.reltime="reltime",i.text="text",i.time="time",i.timestamp="timestamp",i.timestamptz="timestamptz",i.timetz="timetz",i.tsrange="tsrange",i.tstzrange="tstzrange"})(Xt||(Xt={}));const Tp=(i,e,t={})=>{var r;const n=(r=t.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((a,s)=>(a[s]=WA(s,i,e,n),a),{})},WA=(i,e,t,r)=>{const n=e.find(o=>o.name===i),a=n==null?void 0:n.type,s=t[i];return a&&!r.includes(a)?E0(a,s):fu(s)},E0=(i,e)=>{if(i.charAt(0)==="_"){const t=i.slice(1,i.length);return KA(e,t)}switch(i){case Xt.bool:return XA(e);case Xt.float4:case Xt.float8:case Xt.int2:case Xt.int4:case Xt.int8:case Xt.numeric:case Xt.oid:return qA(e);case Xt.json:case Xt.jsonb:return YA(e);case Xt.timestamp:return ZA(e);case Xt.abstime:case Xt.date:case Xt.daterange:case Xt.int4range:case Xt.int8range:case Xt.money:case Xt.reltime:case Xt.text:case Xt.time:case Xt.timestamptz:case Xt.timetz:case Xt.tsrange:case Xt.tstzrange:return fu(e);default:return fu(e)}},fu=i=>i,XA=i=>{switch(i){case"t":return!0;case"f":return!1;default:return i}},qA=i=>{if(typeof i=="string"){const e=parseFloat(i);if(!Number.isNaN(e))return e}return i},YA=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(e){return console.log(`JSON parse error: ${e}`),i}return i},KA=(i,e)=>{if(typeof i!="string")return i;const t=i.length-1,r=i[t];if(i[0]==="{"&&r==="}"){let a;const s=i.slice(1,t);try{a=JSON.parse("["+s+"]")}catch(o){a=s?s.split(","):[]}return a.map(o=>E0(e,o))}return i},ZA=i=>typeof i=="string"?i.replace(" ","T"):i,T0=i=>{let e=i;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")};class Rc{constructor(e,t,r={},n=w0){this.channel=e,this.event=t,this.payload=r,this.timeout=n,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var r;return this._hasReceived(e)&&t((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=t,this._matchReceive(t)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Ap;(function(i){i.SYNC="sync",i.JOIN="join",i.LEAVE="leave"})(Ap||(Ap={}));class Us{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(t==null?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},n=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Us.syncState(this.state,n,a,s),this.pendingDiffs.forEach(l=>{this.state=Us.syncDiff(this.state,l,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},n=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(n):(this.state=Us.syncDiff(this.state,n,a,s),o())}),this.onJoin((n,a,s)=>{this.channel._trigger("presence",{event:"join",key:n,currentPresences:a,newPresences:s})}),this.onLeave((n,a,s)=>{this.channel._trigger("presence",{event:"leave",key:n,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,r,n){const a=this.cloneDeep(e),s=this.transformState(t),o={},l={};return this.map(a,(d,c)=>{s[d]||(l[d]=c)}),this.map(s,(d,c)=>{const u=a[d];if(u){const h=c.map(I=>I.presence_ref),g=u.map(I=>I.presence_ref),C=c.filter(I=>g.indexOf(I.presence_ref)<0),G=u.filter(I=>h.indexOf(I.presence_ref)<0);C.length>0&&(o[d]=C),G.length>0&&(l[d]=G)}else o[d]=c}),this.syncDiff(a,{joins:o,leaves:l},r,n)}static syncDiff(e,t,r,n){const{joins:a,leaves:s}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return r||(r=()=>{}),n||(n=()=>{}),this.map(a,(o,l)=>{var d;const c=(d=e[o])!==null&&d!==void 0?d:[];if(e[o]=this.cloneDeep(l),c.length>0){const u=e[o].map(g=>g.presence_ref),h=c.filter(g=>u.indexOf(g.presence_ref)<0);e[o].unshift(...h)}r(o,c,l)}),this.map(s,(o,l)=>{let d=e[o];if(!d)return;const c=l.map(u=>u.presence_ref);d=d.filter(u=>c.indexOf(u.presence_ref)<0),e[o]=d,n(o,d,l),d.length===0&&delete e[o]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,r)=>{const n=e[r];return"metas"in n?t[r]=n.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):t[r]=n,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Ip;(function(i){i.ALL="*",i.INSERT="INSERT",i.UPDATE="UPDATE",i.DELETE="DELETE"})(Ip||(Ip={}));var kp;(function(i){i.BROADCAST="broadcast",i.PRESENCE="presence",i.POSTGRES_CHANGES="postgres_changes",i.SYSTEM="system"})(kp||(kp={}));var Cp;(function(i){i.SUBSCRIBED="SUBSCRIBED",i.TIMED_OUT="TIMED_OUT",i.CLOSED="CLOSED",i.CHANNEL_ERROR="CHANNEL_ERROR"})(Cp||(Cp={}));class Wu{constructor(e,t={config:{}},r){this.topic=e,this.params=t,this.socket=r,this.bindings={},this.state=Xi.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new Rc(this,lr.join,this.params,this.timeout),this.rejoinTimer=new S0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Xi.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Xi.closed,this.socket._remove(this)}),this._onError(n=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,n),this.state=Xi.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Xi.errored,this.rejoinTimer.scheduleTimeout())}),this._on(lr.reply,{},(n,a)=>{this._trigger(this._replyEventName(a),n)}),this.presence=new Us(this),this.broadcastEndpointURL=T0(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,t=this.timeout){var r,n;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:a,presence:s,private:o}}=this.params;this._onError(c=>e&&e("CHANNEL_ERROR",c)),this._onClose(()=>e&&e("CLOSED"));const l={},d={broadcast:a,presence:s,postgres_changes:(n=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&n!==void 0?n:[],private:o};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:d},l)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:c})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){e&&e("SUBSCRIBED");return}else{const h=this.bindings.postgres_changes,g=(u=h==null?void 0:h.length)!==null&&u!==void 0?u:0,C=[];for(let G=0;G{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}track(r){return Y(this,arguments,function*(e,t={}){return yield this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)})}untrack(){return Y(this,arguments,function*(e={}){return yield this.send({type:"presence",event:"untrack"},e)})}on(e,t,r){return this._on(e,t,r)}send(r){return Y(this,arguments,function*(e,t={}){var n,a;if(!this._canPush()&&e.type==="broadcast"){const{event:s,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o,private:this.private}]})};try{const d=yield this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=t.timeout)!==null&&n!==void 0?n:this.timeout);return yield(a=d.body)===null||a===void 0?void 0:a.cancel(),d.ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,l,d;const c=this._push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((d=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||d===void 0)&&d.ack)&&s("ok"),c.receive("ok",()=>s("ok")),c.receive("error",()=>s("error")),c.receive("timeout",()=>s("timed out"))})})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Xi.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(lr.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const n=new Rc(this,lr.leave,{},e);n.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),n.send(),this._canPush()||n.trigger("ok",{})})}_fetchWithTimeout(e,t,r){return Y(this,null,function*(){const n=new AbortController,a=setTimeout(()=>n.abort(),r),s=yield this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(a),s})}_push(e,t,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let n=new Rc(this,e,t,r);return this._canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}_onMessage(e,t,r){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,r){var n,a;const s=e.toLocaleLowerCase(),{close:o,error:l,leave:d,join:c}=lr;if(r&&[o,l,d,c].indexOf(s)>=0&&r!==this._joinRef())return;let h=this._onMessage(s,t,r);if(t&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(n=this.bindings.postgres_changes)===null||n===void 0||n.filter(g=>{var C,G,I;return((C=g.filter)===null||C===void 0?void 0:C.event)==="*"||((I=(G=g.filter)===null||G===void 0?void 0:G.event)===null||I===void 0?void 0:I.toLocaleLowerCase())===s}).map(g=>g.callback(h,r)):(a=this.bindings[s])===null||a===void 0||a.filter(g=>{var C,G,I,L,$,U;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in g){const T=g.id,M=(C=g.filter)===null||C===void 0?void 0:C.event;return T&&((G=t.ids)===null||G===void 0?void 0:G.includes(T))&&(M==="*"||(M==null?void 0:M.toLocaleLowerCase())===((I=t.data)===null||I===void 0?void 0:I.type.toLocaleLowerCase()))}else{const T=($=(L=g==null?void 0:g.filter)===null||L===void 0?void 0:L.event)===null||$===void 0?void 0:$.toLocaleLowerCase();return T==="*"||T===((U=t==null?void 0:t.event)===null||U===void 0?void 0:U.toLocaleLowerCase())}else return g.type.toLocaleLowerCase()===s}).map(g=>{if(typeof h=="object"&&"ids"in h){const C=h.data,{schema:G,table:I,commit_timestamp:L,type:$,errors:U}=C;h=Object.assign(Object.assign({},{schema:G,table:I,commit_timestamp:L,eventType:$,new:{},old:{},errors:U}),this._getPayloadRecords(C))}g.callback(h,r)})}_isClosed(){return this.state===Xi.closed}_isJoined(){return this.state===Xi.joined}_isJoining(){return this.state===Xi.joining}_isLeaving(){return this.state===Xi.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,r){const n=e.toLocaleLowerCase(),a={type:n,filter:t,callback:r};return this.bindings[n]?this.bindings[n].push(a):this.bindings[n]=[a],this}_off(e,t){const r=e.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(n=>{var a;return!(((a=n.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&Wu.isEqual(n.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(lr.close,{},e)}_onError(e){this._on(lr.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Xi.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=Tp(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=Tp(e.columns,e.old_record)),t}}const JA=()=>{},QA=typeof WebSocket!="undefined",eI=` + addEventListener("message", (e) => { + if (e.data.event === "start") { + setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); + } + });`;class tI{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=UA,this.params={},this.timeout=w0,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=JA,this.conn=null,this.sendBuffer=[],this.serializer=new VA,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let s;return a?s=a:typeof fetch=="undefined"?s=(...o)=>Ka(()=>Y(this,null,function*(){const{default:l}=yield Promise.resolve().then(()=>es);return{default:l}}),void 0).then(({default:l})=>l(...o)):s=fetch,(...o)=>s(...o)},this.endPoint=`${e}/${uu.websocket}`,this.httpEndpoint=T0(e),t!=null&&t.transport?this.transport=t.transport:this.transport=null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t!=null&&t.timeout&&(this.timeout=t.timeout),t!=null&&t.logger&&(this.logger=t.logger),t!=null&&t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const n=(r=t==null?void 0:t.params)===null||r===void 0?void 0:r.apikey;if(n&&(this.accessToken=n,this.apiKey=n),this.reconnectAfterMs=t!=null&&t.reconnectAfterMs?t.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=t!=null&&t.encode?t.encode:(a,s)=>s(JSON.stringify(a)),this.decode=t!=null&&t.decode?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new S0(()=>Y(this,null,function*(){this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(t==null?void 0:t.fetch),t!=null&&t.worker){if(typeof window!="undefined"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(t==null?void 0:t.worker)||!1,this.workerUrl=t==null?void 0:t.workerUrl}}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(QA){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new iI(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Ka(()=>Y(this,null,function*(){const{default:e}=yield import("./browser-lg2ZDdSy.js").then(t=>t.b);return{default:e}}),[]).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,t!=null?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}removeChannel(e){return Y(this,null,function*(){const t=yield e.unsubscribe();return this.channels.length===0&&this.disconnect(),t})}removeAllChannels(){return Y(this,null,function*(){const e=yield Promise.all(this.channels.map(t=>t.unsubscribe()));return this.disconnect(),e})}log(e,t,r){this.logger(e,t,r)}connectionState(){switch(this.conn&&this.conn.readyState){case za.connecting:return Bn.Connecting;case za.open:return Bn.Open;case za.closing:return Bn.Closing;default:return Bn.Closed}}isConnected(){return this.connectionState()===Bn.Open}channel(e,t={config:{}}){const r=new Wu(`realtime:${e}`,t,this);return this.channels.push(r),r}push(e){const{topic:t,event:r,payload:n,ref:a}=e,s=()=>{this.encode(e,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${t} ${r} (${a})`,n),this.isConnected()?s():this.sendBuffer.push(s)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(lr.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:jA}))}_onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:a,ref:s}=t;(s&&s===this.pendingHeartbeatRef||n===(a==null?void 0:a.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${a.status||""} ${r} ${n} ${s&&"("+s+")"||""}`,a),this.channels.filter(o=>o._isMember(r)).forEach(o=>o._trigger(n,a,s)),this.stateChangeCallbacks.message.forEach(o=>o(t))})}_onConnOpen(){return Y(this,null,function*(){if(this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=t=>{this.log("worker","worker error",t.message),this.workerRef.terminate()},this.workerRef.onmessage=t=>{t.data.event==="keepAlive"&&this._sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(e=>e())})}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(lr.error))}_appendParams(e,t){if(Object.keys(t).length===0)return e;const r=e.match(/\?/)?"&":"?",n=new URLSearchParams(t);return`${e}${r}${n}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(HA,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}_workerObjectUrl(e){let t;if(e)t=e;else{const r=new Blob([eI],{type:"application/javascript"});t=URL.createObjectURL(r)}return t}}class iI{constructor(e,t,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=za.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=r.close}}class Xu extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function ki(i){return typeof i=="object"&&i!==null&&"__isStorageError"in i}class rI extends Xu{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class hu extends Xu{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var nI=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const A0=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Ka(()=>Y(void 0,null,function*(){const{default:r}=yield Promise.resolve().then(()=>es);return{default:r}}),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},aI=()=>nI(void 0,void 0,void 0,function*(){return typeof Response=="undefined"?(yield Ka(()=>Promise.resolve().then(()=>es),void 0)).Response:Response}),mu=i=>{if(Array.isArray(i))return i.map(t=>mu(t));if(typeof i=="function"||i!==Object(i))return i;const e={};return Object.entries(i).forEach(([t,r])=>{const n=t.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[n]=mu(r)}),e};var Qn=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const Pc=i=>i.msg||i.message||i.error_description||i.error||JSON.stringify(i),sI=(i,e,t)=>Qn(void 0,void 0,void 0,function*(){const r=yield aI();i instanceof r&&!(t!=null&&t.noResolveJson)?i.json().then(n=>{e(new rI(Pc(n),i.status||500))}).catch(n=>{e(new hu(Pc(n),n))}):e(new hu(Pc(i),i))}),oI=(i,e,t,r)=>{const n={method:i,headers:(e==null?void 0:e.headers)||{}};return i==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),r&&(n.body=JSON.stringify(r)),Object.assign(Object.assign({},n),t))};function oo(i,e,t,r,n,a){return Qn(this,void 0,void 0,function*(){return new Promise((s,o)=>{i(t,oI(e,r,n,a)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>sI(l,o,r))})})}function zl(i,e,t,r){return Qn(this,void 0,void 0,function*(){return oo(i,"GET",e,t,r)})}function gn(i,e,t,r,n){return Qn(this,void 0,void 0,function*(){return oo(i,"POST",e,r,n,t)})}function lI(i,e,t,r,n){return Qn(this,void 0,void 0,function*(){return oo(i,"PUT",e,r,n,t)})}function dI(i,e,t,r){return Qn(this,void 0,void 0,function*(){return oo(i,"HEAD",e,Object.assign(Object.assign({},t),{noResolveJson:!0}),r)})}function I0(i,e,t,r,n){return Qn(this,void 0,void 0,function*(){return oo(i,"DELETE",e,r,n,t)})}var ji=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const cI={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Lp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class uI{constructor(e,t={},r,n){this.url=e,this.headers=t,this.bucketId=r,this.fetch=A0(n)}uploadOrUpdate(e,t,r,n){return ji(this,void 0,void 0,function*(){try{let a;const s=Object.assign(Object.assign({},Lp),n);let o=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(s.upsert)});const l=s.metadata;typeof Blob!="undefined"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),l&&a.append("metadata",this.encodeMetadata(l)),a.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(a=r,a.append("cacheControl",s.cacheControl),l&&a.append("metadata",this.encodeMetadata(l))):(a=r,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType,l&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),n!=null&&n.headers&&(o=Object.assign(Object.assign({},o),n.headers));const d=this._removeEmptyFolders(t),c=this._getFinalPath(d),u=yield this.fetch(`${this.url}/object/${c}`,Object.assign({method:e,body:a,headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{})),h=yield u.json();return u.ok?{data:{path:d,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(a){if(ki(a))return{data:null,error:a};throw a}})}upload(e,t,r){return ji(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,n){return ji(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(e),s=this._getFinalPath(a),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",t);try{let l;const d=Object.assign({upsert:Lp.upsert},n),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(d.upsert)});typeof Blob!="undefined"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",d.cacheControl),l.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(l=r,l.append("cacheControl",d.cacheControl)):(l=r,c["cache-control"]=`max-age=${d.cacheControl}`,c["content-type"]=d.contentType);const u=yield this.fetch(o.toString(),{method:"PUT",body:l,headers:c}),h=yield u.json();return u.ok?{data:{path:a,fullPath:h.Key},error:null}:{data:null,error:h}}catch(l){if(ki(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,t){return ji(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e);const n=Object.assign({},this.headers);t!=null&&t.upsert&&(n["x-upsert"]="true");const a=yield gn(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:n}),s=new URL(this.url+a.url),o=s.searchParams.get("token");if(!o)throw new Xu("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:o},error:null}}catch(r){if(ki(r))return{data:null,error:r};throw r}})}update(e,t,r){return ji(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t,r){return ji(this,void 0,void 0,function*(){try{return{data:yield gn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(n){if(ki(n))return{data:null,error:n};throw n}})}copy(e,t,r){return ji(this,void 0,void 0,function*(){try{return{data:{path:(yield gn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(n){if(ki(n))return{data:null,error:n};throw n}})}createSignedUrl(e,t,r){return ji(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),a=yield gn(this.fetch,`${this.url}/object/sign/${n}`,Object.assign({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${s}`)},{data:a,error:null}}catch(n){if(ki(n))return{data:null,error:n};throw n}})}createSignedUrls(e,t,r){return ji(this,void 0,void 0,function*(){try{const n=yield gn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:n.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${a}`):null})),error:null}}catch(n){if(ki(n))return{data:null,error:n};throw n}})}download(e,t){return ji(this,void 0,void 0,function*(){const n=typeof(t==null?void 0:t.transform)!="undefined"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=a?`?${a}`:"";try{const o=this._getFinalPath(e);return{data:yield(yield zl(this.fetch,`${this.url}/${n}/${o}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(o){if(ki(o))return{data:null,error:o};throw o}})}info(e){return ji(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{const r=yield zl(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:mu(r),error:null}}catch(r){if(ki(r))return{data:null,error:r};throw r}})}exists(e){return ji(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{return yield dI(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(ki(r)&&r instanceof hu){const n=r.originalError;if([400,404].includes(n==null?void 0:n.status))return{data:!1,error:r}}throw r}})}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],a=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";a!==""&&n.push(a);const o=typeof(t==null?void 0:t.transform)!="undefined"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&n.push(l);let d=n.join("&");return d!==""&&(d=`?${d}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${d}`)}}}remove(e){return ji(this,void 0,void 0,function*(){try{return{data:yield I0(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(ki(t))return{data:null,error:t};throw t}})}list(e,t,r){return ji(this,void 0,void 0,function*(){try{const n=Object.assign(Object.assign(Object.assign({},cI),t),{prefix:e||""});return{data:yield gn(this.fetch,`${this.url}/object/list/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(ki(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer!="undefined"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const fI="2.7.1",hI={"X-Client-Info":`storage-js/${fI}`};var Aa=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};class mI{constructor(e,t={},r){this.url=e,this.headers=Object.assign(Object.assign({},hI),t),this.fetch=A0(r)}listBuckets(){return Aa(this,void 0,void 0,function*(){try{return{data:yield zl(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(ki(e))return{data:null,error:e};throw e}})}getBucket(e){return Aa(this,void 0,void 0,function*(){try{return{data:yield zl(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(ki(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return Aa(this,void 0,void 0,function*(){try{return{data:yield gn(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(ki(r))return{data:null,error:r};throw r}})}updateBucket(e,t){return Aa(this,void 0,void 0,function*(){try{return{data:yield lI(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(ki(r))return{data:null,error:r};throw r}})}emptyBucket(e){return Aa(this,void 0,void 0,function*(){try{return{data:yield gn(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(ki(t))return{data:null,error:t};throw t}})}deleteBucket(e){return Aa(this,void 0,void 0,function*(){try{return{data:yield I0(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(ki(t))return{data:null,error:t};throw t}})}}class pI extends mI{constructor(e,t={},r){super(e,t,r)}from(e){return new uI(this.url,this.headers,e,this.fetch)}}const gI="2.46.1";let Ns="";typeof Deno!="undefined"?Ns="deno":typeof document!="undefined"?Ns="web":typeof navigator!="undefined"&&navigator.product==="ReactNative"?Ns="react-native":Ns="node";const vI={"X-Client-Info":`supabase-js-${Ns}/${gI}`},_I={headers:vI},bI={schema:"public"},yI={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},xI={};var wI=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};const SI=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=u0:e=fetch,(...t)=>e(...t)},EI=()=>typeof Headers=="undefined"?f0:Headers,TI=(i,e,t)=>{const r=SI(t),n=EI();return(a,s)=>wI(void 0,void 0,void 0,function*(){var o;const l=(o=yield e())!==null&&o!==void 0?o:i;let d=new n(s==null?void 0:s.headers);return d.has("apikey")||d.set("apikey",i),d.has("Authorization")||d.set("Authorization",`Bearer ${l}`),r(a,Object.assign(Object.assign({},s),{headers:d}))})};var AI=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};function II(i){return i.replace(/\/$/,"")}function kI(i,e){const{db:t,auth:r,realtime:n,global:a}=i,{db:s,auth:o,realtime:l,global:d}=e,c={db:Object.assign(Object.assign({},s),t),auth:Object.assign(Object.assign({},o),r),realtime:Object.assign(Object.assign({},l),n),global:Object.assign(Object.assign({},d),a),accessToken:()=>AI(this,void 0,void 0,function*(){return""})};return i.accessToken?c.accessToken=i.accessToken:delete c.accessToken,c}const k0="2.65.1",CI="http://localhost:9999",LI="supabase.auth.token",OI={"X-Client-Info":`gotrue-js/${k0}`},Op=10,pu="X-Supabase-Api-Version",C0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function RI(i){return Math.round(Date.now()/1e3)+i}function PI(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const e=Math.random()*16|0;return(i=="x"?e:e&3|8).toString(16)})}const or=()=>typeof document!="undefined",Nn={tested:!1,writable:!1},js=()=>{if(!or())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch(e){return!1}if(Nn.tested)return Nn.writable;const i=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(i,i),globalThis.localStorage.removeItem(i),Nn.tested=!0,Nn.writable=!0}catch(e){Nn.tested=!0,Nn.writable=!1}return Nn.writable};function Fc(i){const e={},t=new URL(i);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((n,a)=>{e[a]=n})}catch(r){}return t.searchParams.forEach((r,n)=>{e[n]=r}),e}const L0=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Ka(()=>Y(void 0,null,function*(){const{default:r}=yield Promise.resolve().then(()=>es);return{default:r}}),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},FI=i=>typeof i=="object"&&i!==null&&"status"in i&&"ok"in i&&"json"in i&&typeof i.json=="function",O0=(i,e,t)=>Y(void 0,null,function*(){yield i.setItem(e,JSON.stringify(t))}),al=(i,e)=>Y(void 0,null,function*(){const t=yield i.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(r){return t}}),sl=(i,e)=>Y(void 0,null,function*(){yield i.removeItem(e)});function DI(i){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t="",r,n,a,s,o,l,d,c=0;for(i=i.replace("-","+").replace("_","/");c>4,n=(o&15)<<4|l>>2,a=(l&3)<<6|d,t=t+String.fromCharCode(r),l!=64&&n!=0&&(t=t+String.fromCharCode(n)),d!=64&&a!=0&&(t=t+String.fromCharCode(a));return t}class ld{constructor(){this.promise=new ld.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}ld.promiseConstructor=Promise;function Rp(i){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,t=i.split(".");if(t.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=t[1];return JSON.parse(DI(r))}function NI(i){return Y(this,null,function*(){return yield new Promise(e=>{setTimeout(()=>e(null),i)})})}function zI(i,e){return new Promise((r,n)=>{Y(this,null,function*(){for(let a=0;a<1/0;a++)try{const s=yield i(a);if(!e(a,null,s)){r(s);return}}catch(s){if(!e(a,s)){n(s);return}}})})}function MI(i){return("0"+i.toString(16)).substr(-2)}function BI(){const e=new Uint32Array(56);if(typeof crypto=="undefined"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=t.length;let n="";for(let a=0;a<56;a++)n+=t.charAt(Math.floor(Math.random()*r));return n}return crypto.getRandomValues(e),Array.from(e,MI).join("")}function $I(i){return Y(this,null,function*(){const t=new TextEncoder().encode(i),r=yield crypto.subtle.digest("SHA-256",t),n=new Uint8Array(r);return Array.from(n).map(a=>String.fromCharCode(a)).join("")})}function GI(i){return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function UI(i){return Y(this,null,function*(){if(!(typeof crypto!="undefined"&&typeof crypto.subtle!="undefined"&&typeof TextEncoder!="undefined"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),i;const t=yield $I(i);return GI(t)})}function Ia(i,e,t=!1){return Y(this,null,function*(){const r=BI();let n=r;t&&(n+="/PASSWORD_RECOVERY"),yield O0(i,`${e}-code-verifier`,n);const a=yield UI(r);return[a,r===a?"plain":"s256"]})}const jI=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function HI(i){const e=i.headers.get(pu);if(!e||!e.match(jI))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch(t){return null}}class qu extends Error{constructor(e,t,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=r}}function xt(i){return typeof i=="object"&&i!==null&&"__isAuthError"in i}class VI extends qu{constructor(e,t,r){super(e,t,r),this.name="AuthApiError",this.status=t,this.code=r}}function WI(i){return xt(i)&&i.name==="AuthApiError"}class R0 extends qu{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class ea extends qu{constructor(e,t,r,n){super(e,r,n),this.name=t,this.status=r}}class hn extends ea{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function XI(i){return xt(i)&&i.name==="AuthSessionMissingError"}class Dc extends ea{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class ol extends ea{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ll extends ea{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Pp extends ea{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class gu extends ea{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function Nc(i){return xt(i)&&i.name==="AuthRetryableFetchError"}class Fp extends ea{constructor(e,t,r){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=r}}var qI=function(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);ni.msg||i.message||i.error_description||i.error||JSON.stringify(i),YI=[502,503,504];function Dp(i){return Y(this,null,function*(){var e;if(!FI(i))throw new gu(zn(i),0);if(YI.includes(i.status))throw new gu(zn(i),i.status);let t;try{t=yield i.json()}catch(a){throw new R0(zn(a),a)}let r;const n=HI(i);if(n&&n.getTime()>=C0["2024-01-01"].timestamp&&typeof t=="object"&&t&&typeof t.code=="string"?r=t.code:typeof t=="object"&&t&&typeof t.error_code=="string"&&(r=t.error_code),r){if(r==="weak_password")throw new Fp(zn(t),i.status,((e=t.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new hn}else if(typeof t=="object"&&t&&typeof t.weak_password=="object"&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new Fp(zn(t),i.status,t.weak_password.reasons);throw new VI(zn(t),i.status||500,r)})}const KI=(i,e,t,r)=>{const n={method:i,headers:(e==null?void 0:e.headers)||{}};return i==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),n.body=JSON.stringify(r),Object.assign(Object.assign({},n),t))};function kt(i,e,t,r){return Y(this,null,function*(){var n;const a=Object.assign({},r==null?void 0:r.headers);a[pu]||(a[pu]=C0["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const s=(n=r==null?void 0:r.query)!==null&&n!==void 0?n:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=yield ZI(i,e,t+o,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}})}function ZI(i,e,t,r,n,a){return Y(this,null,function*(){const s=KI(e,r,n,a);let o;try{o=yield i(t,Object.assign({},s))}catch(l){throw console.error(l),new gu(zn(l),0)}if(o.ok||(yield Dp(o)),r!=null&&r.noResolveJson)return o;try{return yield o.json()}catch(l){yield Dp(l)}})}function mn(i){var e;let t=null;tk(i)&&(t=Object.assign({},i),i.expires_at||(t.expires_at=RI(i.expires_in)));const r=(e=i.user)!==null&&e!==void 0?e:i;return{data:{session:t,user:r},error:null}}function Np(i){const e=mn(i);return!e.error&&i.weak_password&&typeof i.weak_password=="object"&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.message&&typeof i.weak_password.message=="string"&&i.weak_password.reasons.reduce((t,r)=>t&&typeof r=="string",!0)&&(e.data.weak_password=i.weak_password),e}function vn(i){var e;return{data:{user:(e=i.user)!==null&&e!==void 0?e:i},error:null}}function JI(i){return{data:i,error:null}}function QI(i){const{action_link:e,email_otp:t,hashed_token:r,redirect_to:n,verification_type:a}=i,s=qI(i,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:e,email_otp:t,hashed_token:r,redirect_to:n,verification_type:a},l=Object.assign({},s);return{data:{properties:o,user:l},error:null}}function ek(i){return i}function tk(i){return i.access_token&&i.refresh_token&&i.expires_in}var ik=function(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);n0&&(g.forEach(C=>{const G=parseInt(C.split(";")[0].split("=")[1].substring(0,1)),I=JSON.parse(C.split(";")[1].split("=")[1]);d[`${I}Page`]=G}),d.total=parseInt(h)),{data:Object.assign(Object.assign({},u),d),error:null}}catch(d){if(xt(d))return{data:{users:[]},error:d};throw d}})}getUserById(e){return Y(this,null,function*(){try{return yield kt(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:vn})}catch(t){if(xt(t))return{data:{user:null},error:t};throw t}})}updateUserById(e,t){return Y(this,null,function*(){try{return yield kt(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:vn})}catch(r){if(xt(r))return{data:{user:null},error:r};throw r}})}deleteUser(e,t=!1){return Y(this,null,function*(){try{return yield kt(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:vn})}catch(r){if(xt(r))return{data:{user:null},error:r};throw r}})}_listFactors(e){return Y(this,null,function*(){try{const{data:t,error:r}=yield kt(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:n=>({data:{factors:n},error:null})});return{data:t,error:r}}catch(t){if(xt(t))return{data:null,error:t};throw t}})}_deleteFactor(e){return Y(this,null,function*(){try{return{data:yield kt(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(xt(t))return{data:null,error:t};throw t}})}}const nk={getItem:i=>js()?globalThis.localStorage.getItem(i):null,setItem:(i,e)=>{js()&&globalThis.localStorage.setItem(i,e)},removeItem:i=>{js()&&globalThis.localStorage.removeItem(i)}};function zp(i={}){return{getItem:e=>i[e]||null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]}}}function ak(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(i){typeof self!="undefined"&&(self.globalThis=self)}}const ka={debug:!!(globalThis&&js()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class P0 extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class sk extends P0{}function ok(i,e,t){return Y(this,null,function*(){ka.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",i,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),ka.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",i)},e),yield globalThis.navigator.locks.request(i,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},n=>Y(this,null,function*(){if(n){ka.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",i,n.name);try{return yield t()}finally{ka.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",i,n.name)}}else{if(e===0)throw ka.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",i),new sk(`Acquiring an exclusive Navigator LockManager lock "${i}" immediately failed`);if(ka.debug)try{const a=yield globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),yield t()}}))})}ak();const lk={url:CI,storageKey:LI,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:OI,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Os=30*1e3,Mp=3;function Bp(i,e,t){return Y(this,null,function*(){return yield t()})}class Zs{constructor(e){var t,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Zs.nextInstanceID,Zs.nextInstanceID+=1,this.instanceID>0&&or()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const n=Object.assign(Object.assign({},lk),e);if(this.logDebugMessages=!!n.debug,typeof n.debug=="function"&&(this.logger=n.debug),this.persistSession=n.persistSession,this.storageKey=n.storageKey,this.autoRefreshToken=n.autoRefreshToken,this.admin=new rk({url:n.url,headers:n.headers,fetch:n.fetch}),this.url=n.url,this.headers=n.headers,this.fetch=L0(n.fetch),this.lock=n.lock||Bp,this.detectSessionInUrl=n.detectSessionInUrl,this.flowType=n.flowType,this.hasCustomAuthorizationHeader=n.hasCustomAuthorizationHeader,n.lock?this.lock=n.lock:or()&&(!((t=globalThis==null?void 0:globalThis.navigator)===null||t===void 0)&&t.locks)?this.lock=ok:this.lock=Bp,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?n.storage?this.storage=n.storage:js()?this.storage=nk:(this.memoryStorage={},this.storage=zp(this.memoryStorage)):(this.memoryStorage={},this.storage=zp(this.memoryStorage)),or()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",a=>Y(this,null,function*(){this._debug("received broadcast notification from other tab or client",a),yield this._notifyAllSubscribers(a.data.event,a.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${k0}) ${new Date().toISOString()}`,...e),this}initialize(){return Y(this,null,function*(){return this.initializePromise?yield this.initializePromise:(this.initializePromise=Y(this,null,function*(){return yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._initialize()}))}),yield this.initializePromise)})}_initialize(){return Y(this,null,function*(){try{const e=or()?yield this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:r}=yield this._getSessionFromURL(e);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.code)==="identity_already_exists"?{error:r}:(yield this._removeSession(),{error:r});const{session:n,redirectType:a}=t;return this._debug("#_initialize()","detected session in URL",n,"redirect type",a),yield this._saveSession(n),setTimeout(()=>Y(this,null,function*(){a==="recovery"?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",n):yield this._notifyAllSubscribers("SIGNED_IN",n)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(e){return xt(e)?{error:e}:{error:new R0("Unexpected error during initialization",e)}}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signInAnonymously(e){return Y(this,null,function*(){var t,r,n;try{const a=yield kt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}},xform:mn}),{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,d=s.user;return s.session&&(yield this._saveSession(s.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(a){if(xt(a))return{data:{user:null,session:null},error:a};throw a}})}signUp(e){return Y(this,null,function*(){var t,r,n;try{let a;if("email"in e){const{email:c,password:u,options:h}=e;let g=null,C=null;this.flowType==="pkce"&&([g,C]=yield Ia(this.storage,this.storageKey)),a=yield kt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:c,password:u,data:(t=h==null?void 0:h.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:g,code_challenge_method:C},xform:mn})}else if("phone"in e){const{phone:c,password:u,options:h}=e;a=yield kt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:u,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(n=h==null?void 0:h.channel)!==null&&n!==void 0?n:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:mn})}else throw new ol("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,d=s.user;return s.session&&(yield this._saveSession(s.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(a){if(xt(a))return{data:{user:null,session:null},error:a};throw a}})}signInWithPassword(e){return Y(this,null,function*(){try{let t;if("email"in e){const{email:a,password:s,options:o}=e;t=yield kt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Np})}else if("phone"in e){const{phone:a,password:s,options:o}=e;t=yield kt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Np})}else throw new ol("You must provide either an email or phone number and a password");const{data:r,error:n}=t;return n?{data:{user:null,session:null},error:n}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Dc}:(r.session&&(yield this._saveSession(r.session),yield this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:n})}catch(t){if(xt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOAuth(e){return Y(this,null,function*(){var t,r,n,a;return yield this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(n=e.options)===null||n===void 0?void 0:n.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})})}exchangeCodeForSession(e){return Y(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>Y(this,null,function*(){return this._exchangeCodeForSession(e)}))})}_exchangeCodeForSession(e){return Y(this,null,function*(){const t=yield al(this.storage,`${this.storageKey}-code-verifier`),[r,n]=(t!=null?t:"").split("/");try{const{data:a,error:s}=yield kt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:mn});if(yield sl(this.storage,`${this.storageKey}-code-verifier`),s)throw s;return!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Dc}:(a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:n!=null?n:null}),error:s})}catch(a){if(xt(a))return{data:{user:null,session:null,redirectType:null},error:a};throw a}})}signInWithIdToken(e){return Y(this,null,function*(){try{const{options:t,provider:r,token:n,access_token:a,nonce:s}=e,o=yield kt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:n,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:mn}),{data:l,error:d}=o;return d?{data:{user:null,session:null},error:d}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Dc}:(l.session&&(yield this._saveSession(l.session),yield this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:d})}catch(t){if(xt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOtp(e){return Y(this,null,function*(){var t,r,n,a,s;try{if("email"in e){const{email:o,options:l}=e;let d=null,c=null;this.flowType==="pkce"&&([d,c]=yield Ia(this.storage,this.storageKey));const{error:u}=yield kt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(t=l==null?void 0:l.data)!==null&&t!==void 0?t:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:d,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:u}}if("phone"in e){const{phone:o,options:l}=e,{data:d,error:c}=yield kt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:c}}throw new ol("You must provide either an email or phone number.")}catch(o){if(xt(o))return{data:{user:null,session:null},error:o};throw o}})}verifyOtp(e){return Y(this,null,function*(){var t,r;try{let n,a;"options"in e&&(n=(t=e.options)===null||t===void 0?void 0:t.redirectTo,a=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:o}=yield kt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:n,xform:mn});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,d=s.user;return l!=null&&l.access_token&&(yield this._saveSession(l),yield this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(n){if(xt(n))return{data:{user:null,session:null},error:n};throw n}})}signInWithSSO(e){return Y(this,null,function*(){var t,r,n;try{let a=null,s=null;return this.flowType==="pkce"&&([a,s]=yield Ia(this.storage,this.storageKey)),yield kt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&r!==void 0?r:void 0}),!((n=e==null?void 0:e.options)===null||n===void 0)&&n.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:s}),headers:this.headers,xform:JI})}catch(a){if(xt(a))return{data:null,error:a};throw a}})}reauthenticate(){return Y(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return Y(this,null,function*(){try{return yield this._useSession(e=>Y(this,null,function*(){const{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new hn;const{error:n}=yield kt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:n}}))}catch(e){if(xt(e))return{data:{user:null,session:null},error:e};throw e}})}resend(e){return Y(this,null,function*(){try{const t=`${this.url}/resend`;if("email"in e){const{email:r,type:n,options:a}=e,{error:s}=yield kt(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:n,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in e){const{phone:r,type:n,options:a}=e,{data:s,error:o}=yield kt(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:n,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o}}throw new ol("You must provide either an email or phone number and a type")}catch(t){if(xt(t))return{data:{user:null,session:null},error:t};throw t}})}getSession(){return Y(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return this._useSession(t=>Y(this,null,function*(){return t}))}))})}_acquireLock(e,t){return Y(this,null,function*(){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=Y(this,null,function*(){return yield r,yield t()});return this.pendingInLock.push(Y(this,null,function*(){try{yield n}catch(a){}})),n}return yield this.lock(`lock:${this.storageKey}`,e,()=>Y(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=t();for(this.pendingInLock.push(Y(this,null,function*(){try{yield r}catch(n){}})),yield r;this.pendingInLock.length;){const n=[...this.pendingInLock];yield Promise.all(n),this.pendingInLock.splice(0,n.length)}return yield r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(e){return Y(this,null,function*(){this._debug("#_useSession","begin");try{const t=yield this.__loadSession();return yield e(t)}finally{this._debug("#_useSession","end")}})}__loadSession(){return Y(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=yield al(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.storage.isServer){let s=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,d,c)=>(!s&&d==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),s=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,d,c))})}return{data:{session:e},error:null}}const{session:n,error:a}=yield this._callRefreshToken(e.refresh_token);return a?{data:{session:null},error:a}:{data:{session:n},error:null}}finally{this._debug("#__loadSession()","end")}})}getUser(e){return Y(this,null,function*(){return e?yield this._getUser(e):(yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._getUser()})))})}_getUser(e){return Y(this,null,function*(){try{return e?yield kt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:vn}):yield this._useSession(t=>Y(this,null,function*(){var r,n,a;const{data:s,error:o}=t;if(o)throw o;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new hn}:yield kt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(n=s.session)===null||n===void 0?void 0:n.access_token)!==null&&a!==void 0?a:void 0,xform:vn})}))}catch(t){if(xt(t))return XI(t)&&(yield this._removeSession(),yield sl(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:t};throw t}})}updateUser(r){return Y(this,arguments,function*(e,t={}){return yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._updateUser(e,t)}))})}_updateUser(r){return Y(this,arguments,function*(e,t={}){try{return yield this._useSession(n=>Y(this,null,function*(){const{data:a,error:s}=n;if(s)throw s;if(!a.session)throw new hn;const o=a.session;let l=null,d=null;this.flowType==="pkce"&&e.email!=null&&([l,d]=yield Ia(this.storage,this.storageKey));const{data:c,error:u}=yield kt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:d}),jwt:o.access_token,xform:vn});if(u)throw u;return o.user=c.user,yield this._saveSession(o),yield this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}}))}catch(n){if(xt(n))return{data:{user:null},error:n};throw n}})}_decodeJWT(e){return Rp(e)}setSession(e){return Y(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._setSession(e)}))})}_setSession(e){return Y(this,null,function*(){try{if(!e.access_token||!e.refresh_token)throw new hn;const t=Date.now()/1e3;let r=t,n=!0,a=null;const s=Rp(e.access_token);if(s.exp&&(r=s.exp,n=r<=t),n){const{session:o,error:l}=yield this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:l}=yield this._getUser(e.access_token);if(l)throw l;a={access_token:e.access_token,refresh_token:e.refresh_token,user:o.user,token_type:"bearer",expires_in:r-t,expires_at:r},yield this._saveSession(a),yield this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(t){if(xt(t))return{data:{session:null,user:null},error:t};throw t}})}refreshSession(e){return Y(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._refreshSession(e)}))})}_refreshSession(e){return Y(this,null,function*(){try{return yield this._useSession(t=>Y(this,null,function*(){var r;if(!e){const{data:s,error:o}=t;if(o)throw o;e=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new hn;const{session:n,error:a}=yield this._callRefreshToken(e.refresh_token);return a?{data:{user:null,session:null},error:a}:n?{data:{user:n.user,session:n},error:null}:{data:{user:null,session:null},error:null}}))}catch(t){if(xt(t))return{data:{user:null,session:null},error:t};throw t}})}_getSessionFromURL(e){return Y(this,null,function*(){try{if(!or())throw new ll("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new ll("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new Pp("Not a valid PKCE flow url.");const t=Fc(window.location.href);if(e){if(!t.code)throw new Pp("No code detected.");const{data:$,error:U}=yield this._exchangeCodeForSession(t.code);if(U)throw U;const T=new URL(window.location.href);return T.searchParams.delete("code"),window.history.replaceState(window.history.state,"",T.toString()),{data:{session:$.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new ll(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:n,access_token:a,refresh_token:s,expires_in:o,expires_at:l,token_type:d}=t;if(!a||!o||!s||!d)throw new ll("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(o);let h=c+u;l&&(h=parseInt(l));const g=h-c;g*1e3<=Os&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${u}s`);const C=h-u;c-C>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",C,h,c):c-C<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",C,h,c);const{data:G,error:I}=yield this._getUser(a);if(I)throw I;const L={provider_token:r,provider_refresh_token:n,access_token:a,expires_in:u,expires_at:h,refresh_token:s,token_type:d,user:G.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:L,redirectType:t.type},error:null}}catch(t){if(xt(t))return{data:{session:null,redirectType:null},error:t};throw t}})}_isImplicitGrantFlow(){const e=Fc(window.location.href);return!!(or()&&(e.access_token||e.error_description))}_isPKCEFlow(){return Y(this,null,function*(){const e=Fc(window.location.href),t=yield al(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)})}signOut(){return Y(this,arguments,function*(e={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._signOut(e)}))})}_signOut(){return Y(this,arguments,function*({scope:e}={scope:"global"}){return yield this._useSession(t=>Y(this,null,function*(){var r;const{data:n,error:a}=t;if(a)return{error:a};const s=(r=n.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:o}=yield this.admin.signOut(s,e);if(o&&!(WI(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return e!=="others"&&(yield this._removeSession(),yield sl(this.storage,`${this.storageKey}-code-verifier`)),{error:null}}))})}onAuthStateChange(e){const t=PI(),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),Y(this,null,function*(){yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){this._emitInitialSession(t)}))}),{data:{subscription:r}}}_emitInitialSession(e){return Y(this,null,function*(){return yield this._useSession(t=>Y(this,null,function*(){var r,n;try{const{data:{session:a},error:s}=t;if(s)throw s;yield(r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){yield(n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",e,"error",a),console.error(a)}}))})}resetPasswordForEmail(r){return Y(this,arguments,function*(e,t={}){let n=null,a=null;this.flowType==="pkce"&&([n,a]=yield Ia(this.storage,this.storageKey,!0));try{return yield kt(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:a,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(s){if(xt(s))return{data:null,error:s};throw s}})}getUserIdentities(){return Y(this,null,function*(){var e;try{const{data:t,error:r}=yield this.getUser();if(r)throw r;return{data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(t){if(xt(t))return{data:null,error:t};throw t}})}linkIdentity(e){return Y(this,null,function*(){var t;try{const{data:r,error:n}=yield this._useSession(a=>Y(this,null,function*(){var s,o,l,d,c;const{data:u,error:h}=a;if(h)throw h;const g=yield this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=e.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return yield kt(this.fetch,"GET",g,{headers:this.headers,jwt:(c=(d=u.session)===null||d===void 0?void 0:d.access_token)!==null&&c!==void 0?c:void 0})}));if(n)throw n;return or()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(xt(r))return{data:{provider:e.provider,url:null},error:r};throw r}})}unlinkIdentity(e){return Y(this,null,function*(){try{return yield this._useSession(t=>Y(this,null,function*(){var r,n;const{data:a,error:s}=t;if(s)throw s;return yield kt(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(n=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&n!==void 0?n:void 0})}))}catch(t){if(xt(t))return{data:null,error:t};throw t}})}_refreshAccessToken(e){return Y(this,null,function*(){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const r=Date.now();return yield zI(n=>Y(this,null,function*(){return n>0&&(yield NI(200*Math.pow(2,n-1))),this._debug(t,"refreshing attempt",n),yield kt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:mn})}),(n,a)=>{const s=200*Math.pow(2,n);return a&&Nc(a)&&Date.now()+s-rY(this,null,function*(){try{yield o.callback(e,t)}catch(l){a.push(l)}}));if(yield Promise.all(s),a.length>0){for(let o=0;othis._autoRefreshTokenTick(),Os);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno!="undefined"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(()=>Y(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0)})}_stopAutoRefresh(){return Y(this,null,function*(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)})}startAutoRefresh(){return Y(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return Y(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return Y(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>Y(this,null,function*(){try{const e=Date.now();try{return yield this._useSession(t=>Y(this,null,function*(){const{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const n=Math.floor((r.expires_at*1e3-e)/Os);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts ${Os}ms, refresh threshold is ${Mp} ticks`),n<=Mp&&(yield this._callRefreshToken(r.refresh_token))}))}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(e.isAcquireTimeout||e instanceof P0)this._debug("auto refresh token tick lock not available");else throw e}})}_handleVisibilityChange(){return Y(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!or()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>Y(this,null,function*(){return yield this._onVisibilityChanged(!1)}),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}})}_onVisibilityChanged(e){return Y(this,null,function*(){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(yield this.initializePromise,yield this._acquireLock(-1,()=>Y(this,null,function*(){if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}yield this._recoverAndRefresh()})))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(e,t,r){return Y(this,null,function*(){const n=[`provider=${encodeURIComponent(t)}`];if(r!=null&&r.redirectTo&&n.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&n.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,s]=yield Ia(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});n.push(o.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);n.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&n.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${n.join("&")}`})}_unenroll(e){return Y(this,null,function*(){try{return yield this._useSession(t=>Y(this,null,function*(){var r;const{data:n,error:a}=t;return a?{data:null,error:a}:yield kt(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token})}))}catch(t){if(xt(t))return{data:null,error:t};throw t}})}_enroll(e){return Y(this,null,function*(){try{return yield this._useSession(t=>Y(this,null,function*(){var r,n;const{data:a,error:s}=t;if(s)return{data:null,error:s};const o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:d}=yield kt(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return d?{data:null,error:d}:(e.factorType==="totp"&&(!((n=l==null?void 0:l.totp)===null||n===void 0)&&n.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})}))}catch(t){if(xt(t))return{data:null,error:t};throw t}})}_verify(e){return Y(this,null,function*(){return this._acquireLock(-1,()=>Y(this,null,function*(){try{return yield this._useSession(t=>Y(this,null,function*(){var r;const{data:n,error:a}=t;if(a)return{data:null,error:a};const{data:s,error:o}=yield kt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return o?{data:null,error:o}:(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:o})}))}catch(t){if(xt(t))return{data:null,error:t};throw t}}))})}_challenge(e){return Y(this,null,function*(){return this._acquireLock(-1,()=>Y(this,null,function*(){try{return yield this._useSession(t=>Y(this,null,function*(){var r;const{data:n,error:a}=t;return a?{data:null,error:a}:yield kt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token})}))}catch(t){if(xt(t))return{data:null,error:t};throw t}}))})}_challengeAndVerify(e){return Y(this,null,function*(){const{data:t,error:r}=yield this._challenge({factorId:e.factorId});return r?{data:null,error:r}:yield this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})})}_listFactors(){return Y(this,null,function*(){const{data:{user:e},error:t}=yield this.getUser();if(t)return{data:null,error:t};const r=(e==null?void 0:e.factors)||[],n=r.filter(s=>s.factor_type==="totp"&&s.status==="verified"),a=r.filter(s=>s.factor_type==="phone"&&s.status==="verified");return{data:{all:r,totp:n,phone:a},error:null}})}_getAuthenticatorAssuranceLevel(){return Y(this,null,function*(){return this._acquireLock(-1,()=>Y(this,null,function*(){return yield this._useSession(e=>Y(this,null,function*(){var t,r;const{data:{session:n},error:a}=e;if(a)return{data:null,error:a};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const s=this._decodeJWT(n.access_token);let o=null;s.aal&&(o=s.aal);let l=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(u=>u.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=s.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}))})}}Zs.nextInstanceID=0;const dk=Zs;class ck extends dk{constructor(e){super(e)}}var uk=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{d(r.next(c))}catch(u){s(u)}}function l(c){try{d(r.throw(c))}catch(u){s(u)}}function d(c){c.done?a(c.value):n(c.value).then(o,l)}d((r=r.apply(i,e||[])).next())})};class fk{constructor(e,t,r){var n,a,s;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const o=II(e);this.realtimeUrl=`${o}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${o}/auth/v1`,this.storageUrl=`${o}/storage/v1`,this.functionsUrl=`${o}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,d={db:bI,realtime:xI,auth:Object.assign(Object.assign({},yI),{storageKey:l}),global:_I},c=kI(r!=null?r:{},d);this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((s=c.auth)!==null&&s!==void 0?s:{},this.headers,c.global.fetch),this.fetch=TI(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new $A(`${o}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),c.accessToken||this._listenForAuthEvents()}get functions(){return new gA(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new pI(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return uk(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(t=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&t!==void 0?t:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,storageKey:a,flowType:s,lock:o,debug:l},d,c){var u;const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ck({url:this.authUrl,headers:Object.assign(Object.assign({},h),d),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,flowType:s,lock:o,debug:l,fetch:c,hasCustomAuthorizationHeader:(u="Authorization"in this.headers)!==null&&u!==void 0?u:!1})}_initRealtimeClient(e){return new tI(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,r)=>{this._handleTokenChanged(t,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r!=null?r:null),this.changedAccessToken=r):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const hk=(i,e,t)=>new fk(i,e,t),mk=hk("https://xovkkfhojasbjinfslpx.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhvdmtrZmhvamFzYmppbmZzbHB4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTM1ODQ0ODAsImV4cCI6MjAwOTE2MDQ4MH0.L3-X0p_un0oSTNubPwtfGo0D8g2bkPIfz7CaZ-iRYXY");function pk(i){return Y(this,null,function*(){const{error:e}=yield mk.from("metrics").insert(i);return e})}var $p=[],Rs=[];function gk(i,e){if(i&&typeof document!="undefined"){var t,r=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var s=$p.indexOf(a);s===-1&&(s=$p.push(a)-1,Rs[s]={}),t=Rs[s]&&Rs[s][r]?Rs[s][r]:Rs[s][r]=o()}else t=o();i.charCodeAt(0)===65279&&(i=i.substring(1)),t.styleSheet?t.styleSheet.cssText+=i:t.appendChild(document.createTextNode(i))}function o(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var d=Object.keys(e.attributes),c=0;ci.id,nodeLabelClassName:void 0,nodeLabelColor:void 0,hoveredNodeLabelClassName:void 0,hoveredNodeLabelColor:void 0,onSetData:void 0,onNodesFiltered:void 0,onLinksFiltered:void 0,onLabelClick:void 0};let Yu=Ma,Up=Ma,jp=Ma,F0=N0,D0=z0;typeof Uint8Array!="undefined"&&(Yu=function(i){return new Uint8Array(i)},Up=function(i){return new Uint16Array(i)},jp=function(i){return new Uint32Array(i)},F0=function(i,e){if(i.length>=e)return i;var t=new i.constructor(e);return t.set(i),t},D0=function(i,e){var t;switch(e){case 16:t=Up(i.length);break;case 32:t=jp(i.length);break;default:throw new Error("invalid array width!")}return t.set(i),t});function Ma(i){for(var e=new Array(i),t=-1;++t32)throw new Error("invalid array width!");return i}function Ir(i){this.length=i,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=Yu(i)}Ir.prototype.lengthen=function(i){var e,t;for(e=0,t=this.subarrays;e>>0,!(e>=32&&!t))return e<32&&t&1<=i;r--)this[e][r]=0;this.length=i};Ir.prototype.zero=function(i){var e,t;for(e=0,t=this.subarrays;e>>0),a!=(s===r?n:0))return!1;return!0};const _n={array8:Ma,array16:Ma,array32:Ma,arrayLengthen:N0,arrayWiden:z0,bitarray:Ir},_k=(i,e)=>function(t){var r=t.length;return[i.left(t,e,0,r),i.right(t,e,0,r)]},bk=(i,e)=>{var t=e[0],r=e[1];return function(n){var a=n.length;return[i.left(n,t,0,a),i.left(n,r,0,a)]}},yk=i=>[0,i.length],Ca={filterExact:_k,filterRange:bk,filterAll:yk},Js=i=>i,br=()=>null,dl=()=>0;function M0(i){function e(n,a,s){for(var o=s-a,l=(o>>>1)+1;--l>0;)r(n,l,o,a);return n}function t(n,a,s){for(var o=s-a,l;--o>0;)l=n[a],n[a]=n[a+o],n[a+o]=l,r(n,1,o,a);return n}function r(n,a,s,o){for(var l=n[--o+a],d=i(l),c;(c=a<<1)<=s&&(ci(n[o+c+1])&&c++,!(d<=i(n[o+c])));)n[o+a]=n[o+c],a=c;n[o+a]=l}return e.sort=t,e}const dd=M0(Js);dd.by=M0;function B0(i){var e=dd.by(i);function t(r,n,a,s){var o=new Array(s=Math.min(a-n,s)),l,d,c;for(d=0;dl&&(o[0]=c,l=i(e(o,0,s)[0]));while(++n>>1;i(r[o])>>1;n{for(var r=0,n=e.length,a=t?JSON.parse(JSON.stringify(i)):new Array(n);ri+1,wk=i=>i-1,Sk=i=>function(e,t){return e+ +i(t)},Ek=i=>function(e,t){return e-i(t)},un={reduceIncrement:xk,reduceDecrement:wk,reduceAdd:Sk,reduceSubtract:Ek};function Tk(i,e,t,r,n){for(n in r=(t=t.split(".")).splice(-1,1),t)e=e[t[n]]=e[t[n]]||{};return i(e,r)}const Ak=(i,e)=>{const t=i[e];return typeof t=="function"?t.call(i):t},Ik=/\[([\w\d]+)\]/g,kk=(i,e)=>Tk(Ak,i,e.replace(Ik,".$1"));var fn=-1;lo.heap=dd;lo.heapselect=Ku;lo.bisect=Ml;lo.permute=_l;function lo(){var i={add:l,remove:d,dimension:h,groupAll:g,size:C,all:G,allFiltered:I,onChange:L,isElementFiltered:u},e=[],t=0,r,n=[],a=[],s=[],o=[];r=new _n.bitarray(0);function l(U){var T=t,M=U.length;return M&&(e=e.concat(U),r.lengthen(t+=M),a.forEach(function(ee){ee(U,T,M)}),$("dataAdded")),i}function d(U){for(var T=new Array(t),M=[],ee=typeof U=="function",re=function(Ge){return ee?U(e[Ge],Ge):r.zero(Ge)},Se=0,Te=0;Se>7]&=~(1<<(re&63));return Se}function u(U,T){var M=c(T||[]);return r.zeroExceptMask(U,M)}function h(U,T){if(typeof U=="string"){var M=U;U=function(Ue){return kk(Ue,M)}}var ee={filter:Lt,filterExact:ai,filterRange:si,filterFunction:bt,filterAll:at,currentFilter:Mi,hasCurrentFilter:cd,top:ud,bottom:_,group:co,groupAll:fd,dispose:uo,remove:uo,accessor:U,id:function(){return Ke}},re,Se,Te,Ke,fe,Ge,He,N,we,K,ne=[],qe=function(Ue){return zc(Ue).sort(function(We,ae){var q=He[We],ct=He[ae];return qct?1:We-ae})},Oe=Ca.filterAll,Xe,it,rt,Bt=[],Tt=[],Ct=0,Rt=0,wt=0,$t;a.unshift(dt),a.push(gt),s.push(be);var Ve=r.add();Te=Ve.offset,re=Ve.one,Se=~re,Ke=Te<<7|Math.log(re)/Math.log(2),dt(e,0,t),gt(e,0,t);function dt(Ue,We,ae){var q,ct;if(T){wt=0,Li=0,$t=[];for(var Ze=0;ZeCt)for(q=Ct,ct=Math.min(We,Rt);qRt)for(q=Math.max(We,Rt),ct=ae;q0&&(Ze=We);--q>=Ct&&Ue>0;)r.zero(ct=Ge[q])&&(Ze>0?--Ze:(ae.push(e[ct]),--Ue));if(T)for(q=0;q0;q++)r.zero(ct=ne[q])&&(Ze>0?--Ze:(ae.push(e[ct]),--Ue));return ae}function _(Ue,We){var ae=[],q,ct,Ze=0;if(We&&We>0&&(Ze=We),T)for(q=0;q0;q++)r.zero(ct=ne[q])&&(Ze>0?--Ze:(ae.push(e[ct]),--Ue));for(q=Ct;q0;)r.zero(ct=Ge[q])&&(Ze>0?--Ze:(ae.push(e[ct]),--Ue)),q++;return ae}function co(Ue){var We={top:hd,all:gi,reduce:is,reduceCount:fo,reduceSum:md,order:ho,orderNatural:mo,size:po,dispose:qt,remove:qt};Tt.push(We);var ae,q,ct=8,Ze=Hp(ct),Je=0,Gt,Pt,ti,Zt,Ri,Kt=br,Ut=br,pi=!0,Bi=Ue===br,ir;arguments.length<1&&(Ue=Js),n.push(Kt),Bt.push(kr),s.push(wn),kr(fe,Ge,0,t);function kr(je,yt,Ot,oi){T&&(ir=Ot,Ot=fe.length-je.length,oi=je.length);var St=ae,mt=T?[]:Mn(Je,Ze),Ft=ti,jt=Zt,vi=Ri,yi=Je,xi=0,Cr=0,Yi,Qr,ta,Lr,Or,rs;for(pi&&(Ft=vi=br),pi&&(jt=vi=br),ae=new Array(Je),Je=0,T?q=yi?q:[]:q=yi>1?_n.arrayLengthen(q,t):Mn(t,Ze),yi&&(ta=(Qr=St[0]).key);Cr=Lr);)++Cr;for(;Cr=oi));)Lr=Ue(je[Cr]);go()}for(;xixi)if(T)for(xi=0;xi1||T?(Kt=Jr,Ut=Sn):(!Je&&Bi&&(Je=1,ae=[{key:null,value:vi()}]),Je===1?(Kt=Vt,Ut=Li):(Kt=br,Ut=br),q=null),n[Yi]=Kt;function go(){if(T){Je++;return}++Je===Ze&&(mt=_n.arrayWiden(mt,ct<<=1),q=_n.arrayWiden(q,ct),Ze=Hp(ct))}}function wn(je){if(Je>1||T){var yt=Je,Ot=ae,oi=Mn(yt,yt),St,mt,Ft;if(T){for(St=0,Ft=0;St1||T)if(T)for(St=0;St1||T?(Ut=Sn,Kt=Jr):Je===1?(Ut=Li,Kt=Vt):Ut=Kt=br}else if(Je===1){if(Bi)return;for(var jt=0;jt=0&&n.splice(je,1),je=Bt.indexOf(kr),je>=0&&Bt.splice(je,1),je=s.indexOf(wn),je>=0&&s.splice(je,1),je=Tt.indexOf(We),je>=0&&Tt.splice(je,1),We}return fo().orderNatural()}function fd(){var Ue=co(br),We=Ue.all;return delete Ue.all,delete Ue.top,delete Ue.order,delete Ue.orderNatural,delete Ue.size,Ue.value=function(){return We()[0].value},Ue}function uo(){Tt.forEach(function(We){We.dispose()});var Ue=a.indexOf(dt);return Ue>=0&&a.splice(Ue,1),Ue=a.indexOf(gt),Ue>=0&&a.splice(Ue,1),Ue=s.indexOf(be),Ue>=0&&s.splice(Ue,1),r.masks[Te]&=Se,at()}return ee}function g(){var U={reduce:Ge,reduceCount:He,reduceSum:N,value:we,dispose:K,remove:K},T,M,ee,re,Se=!0;n.push(Ke),a.push(Te),Te(e,0);function Te(ne,qe){var Oe;if(!Se)for(Oe=qe;Oe=0&&n.splice(ne,1),ne=a.indexOf(Te),ne>=0&&a.splice(ne,1),U}return He()}function C(){return t}function G(){return e}function I(U){var T=[],M=0,ee=c(U||[]);for(M=0;M{var r,n,a;switch(t){case"filtered":(r=this.onFiltered)===null||r===void 0||r.call(this),this._filters.forEach(s=>{var o;(o=s.onFiltered)===null||o===void 0||o.call(s)});break;case"dataAdded":(n=this.onDataAdded)===null||n===void 0||n.call(this),this._filters.forEach(s=>{var o;(o=s.onDataAdded)===null||o===void 0||o.call(s)});break;case"dataRemoved":(a=this.onDataRemoved)===null||a===void 0||a.call(this),this._filters.forEach(s=>{var o;(o=s.onDataRemoved)===null||o===void 0||o.call(s)})}})}addRecords(e){const{_crossfilter:t}=this;this._records=e,t.remove(),t.add(e)}getFilteredRecords(e){const{_crossfilter:t}=this;return(e==null?void 0:e.getFilteredRecords())||t.allFiltered()}addFilter(e=!0){const t=new Ck(this._crossfilter,()=>{this._filters.delete(t)},e?this._syncUpFunction:void 0);return this._filters.add(t),t}clearFilters(){this._filters.forEach(e=>{e.clear()})}isAnyFiltersActive(e){for(const t of this._filters.values())if(t!==e&&t.isActive())return!0;return!1}getAllRecords(){return this._records}}class Lk{constructor(e,t){var r;this._data={nodes:[],links:[]},this._previousData={nodes:[],links:[]},this._cosmographConfig={},this._cosmosConfig={},this._nodesForTopLabels=new Set,this._nodesForForcedLabels=new Set,this._trackedNodeToLabel=new Map,this._isLabelsDestroyed=!1,this._svgParser=new DOMParser,this._nodesCrossfilter=new Vp(this._applyLinksFilter.bind(this)),this._linksCrossfilter=new Vp(this._applyNodesFilter.bind(this)),this._nodesFilter=this._nodesCrossfilter.addFilter(!1),this._linksFilter=this._linksCrossfilter.addFilter(!1),this._selectedNodesFilter=this._nodesCrossfilter.addFilter(),this._isDataDifferent=()=>{const a=JSON.stringify(this._data.nodes),s=JSON.stringify(this._previousData.nodes),o=JSON.stringify(this._data.links),l=JSON.stringify(this._previousData.links);return a!==s||o!==l},this._onClick=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onClick)===null||o===void 0||o.call(s,...a)},this._onLabelClick=(a,s)=>{var o,l,d;const c=(o=this._cosmos)===null||o===void 0?void 0:o.graph.getNodeById(s.id);c&&((d=(l=this._cosmographConfig).onLabelClick)===null||d===void 0||d.call(l,c,a))},this._onHoveredNodeClick=a=>{var s,o;this._hoveredNode&&((o=(s=this._cosmographConfig).onLabelClick)===null||o===void 0||o.call(s,this._hoveredNode,a))},this._onNodeMouseOver=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onNodeMouseOver)===null||o===void 0||o.call(s,...a);const[l,,d]=a;this._hoveredNode=l,this._renderLabelForHovered(l,d)},this._onNodeMouseOut=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onNodeMouseOut)===null||o===void 0||o.call(s,...a),this._renderLabelForHovered()},this._onMouseMove=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onMouseMove)===null||o===void 0||o.call(s,...a);const[l,,d]=a;this._renderLabelForHovered(l,d)},this._onZoomStart=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onZoomStart)===null||o===void 0||o.call(s,...a)},this._onZoom=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onZoom)===null||o===void 0||o.call(s,...a),this._renderLabelForHovered(),this._renderLabels()},this._onZoomEnd=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onZoomEnd)===null||o===void 0||o.call(s,...a)},this._onStart=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationStart)===null||o===void 0||o.call(s,...a)},this._onTick=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationTick)===null||o===void 0||o.call(s,...a),this._renderLabels()},this._onEnd=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationEnd)===null||o===void 0||o.call(s,...a)},this._onPause=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationPause)===null||o===void 0||o.call(s,...a)},this._onRestart=(...a)=>{var s,o;(o=(s=this._cosmographConfig).onSimulationRestart)===null||o===void 0||o.call(s,...a)},this._containerNode=e,this._containerNode.classList.add(Ps.cosmograph),this._cosmographConfig=Xa(Gp,t!=null?t:{}),this._cosmosConfig=this._createCosmosConfig(t),this._canvasElement=document.createElement("canvas"),this._labelsDivElement=document.createElement("div"),this._watermarkDivElement=document.createElement("div"),this._watermarkDivElement.classList.add(Ps.watermark),this._watermarkDivElement.onclick=()=>{var a;return(a=window.open("https://cosmograph.app/","_blank"))===null||a===void 0?void 0:a.focus()},e.appendChild(this._canvasElement),e.appendChild(this._labelsDivElement),e.appendChild(this._watermarkDivElement),this._cssLabelsRenderer=new q3(this._labelsDivElement,{dispatchWheelEventElement:this._canvasElement,pointerEvents:"all",onLabelClick:this._onLabelClick.bind(this)}),this._hoveredCssLabel=new qg(this._labelsDivElement),this._hoveredCssLabel.setPointerEvents("all"),this._hoveredCssLabel.element.addEventListener("click",this._onHoveredNodeClick.bind(this)),this._linksFilter.setAccessor(a=>[a.source,a.target]),this._nodesFilter.setAccessor(a=>a.id),this._selectedNodesFilter.setAccessor(a=>a.id),this._nodesCrossfilter.onFiltered=()=>{var a,s,o,l;let d;this._nodesCrossfilter.isAnyFiltersActive()?(d=this._nodesCrossfilter.getFilteredRecords(),(a=this._cosmos)===null||a===void 0||a.selectNodesByIds(d.map(c=>c.id))):(s=this._cosmos)===null||s===void 0||s.unselectNodes(),this._updateSelectedNodesSet(d),(l=(o=this._cosmographConfig).onNodesFiltered)===null||l===void 0||l.call(o,d)},this._linksCrossfilter.onFiltered=()=>{var a,s;let o;this._linksCrossfilter.isAnyFiltersActive()&&(o=this._linksCrossfilter.getFilteredRecords()),(s=(a=this._cosmographConfig).onLinksFiltered)===null||s===void 0||s.call(a,o)};const n=this._svgParser.parseFromString(lA,"image/svg+xml").firstChild;(r=this._watermarkDivElement)===null||r===void 0||r.appendChild(n)}get data(){return this._data}get progress(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.progress}get isSimulationRunning(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.isSimulationRunning}get maxPointSize(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.maxPointSize}setData(e,t,r=!0){var n,a,s,o;const{_cosmographConfig:l}=this;this._data={nodes:e,links:t};const d=l.disableSimulation===null?!t.length:l.disableSimulation;this._cosmos||(this._disableSimulation=d,this._cosmosConfig.disableSimulation=this._disableSimulation,this._cosmos=new H3(this._canvasElement,this._cosmosConfig),this.cosmos=this._cosmos),this._disableSimulation!==d&&console.warn(`The \`disableSimulation\` was initialized to \`${this._disableSimulation}\` during initialization and will not be modified.`),this._cosmos.setData(e,t,r),this._nodesCrossfilter.addRecords(e),this._linksCrossfilter.addRecords(t),this._updateLabels(),(a=(n=this._cosmographConfig).onSetData)===null||a===void 0||a.call(n,e,t),this._isDataDifferent()&&(["cosmograph.app"].includes(window.location.hostname)||pk({browser:navigator.userAgent,hostname:window.location.hostname,mode:null,is_library_metric:!0,links_count:t.length,links_have_time:null,links_raw_columns:t.length&&(s=Object.keys(t==null?void 0:t[0]).length)!==null&&s!==void 0?s:0,links_raw_lines:null,nodes_count:e.length,nodes_have_time:null,nodes_raw_columns:e.length&&(o=Object.keys(e==null?void 0:e[0]).length)!==null&&o!==void 0?o:0,nodes_raw_lines:null})),this._previousData={nodes:e,links:t}}setConfig(e){var t,r;if(this._cosmographConfig=Xa(Gp,e!=null?e:{}),this._cosmosConfig=this._createCosmosConfig(e),(t=this._cosmos)===null||t===void 0||t.setConfig(this._cosmosConfig),e==null?void 0:e.backgroundColor){const n=(r=Hr(e==null?void 0:e.backgroundColor))===null||r===void 0?void 0:r.formatHex();if(n){const a=this._checkBrightness(n),s=document.querySelector(":root");a>.65?s==null||s.style.setProperty("--cosmograph-watermark-color","#000000"):s==null||s.style.setProperty("--cosmograph-watermark-color","#ffffff")}}this._updateLabels()}addNodesFilter(){return this._nodesCrossfilter.addFilter()}addLinksFilter(){return this._linksCrossfilter.addFilter()}selectNodesInRange(e){var t;if(!this._cosmos)return;this._cosmos.selectNodesInRange(e);const r=new Set(((t=this.getSelectedNodes())!==null&&t!==void 0?t:[]).map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>r.has(n))}selectNodes(e){if(!this._cosmos)return;const t=new Set(e.map(r=>r.id));this._selectedNodesFilter.applyFilter(r=>t.has(r))}selectNode(e,t=!1){if(!this._cosmos)return;const r=new Set([e,...t&&this._cosmos.getAdjacentNodes(e.id)||[]].map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>r.has(n))}unselectNodes(){this._cosmos&&this._selectedNodesFilter.clear()}getSelectedNodes(){if(this._cosmos)return this._cosmos.getSelectedNodes()}zoomToNode(e){this._cosmos&&this._cosmos.zoomToNodeById(e.id)}setZoomLevel(e,t=0){this._cosmos&&this._cosmos.setZoomLevel(e,t)}getZoomLevel(){if(this._cosmos)return this._cosmos.getZoomLevel()}getNodePositions(){if(this._cosmos)return this._cosmos.getNodePositions()}getNodePositionsMap(){if(this._cosmos)return this._cosmos.getNodePositionsMap()}getNodePositionsArray(){if(this._cosmos)return this._cosmos.getNodePositionsArray()}fitView(e=250){this._cosmos&&this._cosmos.fitView(e)}fitViewByNodeIds(e,t=250){this._cosmos&&this._cosmos.fitViewByNodeIds(e,t)}focusNode(e){this._cosmos&&this._cosmos.setFocusedNodeById(e==null?void 0:e.id)}getAdjacentNodes(e){if(this._cosmos)return this._cosmos.getAdjacentNodes(e)}spaceToScreenPosition(e){if(this._cosmos)return this._cosmos.spaceToScreenPosition(e)}spaceToScreenRadius(e){if(this._cosmos)return this._cosmos.spaceToScreenRadius(e)}getNodeRadiusByIndex(e){if(this._cosmos)return this._cosmos.getNodeRadiusByIndex(e)}getNodeRadiusById(e){if(this._cosmos)return this._cosmos.getNodeRadiusById(e)}getSampledNodePositionsMap(){if(this._cosmos)return this._cosmos.getSampledNodePositionsMap()}start(e=1){this._cosmos&&this._cosmos.start(e)}pause(){this._cosmos&&this._cosmos.pause()}restart(){this._cosmos&&this._cosmos.restart()}step(){this._cosmos&&this._cosmos.step()}remove(){var e;(e=this._cosmos)===null||e===void 0||e.destroy(),this._isLabelsDestroyed||(this._containerNode.innerHTML="",this._isLabelsDestroyed=!0,this._hoveredCssLabel.element.removeEventListener("click",this._onHoveredNodeClick.bind(this)),this._hoveredCssLabel.destroy(),this._cssLabelsRenderer.destroy())}create(){this._cosmos&&this._cosmos.create()}getNodeDegrees(){if(this._cosmos)return this._cosmos.graph.degree}_createCosmosConfig(e){const t=Xo(on({},e),{simulation:Xo(on({},Object.keys(e!=null?e:{}).filter(r=>r.indexOf("simulation")!==-1).reduce((r,n)=>{const a=n.replace("simulation","");return r[a.charAt(0).toLowerCase()+a.slice(1)]=e==null?void 0:e[n],r},{})),{onStart:this._onStart.bind(this),onTick:this._onTick.bind(this),onEnd:this._onEnd.bind(this),onPause:this._onPause.bind(this),onRestart:this._onRestart.bind(this)}),events:{onClick:this._onClick.bind(this),onNodeMouseOver:this._onNodeMouseOver.bind(this),onNodeMouseOut:this._onNodeMouseOut.bind(this),onMouseMove:this._onMouseMove.bind(this),onZoomStart:this._onZoomStart.bind(this),onZoom:this._onZoom.bind(this),onZoomEnd:this._onZoomEnd.bind(this)}});return delete t.disableSimulation,t}_updateLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,data:{nodes:t},_cosmographConfig:{showTopLabels:r,showTopLabelsLimit:n,showLabelsFor:a,showTopLabelsValueKey:s,nodeLabelAccessor:o}}=this;if(this._nodesForTopLabels.clear(),r&&n){let l;l=s?[...t].sort((d,c)=>{const u=d[s],h=c[s];return typeof u=="number"&&typeof h=="number"?h-u:0}):Object.entries(e.graph.degree).sort((d,c)=>c[1]-d[1]).slice(0,n).map(d=>e.graph.getNodeByIndex(+d[0]));for(let d=0;d=t.length);d++){const c=l[d];c&&this._nodesForTopLabels.add(c)}}this._nodesForForcedLabels.clear(),a==null||a.forEach(this._nodesForForcedLabels.add,this._nodesForForcedLabels),this._trackedNodeToLabel.clear(),e.trackNodePositionsByIds([...r?this._nodesForTopLabels:[],...this._nodesForForcedLabels].map(l=>{var d;return this._trackedNodeToLabel.set(l,(d=o==null?void 0:o(l))!==null&&d!==void 0?d:l.id),l.id})),this._renderLabels()}_updateSelectedNodesSet(e){this._isLabelsDestroyed||(e?(this._selectedNodesSet=new Set,e==null||e.forEach(this._selectedNodesSet.add,this._selectedNodesSet)):this._selectedNodesSet=void 0,this._renderLabels())}_renderLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,_selectedNodesSet:t,_cosmographConfig:{showDynamicLabels:r,nodeLabelAccessor:n,nodeLabelColor:a,nodeLabelClassName:s}}=this;let o=[];const l=e.getTrackedNodePositionsMap(),d=new Map;if(r){const c=this.getSampledNodePositionsMap();c==null||c.forEach((u,h)=>{var g;const C=e.graph.getNodeById(h);C&&d.set(C,[(g=n==null?void 0:n(C))!==null&&g!==void 0?g:C.id,u,Ps.cosmographShowDynamicLabels,.7])})}this._nodesForTopLabels.forEach(c=>{d.set(c,[this._trackedNodeToLabel.get(c),l.get(c.id),Ps.cosmographShowTopLabels,.9])}),this._nodesForForcedLabels.forEach(c=>{d.set(c,[this._trackedNodeToLabel.get(c),l.get(c.id),Ps.cosmographShowLabelsFor,1])}),o=[...d.entries()].map(([c,[u,h,g,C]])=>{var G,I,L;const $=this.spaceToScreenPosition([(G=h==null?void 0:h[0])!==null&&G!==void 0?G:0,(I=h==null?void 0:h[1])!==null&&I!==void 0?I:0]),U=this.spaceToScreenRadius(e.config.nodeSizeScale*this.getNodeRadiusById(c.id)),T=!!t,M=t==null?void 0:t.has(c);return{id:c.id,text:u!=null?u:"",x:$[0],y:$[1]-(U+2),weight:T&&!M?.1:C,shouldBeShown:this._nodesForForcedLabels.has(c),style:T&&!M?"opacity: 0.1;":"",color:a&&(typeof a=="string"?a:a==null?void 0:a(c)),className:(L=typeof s=="string"?s:s==null?void 0:s(c))!==null&&L!==void 0?L:g}}),this._cssLabelsRenderer.setLabels(o),this._cssLabelsRenderer.draw(!0)}_renderLabelForHovered(e,t){var r,n;if(!this._cosmos)return;const{_cosmographConfig:{showHoveredNodeLabel:a,nodeLabelAccessor:s,hoveredNodeLabelClassName:o,hoveredNodeLabelColor:l}}=this;if(!this._isLabelsDestroyed){if(a&&e&&t){const d=this.spaceToScreenPosition(t),c=this.spaceToScreenRadius(this.getNodeRadiusById(e.id));this._hoveredCssLabel.setText((r=s==null?void 0:s(e))!==null&&r!==void 0?r:e.id),this._hoveredCssLabel.setVisibility(!0),this._hoveredCssLabel.setPosition(d[0],d[1]-(c+2)),this._hoveredCssLabel.setClassName(typeof o=="string"?o:(n=o==null?void 0:o(e))!==null&&n!==void 0?n:"");const u=l&&(typeof l=="string"?l:l==null?void 0:l(e));u&&this._hoveredCssLabel.setColor(u)}else this._hoveredCssLabel.setVisibility(!1);this._hoveredCssLabel.draw()}}_applyLinksFilter(){if(this._nodesCrossfilter.isAnyFiltersActive(this._nodesFilter)){const e=this._nodesCrossfilter.getFilteredRecords(this._nodesFilter),t=new Set(e.map(r=>r.id));this._linksFilter.applyFilter(r=>{const n=r==null?void 0:r[0],a=r==null?void 0:r[1];return t.has(n)&&t.has(a)})}else this._linksFilter.clear()}_applyNodesFilter(){if(this._linksCrossfilter.isAnyFiltersActive(this._linksFilter)){const e=this._linksCrossfilter.getFilteredRecords(this._linksFilter),t=new Set(e.map(r=>[r.source,r.target]).flat());this._nodesFilter.applyFilter(r=>t.has(r))}else this._nodesFilter.clear()}_checkBrightness(e){const t=(r=>{const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return n?{r:parseInt((n[1]||0).toString(),16),g:parseInt((n[2]||0).toString(),16),b:parseInt((n[3]||0).toString(),16)}:{r:0,g:0,b:0}})(e);return(.2126*t.r+.7152*t.g+.0722*t.b)/255}}var Qs;(function(i){i.Nodes="nodes",i.Links="links"})(Qs||(Qs={}));const Wp={accessor:i=>i.date,filterType:Qs.Links};class Ok{constructor(e,t,r){this._config={},this.playAnimation=()=>{this.timeline.playAnimation()},this.pauseAnimation=()=>{this.timeline.pauseAnimation()},this.stopAnimation=()=>{this.timeline.stopAnimation()},this._onBrush=(n,a)=>{var s,o;this._applyFilter(n),(o=(s=this._config).onSelection)===null||o===void 0||o.call(s,n,a)},this._onBarHover=(...n)=>{var a,s;(s=(a=this._config).onBarHover)===null||s===void 0||s.call(a,...n)},this._onAnimationPlay=(...n)=>{var a,s;(s=(a=this._config).onAnimationPlay)===null||s===void 0||s.call(a,...n)},this._onAnimationPause=(...n)=>{var a,s;(s=(a=this._config).onAnimationPause)===null||s===void 0||s.call(a,...n)},this._config=Xa(Wp,r!=null?r:{}),this.timeline=new JE(t,this._createTimelineConfig(r)),this._cosmograph=e,this._filter=this._config.filterType===Qs.Nodes?this._cosmograph.addNodesFilter():this._cosmograph.addLinksFilter(),this._filter.onDataAdded=()=>{this._updateData()},this._updateDimension(),this._updateData()}setConfig(e){var t,r;const n=Xa(Wp,e!=null?e:{});this.timeline.setConfig(this._createTimelineConfig(e)),((t=this._config.accessor)===null||t===void 0?void 0:t.toString())!==((r=n.accessor)===null||r===void 0?void 0:r.toString())&&this._updateData(),this._config=n}getCurrentSelection(){return this.timeline.getCurrentSelection()}getCurrentSelectionInPixels(){return this.timeline.getCurrentSelectionInPixels()}getBarWidth(){return this.timeline.getBarWidth()}getIsAnimationRunning(){return this.timeline.getIsAnimationRunning()}setSelection(e){this.timeline.setSelection(e)}setSelectionInPixels(e){this.timeline.setSelectionInPixels(e)}_updateData(){const e=this._filter.getAllValues();e&&this.timeline.setTimeData(e),this.timeline.render(),this.timeline.resize()}_updateDimension(){const{_config:{accessor:e},_filter:t}=this;t.setAccessor(e)}_applyFilter(e){const{_filter:t}=this;e?t.applyFilter(r=>r>=e[0]&&r<=e[1]):t.clear()}getConfig(){return this._config}remove(){this.timeline.destroy()}_createTimelineConfig(e){return Xo(on({},e),{events:{onBrush:this._onBrush.bind(this),onBarHover:this._onBarHover.bind(this),onAnimationPlay:this._onAnimationPlay.bind(this),onAnimationPause:this._onAnimationPause.bind(this)}})}}Qs.Nodes;function Rk(){return Y(this,null,function*(){const i=document.getElementById("alert"),e=document.getElementById("spinner"),t=document.getElementById("legend"),r=document.createElement("div"),a=`/network/csv/${window.location.search}`;try{const o=yield(yield fetch(a)).json(),l={person:"#720e07",place:"#5bc0eb",work:"#ff8600",event:"#9bc53d",institution:"#ffdd1b"},d=o.edges.map(L=>({source:parseInt(L.s),target:parseInt(L.t),date:Date.parse(L.start)})),c=o.nodes.map(L=>({id:parseInt(L.id),label:L.l,color:l[L.k]})),u=document.getElementById("app");e.classList.add("visually-hidden"),t.style.visibility="visible",i.classList.add("visually-hidden"),u.appendChild(r);const h=document.createElement("div");u.appendChild(h);const g={nodeColor:L=>L.color,nodeLabelAccessor:L=>L.label,showTopLabels:!0,showDynamicLabels:!1,linkGreyoutOpacity:0,nodeLabelColor:"white",hoveredNodeLabelColor:"white",linkWidth:1,linkArrows:!1,onClick:L=>alert(L.label),simulationRepulsion:1,linkDistance:5,gravity:.5},C=new Lk(r,g),G=document.createElement("div"),I=new Ok(C,G);C.setData(c,d),u.appendChild(G)}catch(s){console.error("Failed to fetch data:",s),i.textContent="Failed to load data. Please try again later.",i.style.visibility="visible"}})}Rk();export{_g as g}; diff --git a/static/vite/manifest.info b/static/vite/manifest.info index 9f0817e..c812842 100644 --- a/static/vite/manifest.info +++ b/static/vite/manifest.info @@ -1,6 +1,6 @@ { - "_browser-CBdNgIts.js": { - "file": "browser-CBdNgIts.js", + "_browser-lg2ZDdSy.js": { + "file": "browser-lg2ZDdSy.js", "name": "browser", "isDynamicEntry": true, "imports": [ @@ -8,12 +8,12 @@ ] }, "js/main.js": { - "file": "main-CJBCyQtR.js", + "file": "main-Dnusw_Zv.js", "name": "main", "src": "js/main.js", "isEntry": true, "dynamicImports": [ - "_browser-CBdNgIts.js" + "_browser-lg2ZDdSy.js" ] } } \ No newline at end of file