From 1d2367310deaaf7fecc76bb9101e9493f5057931 Mon Sep 17 00:00:00 2001 From: bergasanargya Date: Fri, 24 May 2024 18:08:56 -0400 Subject: [PATCH 01/21] create branch --- services/src/api/manage.py | 1 + services/src/api/services/models.py | 17 ++++++++++++++++- services/src/api/services/views.py | 24 ++++++++++++++++++++++-- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/services/src/api/manage.py b/services/src/api/manage.py index 8c45ccf..3577e95 100755 --- a/services/src/api/manage.py +++ b/services/src/api/manage.py @@ -17,6 +17,7 @@ def main(): ) from exc execute_from_command_line(sys.argv) +# execute if __name__ == '__main__': main() diff --git a/services/src/api/services/models.py b/services/src/api/services/models.py index 71a8362..8e72cac 100644 --- a/services/src/api/services/models.py +++ b/services/src/api/services/models.py @@ -1,3 +1,18 @@ +# Create your models here. + from django.db import models -# Create your models here. +class Item(models.Model): + name = models.CharField(max_length=100) + quantity = models.IntegerField() + + def __str__(self): + return self.name + +class Inventory(models.Model): + user_id = models.IntegerField() + item = models.ForeignKey(Item, on_delete=models.CASCADE) + quantity = models.IntegerField() + + def __str__(self): + return f"{self.user_id} - {self.item.name}" diff --git a/services/src/api/services/views.py b/services/src/api/services/views.py index 91ea44a..96c366a 100644 --- a/services/src/api/services/views.py +++ b/services/src/api/services/views.py @@ -1,3 +1,23 @@ -from django.shortcuts import render +from django.http import JsonResponse +from .models import Inventory, Item +from django.views.decorators.csrf import csrf_exempt +import json -# Create your views here. +@csrf_exempt +def inventory_view(request): + if request.method == 'POST': + data = json.loads(request.body) + user_id = data.get('user_id') + items = data.get('items') + + if items == "*": + inventory_items = Inventory.objects.filter(user_id=user_id) + elif isinstance(items, list): + inventory_items = Inventory.objects.filter(user_id=user_id, item__name__in=items) + else: + return JsonResponse({"error": "Invalid request"}, status=400) + + result = {item.item.name: item.quantity for item in inventory_items} + return JsonResponse(result, status=200) + else: + return JsonResponse({"error": "Invalid request method"}, status=405) From b4ee9cc65ffd679f81010e1a761da2f21d24b3e8 Mon Sep 17 00:00:00 2001 From: bergasanargya Date: Fri, 24 May 2024 18:15:41 -0400 Subject: [PATCH 02/21] Added models and views --- services/src/api/api/settings.py | 2 +- services/src/api/api/urls.py | 13 ++++++-- .../api/services/migrations/0001_initial.py | 32 +++++++++++++++++++ services/src/api/services/models.py | 2 -- services/src/api/services/urls.py | 21 ++++++++---- 5 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 services/src/api/services/migrations/0001_initial.py diff --git a/services/src/api/api/settings.py b/services/src/api/api/settings.py index 765312c..e7cc0d8 100644 --- a/services/src/api/api/settings.py +++ b/services/src/api/api/settings.py @@ -78,7 +78,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'NAME': BASE_DIR / "db.sqlite3", } } diff --git a/services/src/api/api/urls.py b/services/src/api/api/urls.py index 780ce80..0838291 100644 --- a/services/src/api/api/urls.py +++ b/services/src/api/api/urls.py @@ -14,11 +14,20 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ +# from django.contrib import admin +# from django.urls import path, include +# from services import urls as service_urls + +# urlpatterns = [ +# path('admin/', admin.site.urls), +# path('services/', include(service_urls)), +# ] + from django.contrib import admin from django.urls import path, include -from services import urls as service_urls urlpatterns = [ path('admin/', admin.site.urls), - path('services/', include(service_urls)), + path('api/', include('services.urls')), ] + diff --git a/services/src/api/services/migrations/0001_initial.py b/services/src/api/services/migrations/0001_initial.py new file mode 100644 index 0000000..5ce7031 --- /dev/null +++ b/services/src/api/services/migrations/0001_initial.py @@ -0,0 +1,32 @@ +# Generated by Django 5.0.6 on 2024-05-24 22:13 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Item', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('quantity', models.IntegerField()), + ], + ), + migrations.CreateModel( + name='Inventory', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('user_id', models.IntegerField()), + ('quantity', models.IntegerField()), + ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='services.item')), + ], + ), + ] diff --git a/services/src/api/services/models.py b/services/src/api/services/models.py index 8e72cac..d9905aa 100644 --- a/services/src/api/services/models.py +++ b/services/src/api/services/models.py @@ -1,5 +1,3 @@ -# Create your models here. - from django.db import models class Item(models.Model): diff --git a/services/src/api/services/urls.py b/services/src/api/services/urls.py index 3f62b4d..bfb5ce5 100644 --- a/services/src/api/services/urls.py +++ b/services/src/api/services/urls.py @@ -1,13 +1,22 @@ -import sys +# import sys -from django.urls import path, include +# from django.urls import path, include -sys.path.insert(0, '../') +# sys.path.insert(0, '../') -import climate_api +# import climate_api -climate = climate_api.Climate() +# climate = climate_api.Climate() + +# urlpatterns = [ +# path('api/v1/climate', climate.call), +# ] + +from django.urls import path +from .views import inventory_view urlpatterns = [ - path('api/v1/climate', climate.call), + path('inventory/', inventory_view, name='inventory_view'), ] + + From 35b608fe39e8a58e077fd46fbe261930cebc1cf2 Mon Sep 17 00:00:00 2001 From: bergasanargya Date: Fri, 24 May 2024 18:33:11 -0400 Subject: [PATCH 03/21] added new models and views --- services/src/api/api/urls.py | 3 ++- services/src/api/services/urls.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/services/src/api/api/urls.py b/services/src/api/api/urls.py index 0838291..c989da8 100644 --- a/services/src/api/api/urls.py +++ b/services/src/api/api/urls.py @@ -28,6 +28,7 @@ urlpatterns = [ path('admin/', admin.site.urls), - path('api/', include('services.urls')), + path('api/', include('services.urls')), # This should point to services.urls ] + diff --git a/services/src/api/services/urls.py b/services/src/api/services/urls.py index bfb5ce5..6e0a2cd 100644 --- a/services/src/api/services/urls.py +++ b/services/src/api/services/urls.py @@ -20,3 +20,4 @@ ] + From b0be572ec3bc48a22c5c2274594dc1ce382aa9c9 Mon Sep 17 00:00:00 2001 From: bergasanargya Date: Sat, 25 May 2024 02:57:11 -0400 Subject: [PATCH 04/21] manage to somewhat connect with inventory, still working to connect to db --- services/src/api/api/urls.py | 3 ++- services/src/api/api/wsgi.py | 23 ++++++++++++++++++++++- services/src/api/manage.py | 26 +++++++++++++++++++++++--- services/src/api/services/urls.py | 1 + services/src/api/services/views.py | 5 ++++- services/src/api/test.py | 13 +++++++++++++ 6 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 services/src/api/test.py diff --git a/services/src/api/api/urls.py b/services/src/api/api/urls.py index c989da8..af6543e 100644 --- a/services/src/api/api/urls.py +++ b/services/src/api/api/urls.py @@ -28,7 +28,8 @@ urlpatterns = [ path('admin/', admin.site.urls), - path('api/', include('services.urls')), # This should point to services.urls + path('api/', include('services.urls')), ] + diff --git a/services/src/api/api/wsgi.py b/services/src/api/api/wsgi.py index e494f61..5760baf 100644 --- a/services/src/api/api/wsgi.py +++ b/services/src/api/api/wsgi.py @@ -7,10 +7,31 @@ https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ """ -import os +# import os + +# from django.core.wsgi import get_wsgi_application + +# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') + +# application = get_wsgi_application() + +# import sys +# import os +# sys.path.append(os.path.join(os.path.dirname(__file__), '../../libs')) +import os +import sys from django.core.wsgi import get_wsgi_application +# Add the path to term-util/libs to the Python path +sys.path.append('/Users/bergasanargya/summer_research_AC/term-util/libs') +print("Python path in wsgi.py:") +for path in sys.path: + print(path) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') application = get_wsgi_application() + + + + diff --git a/services/src/api/manage.py b/services/src/api/manage.py index 3577e95..d42edca 100755 --- a/services/src/api/manage.py +++ b/services/src/api/manage.py @@ -1,11 +1,33 @@ +# #!/usr/bin/env python +# """Django's command-line utility for administrative tasks.""" +# import os +# import sys + +# def main(): +# """Run administrative tasks.""" +# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') +# try: +# from django.core.management import execute_from_command_line +# except ImportError as exc: +# raise ImportError( +# "Couldn't import Django. Are you sure it's installed and " +# "available on your PYTHONPATH environment variable? Did you " +# "forget to activate a virtual environment?" +# ) from exc +# execute_from_command_line(sys.argv) + +# if __name__ == '__main__': +# main() + #!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys - def main(): """Run administrative tasks.""" + # Add the path to term-util/libs to the Python path + sys.path.append('/Users/bergasanargya/summer_research_AC/term-util/libs') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') try: from django.core.management import execute_from_command_line @@ -17,7 +39,5 @@ def main(): ) from exc execute_from_command_line(sys.argv) -# execute - if __name__ == '__main__': main() diff --git a/services/src/api/services/urls.py b/services/src/api/services/urls.py index 6e0a2cd..5fa1ed6 100644 --- a/services/src/api/services/urls.py +++ b/services/src/api/services/urls.py @@ -21,3 +21,4 @@ + diff --git a/services/src/api/services/views.py b/services/src/api/services/views.py index 96c366a..3616539 100644 --- a/services/src/api/services/views.py +++ b/services/src/api/services/views.py @@ -1,8 +1,11 @@ from django.http import JsonResponse -from .models import Inventory, Item from django.views.decorators.csrf import csrf_exempt import json +# Import Inventory and Item from term-util/libs +from inventory.Inventory import Inventory +from inventory.Item import Item + @csrf_exempt def inventory_view(request): if request.method == 'POST': diff --git a/services/src/api/test.py b/services/src/api/test.py new file mode 100644 index 0000000..780e9d5 --- /dev/null +++ b/services/src/api/test.py @@ -0,0 +1,13 @@ +import sys +sys.path.append('/Users/bergasanargya/summer_research_AC/term-util/libs') # Add the libs directory + +print("Python path:") +for path in sys.path: + print(path) + +try: + from inventory.Inventory import Acquire + from inventory.Item import ItemSpec + print("Inventory import successful") +except ImportError as e: + print(f"Inventory import error: {e}") From cd2542c461bd1958526af5de202af982a116ee0a Mon Sep 17 00:00:00 2001 From: bergasanargya Date: Sat, 25 May 2024 03:24:21 -0400 Subject: [PATCH 05/21] New push to fix the viewon the curl command --- services/src/api/api/urls.py | 2 ++ services/src/api/services/urls.py | 4 +++- services/src/api/services/views.py | 5 +---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/services/src/api/api/urls.py b/services/src/api/api/urls.py index af6543e..ce274fc 100644 --- a/services/src/api/api/urls.py +++ b/services/src/api/api/urls.py @@ -33,3 +33,5 @@ + + diff --git a/services/src/api/services/urls.py b/services/src/api/services/urls.py index 5fa1ed6..3e458ba 100644 --- a/services/src/api/services/urls.py +++ b/services/src/api/services/urls.py @@ -16,9 +16,11 @@ from .views import inventory_view urlpatterns = [ - path('inventory/', inventory_view, name='inventory_view'), + path('inventory/', inventory_view, name='inventory'), ] + + diff --git a/services/src/api/services/views.py b/services/src/api/services/views.py index 3616539..96c366a 100644 --- a/services/src/api/services/views.py +++ b/services/src/api/services/views.py @@ -1,11 +1,8 @@ from django.http import JsonResponse +from .models import Inventory, Item from django.views.decorators.csrf import csrf_exempt import json -# Import Inventory and Item from term-util/libs -from inventory.Inventory import Inventory -from inventory.Item import Item - @csrf_exempt def inventory_view(request): if request.method == 'POST': From 03e87c823f16b157f96bcba12be6918b80f04092 Mon Sep 17 00:00:00 2001 From: dluman Date: Wed, 29 May 2024 21:22:22 -0400 Subject: [PATCH 06/21] Updating WSGI definition --- srv/endpoints/services/wsgi.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/srv/endpoints/services/wsgi.py b/srv/endpoints/services/wsgi.py index 49995a2..edf8189 100644 --- a/srv/endpoints/services/wsgi.py +++ b/srv/endpoints/services/wsgi.py @@ -7,35 +7,10 @@ https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ """ -# import os - -# from django.core.wsgi import get_wsgi_application - -# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') - -# application = get_wsgi_application() - -# import sys -# import os -# sys.path.append(os.path.join(os.path.dirname(__file__), '../../libs')) - import os -import sys + from django.core.wsgi import get_wsgi_application -<<<<<<< HEAD:services/src/api/api/wsgi.py -# Add the path to term-util/libs to the Python path -sys.path.append('/Users/bergasanargya/summer_research_AC/term-util/libs') -print("Python path in wsgi.py:") -for path in sys.path: - print(path) -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') -======= os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') ->>>>>>> main:srv/endpoints/services/wsgi.py application = get_wsgi_application() - - - - From 2a7d851476af4c67bbf5d82a7a4636f8640f16ae Mon Sep 17 00:00:00 2001 From: Aidan Dyga Date: Sat, 1 Jun 2024 13:47:32 -0400 Subject: [PATCH 07/21] revised climate api to include django self-documentation --- srv/endpoints/api/admin.py | 2 - srv/endpoints/api/apps.py | 4 +- srv/endpoints/api/models.py | 7 ++ srv/endpoints/api/serializers.py | 12 +++ srv/endpoints/api/tests.py | 2 - srv/endpoints/api/views.py | 2 - srv/endpoints/manage.py | 5 +- srv/endpoints/services/asgi.py | 2 +- srv/endpoints/services/routes/Router.py | 12 ++- .../services/routes/climate/__init__.py | 13 ++- srv/endpoints/services/settings.py | 79 ++++++++++--------- srv/endpoints/services/urls.py | 26 ++++-- srv/endpoints/services/viewsets.py | 10 +++ srv/endpoints/services/wsgi.py | 2 +- 14 files changed, 105 insertions(+), 73 deletions(-) create mode 100644 srv/endpoints/api/serializers.py create mode 100644 srv/endpoints/services/viewsets.py diff --git a/srv/endpoints/api/admin.py b/srv/endpoints/api/admin.py index 8c38f3f..846f6b4 100644 --- a/srv/endpoints/api/admin.py +++ b/srv/endpoints/api/admin.py @@ -1,3 +1 @@ -from django.contrib import admin - # Register your models here. diff --git a/srv/endpoints/api/apps.py b/srv/endpoints/api/apps.py index 66656fd..878e7d5 100644 --- a/srv/endpoints/api/apps.py +++ b/srv/endpoints/api/apps.py @@ -2,5 +2,5 @@ class ApiConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'api' + default_auto_field = "django.db.models.BigAutoField" + name = "api" diff --git a/srv/endpoints/api/models.py b/srv/endpoints/api/models.py index 71a8362..c16ebed 100644 --- a/srv/endpoints/api/models.py +++ b/srv/endpoints/api/models.py @@ -1,3 +1,10 @@ from django.db import models + # Create your models here. +class Climate(models.Model): + """Climate model that represents climate data for a specific location.""" + + lat = models.FloatField() + lon = models.FloatField() + weather_condition = models.IntegerField() diff --git a/srv/endpoints/api/serializers.py b/srv/endpoints/api/serializers.py new file mode 100644 index 0000000..18dcf1d --- /dev/null +++ b/srv/endpoints/api/serializers.py @@ -0,0 +1,12 @@ +from rest_framework import serializers +from .models import Climate + + +class ClimateSerializer(serializers.ModelSerializer): + """Serializer for the Climate model.""" + + class Meta: + """Specify the model to be serialized""" + + model = Climate + fields = ["lat", "lon", "weather_condition"] diff --git a/srv/endpoints/api/tests.py b/srv/endpoints/api/tests.py index 7ce503c..a39b155 100644 --- a/srv/endpoints/api/tests.py +++ b/srv/endpoints/api/tests.py @@ -1,3 +1 @@ -from django.test import TestCase - # Create your tests here. diff --git a/srv/endpoints/api/views.py b/srv/endpoints/api/views.py index 91ea44a..60f00ef 100644 --- a/srv/endpoints/api/views.py +++ b/srv/endpoints/api/views.py @@ -1,3 +1 @@ -from django.shortcuts import render - # Create your views here. diff --git a/srv/endpoints/manage.py b/srv/endpoints/manage.py index 9c01280..c002778 100755 --- a/srv/endpoints/manage.py +++ b/srv/endpoints/manage.py @@ -1,12 +1,13 @@ #!/usr/bin/env python """Django's command-line utility for administrative tasks.""" + import os import sys def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "services.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: @@ -18,5 +19,5 @@ def main(): execute_from_command_line(sys.argv) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/srv/endpoints/services/asgi.py b/srv/endpoints/services/asgi.py index 83c786a..8b902c0 100644 --- a/srv/endpoints/services/asgi.py +++ b/srv/endpoints/services/asgi.py @@ -11,6 +11,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "services.settings") application = get_asgi_application() diff --git a/srv/endpoints/services/routes/Router.py b/srv/endpoints/services/routes/Router.py index ecf8828..21bbf61 100644 --- a/srv/endpoints/services/routes/Router.py +++ b/srv/endpoints/services/routes/Router.py @@ -1,10 +1,9 @@ -import inspect from typing import Callable from functools import wraps -from django.urls import path, include +from django.urls import path -class Route: +class Route: def __init__(self): self.urls = [] @@ -13,17 +12,16 @@ def create_endpoint(fn: Callable): @wraps(fn) def wrapper(*args, **kwargs): return fn(*args, **kwargs) + module = fn.__qualname__.split(".") wrapper.endpoint = module[0].lower() wrapper.version = version wrapper.decorated = True return wrapper + return create_endpoint def add_url(self, endpoint: str = "", fn: Callable = callable(None)) -> None: if not fn: return - self.urls.append( - path(endpoint, fn) - ) - + self.urls.append(path(endpoint, fn)) diff --git a/srv/endpoints/services/routes/climate/__init__.py b/srv/endpoints/services/routes/climate/__init__.py index 385584b..093854f 100644 --- a/srv/endpoints/services/routes/climate/__init__.py +++ b/srv/endpoints/services/routes/climate/__init__.py @@ -26,8 +26,8 @@ print(err) STATE = {} -class Climate(Route): +class Climate(Route): sun = [800, 801] def __init__(self): @@ -72,15 +72,12 @@ def __is_windy(self) -> bool: @Route.endpoint("v1") def conditions(self, request: WSGIRequest) -> JsonResponse: response = { - "wind": { - "windy": self.windy, - "windspeed": self.wind_speed - }, - "sun": self.sunny + "wind": {"windy": self.windy, "windspeed": self.wind_speed}, + "sun": self.sunny, } - return JsonResponse(response, status = 200) + return JsonResponse(response, status=200) @Route.endpoint("v1") def all(self, request: WSGIRequest) -> JsonResponse: print(STATE) - return JsonResponse(STATE, status = 200) + return JsonResponse(STATE, status=200) diff --git a/srv/endpoints/services/settings.py b/srv/endpoints/services/settings.py index c4eec2c..e682669 100644 --- a/srv/endpoints/services/settings.py +++ b/srv/endpoints/services/settings.py @@ -20,65 +20,66 @@ # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-t6n*wl=xvln@*wvjh7_bv2&xi4wsyx8hl6qviiq$8)kn3zy^zr' +SECRET_KEY = "django-insecure-t6n*wl=xvln@*wvjh7_bv2&xi4wsyx8hl6qviiq$8)kn3zy^zr" # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['127.0.0.1', 'api.theterm.world'] +ALLOWED_HOSTS = ["127.0.0.1", "api.theterm.world"] # Application definition INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'rest_framework', - 'services' + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.sessions", + "django.contrib.messages", + "django.contrib.staticfiles", + "rest_framework", + "api", + "services", ] MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', + "django.middleware.security.SecurityMiddleware", + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", ] -ROOT_URLCONF = 'services.urls' +ROOT_URLCONF = "services.urls" TEMPLATES = [ { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [], + "APP_DIRS": True, + "OPTIONS": { + "context_processors": [ + "django.template.context_processors.debug", + "django.template.context_processors.request", + "django.contrib.auth.context_processors.auth", + "django.contrib.messages.context_processors.messages", ], }, }, ] -WSGI_APPLICATION = 'services.wsgi.application' +WSGI_APPLICATION = "services.wsgi.application" # Database # https://docs.djangoproject.com/en/5.0/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": BASE_DIR / "db.sqlite3", } } @@ -88,16 +89,16 @@ AUTH_PASSWORD_VALIDATORS = [ { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", }, { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", }, { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", }, { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", }, ] @@ -105,9 +106,9 @@ # Internationalization # https://docs.djangoproject.com/en/5.0/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = "en-us" -TIME_ZONE = 'UTC' +TIME_ZONE = "UTC" USE_I18N = True @@ -117,9 +118,9 @@ # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/5.0/howto/static-files/ -STATIC_URL = 'static/' +STATIC_URL = "static/" # Default primary key field type # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field -DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" diff --git a/srv/endpoints/services/urls.py b/srv/endpoints/services/urls.py index c0002d4..d16fde8 100644 --- a/srv/endpoints/services/urls.py +++ b/srv/endpoints/services/urls.py @@ -1,29 +1,41 @@ import os -import sys -import pennant from importlib import import_module from django.urls import path, include -route_path = 'services/routes' +from rest_framework.routers import DefaultRouter +from .viewsets import ClimateViewSet +from rest_framework.schemas import get_schema_view + +route_path = "services/routes" urlpatterns = [] for entry in os.listdir(route_path): if os.path.isdir(f"{route_path}/{entry}") and entry != "__pycache__": mod_path = route_path.split("/") mod = import_module( - ".".join([*mod_path[-2:], entry]), - package = entry.capitalize() + ".".join([*mod_path[-2:], entry]), package=entry.capitalize() ) cls = mod.__dict__[entry.capitalize()] for method in dir(cls): elem = getattr(cls, method) - if 'decorated' in dir(elem): + if "decorated" in dir(elem): instance = cls() urlpatterns.append( path( f"{elem.version}/{elem.endpoint}/{elem.__name__}", - getattr(instance, elem.__name__) + getattr(instance, elem.__name__), ) ) + +# Create a default router and register the ClimateViewSet +router = DefaultRouter() +router.register(r"climate", ClimateViewSet) + +# Define the urlpatterns, including the routes for the router and the schema view +urlpatterns = [ + path("", include(router.urls)), + path("docs/", get_schema_view(title="Climate API Documentation")), + # Other urls... +] diff --git a/srv/endpoints/services/viewsets.py b/srv/endpoints/services/viewsets.py new file mode 100644 index 0000000..0eb9d28 --- /dev/null +++ b/srv/endpoints/services/viewsets.py @@ -0,0 +1,10 @@ +from rest_framework import viewsets +from api.models import Climate +from api.serializers import ClimateSerializer + + +class ClimateViewSet(viewsets.ModelViewSet): + """A viewset for viewing and editing Climate instances.""" + + queryset = Climate.objects.all() # Define the queryset to be all instances of the Climate model + serializer_class = ClimateSerializer # Specify the serializer class to be used for this viewset diff --git a/srv/endpoints/services/wsgi.py b/srv/endpoints/services/wsgi.py index edf8189..d58a00c 100644 --- a/srv/endpoints/services/wsgi.py +++ b/srv/endpoints/services/wsgi.py @@ -11,6 +11,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "services.settings") application = get_wsgi_application() From 0a977749456f03f5233850700ee1e8c956d5cf98 Mon Sep 17 00:00:00 2001 From: dluman Date: Sun, 2 Jun 2024 12:54:00 -0400 Subject: [PATCH 08/21] Factor into Django REST structure --- srv/endpoints/api/models.py | 3 - srv/endpoints/api/views.py | 3 - srv/endpoints/climate/__init__.py | 1 + srv/endpoints/{api => climate}/admin.py | 0 srv/endpoints/{api => climate}/apps.py | 4 +- .../climate/migrations/0001_initial.py | 27 ++++++ .../{api => climate/migrations}/__init__.py | 0 srv/endpoints/climate/models.py | 48 +++++++++++ srv/endpoints/climate/serializers.py | 7 ++ srv/endpoints/{api => climate}/tests.py | 0 srv/endpoints/climate/urls.py | 6 ++ srv/endpoints/climate/views.old | 17 ++++ srv/endpoints/climate/views.py | 7 ++ srv/endpoints/core/asgi.py | 7 ++ .../{api => core}/migrations/__init__.py | 0 srv/endpoints/{services => core}/settings.py | 65 +++++++------- srv/endpoints/core/urls.py | 6 ++ srv/endpoints/core/wsgi.py | 7 ++ srv/endpoints/manage.py | 4 +- srv/endpoints/services/__init__.py | 0 srv/endpoints/services/asgi.py | 16 ---- srv/endpoints/services/routes/Router.py | 29 ------- .../services/routes/climate/__init__.py | 86 ------------------- srv/endpoints/services/urls.py | 29 ------- srv/endpoints/services/wsgi.py | 16 ---- srv/pyproject.toml | 1 + 26 files changed, 166 insertions(+), 223 deletions(-) delete mode 100644 srv/endpoints/api/models.py delete mode 100644 srv/endpoints/api/views.py create mode 100644 srv/endpoints/climate/__init__.py rename srv/endpoints/{api => climate}/admin.py (100%) rename srv/endpoints/{api => climate}/apps.py (63%) create mode 100644 srv/endpoints/climate/migrations/0001_initial.py rename srv/endpoints/{api => climate/migrations}/__init__.py (100%) create mode 100644 srv/endpoints/climate/models.py create mode 100644 srv/endpoints/climate/serializers.py rename srv/endpoints/{api => climate}/tests.py (100%) create mode 100644 srv/endpoints/climate/urls.py create mode 100644 srv/endpoints/climate/views.old create mode 100644 srv/endpoints/climate/views.py create mode 100644 srv/endpoints/core/asgi.py rename srv/endpoints/{api => core}/migrations/__init__.py (100%) rename srv/endpoints/{services => core}/settings.py (74%) create mode 100644 srv/endpoints/core/urls.py create mode 100644 srv/endpoints/core/wsgi.py delete mode 100644 srv/endpoints/services/__init__.py delete mode 100644 srv/endpoints/services/asgi.py delete mode 100644 srv/endpoints/services/routes/Router.py delete mode 100644 srv/endpoints/services/routes/climate/__init__.py delete mode 100644 srv/endpoints/services/urls.py delete mode 100644 srv/endpoints/services/wsgi.py diff --git a/srv/endpoints/api/models.py b/srv/endpoints/api/models.py deleted file mode 100644 index 71a8362..0000000 --- a/srv/endpoints/api/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/srv/endpoints/api/views.py b/srv/endpoints/api/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/srv/endpoints/api/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/srv/endpoints/climate/__init__.py b/srv/endpoints/climate/__init__.py new file mode 100644 index 0000000..ebed02d --- /dev/null +++ b/srv/endpoints/climate/__init__.py @@ -0,0 +1 @@ +default_app_config = 'climate.apps.ClimateConfig' diff --git a/srv/endpoints/api/admin.py b/srv/endpoints/climate/admin.py similarity index 100% rename from srv/endpoints/api/admin.py rename to srv/endpoints/climate/admin.py diff --git a/srv/endpoints/api/apps.py b/srv/endpoints/climate/apps.py similarity index 63% rename from srv/endpoints/api/apps.py rename to srv/endpoints/climate/apps.py index 66656fd..d071a46 100644 --- a/srv/endpoints/api/apps.py +++ b/srv/endpoints/climate/apps.py @@ -1,6 +1,6 @@ from django.apps import AppConfig -class ApiConfig(AppConfig): +class ClimateConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'api' + name = 'climate' diff --git a/srv/endpoints/climate/migrations/0001_initial.py b/srv/endpoints/climate/migrations/0001_initial.py new file mode 100644 index 0000000..bfc3769 --- /dev/null +++ b/srv/endpoints/climate/migrations/0001_initial.py @@ -0,0 +1,27 @@ +# Generated by Django 5.0.6 on 2024-06-02 16:07 + +import django.db.models.manager +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='TransientModel', + fields=[ + ('id', models.IntegerField(primary_key=True, serialize=False)), + ], + options={ + 'managed': False, + }, + managers=[ + ('obj', django.db.models.manager.Manager()), + ], + ), + ] diff --git a/srv/endpoints/api/__init__.py b/srv/endpoints/climate/migrations/__init__.py similarity index 100% rename from srv/endpoints/api/__init__.py rename to srv/endpoints/climate/migrations/__init__.py diff --git a/srv/endpoints/climate/models.py b/srv/endpoints/climate/models.py new file mode 100644 index 0000000..4b03889 --- /dev/null +++ b/srv/endpoints/climate/models.py @@ -0,0 +1,48 @@ +import os +import requests +from collections import UserList +from django.db import models +from django.core.cache import caches +from dotenv import load_dotenv + +load_dotenv() +CACHE = caches["default"] + +# This functionality builds on an answer for the following SO question, +# but not the accepted answer; this one is farther down in the post: +# +# https://stackoverflow.com/questions/9091305/django-models-without-database + + +class TransientModelManager(models.Manager): + + api = os.getenv("OPENWEATHER_API") + lat = os.getenv("OPENWEATHER_LAT") + lon = os.getenv("OPENWEATHER_LON") + + cache_key = "cached-transient-models" + cache_sentinel = object() + cache_timeout = 600 + + def get_queryset(self): + transient_model_data = CACHE.get(self.cache_key, self.cache_sentinel) + if transient_model_data is self.cache_sentinel: + response = requests.get( + f"https://api.openweathermap.org/data/2.5/weather?lat={self.lat}&lon={self.lon}&appid={self.api}" + ) + response.raise_for_status() + transient_model_data = response.json() + CACHE.set(self.cache_key, transient_model_data, self.cache_timeout) + return TransientModelQueryset([ + TransientModel(*data) + for data in transient_model_data + ]) + +class TransientModelQueryset(UserList): + pass + +class TransientModel(models.Model): + class Meta: + managed = False + + obj = TransientModelManager.from_queryset(TransientModelQueryset)() diff --git a/srv/endpoints/climate/serializers.py b/srv/endpoints/climate/serializers.py new file mode 100644 index 0000000..ebfa969 --- /dev/null +++ b/srv/endpoints/climate/serializers.py @@ -0,0 +1,7 @@ +from rest_framework import serializers +from climate.models import TransientModel + +class TransientModelSerializer(serializers.ModelSerializer): + class Meta: + model = TransientModel + fields = ["id"] diff --git a/srv/endpoints/api/tests.py b/srv/endpoints/climate/tests.py similarity index 100% rename from srv/endpoints/api/tests.py rename to srv/endpoints/climate/tests.py diff --git a/srv/endpoints/climate/urls.py b/srv/endpoints/climate/urls.py new file mode 100644 index 0000000..97562cb --- /dev/null +++ b/srv/endpoints/climate/urls.py @@ -0,0 +1,6 @@ +from . import views +from django.urls import re_path, path + +urlpatterns = [ + re_path(r'^$', views.ClimateDataViewAll.as_view(), name = "climate-all") +] diff --git a/srv/endpoints/climate/views.old b/srv/endpoints/climate/views.old new file mode 100644 index 0000000..9ab4474 --- /dev/null +++ b/srv/endpoints/climate/views.old @@ -0,0 +1,17 @@ +from rest_framework.exceptions import APIException +from rest_framework.generics import ListAPIView +from rest_framework.permissions import AllowAny + +from climate.models import TransientModel +from climate.serializers import TransientModelSerializer + +class TransientModelView(ListAPIView): + permission_classes = [AllowAny] + serializer_class = TransientModelSerializer + + def get_queryset(self): + try: + queryset = TransientModel.obj.all() + return queryset + except Exception as e: + raise APIException(e) from e diff --git a/srv/endpoints/climate/views.py b/srv/endpoints/climate/views.py new file mode 100644 index 0000000..b51638c --- /dev/null +++ b/srv/endpoints/climate/views.py @@ -0,0 +1,7 @@ +from rest_framework.views import APIView +from rest_framework.response import Response +from django.http import JsonResponse + +class ClimateDataViewAll(APIView): + def get(self, request, format=None): + return JsonResponse({"!":"."}, status = 200) diff --git a/srv/endpoints/core/asgi.py b/srv/endpoints/core/asgi.py new file mode 100644 index 0000000..d739b7e --- /dev/null +++ b/srv/endpoints/core/asgi.py @@ -0,0 +1,7 @@ +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') + +application = get_asgi_application() diff --git a/srv/endpoints/api/migrations/__init__.py b/srv/endpoints/core/migrations/__init__.py similarity index 100% rename from srv/endpoints/api/migrations/__init__.py rename to srv/endpoints/core/migrations/__init__.py diff --git a/srv/endpoints/services/settings.py b/srv/endpoints/core/settings.py similarity index 74% rename from srv/endpoints/services/settings.py rename to srv/endpoints/core/settings.py index c4eec2c..15afb3c 100644 --- a/srv/endpoints/services/settings.py +++ b/srv/endpoints/core/settings.py @@ -1,34 +1,41 @@ -""" -Django settings for services project. +import os +from dotenv import load_dotenv -Generated by 'django-admin startproject' using Django 5.0.4. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/topics/settings/ +from pathlib import Path -For the full list of settings and their values, see -https://docs.djangoproject.com/en/5.0/ref/settings/ -""" +# Versioning +REST_FRAMEWORK = { + "DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.NamespaceVersioning" +} -from pathlib import Path +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-t6n*wl=xvln@*wvjh7_bv2&xi4wsyx8hl6qviiq$8)kn3zy^zr' # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent +load_dotenv() -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-t6n*wl=xvln@*wvjh7_bv2&xi4wsyx8hl6qviiq$8)kn3zy^zr' +ALLOWED_HOSTS = [ + "localhost", + "127.0.0.1", + os.getenv("API_URL") +] -# SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['127.0.0.1', 'api.theterm.world'] - +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'api', + 'USER': os.getenv("API_DB_USER"), + 'PASSWORD': os.getenv("API_DB_PASS"), + 'HOST': 'localhost', + 'PORT': '', + } +} -# Application definition +ROOT_URLCONF='core.urls' INSTALLED_APPS = [ 'django.contrib.admin', @@ -38,7 +45,8 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', - 'services' + 'core', + 'climate', ] MIDDLEWARE = [ @@ -51,8 +59,6 @@ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'services.urls' - TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', @@ -69,19 +75,7 @@ }, ] -WSGI_APPLICATION = 'services.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/5.0/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - } -} - +WSGI_APPLICATION = 'core.wsgi.application' # Password validation # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators @@ -101,7 +95,6 @@ }, ] - # Internationalization # https://docs.djangoproject.com/en/5.0/topics/i18n/ diff --git a/srv/endpoints/core/urls.py b/srv/endpoints/core/urls.py new file mode 100644 index 0000000..1fca3b8 --- /dev/null +++ b/srv/endpoints/core/urls.py @@ -0,0 +1,6 @@ +from django.urls import path, re_path, include +from rest_framework.reverse import reverse + +urlpatterns = [ + re_path(r'^v1/climate/all', include(('climate.urls','climate'), namespace='v1')) +] diff --git a/srv/endpoints/core/wsgi.py b/srv/endpoints/core/wsgi.py new file mode 100644 index 0000000..f7ff4d6 --- /dev/null +++ b/srv/endpoints/core/wsgi.py @@ -0,0 +1,7 @@ +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') + +application = get_wsgi_application() diff --git a/srv/endpoints/manage.py b/srv/endpoints/manage.py index 9c01280..1e9345b 100755 --- a/srv/endpoints/manage.py +++ b/srv/endpoints/manage.py @@ -3,10 +3,9 @@ import os import sys - def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: @@ -17,6 +16,5 @@ def main(): ) from exc execute_from_command_line(sys.argv) - if __name__ == '__main__': main() diff --git a/srv/endpoints/services/__init__.py b/srv/endpoints/services/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/srv/endpoints/services/asgi.py b/srv/endpoints/services/asgi.py deleted file mode 100644 index 83c786a..0000000 --- a/srv/endpoints/services/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for services project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') - -application = get_asgi_application() diff --git a/srv/endpoints/services/routes/Router.py b/srv/endpoints/services/routes/Router.py deleted file mode 100644 index ecf8828..0000000 --- a/srv/endpoints/services/routes/Router.py +++ /dev/null @@ -1,29 +0,0 @@ -import inspect -from typing import Callable -from functools import wraps -from django.urls import path, include - -class Route: - - def __init__(self): - self.urls = [] - - def endpoint(version): - def create_endpoint(fn: Callable): - @wraps(fn) - def wrapper(*args, **kwargs): - return fn(*args, **kwargs) - module = fn.__qualname__.split(".") - wrapper.endpoint = module[0].lower() - wrapper.version = version - wrapper.decorated = True - return wrapper - return create_endpoint - - def add_url(self, endpoint: str = "", fn: Callable = callable(None)) -> None: - if not fn: - return - self.urls.append( - path(endpoint, fn) - ) - diff --git a/srv/endpoints/services/routes/climate/__init__.py b/srv/endpoints/services/routes/climate/__init__.py deleted file mode 100644 index 385584b..0000000 --- a/srv/endpoints/services/routes/climate/__init__.py +++ /dev/null @@ -1,86 +0,0 @@ -import os -import json -import requests - -from ..Router import Route - -from datetime import datetime -from dotenv import load_dotenv -from django.http import JsonResponse -from django.core.handlers.wsgi import WSGIRequest - -load_dotenv() - -try: - # Retrieve environment variables from .env file - lat = os.getenv("LAT") - lon = os.getenv("LON") - api = os.getenv("OPENWEATHER_API") - # Make request to OpenWeather API - print(lat, lon, api) - data = requests.get( - f"https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={api}" - ) - STATE = json.loads(data.content) -except Exception as err: - print(err) - STATE = {} - -class Climate(Route): - - sun = [800, 801] - - def __init__(self): - super().__init__() - self.time = datetime.now().timestamp() - self.windy = self.__is_windy() - self.sunny = self.__is_sunny() and not self.__is_night() - self.wind_speed = 0 - if "wind" in STATE: - self.wind_speed = STATE["wind"]["speed"] - - def __add_url(self, endpoint: str = "", fn: str = "") -> None: - self.add_url(endpoint, fn) - - def __is_sunny(self) -> bool: - try: - for condition in STATE["weather"]: - if condition["id"] in self.sun: - return True - except: - pass - return False - - def __is_night(self) -> bool: - try: - sunrise = STATE["sys"]["sunrise"] - sunset = STATE["sys"]["sunset"] - if sunrise < self.time < sunset: - return False - except: - return False - return True - - def __is_windy(self) -> bool: - try: - if STATE["wind"]["speed"] > 5: - return True - except: - pass - return False - - @Route.endpoint("v1") - def conditions(self, request: WSGIRequest) -> JsonResponse: - response = { - "wind": { - "windy": self.windy, - "windspeed": self.wind_speed - }, - "sun": self.sunny - } - return JsonResponse(response, status = 200) - - @Route.endpoint("v1") - def all(self, request: WSGIRequest) -> JsonResponse: - print(STATE) - return JsonResponse(STATE, status = 200) diff --git a/srv/endpoints/services/urls.py b/srv/endpoints/services/urls.py deleted file mode 100644 index c0002d4..0000000 --- a/srv/endpoints/services/urls.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -import sys -import pennant -from importlib import import_module - -from django.urls import path, include - -route_path = 'services/routes' -urlpatterns = [] - -for entry in os.listdir(route_path): - if os.path.isdir(f"{route_path}/{entry}") and entry != "__pycache__": - mod_path = route_path.split("/") - mod = import_module( - ".".join([*mod_path[-2:], entry]), - package = entry.capitalize() - ) - - cls = mod.__dict__[entry.capitalize()] - for method in dir(cls): - elem = getattr(cls, method) - if 'decorated' in dir(elem): - instance = cls() - urlpatterns.append( - path( - f"{elem.version}/{elem.endpoint}/{elem.__name__}", - getattr(instance, elem.__name__) - ) - ) diff --git a/srv/endpoints/services/wsgi.py b/srv/endpoints/services/wsgi.py deleted file mode 100644 index edf8189..0000000 --- a/srv/endpoints/services/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for services project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'services.settings') - -application = get_wsgi_application() diff --git a/srv/pyproject.toml b/srv/pyproject.toml index 159ac26..3382a42 100644 --- a/srv/pyproject.toml +++ b/srv/pyproject.toml @@ -7,6 +7,7 @@ name = "world-codespaces-api-services" version = "0.1.0" dependencies = [ "requests", + "psycopg2-binary", "python-dotenv", "pennant", "django", From affe8f916b5c175d585e136bc48011daec74a1b8 Mon Sep 17 00:00:00 2001 From: dluman Date: Sun, 2 Jun 2024 13:02:39 -0400 Subject: [PATCH 09/21] Need to list individual response fields for documentation's sake --- srv/endpoints/climate/serializers.py | 15 ----------- srv/endpoints/climate/views.old | 17 ------------- srv/endpoints/climate/views.py | 11 ++++++++- srv/endpoints/core/settings.py | 37 ---------------------------- srv/endpoints/manage.py | 9 ------- 5 files changed, 10 insertions(+), 79 deletions(-) delete mode 100644 srv/endpoints/climate/views.old diff --git a/srv/endpoints/climate/serializers.py b/srv/endpoints/climate/serializers.py index d6d68c8..c8e9802 100644 --- a/srv/endpoints/climate/serializers.py +++ b/srv/endpoints/climate/serializers.py @@ -1,21 +1,6 @@ from rest_framework import serializers -<<<<<<< HEAD:srv/endpoints/api/serializers.py -from .models import Climate - - -class ClimateSerializer(serializers.ModelSerializer): - """Serializer for the Climate model.""" - - class Meta: - """Specify the model to be serialized""" - - model = Climate - fields = ["lat", "lon", "weather_condition"] -======= from climate.models import TransientModel class TransientModelSerializer(serializers.ModelSerializer): class Meta: model = TransientModel - fields = ["id"] ->>>>>>> refactor-api-side-branch:srv/endpoints/climate/serializers.py diff --git a/srv/endpoints/climate/views.old b/srv/endpoints/climate/views.old deleted file mode 100644 index 9ab4474..0000000 --- a/srv/endpoints/climate/views.old +++ /dev/null @@ -1,17 +0,0 @@ -from rest_framework.exceptions import APIException -from rest_framework.generics import ListAPIView -from rest_framework.permissions import AllowAny - -from climate.models import TransientModel -from climate.serializers import TransientModelSerializer - -class TransientModelView(ListAPIView): - permission_classes = [AllowAny] - serializer_class = TransientModelSerializer - - def get_queryset(self): - try: - queryset = TransientModel.obj.all() - return queryset - except Exception as e: - raise APIException(e) from e diff --git a/srv/endpoints/climate/views.py b/srv/endpoints/climate/views.py index b51638c..6aecdfa 100644 --- a/srv/endpoints/climate/views.py +++ b/srv/endpoints/climate/views.py @@ -1,7 +1,16 @@ from rest_framework.views import APIView from rest_framework.response import Response from django.http import JsonResponse +from rest_framework.permissions import AllowAny + +from climate.models import TransientModel +from climate.serializers import TransientModelSerializer class ClimateDataViewAll(APIView): + + permission_classes = [AllowAny] + serializer_class = TransientModelSerializer + def get(self, request, format=None): - return JsonResponse({"!":"."}, status = 200) + return TransientModel.obj.all() + #return JsonResponse({"!":"."}, status = 200) diff --git a/srv/endpoints/core/settings.py b/srv/endpoints/core/settings.py index c84d7ea..f1e81fe 100644 --- a/srv/endpoints/core/settings.py +++ b/srv/endpoints/core/settings.py @@ -24,9 +24,6 @@ DEBUG = True -<<<<<<< HEAD:srv/endpoints/services/settings.py -ALLOWED_HOSTS = ["127.0.0.1", "api.theterm.world"] -======= DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', @@ -37,22 +34,10 @@ 'PORT': '', } } ->>>>>>> refactor-api-side-branch:srv/endpoints/core/settings.py ROOT_URLCONF='core.urls' INSTALLED_APPS = [ -<<<<<<< HEAD:srv/endpoints/services/settings.py - "django.contrib.admin", - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.messages", - "django.contrib.staticfiles", - "rest_framework", - "api", - "services", -======= 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -62,7 +47,6 @@ 'rest_framework', 'core', 'climate', ->>>>>>> refactor-api-side-branch:srv/endpoints/core/settings.py ] MIDDLEWARE = [ @@ -75,11 +59,6 @@ "django.middleware.clickjacking.XFrameOptionsMiddleware", ] -<<<<<<< HEAD:srv/endpoints/services/settings.py -ROOT_URLCONF = "services.urls" - -======= ->>>>>>> refactor-api-side-branch:srv/endpoints/core/settings.py TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", @@ -96,23 +75,7 @@ }, ] -<<<<<<< HEAD:srv/endpoints/services/settings.py -WSGI_APPLICATION = "services.wsgi.application" - - -# Database -# https://docs.djangoproject.com/en/5.0/ref/settings/#databases - -DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": BASE_DIR / "db.sqlite3", - } -} - -======= WSGI_APPLICATION = 'core.wsgi.application' ->>>>>>> refactor-api-side-branch:srv/endpoints/core/settings.py # Password validation # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators diff --git a/srv/endpoints/manage.py b/srv/endpoints/manage.py index c00158b..6d7c253 100755 --- a/srv/endpoints/manage.py +++ b/srv/endpoints/manage.py @@ -6,11 +6,7 @@ def main(): """Run administrative tasks.""" -<<<<<<< HEAD - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "services.settings") -======= os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') ->>>>>>> refactor-api-side-branch try: from django.core.management import execute_from_command_line except ImportError as exc: @@ -21,10 +17,5 @@ def main(): ) from exc execute_from_command_line(sys.argv) -<<<<<<< HEAD - -if __name__ == "__main__": -======= if __name__ == '__main__': ->>>>>>> refactor-api-side-branch main() From 410f3549b895d80099dd1acea5640e673c26807f Mon Sep 17 00:00:00 2001 From: dluman Date: Sun, 2 Jun 2024 15:23:40 -0400 Subject: [PATCH 10/21] Serializes correctly; would like to avoid manually specifying fields, though --- srv/endpoints/climate/models.py | 43 ++++++++++++++++++---------- srv/endpoints/climate/serializers.py | 21 ++++++++++++-- srv/endpoints/climate/views.py | 20 +++++++------ srv/endpoints/core/settings.py | 1 + srv/pyproject.toml | 1 + 5 files changed, 60 insertions(+), 26 deletions(-) diff --git a/srv/endpoints/climate/models.py b/srv/endpoints/climate/models.py index 4b03889..0428a06 100644 --- a/srv/endpoints/climate/models.py +++ b/srv/endpoints/climate/models.py @@ -1,7 +1,8 @@ import os import requests -from collections import UserList +from collections import UserDict, UserList from django.db import models +from django.core import serializers from django.core.cache import caches from dotenv import load_dotenv @@ -13,8 +14,7 @@ # # https://stackoverflow.com/questions/9091305/django-models-without-database - -class TransientModelManager(models.Manager): +class ClimateModelManager(models.Manager): api = os.getenv("OPENWEATHER_API") lat = os.getenv("OPENWEATHER_LAT") @@ -25,24 +25,37 @@ class TransientModelManager(models.Manager): cache_timeout = 600 def get_queryset(self): - transient_model_data = CACHE.get(self.cache_key, self.cache_sentinel) - if transient_model_data is self.cache_sentinel: + climate_model_data = CACHE.get(self.cache_key, self.cache_sentinel) + if climate_model_data is self.cache_sentinel: response = requests.get( f"https://api.openweathermap.org/data/2.5/weather?lat={self.lat}&lon={self.lon}&appid={self.api}" ) response.raise_for_status() - transient_model_data = response.json() - CACHE.set(self.cache_key, transient_model_data, self.cache_timeout) - return TransientModelQueryset([ - TransientModel(*data) - for data in transient_model_data - ]) - -class TransientModelQueryset(UserList): + climate_model_data = response.json() + CACHE.set(self.cache_key, climate_model_data, self.cache_timeout) + return ClimateModelQueryset( + [ClimateModel(**climate_model_data)] + ) + +class ClimateModelQueryset(UserList): pass -class TransientModel(models.Model): +class ClimateModel(models.Model): class Meta: managed = False - obj = TransientModelManager.from_queryset(TransientModelQueryset)() + obj = ClimateModelManager.from_queryset(ClimateModelQueryset)() + + coord = models.JSONField() + weather = models.JSONField() + base = models.JSONField() + main = models.JSONField() + visibility = models.JSONField() + wind = models.JSONField() + clouds = models.JSONField() + dt = models.JSONField() + sys = models.JSONField() + timezone = models.JSONField() + id = models.JSONField(primary_key=True) + name = models.JSONField() + cod = models.JSONField() diff --git a/srv/endpoints/climate/serializers.py b/srv/endpoints/climate/serializers.py index c8e9802..6949e5d 100644 --- a/srv/endpoints/climate/serializers.py +++ b/srv/endpoints/climate/serializers.py @@ -1,6 +1,21 @@ from rest_framework import serializers -from climate.models import TransientModel +from climate.models import ClimateModel -class TransientModelSerializer(serializers.ModelSerializer): +class ClimateModelSerializer(serializers.ModelSerializer): class Meta: - model = TransientModel + model = ClimateModel + fields = [ + "coord", + "weather", + "base", + "main", + "visibility", + "wind", + "clouds", + "dt", + "sys", + "timezone", + "id", + "name", + "cod" + ] diff --git a/srv/endpoints/climate/views.py b/srv/endpoints/climate/views.py index 6aecdfa..cdb5f37 100644 --- a/srv/endpoints/climate/views.py +++ b/srv/endpoints/climate/views.py @@ -1,16 +1,20 @@ -from rest_framework.views import APIView +from rest_framework.generics import ListAPIView +from rest_framework.exceptions import APIException from rest_framework.response import Response from django.http import JsonResponse from rest_framework.permissions import AllowAny -from climate.models import TransientModel -from climate.serializers import TransientModelSerializer +from climate.models import ClimateModel +from climate.serializers import ClimateModelSerializer -class ClimateDataViewAll(APIView): +class ClimateDataViewAll(ListAPIView): permission_classes = [AllowAny] - serializer_class = TransientModelSerializer + serializer_class = ClimateModelSerializer - def get(self, request, format=None): - return TransientModel.obj.all() - #return JsonResponse({"!":"."}, status = 200) + def get_queryset(self): + try: + queryset = ClimateModel.obj.all() + return queryset + except Exception as e: + raise APIException(e) from e diff --git a/srv/endpoints/core/settings.py b/srv/endpoints/core/settings.py index f1e81fe..8bb7302 100644 --- a/srv/endpoints/core/settings.py +++ b/srv/endpoints/core/settings.py @@ -45,6 +45,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', + 'rest_framework_swagger', 'core', 'climate', ] diff --git a/srv/pyproject.toml b/srv/pyproject.toml index 3382a42..cf7f15b 100644 --- a/srv/pyproject.toml +++ b/srv/pyproject.toml @@ -11,6 +11,7 @@ dependencies = [ "python-dotenv", "pennant", "django", + "django_rest_swagger", "django_rest_framework" ] From 76d90db5a4e1b2e43f997ac68a1887395d81f1c1 Mon Sep 17 00:00:00 2001 From: dluman Date: Sun, 2 Jun 2024 16:00:58 -0400 Subject: [PATCH 11/21] Clear up serializer --- srv/endpoints/climate/models.py | 4 +++- srv/endpoints/climate/serializers.py | 17 ++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/srv/endpoints/climate/models.py b/srv/endpoints/climate/models.py index 0428a06..8c57355 100644 --- a/srv/endpoints/climate/models.py +++ b/srv/endpoints/climate/models.py @@ -1,6 +1,6 @@ import os import requests -from collections import UserDict, UserList +from collections import UserList from django.db import models from django.core import serializers from django.core.cache import caches @@ -56,6 +56,8 @@ class Meta: dt = models.JSONField() sys = models.JSONField() timezone = models.JSONField() + # Designating the id field as primary key is required, though + # its value is dubious in this case. id = models.JSONField(primary_key=True) name = models.JSONField() cod = models.JSONField() diff --git a/srv/endpoints/climate/serializers.py b/srv/endpoints/climate/serializers.py index 6949e5d..5e42050 100644 --- a/srv/endpoints/climate/serializers.py +++ b/srv/endpoints/climate/serializers.py @@ -2,20 +2,7 @@ from climate.models import ClimateModel class ClimateModelSerializer(serializers.ModelSerializer): + class Meta: model = ClimateModel - fields = [ - "coord", - "weather", - "base", - "main", - "visibility", - "wind", - "clouds", - "dt", - "sys", - "timezone", - "id", - "name", - "cod" - ] + fields = "__all__" From f7337ac9d43912548821a20fe61fce85584487a8 Mon Sep 17 00:00:00 2001 From: dluman Date: Sun, 2 Jun 2024 20:05:11 -0400 Subject: [PATCH 12/21] Fixing one-off API by assuming there's only ever 1-of-1 --- srv/endpoints/climate/models.py | 10 +++++++--- srv/endpoints/climate/serializers.py | 1 + srv/endpoints/climate/views.py | 17 ++++++++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/srv/endpoints/climate/models.py b/srv/endpoints/climate/models.py index 8c57355..10efe31 100644 --- a/srv/endpoints/climate/models.py +++ b/srv/endpoints/climate/models.py @@ -56,8 +56,12 @@ class Meta: dt = models.JSONField() sys = models.JSONField() timezone = models.JSONField() - # Designating the id field as primary key is required, though - # its value is dubious in this case. - id = models.JSONField(primary_key=True) name = models.JSONField() cod = models.JSONField() + + def as_dict(self): + result = {} + fields = self._meta.fields + for field in fields: + result[field.name] = getattr(self, field.name) + return result diff --git a/srv/endpoints/climate/serializers.py b/srv/endpoints/climate/serializers.py index 5e42050..e549f31 100644 --- a/srv/endpoints/climate/serializers.py +++ b/srv/endpoints/climate/serializers.py @@ -6,3 +6,4 @@ class ClimateModelSerializer(serializers.ModelSerializer): class Meta: model = ClimateModel fields = "__all__" + diff --git a/srv/endpoints/climate/views.py b/srv/endpoints/climate/views.py index cdb5f37..e85edbe 100644 --- a/srv/endpoints/climate/views.py +++ b/srv/endpoints/climate/views.py @@ -1,13 +1,20 @@ -from rest_framework.generics import ListAPIView +import json + +from rest_framework.generics import ListAPIView, RetrieveAPIView from rest_framework.exceptions import APIException from rest_framework.response import Response -from django.http import JsonResponse +from django.http import HttpResponse +from django.core import serializers from rest_framework.permissions import AllowAny from climate.models import ClimateModel from climate.serializers import ClimateModelSerializer -class ClimateDataViewAll(ListAPIView): +from rest_framework_swagger.views import get_swagger_view + +schema_view = get_swagger_view("Climate API", url = "climate/docs") + +class ClimateDataViewAll(RetrieveAPIView): permission_classes = [AllowAny] serializer_class = ClimateModelSerializer @@ -18,3 +25,7 @@ def get_queryset(self): return queryset except Exception as e: raise APIException(e) from e + + def get(self, request): + fields = [obj.as_dict() for obj in self.get_queryset()][-1] + return HttpResponse(json.dumps(fields), content_type = "application/json") From db0bd2a38f39d6629b4f53109da52c19b71134d0 Mon Sep 17 00:00:00 2001 From: dluman Date: Sun, 2 Jun 2024 20:06:27 -0400 Subject: [PATCH 13/21] Removing extra semantic step for climate API --- srv/endpoints/core/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/endpoints/core/urls.py b/srv/endpoints/core/urls.py index 1fca3b8..c72cbbe 100644 --- a/srv/endpoints/core/urls.py +++ b/srv/endpoints/core/urls.py @@ -2,5 +2,5 @@ from rest_framework.reverse import reverse urlpatterns = [ - re_path(r'^v1/climate/all', include(('climate.urls','climate'), namespace='v1')) + re_path(r'^v1/climate', include(('climate.urls','climate'), namespace='v1')) ] From d161884b5478ea8203019cd69c31acdefec6b146 Mon Sep 17 00:00:00 2001 From: Danniyb Date: Sun, 2 Jun 2024 22:46:16 -0400 Subject: [PATCH 14/21] adjusting models --- srv/endpoints/api/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/srv/endpoints/api/models.py b/srv/endpoints/api/models.py index 15ddb99..d9905aa 100644 --- a/srv/endpoints/api/models.py +++ b/srv/endpoints/api/models.py @@ -2,9 +2,7 @@ class Item(models.Model): name = models.CharField(max_length=100) - file = models.CharField(max_length=255) - count = models.IntegerField() - consumable = models.BooleanField() + quantity = models.IntegerField() def __str__(self): return self.name From 30efd8f44b01adb9f473fc986ca7e98713952f2d Mon Sep 17 00:00:00 2001 From: Danniyb Date: Sun, 2 Jun 2024 22:46:57 -0400 Subject: [PATCH 15/21] adjusting models --- srv/endpoints/api/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srv/endpoints/api/models.py b/srv/endpoints/api/models.py index d9905aa..15ddb99 100644 --- a/srv/endpoints/api/models.py +++ b/srv/endpoints/api/models.py @@ -2,7 +2,9 @@ class Item(models.Model): name = models.CharField(max_length=100) - quantity = models.IntegerField() + file = models.CharField(max_length=255) + count = models.IntegerField() + consumable = models.BooleanField() def __str__(self): return self.name From 3353060cc585ab7b3f1f7291795ee894ac172232 Mon Sep 17 00:00:00 2001 From: dluman Date: Wed, 5 Jun 2024 15:04:29 -0400 Subject: [PATCH 16/21] Updating with new JSON API pass-through field --- ...0002_climatemodel_delete_transientmodel.py | 42 +++++++++++++++++++ srv/endpoints/climate/models.py | 1 + 2 files changed, 43 insertions(+) create mode 100644 srv/endpoints/climate/migrations/0002_climatemodel_delete_transientmodel.py diff --git a/srv/endpoints/climate/migrations/0002_climatemodel_delete_transientmodel.py b/srv/endpoints/climate/migrations/0002_climatemodel_delete_transientmodel.py new file mode 100644 index 0000000..37efd72 --- /dev/null +++ b/srv/endpoints/climate/migrations/0002_climatemodel_delete_transientmodel.py @@ -0,0 +1,42 @@ +# Generated by Django 5.0.6 on 2024-06-05 19:04 + +import django.db.models.manager +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('climate', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='ClimateModel', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('coord', models.JSONField()), + ('weather', models.JSONField()), + ('base', models.JSONField()), + ('main', models.JSONField()), + ('visibility', models.JSONField()), + ('wind', models.JSONField()), + ('rain', models.JSONField()), + ('clouds', models.JSONField()), + ('dt', models.JSONField()), + ('sys', models.JSONField()), + ('timezone', models.JSONField()), + ('name', models.JSONField()), + ('cod', models.JSONField()), + ], + options={ + 'managed': False, + }, + managers=[ + ('obj', django.db.models.manager.Manager()), + ], + ), + migrations.DeleteModel( + name='TransientModel', + ), + ] diff --git a/srv/endpoints/climate/models.py b/srv/endpoints/climate/models.py index 10efe31..8573e17 100644 --- a/srv/endpoints/climate/models.py +++ b/srv/endpoints/climate/models.py @@ -52,6 +52,7 @@ class Meta: main = models.JSONField() visibility = models.JSONField() wind = models.JSONField() + rain = models.JSONField() clouds = models.JSONField() dt = models.JSONField() sys = models.JSONField() From e4a8be97d76cc9142fc3fda0963084c22ccdf609 Mon Sep 17 00:00:00 2001 From: dluman Date: Wed, 5 Jun 2024 15:11:20 -0400 Subject: [PATCH 17/21] Updating dependencies to include setuptools --- srv/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/srv/pyproject.toml b/srv/pyproject.toml index cf7f15b..ae58fa9 100644 --- a/srv/pyproject.toml +++ b/srv/pyproject.toml @@ -7,6 +7,7 @@ name = "world-codespaces-api-services" version = "0.1.0" dependencies = [ "requests", + "setuptools", "psycopg2-binary", "python-dotenv", "pennant", From 8f491cb83cf310b148dda778519d93679c1c663d Mon Sep 17 00:00:00 2001 From: Aidan Dyga Date: Wed, 5 Jun 2024 15:29:57 -0400 Subject: [PATCH 18/21] attempted to implement swagger for documentation --- srv/endpoints/climate/urls.py | 6 +++--- srv/endpoints/climate/views.py | 4 ---- srv/endpoints/core/urls.py | 6 +++++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/srv/endpoints/climate/urls.py b/srv/endpoints/climate/urls.py index 97562cb..1b0b205 100644 --- a/srv/endpoints/climate/urls.py +++ b/srv/endpoints/climate/urls.py @@ -1,6 +1,6 @@ -from . import views from django.urls import re_path, path +from .views import ClimateDataViewAll -urlpatterns = [ - re_path(r'^$', views.ClimateDataViewAll.as_view(), name = "climate-all") +urlpatterns = [ + path('', ClimateDataViewAll.as_view(), name='climate-all'), ] diff --git a/srv/endpoints/climate/views.py b/srv/endpoints/climate/views.py index e85edbe..4fbeb81 100644 --- a/srv/endpoints/climate/views.py +++ b/srv/endpoints/climate/views.py @@ -10,10 +10,6 @@ from climate.models import ClimateModel from climate.serializers import ClimateModelSerializer -from rest_framework_swagger.views import get_swagger_view - -schema_view = get_swagger_view("Climate API", url = "climate/docs") - class ClimateDataViewAll(RetrieveAPIView): permission_classes = [AllowAny] diff --git a/srv/endpoints/core/urls.py b/srv/endpoints/core/urls.py index c72cbbe..99a3681 100644 --- a/srv/endpoints/core/urls.py +++ b/srv/endpoints/core/urls.py @@ -1,6 +1,10 @@ from django.urls import path, re_path, include from rest_framework.reverse import reverse +from rest_framework_swagger.views import get_swagger_view + +schema_view = get_swagger_view(title='Climate API') urlpatterns = [ - re_path(r'^v1/climate', include(('climate.urls','climate'), namespace='v1')) + path('v1/climate/', include('climate.urls')), + path('v1/climate/docs/', schema_view) ] From 52285855771d9b6279ecaf8e6f59023662d23267 Mon Sep 17 00:00:00 2001 From: dluman Date: Wed, 5 Jun 2024 15:48:43 -0400 Subject: [PATCH 19/21] First use of Swagger UI; how can we customize? --- srv/endpoints/core/settings.py | 2 +- srv/endpoints/core/urls.py | 20 +++++++++++++++++--- srv/pyproject.toml | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/srv/endpoints/core/settings.py b/srv/endpoints/core/settings.py index 8bb7302..7377a15 100644 --- a/srv/endpoints/core/settings.py +++ b/srv/endpoints/core/settings.py @@ -45,7 +45,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', - 'rest_framework_swagger', + 'drf_yasg', 'core', 'climate', ] diff --git a/srv/endpoints/core/urls.py b/srv/endpoints/core/urls.py index 99a3681..b60e0b6 100644 --- a/srv/endpoints/core/urls.py +++ b/srv/endpoints/core/urls.py @@ -1,10 +1,24 @@ from django.urls import path, re_path, include from rest_framework.reverse import reverse -from rest_framework_swagger.views import get_swagger_view +from rest_framework import permissions +from drf_yasg.views import get_schema_view +from drf_yasg import openapi -schema_view = get_swagger_view(title='Climate API') + +schema_view = get_schema_view( + openapi.Info( + title="Climate API", + default_version='v1', + description="Pass-through for location-specific OpenWeatherAPI data.", + terms_of_service="", + contact=openapi.Contact(email=""), + license=openapi.License(name=""), + ), + public=True, + permission_classes=(permissions.AllowAny,), +) urlpatterns = [ path('v1/climate/', include('climate.urls')), - path('v1/climate/docs/', schema_view) + path('v1/climate/docs/', schema_view.with_ui('swagger', cache_timeout = 0),name = 'Climate API documentation.') ] diff --git a/srv/pyproject.toml b/srv/pyproject.toml index ae58fa9..30b53d7 100644 --- a/srv/pyproject.toml +++ b/srv/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "python-dotenv", "pennant", "django", - "django_rest_swagger", + "drf-yasg", "django_rest_framework" ] From b64d6807d9cc64db6879ec428f38b88c8f863b31 Mon Sep 17 00:00:00 2001 From: Aidan Dyga Date: Thu, 6 Jun 2024 17:26:54 -0400 Subject: [PATCH 20/21] added static and template folders for swagger ui customization --- .../climate/static/climate/custom-swagger-ui.css | 15 +++++++++++++++ .../climate/templates/climate/swagger-ui.html | 6 ++++++ srv/endpoints/core/urls.py | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 srv/endpoints/climate/static/climate/custom-swagger-ui.css create mode 100644 srv/endpoints/climate/templates/climate/swagger-ui.html diff --git a/srv/endpoints/climate/static/climate/custom-swagger-ui.css b/srv/endpoints/climate/static/climate/custom-swagger-ui.css new file mode 100644 index 0000000..e1542d0 --- /dev/null +++ b/srv/endpoints/climate/static/climate/custom-swagger-ui.css @@ -0,0 +1,15 @@ +/* Swagger Container */ +.swagger-ui { + background-color: #27292E; + color: #FFFFFF; +} + +/* Swagger Title */ +.swagger-ui .topbar .topbar-wrapper .info .title { + color: #E0B025; /* yellow */ +} + +/* Swagger Description */ +.swagger-ui .topbar .topbar-wrapper .info .description { + color: #E49A25; /* orange */ +} \ No newline at end of file diff --git a/srv/endpoints/climate/templates/climate/swagger-ui.html b/srv/endpoints/climate/templates/climate/swagger-ui.html new file mode 100644 index 0000000..e099ff6 --- /dev/null +++ b/srv/endpoints/climate/templates/climate/swagger-ui.html @@ -0,0 +1,6 @@ +{% extends 'drf-yasg/swagger-ui.html' %} + +{% block styles %} + {{ block.super }} + +{% endblock %} \ No newline at end of file diff --git a/srv/endpoints/core/urls.py b/srv/endpoints/core/urls.py index b60e0b6..69c629e 100644 --- a/srv/endpoints/core/urls.py +++ b/srv/endpoints/core/urls.py @@ -19,6 +19,6 @@ ) urlpatterns = [ - path('v1/climate/', include('climate.urls')), - path('v1/climate/docs/', schema_view.with_ui('swagger', cache_timeout = 0),name = 'Climate API documentation.') + path('v1/climate/', include('climate.urls')), + path('v1/climate/docs/', schema_view.with_ui('swagger', cache_timeout=0), name = 'Climate API documentation.') ] From 1f8e1ddc92ac80a3eb107a256c8c6426078e032e Mon Sep 17 00:00:00 2001 From: Aidan Dyga Date: Sat, 8 Jun 2024 10:06:03 -0400 Subject: [PATCH 21/21] added swagger settings and attempted to implement colors --- .../static/climate/custom-swagger-ui.css | 15 ---- .../climate/swagger-ui/favicon-16x16.png | Bin 0 -> 665 bytes .../climate/swagger-ui/favicon-32x32.png | Bin 0 -> 628 bytes .../static/climate/swagger-ui/index.css | 16 ++++ .../static/climate/swagger-ui/index.html | 19 +++++ .../climate/swagger-ui/oauth2-redirect.html | 79 ++++++++++++++++++ .../climate/swagger-ui/swagger-initializer.js | 20 +++++ .../climate/swagger-ui/swagger-ui-bundle.js | 2 + .../swagger-ui/swagger-ui-bundle.js.map | 1 + .../swagger-ui/swagger-ui-es-bundle-core.js | 3 + .../swagger-ui-es-bundle-core.js.map | 1 + .../swagger-ui/swagger-ui-es-bundle.js | 2 + .../swagger-ui/swagger-ui-es-bundle.js.map | 1 + .../swagger-ui-standalone-preset.js | 2 + .../swagger-ui-standalone-preset.js.map | 1 + .../static/climate/swagger-ui/swagger-ui.css | 19 +++++ .../climate/swagger-ui/swagger-ui.css.map | 1 + .../static/climate/swagger-ui/swagger-ui.js | 2 + .../climate/swagger-ui/swagger-ui.js.map | 1 + .../climate/templates/climate/swagger-ui.html | 6 -- srv/endpoints/climate/utils.py | 7 ++ srv/endpoints/core/settings.py | 55 +++++++++++- srv/endpoints/core/urls.py | 10 ++- 23 files changed, 238 insertions(+), 25 deletions(-) delete mode 100644 srv/endpoints/climate/static/climate/custom-swagger-ui.css create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/favicon-16x16.png create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/favicon-32x32.png create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/index.css create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/index.html create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/oauth2-redirect.html create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-initializer.js create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-bundle.js create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-bundle.js.map create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-es-bundle-core.js create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-es-bundle-core.js.map create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-es-bundle.js create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-es-bundle.js.map create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-standalone-preset.js create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-standalone-preset.js.map create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui.css create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui.css.map create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui.js create mode 100644 srv/endpoints/climate/static/climate/swagger-ui/swagger-ui.js.map delete mode 100644 srv/endpoints/climate/templates/climate/swagger-ui.html create mode 100644 srv/endpoints/climate/utils.py diff --git a/srv/endpoints/climate/static/climate/custom-swagger-ui.css b/srv/endpoints/climate/static/climate/custom-swagger-ui.css deleted file mode 100644 index e1542d0..0000000 --- a/srv/endpoints/climate/static/climate/custom-swagger-ui.css +++ /dev/null @@ -1,15 +0,0 @@ -/* Swagger Container */ -.swagger-ui { - background-color: #27292E; - color: #FFFFFF; -} - -/* Swagger Title */ -.swagger-ui .topbar .topbar-wrapper .info .title { - color: #E0B025; /* yellow */ -} - -/* Swagger Description */ -.swagger-ui .topbar .topbar-wrapper .info .description { - color: #E49A25; /* orange */ -} \ No newline at end of file diff --git a/srv/endpoints/climate/static/climate/swagger-ui/favicon-16x16.png b/srv/endpoints/climate/static/climate/swagger-ui/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..8b194e617af1c135e6b37939591d24ac3a5efa18 GIT binary patch literal 665 zcmV;K0%rY*P)}JKSduyL>)s!A4EhTMMEM%Q;aL6%l#xiZiF>S;#Y{N2Zz%pvTGHJduXuC6Lx-)0EGfRy*N{Tv4i8@4oJ41gw zKzThrcRe|7J~(YYIBq{SYCkn-KQm=N8$CrEK1CcqMI1dv9z#VRL_{D)L|`QmF8}}l zJ9JV`Q}p!p_4f7m_U`WQ@apR4;o;!mnU<7}iG_qr zF(e)x9~BG-3IzcG2M4an0002kNkl41`ZiN1i62V%{PM@Ry|IS_+Yc7{bb`MM~xm(7p4|kMHP&!VGuDW4kFixat zXw43VmgwEvB$hXt_u=vZ>+v4i7E}n~eG6;n4Z=zF1n?T*yg<;W6kOfxpC6nao>VR% z?fpr=asSJ&`L*wu^rLJ5Peq*PB0;alL#XazZCBxJLd&giTfw@!hW167F^`7kobi;( ze<<>qNlP|xy7S1zl@lZNIBR7#o9ybJsptO#%}P0hz~sBp00000NkvXXu0mjfUsDF? literal 0 HcmV?d00001 diff --git a/srv/endpoints/climate/static/climate/swagger-ui/favicon-32x32.png b/srv/endpoints/climate/static/climate/swagger-ui/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..249737fe44558e679f0b67134e274461d988fa98 GIT binary patch literal 628 zcmV-)0*n2LP)Ma*GM0}OV<074bNCP7P7GVd{iMr*I6y~TMLss@FjvgL~HxU z%Vvj33AwpD(Z4*$Mfx=HaU16axM zt2xG_rloN<$iy9j9I5 + + + + + Swagger UI + + + + + + + +
+ + + + + diff --git a/srv/endpoints/climate/static/climate/swagger-ui/oauth2-redirect.html b/srv/endpoints/climate/static/climate/swagger-ui/oauth2-redirect.html new file mode 100644 index 0000000..5640917 --- /dev/null +++ b/srv/endpoints/climate/static/climate/swagger-ui/oauth2-redirect.html @@ -0,0 +1,79 @@ + + + + Swagger UI: OAuth2 Redirect + + + + + diff --git a/srv/endpoints/climate/static/climate/swagger-ui/swagger-initializer.js b/srv/endpoints/climate/static/climate/swagger-ui/swagger-initializer.js new file mode 100644 index 0000000..8ea0ea3 --- /dev/null +++ b/srv/endpoints/climate/static/climate/swagger-ui/swagger-initializer.js @@ -0,0 +1,20 @@ +window.onload = function() { + // + + // the following lines will be replaced by docker/configurator, when it runs in a docker-container + window.ui = SwaggerUIBundle({ + url: "https://petstore.swagger.io/v2/swagger.json", + dom_id: '#swagger-ui', + deepLinking: true, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" + }); + + // +}; diff --git a/srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-bundle.js b/srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-bundle.js new file mode 100644 index 0000000..551e172 --- /dev/null +++ b/srv/endpoints/climate/static/climate/swagger-ui/swagger-ui-bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function webpackUniversalModuleDefinition(o,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.SwaggerUIBundle=s():o.SwaggerUIBundle=s()}(this,(()=>(()=>{var o,s,i={69119:(o,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BLANK_URL=s.relativeFirstCharacters=s.whitespaceEscapeCharsRegex=s.urlSchemeRegex=s.ctrlCharactersRegex=s.htmlCtrlEntityRegex=s.htmlEntitiesRegex=s.invalidProtocolRegex=void 0,s.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,s.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,s.htmlCtrlEntityRegex=/&(newline|tab);/gi,s.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s.urlSchemeRegex=/^.+(:|:)/gim,s.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,s.relativeFirstCharacters=[".","/"],s.BLANK_URL="about:blank"},16750:(o,s,i)=>{"use strict";s.J=void 0;var u=i(69119);function decodeURI(o){try{return decodeURIComponent(o)}catch(s){return o}}s.J=function sanitizeUrl(o){if(!o)return u.BLANK_URL;var s,i,_=decodeURI(o);do{s=(_=decodeURI(_=(i=_,i.replace(u.ctrlCharactersRegex,"").replace(u.htmlEntitiesRegex,(function(o,s){return String.fromCharCode(s)}))).replace(u.htmlCtrlEntityRegex,"").replace(u.ctrlCharactersRegex,"").replace(u.whitespaceEscapeCharsRegex,"").trim())).match(u.ctrlCharactersRegex)||_.match(u.htmlEntitiesRegex)||_.match(u.htmlCtrlEntityRegex)||_.match(u.whitespaceEscapeCharsRegex)}while(s&&s.length>0);var w=_;if(!w)return u.BLANK_URL;if(function isRelativeUrlWithoutProtocol(o){return u.relativeFirstCharacters.indexOf(o[0])>-1}(w))return w;var x=w.match(u.urlSchemeRegex);if(!x)return w;var C=x[0];return u.invalidProtocolRegex.test(C)?u.BLANK_URL:w}},67526:(o,s)=>{"use strict";s.byteLength=function byteLength(o){var s=getLens(o),i=s[0],u=s[1];return 3*(i+u)/4-u},s.toByteArray=function toByteArray(o){var s,i,w=getLens(o),x=w[0],C=w[1],j=new _(function _byteLength(o,s,i){return 3*(s+i)/4-i}(0,x,C)),L=0,B=C>0?x-4:x;for(i=0;i>16&255,j[L++]=s>>8&255,j[L++]=255&s;2===C&&(s=u[o.charCodeAt(i)]<<2|u[o.charCodeAt(i+1)]>>4,j[L++]=255&s);1===C&&(s=u[o.charCodeAt(i)]<<10|u[o.charCodeAt(i+1)]<<4|u[o.charCodeAt(i+2)]>>2,j[L++]=s>>8&255,j[L++]=255&s);return j},s.fromByteArray=function fromByteArray(o){for(var s,u=o.length,_=u%3,w=[],x=16383,C=0,j=u-_;Cj?j:C+x));1===_?(s=o[u-1],w.push(i[s>>2]+i[s<<4&63]+"==")):2===_&&(s=(o[u-2]<<8)+o[u-1],w.push(i[s>>10]+i[s>>4&63]+i[s<<2&63]+"="));return w.join("")};for(var i=[],u=[],_="undefined"!=typeof Uint8Array?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0;x<64;++x)i[x]=w[x],u[w.charCodeAt(x)]=x;function getLens(o){var s=o.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=o.indexOf("=");return-1===i&&(i=s),[i,i===s?0:4-i%4]}function encodeChunk(o,s,u){for(var _,w,x=[],C=s;C>18&63]+i[w>>12&63]+i[w>>6&63]+i[63&w]);return x.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},48287:(o,s,i)=>{"use strict";const u=i(67526),_=i(251),w="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;s.Buffer=Buffer,s.SlowBuffer=function SlowBuffer(o){+o!=o&&(o=0);return Buffer.alloc(+o)},s.INSPECT_MAX_BYTES=50;const x=2147483647;function createBuffer(o){if(o>x)throw new RangeError('The value "'+o+'" is invalid for option "size"');const s=new Uint8Array(o);return Object.setPrototypeOf(s,Buffer.prototype),s}function Buffer(o,s,i){if("number"==typeof o){if("string"==typeof s)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(o)}return from(o,s,i)}function from(o,s,i){if("string"==typeof o)return function fromString(o,s){"string"==typeof s&&""!==s||(s="utf8");if(!Buffer.isEncoding(s))throw new TypeError("Unknown encoding: "+s);const i=0|byteLength(o,s);let u=createBuffer(i);const _=u.write(o,s);_!==i&&(u=u.slice(0,_));return u}(o,s);if(ArrayBuffer.isView(o))return function fromArrayView(o){if(isInstance(o,Uint8Array)){const s=new Uint8Array(o);return fromArrayBuffer(s.buffer,s.byteOffset,s.byteLength)}return fromArrayLike(o)}(o);if(null==o)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(isInstance(o,ArrayBuffer)||o&&isInstance(o.buffer,ArrayBuffer))return fromArrayBuffer(o,s,i);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(o,SharedArrayBuffer)||o&&isInstance(o.buffer,SharedArrayBuffer)))return fromArrayBuffer(o,s,i);if("number"==typeof o)throw new TypeError('The "value" argument must not be of type number. Received type number');const u=o.valueOf&&o.valueOf();if(null!=u&&u!==o)return Buffer.from(u,s,i);const _=function fromObject(o){if(Buffer.isBuffer(o)){const s=0|checked(o.length),i=createBuffer(s);return 0===i.length||o.copy(i,0,0,s),i}if(void 0!==o.length)return"number"!=typeof o.length||numberIsNaN(o.length)?createBuffer(0):fromArrayLike(o);if("Buffer"===o.type&&Array.isArray(o.data))return fromArrayLike(o.data)}(o);if(_)return _;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof o[Symbol.toPrimitive])return Buffer.from(o[Symbol.toPrimitive]("string"),s,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}function assertSize(o){if("number"!=typeof o)throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function allocUnsafe(o){return assertSize(o),createBuffer(o<0?0:0|checked(o))}function fromArrayLike(o){const s=o.length<0?0:0|checked(o.length),i=createBuffer(s);for(let u=0;u=x)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+x.toString(16)+" bytes");return 0|o}function byteLength(o,s){if(Buffer.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||isInstance(o,ArrayBuffer))return o.byteLength;if("string"!=typeof o)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const i=o.length,u=arguments.length>2&&!0===arguments[2];if(!u&&0===i)return 0;let _=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return utf8ToBytes(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return base64ToBytes(o).length;default:if(_)return u?-1:utf8ToBytes(o).length;s=(""+s).toLowerCase(),_=!0}}function slowToString(o,s,i){let u=!1;if((void 0===s||s<0)&&(s=0),s>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(s>>>=0))return"";for(o||(o="utf8");;)switch(o){case"hex":return hexSlice(this,s,i);case"utf8":case"utf-8":return utf8Slice(this,s,i);case"ascii":return asciiSlice(this,s,i);case"latin1":case"binary":return latin1Slice(this,s,i);case"base64":return base64Slice(this,s,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,s,i);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),u=!0}}function swap(o,s,i){const u=o[s];o[s]=o[i],o[i]=u}function bidirectionalIndexOf(o,s,i,u,_){if(0===o.length)return-1;if("string"==typeof i?(u=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),numberIsNaN(i=+i)&&(i=_?0:o.length-1),i<0&&(i=o.length+i),i>=o.length){if(_)return-1;i=o.length-1}else if(i<0){if(!_)return-1;i=0}if("string"==typeof s&&(s=Buffer.from(s,u)),Buffer.isBuffer(s))return 0===s.length?-1:arrayIndexOf(o,s,i,u,_);if("number"==typeof s)return s&=255,"function"==typeof Uint8Array.prototype.indexOf?_?Uint8Array.prototype.indexOf.call(o,s,i):Uint8Array.prototype.lastIndexOf.call(o,s,i):arrayIndexOf(o,[s],i,u,_);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(o,s,i,u,_){let w,x=1,C=o.length,j=s.length;if(void 0!==u&&("ucs2"===(u=String(u).toLowerCase())||"ucs-2"===u||"utf16le"===u||"utf-16le"===u)){if(o.length<2||s.length<2)return-1;x=2,C/=2,j/=2,i/=2}function read(o,s){return 1===x?o[s]:o.readUInt16BE(s*x)}if(_){let u=-1;for(w=i;wC&&(i=C-j),w=i;w>=0;w--){let i=!0;for(let u=0;u_&&(u=_):u=_;const w=s.length;let x;for(u>w/2&&(u=w/2),x=0;x>8,_=i%256,w.push(_),w.push(u);return w}(s,o.length-i),o,i,u)}function base64Slice(o,s,i){return 0===s&&i===o.length?u.fromByteArray(o):u.fromByteArray(o.slice(s,i))}function utf8Slice(o,s,i){i=Math.min(o.length,i);const u=[];let _=s;for(;_239?4:s>223?3:s>191?2:1;if(_+x<=i){let i,u,C,j;switch(x){case 1:s<128&&(w=s);break;case 2:i=o[_+1],128==(192&i)&&(j=(31&s)<<6|63&i,j>127&&(w=j));break;case 3:i=o[_+1],u=o[_+2],128==(192&i)&&128==(192&u)&&(j=(15&s)<<12|(63&i)<<6|63&u,j>2047&&(j<55296||j>57343)&&(w=j));break;case 4:i=o[_+1],u=o[_+2],C=o[_+3],128==(192&i)&&128==(192&u)&&128==(192&C)&&(j=(15&s)<<18|(63&i)<<12|(63&u)<<6|63&C,j>65535&&j<1114112&&(w=j))}}null===w?(w=65533,x=1):w>65535&&(w-=65536,u.push(w>>>10&1023|55296),w=56320|1023&w),u.push(w),_+=x}return function decodeCodePointsArray(o){const s=o.length;if(s<=C)return String.fromCharCode.apply(String,o);let i="",u=0;for(;uu.length?(Buffer.isBuffer(s)||(s=Buffer.from(s)),s.copy(u,_)):Uint8Array.prototype.set.call(u,s,_);else{if(!Buffer.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(u,_)}_+=s.length}return u},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const o=this.length;if(o%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;si&&(o+=" ... "),""},w&&(Buffer.prototype[w]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(o,s,i,u,_){if(isInstance(o,Uint8Array)&&(o=Buffer.from(o,o.offset,o.byteLength)),!Buffer.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(void 0===s&&(s=0),void 0===i&&(i=o?o.length:0),void 0===u&&(u=0),void 0===_&&(_=this.length),s<0||i>o.length||u<0||_>this.length)throw new RangeError("out of range index");if(u>=_&&s>=i)return 0;if(u>=_)return-1;if(s>=i)return 1;if(this===o)return 0;let w=(_>>>=0)-(u>>>=0),x=(i>>>=0)-(s>>>=0);const C=Math.min(w,x),j=this.slice(u,_),L=o.slice(s,i);for(let o=0;o>>=0,isFinite(i)?(i>>>=0,void 0===u&&(u="utf8")):(u=i,i=void 0)}const _=this.length-s;if((void 0===i||i>_)&&(i=_),o.length>0&&(i<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");u||(u="utf8");let w=!1;for(;;)switch(u){case"hex":return hexWrite(this,o,s,i);case"utf8":case"utf-8":return utf8Write(this,o,s,i);case"ascii":case"latin1":case"binary":return asciiWrite(this,o,s,i);case"base64":return base64Write(this,o,s,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,o,s,i);default:if(w)throw new TypeError("Unknown encoding: "+u);u=(""+u).toLowerCase(),w=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function asciiSlice(o,s,i){let u="";i=Math.min(o.length,i);for(let _=s;_u)&&(i=u);let _="";for(let u=s;ui)throw new RangeError("Trying to access beyond buffer length")}function checkInt(o,s,i,u,_,w){if(!Buffer.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>_||so.length)throw new RangeError("Index out of range")}function wrtBigUInt64LE(o,s,i,u,_){checkIntBI(s,u,_,o,i,7);let w=Number(s&BigInt(4294967295));o[i++]=w,w>>=8,o[i++]=w,w>>=8,o[i++]=w,w>>=8,o[i++]=w;let x=Number(s>>BigInt(32)&BigInt(4294967295));return o[i++]=x,x>>=8,o[i++]=x,x>>=8,o[i++]=x,x>>=8,o[i++]=x,i}function wrtBigUInt64BE(o,s,i,u,_){checkIntBI(s,u,_,o,i,7);let w=Number(s&BigInt(4294967295));o[i+7]=w,w>>=8,o[i+6]=w,w>>=8,o[i+5]=w,w>>=8,o[i+4]=w;let x=Number(s>>BigInt(32)&BigInt(4294967295));return o[i+3]=x,x>>=8,o[i+2]=x,x>>=8,o[i+1]=x,x>>=8,o[i]=x,i+8}function checkIEEE754(o,s,i,u,_,w){if(i+u>o.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function writeFloat(o,s,i,u,w){return s=+s,i>>>=0,w||checkIEEE754(o,0,i,4),_.write(o,s,i,u,23,4),i+4}function writeDouble(o,s,i,u,w){return s=+s,i>>>=0,w||checkIEEE754(o,0,i,8),_.write(o,s,i,u,52,8),i+8}Buffer.prototype.slice=function slice(o,s){const i=this.length;(o=~~o)<0?(o+=i)<0&&(o=0):o>i&&(o=i),(s=void 0===s?i:~~s)<0?(s+=i)<0&&(s=0):s>i&&(s=i),s>>=0,s>>>=0,i||checkOffset(o,s,this.length);let u=this[o],_=1,w=0;for(;++w>>=0,s>>>=0,i||checkOffset(o,s,this.length);let u=this[o+--s],_=1;for(;s>0&&(_*=256);)u+=this[o+--s]*_;return u},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(o,s){return o>>>=0,s||checkOffset(o,1,this.length),this[o]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(o,s){return o>>>=0,s||checkOffset(o,2,this.length),this[o]|this[o+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(o,s){return o>>>=0,s||checkOffset(o,2,this.length),this[o]<<8|this[o+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(o,s){return o>>>=0,s||checkOffset(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+16777216*this[o+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(o,s){return o>>>=0,s||checkOffset(o,4,this.length),16777216*this[o]+(this[o+1]<<16|this[o+2]<<8|this[o+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(o){validateNumber(o>>>=0,"offset");const s=this[o],i=this[o+7];void 0!==s&&void 0!==i||boundsError(o,this.length-8);const u=s+256*this[++o]+65536*this[++o]+this[++o]*2**24,_=this[++o]+256*this[++o]+65536*this[++o]+i*2**24;return BigInt(u)+(BigInt(_)<>>=0,"offset");const s=this[o],i=this[o+7];void 0!==s&&void 0!==i||boundsError(o,this.length-8);const u=s*2**24+65536*this[++o]+256*this[++o]+this[++o],_=this[++o]*2**24+65536*this[++o]+256*this[++o]+i;return(BigInt(u)<>>=0,s>>>=0,i||checkOffset(o,s,this.length);let u=this[o],_=1,w=0;for(;++w=_&&(u-=Math.pow(2,8*s)),u},Buffer.prototype.readIntBE=function readIntBE(o,s,i){o>>>=0,s>>>=0,i||checkOffset(o,s,this.length);let u=s,_=1,w=this[o+--u];for(;u>0&&(_*=256);)w+=this[o+--u]*_;return _*=128,w>=_&&(w-=Math.pow(2,8*s)),w},Buffer.prototype.readInt8=function readInt8(o,s){return o>>>=0,s||checkOffset(o,1,this.length),128&this[o]?-1*(255-this[o]+1):this[o]},Buffer.prototype.readInt16LE=function readInt16LE(o,s){o>>>=0,s||checkOffset(o,2,this.length);const i=this[o]|this[o+1]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt16BE=function readInt16BE(o,s){o>>>=0,s||checkOffset(o,2,this.length);const i=this[o+1]|this[o]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt32LE=function readInt32LE(o,s){return o>>>=0,s||checkOffset(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(o,s){return o>>>=0,s||checkOffset(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(o){validateNumber(o>>>=0,"offset");const s=this[o],i=this[o+7];void 0!==s&&void 0!==i||boundsError(o,this.length-8);const u=this[o+4]+256*this[o+5]+65536*this[o+6]+(i<<24);return(BigInt(u)<>>=0,"offset");const s=this[o],i=this[o+7];void 0!==s&&void 0!==i||boundsError(o,this.length-8);const u=(s<<24)+65536*this[++o]+256*this[++o]+this[++o];return(BigInt(u)<>>=0,s||checkOffset(o,4,this.length),_.read(this,o,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(o,s){return o>>>=0,s||checkOffset(o,4,this.length),_.read(this,o,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(o,s){return o>>>=0,s||checkOffset(o,8,this.length),_.read(this,o,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(o,s){return o>>>=0,s||checkOffset(o,8,this.length),_.read(this,o,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(o,s,i,u){if(o=+o,s>>>=0,i>>>=0,!u){checkInt(this,o,s,i,Math.pow(2,8*i)-1,0)}let _=1,w=0;for(this[s]=255&o;++w>>=0,i>>>=0,!u){checkInt(this,o,s,i,Math.pow(2,8*i)-1,0)}let _=i-1,w=1;for(this[s+_]=255&o;--_>=0&&(w*=256);)this[s+_]=o/w&255;return s+i},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,1,255,0),this[s]=255&o,s+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,2,65535,0),this[s]=255&o,this[s+1]=o>>>8,s+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,2,65535,0),this[s]=o>>>8,this[s+1]=255&o,s+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,4,4294967295,0),this[s+3]=o>>>24,this[s+2]=o>>>16,this[s+1]=o>>>8,this[s]=255&o,s+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,4,4294967295,0),this[s]=o>>>24,this[s+1]=o>>>16,this[s+2]=o>>>8,this[s+3]=255&o,s+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(o,s=0){return wrtBigUInt64LE(this,o,s,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(o,s=0){return wrtBigUInt64BE(this,o,s,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeIntLE=function writeIntLE(o,s,i,u){if(o=+o,s>>>=0,!u){const u=Math.pow(2,8*i-1);checkInt(this,o,s,i,u-1,-u)}let _=0,w=1,x=0;for(this[s]=255&o;++_>>=0,!u){const u=Math.pow(2,8*i-1);checkInt(this,o,s,i,u-1,-u)}let _=i-1,w=1,x=0;for(this[s+_]=255&o;--_>=0&&(w*=256);)o<0&&0===x&&0!==this[s+_+1]&&(x=1),this[s+_]=(o/w|0)-x&255;return s+i},Buffer.prototype.writeInt8=function writeInt8(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,1,127,-128),o<0&&(o=255+o+1),this[s]=255&o,s+1},Buffer.prototype.writeInt16LE=function writeInt16LE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,2,32767,-32768),this[s]=255&o,this[s+1]=o>>>8,s+2},Buffer.prototype.writeInt16BE=function writeInt16BE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,2,32767,-32768),this[s]=o>>>8,this[s+1]=255&o,s+2},Buffer.prototype.writeInt32LE=function writeInt32LE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,4,2147483647,-2147483648),this[s]=255&o,this[s+1]=o>>>8,this[s+2]=o>>>16,this[s+3]=o>>>24,s+4},Buffer.prototype.writeInt32BE=function writeInt32BE(o,s,i){return o=+o,s>>>=0,i||checkInt(this,o,s,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[s]=o>>>24,this[s+1]=o>>>16,this[s+2]=o>>>8,this[s+3]=255&o,s+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(o,s=0){return wrtBigUInt64LE(this,o,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(o,s=0){return wrtBigUInt64BE(this,o,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(o,s,i){return writeFloat(this,o,s,!0,i)},Buffer.prototype.writeFloatBE=function writeFloatBE(o,s,i){return writeFloat(this,o,s,!1,i)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(o,s,i){return writeDouble(this,o,s,!0,i)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(o,s,i){return writeDouble(this,o,s,!1,i)},Buffer.prototype.copy=function copy(o,s,i,u){if(!Buffer.isBuffer(o))throw new TypeError("argument should be a Buffer");if(i||(i=0),u||0===u||(u=this.length),s>=o.length&&(s=o.length),s||(s=0),u>0&&u=this.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("sourceEnd out of bounds");u>this.length&&(u=this.length),o.length-s>>=0,i=void 0===i?this.length:i>>>0,o||(o=0),"number"==typeof o)for(_=s;_=u+4;i-=3)s=`_${o.slice(i-3,i)}${s}`;return`${o.slice(0,i)}${s}`}function checkIntBI(o,s,i,u,_,w){if(o>i||o3?0===s||s===BigInt(0)?`>= 0${u} and < 2${u} ** ${8*(w+1)}${u}`:`>= -(2${u} ** ${8*(w+1)-1}${u}) and < 2 ** ${8*(w+1)-1}${u}`:`>= ${s}${u} and <= ${i}${u}`,new j.ERR_OUT_OF_RANGE("value",_,o)}!function checkBounds(o,s,i){validateNumber(s,"offset"),void 0!==o[s]&&void 0!==o[s+i]||boundsError(s,o.length-(i+1))}(u,_,w)}function validateNumber(o,s){if("number"!=typeof o)throw new j.ERR_INVALID_ARG_TYPE(s,"number",o)}function boundsError(o,s,i){if(Math.floor(o)!==o)throw validateNumber(o,i),new j.ERR_OUT_OF_RANGE(i||"offset","an integer",o);if(s<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${s}`,o)}E("ERR_BUFFER_OUT_OF_BOUNDS",(function(o){return o?`${o} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),E("ERR_INVALID_ARG_TYPE",(function(o,s){return`The "${o}" argument must be of type number. Received type ${typeof s}`}),TypeError),E("ERR_OUT_OF_RANGE",(function(o,s,i){let u=`The value of "${o}" is out of range.`,_=i;return Number.isInteger(i)&&Math.abs(i)>2**32?_=addNumericalSeparator(String(i)):"bigint"==typeof i&&(_=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(_=addNumericalSeparator(_)),_+="n"),u+=` It must be ${s}. Received ${_}`,u}),RangeError);const L=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(o,s){let i;s=s||1/0;const u=o.length;let _=null;const w=[];for(let x=0;x55295&&i<57344){if(!_){if(i>56319){(s-=3)>-1&&w.push(239,191,189);continue}if(x+1===u){(s-=3)>-1&&w.push(239,191,189);continue}_=i;continue}if(i<56320){(s-=3)>-1&&w.push(239,191,189),_=i;continue}i=65536+(_-55296<<10|i-56320)}else _&&(s-=3)>-1&&w.push(239,191,189);if(_=null,i<128){if((s-=1)<0)break;w.push(i)}else if(i<2048){if((s-=2)<0)break;w.push(i>>6|192,63&i|128)}else if(i<65536){if((s-=3)<0)break;w.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((s-=4)<0)break;w.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return w}function base64ToBytes(o){return u.toByteArray(function base64clean(o){if((o=(o=o.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;o.length%4!=0;)o+="=";return o}(o))}function blitBuffer(o,s,i,u){let _;for(_=0;_=s.length||_>=o.length);++_)s[_+i]=o[_];return _}function isInstance(o,s){return o instanceof s||null!=o&&null!=o.constructor&&null!=o.constructor.name&&o.constructor.name===s.name}function numberIsNaN(o){return o!=o}const B=function(){const o="0123456789abcdef",s=new Array(256);for(let i=0;i<16;++i){const u=16*i;for(let _=0;_<16;++_)s[u+_]=o[i]+o[_]}return s}();function defineBigIntMethod(o){return"undefined"==typeof BigInt?BufferBigIntNotDefined:o}function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}},38075:(o,s,i)=>{"use strict";var u=i(70453),_=i(10487),w=_(u("String.prototype.indexOf"));o.exports=function callBoundIntrinsic(o,s){var i=u(o,!!s);return"function"==typeof i&&w(o,".prototype.")>-1?_(i):i}},10487:(o,s,i)=>{"use strict";var u=i(66743),_=i(70453),w=i(96897),x=i(69675),C=_("%Function.prototype.apply%"),j=_("%Function.prototype.call%"),L=_("%Reflect.apply%",!0)||u.call(j,C),B=i(30655),$=_("%Math.max%");o.exports=function callBind(o){if("function"!=typeof o)throw new x("a function is required");var s=L(u,j,arguments);return w(s,1+$(0,o.length-(arguments.length-1)),!0)};var V=function applyBind(){return L(u,C,arguments)};B?B(o.exports,"apply",{value:V}):o.exports.apply=V},57427:(o,s)=>{"use strict";s.parse=function parse(o,s){if("string"!=typeof o)throw new TypeError("argument str must be a string");var i={},u=(s||{}).decode||decode,_=0;for(;_{"use strict";var u=i(16426),_={"text/plain":"Text","text/html":"Url",default:"Text"};o.exports=function copy(o,s){var i,w,x,C,j,L,B=!1;s||(s={}),i=s.debug||!1;try{if(x=u(),C=document.createRange(),j=document.getSelection(),(L=document.createElement("span")).textContent=o,L.ariaHidden="true",L.style.all="unset",L.style.position="fixed",L.style.top=0,L.style.clip="rect(0, 0, 0, 0)",L.style.whiteSpace="pre",L.style.webkitUserSelect="text",L.style.MozUserSelect="text",L.style.msUserSelect="text",L.style.userSelect="text",L.addEventListener("copy",(function(u){if(u.stopPropagation(),s.format)if(u.preventDefault(),void 0===u.clipboardData){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var w=_[s.format]||_.default;window.clipboardData.setData(w,o)}else u.clipboardData.clearData(),u.clipboardData.setData(s.format,o);s.onCopy&&(u.preventDefault(),s.onCopy(u.clipboardData))})),document.body.appendChild(L),C.selectNodeContents(L),j.addRange(C),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");B=!0}catch(u){i&&console.error("unable to copy using execCommand: ",u),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(s.format||"text",o),s.onCopy&&s.onCopy(window.clipboardData),B=!0}catch(u){i&&console.error("unable to copy using clipboardData: ",u),i&&console.error("falling back to prompt"),w=function format(o){var s=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,s)}("message"in s?s.message:"Copy to clipboard: #{key}, Enter"),window.prompt(w,o)}}finally{j&&("function"==typeof j.removeRange?j.removeRange(C):j.removeAllRanges()),L&&document.body.removeChild(L),x()}return B}},2205:function(o,s,i){var u;u=void 0!==i.g?i.g:this,o.exports=function(o){if(o.CSS&&o.CSS.escape)return o.CSS.escape;var cssEscape=function(o){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var s,i=String(o),u=i.length,_=-1,w="",x=i.charCodeAt(0);++_=1&&s<=31||127==s||0==_&&s>=48&&s<=57||1==_&&s>=48&&s<=57&&45==x?"\\"+s.toString(16)+" ":0==_&&1==u&&45==s||!(s>=128||45==s||95==s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122)?"\\"+i.charAt(_):i.charAt(_):w+="�";return w};return o.CSS||(o.CSS={}),o.CSS.escape=cssEscape,cssEscape}(u)},81919:(o,s,i)=>{"use strict";var u=i(48287).Buffer;function isSpecificValue(o){return o instanceof u||o instanceof Date||o instanceof RegExp}function cloneSpecificValue(o){if(o instanceof u){var s=u.alloc?u.alloc(o.length):new u(o.length);return o.copy(s),s}if(o instanceof Date)return new Date(o.getTime());if(o instanceof RegExp)return new RegExp(o);throw new Error("Unexpected situation")}function deepCloneArray(o){var s=[];return o.forEach((function(o,i){"object"==typeof o&&null!==o?Array.isArray(o)?s[i]=deepCloneArray(o):isSpecificValue(o)?s[i]=cloneSpecificValue(o):s[i]=_({},o):s[i]=o})),s}function safeGetProperty(o,s){return"__proto__"===s?void 0:o[s]}var _=o.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var o,s,i=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach((function(w){return s=safeGetProperty(i,w),(o=safeGetProperty(u,w))===i?void 0:"object"!=typeof o||null===o?void(i[w]=o):Array.isArray(o)?void(i[w]=deepCloneArray(o)):isSpecificValue(o)?void(i[w]=cloneSpecificValue(o)):"object"!=typeof s||null===s||Array.isArray(s)?void(i[w]=_({},o)):void(i[w]=_(s,o))}))})),i}},14744:o=>{"use strict";var s=function isMergeableObject(o){return function isNonNullObject(o){return!!o&&"object"==typeof o}(o)&&!function isSpecial(o){var s=Object.prototype.toString.call(o);return"[object RegExp]"===s||"[object Date]"===s||function isReactElement(o){return o.$$typeof===i}(o)}(o)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function cloneUnlessOtherwiseSpecified(o,s){return!1!==s.clone&&s.isMergeableObject(o)?deepmerge(function emptyTarget(o){return Array.isArray(o)?[]:{}}(o),o,s):o}function defaultArrayMerge(o,s,i){return o.concat(s).map((function(o){return cloneUnlessOtherwiseSpecified(o,i)}))}function getKeys(o){return Object.keys(o).concat(function getEnumerableOwnPropertySymbols(o){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(o).filter((function(s){return Object.propertyIsEnumerable.call(o,s)})):[]}(o))}function propertyIsOnObject(o,s){try{return s in o}catch(o){return!1}}function mergeObject(o,s,i){var u={};return i.isMergeableObject(o)&&getKeys(o).forEach((function(s){u[s]=cloneUnlessOtherwiseSpecified(o[s],i)})),getKeys(s).forEach((function(_){(function propertyIsUnsafe(o,s){return propertyIsOnObject(o,s)&&!(Object.hasOwnProperty.call(o,s)&&Object.propertyIsEnumerable.call(o,s))})(o,_)||(propertyIsOnObject(o,_)&&i.isMergeableObject(s[_])?u[_]=function getMergeFunction(o,s){if(!s.customMerge)return deepmerge;var i=s.customMerge(o);return"function"==typeof i?i:deepmerge}(_,i)(o[_],s[_],i):u[_]=cloneUnlessOtherwiseSpecified(s[_],i))})),u}function deepmerge(o,i,u){(u=u||{}).arrayMerge=u.arrayMerge||defaultArrayMerge,u.isMergeableObject=u.isMergeableObject||s,u.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var _=Array.isArray(i);return _===Array.isArray(o)?_?u.arrayMerge(o,i,u):mergeObject(o,i,u):cloneUnlessOtherwiseSpecified(i,u)}deepmerge.all=function deepmergeAll(o,s){if(!Array.isArray(o))throw new Error("first argument should be an array");return o.reduce((function(o,i){return deepmerge(o,i,s)}),{})};var u=deepmerge;o.exports=u},30041:(o,s,i)=>{"use strict";var u=i(30655),_=i(58068),w=i(69675),x=i(75795);o.exports=function defineDataProperty(o,s,i){if(!o||"object"!=typeof o&&"function"!=typeof o)throw new w("`obj` must be an object or a function`");if("string"!=typeof s&&"symbol"!=typeof s)throw new w("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new w("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new w("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new w("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new w("`loose`, if provided, must be a boolean");var C=arguments.length>3?arguments[3]:null,j=arguments.length>4?arguments[4]:null,L=arguments.length>5?arguments[5]:null,B=arguments.length>6&&arguments[6],$=!!x&&x(o,s);if(u)u(o,s,{configurable:null===L&&$?$.configurable:!L,enumerable:null===C&&$?$.enumerable:!C,value:i,writable:null===j&&$?$.writable:!j});else{if(!B&&(C||j||L))throw new _("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");o[s]=i}}},42838:function(o){o.exports=function(){"use strict";const{entries:o,setPrototypeOf:s,isFrozen:i,getPrototypeOf:u,getOwnPropertyDescriptor:_}=Object;let{freeze:w,seal:x,create:C}=Object,{apply:j,construct:L}="undefined"!=typeof Reflect&&Reflect;w||(w=function freeze(o){return o}),x||(x=function seal(o){return o}),j||(j=function apply(o,s,i){return o.apply(s,i)}),L||(L=function construct(o,s){return new o(...s)});const B=unapply(Array.prototype.forEach),$=unapply(Array.prototype.pop),V=unapply(Array.prototype.push),U=unapply(String.prototype.toLowerCase),z=unapply(String.prototype.toString),Y=unapply(String.prototype.match),Z=unapply(String.prototype.replace),ee=unapply(String.prototype.indexOf),ie=unapply(String.prototype.trim),ae=unapply(Object.prototype.hasOwnProperty),ce=unapply(RegExp.prototype.test),le=unconstruct(TypeError);function numberIsNaN(o){return"number"==typeof o&&isNaN(o)}function unapply(o){return function(s){for(var i=arguments.length,u=new Array(i>1?i-1:0),_=1;_2&&void 0!==arguments[2]?arguments[2]:U;s&&s(o,null);let w=u.length;for(;w--;){let s=u[w];if("string"==typeof s){const o=_(s);o!==s&&(i(u)||(u[w]=o),s=o)}o[s]=!0}return o}function cleanArray(o){for(let s=0;s/gm),$e=x(/\${[\w\W]*}/gm),ze=x(/^data-[\-\w.\u00B7-\uFFFF]/),We=x(/^aria-[\-\w]+$/),He=x(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ye=x(/^(?:\w+script|data):/i),Xe=x(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qe=x(/^html$/i),et=x(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,MUSTACHE_EXPR:Re,ERB_EXPR:qe,TMPLIT_EXPR:$e,DATA_ATTR:ze,ARIA_ATTR:We,IS_ALLOWED_URI:He,IS_SCRIPT_OR_DATA:Ye,ATTR_WHITESPACE:Xe,DOCTYPE_NAME:Qe,CUSTOM_ELEMENT:et});const rt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nt=function getGlobal(){return"undefined"==typeof window?null:window},ot=function _createTrustedTypesPolicy(o,s){if("object"!=typeof o||"function"!=typeof o.createPolicy)return null;let i=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(i=s.getAttribute(u));const _="dompurify"+(i?"#"+i:"");try{return o.createPolicy(_,{createHTML:o=>o,createScriptURL:o=>o})}catch(o){return console.warn("TrustedTypes policy "+_+" could not be created."),null}};function createDOMPurify(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt();const DOMPurify=o=>createDOMPurify(o);if(DOMPurify.version="3.1.4",DOMPurify.removed=[],!s||!s.document||s.document.nodeType!==rt.document)return DOMPurify.isSupported=!1,DOMPurify;let{document:i}=s;const u=i,_=u.currentScript,{DocumentFragment:x,HTMLTemplateElement:j,Node:L,Element:Re,NodeFilter:qe,NamedNodeMap:$e=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:ze,DOMParser:We,trustedTypes:Ye}=s,Xe=Re.prototype,et=lookupGetter(Xe,"cloneNode"),st=lookupGetter(Xe,"nextSibling"),it=lookupGetter(Xe,"childNodes"),at=lookupGetter(Xe,"parentNode");if("function"==typeof j){const o=i.createElement("template");o.content&&o.content.ownerDocument&&(i=o.content.ownerDocument)}let ct,lt="";const{implementation:ut,createNodeIterator:pt,createDocumentFragment:ht,getElementsByTagName:dt}=i,{importNode:mt}=u;let gt={};DOMPurify.isSupported="function"==typeof o&&"function"==typeof at&&ut&&void 0!==ut.createHTMLDocument;const{MUSTACHE_EXPR:yt,ERB_EXPR:vt,TMPLIT_EXPR:bt,DATA_ATTR:_t,ARIA_ATTR:Et,IS_SCRIPT_OR_DATA:wt,ATTR_WHITESPACE:St,CUSTOM_ELEMENT:xt}=tt;let{IS_ALLOWED_URI:kt}=tt,Ot=null;const Ct=addToSet({},[...pe,...de,...fe,...be,...we]);let At=null;const jt=addToSet({},[...Se,...xe,...Pe,...Te]);let Pt=Object.seal(C(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),It=null,Mt=null,Nt=!0,Tt=!0,Rt=!1,Dt=!0,Lt=!1,Bt=!0,Ft=!1,qt=!1,$t=!1,Vt=!1,Ut=!1,zt=!1,Wt=!0,Kt=!1;const Ht="user-content-";let Jt=!0,Gt=!1,Yt={},Xt=null;const Qt=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const er=addToSet({},["audio","video","img","source","image","track"]);let tr=null;const rr=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",sr="http://www.w3.org/2000/svg",ir="http://www.w3.org/1999/xhtml";let ar=ir,cr=!1,lr=null;const ur=addToSet({},[nr,sr,ir],z);let pr=null;const dr=["application/xhtml+xml","text/html"],fr="text/html";let mr=null,gr=null;const yr=255,vr=i.createElement("form"),br=function isRegexOrFunction(o){return o instanceof RegExp||o instanceof Function},_r=function _parseConfig(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!gr||gr!==o){if(o&&"object"==typeof o||(o={}),o=clone(o),pr=-1===dr.indexOf(o.PARSER_MEDIA_TYPE)?fr:o.PARSER_MEDIA_TYPE,mr="application/xhtml+xml"===pr?z:U,Ot=ae(o,"ALLOWED_TAGS")?addToSet({},o.ALLOWED_TAGS,mr):Ct,At=ae(o,"ALLOWED_ATTR")?addToSet({},o.ALLOWED_ATTR,mr):jt,lr=ae(o,"ALLOWED_NAMESPACES")?addToSet({},o.ALLOWED_NAMESPACES,z):ur,tr=ae(o,"ADD_URI_SAFE_ATTR")?addToSet(clone(rr),o.ADD_URI_SAFE_ATTR,mr):rr,Zt=ae(o,"ADD_DATA_URI_TAGS")?addToSet(clone(er),o.ADD_DATA_URI_TAGS,mr):er,Xt=ae(o,"FORBID_CONTENTS")?addToSet({},o.FORBID_CONTENTS,mr):Qt,It=ae(o,"FORBID_TAGS")?addToSet({},o.FORBID_TAGS,mr):{},Mt=ae(o,"FORBID_ATTR")?addToSet({},o.FORBID_ATTR,mr):{},Yt=!!ae(o,"USE_PROFILES")&&o.USE_PROFILES,Nt=!1!==o.ALLOW_ARIA_ATTR,Tt=!1!==o.ALLOW_DATA_ATTR,Rt=o.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=!1!==o.ALLOW_SELF_CLOSE_IN_ATTR,Lt=o.SAFE_FOR_TEMPLATES||!1,Bt=!1!==o.SAFE_FOR_XML,Ft=o.WHOLE_DOCUMENT||!1,Vt=o.RETURN_DOM||!1,Ut=o.RETURN_DOM_FRAGMENT||!1,zt=o.RETURN_TRUSTED_TYPE||!1,$t=o.FORCE_BODY||!1,Wt=!1!==o.SANITIZE_DOM,Kt=o.SANITIZE_NAMED_PROPS||!1,Jt=!1!==o.KEEP_CONTENT,Gt=o.IN_PLACE||!1,kt=o.ALLOWED_URI_REGEXP||He,ar=o.NAMESPACE||ir,Pt=o.CUSTOM_ELEMENT_HANDLING||{},o.CUSTOM_ELEMENT_HANDLING&&br(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Pt.tagNameCheck=o.CUSTOM_ELEMENT_HANDLING.tagNameCheck),o.CUSTOM_ELEMENT_HANDLING&&br(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Pt.attributeNameCheck=o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),o.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Pt.allowCustomizedBuiltInElements=o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&(Tt=!1),Ut&&(Vt=!0),Yt&&(Ot=addToSet({},we),At=[],!0===Yt.html&&(addToSet(Ot,pe),addToSet(At,Se)),!0===Yt.svg&&(addToSet(Ot,de),addToSet(At,xe),addToSet(At,Te)),!0===Yt.svgFilters&&(addToSet(Ot,fe),addToSet(At,xe),addToSet(At,Te)),!0===Yt.mathMl&&(addToSet(Ot,be),addToSet(At,Pe),addToSet(At,Te))),o.ADD_TAGS&&(Ot===Ct&&(Ot=clone(Ot)),addToSet(Ot,o.ADD_TAGS,mr)),o.ADD_ATTR&&(At===jt&&(At=clone(At)),addToSet(At,o.ADD_ATTR,mr)),o.ADD_URI_SAFE_ATTR&&addToSet(tr,o.ADD_URI_SAFE_ATTR,mr),o.FORBID_CONTENTS&&(Xt===Qt&&(Xt=clone(Xt)),addToSet(Xt,o.FORBID_CONTENTS,mr)),Jt&&(Ot["#text"]=!0),Ft&&addToSet(Ot,["html","head","body"]),Ot.table&&(addToSet(Ot,["tbody"]),delete It.tbody),o.TRUSTED_TYPES_POLICY){if("function"!=typeof o.TRUSTED_TYPES_POLICY.createHTML)throw le('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof o.TRUSTED_TYPES_POLICY.createScriptURL)throw le('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ct=o.TRUSTED_TYPES_POLICY,lt=ct.createHTML("")}else void 0===ct&&(ct=ot(Ye,_)),null!==ct&&"string"==typeof lt&&(lt=ct.createHTML(""));w&&w(o),gr=o}},Er=addToSet({},["mi","mo","mn","ms","mtext"]),wr=addToSet({},["foreignobject","annotation-xml"]),Sr=addToSet({},["title","style","font","a","script"]),xr=addToSet({},[...de,...fe,...ye]),kr=addToSet({},[...be,..._e]),Or=function _checkValidNamespace(o){let s=at(o);s&&s.tagName||(s={namespaceURI:ar,tagName:"template"});const i=U(o.tagName),u=U(s.tagName);return!!lr[o.namespaceURI]&&(o.namespaceURI===sr?s.namespaceURI===ir?"svg"===i:s.namespaceURI===nr?"svg"===i&&("annotation-xml"===u||Er[u]):Boolean(xr[i]):o.namespaceURI===nr?s.namespaceURI===ir?"math"===i:s.namespaceURI===sr?"math"===i&&wr[u]:Boolean(kr[i]):o.namespaceURI===ir?!(s.namespaceURI===sr&&!wr[u])&&!(s.namespaceURI===nr&&!Er[u])&&!kr[i]&&(Sr[i]||!xr[i]):!("application/xhtml+xml"!==pr||!lr[o.namespaceURI]))},Cr=function _forceRemove(o){V(DOMPurify.removed,{element:o});try{o.parentNode.removeChild(o)}catch(s){o.remove()}},Ar=function _removeAttribute(o,s){try{V(DOMPurify.removed,{attribute:s.getAttributeNode(o),from:s})}catch(o){V(DOMPurify.removed,{attribute:null,from:s})}if(s.removeAttribute(o),"is"===o&&!At[o])if(Vt||Ut)try{Cr(s)}catch(o){}else try{s.setAttribute(o,"")}catch(o){}},jr=function _initDocument(o){let s=null,u=null;if($t)o=""+o;else{const s=Y(o,/^[\r\n\t ]+/);u=s&&s[0]}"application/xhtml+xml"===pr&&ar===ir&&(o=''+o+"");const _=ct?ct.createHTML(o):o;if(ar===ir)try{s=(new We).parseFromString(_,pr)}catch(o){}if(!s||!s.documentElement){s=ut.createDocument(ar,"template",null);try{s.documentElement.innerHTML=cr?lt:_}catch(o){}}const w=s.body||s.documentElement;return o&&u&&w.insertBefore(i.createTextNode(u),w.childNodes[0]||null),ar===ir?dt.call(s,Ft?"html":"body")[0]:Ft?s.documentElement:w},Pr=function _createNodeIterator(o){return pt.call(o.ownerDocument||o,o,qe.SHOW_ELEMENT|qe.SHOW_COMMENT|qe.SHOW_TEXT|qe.SHOW_PROCESSING_INSTRUCTION|qe.SHOW_CDATA_SECTION,null)},Ir=function _isClobbered(o){return o instanceof ze&&(void 0!==o.__depth&&"number"!=typeof o.__depth||void 0!==o.__removalCount&&"number"!=typeof o.__removalCount||"string"!=typeof o.nodeName||"string"!=typeof o.textContent||"function"!=typeof o.removeChild||!(o.attributes instanceof $e)||"function"!=typeof o.removeAttribute||"function"!=typeof o.setAttribute||"string"!=typeof o.namespaceURI||"function"!=typeof o.insertBefore||"function"!=typeof o.hasChildNodes)},Mr=function _isNode(o){return"function"==typeof L&&o instanceof L},Nr=function _executeHook(o,s,i){gt[o]&&B(gt[o],(o=>{o.call(DOMPurify,s,i,gr)}))},Tr=function _sanitizeElements(o){let s=null;if(Nr("beforeSanitizeElements",o,null),Ir(o))return Cr(o),!0;const i=mr(o.nodeName);if(Nr("uponSanitizeElement",o,{tagName:i,allowedTags:Ot}),o.hasChildNodes()&&!Mr(o.firstElementChild)&&ce(/<[/\w]/g,o.innerHTML)&&ce(/<[/\w]/g,o.textContent))return Cr(o),!0;if(o.nodeType===rt.progressingInstruction)return Cr(o),!0;if(Bt&&o.nodeType===rt.comment&&ce(/<[/\w]/g,o.data))return Cr(o),!0;if(!Ot[i]||It[i]){if(!It[i]&&Dr(i)){if(Pt.tagNameCheck instanceof RegExp&&ce(Pt.tagNameCheck,i))return!1;if(Pt.tagNameCheck instanceof Function&&Pt.tagNameCheck(i))return!1}if(Jt&&!Xt[i]){const s=at(o)||o.parentNode,i=it(o)||o.childNodes;if(i&&s)for(let u=i.length-1;u>=0;--u){const _=et(i[u],!0);_.__removalCount=(o.__removalCount||0)+1,s.insertBefore(_,st(o))}}return Cr(o),!0}return o instanceof Re&&!Or(o)?(Cr(o),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!ce(/<\/no(script|embed|frames)/i,o.innerHTML)?(Lt&&o.nodeType===rt.text&&(s=o.textContent,B([yt,vt,bt],(o=>{s=Z(s,o," ")})),o.textContent!==s&&(V(DOMPurify.removed,{element:o.cloneNode()}),o.textContent=s)),Nr("afterSanitizeElements",o,null),!1):(Cr(o),!0)},Rr=function _isValidAttribute(o,s,u){if(Wt&&("id"===s||"name"===s)&&(u in i||u in vr||"__depth"===u||"__removalCount"===u))return!1;if(Tt&&!Mt[s]&&ce(_t,s));else if(Nt&&ce(Et,s));else if(!At[s]||Mt[s]){if(!(Dr(o)&&(Pt.tagNameCheck instanceof RegExp&&ce(Pt.tagNameCheck,o)||Pt.tagNameCheck instanceof Function&&Pt.tagNameCheck(o))&&(Pt.attributeNameCheck instanceof RegExp&&ce(Pt.attributeNameCheck,s)||Pt.attributeNameCheck instanceof Function&&Pt.attributeNameCheck(s))||"is"===s&&Pt.allowCustomizedBuiltInElements&&(Pt.tagNameCheck instanceof RegExp&&ce(Pt.tagNameCheck,u)||Pt.tagNameCheck instanceof Function&&Pt.tagNameCheck(u))))return!1}else if(tr[s]);else if(ce(kt,Z(u,St,"")));else if("src"!==s&&"xlink:href"!==s&&"href"!==s||"script"===o||0!==ee(u,"data:")||!Zt[o])if(Rt&&!ce(wt,Z(u,St,"")));else if(u)return!1;return!0},Dr=function _isBasicCustomElement(o){return"annotation-xml"!==o&&Y(o,xt)},Lr=function _sanitizeAttributes(o){Nr("beforeSanitizeAttributes",o,null);const{attributes:s}=o;if(!s)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:At};let u=s.length;for(;u--;){const _=s[u],{name:w,namespaceURI:x,value:C}=_,j=mr(w);let L="value"===w?C:ie(C);if(i.attrName=j,i.attrValue=L,i.keepAttr=!0,i.forceKeepAttr=void 0,Nr("uponSanitizeAttribute",o,i),L=i.attrValue,i.forceKeepAttr)continue;if(Ar(w,o),!i.keepAttr)continue;if(!Dt&&ce(/\/>/i,L)){Ar(w,o);continue}if(Bt&&ce(/((--!?|])>)|<\/(style|title)/i,L)){Ar(w,o);continue}Lt&&B([yt,vt,bt],(o=>{L=Z(L,o," ")}));const V=mr(o.nodeName);if(Rr(V,j,L)){if(!Kt||"id"!==j&&"name"!==j||(Ar(w,o),L=Ht+L),ct&&"object"==typeof Ye&&"function"==typeof Ye.getAttributeType)if(x);else switch(Ye.getAttributeType(V,j)){case"TrustedHTML":L=ct.createHTML(L);break;case"TrustedScriptURL":L=ct.createScriptURL(L)}try{x?o.setAttributeNS(x,w,L):o.setAttribute(w,L),Ir(o)?Cr(o):$(DOMPurify.removed)}catch(o){}}}Nr("afterSanitizeAttributes",o,null)},Br=function _sanitizeShadowDOM(o){let s=null;const i=Pr(o);for(Nr("beforeSanitizeShadowDOM",o,null);s=i.nextNode();){if(Nr("uponSanitizeShadowNode",s,null),Tr(s))continue;const o=at(s);s.nodeType===rt.element&&(o&&o.__depth?s.__depth=(s.__removalCount||0)+o.__depth+1:s.__depth=1),(s.__depth>=yr||s.__depth<0||numberIsNaN(s.__depth))&&Cr(s),s.content instanceof x&&(s.content.__depth=s.__depth,_sanitizeShadowDOM(s.content)),Lr(s)}Nr("afterSanitizeShadowDOM",o,null)};return DOMPurify.sanitize=function(o){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,_=null,w=null,C=null;if(cr=!o,cr&&(o="\x3c!--\x3e"),"string"!=typeof o&&!Mr(o)){if("function"!=typeof o.toString)throw le("toString is not a function");if("string"!=typeof(o=o.toString()))throw le("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return o;if(qt||_r(s),DOMPurify.removed=[],"string"==typeof o&&(Gt=!1),Gt){if(o.nodeName){const s=mr(o.nodeName);if(!Ot[s]||It[s])throw le("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof L)i=jr("\x3c!----\x3e"),_=i.ownerDocument.importNode(o,!0),_.nodeType===rt.element&&"BODY"===_.nodeName||"HTML"===_.nodeName?i=_:i.appendChild(_);else{if(!Vt&&!Lt&&!Ft&&-1===o.indexOf("<"))return ct&&zt?ct.createHTML(o):o;if(i=jr(o),!i)return Vt?null:zt?lt:""}i&&$t&&Cr(i.firstChild);const j=Pr(Gt?o:i);for(;w=j.nextNode();){if(Tr(w))continue;const o=at(w);w.nodeType===rt.element&&(o&&o.__depth?w.__depth=(w.__removalCount||0)+o.__depth+1:w.__depth=1),(w.__depth>=yr||w.__depth<0||numberIsNaN(w.__depth))&&Cr(w),w.content instanceof x&&(w.content.__depth=w.__depth,Br(w.content)),Lr(w)}if(Gt)return o;if(Vt){if(Ut)for(C=ht.call(i.ownerDocument);i.firstChild;)C.appendChild(i.firstChild);else C=i;return(At.shadowroot||At.shadowrootmode)&&(C=mt.call(u,C,!0)),C}let $=Ft?i.outerHTML:i.innerHTML;return Ft&&Ot["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ce(Qe,i.ownerDocument.doctype.name)&&($="\n"+$),Lt&&B([yt,vt,bt],(o=>{$=Z($,o," ")})),ct&&zt?ct.createHTML($):$},DOMPurify.setConfig=function(){_r(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),qt=!0},DOMPurify.clearConfig=function(){gr=null,qt=!1},DOMPurify.isValidAttribute=function(o,s,i){gr||_r({});const u=mr(o),_=mr(s);return Rr(u,_,i)},DOMPurify.addHook=function(o,s){"function"==typeof s&&(gt[o]=gt[o]||[],V(gt[o],s))},DOMPurify.removeHook=function(o){if(gt[o])return $(gt[o])},DOMPurify.removeHooks=function(o){gt[o]&&(gt[o]=[])},DOMPurify.removeAllHooks=function(){gt={}},DOMPurify}return createDOMPurify()}()},78004:o=>{"use strict";class SubRange{constructor(o,s){this.low=o,this.high=s,this.length=1+s-o}overlaps(o){return!(this.higho.high)}touches(o){return!(this.high+1o.high)}add(o){return new SubRange(Math.min(this.low,o.low),Math.max(this.high,o.high))}subtract(o){return o.low<=this.low&&o.high>=this.high?[]:o.low>this.low&&o.higho+s.length),0)}add(o,s){var _add=o=>{for(var s=0;s{for(var s=0;s{for(var s=0;s{for(var i=s.low;i<=s.high;)o.push(i),i++;return o}),[])}subranges(){return this.ranges.map((o=>({low:o.low,high:o.high,length:1+o.high-o.low})))}}o.exports=DRange},30655:(o,s,i)=>{"use strict";var u=i(70453)("%Object.defineProperty%",!0)||!1;if(u)try{u({},"a",{value:1})}catch(o){u=!1}o.exports=u},41237:o=>{"use strict";o.exports=EvalError},69383:o=>{"use strict";o.exports=Error},79290:o=>{"use strict";o.exports=RangeError},79538:o=>{"use strict";o.exports=ReferenceError},58068:o=>{"use strict";o.exports=SyntaxError},69675:o=>{"use strict";o.exports=TypeError},35345:o=>{"use strict";o.exports=URIError},37007:o=>{"use strict";var s,i="object"==typeof Reflect?Reflect:null,u=i&&"function"==typeof i.apply?i.apply:function ReflectApply(o,s,i){return Function.prototype.apply.call(o,s,i)};s=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:function ReflectOwnKeys(o){return Object.getOwnPropertyNames(o)};var _=Number.isNaN||function NumberIsNaN(o){return o!=o};function EventEmitter(){EventEmitter.init.call(this)}o.exports=EventEmitter,o.exports.once=function once(o,s){return new Promise((function(i,u){function errorListener(i){o.removeListener(s,resolver),u(i)}function resolver(){"function"==typeof o.removeListener&&o.removeListener("error",errorListener),i([].slice.call(arguments))}eventTargetAgnosticAddListener(o,s,resolver,{once:!0}),"error"!==s&&function addErrorHandlerIfEventEmitter(o,s,i){"function"==typeof o.on&&eventTargetAgnosticAddListener(o,"error",s,i)}(o,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var w=10;function checkListener(o){if("function"!=typeof o)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}function _getMaxListeners(o){return void 0===o._maxListeners?EventEmitter.defaultMaxListeners:o._maxListeners}function _addListener(o,s,i,u){var _,w,x;if(checkListener(i),void 0===(w=o._events)?(w=o._events=Object.create(null),o._eventsCount=0):(void 0!==w.newListener&&(o.emit("newListener",s,i.listener?i.listener:i),w=o._events),x=w[s]),void 0===x)x=w[s]=i,++o._eventsCount;else if("function"==typeof x?x=w[s]=u?[i,x]:[x,i]:u?x.unshift(i):x.push(i),(_=_getMaxListeners(o))>0&&x.length>_&&!x.warned){x.warned=!0;var C=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(s)+" listeners added. Use emitter.setMaxListeners() to increase limit");C.name="MaxListenersExceededWarning",C.emitter=o,C.type=s,C.count=x.length,function ProcessEmitWarning(o){console&&console.warn&&console.warn(o)}(C)}return o}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(o,s,i){var u={fired:!1,wrapFn:void 0,target:o,type:s,listener:i},_=onceWrapper.bind(u);return _.listener=i,u.wrapFn=_,_}function _listeners(o,s,i){var u=o._events;if(void 0===u)return[];var _=u[s];return void 0===_?[]:"function"==typeof _?i?[_.listener||_]:[_]:i?function unwrapListeners(o){for(var s=new Array(o.length),i=0;i0&&(x=s[0]),x instanceof Error)throw x;var C=new Error("Unhandled error."+(x?" ("+x.message+")":""));throw C.context=x,C}var j=w[o];if(void 0===j)return!1;if("function"==typeof j)u(j,this,s);else{var L=j.length,B=arrayClone(j,L);for(i=0;i=0;w--)if(i[w]===s||i[w].listener===s){x=i[w].listener,_=w;break}if(_<0)return this;0===_?i.shift():function spliceOne(o,s){for(;s+1=0;u--)this.removeListener(o,s[u]);return this},EventEmitter.prototype.listeners=function listeners(o){return _listeners(this,o,!0)},EventEmitter.prototype.rawListeners=function rawListeners(o){return _listeners(this,o,!1)},EventEmitter.listenerCount=function(o,s){return"function"==typeof o.listenerCount?o.listenerCount(s):listenerCount.call(o,s)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?s(this._events):[]}},85587:(o,s,i)=>{"use strict";var u=i(26311),_=create(Error);function create(o){return FormattedError.displayName=o.displayName||o.name,FormattedError;function FormattedError(s){return s&&(s=u.apply(null,arguments)),new o(s)}}o.exports=_,_.eval=create(EvalError),_.range=create(RangeError),_.reference=create(ReferenceError),_.syntax=create(SyntaxError),_.type=create(TypeError),_.uri=create(URIError),_.create=create},26311:o=>{!function(){var s;function format(o){for(var s,i,u,_,w=1,x=[].slice.call(arguments),C=0,j=o.length,L="",B=!1,$=!1,nextArg=function(){return x[w++]},slurpNumber=function(){for(var i="";/\d/.test(o[C]);)i+=o[C++],s=o[C];return i.length>0?parseInt(i):null};C{"use strict";var s=Object.prototype.toString,i=Math.max,u=function concatty(o,s){for(var i=[],u=0;u{"use strict";var u=i(89353);o.exports=Function.prototype.bind||u},70453:(o,s,i)=>{"use strict";var u,_=i(69383),w=i(41237),x=i(79290),C=i(79538),j=i(58068),L=i(69675),B=i(35345),$=Function,getEvalledConstructor=function(o){try{return $('"use strict"; return ('+o+").constructor;")()}catch(o){}},V=Object.getOwnPropertyDescriptor;if(V)try{V({},"")}catch(o){V=null}var throwTypeError=function(){throw new L},U=V?function(){try{return throwTypeError}catch(o){try{return V(arguments,"callee").get}catch(o){return throwTypeError}}}():throwTypeError,z=i(64039)(),Y=i(80024)(),Z=Object.getPrototypeOf||(Y?function(o){return o.__proto__}:null),ee={},ie="undefined"!=typeof Uint8Array&&Z?Z(Uint8Array):u,ae={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":z&&Z?Z([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":ee,"%AsyncGenerator%":ee,"%AsyncGeneratorFunction%":ee,"%AsyncIteratorPrototype%":ee,"%Atomics%":"undefined"==typeof Atomics?u:Atomics,"%BigInt%":"undefined"==typeof BigInt?u:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?u:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?u:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":_,"%eval%":eval,"%EvalError%":w,"%Float32Array%":"undefined"==typeof Float32Array?u:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?u:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?u:FinalizationRegistry,"%Function%":$,"%GeneratorFunction%":ee,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":z&&Z?Z(Z([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&z&&Z?Z((new Map)[Symbol.iterator]()):u,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?u:Promise,"%Proxy%":"undefined"==typeof Proxy?u:Proxy,"%RangeError%":x,"%ReferenceError%":C,"%Reflect%":"undefined"==typeof Reflect?u:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?u:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&z&&Z?Z((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&Z?Z(""[Symbol.iterator]()):u,"%Symbol%":z?Symbol:u,"%SyntaxError%":j,"%ThrowTypeError%":U,"%TypedArray%":ie,"%TypeError%":L,"%Uint8Array%":"undefined"==typeof Uint8Array?u:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?u:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?u:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?u:Uint32Array,"%URIError%":B,"%WeakMap%":"undefined"==typeof WeakMap?u:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?u:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?u:WeakSet};if(Z)try{null.error}catch(o){var ce=Z(Z(o));ae["%Error.prototype%"]=ce}var le=function doEval(o){var s;if("%AsyncFunction%"===o)s=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===o)s=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===o)s=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===o){var i=doEval("%AsyncGeneratorFunction%");i&&(s=i.prototype)}else if("%AsyncIteratorPrototype%"===o){var u=doEval("%AsyncGenerator%");u&&Z&&(s=Z(u.prototype))}return ae[o]=s,s},pe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},de=i(66743),fe=i(9957),ye=de.call(Function.call,Array.prototype.concat),be=de.call(Function.apply,Array.prototype.splice),_e=de.call(Function.call,String.prototype.replace),we=de.call(Function.call,String.prototype.slice),Se=de.call(Function.call,RegExp.prototype.exec),xe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pe=/\\(\\)?/g,Te=function getBaseIntrinsic(o,s){var i,u=o;if(fe(pe,u)&&(u="%"+(i=pe[u])[0]+"%"),fe(ae,u)){var _=ae[u];if(_===ee&&(_=le(u)),void 0===_&&!s)throw new L("intrinsic "+o+" exists, but is not available. Please file an issue!");return{alias:i,name:u,value:_}}throw new j("intrinsic "+o+" does not exist!")};o.exports=function GetIntrinsic(o,s){if("string"!=typeof o||0===o.length)throw new L("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof s)throw new L('"allowMissing" argument must be a boolean');if(null===Se(/^%?[^%]*%?$/,o))throw new j("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=function stringToPath(o){var s=we(o,0,1),i=we(o,-1);if("%"===s&&"%"!==i)throw new j("invalid intrinsic syntax, expected closing `%`");if("%"===i&&"%"!==s)throw new j("invalid intrinsic syntax, expected opening `%`");var u=[];return _e(o,xe,(function(o,s,i,_){u[u.length]=i?_e(_,Pe,"$1"):s||o})),u}(o),u=i.length>0?i[0]:"",_=Te("%"+u+"%",s),w=_.name,x=_.value,C=!1,B=_.alias;B&&(u=B[0],be(i,ye([0,1],B)));for(var $=1,U=!0;$=i.length){var ee=V(x,z);x=(U=!!ee)&&"get"in ee&&!("originalValue"in ee.get)?ee.get:x[z]}else U=fe(x,z),x=x[z];U&&!C&&(ae[w]=x)}}return x}},75795:(o,s,i)=>{"use strict";var u=i(70453)("%Object.getOwnPropertyDescriptor%",!0);if(u)try{u([],"length")}catch(o){u=null}o.exports=u},30592:(o,s,i)=>{"use strict";var u=i(30655),_=function hasPropertyDescriptors(){return!!u};_.hasArrayLengthDefineBug=function hasArrayLengthDefineBug(){if(!u)return null;try{return 1!==u([],"length",{value:1}).length}catch(o){return!0}},o.exports=_},80024:o=>{"use strict";var s={__proto__:null,foo:{}},i=Object;o.exports=function hasProto(){return{__proto__:s}.foo===s.foo&&!(s instanceof i)}},64039:(o,s,i)=>{"use strict";var u="undefined"!=typeof Symbol&&Symbol,_=i(41333);o.exports=function hasNativeSymbols(){return"function"==typeof u&&("function"==typeof Symbol&&("symbol"==typeof u("foo")&&("symbol"==typeof Symbol("bar")&&_())))}},41333:o=>{"use strict";o.exports=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var o={},s=Symbol("test"),i=Object(s);if("string"==typeof s)return!1;if("[object Symbol]"!==Object.prototype.toString.call(s))return!1;if("[object Symbol]"!==Object.prototype.toString.call(i))return!1;for(s in o[s]=42,o)return!1;if("function"==typeof Object.keys&&0!==Object.keys(o).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(o).length)return!1;var u=Object.getOwnPropertySymbols(o);if(1!==u.length||u[0]!==s)return!1;if(!Object.prototype.propertyIsEnumerable.call(o,s))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var _=Object.getOwnPropertyDescriptor(o,s);if(42!==_.value||!0!==_.enumerable)return!1}return!0}},9957:(o,s,i)=>{"use strict";var u=Function.prototype.call,_=Object.prototype.hasOwnProperty,w=i(66743);o.exports=w.call(u,_)},45981:o=>{function deepFreeze(o){return o instanceof Map?o.clear=o.delete=o.set=function(){throw new Error("map is read-only")}:o instanceof Set&&(o.add=o.clear=o.delete=function(){throw new Error("set is read-only")}),Object.freeze(o),Object.getOwnPropertyNames(o).forEach((function(s){var i=o[s];"object"!=typeof i||Object.isFrozen(i)||deepFreeze(i)})),o}var s=deepFreeze,i=deepFreeze;s.default=i;class Response{constructor(o){void 0===o.data&&(o.data={}),this.data=o.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(o){return o.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function inherit(o,...s){const i=Object.create(null);for(const s in o)i[s]=o[s];return s.forEach((function(o){for(const s in o)i[s]=o[s]})),i}const emitsWrappingTags=o=>!!o.kind;class HTMLRenderer{constructor(o,s){this.buffer="",this.classPrefix=s.classPrefix,o.walk(this)}addText(o){this.buffer+=escapeHTML(o)}openNode(o){if(!emitsWrappingTags(o))return;let s=o.kind;o.sublanguage||(s=`${this.classPrefix}${s}`),this.span(s)}closeNode(o){emitsWrappingTags(o)&&(this.buffer+="")}value(){return this.buffer}span(o){this.buffer+=``}}class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(o){this.top.children.push(o)}openNode(o){const s={kind:o,children:[]};this.add(s),this.stack.push(s)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(o){return this.constructor._walk(o,this.rootNode)}static _walk(o,s){return"string"==typeof s?o.addText(s):s.children&&(o.openNode(s),s.children.forEach((s=>this._walk(o,s))),o.closeNode(s)),o}static _collapse(o){"string"!=typeof o&&o.children&&(o.children.every((o=>"string"==typeof o))?o.children=[o.children.join("")]:o.children.forEach((o=>{TokenTree._collapse(o)})))}}class TokenTreeEmitter extends TokenTree{constructor(o){super(),this.options=o}addKeyword(o,s){""!==o&&(this.openNode(s),this.addText(o),this.closeNode())}addText(o){""!==o&&this.add(o)}addSublanguage(o,s){const i=o.root;i.kind=s,i.sublanguage=!0,this.add(i)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return!0}}function source(o){return o?"string"==typeof o?o:o.source:null}const u=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const _="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",x="\\b\\d+(\\.\\d+)?",C="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",j="\\b(0b[01]+)",L={begin:"\\\\[\\s\\S]",relevance:0},B={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[L]},$={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[L]},V={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT=function(o,s,i={}){const u=inherit({className:"comment",begin:o,end:s,contains:[]},i);return u.contains.push(V),u.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),u},U=COMMENT("//","$"),z=COMMENT("/\\*","\\*/"),Y=COMMENT("#","$"),Z={className:"number",begin:x,relevance:0},ee={className:"number",begin:C,relevance:0},ie={className:"number",begin:j,relevance:0},ae={className:"number",begin:x+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},ce={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[L,{begin:/\[/,end:/\]/,relevance:0,contains:[L]}]}]},le={className:"title",begin:_,relevance:0},pe={className:"title",begin:w,relevance:0},de={begin:"\\.\\s*"+w,relevance:0};var fe=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:_,UNDERSCORE_IDENT_RE:w,NUMBER_RE:x,C_NUMBER_RE:C,BINARY_NUMBER_RE:j,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(o={})=>{const s=/^#![ ]*\//;return o.binary&&(o.begin=function concat(...o){return o.map((o=>source(o))).join("")}(s,/.*\b/,o.binary,/\b.*/)),inherit({className:"meta",begin:s,end:/$/,relevance:0,"on:begin":(o,s)=>{0!==o.index&&s.ignoreMatch()}},o)},BACKSLASH_ESCAPE:L,APOS_STRING_MODE:B,QUOTE_STRING_MODE:$,PHRASAL_WORDS_MODE:V,COMMENT,C_LINE_COMMENT_MODE:U,C_BLOCK_COMMENT_MODE:z,HASH_COMMENT_MODE:Y,NUMBER_MODE:Z,C_NUMBER_MODE:ee,BINARY_NUMBER_MODE:ie,CSS_NUMBER_MODE:ae,REGEXP_MODE:ce,TITLE_MODE:le,UNDERSCORE_TITLE_MODE:pe,METHOD_GUARD:de,END_SAME_AS_BEGIN:function(o){return Object.assign(o,{"on:begin":(o,s)=>{s.data._beginMatch=o[1]},"on:end":(o,s)=>{s.data._beginMatch!==o[1]&&s.ignoreMatch()}})}});function skipIfhasPrecedingDot(o,s){"."===o.input[o.index-1]&&s.ignoreMatch()}function beginKeywords(o,s){s&&o.beginKeywords&&(o.begin="\\b("+o.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",o.__beforeBegin=skipIfhasPrecedingDot,o.keywords=o.keywords||o.beginKeywords,delete o.beginKeywords,void 0===o.relevance&&(o.relevance=0))}function compileIllegal(o,s){Array.isArray(o.illegal)&&(o.illegal=function either(...o){return"("+o.map((o=>source(o))).join("|")+")"}(...o.illegal))}function compileMatch(o,s){if(o.match){if(o.begin||o.end)throw new Error("begin & end are not supported with match");o.begin=o.match,delete o.match}}function compileRelevance(o,s){void 0===o.relevance&&(o.relevance=1)}const ye=["of","and","for","in","not","or","if","then","parent","list","value"],be="keyword";function compileKeywords(o,s,i=be){const u={};return"string"==typeof o?compileList(i,o.split(" ")):Array.isArray(o)?compileList(i,o):Object.keys(o).forEach((function(i){Object.assign(u,compileKeywords(o[i],s,i))})),u;function compileList(o,i){s&&(i=i.map((o=>o.toLowerCase()))),i.forEach((function(s){const i=s.split("|");u[i[0]]=[o,scoreForKeyword(i[0],i[1])]}))}}function scoreForKeyword(o,s){return s?Number(s):function commonKeyword(o){return ye.includes(o.toLowerCase())}(o)?0:1}function compileLanguage(o,{plugins:s}){function langRe(s,i){return new RegExp(source(s),"m"+(o.case_insensitive?"i":"")+(i?"g":""))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,s){s.position=this.position++,this.matchIndexes[this.matchAt]=s,this.regexes.push([s,o]),this.matchAt+=function countMatchGroups(o){return new RegExp(o.toString()+"|").exec("").length-1}(o)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const o=this.regexes.map((o=>o[1]));this.matcherRe=langRe(function join(o,s="|"){let i=0;return o.map((o=>{i+=1;const s=i;let _=source(o),w="";for(;_.length>0;){const o=u.exec(_);if(!o){w+=_;break}w+=_.substring(0,o.index),_=_.substring(o.index+o[0].length),"\\"===o[0][0]&&o[1]?w+="\\"+String(Number(o[1])+s):(w+=o[0],"("===o[0]&&i++)}return w})).map((o=>`(${o})`)).join(s)}(o),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const s=this.matcherRe.exec(o);if(!s)return null;const i=s.findIndex(((o,s)=>s>0&&void 0!==o)),u=this.matchIndexes[i];return s.splice(0,i),Object.assign(s,u)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const s=new MultiRegex;return this.rules.slice(o).forEach((([o,i])=>s.addRule(o,i))),s.compile(),this.multiRegexes[o]=s,s}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(o,s){this.rules.push([o,s]),"begin"===s.type&&this.count++}exec(o){const s=this.getMatcher(this.regexIndex);s.lastIndex=this.lastIndex;let i=s.exec(o);if(this.resumingScanAtSamePosition())if(i&&i.index===this.lastIndex);else{const s=this.getMatcher(0);s.lastIndex=this.lastIndex+1,i=s.exec(o)}return i&&(this.regexIndex+=i.position+1,this.regexIndex===this.count&&this.considerAll()),i}}if(o.compilerExtensions||(o.compilerExtensions=[]),o.contains&&o.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return o.classNameAliases=inherit(o.classNameAliases||{}),function compileMode(s,i){const u=s;if(s.isCompiled)return u;[compileMatch].forEach((o=>o(s,i))),o.compilerExtensions.forEach((o=>o(s,i))),s.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach((o=>o(s,i))),s.isCompiled=!0;let _=null;if("object"==typeof s.keywords&&(_=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=compileKeywords(s.keywords,o.case_insensitive)),s.lexemes&&_)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return _=_||s.lexemes||/\w+/,u.keywordPatternRe=langRe(_,!0),i&&(s.begin||(s.begin=/\B|\b/),u.beginRe=langRe(s.begin),s.endSameAsBegin&&(s.end=s.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),s.end&&(u.endRe=langRe(s.end)),u.terminatorEnd=source(s.end)||"",s.endsWithParent&&i.terminatorEnd&&(u.terminatorEnd+=(s.end?"|":"")+i.terminatorEnd)),s.illegal&&(u.illegalRe=langRe(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((function(o){return function expandOrCloneMode(o){o.variants&&!o.cachedVariants&&(o.cachedVariants=o.variants.map((function(s){return inherit(o,{variants:null},s)})));if(o.cachedVariants)return o.cachedVariants;if(dependencyOnParent(o))return inherit(o,{starts:o.starts?inherit(o.starts):null});if(Object.isFrozen(o))return inherit(o);return o}("self"===o?s:o)}))),s.contains.forEach((function(o){compileMode(o,u)})),s.starts&&compileMode(s.starts,i),u.matcher=function buildModeRegex(o){const s=new ResumableMultiRegex;return o.contains.forEach((o=>s.addRule(o.begin,{rule:o,type:"begin"}))),o.terminatorEnd&&s.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&s.addRule(o.illegal,{type:"illegal"}),s}(u),u}(o)}function dependencyOnParent(o){return!!o&&(o.endsWithParent||dependencyOnParent(o.starts))}function BuildVuePlugin(o){const s={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!o.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,escapeHTML(this.code);let s={};return this.autoDetect?(s=o.highlightAuto(this.code),this.detectedLanguage=s.language):(s=o.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),s.value},autoDetect(){return!this.language||function hasValueOrEmptyAttribute(o){return Boolean(o||""===o)}(this.autodetect)},ignoreIllegals:()=>!0},render(o){return o("pre",{},[o("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:s,VuePlugin:{install(o){o.component("highlightjs",s)}}}}const _e={"after:highlightElement":({el:o,result:s,text:i})=>{const u=nodeStream(o);if(!u.length)return;const _=document.createElement("div");_.innerHTML=s.value,s.value=function mergeStreams(o,s,i){let u=0,_="";const w=[];function selectStream(){return o.length&&s.length?o[0].offset!==s[0].offset?o[0].offset"}function close(o){_+=""}function render(o){("start"===o.event?open:close)(o.node)}for(;o.length||s.length;){let s=selectStream();if(_+=escapeHTML(i.substring(u,s[0].offset)),u=s[0].offset,s===o){w.reverse().forEach(close);do{render(s.splice(0,1)[0]),s=selectStream()}while(s===o&&s.length&&s[0].offset===u);w.reverse().forEach(open)}else"start"===s[0].event?w.push(s[0].node):w.pop(),render(s.splice(0,1)[0])}return _+escapeHTML(i.substr(u))}(u,nodeStream(_),i)}};function tag(o){return o.nodeName.toLowerCase()}function nodeStream(o){const s=[];return function _nodeStream(o,i){for(let u=o.firstChild;u;u=u.nextSibling)3===u.nodeType?i+=u.nodeValue.length:1===u.nodeType&&(s.push({event:"start",offset:i,node:u}),i=_nodeStream(u,i),tag(u).match(/br|hr|img|input/)||s.push({event:"stop",offset:i,node:u}));return i}(o,0),s}const we={},error=o=>{console.error(o)},warn=(o,...s)=>{console.log(`WARN: ${o}`,...s)},deprecated=(o,s)=>{we[`${o}/${s}`]||(console.log(`Deprecated as of ${o}. ${s}`),we[`${o}/${s}`]=!0)},Se=escapeHTML,xe=inherit,Pe=Symbol("nomatch");var Te=function(o){const i=Object.create(null),u=Object.create(null),_=[];let w=!0;const x=/(^(<[^>]+>|\t|)+|\n)/gm,C="Could not find the language '{}', did you forget to load/include a language module?",j={disableAutodetect:!0,name:"Plain text",contains:[]};let L={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(o){return L.noHighlightRe.test(o)}function highlight(o,s,i,u){let _="",w="";"object"==typeof s?(_=o,i=s.ignoreIllegals,w=s.language,u=void 0):(deprecated("10.7.0","highlight(lang, code, ...args) has been deprecated."),deprecated("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),w=o,_=s);const x={code:_,language:w};fire("before:highlight",x);const C=x.result?x.result:_highlight(x.language,x.code,i,u);return C.code=x.code,fire("after:highlight",C),C}function _highlight(o,s,u,x){function keywordData(o,s){const i=B.case_insensitive?s[0].toLowerCase():s[0];return Object.prototype.hasOwnProperty.call(o.keywords,i)&&o.keywords[i]}function processBuffer(){null!=U.subLanguage?function processSubLanguage(){if(""===Z)return;let o=null;if("string"==typeof U.subLanguage){if(!i[U.subLanguage])return void Y.addText(Z);o=_highlight(U.subLanguage,Z,!0,z[U.subLanguage]),z[U.subLanguage]=o.top}else o=highlightAuto(Z,U.subLanguage.length?U.subLanguage:null);U.relevance>0&&(ee+=o.relevance),Y.addSublanguage(o.emitter,o.language)}():function processKeywords(){if(!U.keywords)return void Y.addText(Z);let o=0;U.keywordPatternRe.lastIndex=0;let s=U.keywordPatternRe.exec(Z),i="";for(;s;){i+=Z.substring(o,s.index);const u=keywordData(U,s);if(u){const[o,_]=u;if(Y.addText(i),i="",ee+=_,o.startsWith("_"))i+=s[0];else{const i=B.classNameAliases[o]||o;Y.addKeyword(s[0],i)}}else i+=s[0];o=U.keywordPatternRe.lastIndex,s=U.keywordPatternRe.exec(Z)}i+=Z.substr(o),Y.addText(i)}(),Z=""}function startNewMode(o){return o.className&&Y.openNode(B.classNameAliases[o.className]||o.className),U=Object.create(o,{parent:{value:U}}),U}function endOfMode(o,s,i){let u=function startsWith(o,s){const i=o&&o.exec(s);return i&&0===i.index}(o.endRe,i);if(u){if(o["on:end"]){const i=new Response(o);o["on:end"](s,i),i.isMatchIgnored&&(u=!1)}if(u){for(;o.endsParent&&o.parent;)o=o.parent;return o}}if(o.endsWithParent)return endOfMode(o.parent,s,i)}function doIgnore(o){return 0===U.matcher.regexIndex?(Z+=o[0],1):(ce=!0,0)}function doBeginMatch(o){const s=o[0],i=o.rule,u=new Response(i),_=[i.__beforeBegin,i["on:begin"]];for(const i of _)if(i&&(i(o,u),u.isMatchIgnored))return doIgnore(s);return i&&i.endSameAsBegin&&(i.endRe=function escape(o){return new RegExp(o.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}(s)),i.skip?Z+=s:(i.excludeBegin&&(Z+=s),processBuffer(),i.returnBegin||i.excludeBegin||(Z=s)),startNewMode(i),i.returnBegin?0:s.length}function doEndMatch(o){const i=o[0],u=s.substr(o.index),_=endOfMode(U,o,u);if(!_)return Pe;const w=U;w.skip?Z+=i:(w.returnEnd||w.excludeEnd||(Z+=i),processBuffer(),w.excludeEnd&&(Z=i));do{U.className&&Y.closeNode(),U.skip||U.subLanguage||(ee+=U.relevance),U=U.parent}while(U!==_.parent);return _.starts&&(_.endSameAsBegin&&(_.starts.endRe=_.endRe),startNewMode(_.starts)),w.returnEnd?0:i.length}let j={};function processLexeme(i,_){const x=_&&_[0];if(Z+=i,null==x)return processBuffer(),0;if("begin"===j.type&&"end"===_.type&&j.index===_.index&&""===x){if(Z+=s.slice(_.index,_.index+1),!w){const s=new Error("0 width match regex");throw s.languageName=o,s.badRule=j.rule,s}return 1}if(j=_,"begin"===_.type)return doBeginMatch(_);if("illegal"===_.type&&!u){const o=new Error('Illegal lexeme "'+x+'" for mode "'+(U.className||"")+'"');throw o.mode=U,o}if("end"===_.type){const o=doEndMatch(_);if(o!==Pe)return o}if("illegal"===_.type&&""===x)return 1;if(ae>1e5&&ae>3*_.index){throw new Error("potential infinite loop, way more iterations than matches")}return Z+=x,x.length}const B=getLanguage(o);if(!B)throw error(C.replace("{}",o)),new Error('Unknown language: "'+o+'"');const $=compileLanguage(B,{plugins:_});let V="",U=x||$;const z={},Y=new L.__emitter(L);!function processContinuations(){const o=[];for(let s=U;s!==B;s=s.parent)s.className&&o.unshift(s.className);o.forEach((o=>Y.openNode(o)))}();let Z="",ee=0,ie=0,ae=0,ce=!1;try{for(U.matcher.considerAll();;){ae++,ce?ce=!1:U.matcher.considerAll(),U.matcher.lastIndex=ie;const o=U.matcher.exec(s);if(!o)break;const i=processLexeme(s.substring(ie,o.index),o);ie=o.index+i}return processLexeme(s.substr(ie)),Y.closeAllNodes(),Y.finalize(),V=Y.toHTML(),{relevance:Math.floor(ee),value:V,language:o,illegal:!1,emitter:Y,top:U}}catch(i){if(i.message&&i.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:i.message,context:s.slice(ie-100,ie+100),mode:i.mode},sofar:V,relevance:0,value:Se(s),emitter:Y};if(w)return{illegal:!1,relevance:0,value:Se(s),emitter:Y,language:o,top:U,errorRaised:i};throw i}}function highlightAuto(o,s){s=s||L.languages||Object.keys(i);const u=function justTextHighlightResult(o){const s={relevance:0,emitter:new L.__emitter(L),value:Se(o),illegal:!1,top:j};return s.emitter.addText(o),s}(o),_=s.filter(getLanguage).filter(autoDetection).map((s=>_highlight(s,o,!1)));_.unshift(u);const w=_.sort(((o,s)=>{if(o.relevance!==s.relevance)return s.relevance-o.relevance;if(o.language&&s.language){if(getLanguage(o.language).supersetOf===s.language)return 1;if(getLanguage(s.language).supersetOf===o.language)return-1}return 0})),[x,C]=w,B=x;return B.second_best=C,B}const B={"before:highlightElement":({el:o})=>{L.useBR&&(o.innerHTML=o.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:o})=>{L.useBR&&(o.value=o.value.replace(/\n/g,"
"))}},$=/^(<[^>]+>|\t)+/gm,V={"after:highlightElement":({result:o})=>{L.tabReplace&&(o.value=o.value.replace($,(o=>o.replace(/\t/g,L.tabReplace))))}};function highlightElement(o){let s=null;const i=function blockLanguage(o){let s=o.className+" ";s+=o.parentNode?o.parentNode.className:"";const i=L.languageDetectRe.exec(s);if(i){const s=getLanguage(i[1]);return s||(warn(C.replace("{}",i[1])),warn("Falling back to no-highlight mode for this block.",o)),s?i[1]:"no-highlight"}return s.split(/\s+/).find((o=>shouldNotHighlight(o)||getLanguage(o)))}(o);if(shouldNotHighlight(i))return;fire("before:highlightElement",{el:o,language:i}),s=o;const _=s.textContent,w=i?highlight(_,{language:i,ignoreIllegals:!0}):highlightAuto(_);fire("after:highlightElement",{el:o,result:w,text:_}),o.innerHTML=w.value,function updateClassName(o,s,i){const _=s?u[s]:i;o.classList.add("hljs"),_&&o.classList.add(_)}(o,i,w.language),o.result={language:w.language,re:w.relevance,relavance:w.relevance},w.second_best&&(o.second_best={language:w.second_best.language,re:w.second_best.relevance,relavance:w.second_best.relevance})}const initHighlighting=()=>{if(initHighlighting.called)return;initHighlighting.called=!0,deprecated("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(highlightElement)};let U=!1;function highlightAll(){if("loading"===document.readyState)return void(U=!0);document.querySelectorAll("pre code").forEach(highlightElement)}function getLanguage(o){return o=(o||"").toLowerCase(),i[o]||i[u[o]]}function registerAliases(o,{languageName:s}){"string"==typeof o&&(o=[o]),o.forEach((o=>{u[o.toLowerCase()]=s}))}function autoDetection(o){const s=getLanguage(o);return s&&!s.disableAutodetect}function fire(o,s){const i=o;_.forEach((function(o){o[i]&&o[i](s)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function boot(){U&&highlightAll()}),!1),Object.assign(o,{highlight,highlightAuto,highlightAll,fixMarkup:function deprecateFixMarkup(o){return deprecated("10.2.0","fixMarkup will be removed entirely in v11.0"),deprecated("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),function fixMarkup(o){return L.tabReplace||L.useBR?o.replace(x,(o=>"\n"===o?L.useBR?"
":o:L.tabReplace?o.replace(/\t/g,L.tabReplace):o)):o}(o)},highlightElement,highlightBlock:function deprecateHighlightBlock(o){return deprecated("10.7.0","highlightBlock will be removed entirely in v12.0"),deprecated("10.7.0","Please use highlightElement now."),highlightElement(o)},configure:function configure(o){o.useBR&&(deprecated("10.3.0","'useBR' will be removed entirely in v11.0"),deprecated("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),L=xe(L,o)},initHighlighting,initHighlightingOnLoad:function initHighlightingOnLoad(){deprecated("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),U=!0},registerLanguage:function registerLanguage(s,u){let _=null;try{_=u(o)}catch(o){if(error("Language definition for '{}' could not be registered.".replace("{}",s)),!w)throw o;error(o),_=j}_.name||(_.name=s),i[s]=_,_.rawDefinition=u.bind(null,o),_.aliases&®isterAliases(_.aliases,{languageName:s})},unregisterLanguage:function unregisterLanguage(o){delete i[o];for(const s of Object.keys(u))u[s]===o&&delete u[s]},listLanguages:function listLanguages(){return Object.keys(i)},getLanguage,registerAliases,requireLanguage:function requireLanguage(o){deprecated("10.4.0","requireLanguage will be removed entirely in v11."),deprecated("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const s=getLanguage(o);if(s)return s;throw new Error("The '{}' language is required, but not loaded.".replace("{}",o))},autoDetection,inherit:xe,addPlugin:function addPlugin(o){!function upgradePluginAPI(o){o["before:highlightBlock"]&&!o["before:highlightElement"]&&(o["before:highlightElement"]=s=>{o["before:highlightBlock"](Object.assign({block:s.el},s))}),o["after:highlightBlock"]&&!o["after:highlightElement"]&&(o["after:highlightElement"]=s=>{o["after:highlightBlock"](Object.assign({block:s.el},s))})}(o),_.push(o)},vuePlugin:BuildVuePlugin(o).VuePlugin}),o.debugMode=function(){w=!1},o.safeMode=function(){w=!0},o.versionString="10.7.3";for(const o in fe)"object"==typeof fe[o]&&s(fe[o]);return Object.assign(o,fe),o.addPlugin(B),o.addPlugin(_e),o.addPlugin(V),o}({});o.exports=Te},35344:o=>{function concat(...o){return o.map((o=>function source(o){return o?"string"==typeof o?o:o.source:null}(o))).join("")}o.exports=function bash(o){const s={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[s]}]};Object.assign(s,{className:"variable",variants:[{begin:concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const u={className:"subst",begin:/\$\(/,end:/\)/,contains:[o.BACKSLASH_ESCAPE]},_={begin:/<<-?\s*(?=\w+)/,starts:{contains:[o.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},w={className:"string",begin:/"/,end:/"/,contains:[o.BACKSLASH_ESCAPE,s,u]};u.contains.push(w);const x={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},o.NUMBER_MODE,s]},C=o.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),j={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[o.inherit(o.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"},contains:[C,o.SHEBANG(),j,x,o.HASH_COMMENT_MODE,_,w,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}},73402:o=>{function concat(...o){return o.map((o=>function source(o){return o?"string"==typeof o?o:o.source:null}(o))).join("")}o.exports=function http(o){const s="HTTP/(2|1\\.[01])",i={className:"attribute",begin:concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},u=[i,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+s+" \\d{3})",end:/$/,contains:[{className:"meta",begin:s},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:u}},{begin:"(?=^[A-Z]+ (.*?) "+s+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:s},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:u}},o.inherit(i,{relevance:0})]}}},95089:o=>{const s="[A-Za-z$_][0-9A-Za-z$_]*",i=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],u=["true","false","null","undefined","NaN","Infinity"],_=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function lookahead(o){return concat("(?=",o,")")}function concat(...o){return o.map((o=>function source(o){return o?"string"==typeof o?o:o.source:null}(o))).join("")}o.exports=function javascript(o){const w=s,x="<>",C="",j={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(o,s)=>{const i=o[0].length+o.index,u=o.input[i];"<"!==u?">"===u&&(((o,{after:s})=>{const i="",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:o.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:L,contains:le}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:x,end:C},{begin:j.begin,"on:begin":j.isTrulyOpeningTag,end:j.end}],subLanguage:"xml",contains:[{begin:j.begin,end:j.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:L,contains:["self",o.inherit(o.TITLE_MODE,{begin:w}),pe],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:o.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[pe,o.inherit(o.TITLE_MODE,{begin:w})]},{variants:[{begin:"\\."+w},{begin:"\\$"+w}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},o.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[o.inherit(o.TITLE_MODE,{begin:w}),"self",pe]},{begin:"(get|set)\\s+(?="+w+"\\()",end:/\{/,keywords:"get set",contains:[o.inherit(o.TITLE_MODE,{begin:w}),{begin:/\(\)/},pe]},{begin:/\$[(.]/}]}}},65772:o=>{o.exports=function json(o){const s={literal:"true false null"},i=[o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE],u=[o.QUOTE_STRING_MODE,o.C_NUMBER_MODE],_={end:",",endsWithParent:!0,excludeEnd:!0,contains:u,keywords:s},w={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[o.BACKSLASH_ESCAPE],illegal:"\\n"},o.inherit(_,{begin:/:/})].concat(i),illegal:"\\S"},x={begin:"\\[",end:"\\]",contains:[o.inherit(_)],illegal:"\\S"};return u.push(w,x),i.forEach((function(o){u.push(o)})),{name:"JSON",contains:u,keywords:s,illegal:"\\S"}}},26571:o=>{o.exports=function powershell(o){const s={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},i={begin:"`[\\s\\S]",relevance:0},u={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},_={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[i,u,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},w={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},x=o.inherit(o.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]}]}),C={className:"built_in",variants:[{begin:"(".concat("Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",")+(-)[\\w\\d]+")}]},j={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[o.TITLE_MODE]},L={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:/\w[\w\d]*((-)[\w\d]+)*/,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[u]}]},B={begin:/using\s/,end:/$/,returnBegin:!0,contains:[_,w,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},$={variants:[{className:"operator",begin:"(".concat("-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",")\\b")},{className:"literal",begin:/(-)[\w\d]+/,relevance:0}]},V={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(s.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},o.inherit(o.TITLE_MODE,{endsParent:!0})]},U=[V,x,i,o.NUMBER_MODE,_,w,C,u,{className:"literal",begin:/\$(null|true|false)\b/},{className:"selector-tag",begin:/@\B/,relevance:0}],z={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",U,{begin:"("+["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"].join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return V.contains.unshift(z),{name:"PowerShell",aliases:["ps","ps1"],case_insensitive:!0,keywords:s,contains:U.concat(j,L,B,$,z)}}},17285:o=>{function source(o){return o?"string"==typeof o?o:o.source:null}function lookahead(o){return concat("(?=",o,")")}function concat(...o){return o.map((o=>source(o))).join("")}function either(...o){return"("+o.map((o=>source(o))).join("|")+")"}o.exports=function xml(o){const s=concat(/[A-Z_]/,function optional(o){return concat("(",o,")?")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},u={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},_=o.inherit(u,{begin:/\(/,end:/\)/}),w=o.inherit(o.APOS_STRING_MODE,{className:"meta-string"}),x=o.inherit(o.QUOTE_STRING_MODE,{className:"meta-string"}),C={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[u,x,w,_,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[u,_,x,w]}]}]},o.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[C],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[C],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:s,relevance:0,starts:C}]},{className:"tag",begin:concat(/<\//,lookahead(concat(s,/>/))),contains:[{className:"name",begin:s,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},17533:o=>{o.exports=function yaml(o){var s="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",u={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[o.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},_=o.inherit(u,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),w={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:s,relevance:0},C={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},j={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},L=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+o.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+o.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},o.HASH_COMMENT_MODE,{beginKeywords:s,keywords:{literal:s}},w,{className:"number",begin:o.C_NUMBER_RE+"\\b",relevance:0},C,j,u],B=[...L];return B.pop(),B.push(_),x.contains=B,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:L}}},251:(o,s)=>{s.read=function(o,s,i,u,_){var w,x,C=8*_-u-1,j=(1<>1,B=-7,$=i?_-1:0,V=i?-1:1,U=o[s+$];for($+=V,w=U&(1<<-B)-1,U>>=-B,B+=C;B>0;w=256*w+o[s+$],$+=V,B-=8);for(x=w&(1<<-B)-1,w>>=-B,B+=u;B>0;x=256*x+o[s+$],$+=V,B-=8);if(0===w)w=1-L;else{if(w===j)return x?NaN:1/0*(U?-1:1);x+=Math.pow(2,u),w-=L}return(U?-1:1)*x*Math.pow(2,w-u)},s.write=function(o,s,i,u,_,w){var x,C,j,L=8*w-_-1,B=(1<>1,V=23===_?Math.pow(2,-24)-Math.pow(2,-77):0,U=u?0:w-1,z=u?1:-1,Y=s<0||0===s&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(C=isNaN(s)?1:0,x=B):(x=Math.floor(Math.log(s)/Math.LN2),s*(j=Math.pow(2,-x))<1&&(x--,j*=2),(s+=x+$>=1?V/j:V*Math.pow(2,1-$))*j>=2&&(x++,j/=2),x+$>=B?(C=0,x=B):x+$>=1?(C=(s*j-1)*Math.pow(2,_),x+=$):(C=s*Math.pow(2,$-1)*Math.pow(2,_),x=0));_>=8;o[i+U]=255&C,U+=z,C/=256,_-=8);for(x=x<<_|C,L+=_;L>0;o[i+U]=255&x,U+=z,x/=256,L-=8);o[i+U-z]|=128*Y}},9404:function(o){o.exports=function(){"use strict";var o=Array.prototype.slice;function createClass(o,s){s&&(o.prototype=Object.create(s.prototype)),o.prototype.constructor=o}function Iterable(o){return isIterable(o)?o:Seq(o)}function KeyedIterable(o){return isKeyed(o)?o:KeyedSeq(o)}function IndexedIterable(o){return isIndexed(o)?o:IndexedSeq(o)}function SetIterable(o){return isIterable(o)&&!isAssociative(o)?o:SetSeq(o)}function isIterable(o){return!(!o||!o[s])}function isKeyed(o){return!(!o||!o[i])}function isIndexed(o){return!(!o||!o[u])}function isAssociative(o){return isKeyed(o)||isIndexed(o)}function isOrdered(o){return!(!o||!o[_])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var s="@@__IMMUTABLE_ITERABLE__@@",i="@@__IMMUTABLE_KEYED__@@",u="@@__IMMUTABLE_INDEXED__@@",_="@@__IMMUTABLE_ORDERED__@@",w="delete",x=5,C=1<>>0;if(""+i!==s||4294967295===i)return NaN;s=i}return s<0?ensureSize(o)+s:s}function returnTrue(){return!0}function wholeSlice(o,s,i){return(0===o||void 0!==i&&o<=-i)&&(void 0===s||void 0!==i&&s>=i)}function resolveBegin(o,s){return resolveIndex(o,s,0)}function resolveEnd(o,s){return resolveIndex(o,s,s)}function resolveIndex(o,s,i){return void 0===o?i:o<0?Math.max(0,s+o):void 0===s?o:Math.min(s,o)}var V=0,U=1,z=2,Y="function"==typeof Symbol&&Symbol.iterator,Z="@@iterator",ee=Y||Z;function Iterator(o){this.next=o}function iteratorValue(o,s,i,u){var _=0===o?s:1===o?i:[s,i];return u?u.value=_:u={value:_,done:!1},u}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(o){return!!getIteratorFn(o)}function isIterator(o){return o&&"function"==typeof o.next}function getIterator(o){var s=getIteratorFn(o);return s&&s.call(o)}function getIteratorFn(o){var s=o&&(Y&&o[Y]||o[Z]);if("function"==typeof s)return s}function isArrayLike(o){return o&&"number"==typeof o.length}function Seq(o){return null==o?emptySequence():isIterable(o)?o.toSeq():seqFromValue(o)}function KeyedSeq(o){return null==o?emptySequence().toKeyedSeq():isIterable(o)?isKeyed(o)?o.toSeq():o.fromEntrySeq():keyedSeqFromValue(o)}function IndexedSeq(o){return null==o?emptySequence():isIterable(o)?isKeyed(o)?o.entrySeq():o.toIndexedSeq():indexedSeqFromValue(o)}function SetSeq(o){return(null==o?emptySequence():isIterable(o)?isKeyed(o)?o.entrySeq():o:indexedSeqFromValue(o)).toSetSeq()}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=V,Iterator.VALUES=U,Iterator.ENTRIES=z,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[ee]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(o,s){return seqIterate(this,o,s,!0)},Seq.prototype.__iterator=function(o,s){return seqIterator(this,o,s,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq.prototype.__iterate=function(o,s){return seqIterate(this,o,s,!1)},IndexedSeq.prototype.__iterator=function(o,s){return seqIterator(this,o,s,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ie,ae,ce,le="@@__IMMUTABLE_SEQ__@@";function ArraySeq(o){this._array=o,this.size=o.length}function ObjectSeq(o){var s=Object.keys(o);this._object=o,this._keys=s,this.size=s.length}function IterableSeq(o){this._iterable=o,this.size=o.length||o.size}function IteratorSeq(o){this._iterator=o,this._iteratorCache=[]}function isSeq(o){return!(!o||!o[le])}function emptySequence(){return ie||(ie=new ArraySeq([]))}function keyedSeqFromValue(o){var s=Array.isArray(o)?new ArraySeq(o).fromEntrySeq():isIterator(o)?new IteratorSeq(o).fromEntrySeq():hasIterator(o)?new IterableSeq(o).fromEntrySeq():"object"==typeof o?new ObjectSeq(o):void 0;if(!s)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+o);return s}function indexedSeqFromValue(o){var s=maybeIndexedSeqFromValue(o);if(!s)throw new TypeError("Expected Array or iterable object of values: "+o);return s}function seqFromValue(o){var s=maybeIndexedSeqFromValue(o)||"object"==typeof o&&new ObjectSeq(o);if(!s)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+o);return s}function maybeIndexedSeqFromValue(o){return isArrayLike(o)?new ArraySeq(o):isIterator(o)?new IteratorSeq(o):hasIterator(o)?new IterableSeq(o):void 0}function seqIterate(o,s,i,u){var _=o._cache;if(_){for(var w=_.length-1,x=0;x<=w;x++){var C=_[i?w-x:x];if(!1===s(C[1],u?C[0]:x,o))return x+1}return x}return o.__iterateUncached(s,i)}function seqIterator(o,s,i,u){var _=o._cache;if(_){var w=_.length-1,x=0;return new Iterator((function(){var o=_[i?w-x:x];return x++>w?iteratorDone():iteratorValue(s,u?o[0]:x-1,o[1])}))}return o.__iteratorUncached(s,i)}function fromJS(o,s){return s?fromJSWith(s,o,"",{"":o}):fromJSDefault(o)}function fromJSWith(o,s,i,u){return Array.isArray(s)?o.call(u,i,IndexedSeq(s).map((function(i,u){return fromJSWith(o,i,u,s)}))):isPlainObj(s)?o.call(u,i,KeyedSeq(s).map((function(i,u){return fromJSWith(o,i,u,s)}))):s}function fromJSDefault(o){return Array.isArray(o)?IndexedSeq(o).map(fromJSDefault).toList():isPlainObj(o)?KeyedSeq(o).map(fromJSDefault).toMap():o}function isPlainObj(o){return o&&(o.constructor===Object||void 0===o.constructor)}function is(o,s){if(o===s||o!=o&&s!=s)return!0;if(!o||!s)return!1;if("function"==typeof o.valueOf&&"function"==typeof s.valueOf){if((o=o.valueOf())===(s=s.valueOf())||o!=o&&s!=s)return!0;if(!o||!s)return!1}return!("function"!=typeof o.equals||"function"!=typeof s.equals||!o.equals(s))}function deepEqual(o,s){if(o===s)return!0;if(!isIterable(s)||void 0!==o.size&&void 0!==s.size&&o.size!==s.size||void 0!==o.__hash&&void 0!==s.__hash&&o.__hash!==s.__hash||isKeyed(o)!==isKeyed(s)||isIndexed(o)!==isIndexed(s)||isOrdered(o)!==isOrdered(s))return!1;if(0===o.size&&0===s.size)return!0;var i=!isAssociative(o);if(isOrdered(o)){var u=o.entries();return s.every((function(o,s){var _=u.next().value;return _&&is(_[1],o)&&(i||is(_[0],s))}))&&u.next().done}var _=!1;if(void 0===o.size)if(void 0===s.size)"function"==typeof o.cacheResult&&o.cacheResult();else{_=!0;var w=o;o=s,s=w}var x=!0,C=s.__iterate((function(s,u){if(i?!o.has(s):_?!is(s,o.get(u,L)):!is(o.get(u,L),s))return x=!1,!1}));return x&&o.size===C}function Repeat(o,s){if(!(this instanceof Repeat))return new Repeat(o,s);if(this._value=o,this.size=void 0===s?1/0:Math.max(0,s),0===this.size){if(ae)return ae;ae=this}}function invariant(o,s){if(!o)throw new Error(s)}function Range(o,s,i){if(!(this instanceof Range))return new Range(o,s,i);if(invariant(0!==i,"Cannot step a Range by 0"),o=o||0,void 0===s&&(s=1/0),i=void 0===i?1:Math.abs(i),su?iteratorDone():iteratorValue(o,_,i[s?u-_++:_++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(o,s){return void 0===s||this.has(o)?this._object[o]:s},ObjectSeq.prototype.has=function(o){return this._object.hasOwnProperty(o)},ObjectSeq.prototype.__iterate=function(o,s){for(var i=this._object,u=this._keys,_=u.length-1,w=0;w<=_;w++){var x=u[s?_-w:w];if(!1===o(i[x],x,this))return w+1}return w},ObjectSeq.prototype.__iterator=function(o,s){var i=this._object,u=this._keys,_=u.length-1,w=0;return new Iterator((function(){var x=u[s?_-w:w];return w++>_?iteratorDone():iteratorValue(o,x,i[x])}))},ObjectSeq.prototype[_]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(o,s){if(s)return this.cacheResult().__iterate(o,s);var i=getIterator(this._iterable),u=0;if(isIterator(i))for(var _;!(_=i.next()).done&&!1!==o(_.value,u++,this););return u},IterableSeq.prototype.__iteratorUncached=function(o,s){if(s)return this.cacheResult().__iterator(o,s);var i=getIterator(this._iterable);if(!isIterator(i))return new Iterator(iteratorDone);var u=0;return new Iterator((function(){var s=i.next();return s.done?s:iteratorValue(o,u++,s.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(o,s){if(s)return this.cacheResult().__iterate(o,s);for(var i,u=this._iterator,_=this._iteratorCache,w=0;w<_.length;)if(!1===o(_[w],w++,this))return w;for(;!(i=u.next()).done;){var x=i.value;if(_[w]=x,!1===o(x,w++,this))break}return w},IteratorSeq.prototype.__iteratorUncached=function(o,s){if(s)return this.cacheResult().__iterator(o,s);var i=this._iterator,u=this._iteratorCache,_=0;return new Iterator((function(){if(_>=u.length){var s=i.next();if(s.done)return s;u[_]=s.value}return iteratorValue(o,_,u[_++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Repeat.prototype.get=function(o,s){return this.has(o)?this._value:s},Repeat.prototype.includes=function(o){return is(this._value,o)},Repeat.prototype.slice=function(o,s){var i=this.size;return wholeSlice(o,s,i)?this:new Repeat(this._value,resolveEnd(s,i)-resolveBegin(o,i))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(o){return is(this._value,o)?0:-1},Repeat.prototype.lastIndexOf=function(o){return is(this._value,o)?this.size:-1},Repeat.prototype.__iterate=function(o,s){for(var i=0;i=0&&s=0&&ii?iteratorDone():iteratorValue(o,w++,x)}))},Range.prototype.equals=function(o){return o instanceof Range?this._start===o._start&&this._end===o._end&&this._step===o._step:deepEqual(this,o)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var pe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(o,s){var i=65535&(o|=0),u=65535&(s|=0);return i*u+((o>>>16)*u+i*(s>>>16)<<16>>>0)|0};function smi(o){return o>>>1&1073741824|3221225471&o}function hash(o){if(!1===o||null==o)return 0;if("function"==typeof o.valueOf&&(!1===(o=o.valueOf())||null==o))return 0;if(!0===o)return 1;var s=typeof o;if("number"===s){if(o!=o||o===1/0)return 0;var i=0|o;for(i!==o&&(i^=4294967295*o);o>4294967295;)i^=o/=4294967295;return smi(i)}if("string"===s)return o.length>Se?cachedHashString(o):hashString(o);if("function"==typeof o.hashCode)return o.hashCode();if("object"===s)return hashJSObj(o);if("function"==typeof o.toString)return hashString(o.toString());throw new Error("Value type "+s+" cannot be hashed.")}function cachedHashString(o){var s=Te[o];return void 0===s&&(s=hashString(o),Pe===xe&&(Pe=0,Te={}),Pe++,Te[o]=s),s}function hashString(o){for(var s=0,i=0;i0)switch(o.nodeType){case 1:return o.uniqueID;case 9:return o.documentElement&&o.documentElement.uniqueID}}var ye,be="function"==typeof WeakMap;be&&(ye=new WeakMap);var _e=0,we="__immutablehash__";"function"==typeof Symbol&&(we=Symbol(we));var Se=16,xe=255,Pe=0,Te={};function assertNotInfinite(o){invariant(o!==1/0,"Cannot perform this action with an infinite size.")}function Map(o){return null==o?emptyMap():isMap(o)&&!isOrdered(o)?o:emptyMap().withMutations((function(s){var i=KeyedIterable(o);assertNotInfinite(i.size),i.forEach((function(o,i){return s.set(i,o)}))}))}function isMap(o){return!(!o||!o[qe])}createClass(Map,KeyedCollection),Map.of=function(){var s=o.call(arguments,0);return emptyMap().withMutations((function(o){for(var i=0;i=s.length)throw new Error("Missing value for key: "+s[i]);o.set(s[i],s[i+1])}}))},Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(o,s){return this._root?this._root.get(0,void 0,o,s):s},Map.prototype.set=function(o,s){return updateMap(this,o,s)},Map.prototype.setIn=function(o,s){return this.updateIn(o,L,(function(){return s}))},Map.prototype.remove=function(o){return updateMap(this,o,L)},Map.prototype.deleteIn=function(o){return this.updateIn(o,(function(){return L}))},Map.prototype.update=function(o,s,i){return 1===arguments.length?o(this):this.updateIn([o],s,i)},Map.prototype.updateIn=function(o,s,i){i||(i=s,s=void 0);var u=updateInDeepMap(this,forceIterator(o),s,i);return u===L?void 0:u},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(s){return mergeIntoMapWith(this,s,o.call(arguments,1))},Map.prototype.mergeIn=function(s){var i=o.call(arguments,1);return this.updateIn(s,emptyMap(),(function(o){return"function"==typeof o.merge?o.merge.apply(o,i):i[i.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(s){var i=o.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(s),i)},Map.prototype.mergeDeepIn=function(s){var i=o.call(arguments,1);return this.updateIn(s,emptyMap(),(function(o){return"function"==typeof o.mergeDeep?o.mergeDeep.apply(o,i):i[i.length-1]}))},Map.prototype.sort=function(o){return OrderedMap(sortFactory(this,o))},Map.prototype.sortBy=function(o,s){return OrderedMap(sortFactory(this,s,o))},Map.prototype.withMutations=function(o){var s=this.asMutable();return o(s),s.wasAltered()?s.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(o,s){return new MapIterator(this,o,s)},Map.prototype.__iterate=function(o,s){var i=this,u=0;return this._root&&this._root.iterate((function(s){return u++,o(s[1],s[0],i)}),s),u},Map.prototype.__ensureOwner=function(o){return o===this.__ownerID?this:o?makeMap(this.size,this._root,o,this.__hash):(this.__ownerID=o,this.__altered=!1,this)},Map.isMap=isMap;var Re,qe="@@__IMMUTABLE_MAP__@@",$e=Map.prototype;function ArrayMapNode(o,s){this.ownerID=o,this.entries=s}function BitmapIndexedNode(o,s,i){this.ownerID=o,this.bitmap=s,this.nodes=i}function HashArrayMapNode(o,s,i){this.ownerID=o,this.count=s,this.nodes=i}function HashCollisionNode(o,s,i){this.ownerID=o,this.keyHash=s,this.entries=i}function ValueNode(o,s,i){this.ownerID=o,this.keyHash=s,this.entry=i}function MapIterator(o,s,i){this._type=s,this._reverse=i,this._stack=o._root&&mapIteratorFrame(o._root)}function mapIteratorValue(o,s){return iteratorValue(o,s[0],s[1])}function mapIteratorFrame(o,s){return{node:o,index:0,__prev:s}}function makeMap(o,s,i,u){var _=Object.create($e);return _.size=o,_._root=s,_.__ownerID=i,_.__hash=u,_.__altered=!1,_}function emptyMap(){return Re||(Re=makeMap(0))}function updateMap(o,s,i){var u,_;if(o._root){var w=MakeRef(B),x=MakeRef($);if(u=updateNode(o._root,o.__ownerID,0,void 0,s,i,w,x),!x.value)return o;_=o.size+(w.value?i===L?-1:1:0)}else{if(i===L)return o;_=1,u=new ArrayMapNode(o.__ownerID,[[s,i]])}return o.__ownerID?(o.size=_,o._root=u,o.__hash=void 0,o.__altered=!0,o):u?makeMap(_,u):emptyMap()}function updateNode(o,s,i,u,_,w,x,C){return o?o.update(s,i,u,_,w,x,C):w===L?o:(SetRef(C),SetRef(x),new ValueNode(s,u,[_,w]))}function isLeafNode(o){return o.constructor===ValueNode||o.constructor===HashCollisionNode}function mergeIntoNode(o,s,i,u,_){if(o.keyHash===u)return new HashCollisionNode(s,u,[o.entry,_]);var w,C=(0===i?o.keyHash:o.keyHash>>>i)&j,L=(0===i?u:u>>>i)&j;return new BitmapIndexedNode(s,1<>>=1)x[j]=1&i?s[w++]:void 0;return x[u]=_,new HashArrayMapNode(o,w+1,x)}function mergeIntoMapWith(o,s,i){for(var u=[],_=0;_>1&1431655765))+(o>>2&858993459))+(o>>4)&252645135,o+=o>>8,127&(o+=o>>16)}function setIn(o,s,i,u){var _=u?o:arrCopy(o);return _[s]=i,_}function spliceIn(o,s,i,u){var _=o.length+1;if(u&&s+1===_)return o[s]=i,o;for(var w=new Array(_),x=0,C=0;C<_;C++)C===s?(w[C]=i,x=-1):w[C]=o[C+x];return w}function spliceOut(o,s,i){var u=o.length-1;if(i&&s===u)return o.pop(),o;for(var _=new Array(u),w=0,x=0;x=ze)return createNodes(o,j,u,_);var U=o&&o===this.ownerID,z=U?j:arrCopy(j);return V?C?B===$-1?z.pop():z[B]=z.pop():z[B]=[u,_]:z.push([u,_]),U?(this.entries=z,this):new ArrayMapNode(o,z)}},BitmapIndexedNode.prototype.get=function(o,s,i,u){void 0===s&&(s=hash(i));var _=1<<((0===o?s:s>>>o)&j),w=this.bitmap;return w&_?this.nodes[popCount(w&_-1)].get(o+x,s,i,u):u},BitmapIndexedNode.prototype.update=function(o,s,i,u,_,w,C){void 0===i&&(i=hash(u));var B=(0===s?i:i>>>s)&j,$=1<=We)return expandNodes(o,Y,V,B,ee);if(U&&!ee&&2===Y.length&&isLeafNode(Y[1^z]))return Y[1^z];if(U&&ee&&1===Y.length&&isLeafNode(ee))return ee;var ie=o&&o===this.ownerID,ae=U?ee?V:V^$:V|$,ce=U?ee?setIn(Y,z,ee,ie):spliceOut(Y,z,ie):spliceIn(Y,z,ee,ie);return ie?(this.bitmap=ae,this.nodes=ce,this):new BitmapIndexedNode(o,ae,ce)},HashArrayMapNode.prototype.get=function(o,s,i,u){void 0===s&&(s=hash(i));var _=(0===o?s:s>>>o)&j,w=this.nodes[_];return w?w.get(o+x,s,i,u):u},HashArrayMapNode.prototype.update=function(o,s,i,u,_,w,C){void 0===i&&(i=hash(u));var B=(0===s?i:i>>>s)&j,$=_===L,V=this.nodes,U=V[B];if($&&!U)return this;var z=updateNode(U,o,s+x,i,u,_,w,C);if(z===U)return this;var Y=this.count;if(U){if(!z&&--Y0&&u=0&&o>>s&j;if(u>=this.array.length)return new VNode([],o);var _,w=0===u;if(s>0){var C=this.array[u];if((_=C&&C.removeBefore(o,s-x,i))===C&&w)return this}if(w&&!_)return this;var L=editableVNode(this,o);if(!w)for(var B=0;B>>s&j;if(_>=this.array.length)return this;if(s>0){var w=this.array[_];if((u=w&&w.removeAfter(o,s-x,i))===w&&_===this.array.length-1)return this}var C=editableVNode(this,o);return C.array.splice(_+1),u&&(C.array[_]=u),C};var Qe,et,tt={};function iterateList(o,s){var i=o._origin,u=o._capacity,_=getTailOffset(u),w=o._tail;return iterateNodeOrLeaf(o._root,o._level,0);function iterateNodeOrLeaf(o,s,i){return 0===s?iterateLeaf(o,i):iterateNode(o,s,i)}function iterateLeaf(o,x){var j=x===_?w&&w.array:o&&o.array,L=x>i?0:i-x,B=u-x;return B>C&&(B=C),function(){if(L===B)return tt;var o=s?--B:L++;return j&&j[o]}}function iterateNode(o,_,w){var j,L=o&&o.array,B=w>i?0:i-w>>_,$=1+(u-w>>_);return $>C&&($=C),function(){for(;;){if(j){var o=j();if(o!==tt)return o;j=null}if(B===$)return tt;var i=s?--$:B++;j=iterateNodeOrLeaf(L&&L[i],_-x,w+(i<<_))}}}}function makeList(o,s,i,u,_,w,x){var C=Object.create(Xe);return C.size=s-o,C._origin=o,C._capacity=s,C._level=i,C._root=u,C._tail=_,C.__ownerID=w,C.__hash=x,C.__altered=!1,C}function emptyList(){return Qe||(Qe=makeList(0,0,x))}function updateList(o,s,i){if((s=wrapIndex(o,s))!=s)return o;if(s>=o.size||s<0)return o.withMutations((function(o){s<0?setListBounds(o,s).set(0,i):setListBounds(o,0,s+1).set(s,i)}));s+=o._origin;var u=o._tail,_=o._root,w=MakeRef($);return s>=getTailOffset(o._capacity)?u=updateVNode(u,o.__ownerID,0,s,i,w):_=updateVNode(_,o.__ownerID,o._level,s,i,w),w.value?o.__ownerID?(o._root=_,o._tail=u,o.__hash=void 0,o.__altered=!0,o):makeList(o._origin,o._capacity,o._level,_,u):o}function updateVNode(o,s,i,u,_,w){var C,L=u>>>i&j,B=o&&L0){var $=o&&o.array[L],V=updateVNode($,s,i-x,u,_,w);return V===$?o:((C=editableVNode(o,s)).array[L]=V,C)}return B&&o.array[L]===_?o:(SetRef(w),C=editableVNode(o,s),void 0===_&&L===C.array.length-1?C.array.pop():C.array[L]=_,C)}function editableVNode(o,s){return s&&o&&s===o.ownerID?o:new VNode(o?o.array.slice():[],s)}function listNodeFor(o,s){if(s>=getTailOffset(o._capacity))return o._tail;if(s<1<0;)i=i.array[s>>>u&j],u-=x;return i}}function setListBounds(o,s,i){void 0!==s&&(s|=0),void 0!==i&&(i|=0);var u=o.__ownerID||new OwnerID,_=o._origin,w=o._capacity,C=_+s,L=void 0===i?w:i<0?w+i:_+i;if(C===_&&L===w)return o;if(C>=L)return o.clear();for(var B=o._level,$=o._root,V=0;C+V<0;)$=new VNode($&&$.array.length?[void 0,$]:[],u),V+=1<<(B+=x);V&&(C+=V,_+=V,L+=V,w+=V);for(var U=getTailOffset(w),z=getTailOffset(L);z>=1<U?new VNode([],u):Y;if(Y&&z>U&&Cx;ie-=x){var ae=U>>>ie&j;ee=ee.array[ae]=editableVNode(ee.array[ae],u)}ee.array[U>>>x&j]=Y}if(L=z)C-=z,L-=z,B=x,$=null,Z=Z&&Z.removeBefore(u,0,C);else if(C>_||z>>B&j;if(ce!==z>>>B&j)break;ce&&(V+=(1<_&&($=$.removeBefore(u,B,C-V)),$&&z_&&(_=C.size),isIterable(x)||(C=C.map((function(o){return fromJS(o)}))),u.push(C)}return _>o.size&&(o=o.setSize(_)),mergeIntoCollectionWith(o,s,u)}function getTailOffset(o){return o>>x<=C&&x.size>=2*w.size?(u=(_=x.filter((function(o,s){return void 0!==o&&j!==s}))).toKeyedSeq().map((function(o){return o[0]})).flip().toMap(),o.__ownerID&&(u.__ownerID=_.__ownerID=o.__ownerID)):(u=w.remove(s),_=j===x.size-1?x.pop():x.set(j,void 0))}else if(B){if(i===x.get(j)[1])return o;u=w,_=x.set(j,[s,i])}else u=w.set(s,x.size),_=x.set(x.size,[s,i]);return o.__ownerID?(o.size=u.size,o._map=u,o._list=_,o.__hash=void 0,o):makeOrderedMap(u,_)}function ToKeyedSequence(o,s){this._iter=o,this._useKeys=s,this.size=o.size}function ToIndexedSequence(o){this._iter=o,this.size=o.size}function ToSetSequence(o){this._iter=o,this.size=o.size}function FromEntriesSequence(o){this._iter=o,this.size=o.size}function flipFactory(o){var s=makeSequence(o);return s._iter=o,s.size=o.size,s.flip=function(){return o},s.reverse=function(){var s=o.reverse.apply(this);return s.flip=function(){return o.reverse()},s},s.has=function(s){return o.includes(s)},s.includes=function(s){return o.has(s)},s.cacheResult=cacheResultThrough,s.__iterateUncached=function(s,i){var u=this;return o.__iterate((function(o,i){return!1!==s(i,o,u)}),i)},s.__iteratorUncached=function(s,i){if(s===z){var u=o.__iterator(s,i);return new Iterator((function(){var o=u.next();if(!o.done){var s=o.value[0];o.value[0]=o.value[1],o.value[1]=s}return o}))}return o.__iterator(s===U?V:U,i)},s}function mapFactory(o,s,i){var u=makeSequence(o);return u.size=o.size,u.has=function(s){return o.has(s)},u.get=function(u,_){var w=o.get(u,L);return w===L?_:s.call(i,w,u,o)},u.__iterateUncached=function(u,_){var w=this;return o.__iterate((function(o,_,x){return!1!==u(s.call(i,o,_,x),_,w)}),_)},u.__iteratorUncached=function(u,_){var w=o.__iterator(z,_);return new Iterator((function(){var _=w.next();if(_.done)return _;var x=_.value,C=x[0];return iteratorValue(u,C,s.call(i,x[1],C,o),_)}))},u}function reverseFactory(o,s){var i=makeSequence(o);return i._iter=o,i.size=o.size,i.reverse=function(){return o},o.flip&&(i.flip=function(){var s=flipFactory(o);return s.reverse=function(){return o.flip()},s}),i.get=function(i,u){return o.get(s?i:-1-i,u)},i.has=function(i){return o.has(s?i:-1-i)},i.includes=function(s){return o.includes(s)},i.cacheResult=cacheResultThrough,i.__iterate=function(s,i){var u=this;return o.__iterate((function(o,i){return s(o,i,u)}),!i)},i.__iterator=function(s,i){return o.__iterator(s,!i)},i}function filterFactory(o,s,i,u){var _=makeSequence(o);return u&&(_.has=function(u){var _=o.get(u,L);return _!==L&&!!s.call(i,_,u,o)},_.get=function(u,_){var w=o.get(u,L);return w!==L&&s.call(i,w,u,o)?w:_}),_.__iterateUncached=function(_,w){var x=this,C=0;return o.__iterate((function(o,w,j){if(s.call(i,o,w,j))return C++,_(o,u?w:C-1,x)}),w),C},_.__iteratorUncached=function(_,w){var x=o.__iterator(z,w),C=0;return new Iterator((function(){for(;;){var w=x.next();if(w.done)return w;var j=w.value,L=j[0],B=j[1];if(s.call(i,B,L,o))return iteratorValue(_,u?L:C++,B,w)}}))},_}function countByFactory(o,s,i){var u=Map().asMutable();return o.__iterate((function(_,w){u.update(s.call(i,_,w,o),0,(function(o){return o+1}))})),u.asImmutable()}function groupByFactory(o,s,i){var u=isKeyed(o),_=(isOrdered(o)?OrderedMap():Map()).asMutable();o.__iterate((function(w,x){_.update(s.call(i,w,x,o),(function(o){return(o=o||[]).push(u?[x,w]:w),o}))}));var w=iterableClass(o);return _.map((function(s){return reify(o,w(s))}))}function sliceFactory(o,s,i,u){var _=o.size;if(void 0!==s&&(s|=0),void 0!==i&&(i===1/0?i=_:i|=0),wholeSlice(s,i,_))return o;var w=resolveBegin(s,_),x=resolveEnd(i,_);if(w!=w||x!=x)return sliceFactory(o.toSeq().cacheResult(),s,i,u);var C,j=x-w;j==j&&(C=j<0?0:j);var L=makeSequence(o);return L.size=0===C?C:o.size&&C||void 0,!u&&isSeq(o)&&C>=0&&(L.get=function(s,i){return(s=wrapIndex(this,s))>=0&&sC)return iteratorDone();var o=_.next();return u||s===U?o:iteratorValue(s,j-1,s===V?void 0:o.value[1],o)}))},L}function takeWhileFactory(o,s,i){var u=makeSequence(o);return u.__iterateUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterate(u,_);var x=0;return o.__iterate((function(o,_,C){return s.call(i,o,_,C)&&++x&&u(o,_,w)})),x},u.__iteratorUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterator(u,_);var x=o.__iterator(z,_),C=!0;return new Iterator((function(){if(!C)return iteratorDone();var o=x.next();if(o.done)return o;var _=o.value,j=_[0],L=_[1];return s.call(i,L,j,w)?u===z?o:iteratorValue(u,j,L,o):(C=!1,iteratorDone())}))},u}function skipWhileFactory(o,s,i,u){var _=makeSequence(o);return _.__iterateUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterate(_,w);var C=!0,j=0;return o.__iterate((function(o,w,L){if(!C||!(C=s.call(i,o,w,L)))return j++,_(o,u?w:j-1,x)})),j},_.__iteratorUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterator(_,w);var C=o.__iterator(z,w),j=!0,L=0;return new Iterator((function(){var o,w,B;do{if((o=C.next()).done)return u||_===U?o:iteratorValue(_,L++,_===V?void 0:o.value[1],o);var $=o.value;w=$[0],B=$[1],j&&(j=s.call(i,B,w,x))}while(j);return _===z?o:iteratorValue(_,w,B,o)}))},_}function concatFactory(o,s){var i=isKeyed(o),u=[o].concat(s).map((function(o){return isIterable(o)?i&&(o=KeyedIterable(o)):o=i?keyedSeqFromValue(o):indexedSeqFromValue(Array.isArray(o)?o:[o]),o})).filter((function(o){return 0!==o.size}));if(0===u.length)return o;if(1===u.length){var _=u[0];if(_===o||i&&isKeyed(_)||isIndexed(o)&&isIndexed(_))return _}var w=new ArraySeq(u);return i?w=w.toKeyedSeq():isIndexed(o)||(w=w.toSetSeq()),(w=w.flatten(!0)).size=u.reduce((function(o,s){if(void 0!==o){var i=s.size;if(void 0!==i)return o+i}}),0),w}function flattenFactory(o,s,i){var u=makeSequence(o);return u.__iterateUncached=function(u,_){var w=0,x=!1;function flatDeep(o,C){var j=this;o.__iterate((function(o,_){return(!s||C0}function zipWithFactory(o,s,i){var u=makeSequence(o);return u.size=new ArraySeq(i).map((function(o){return o.size})).min(),u.__iterate=function(o,s){for(var i,u=this.__iterator(U,s),_=0;!(i=u.next()).done&&!1!==o(i.value,_++,this););return _},u.__iteratorUncached=function(o,u){var _=i.map((function(o){return o=Iterable(o),getIterator(u?o.reverse():o)})),w=0,x=!1;return new Iterator((function(){var i;return x||(i=_.map((function(o){return o.next()})),x=i.some((function(o){return o.done}))),x?iteratorDone():iteratorValue(o,w++,s.apply(null,i.map((function(o){return o.value}))))}))},u}function reify(o,s){return isSeq(o)?s:o.constructor(s)}function validateEntry(o){if(o!==Object(o))throw new TypeError("Expected [K, V] tuple: "+o)}function resolveSize(o){return assertNotInfinite(o.size),ensureSize(o)}function iterableClass(o){return isKeyed(o)?KeyedIterable:isIndexed(o)?IndexedIterable:SetIterable}function makeSequence(o){return Object.create((isKeyed(o)?KeyedSeq:isIndexed(o)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(o,s){return o>s?1:o=0;i--)s={value:arguments[i],next:s};return this.__ownerID?(this.size=o,this._head=s,this.__hash=void 0,this.__altered=!0,this):makeStack(o,s)},Stack.prototype.pushAll=function(o){if(0===(o=IndexedIterable(o)).size)return this;assertNotInfinite(o.size);var s=this.size,i=this._head;return o.reverse().forEach((function(o){s++,i={value:o,next:i}})),this.__ownerID?(this.size=s,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(s,i)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(o){return this.pushAll(o)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(o,s){if(wholeSlice(o,s,this.size))return this;var i=resolveBegin(o,this.size);if(resolveEnd(s,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,o,s);for(var u=this.size-i,_=this._head;i--;)_=_.next;return this.__ownerID?(this.size=u,this._head=_,this.__hash=void 0,this.__altered=!0,this):makeStack(u,_)},Stack.prototype.__ensureOwner=function(o){return o===this.__ownerID?this:o?makeStack(this.size,this._head,o,this.__hash):(this.__ownerID=o,this.__altered=!1,this)},Stack.prototype.__iterate=function(o,s){if(s)return this.reverse().__iterate(o);for(var i=0,u=this._head;u&&!1!==o(u.value,i++,this);)u=u.next;return i},Stack.prototype.__iterator=function(o,s){if(s)return this.reverse().__iterator(o);var i=0,u=this._head;return new Iterator((function(){if(u){var s=u.value;return u=u.next,iteratorValue(o,i++,s)}return iteratorDone()}))},Stack.isStack=isStack;var ct,lt="@@__IMMUTABLE_STACK__@@",ut=Stack.prototype;function makeStack(o,s,i,u){var _=Object.create(ut);return _.size=o,_._head=s,_.__ownerID=i,_.__hash=u,_.__altered=!1,_}function emptyStack(){return ct||(ct=makeStack(0))}function mixin(o,s){var keyCopier=function(i){o.prototype[i]=s[i]};return Object.keys(s).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(s).forEach(keyCopier),o}ut[lt]=!0,ut.withMutations=$e.withMutations,ut.asMutable=$e.asMutable,ut.asImmutable=$e.asImmutable,ut.wasAltered=$e.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var o=new Array(this.size||0);return this.valueSeq().__iterate((function(s,i){o[i]=s})),o},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(o){return o&&"function"==typeof o.toJS?o.toJS():o})).__toJS()},toJSON:function(){return this.toSeq().map((function(o){return o&&"function"==typeof o.toJSON?o.toJSON():o})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var o={};return this.__iterate((function(s,i){o[i]=s})),o},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(o,s){return 0===this.size?o+s:o+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+s},concat:function(){return reify(this,concatFactory(this,o.call(arguments,0)))},includes:function(o){return this.some((function(s){return is(s,o)}))},entries:function(){return this.__iterator(z)},every:function(o,s){assertNotInfinite(this.size);var i=!0;return this.__iterate((function(u,_,w){if(!o.call(s,u,_,w))return i=!1,!1})),i},filter:function(o,s){return reify(this,filterFactory(this,o,s,!0))},find:function(o,s,i){var u=this.findEntry(o,s);return u?u[1]:i},forEach:function(o,s){return assertNotInfinite(this.size),this.__iterate(s?o.bind(s):o)},join:function(o){assertNotInfinite(this.size),o=void 0!==o?""+o:",";var s="",i=!0;return this.__iterate((function(u){i?i=!1:s+=o,s+=null!=u?u.toString():""})),s},keys:function(){return this.__iterator(V)},map:function(o,s){return reify(this,mapFactory(this,o,s))},reduce:function(o,s,i){var u,_;return assertNotInfinite(this.size),arguments.length<2?_=!0:u=s,this.__iterate((function(s,w,x){_?(_=!1,u=s):u=o.call(i,u,s,w,x)})),u},reduceRight:function(o,s,i){var u=this.toKeyedSeq().reverse();return u.reduce.apply(u,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(o,s){return reify(this,sliceFactory(this,o,s,!0))},some:function(o,s){return!this.every(not(o),s)},sort:function(o){return reify(this,sortFactory(this,o))},values:function(){return this.__iterator(U)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(o,s){return ensureSize(o?this.toSeq().filter(o,s):this)},countBy:function(o,s){return countByFactory(this,o,s)},equals:function(o){return deepEqual(this,o)},entrySeq:function(){var o=this;if(o._cache)return new ArraySeq(o._cache);var s=o.toSeq().map(entryMapper).toIndexedSeq();return s.fromEntrySeq=function(){return o.toSeq()},s},filterNot:function(o,s){return this.filter(not(o),s)},findEntry:function(o,s,i){var u=i;return this.__iterate((function(i,_,w){if(o.call(s,i,_,w))return u=[_,i],!1})),u},findKey:function(o,s){var i=this.findEntry(o,s);return i&&i[0]},findLast:function(o,s,i){return this.toKeyedSeq().reverse().find(o,s,i)},findLastEntry:function(o,s,i){return this.toKeyedSeq().reverse().findEntry(o,s,i)},findLastKey:function(o,s){return this.toKeyedSeq().reverse().findKey(o,s)},first:function(){return this.find(returnTrue)},flatMap:function(o,s){return reify(this,flatMapFactory(this,o,s))},flatten:function(o){return reify(this,flattenFactory(this,o,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(o,s){return this.find((function(s,i){return is(i,o)}),void 0,s)},getIn:function(o,s){for(var i,u=this,_=forceIterator(o);!(i=_.next()).done;){var w=i.value;if((u=u&&u.get?u.get(w,L):L)===L)return s}return u},groupBy:function(o,s){return groupByFactory(this,o,s)},has:function(o){return this.get(o,L)!==L},hasIn:function(o){return this.getIn(o,L)!==L},isSubset:function(o){return o="function"==typeof o.includes?o:Iterable(o),this.every((function(s){return o.includes(s)}))},isSuperset:function(o){return(o="function"==typeof o.isSubset?o:Iterable(o)).isSubset(this)},keyOf:function(o){return this.findKey((function(s){return is(s,o)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(o){return this.toKeyedSeq().reverse().keyOf(o)},max:function(o){return maxFactory(this,o)},maxBy:function(o,s){return maxFactory(this,s,o)},min:function(o){return maxFactory(this,o?neg(o):defaultNegComparator)},minBy:function(o,s){return maxFactory(this,s?neg(s):defaultNegComparator,o)},rest:function(){return this.slice(1)},skip:function(o){return this.slice(Math.max(0,o))},skipLast:function(o){return reify(this,this.toSeq().reverse().skip(o).reverse())},skipWhile:function(o,s){return reify(this,skipWhileFactory(this,o,s,!0))},skipUntil:function(o,s){return this.skipWhile(not(o),s)},sortBy:function(o,s){return reify(this,sortFactory(this,s,o))},take:function(o){return this.slice(0,Math.max(0,o))},takeLast:function(o){return reify(this,this.toSeq().reverse().take(o).reverse())},takeWhile:function(o,s){return reify(this,takeWhileFactory(this,o,s))},takeUntil:function(o,s){return this.takeWhile(not(o),s)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var pt=Iterable.prototype;pt[s]=!0,pt[ee]=pt.values,pt.__toJS=pt.toArray,pt.__toStringMapper=quoteString,pt.inspect=pt.toSource=function(){return this.toString()},pt.chain=pt.flatMap,pt.contains=pt.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(o,s){var i=this,u=0;return reify(this,this.toSeq().map((function(_,w){return o.call(s,[w,_],u++,i)})).fromEntrySeq())},mapKeys:function(o,s){var i=this;return reify(this,this.toSeq().flip().map((function(u,_){return o.call(s,u,_,i)})).flip())}});var ht=KeyedIterable.prototype;function keyMapper(o,s){return s}function entryMapper(o,s){return[s,o]}function not(o){return function(){return!o.apply(this,arguments)}}function neg(o){return function(){return-o.apply(this,arguments)}}function quoteString(o){return"string"==typeof o?JSON.stringify(o):String(o)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(o,s){return os?-1:0}function hashIterable(o){if(o.size===1/0)return 0;var s=isOrdered(o),i=isKeyed(o),u=s?1:0;return murmurHashOfSize(o.__iterate(i?s?function(o,s){u=31*u+hashMerge(hash(o),hash(s))|0}:function(o,s){u=u+hashMerge(hash(o),hash(s))|0}:s?function(o){u=31*u+hash(o)|0}:function(o){u=u+hash(o)|0}),u)}function murmurHashOfSize(o,s){return s=pe(s,3432918353),s=pe(s<<15|s>>>-15,461845907),s=pe(s<<13|s>>>-13,5),s=pe((s=s+3864292196^o)^s>>>16,2246822507),s=smi((s=pe(s^s>>>13,3266489909))^s>>>16)}function hashMerge(o,s){return o^s+2654435769+(o<<6)+(o>>2)}return ht[i]=!0,ht[ee]=pt.entries,ht.__toJS=pt.toObject,ht.__toStringMapper=function(o,s){return JSON.stringify(s)+": "+quoteString(o)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(o,s){return reify(this,filterFactory(this,o,s,!1))},findIndex:function(o,s){var i=this.findEntry(o,s);return i?i[0]:-1},indexOf:function(o){var s=this.keyOf(o);return void 0===s?-1:s},lastIndexOf:function(o){var s=this.lastKeyOf(o);return void 0===s?-1:s},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(o,s){return reify(this,sliceFactory(this,o,s,!1))},splice:function(o,s){var i=arguments.length;if(s=Math.max(0|s,0),0===i||2===i&&!s)return this;o=resolveBegin(o,o<0?this.count():this.size);var u=this.slice(0,o);return reify(this,1===i?u:u.concat(arrCopy(arguments,2),this.slice(o+s)))},findLastIndex:function(o,s){var i=this.findLastEntry(o,s);return i?i[0]:-1},first:function(){return this.get(0)},flatten:function(o){return reify(this,flattenFactory(this,o,!1))},get:function(o,s){return(o=wrapIndex(this,o))<0||this.size===1/0||void 0!==this.size&&o>this.size?s:this.find((function(s,i){return i===o}),void 0,s)},has:function(o){return(o=wrapIndex(this,o))>=0&&(void 0!==this.size?this.size===1/0||o{"function"==typeof Object.create?o.exports=function inherits(o,s){s&&(o.super_=s,o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:o.exports=function inherits(o,s){if(s){o.super_=s;var TempCtor=function(){};TempCtor.prototype=s.prototype,o.prototype=new TempCtor,o.prototype.constructor=o}}},5419:o=>{o.exports=function(o,s,i,u){var _=new Blob(void 0!==u?[u,o]:[o],{type:i||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(_,s);else{var w=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(_):window.webkitURL.createObjectURL(_),x=document.createElement("a");x.style.display="none",x.href=w,x.setAttribute("download",s),void 0===x.download&&x.setAttribute("target","_blank"),document.body.appendChild(x),x.click(),setTimeout((function(){document.body.removeChild(x),window.URL.revokeObjectURL(w)}),200)}}},20181:(o,s,i)=>{var u=NaN,_="[object Symbol]",w=/^\s+|\s+$/g,x=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,j=/^0o[0-7]+$/i,L=parseInt,B="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,$="object"==typeof self&&self&&self.Object===Object&&self,V=B||$||Function("return this")(),U=Object.prototype.toString,z=Math.max,Y=Math.min,now=function(){return V.Date.now()};function isObject(o){var s=typeof o;return!!o&&("object"==s||"function"==s)}function toNumber(o){if("number"==typeof o)return o;if(function isSymbol(o){return"symbol"==typeof o||function isObjectLike(o){return!!o&&"object"==typeof o}(o)&&U.call(o)==_}(o))return u;if(isObject(o)){var s="function"==typeof o.valueOf?o.valueOf():o;o=isObject(s)?s+"":s}if("string"!=typeof o)return 0===o?o:+o;o=o.replace(w,"");var i=C.test(o);return i||j.test(o)?L(o.slice(2),i?2:8):x.test(o)?u:+o}o.exports=function debounce(o,s,i){var u,_,w,x,C,j,L=0,B=!1,$=!1,V=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function invokeFunc(s){var i=u,w=_;return u=_=void 0,L=s,x=o.apply(w,i)}function shouldInvoke(o){var i=o-j;return void 0===j||i>=s||i<0||$&&o-L>=w}function timerExpired(){var o=now();if(shouldInvoke(o))return trailingEdge(o);C=setTimeout(timerExpired,function remainingWait(o){var i=s-(o-j);return $?Y(i,w-(o-L)):i}(o))}function trailingEdge(o){return C=void 0,V&&u?invokeFunc(o):(u=_=void 0,x)}function debounced(){var o=now(),i=shouldInvoke(o);if(u=arguments,_=this,j=o,i){if(void 0===C)return function leadingEdge(o){return L=o,C=setTimeout(timerExpired,s),B?invokeFunc(o):x}(j);if($)return C=setTimeout(timerExpired,s),invokeFunc(j)}return void 0===C&&(C=setTimeout(timerExpired,s)),x}return s=toNumber(s)||0,isObject(i)&&(B=!!i.leading,w=($="maxWait"in i)?z(toNumber(i.maxWait)||0,s):w,V="trailing"in i?!!i.trailing:V),debounced.cancel=function cancel(){void 0!==C&&clearTimeout(C),L=0,u=j=_=C=void 0},debounced.flush=function flush(){return void 0===C?x:trailingEdge(now())},debounced}},55580:(o,s,i)=>{var u=i(56110)(i(9325),"DataView");o.exports=u},21549:(o,s,i)=>{var u=i(22032),_=i(63862),w=i(66721),x=i(12749),C=i(35749);function Hash(o){var s=-1,i=null==o?0:o.length;for(this.clear();++s{var u=i(39344),_=i(94033);function LazyWrapper(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}LazyWrapper.prototype=u(_.prototype),LazyWrapper.prototype.constructor=LazyWrapper,o.exports=LazyWrapper},80079:(o,s,i)=>{var u=i(63702),_=i(70080),w=i(24739),x=i(48655),C=i(31175);function ListCache(o){var s=-1,i=null==o?0:o.length;for(this.clear();++s{var u=i(39344),_=i(94033);function LodashWrapper(o,s){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=void 0}LodashWrapper.prototype=u(_.prototype),LodashWrapper.prototype.constructor=LodashWrapper,o.exports=LodashWrapper},68223:(o,s,i)=>{var u=i(56110)(i(9325),"Map");o.exports=u},53661:(o,s,i)=>{var u=i(63040),_=i(17670),w=i(90289),x=i(4509),C=i(72949);function MapCache(o){var s=-1,i=null==o?0:o.length;for(this.clear();++s{var u=i(56110)(i(9325),"Promise");o.exports=u},76545:(o,s,i)=>{var u=i(56110)(i(9325),"Set");o.exports=u},38859:(o,s,i)=>{var u=i(53661),_=i(31380),w=i(51459);function SetCache(o){var s=-1,i=null==o?0:o.length;for(this.__data__=new u;++s{var u=i(80079),_=i(51420),w=i(90938),x=i(63605),C=i(29817),j=i(80945);function Stack(o){var s=this.__data__=new u(o);this.size=s.size}Stack.prototype.clear=_,Stack.prototype.delete=w,Stack.prototype.get=x,Stack.prototype.has=C,Stack.prototype.set=j,o.exports=Stack},51873:(o,s,i)=>{var u=i(9325).Symbol;o.exports=u},37828:(o,s,i)=>{var u=i(9325).Uint8Array;o.exports=u},28303:(o,s,i)=>{var u=i(56110)(i(9325),"WeakMap");o.exports=u},91033:o=>{o.exports=function apply(o,s,i){switch(i.length){case 0:return o.call(s);case 1:return o.call(s,i[0]);case 2:return o.call(s,i[0],i[1]);case 3:return o.call(s,i[0],i[1],i[2])}return o.apply(s,i)}},83729:o=>{o.exports=function arrayEach(o,s){for(var i=-1,u=null==o?0:o.length;++i{o.exports=function arrayFilter(o,s){for(var i=-1,u=null==o?0:o.length,_=0,w=[];++i{var u=i(96131);o.exports=function arrayIncludes(o,s){return!!(null==o?0:o.length)&&u(o,s,0)>-1}},70695:(o,s,i)=>{var u=i(78096),_=i(72428),w=i(56449),x=i(3656),C=i(30361),j=i(37167),L=Object.prototype.hasOwnProperty;o.exports=function arrayLikeKeys(o,s){var i=w(o),B=!i&&_(o),$=!i&&!B&&x(o),V=!i&&!B&&!$&&j(o),U=i||B||$||V,z=U?u(o.length,String):[],Y=z.length;for(var Z in o)!s&&!L.call(o,Z)||U&&("length"==Z||$&&("offset"==Z||"parent"==Z)||V&&("buffer"==Z||"byteLength"==Z||"byteOffset"==Z)||C(Z,Y))||z.push(Z);return z}},34932:o=>{o.exports=function arrayMap(o,s){for(var i=-1,u=null==o?0:o.length,_=Array(u);++i{o.exports=function arrayPush(o,s){for(var i=-1,u=s.length,_=o.length;++i{o.exports=function arrayReduce(o,s,i,u){var _=-1,w=null==o?0:o.length;for(u&&w&&(i=o[++_]);++_{o.exports=function arraySome(o,s){for(var i=-1,u=null==o?0:o.length;++i{o.exports=function asciiToArray(o){return o.split("")}},1733:o=>{var s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;o.exports=function asciiWords(o){return o.match(s)||[]}},87805:(o,s,i)=>{var u=i(43360),_=i(75288);o.exports=function assignMergeValue(o,s,i){(void 0!==i&&!_(o[s],i)||void 0===i&&!(s in o))&&u(o,s,i)}},16547:(o,s,i)=>{var u=i(43360),_=i(75288),w=Object.prototype.hasOwnProperty;o.exports=function assignValue(o,s,i){var x=o[s];w.call(o,s)&&_(x,i)&&(void 0!==i||s in o)||u(o,s,i)}},26025:(o,s,i)=>{var u=i(75288);o.exports=function assocIndexOf(o,s){for(var i=o.length;i--;)if(u(o[i][0],s))return i;return-1}},74733:(o,s,i)=>{var u=i(21791),_=i(95950);o.exports=function baseAssign(o,s){return o&&u(s,_(s),o)}},43838:(o,s,i)=>{var u=i(21791),_=i(37241);o.exports=function baseAssignIn(o,s){return o&&u(s,_(s),o)}},43360:(o,s,i)=>{var u=i(93243);o.exports=function baseAssignValue(o,s,i){"__proto__"==s&&u?u(o,s,{configurable:!0,enumerable:!0,value:i,writable:!0}):o[s]=i}},9999:(o,s,i)=>{var u=i(37217),_=i(83729),w=i(16547),x=i(74733),C=i(43838),j=i(93290),L=i(23007),B=i(92271),$=i(48948),V=i(50002),U=i(83349),z=i(5861),Y=i(76189),Z=i(77199),ee=i(35529),ie=i(56449),ae=i(3656),ce=i(87730),le=i(23805),pe=i(38440),de=i(95950),fe=i(37241),ye="[object Arguments]",be="[object Function]",_e="[object Object]",we={};we[ye]=we["[object Array]"]=we["[object ArrayBuffer]"]=we["[object DataView]"]=we["[object Boolean]"]=we["[object Date]"]=we["[object Float32Array]"]=we["[object Float64Array]"]=we["[object Int8Array]"]=we["[object Int16Array]"]=we["[object Int32Array]"]=we["[object Map]"]=we["[object Number]"]=we[_e]=we["[object RegExp]"]=we["[object Set]"]=we["[object String]"]=we["[object Symbol]"]=we["[object Uint8Array]"]=we["[object Uint8ClampedArray]"]=we["[object Uint16Array]"]=we["[object Uint32Array]"]=!0,we["[object Error]"]=we[be]=we["[object WeakMap]"]=!1,o.exports=function baseClone(o,s,i,Se,xe,Pe){var Te,Re=1&s,qe=2&s,$e=4&s;if(i&&(Te=xe?i(o,Se,xe,Pe):i(o)),void 0!==Te)return Te;if(!le(o))return o;var ze=ie(o);if(ze){if(Te=Y(o),!Re)return L(o,Te)}else{var We=z(o),He=We==be||"[object GeneratorFunction]"==We;if(ae(o))return j(o,Re);if(We==_e||We==ye||He&&!xe){if(Te=qe||He?{}:ee(o),!Re)return qe?$(o,C(Te,o)):B(o,x(Te,o))}else{if(!we[We])return xe?o:{};Te=Z(o,We,Re)}}Pe||(Pe=new u);var Ye=Pe.get(o);if(Ye)return Ye;Pe.set(o,Te),pe(o)?o.forEach((function(u){Te.add(baseClone(u,s,i,u,o,Pe))})):ce(o)&&o.forEach((function(u,_){Te.set(_,baseClone(u,s,i,_,o,Pe))}));var Xe=ze?void 0:($e?qe?U:V:qe?fe:de)(o);return _(Xe||o,(function(u,_){Xe&&(u=o[_=u]),w(Te,_,baseClone(u,s,i,_,o,Pe))})),Te}},39344:(o,s,i)=>{var u=i(23805),_=Object.create,w=function(){function object(){}return function(o){if(!u(o))return{};if(_)return _(o);object.prototype=o;var s=new object;return object.prototype=void 0,s}}();o.exports=w},80909:(o,s,i)=>{var u=i(30641),_=i(38329)(u);o.exports=_},2523:o=>{o.exports=function baseFindIndex(o,s,i,u){for(var _=o.length,w=i+(u?1:-1);u?w--:++w<_;)if(s(o[w],w,o))return w;return-1}},83120:(o,s,i)=>{var u=i(14528),_=i(45891);o.exports=function baseFlatten(o,s,i,w,x){var C=-1,j=o.length;for(i||(i=_),x||(x=[]);++C0&&i(L)?s>1?baseFlatten(L,s-1,i,w,x):u(x,L):w||(x[x.length]=L)}return x}},86649:(o,s,i)=>{var u=i(83221)();o.exports=u},30641:(o,s,i)=>{var u=i(86649),_=i(95950);o.exports=function baseForOwn(o,s){return o&&u(o,s,_)}},47422:(o,s,i)=>{var u=i(31769),_=i(77797);o.exports=function baseGet(o,s){for(var i=0,w=(s=u(s,o)).length;null!=o&&i{var u=i(14528),_=i(56449);o.exports=function baseGetAllKeys(o,s,i){var w=s(o);return _(o)?w:u(w,i(o))}},72552:(o,s,i)=>{var u=i(51873),_=i(659),w=i(59350),x=u?u.toStringTag:void 0;o.exports=function baseGetTag(o){return null==o?void 0===o?"[object Undefined]":"[object Null]":x&&x in Object(o)?_(o):w(o)}},20426:o=>{var s=Object.prototype.hasOwnProperty;o.exports=function baseHas(o,i){return null!=o&&s.call(o,i)}},28077:o=>{o.exports=function baseHasIn(o,s){return null!=o&&s in Object(o)}},96131:(o,s,i)=>{var u=i(2523),_=i(85463),w=i(76959);o.exports=function baseIndexOf(o,s,i){return s==s?w(o,s,i):u(o,_,i)}},27534:(o,s,i)=>{var u=i(72552),_=i(40346);o.exports=function baseIsArguments(o){return _(o)&&"[object Arguments]"==u(o)}},60270:(o,s,i)=>{var u=i(87068),_=i(40346);o.exports=function baseIsEqual(o,s,i,w,x){return o===s||(null==o||null==s||!_(o)&&!_(s)?o!=o&&s!=s:u(o,s,i,w,baseIsEqual,x))}},87068:(o,s,i)=>{var u=i(37217),_=i(25911),w=i(21986),x=i(50689),C=i(5861),j=i(56449),L=i(3656),B=i(37167),$="[object Arguments]",V="[object Array]",U="[object Object]",z=Object.prototype.hasOwnProperty;o.exports=function baseIsEqualDeep(o,s,i,Y,Z,ee){var ie=j(o),ae=j(s),ce=ie?V:C(o),le=ae?V:C(s),pe=(ce=ce==$?U:ce)==U,de=(le=le==$?U:le)==U,fe=ce==le;if(fe&&L(o)){if(!L(s))return!1;ie=!0,pe=!1}if(fe&&!pe)return ee||(ee=new u),ie||B(o)?_(o,s,i,Y,Z,ee):w(o,s,ce,i,Y,Z,ee);if(!(1&i)){var ye=pe&&z.call(o,"__wrapped__"),be=de&&z.call(s,"__wrapped__");if(ye||be){var _e=ye?o.value():o,we=be?s.value():s;return ee||(ee=new u),Z(_e,we,i,Y,ee)}}return!!fe&&(ee||(ee=new u),x(o,s,i,Y,Z,ee))}},29172:(o,s,i)=>{var u=i(5861),_=i(40346);o.exports=function baseIsMap(o){return _(o)&&"[object Map]"==u(o)}},41799:(o,s,i)=>{var u=i(37217),_=i(60270);o.exports=function baseIsMatch(o,s,i,w){var x=i.length,C=x,j=!w;if(null==o)return!C;for(o=Object(o);x--;){var L=i[x];if(j&&L[2]?L[1]!==o[L[0]]:!(L[0]in o))return!1}for(;++x{o.exports=function baseIsNaN(o){return o!=o}},45083:(o,s,i)=>{var u=i(1882),_=i(87296),w=i(23805),x=i(47473),C=/^\[object .+?Constructor\]$/,j=Function.prototype,L=Object.prototype,B=j.toString,$=L.hasOwnProperty,V=RegExp("^"+B.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o.exports=function baseIsNative(o){return!(!w(o)||_(o))&&(u(o)?V:C).test(x(o))}},16038:(o,s,i)=>{var u=i(5861),_=i(40346);o.exports=function baseIsSet(o){return _(o)&&"[object Set]"==u(o)}},4901:(o,s,i)=>{var u=i(72552),_=i(30294),w=i(40346),x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x["[object Arguments]"]=x["[object Array]"]=x["[object ArrayBuffer]"]=x["[object Boolean]"]=x["[object DataView]"]=x["[object Date]"]=x["[object Error]"]=x["[object Function]"]=x["[object Map]"]=x["[object Number]"]=x["[object Object]"]=x["[object RegExp]"]=x["[object Set]"]=x["[object String]"]=x["[object WeakMap]"]=!1,o.exports=function baseIsTypedArray(o){return w(o)&&_(o.length)&&!!x[u(o)]}},15389:(o,s,i)=>{var u=i(93663),_=i(87978),w=i(83488),x=i(56449),C=i(50583);o.exports=function baseIteratee(o){return"function"==typeof o?o:null==o?w:"object"==typeof o?x(o)?_(o[0],o[1]):u(o):C(o)}},88984:(o,s,i)=>{var u=i(55527),_=i(3650),w=Object.prototype.hasOwnProperty;o.exports=function baseKeys(o){if(!u(o))return _(o);var s=[];for(var i in Object(o))w.call(o,i)&&"constructor"!=i&&s.push(i);return s}},72903:(o,s,i)=>{var u=i(23805),_=i(55527),w=i(90181),x=Object.prototype.hasOwnProperty;o.exports=function baseKeysIn(o){if(!u(o))return w(o);var s=_(o),i=[];for(var C in o)("constructor"!=C||!s&&x.call(o,C))&&i.push(C);return i}},94033:o=>{o.exports=function baseLodash(){}},93663:(o,s,i)=>{var u=i(41799),_=i(10776),w=i(67197);o.exports=function baseMatches(o){var s=_(o);return 1==s.length&&s[0][2]?w(s[0][0],s[0][1]):function(i){return i===o||u(i,o,s)}}},87978:(o,s,i)=>{var u=i(60270),_=i(58156),w=i(80631),x=i(28586),C=i(30756),j=i(67197),L=i(77797);o.exports=function baseMatchesProperty(o,s){return x(o)&&C(s)?j(L(o),s):function(i){var x=_(i,o);return void 0===x&&x===s?w(i,o):u(s,x,3)}}},85250:(o,s,i)=>{var u=i(37217),_=i(87805),w=i(86649),x=i(42824),C=i(23805),j=i(37241),L=i(14974);o.exports=function baseMerge(o,s,i,B,$){o!==s&&w(s,(function(w,j){if($||($=new u),C(w))x(o,s,j,i,baseMerge,B,$);else{var V=B?B(L(o,j),w,j+"",o,s,$):void 0;void 0===V&&(V=w),_(o,j,V)}}),j)}},42824:(o,s,i)=>{var u=i(87805),_=i(93290),w=i(71961),x=i(23007),C=i(35529),j=i(72428),L=i(56449),B=i(83693),$=i(3656),V=i(1882),U=i(23805),z=i(11331),Y=i(37167),Z=i(14974),ee=i(69884);o.exports=function baseMergeDeep(o,s,i,ie,ae,ce,le){var pe=Z(o,i),de=Z(s,i),fe=le.get(de);if(fe)u(o,i,fe);else{var ye=ce?ce(pe,de,i+"",o,s,le):void 0,be=void 0===ye;if(be){var _e=L(de),we=!_e&&$(de),Se=!_e&&!we&&Y(de);ye=de,_e||we||Se?L(pe)?ye=pe:B(pe)?ye=x(pe):we?(be=!1,ye=_(de,!0)):Se?(be=!1,ye=w(de,!0)):ye=[]:z(de)||j(de)?(ye=pe,j(pe)?ye=ee(pe):U(pe)&&!V(pe)||(ye=C(de))):be=!1}be&&(le.set(de,ye),ae(ye,de,ie,ce,le),le.delete(de)),u(o,i,ye)}}},47237:o=>{o.exports=function baseProperty(o){return function(s){return null==s?void 0:s[o]}}},17255:(o,s,i)=>{var u=i(47422);o.exports=function basePropertyDeep(o){return function(s){return u(s,o)}}},54552:o=>{o.exports=function basePropertyOf(o){return function(s){return null==o?void 0:o[s]}}},85558:o=>{o.exports=function baseReduce(o,s,i,u,_){return _(o,(function(o,_,w){i=u?(u=!1,o):s(i,o,_,w)})),i}},69302:(o,s,i)=>{var u=i(83488),_=i(56757),w=i(32865);o.exports=function baseRest(o,s){return w(_(o,s,u),o+"")}},73170:(o,s,i)=>{var u=i(16547),_=i(31769),w=i(30361),x=i(23805),C=i(77797);o.exports=function baseSet(o,s,i,j){if(!x(o))return o;for(var L=-1,B=(s=_(s,o)).length,$=B-1,V=o;null!=V&&++L{var u=i(83488),_=i(48152),w=_?function(o,s){return _.set(o,s),o}:u;o.exports=w},19570:(o,s,i)=>{var u=i(37334),_=i(93243),w=i(83488),x=_?function(o,s){return _(o,"toString",{configurable:!0,enumerable:!1,value:u(s),writable:!0})}:w;o.exports=x},25160:o=>{o.exports=function baseSlice(o,s,i){var u=-1,_=o.length;s<0&&(s=-s>_?0:_+s),(i=i>_?_:i)<0&&(i+=_),_=s>i?0:i-s>>>0,s>>>=0;for(var w=Array(_);++u<_;)w[u]=o[u+s];return w}},90916:(o,s,i)=>{var u=i(80909);o.exports=function baseSome(o,s){var i;return u(o,(function(o,u,_){return!(i=s(o,u,_))})),!!i}},78096:o=>{o.exports=function baseTimes(o,s){for(var i=-1,u=Array(o);++i{var u=i(51873),_=i(34932),w=i(56449),x=i(44394),C=u?u.prototype:void 0,j=C?C.toString:void 0;o.exports=function baseToString(o){if("string"==typeof o)return o;if(w(o))return _(o,baseToString)+"";if(x(o))return j?j.call(o):"";var s=o+"";return"0"==s&&1/o==-1/0?"-0":s}},54128:(o,s,i)=>{var u=i(31800),_=/^\s+/;o.exports=function baseTrim(o){return o?o.slice(0,u(o)+1).replace(_,""):o}},27301:o=>{o.exports=function baseUnary(o){return function(s){return o(s)}}},19931:(o,s,i)=>{var u=i(31769),_=i(68090),w=i(68969),x=i(77797);o.exports=function baseUnset(o,s){return s=u(s,o),null==(o=w(o,s))||delete o[x(_(s))]}},51234:o=>{o.exports=function baseZipObject(o,s,i){for(var u=-1,_=o.length,w=s.length,x={};++u<_;){var C=u{o.exports=function cacheHas(o,s){return o.has(s)}},31769:(o,s,i)=>{var u=i(56449),_=i(28586),w=i(61802),x=i(13222);o.exports=function castPath(o,s){return u(o)?o:_(o,s)?[o]:w(x(o))}},28754:(o,s,i)=>{var u=i(25160);o.exports=function castSlice(o,s,i){var _=o.length;return i=void 0===i?_:i,!s&&i>=_?o:u(o,s,i)}},49653:(o,s,i)=>{var u=i(37828);o.exports=function cloneArrayBuffer(o){var s=new o.constructor(o.byteLength);return new u(s).set(new u(o)),s}},93290:(o,s,i)=>{o=i.nmd(o);var u=i(9325),_=s&&!s.nodeType&&s,w=_&&o&&!o.nodeType&&o,x=w&&w.exports===_?u.Buffer:void 0,C=x?x.allocUnsafe:void 0;o.exports=function cloneBuffer(o,s){if(s)return o.slice();var i=o.length,u=C?C(i):new o.constructor(i);return o.copy(u),u}},76169:(o,s,i)=>{var u=i(49653);o.exports=function cloneDataView(o,s){var i=s?u(o.buffer):o.buffer;return new o.constructor(i,o.byteOffset,o.byteLength)}},73201:o=>{var s=/\w*$/;o.exports=function cloneRegExp(o){var i=new o.constructor(o.source,s.exec(o));return i.lastIndex=o.lastIndex,i}},93736:(o,s,i)=>{var u=i(51873),_=u?u.prototype:void 0,w=_?_.valueOf:void 0;o.exports=function cloneSymbol(o){return w?Object(w.call(o)):{}}},71961:(o,s,i)=>{var u=i(49653);o.exports=function cloneTypedArray(o,s){var i=s?u(o.buffer):o.buffer;return new o.constructor(i,o.byteOffset,o.length)}},91596:o=>{var s=Math.max;o.exports=function composeArgs(o,i,u,_){for(var w=-1,x=o.length,C=u.length,j=-1,L=i.length,B=s(x-C,0),$=Array(L+B),V=!_;++j{var s=Math.max;o.exports=function composeArgsRight(o,i,u,_){for(var w=-1,x=o.length,C=-1,j=u.length,L=-1,B=i.length,$=s(x-j,0),V=Array($+B),U=!_;++w<$;)V[w]=o[w];for(var z=w;++L{o.exports=function copyArray(o,s){var i=-1,u=o.length;for(s||(s=Array(u));++i{var u=i(16547),_=i(43360);o.exports=function copyObject(o,s,i,w){var x=!i;i||(i={});for(var C=-1,j=s.length;++C{var u=i(21791),_=i(4664);o.exports=function copySymbols(o,s){return u(o,_(o),s)}},48948:(o,s,i)=>{var u=i(21791),_=i(86375);o.exports=function copySymbolsIn(o,s){return u(o,_(o),s)}},55481:(o,s,i)=>{var u=i(9325)["__core-js_shared__"];o.exports=u},58523:o=>{o.exports=function countHolders(o,s){for(var i=o.length,u=0;i--;)o[i]===s&&++u;return u}},20999:(o,s,i)=>{var u=i(69302),_=i(36800);o.exports=function createAssigner(o){return u((function(s,i){var u=-1,w=i.length,x=w>1?i[w-1]:void 0,C=w>2?i[2]:void 0;for(x=o.length>3&&"function"==typeof x?(w--,x):void 0,C&&_(i[0],i[1],C)&&(x=w<3?void 0:x,w=1),s=Object(s);++u{var u=i(64894);o.exports=function createBaseEach(o,s){return function(i,_){if(null==i)return i;if(!u(i))return o(i,_);for(var w=i.length,x=s?w:-1,C=Object(i);(s?x--:++x{o.exports=function createBaseFor(o){return function(s,i,u){for(var _=-1,w=Object(s),x=u(s),C=x.length;C--;){var j=x[o?C:++_];if(!1===i(w[j],j,w))break}return s}}},11842:(o,s,i)=>{var u=i(82819),_=i(9325);o.exports=function createBind(o,s,i){var w=1&s,x=u(o);return function wrapper(){return(this&&this!==_&&this instanceof wrapper?x:o).apply(w?i:this,arguments)}}},12507:(o,s,i)=>{var u=i(28754),_=i(49698),w=i(63912),x=i(13222);o.exports=function createCaseFirst(o){return function(s){s=x(s);var i=_(s)?w(s):void 0,C=i?i[0]:s.charAt(0),j=i?u(i,1).join(""):s.slice(1);return C[o]()+j}}},45539:(o,s,i)=>{var u=i(40882),_=i(50828),w=i(66645),x=RegExp("['’]","g");o.exports=function createCompounder(o){return function(s){return u(w(_(s).replace(x,"")),o,"")}}},82819:(o,s,i)=>{var u=i(39344),_=i(23805);o.exports=function createCtor(o){return function(){var s=arguments;switch(s.length){case 0:return new o;case 1:return new o(s[0]);case 2:return new o(s[0],s[1]);case 3:return new o(s[0],s[1],s[2]);case 4:return new o(s[0],s[1],s[2],s[3]);case 5:return new o(s[0],s[1],s[2],s[3],s[4]);case 6:return new o(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new o(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var i=u(o.prototype),w=o.apply(i,s);return _(w)?w:i}}},77078:(o,s,i)=>{var u=i(91033),_=i(82819),w=i(37471),x=i(18073),C=i(11287),j=i(36306),L=i(9325);o.exports=function createCurry(o,s,i){var B=_(o);return function wrapper(){for(var _=arguments.length,$=Array(_),V=_,U=C(wrapper);V--;)$[V]=arguments[V];var z=_<3&&$[0]!==U&&$[_-1]!==U?[]:j($,U);return(_-=z.length){var u=i(15389),_=i(64894),w=i(95950);o.exports=function createFind(o){return function(s,i,x){var C=Object(s);if(!_(s)){var j=u(i,3);s=w(s),i=function(o){return j(C[o],o,C)}}var L=o(s,i,x);return L>-1?C[j?s[L]:L]:void 0}}},37471:(o,s,i)=>{var u=i(91596),_=i(53320),w=i(58523),x=i(82819),C=i(18073),j=i(11287),L=i(68294),B=i(36306),$=i(9325);o.exports=function createHybrid(o,s,i,V,U,z,Y,Z,ee,ie){var ae=128&s,ce=1&s,le=2&s,pe=24&s,de=512&s,fe=le?void 0:x(o);return function wrapper(){for(var ye=arguments.length,be=Array(ye),_e=ye;_e--;)be[_e]=arguments[_e];if(pe)var we=j(wrapper),Se=w(be,we);if(V&&(be=u(be,V,U,pe)),z&&(be=_(be,z,Y,pe)),ye-=Se,pe&&ye1&&be.reverse(),ae&&ee{var u=i(91033),_=i(82819),w=i(9325);o.exports=function createPartial(o,s,i,x){var C=1&s,j=_(o);return function wrapper(){for(var s=-1,_=arguments.length,L=-1,B=x.length,$=Array(B+_),V=this&&this!==w&&this instanceof wrapper?j:o;++L{var u=i(85087),_=i(54641),w=i(70981);o.exports=function createRecurry(o,s,i,x,C,j,L,B,$,V){var U=8&s;s|=U?32:64,4&(s&=~(U?64:32))||(s&=-4);var z=[o,s,C,U?j:void 0,U?L:void 0,U?void 0:j,U?void 0:L,B,$,V],Y=i.apply(void 0,z);return u(o)&&_(Y,z),Y.placeholder=x,w(Y,o,s)}},66977:(o,s,i)=>{var u=i(68882),_=i(11842),w=i(77078),x=i(37471),C=i(24168),j=i(37381),L=i(3209),B=i(54641),$=i(70981),V=i(61489),U=Math.max;o.exports=function createWrap(o,s,i,z,Y,Z,ee,ie){var ae=2&s;if(!ae&&"function"!=typeof o)throw new TypeError("Expected a function");var ce=z?z.length:0;if(ce||(s&=-97,z=Y=void 0),ee=void 0===ee?ee:U(V(ee),0),ie=void 0===ie?ie:V(ie),ce-=Y?Y.length:0,64&s){var le=z,pe=Y;z=Y=void 0}var de=ae?void 0:j(o),fe=[o,s,i,z,Y,le,pe,Z,ee,ie];if(de&&L(fe,de),o=fe[0],s=fe[1],i=fe[2],z=fe[3],Y=fe[4],!(ie=fe[9]=void 0===fe[9]?ae?0:o.length:U(fe[9]-ce,0))&&24&s&&(s&=-25),s&&1!=s)ye=8==s||16==s?w(o,s,ie):32!=s&&33!=s||Y.length?x.apply(void 0,fe):C(o,s,i,z);else var ye=_(o,s,i);return $((de?u:B)(ye,fe),o,s)}},53138:(o,s,i)=>{var u=i(11331);o.exports=function customOmitClone(o){return u(o)?void 0:o}},24647:(o,s,i)=>{var u=i(54552)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});o.exports=u},93243:(o,s,i)=>{var u=i(56110),_=function(){try{var o=u(Object,"defineProperty");return o({},"",{}),o}catch(o){}}();o.exports=_},25911:(o,s,i)=>{var u=i(38859),_=i(14248),w=i(19219);o.exports=function equalArrays(o,s,i,x,C,j){var L=1&i,B=o.length,$=s.length;if(B!=$&&!(L&&$>B))return!1;var V=j.get(o),U=j.get(s);if(V&&U)return V==s&&U==o;var z=-1,Y=!0,Z=2&i?new u:void 0;for(j.set(o,s),j.set(s,o);++z{var u=i(51873),_=i(37828),w=i(75288),x=i(25911),C=i(20317),j=i(84247),L=u?u.prototype:void 0,B=L?L.valueOf:void 0;o.exports=function equalByTag(o,s,i,u,L,$,V){switch(i){case"[object DataView]":if(o.byteLength!=s.byteLength||o.byteOffset!=s.byteOffset)return!1;o=o.buffer,s=s.buffer;case"[object ArrayBuffer]":return!(o.byteLength!=s.byteLength||!$(new _(o),new _(s)));case"[object Boolean]":case"[object Date]":case"[object Number]":return w(+o,+s);case"[object Error]":return o.name==s.name&&o.message==s.message;case"[object RegExp]":case"[object String]":return o==s+"";case"[object Map]":var U=C;case"[object Set]":var z=1&u;if(U||(U=j),o.size!=s.size&&!z)return!1;var Y=V.get(o);if(Y)return Y==s;u|=2,V.set(o,s);var Z=x(U(o),U(s),u,L,$,V);return V.delete(o),Z;case"[object Symbol]":if(B)return B.call(o)==B.call(s)}return!1}},50689:(o,s,i)=>{var u=i(50002),_=Object.prototype.hasOwnProperty;o.exports=function equalObjects(o,s,i,w,x,C){var j=1&i,L=u(o),B=L.length;if(B!=u(s).length&&!j)return!1;for(var $=B;$--;){var V=L[$];if(!(j?V in s:_.call(s,V)))return!1}var U=C.get(o),z=C.get(s);if(U&&z)return U==s&&z==o;var Y=!0;C.set(o,s),C.set(s,o);for(var Z=j;++${var u=i(35970),_=i(56757),w=i(32865);o.exports=function flatRest(o){return w(_(o,void 0,u),o+"")}},34840:(o,s,i)=>{var u="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;o.exports=u},50002:(o,s,i)=>{var u=i(82199),_=i(4664),w=i(95950);o.exports=function getAllKeys(o){return u(o,w,_)}},83349:(o,s,i)=>{var u=i(82199),_=i(86375),w=i(37241);o.exports=function getAllKeysIn(o){return u(o,w,_)}},37381:(o,s,i)=>{var u=i(48152),_=i(63950),w=u?function(o){return u.get(o)}:_;o.exports=w},62284:(o,s,i)=>{var u=i(84629),_=Object.prototype.hasOwnProperty;o.exports=function getFuncName(o){for(var s=o.name+"",i=u[s],w=_.call(u,s)?i.length:0;w--;){var x=i[w],C=x.func;if(null==C||C==o)return x.name}return s}},11287:o=>{o.exports=function getHolder(o){return o.placeholder}},12651:(o,s,i)=>{var u=i(74218);o.exports=function getMapData(o,s){var i=o.__data__;return u(s)?i["string"==typeof s?"string":"hash"]:i.map}},10776:(o,s,i)=>{var u=i(30756),_=i(95950);o.exports=function getMatchData(o){for(var s=_(o),i=s.length;i--;){var w=s[i],x=o[w];s[i]=[w,x,u(x)]}return s}},56110:(o,s,i)=>{var u=i(45083),_=i(10392);o.exports=function getNative(o,s){var i=_(o,s);return u(i)?i:void 0}},28879:(o,s,i)=>{var u=i(74335)(Object.getPrototypeOf,Object);o.exports=u},659:(o,s,i)=>{var u=i(51873),_=Object.prototype,w=_.hasOwnProperty,x=_.toString,C=u?u.toStringTag:void 0;o.exports=function getRawTag(o){var s=w.call(o,C),i=o[C];try{o[C]=void 0;var u=!0}catch(o){}var _=x.call(o);return u&&(s?o[C]=i:delete o[C]),_}},4664:(o,s,i)=>{var u=i(79770),_=i(63345),w=Object.prototype.propertyIsEnumerable,x=Object.getOwnPropertySymbols,C=x?function(o){return null==o?[]:(o=Object(o),u(x(o),(function(s){return w.call(o,s)})))}:_;o.exports=C},86375:(o,s,i)=>{var u=i(14528),_=i(28879),w=i(4664),x=i(63345),C=Object.getOwnPropertySymbols?function(o){for(var s=[];o;)u(s,w(o)),o=_(o);return s}:x;o.exports=C},5861:(o,s,i)=>{var u=i(55580),_=i(68223),w=i(32804),x=i(76545),C=i(28303),j=i(72552),L=i(47473),B="[object Map]",$="[object Promise]",V="[object Set]",U="[object WeakMap]",z="[object DataView]",Y=L(u),Z=L(_),ee=L(w),ie=L(x),ae=L(C),ce=j;(u&&ce(new u(new ArrayBuffer(1)))!=z||_&&ce(new _)!=B||w&&ce(w.resolve())!=$||x&&ce(new x)!=V||C&&ce(new C)!=U)&&(ce=function(o){var s=j(o),i="[object Object]"==s?o.constructor:void 0,u=i?L(i):"";if(u)switch(u){case Y:return z;case Z:return B;case ee:return $;case ie:return V;case ae:return U}return s}),o.exports=ce},10392:o=>{o.exports=function getValue(o,s){return null==o?void 0:o[s]}},75251:o=>{var s=/\{\n\/\* \[wrapped with (.+)\] \*/,i=/,? & /;o.exports=function getWrapDetails(o){var u=o.match(s);return u?u[1].split(i):[]}},49326:(o,s,i)=>{var u=i(31769),_=i(72428),w=i(56449),x=i(30361),C=i(30294),j=i(77797);o.exports=function hasPath(o,s,i){for(var L=-1,B=(s=u(s,o)).length,$=!1;++L{var s=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");o.exports=function hasUnicode(o){return s.test(o)}},45434:o=>{var s=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;o.exports=function hasUnicodeWord(o){return s.test(o)}},22032:(o,s,i)=>{var u=i(81042);o.exports=function hashClear(){this.__data__=u?u(null):{},this.size=0}},63862:o=>{o.exports=function hashDelete(o){var s=this.has(o)&&delete this.__data__[o];return this.size-=s?1:0,s}},66721:(o,s,i)=>{var u=i(81042),_=Object.prototype.hasOwnProperty;o.exports=function hashGet(o){var s=this.__data__;if(u){var i=s[o];return"__lodash_hash_undefined__"===i?void 0:i}return _.call(s,o)?s[o]:void 0}},12749:(o,s,i)=>{var u=i(81042),_=Object.prototype.hasOwnProperty;o.exports=function hashHas(o){var s=this.__data__;return u?void 0!==s[o]:_.call(s,o)}},35749:(o,s,i)=>{var u=i(81042);o.exports=function hashSet(o,s){var i=this.__data__;return this.size+=this.has(o)?0:1,i[o]=u&&void 0===s?"__lodash_hash_undefined__":s,this}},76189:o=>{var s=Object.prototype.hasOwnProperty;o.exports=function initCloneArray(o){var i=o.length,u=new o.constructor(i);return i&&"string"==typeof o[0]&&s.call(o,"index")&&(u.index=o.index,u.input=o.input),u}},77199:(o,s,i)=>{var u=i(49653),_=i(76169),w=i(73201),x=i(93736),C=i(71961);o.exports=function initCloneByTag(o,s,i){var j=o.constructor;switch(s){case"[object ArrayBuffer]":return u(o);case"[object Boolean]":case"[object Date]":return new j(+o);case"[object DataView]":return _(o,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return C(o,i);case"[object Map]":case"[object Set]":return new j;case"[object Number]":case"[object String]":return new j(o);case"[object RegExp]":return w(o);case"[object Symbol]":return x(o)}}},35529:(o,s,i)=>{var u=i(39344),_=i(28879),w=i(55527);o.exports=function initCloneObject(o){return"function"!=typeof o.constructor||w(o)?{}:u(_(o))}},62060:o=>{var s=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;o.exports=function insertWrapDetails(o,i){var u=i.length;if(!u)return o;var _=u-1;return i[_]=(u>1?"& ":"")+i[_],i=i.join(u>2?", ":" "),o.replace(s,"{\n/* [wrapped with "+i+"] */\n")}},45891:(o,s,i)=>{var u=i(51873),_=i(72428),w=i(56449),x=u?u.isConcatSpreadable:void 0;o.exports=function isFlattenable(o){return w(o)||_(o)||!!(x&&o&&o[x])}},30361:o=>{var s=/^(?:0|[1-9]\d*)$/;o.exports=function isIndex(o,i){var u=typeof o;return!!(i=null==i?9007199254740991:i)&&("number"==u||"symbol"!=u&&s.test(o))&&o>-1&&o%1==0&&o{var u=i(75288),_=i(64894),w=i(30361),x=i(23805);o.exports=function isIterateeCall(o,s,i){if(!x(i))return!1;var C=typeof s;return!!("number"==C?_(i)&&w(s,i.length):"string"==C&&s in i)&&u(i[s],o)}},28586:(o,s,i)=>{var u=i(56449),_=i(44394),w=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x=/^\w*$/;o.exports=function isKey(o,s){if(u(o))return!1;var i=typeof o;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=o&&!_(o))||(x.test(o)||!w.test(o)||null!=s&&o in Object(s))}},74218:o=>{o.exports=function isKeyable(o){var s=typeof o;return"string"==s||"number"==s||"symbol"==s||"boolean"==s?"__proto__"!==o:null===o}},85087:(o,s,i)=>{var u=i(30980),_=i(37381),w=i(62284),x=i(53758);o.exports=function isLaziable(o){var s=w(o),i=x[s];if("function"!=typeof i||!(s in u.prototype))return!1;if(o===i)return!0;var C=_(i);return!!C&&o===C[0]}},87296:(o,s,i)=>{var u,_=i(55481),w=(u=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"";o.exports=function isMasked(o){return!!w&&w in o}},55527:o=>{var s=Object.prototype;o.exports=function isPrototype(o){var i=o&&o.constructor;return o===("function"==typeof i&&i.prototype||s)}},30756:(o,s,i)=>{var u=i(23805);o.exports=function isStrictComparable(o){return o==o&&!u(o)}},63702:o=>{o.exports=function listCacheClear(){this.__data__=[],this.size=0}},70080:(o,s,i)=>{var u=i(26025),_=Array.prototype.splice;o.exports=function listCacheDelete(o){var s=this.__data__,i=u(s,o);return!(i<0)&&(i==s.length-1?s.pop():_.call(s,i,1),--this.size,!0)}},24739:(o,s,i)=>{var u=i(26025);o.exports=function listCacheGet(o){var s=this.__data__,i=u(s,o);return i<0?void 0:s[i][1]}},48655:(o,s,i)=>{var u=i(26025);o.exports=function listCacheHas(o){return u(this.__data__,o)>-1}},31175:(o,s,i)=>{var u=i(26025);o.exports=function listCacheSet(o,s){var i=this.__data__,_=u(i,o);return _<0?(++this.size,i.push([o,s])):i[_][1]=s,this}},63040:(o,s,i)=>{var u=i(21549),_=i(80079),w=i(68223);o.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new u,map:new(w||_),string:new u}}},17670:(o,s,i)=>{var u=i(12651);o.exports=function mapCacheDelete(o){var s=u(this,o).delete(o);return this.size-=s?1:0,s}},90289:(o,s,i)=>{var u=i(12651);o.exports=function mapCacheGet(o){return u(this,o).get(o)}},4509:(o,s,i)=>{var u=i(12651);o.exports=function mapCacheHas(o){return u(this,o).has(o)}},72949:(o,s,i)=>{var u=i(12651);o.exports=function mapCacheSet(o,s){var i=u(this,o),_=i.size;return i.set(o,s),this.size+=i.size==_?0:1,this}},20317:o=>{o.exports=function mapToArray(o){var s=-1,i=Array(o.size);return o.forEach((function(o,u){i[++s]=[u,o]})),i}},67197:o=>{o.exports=function matchesStrictComparable(o,s){return function(i){return null!=i&&(i[o]===s&&(void 0!==s||o in Object(i)))}}},62224:(o,s,i)=>{var u=i(50104);o.exports=function memoizeCapped(o){var s=u(o,(function(o){return 500===i.size&&i.clear(),o})),i=s.cache;return s}},3209:(o,s,i)=>{var u=i(91596),_=i(53320),w=i(36306),x="__lodash_placeholder__",C=128,j=Math.min;o.exports=function mergeData(o,s){var i=o[1],L=s[1],B=i|L,$=B<131,V=L==C&&8==i||L==C&&256==i&&o[7].length<=s[8]||384==L&&s[7].length<=s[8]&&8==i;if(!$&&!V)return o;1&L&&(o[2]=s[2],B|=1&i?0:4);var U=s[3];if(U){var z=o[3];o[3]=z?u(z,U,s[4]):U,o[4]=z?w(o[3],x):s[4]}return(U=s[5])&&(z=o[5],o[5]=z?_(z,U,s[6]):U,o[6]=z?w(o[5],x):s[6]),(U=s[7])&&(o[7]=U),L&C&&(o[8]=null==o[8]?s[8]:j(o[8],s[8])),null==o[9]&&(o[9]=s[9]),o[0]=s[0],o[1]=B,o}},48152:(o,s,i)=>{var u=i(28303),_=u&&new u;o.exports=_},81042:(o,s,i)=>{var u=i(56110)(Object,"create");o.exports=u},3650:(o,s,i)=>{var u=i(74335)(Object.keys,Object);o.exports=u},90181:o=>{o.exports=function nativeKeysIn(o){var s=[];if(null!=o)for(var i in Object(o))s.push(i);return s}},86009:(o,s,i)=>{o=i.nmd(o);var u=i(34840),_=s&&!s.nodeType&&s,w=_&&o&&!o.nodeType&&o,x=w&&w.exports===_&&u.process,C=function(){try{var o=w&&w.require&&w.require("util").types;return o||x&&x.binding&&x.binding("util")}catch(o){}}();o.exports=C},59350:o=>{var s=Object.prototype.toString;o.exports=function objectToString(o){return s.call(o)}},74335:o=>{o.exports=function overArg(o,s){return function(i){return o(s(i))}}},56757:(o,s,i)=>{var u=i(91033),_=Math.max;o.exports=function overRest(o,s,i){return s=_(void 0===s?o.length-1:s,0),function(){for(var w=arguments,x=-1,C=_(w.length-s,0),j=Array(C);++x{var u=i(47422),_=i(25160);o.exports=function parent(o,s){return s.length<2?o:u(o,_(s,0,-1))}},84629:o=>{o.exports={}},68294:(o,s,i)=>{var u=i(23007),_=i(30361),w=Math.min;o.exports=function reorder(o,s){for(var i=o.length,x=w(s.length,i),C=u(o);x--;){var j=s[x];o[x]=_(j,i)?C[j]:void 0}return o}},36306:o=>{var s="__lodash_placeholder__";o.exports=function replaceHolders(o,i){for(var u=-1,_=o.length,w=0,x=[];++u<_;){var C=o[u];C!==i&&C!==s||(o[u]=s,x[w++]=u)}return x}},9325:(o,s,i)=>{var u=i(34840),_="object"==typeof self&&self&&self.Object===Object&&self,w=u||_||Function("return this")();o.exports=w},14974:o=>{o.exports=function safeGet(o,s){if(("constructor"!==s||"function"!=typeof o[s])&&"__proto__"!=s)return o[s]}},31380:o=>{o.exports=function setCacheAdd(o){return this.__data__.set(o,"__lodash_hash_undefined__"),this}},51459:o=>{o.exports=function setCacheHas(o){return this.__data__.has(o)}},54641:(o,s,i)=>{var u=i(68882),_=i(51811)(u);o.exports=_},84247:o=>{o.exports=function setToArray(o){var s=-1,i=Array(o.size);return o.forEach((function(o){i[++s]=o})),i}},32865:(o,s,i)=>{var u=i(19570),_=i(51811)(u);o.exports=_},70981:(o,s,i)=>{var u=i(75251),_=i(62060),w=i(32865),x=i(75948);o.exports=function setWrapToString(o,s,i){var C=s+"";return w(o,_(C,x(u(C),i)))}},51811:o=>{var s=Date.now;o.exports=function shortOut(o){var i=0,u=0;return function(){var _=s(),w=16-(_-u);if(u=_,w>0){if(++i>=800)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}},51420:(o,s,i)=>{var u=i(80079);o.exports=function stackClear(){this.__data__=new u,this.size=0}},90938:o=>{o.exports=function stackDelete(o){var s=this.__data__,i=s.delete(o);return this.size=s.size,i}},63605:o=>{o.exports=function stackGet(o){return this.__data__.get(o)}},29817:o=>{o.exports=function stackHas(o){return this.__data__.has(o)}},80945:(o,s,i)=>{var u=i(80079),_=i(68223),w=i(53661);o.exports=function stackSet(o,s){var i=this.__data__;if(i instanceof u){var x=i.__data__;if(!_||x.length<199)return x.push([o,s]),this.size=++i.size,this;i=this.__data__=new w(x)}return i.set(o,s),this.size=i.size,this}},76959:o=>{o.exports=function strictIndexOf(o,s,i){for(var u=i-1,_=o.length;++u<_;)if(o[u]===s)return u;return-1}},63912:(o,s,i)=>{var u=i(61074),_=i(49698),w=i(42054);o.exports=function stringToArray(o){return _(o)?w(o):u(o)}},61802:(o,s,i)=>{var u=i(62224),_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/\\(\\)?/g,x=u((function(o){var s=[];return 46===o.charCodeAt(0)&&s.push(""),o.replace(_,(function(o,i,u,_){s.push(u?_.replace(w,"$1"):i||o)})),s}));o.exports=x},77797:(o,s,i)=>{var u=i(44394);o.exports=function toKey(o){if("string"==typeof o||u(o))return o;var s=o+"";return"0"==s&&1/o==-1/0?"-0":s}},47473:o=>{var s=Function.prototype.toString;o.exports=function toSource(o){if(null!=o){try{return s.call(o)}catch(o){}try{return o+""}catch(o){}}return""}},31800:o=>{var s=/\s/;o.exports=function trimmedEndIndex(o){for(var i=o.length;i--&&s.test(o.charAt(i)););return i}},42054:o=>{var s="\\ud800-\\udfff",i="["+s+"]",u="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_="\\ud83c[\\udffb-\\udfff]",w="[^"+s+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",j="(?:"+u+"|"+_+")"+"?",L="[\\ufe0e\\ufe0f]?",B=L+j+("(?:\\u200d(?:"+[w,x,C].join("|")+")"+L+j+")*"),$="(?:"+[w+u+"?",u,x,C,i].join("|")+")",V=RegExp(_+"(?="+_+")|"+$+B,"g");o.exports=function unicodeToArray(o){return o.match(V)||[]}},22225:o=>{var s="\\ud800-\\udfff",i="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",_="A-Z\\xc0-\\xd6\\xd8-\\xde",w="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",x="["+w+"]",C="\\d+",j="["+i+"]",L="["+u+"]",B="[^"+s+w+C+i+u+_+"]",$="(?:\\ud83c[\\udde6-\\uddff]){2}",V="[\\ud800-\\udbff][\\udc00-\\udfff]",U="["+_+"]",z="(?:"+L+"|"+B+")",Y="(?:"+U+"|"+B+")",Z="(?:['’](?:d|ll|m|re|s|t|ve))?",ee="(?:['’](?:D|LL|M|RE|S|T|VE))?",ie="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ae="[\\ufe0e\\ufe0f]?",ce=ae+ie+("(?:\\u200d(?:"+["[^"+s+"]",$,V].join("|")+")"+ae+ie+")*"),le="(?:"+[j,$,V].join("|")+")"+ce,pe=RegExp([U+"?"+L+"+"+Z+"(?="+[x,U,"$"].join("|")+")",Y+"+"+ee+"(?="+[x,U+z,"$"].join("|")+")",U+"?"+z+"+"+Z,U+"+"+ee,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",C,le].join("|"),"g");o.exports=function unicodeWords(o){return o.match(pe)||[]}},75948:(o,s,i)=>{var u=i(83729),_=i(15325),w=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];o.exports=function updateWrapDetails(o,s){return u(w,(function(i){var u="_."+i[0];s&i[1]&&!_(o,u)&&o.push(u)})),o.sort()}},80257:(o,s,i)=>{var u=i(30980),_=i(56017),w=i(23007);o.exports=function wrapperClone(o){if(o instanceof u)return o.clone();var s=new _(o.__wrapped__,o.__chain__);return s.__actions__=w(o.__actions__),s.__index__=o.__index__,s.__values__=o.__values__,s}},64626:(o,s,i)=>{var u=i(66977);o.exports=function ary(o,s,i){return s=i?void 0:s,s=o&&null==s?o.length:s,u(o,128,void 0,void 0,void 0,void 0,s)}},84058:(o,s,i)=>{var u=i(14792),_=i(45539)((function(o,s,i){return s=s.toLowerCase(),o+(i?u(s):s)}));o.exports=_},14792:(o,s,i)=>{var u=i(13222),_=i(55808);o.exports=function capitalize(o){return _(u(o).toLowerCase())}},32629:(o,s,i)=>{var u=i(9999);o.exports=function clone(o){return u(o,4)}},37334:o=>{o.exports=function constant(o){return function(){return o}}},49747:(o,s,i)=>{var u=i(66977);function curry(o,s,i){var _=u(o,8,void 0,void 0,void 0,void 0,void 0,s=i?void 0:s);return _.placeholder=curry.placeholder,_}curry.placeholder={},o.exports=curry},38221:(o,s,i)=>{var u=i(23805),_=i(10124),w=i(99374),x=Math.max,C=Math.min;o.exports=function debounce(o,s,i){var j,L,B,$,V,U,z=0,Y=!1,Z=!1,ee=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function invokeFunc(s){var i=j,u=L;return j=L=void 0,z=s,$=o.apply(u,i)}function shouldInvoke(o){var i=o-U;return void 0===U||i>=s||i<0||Z&&o-z>=B}function timerExpired(){var o=_();if(shouldInvoke(o))return trailingEdge(o);V=setTimeout(timerExpired,function remainingWait(o){var i=s-(o-U);return Z?C(i,B-(o-z)):i}(o))}function trailingEdge(o){return V=void 0,ee&&j?invokeFunc(o):(j=L=void 0,$)}function debounced(){var o=_(),i=shouldInvoke(o);if(j=arguments,L=this,U=o,i){if(void 0===V)return function leadingEdge(o){return z=o,V=setTimeout(timerExpired,s),Y?invokeFunc(o):$}(U);if(Z)return clearTimeout(V),V=setTimeout(timerExpired,s),invokeFunc(U)}return void 0===V&&(V=setTimeout(timerExpired,s)),$}return s=w(s)||0,u(i)&&(Y=!!i.leading,B=(Z="maxWait"in i)?x(w(i.maxWait)||0,s):B,ee="trailing"in i?!!i.trailing:ee),debounced.cancel=function cancel(){void 0!==V&&clearTimeout(V),z=0,j=U=L=V=void 0},debounced.flush=function flush(){return void 0===V?$:trailingEdge(_())},debounced}},50828:(o,s,i)=>{var u=i(24647),_=i(13222),w=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,x=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");o.exports=function deburr(o){return(o=_(o))&&o.replace(w,u).replace(x,"")}},75288:o=>{o.exports=function eq(o,s){return o===s||o!=o&&s!=s}},60680:(o,s,i)=>{var u=i(13222),_=/[\\^$.*+?()[\]{}|]/g,w=RegExp(_.source);o.exports=function escapeRegExp(o){return(o=u(o))&&w.test(o)?o.replace(_,"\\$&"):o}},7309:(o,s,i)=>{var u=i(62006)(i(24713));o.exports=u},24713:(o,s,i)=>{var u=i(2523),_=i(15389),w=i(61489),x=Math.max;o.exports=function findIndex(o,s,i){var C=null==o?0:o.length;if(!C)return-1;var j=null==i?0:w(i);return j<0&&(j=x(C+j,0)),u(o,_(s,3),j)}},35970:(o,s,i)=>{var u=i(83120);o.exports=function flatten(o){return(null==o?0:o.length)?u(o,1):[]}},73424:(o,s,i)=>{var u=i(16962),_=i(2874),w=Array.prototype.push;function baseAry(o,s){return 2==s?function(s,i){return o(s,i)}:function(s){return o(s)}}function cloneArray(o){for(var s=o?o.length:0,i=Array(s);s--;)i[s]=o[s];return i}function wrapImmutable(o,s){return function(){var i=arguments.length;if(i){for(var u=Array(i);i--;)u[i]=arguments[i];var _=u[0]=s.apply(void 0,u);return o.apply(void 0,u),_}}}o.exports=function baseConvert(o,s,i,x){var C="function"==typeof s,j=s===Object(s);if(j&&(x=i,i=s,s=void 0),null==i)throw new TypeError;x||(x={});var L={cap:!("cap"in x)||x.cap,curry:!("curry"in x)||x.curry,fixed:!("fixed"in x)||x.fixed,immutable:!("immutable"in x)||x.immutable,rearg:!("rearg"in x)||x.rearg},B=C?i:_,$="curry"in x&&x.curry,V="fixed"in x&&x.fixed,U="rearg"in x&&x.rearg,z=C?i.runInContext():void 0,Y=C?i:{ary:o.ary,assign:o.assign,clone:o.clone,curry:o.curry,forEach:o.forEach,isArray:o.isArray,isError:o.isError,isFunction:o.isFunction,isWeakMap:o.isWeakMap,iteratee:o.iteratee,keys:o.keys,rearg:o.rearg,toInteger:o.toInteger,toPath:o.toPath},Z=Y.ary,ee=Y.assign,ie=Y.clone,ae=Y.curry,ce=Y.forEach,le=Y.isArray,pe=Y.isError,de=Y.isFunction,fe=Y.isWeakMap,ye=Y.keys,be=Y.rearg,_e=Y.toInteger,we=Y.toPath,Se=ye(u.aryMethod),xe={castArray:function(o){return function(){var s=arguments[0];return le(s)?o(cloneArray(s)):o.apply(void 0,arguments)}},iteratee:function(o){return function(){var s=arguments[1],i=o(arguments[0],s),u=i.length;return L.cap&&"number"==typeof s?(s=s>2?s-2:1,u&&u<=s?i:baseAry(i,s)):i}},mixin:function(o){return function(s){var i=this;if(!de(i))return o(i,Object(s));var u=[];return ce(ye(s),(function(o){de(s[o])&&u.push([o,i.prototype[o]])})),o(i,Object(s)),ce(u,(function(o){var s=o[1];de(s)?i.prototype[o[0]]=s:delete i.prototype[o[0]]})),i}},nthArg:function(o){return function(s){var i=s<0?1:_e(s)+1;return ae(o(s),i)}},rearg:function(o){return function(s,i){var u=i?i.length:0;return ae(o(s,i),u)}},runInContext:function(s){return function(i){return baseConvert(o,s(i),x)}}};function castCap(o,s){if(L.cap){var i=u.iterateeRearg[o];if(i)return function iterateeRearg(o,s){return overArg(o,(function(o){var i=s.length;return function baseArity(o,s){return 2==s?function(s,i){return o.apply(void 0,arguments)}:function(s){return o.apply(void 0,arguments)}}(be(baseAry(o,i),s),i)}))}(s,i);var _=!C&&u.iterateeAry[o];if(_)return function iterateeAry(o,s){return overArg(o,(function(o){return"function"==typeof o?baseAry(o,s):o}))}(s,_)}return s}function castFixed(o,s,i){if(L.fixed&&(V||!u.skipFixed[o])){var _=u.methodSpread[o],x=_&&_.start;return void 0===x?Z(s,i):function flatSpread(o,s){return function(){for(var i=arguments.length,u=i-1,_=Array(i);i--;)_[i]=arguments[i];var x=_[s],C=_.slice(0,s);return x&&w.apply(C,x),s!=u&&w.apply(C,_.slice(s+1)),o.apply(this,C)}}(s,x)}return s}function castRearg(o,s,i){return L.rearg&&i>1&&(U||!u.skipRearg[o])?be(s,u.methodRearg[o]||u.aryRearg[i]):s}function cloneByPath(o,s){for(var i=-1,u=(s=we(s)).length,_=u-1,w=ie(Object(o)),x=w;null!=x&&++i1?ae(s,i):s}(0,_=castCap(w,_),o),!1}})),!_})),_||(_=x),_==s&&(_=$?ae(_,1):function(){return s.apply(this,arguments)}),_.convert=createConverter(w,s),_.placeholder=s.placeholder=i,_}if(!j)return wrap(s,i,B);var Pe=i,Te=[];return ce(Se,(function(o){ce(u.aryMethod[o],(function(o){var s=Pe[u.remap[o]||o];s&&Te.push([o,wrap(o,s,Pe)])}))})),ce(ye(Pe),(function(o){var s=Pe[o];if("function"==typeof s){for(var i=Te.length;i--;)if(Te[i][0]==o)return;s.convert=createConverter(o,s),Te.push([o,s])}})),ce(Te,(function(o){Pe[o[0]]=o[1]})),Pe.convert=function convertLib(o){return Pe.runInContext.convert(o)(void 0)},Pe.placeholder=Pe,ce(ye(Pe),(function(o){ce(u.realToAlias[o]||[],(function(s){Pe[s]=Pe[o]}))})),Pe}},16962:(o,s)=>{s.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},s.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},s.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},s.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},s.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},s.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},s.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},s.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},s.realToAlias=function(){var o=Object.prototype.hasOwnProperty,i=s.aliasToReal,u={};for(var _ in i){var w=i[_];o.call(u,w)?u[w].push(_):u[w]=[_]}return u}(),s.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},s.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},s.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},47934:(o,s,i)=>{o.exports={ary:i(64626),assign:i(74733),clone:i(32629),curry:i(49747),forEach:i(83729),isArray:i(56449),isError:i(23546),isFunction:i(1882),isWeakMap:i(47886),iteratee:i(33855),keys:i(88984),rearg:i(84195),toInteger:i(61489),toPath:i(42072)}},56367:(o,s,i)=>{o.exports=i(77731)},79920:(o,s,i)=>{var u=i(73424),_=i(47934);o.exports=function convert(o,s,i){return u(_,o,s,i)}},2874:o=>{o.exports={}},77731:(o,s,i)=>{var u=i(79920)("set",i(63560));u.placeholder=i(2874),o.exports=u},58156:(o,s,i)=>{var u=i(47422);o.exports=function get(o,s,i){var _=null==o?void 0:u(o,s);return void 0===_?i:_}},61448:(o,s,i)=>{var u=i(20426),_=i(49326);o.exports=function has(o,s){return null!=o&&_(o,s,u)}},80631:(o,s,i)=>{var u=i(28077),_=i(49326);o.exports=function hasIn(o,s){return null!=o&&_(o,s,u)}},83488:o=>{o.exports=function identity(o){return o}},72428:(o,s,i)=>{var u=i(27534),_=i(40346),w=Object.prototype,x=w.hasOwnProperty,C=w.propertyIsEnumerable,j=u(function(){return arguments}())?u:function(o){return _(o)&&x.call(o,"callee")&&!C.call(o,"callee")};o.exports=j},56449:o=>{var s=Array.isArray;o.exports=s},64894:(o,s,i)=>{var u=i(1882),_=i(30294);o.exports=function isArrayLike(o){return null!=o&&_(o.length)&&!u(o)}},83693:(o,s,i)=>{var u=i(64894),_=i(40346);o.exports=function isArrayLikeObject(o){return _(o)&&u(o)}},53812:(o,s,i)=>{var u=i(72552),_=i(40346);o.exports=function isBoolean(o){return!0===o||!1===o||_(o)&&"[object Boolean]"==u(o)}},3656:(o,s,i)=>{o=i.nmd(o);var u=i(9325),_=i(89935),w=s&&!s.nodeType&&s,x=w&&o&&!o.nodeType&&o,C=x&&x.exports===w?u.Buffer:void 0,j=(C?C.isBuffer:void 0)||_;o.exports=j},62193:(o,s,i)=>{var u=i(88984),_=i(5861),w=i(72428),x=i(56449),C=i(64894),j=i(3656),L=i(55527),B=i(37167),$=Object.prototype.hasOwnProperty;o.exports=function isEmpty(o){if(null==o)return!0;if(C(o)&&(x(o)||"string"==typeof o||"function"==typeof o.splice||j(o)||B(o)||w(o)))return!o.length;var s=_(o);if("[object Map]"==s||"[object Set]"==s)return!o.size;if(L(o))return!u(o).length;for(var i in o)if($.call(o,i))return!1;return!0}},2404:(o,s,i)=>{var u=i(60270);o.exports=function isEqual(o,s){return u(o,s)}},23546:(o,s,i)=>{var u=i(72552),_=i(40346),w=i(11331);o.exports=function isError(o){if(!_(o))return!1;var s=u(o);return"[object Error]"==s||"[object DOMException]"==s||"string"==typeof o.message&&"string"==typeof o.name&&!w(o)}},1882:(o,s,i)=>{var u=i(72552),_=i(23805);o.exports=function isFunction(o){if(!_(o))return!1;var s=u(o);return"[object Function]"==s||"[object GeneratorFunction]"==s||"[object AsyncFunction]"==s||"[object Proxy]"==s}},30294:o=>{o.exports=function isLength(o){return"number"==typeof o&&o>-1&&o%1==0&&o<=9007199254740991}},87730:(o,s,i)=>{var u=i(29172),_=i(27301),w=i(86009),x=w&&w.isMap,C=x?_(x):u;o.exports=C},5187:o=>{o.exports=function isNull(o){return null===o}},98023:(o,s,i)=>{var u=i(72552),_=i(40346);o.exports=function isNumber(o){return"number"==typeof o||_(o)&&"[object Number]"==u(o)}},23805:o=>{o.exports=function isObject(o){var s=typeof o;return null!=o&&("object"==s||"function"==s)}},40346:o=>{o.exports=function isObjectLike(o){return null!=o&&"object"==typeof o}},11331:(o,s,i)=>{var u=i(72552),_=i(28879),w=i(40346),x=Function.prototype,C=Object.prototype,j=x.toString,L=C.hasOwnProperty,B=j.call(Object);o.exports=function isPlainObject(o){if(!w(o)||"[object Object]"!=u(o))return!1;var s=_(o);if(null===s)return!0;var i=L.call(s,"constructor")&&s.constructor;return"function"==typeof i&&i instanceof i&&j.call(i)==B}},38440:(o,s,i)=>{var u=i(16038),_=i(27301),w=i(86009),x=w&&w.isSet,C=x?_(x):u;o.exports=C},85015:(o,s,i)=>{var u=i(72552),_=i(56449),w=i(40346);o.exports=function isString(o){return"string"==typeof o||!_(o)&&w(o)&&"[object String]"==u(o)}},44394:(o,s,i)=>{var u=i(72552),_=i(40346);o.exports=function isSymbol(o){return"symbol"==typeof o||_(o)&&"[object Symbol]"==u(o)}},37167:(o,s,i)=>{var u=i(4901),_=i(27301),w=i(86009),x=w&&w.isTypedArray,C=x?_(x):u;o.exports=C},47886:(o,s,i)=>{var u=i(5861),_=i(40346);o.exports=function isWeakMap(o){return _(o)&&"[object WeakMap]"==u(o)}},33855:(o,s,i)=>{var u=i(9999),_=i(15389);o.exports=function iteratee(o){return _("function"==typeof o?o:u(o,1))}},95950:(o,s,i)=>{var u=i(70695),_=i(88984),w=i(64894);o.exports=function keys(o){return w(o)?u(o):_(o)}},37241:(o,s,i)=>{var u=i(70695),_=i(72903),w=i(64894);o.exports=function keysIn(o){return w(o)?u(o,!0):_(o)}},68090:o=>{o.exports=function last(o){var s=null==o?0:o.length;return s?o[s-1]:void 0}},50104:(o,s,i)=>{var u=i(53661);function memoize(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");var memoized=function(){var i=arguments,u=s?s.apply(this,i):i[0],_=memoized.cache;if(_.has(u))return _.get(u);var w=o.apply(this,i);return memoized.cache=_.set(u,w)||_,w};return memoized.cache=new(memoize.Cache||u),memoized}memoize.Cache=u,o.exports=memoize},55364:(o,s,i)=>{var u=i(85250),_=i(20999)((function(o,s,i){u(o,s,i)}));o.exports=_},6048:o=>{o.exports=function negate(o){if("function"!=typeof o)throw new TypeError("Expected a function");return function(){var s=arguments;switch(s.length){case 0:return!o.call(this);case 1:return!o.call(this,s[0]);case 2:return!o.call(this,s[0],s[1]);case 3:return!o.call(this,s[0],s[1],s[2])}return!o.apply(this,s)}}},63950:o=>{o.exports=function noop(){}},10124:(o,s,i)=>{var u=i(9325);o.exports=function(){return u.Date.now()}},90179:(o,s,i)=>{var u=i(34932),_=i(9999),w=i(19931),x=i(31769),C=i(21791),j=i(53138),L=i(38816),B=i(83349),$=L((function(o,s){var i={};if(null==o)return i;var L=!1;s=u(s,(function(s){return s=x(s,o),L||(L=s.length>1),s})),C(o,B(o),i),L&&(i=_(i,7,j));for(var $=s.length;$--;)w(i,s[$]);return i}));o.exports=$},50583:(o,s,i)=>{var u=i(47237),_=i(17255),w=i(28586),x=i(77797);o.exports=function property(o){return w(o)?u(x(o)):_(o)}},84195:(o,s,i)=>{var u=i(66977),_=i(38816),w=_((function(o,s){return u(o,256,void 0,void 0,void 0,s)}));o.exports=w},40860:(o,s,i)=>{var u=i(40882),_=i(80909),w=i(15389),x=i(85558),C=i(56449);o.exports=function reduce(o,s,i){var j=C(o)?u:x,L=arguments.length<3;return j(o,w(s,4),i,L,_)}},63560:(o,s,i)=>{var u=i(73170);o.exports=function set(o,s,i){return null==o?o:u(o,s,i)}},42426:(o,s,i)=>{var u=i(14248),_=i(15389),w=i(90916),x=i(56449),C=i(36800);o.exports=function some(o,s,i){var j=x(o)?u:w;return i&&C(o,s,i)&&(s=void 0),j(o,_(s,3))}},63345:o=>{o.exports=function stubArray(){return[]}},89935:o=>{o.exports=function stubFalse(){return!1}},17400:(o,s,i)=>{var u=i(99374),_=1/0;o.exports=function toFinite(o){return o?(o=u(o))===_||o===-1/0?17976931348623157e292*(o<0?-1:1):o==o?o:0:0===o?o:0}},61489:(o,s,i)=>{var u=i(17400);o.exports=function toInteger(o){var s=u(o),i=s%1;return s==s?i?s-i:s:0}},80218:(o,s,i)=>{var u=i(13222);o.exports=function toLower(o){return u(o).toLowerCase()}},99374:(o,s,i)=>{var u=i(54128),_=i(23805),w=i(44394),x=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,j=/^0o[0-7]+$/i,L=parseInt;o.exports=function toNumber(o){if("number"==typeof o)return o;if(w(o))return NaN;if(_(o)){var s="function"==typeof o.valueOf?o.valueOf():o;o=_(s)?s+"":s}if("string"!=typeof o)return 0===o?o:+o;o=u(o);var i=C.test(o);return i||j.test(o)?L(o.slice(2),i?2:8):x.test(o)?NaN:+o}},42072:(o,s,i)=>{var u=i(34932),_=i(23007),w=i(56449),x=i(44394),C=i(61802),j=i(77797),L=i(13222);o.exports=function toPath(o){return w(o)?u(o,j):x(o)?[o]:_(C(L(o)))}},69884:(o,s,i)=>{var u=i(21791),_=i(37241);o.exports=function toPlainObject(o){return u(o,_(o))}},13222:(o,s,i)=>{var u=i(77556);o.exports=function toString(o){return null==o?"":u(o)}},55808:(o,s,i)=>{var u=i(12507)("toUpperCase");o.exports=u},66645:(o,s,i)=>{var u=i(1733),_=i(45434),w=i(13222),x=i(22225);o.exports=function words(o,s,i){return o=w(o),void 0===(s=i?void 0:s)?_(o)?x(o):u(o):o.match(s)||[]}},53758:(o,s,i)=>{var u=i(30980),_=i(56017),w=i(94033),x=i(56449),C=i(40346),j=i(80257),L=Object.prototype.hasOwnProperty;function lodash(o){if(C(o)&&!x(o)&&!(o instanceof u)){if(o instanceof _)return o;if(L.call(o,"__wrapped__"))return j(o)}return new _(o)}lodash.prototype=w.prototype,lodash.prototype.constructor=lodash,o.exports=lodash},47248:(o,s,i)=>{var u=i(16547),_=i(51234);o.exports=function zipObject(o,s){return _(o||[],s||[],u)}},43768:(o,s,i)=>{"use strict";var u=i(45981),_=i(85587);s.highlight=highlight,s.highlightAuto=function highlightAuto(o,s){var i,x,C,j,L=s||{},B=L.subset||u.listLanguages(),$=L.prefix,V=B.length,U=-1;null==$&&($=w);if("string"!=typeof o)throw _("Expected `string` for value, got `%s`",o);x={relevance:0,language:null,value:[]},i={relevance:0,language:null,value:[]};for(;++Ux.relevance&&(x=C),C.relevance>i.relevance&&(x=i,i=C));x.language&&(i.secondBest=x);return i},s.registerLanguage=function registerLanguage(o,s){u.registerLanguage(o,s)},s.listLanguages=function listLanguages(){return u.listLanguages()},s.registerAlias=function registerAlias(o,s){var i,_=o;s&&((_={})[o]=s);for(i in _)u.registerAliases(_[i],{languageName:i})},Emitter.prototype.addText=function text(o){var s,i,u=this.stack;if(""===o)return;s=u[u.length-1],(i=s.children[s.children.length-1])&&"text"===i.type?i.value+=o:s.children.push({type:"text",value:o})},Emitter.prototype.addKeyword=function addKeyword(o,s){this.openNode(s),this.addText(o),this.closeNode()},Emitter.prototype.addSublanguage=function addSublanguage(o,s){var i=this.stack,u=i[i.length-1],_=o.rootNode.children,w=s?{type:"element",tagName:"span",properties:{className:[s]},children:_}:_;u.children=u.children.concat(w)},Emitter.prototype.openNode=function open(o){var s=this.stack,i=this.options.classPrefix+o,u=s[s.length-1],_={type:"element",tagName:"span",properties:{className:[i]},children:[]};u.children.push(_),s.push(_)},Emitter.prototype.closeNode=function close(){this.stack.pop()},Emitter.prototype.closeAllNodes=noop,Emitter.prototype.finalize=noop,Emitter.prototype.toHTML=function toHtmlNoop(){return""};var w="hljs-";function highlight(o,s,i){var x,C=u.configure({}),j=(i||{}).prefix;if("string"!=typeof o)throw _("Expected `string` for name, got `%s`",o);if(!u.getLanguage(o))throw _("Unknown language: `%s` is not registered",o);if("string"!=typeof s)throw _("Expected `string` for value, got `%s`",s);if(null==j&&(j=w),u.configure({__emitter:Emitter,classPrefix:j}),x=u.highlight(s,{language:o,ignoreIllegals:!0}),u.configure(C||{}),x.errorRaised)throw x.errorRaised;return{relevance:x.relevance,language:x.language,value:x.emitter.rootNode.children}}function Emitter(o){this.options=o,this.rootNode={children:[]},this.stack=[this.rootNode]}function noop(){}},92340:(o,s,i)=>{const u=i(6048);function coerceElementMatchingCallback(o){return"string"==typeof o?s=>s.element===o:o.constructor&&o.extend?s=>s instanceof o:o}class ArraySlice{constructor(o){this.elements=o||[]}toValue(){return this.elements.map((o=>o.toValue()))}map(o,s){return this.elements.map(o,s)}flatMap(o,s){return this.map(o,s).reduce(((o,s)=>o.concat(s)),[])}compactMap(o,s){const i=[];return this.forEach((u=>{const _=o.bind(s)(u);_&&i.push(_)})),i}filter(o,s){return o=coerceElementMatchingCallback(o),new ArraySlice(this.elements.filter(o,s))}reject(o,s){return o=coerceElementMatchingCallback(o),new ArraySlice(this.elements.filter(u(o),s))}find(o,s){return o=coerceElementMatchingCallback(o),this.elements.find(o,s)}forEach(o,s){this.elements.forEach(o,s)}reduce(o,s){return this.elements.reduce(o,s)}includes(o){return this.elements.some((s=>s.equals(o)))}shift(){return this.elements.shift()}unshift(o){this.elements.unshift(this.refract(o))}push(o){return this.elements.push(this.refract(o)),this}add(o){this.push(o)}get(o){return this.elements[o]}getValue(o){const s=this.elements[o];if(s)return s.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}"undefined"!=typeof Symbol&&(ArraySlice.prototype[Symbol.iterator]=function symbol(){return this.elements[Symbol.iterator]()}),o.exports=ArraySlice},55973:o=>{class KeyValuePair{constructor(o,s){this.key=o,this.value=s}clone(){const o=new KeyValuePair;return this.key&&(o.key=this.key.clone()),this.value&&(o.value=this.value.clone()),o}}o.exports=KeyValuePair},3110:(o,s,i)=>{const u=i(5187),_=i(85015),w=i(98023),x=i(53812),C=i(23805),j=i(85105),L=i(86804);class Namespace{constructor(o){this.elementMap={},this.elementDetection=[],this.Element=L.Element,this.KeyValuePair=L.KeyValuePair,o&&o.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(o){return o.namespace&&o.namespace({base:this}),o.load&&o.load({base:this}),this}useDefault(){return this.register("null",L.NullElement).register("string",L.StringElement).register("number",L.NumberElement).register("boolean",L.BooleanElement).register("array",L.ArrayElement).register("object",L.ObjectElement).register("member",L.MemberElement).register("ref",L.RefElement).register("link",L.LinkElement),this.detect(u,L.NullElement,!1).detect(_,L.StringElement,!1).detect(w,L.NumberElement,!1).detect(x,L.BooleanElement,!1).detect(Array.isArray,L.ArrayElement,!1).detect(C,L.ObjectElement,!1),this}register(o,s){return this._elements=void 0,this.elementMap[o]=s,this}unregister(o){return this._elements=void 0,delete this.elementMap[o],this}detect(o,s,i){return void 0===i||i?this.elementDetection.unshift([o,s]):this.elementDetection.push([o,s]),this}toElement(o){if(o instanceof this.Element)return o;let s;for(let i=0;i{const s=o[0].toUpperCase()+o.substr(1);this._elements[s]=this.elementMap[o]}))),this._elements}get serialiser(){return new j(this)}}j.prototype.Namespace=Namespace,o.exports=Namespace},10866:(o,s,i)=>{const u=i(6048),_=i(92340);class ObjectSlice extends _{map(o,s){return this.elements.map((i=>o.bind(s)(i.value,i.key,i)))}filter(o,s){return new ObjectSlice(this.elements.filter((i=>o.bind(s)(i.value,i.key,i))))}reject(o,s){return this.filter(u(o.bind(s)))}forEach(o,s){return this.elements.forEach(((i,u)=>{o.bind(s)(i.value,i.key,i,u)}))}keys(){return this.map(((o,s)=>s.toValue()))}values(){return this.map((o=>o.toValue()))}}o.exports=ObjectSlice},86804:(o,s,i)=>{const u=i(10316),_=i(41067),w=i(71167),x=i(40239),C=i(12242),j=i(6233),L=i(87726),B=i(61045),$=i(86303),V=i(14540),U=i(92340),z=i(10866),Y=i(55973);function refract(o){if(o instanceof u)return o;if("string"==typeof o)return new w(o);if("number"==typeof o)return new x(o);if("boolean"==typeof o)return new C(o);if(null===o)return new _;if(Array.isArray(o))return new j(o.map(refract));if("object"==typeof o){return new B(o)}return o}u.prototype.ObjectElement=B,u.prototype.RefElement=V,u.prototype.MemberElement=L,u.prototype.refract=refract,U.prototype.refract=refract,o.exports={Element:u,NullElement:_,StringElement:w,NumberElement:x,BooleanElement:C,ArrayElement:j,MemberElement:L,ObjectElement:B,LinkElement:$,RefElement:V,refract,ArraySlice:U,ObjectSlice:z,KeyValuePair:Y}},86303:(o,s,i)=>{const u=i(10316);o.exports=class LinkElement extends u{constructor(o,s,i){super(o||[],s,i),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(o){this.attributes.set("relation",o)}get href(){return this.attributes.get("href")}set href(o){this.attributes.set("href",o)}}},14540:(o,s,i)=>{const u=i(10316);o.exports=class RefElement extends u{constructor(o,s,i){super(o||[],s,i),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(o){this.attributes.set("path",o)}}},34035:(o,s,i)=>{const u=i(3110),_=i(86804);s.g$=u,s.KeyValuePair=i(55973),s.G6=_.ArraySlice,s.ot=_.ObjectSlice,s.Hg=_.Element,s.Om=_.StringElement,s.kT=_.NumberElement,s.bd=_.BooleanElement,s.Os=_.NullElement,s.wE=_.ArrayElement,s.Sh=_.ObjectElement,s.Pr=_.MemberElement,s.sI=_.RefElement,s.Ft=_.LinkElement,s.e=_.refract,i(85105),i(75147)},6233:(o,s,i)=>{const u=i(6048),_=i(10316),w=i(92340);class ArrayElement extends _{constructor(o,s,i){super(o||[],s,i),this.element="array"}primitive(){return"array"}get(o){return this.content[o]}getValue(o){const s=this.get(o);if(s)return s.toValue()}getIndex(o){return this.content[o]}set(o,s){return this.content[o]=this.refract(s),this}remove(o){const s=this.content.splice(o,1);return s.length?s[0]:null}map(o,s){return this.content.map(o,s)}flatMap(o,s){return this.map(o,s).reduce(((o,s)=>o.concat(s)),[])}compactMap(o,s){const i=[];return this.forEach((u=>{const _=o.bind(s)(u);_&&i.push(_)})),i}filter(o,s){return new w(this.content.filter(o,s))}reject(o,s){return this.filter(u(o),s)}reduce(o,s){let i,u;void 0!==s?(i=0,u=this.refract(s)):(i=1,u="object"===this.primitive()?this.first.value:this.first);for(let s=i;s{o.bind(s)(i,this.refract(u))}))}shift(){return this.content.shift()}unshift(o){this.content.unshift(this.refract(o))}push(o){return this.content.push(this.refract(o)),this}add(o){this.push(o)}findElements(o,s){const i=s||{},u=!!i.recursive,_=void 0===i.results?[]:i.results;return this.forEach(((s,i,w)=>{u&&void 0!==s.findElements&&s.findElements(o,{results:_,recursive:u}),o(s,i,w)&&_.push(s)})),_}find(o){return new w(this.findElements(o,{recursive:!0}))}findByElement(o){return this.find((s=>s.element===o))}findByClass(o){return this.find((s=>s.classes.includes(o)))}getById(o){return this.find((s=>s.id.toValue()===o)).first}includes(o){return this.content.some((s=>s.equals(o)))}contains(o){return this.includes(o)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(o){return new this.constructor(this.content.concat(o.content))}"fantasy-land/concat"(o){return this.concat(o)}"fantasy-land/map"(o){return new this.constructor(this.map(o))}"fantasy-land/chain"(o){return this.map((s=>o(s)),this).reduce(((o,s)=>o.concat(s)),this.empty())}"fantasy-land/filter"(o){return new this.constructor(this.content.filter(o))}"fantasy-land/reduce"(o,s){return this.content.reduce(o,s)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement["fantasy-land/empty"]=ArrayElement.empty,"undefined"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),o.exports=ArrayElement},12242:(o,s,i)=>{const u=i(10316);o.exports=class BooleanElement extends u{constructor(o,s,i){super(o,s,i),this.element="boolean"}primitive(){return"boolean"}}},10316:(o,s,i)=>{const u=i(2404),_=i(55973),w=i(92340);class Element{constructor(o,s,i){s&&(this.meta=s),i&&(this.attributes=i),this.content=o}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((o=>{o.parent=this,o.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const o=new this.constructor;return o.element=this.element,this.meta.length&&(o._meta=this.meta.clone()),this.attributes.length&&(o._attributes=this.attributes.clone()),this.content?this.content.clone?o.content=this.content.clone():Array.isArray(this.content)?o.content=this.content.map((o=>o.clone())):o.content=this.content:o.content=this.content,o}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof _?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((o=>o.toValue()),this):this.content}toRef(o){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const s=new this.RefElement(this.id.toValue());return o&&(s.path=o),s}findRecursive(...o){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const s=o.pop();let i=new w;const append=(o,s)=>(o.push(s),o),checkElement=(o,i)=>{i.element===s&&o.push(i);const u=i.findRecursive(s);return u&&u.reduce(append,o),i.content instanceof _&&(i.content.key&&checkElement(o,i.content.key),i.content.value&&checkElement(o,i.content.value)),o};return this.content&&(this.content.element&&checkElement(i,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,i)),o.isEmpty||(i=i.filter((s=>{let i=s.parents.map((o=>o.element));for(const s in o){const u=o[s],_=i.indexOf(u);if(-1===_)return!1;i=i.splice(0,_)}return!0}))),i}set(o){return this.content=o,this}equals(o){return u(this.toValue(),o)}getMetaProperty(o,s){if(!this.meta.hasKey(o)){if(this.isFrozen){const o=this.refract(s);return o.freeze(),o}this.meta.set(o,s)}return this.meta.get(o)}setMetaProperty(o,s){this.meta.set(o,s)}get element(){return this._storedElement||"element"}set element(o){this._storedElement=o}get content(){return this._content}set content(o){if(o instanceof Element)this._content=o;else if(o instanceof w)this.content=o.elements;else if("string"==typeof o||"number"==typeof o||"boolean"==typeof o||"null"===o||null==o)this._content=o;else if(o instanceof _)this._content=o;else if(Array.isArray(o))this._content=o.map(this.refract);else{if("object"!=typeof o)throw new Error("Cannot set content to given value");this._content=Object.keys(o).map((s=>new this.MemberElement(s,o[s])))}}get meta(){if(!this._meta){if(this.isFrozen){const o=new this.ObjectElement;return o.freeze(),o}this._meta=new this.ObjectElement}return this._meta}set meta(o){o instanceof this.ObjectElement?this._meta=o:this.meta.set(o||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const o=new this.ObjectElement;return o.freeze(),o}this._attributes=new this.ObjectElement}return this._attributes}set attributes(o){o instanceof this.ObjectElement?this._attributes=o:this.attributes.set(o||{})}get id(){return this.getMetaProperty("id","")}set id(o){this.setMetaProperty("id",o)}get classes(){return this.getMetaProperty("classes",[])}set classes(o){this.setMetaProperty("classes",o)}get title(){return this.getMetaProperty("title","")}set title(o){this.setMetaProperty("title",o)}get description(){return this.getMetaProperty("description","")}set description(o){this.setMetaProperty("description",o)}get links(){return this.getMetaProperty("links",[])}set links(o){this.setMetaProperty("links",o)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:o}=this;const s=new w;for(;o;)s.push(o),o=o.parent;return s}get children(){if(Array.isArray(this.content))return new w(this.content);if(this.content instanceof _){const o=new w([this.content.key]);return this.content.value&&o.push(this.content.value),o}return this.content instanceof Element?new w([this.content]):new w}get recursiveChildren(){const o=new w;return this.children.forEach((s=>{o.push(s),s.recursiveChildren.forEach((s=>{o.push(s)}))})),o}}o.exports=Element},87726:(o,s,i)=>{const u=i(55973),_=i(10316);o.exports=class MemberElement extends _{constructor(o,s,i,_){super(new u,i,_),this.element="member",this.key=o,this.value=s}get key(){return this.content.key}set key(o){this.content.key=this.refract(o)}get value(){return this.content.value}set value(o){this.content.value=this.refract(o)}}},41067:(o,s,i)=>{const u=i(10316);o.exports=class NullElement extends u{constructor(o,s,i){super(o||null,s,i),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}},40239:(o,s,i)=>{const u=i(10316);o.exports=class NumberElement extends u{constructor(o,s,i){super(o,s,i),this.element="number"}primitive(){return"number"}}},61045:(o,s,i)=>{const u=i(6048),_=i(23805),w=i(6233),x=i(87726),C=i(10866);o.exports=class ObjectElement extends w{constructor(o,s,i){super(o||[],s,i),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((o,s)=>(o[s.key.toValue()]=s.value?s.value.toValue():void 0,o)),{})}get(o){const s=this.getMember(o);if(s)return s.value}getMember(o){if(void 0!==o)return this.content.find((s=>s.key.toValue()===o))}remove(o){let s=null;return this.content=this.content.filter((i=>i.key.toValue()!==o||(s=i,!1))),s}getKey(o){const s=this.getMember(o);if(s)return s.key}set(o,s){if(_(o))return Object.keys(o).forEach((s=>{this.set(s,o[s])})),this;const i=o,u=this.getMember(i);return u?u.value=s:this.content.push(new x(i,s)),this}keys(){return this.content.map((o=>o.key.toValue()))}values(){return this.content.map((o=>o.value.toValue()))}hasKey(o){return this.content.some((s=>s.key.equals(o)))}items(){return this.content.map((o=>[o.key.toValue(),o.value.toValue()]))}map(o,s){return this.content.map((i=>o.bind(s)(i.value,i.key,i)))}compactMap(o,s){const i=[];return this.forEach(((u,_,w)=>{const x=o.bind(s)(u,_,w);x&&i.push(x)})),i}filter(o,s){return new C(this.content).filter(o,s)}reject(o,s){return this.filter(u(o),s)}forEach(o,s){return this.content.forEach((i=>o.bind(s)(i.value,i.key,i)))}}},71167:(o,s,i)=>{const u=i(10316);o.exports=class StringElement extends u{constructor(o,s,i){super(o,s,i),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},75147:(o,s,i)=>{const u=i(85105);o.exports=class JSON06Serialiser extends u{serialise(o){if(!(o instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${o}\` is not an Element instance`);let s;o._attributes&&o.attributes.get("variable")&&(s=o.attributes.get("variable"));const i={element:o.element};o._meta&&o._meta.length>0&&(i.meta=this.serialiseObject(o.meta));const u="enum"===o.element||-1!==o.attributes.keys().indexOf("enumerations");if(u){const s=this.enumSerialiseAttributes(o);s&&(i.attributes=s)}else if(o._attributes&&o._attributes.length>0){let{attributes:u}=o;u.get("metadata")&&(u=u.clone(),u.set("meta",u.get("metadata")),u.remove("metadata")),"member"===o.element&&s&&(u=u.clone(),u.remove("variable")),u.length>0&&(i.attributes=this.serialiseObject(u))}if(u)i.content=this.enumSerialiseContent(o,i);else if(this[`${o.element}SerialiseContent`])i.content=this[`${o.element}SerialiseContent`](o,i);else if(void 0!==o.content){let u;s&&o.content.key?(u=o.content.clone(),u.key.attributes.set("variable",s),u=this.serialiseContent(u)):u=this.serialiseContent(o.content),this.shouldSerialiseContent(o,u)&&(i.content=u)}else this.shouldSerialiseContent(o,o.content)&&o instanceof this.namespace.elements.Array&&(i.content=[]);return i}shouldSerialiseContent(o,s){return"parseResult"===o.element||"httpRequest"===o.element||"httpResponse"===o.element||"category"===o.element||"link"===o.element||void 0!==s&&(!Array.isArray(s)||0!==s.length)}refSerialiseContent(o,s){return delete s.attributes,{href:o.toValue(),path:o.path.toValue()}}sourceMapSerialiseContent(o){return o.toValue()}dataStructureSerialiseContent(o){return[this.serialiseContent(o.content)]}enumSerialiseAttributes(o){const s=o.attributes.clone(),i=s.remove("enumerations")||new this.namespace.elements.Array([]),u=s.get("default");let _=s.get("samples")||new this.namespace.elements.Array([]);if(u&&u.content&&(u.content.attributes&&u.content.attributes.remove("typeAttributes"),s.set("default",new this.namespace.elements.Array([u.content]))),_.forEach((o=>{o.content&&o.content.element&&o.content.attributes.remove("typeAttributes")})),o.content&&0!==i.length&&_.unshift(o.content),_=_.map((o=>o instanceof this.namespace.elements.Array?[o]:new this.namespace.elements.Array([o.content]))),_.length&&s.set("samples",_),s.length>0)return this.serialiseObject(s)}enumSerialiseContent(o){if(o._attributes){const s=o.attributes.get("enumerations");if(s&&s.length>0)return s.content.map((o=>{const s=o.clone();return s.attributes.remove("typeAttributes"),this.serialise(s)}))}if(o.content){const s=o.content.clone();return s.attributes.remove("typeAttributes"),[this.serialise(s)]}return[]}deserialise(o){if("string"==typeof o)return new this.namespace.elements.String(o);if("number"==typeof o)return new this.namespace.elements.Number(o);if("boolean"==typeof o)return new this.namespace.elements.Boolean(o);if(null===o)return new this.namespace.elements.Null;if(Array.isArray(o))return new this.namespace.elements.Array(o.map(this.deserialise,this));const s=this.namespace.getElementClass(o.element),i=new s;i.element!==o.element&&(i.element=o.element),o.meta&&this.deserialiseObject(o.meta,i.meta),o.attributes&&this.deserialiseObject(o.attributes,i.attributes);const u=this.deserialiseContent(o.content);if(void 0===u&&null!==i.content||(i.content=u),"enum"===i.element){i.content&&i.attributes.set("enumerations",i.content);let o=i.attributes.get("samples");if(i.attributes.remove("samples"),o){const u=o;o=new this.namespace.elements.Array,u.forEach((u=>{u.forEach((u=>{const _=new s(u);_.element=i.element,o.push(_)}))}));const _=o.shift();i.content=_?_.content:void 0,i.attributes.set("samples",o)}else i.content=void 0;let u=i.attributes.get("default");if(u&&u.length>0){u=u.get(0);const o=new s(u);o.element=i.element,i.attributes.set("default",o)}}else if("dataStructure"===i.element&&Array.isArray(i.content))[i.content]=i.content;else if("category"===i.element){const o=i.attributes.get("meta");o&&(i.attributes.set("metadata",o),i.attributes.remove("meta"))}else"member"===i.element&&i.key&&i.key._attributes&&i.key._attributes.getValue("variable")&&(i.attributes.set("variable",i.key.attributes.get("variable")),i.key.attributes.remove("variable"));return i}serialiseContent(o){if(o instanceof this.namespace.elements.Element)return this.serialise(o);if(o instanceof this.namespace.KeyValuePair){const s={key:this.serialise(o.key)};return o.value&&(s.value=this.serialise(o.value)),s}return o&&o.map?o.map(this.serialise,this):o}deserialiseContent(o){if(o){if(o.element)return this.deserialise(o);if(o.key){const s=new this.namespace.KeyValuePair(this.deserialise(o.key));return o.value&&(s.value=this.deserialise(o.value)),s}if(o.map)return o.map(this.deserialise,this)}return o}shouldRefract(o){return!!(o._attributes&&o.attributes.keys().length||o._meta&&o.meta.keys().length)||"enum"!==o.element&&(o.element!==o.primitive()||"member"===o.element)}convertKeyToRefract(o,s){return this.shouldRefract(s)?this.serialise(s):"enum"===s.element?this.serialiseEnum(s):"array"===s.element?s.map((s=>this.shouldRefract(s)||"default"===o?this.serialise(s):"array"===s.element||"object"===s.element||"enum"===s.element?s.children.map((o=>this.serialise(o))):s.toValue())):"object"===s.element?(s.content||[]).map(this.serialise,this):s.toValue()}serialiseEnum(o){return o.children.map((o=>this.serialise(o)))}serialiseObject(o){const s={};return o.forEach(((o,i)=>{if(o){const u=i.toValue();s[u]=this.convertKeyToRefract(u,o)}})),s}deserialiseObject(o,s){Object.keys(o).forEach((i=>{s.set(i,this.deserialise(o[i]))}))}}},85105:o=>{o.exports=class JSONSerialiser{constructor(o){this.namespace=o||new this.Namespace}serialise(o){if(!(o instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${o}\` is not an Element instance`);const s={element:o.element};o._meta&&o._meta.length>0&&(s.meta=this.serialiseObject(o.meta)),o._attributes&&o._attributes.length>0&&(s.attributes=this.serialiseObject(o.attributes));const i=this.serialiseContent(o.content);return void 0!==i&&(s.content=i),s}deserialise(o){if(!o.element)throw new Error("Given value is not an object containing an element name");const s=new(this.namespace.getElementClass(o.element));s.element!==o.element&&(s.element=o.element),o.meta&&this.deserialiseObject(o.meta,s.meta),o.attributes&&this.deserialiseObject(o.attributes,s.attributes);const i=this.deserialiseContent(o.content);return void 0===i&&null!==s.content||(s.content=i),s}serialiseContent(o){if(o instanceof this.namespace.elements.Element)return this.serialise(o);if(o instanceof this.namespace.KeyValuePair){const s={key:this.serialise(o.key)};return o.value&&(s.value=this.serialise(o.value)),s}if(o&&o.map){if(0===o.length)return;return o.map(this.serialise,this)}return o}deserialiseContent(o){if(o){if(o.element)return this.deserialise(o);if(o.key){const s=new this.namespace.KeyValuePair(this.deserialise(o.key));return o.value&&(s.value=this.deserialise(o.value)),s}if(o.map)return o.map(this.deserialise,this)}return o}serialiseObject(o){const s={};if(o.forEach(((o,i)=>{o&&(s[i.toValue()]=this.serialise(o))})),0!==Object.keys(s).length)return s}deserialiseObject(o,s){Object.keys(o).forEach((i=>{s.set(i,this.deserialise(o[i]))}))}}},58859:(o,s,i)=>{var u="function"==typeof Map&&Map.prototype,_=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,w=u&&_&&"function"==typeof _.get?_.get:null,x=u&&Map.prototype.forEach,C="function"==typeof Set&&Set.prototype,j=Object.getOwnPropertyDescriptor&&C?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,L=C&&j&&"function"==typeof j.get?j.get:null,B=C&&Set.prototype.forEach,$="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,V="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,U="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,z=Boolean.prototype.valueOf,Y=Object.prototype.toString,Z=Function.prototype.toString,ee=String.prototype.match,ie=String.prototype.slice,ae=String.prototype.replace,ce=String.prototype.toUpperCase,le=String.prototype.toLowerCase,pe=RegExp.prototype.test,de=Array.prototype.concat,fe=Array.prototype.join,ye=Array.prototype.slice,be=Math.floor,_e="function"==typeof BigInt?BigInt.prototype.valueOf:null,we=Object.getOwnPropertySymbols,Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,xe="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Pe="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xe||"symbol")?Symbol.toStringTag:null,Te=Object.prototype.propertyIsEnumerable,Re=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(o){return o.__proto__}:null);function addNumericSeparator(o,s){if(o===1/0||o===-1/0||o!=o||o&&o>-1e3&&o<1e3||pe.call(/e/,s))return s;var i=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof o){var u=o<0?-be(-o):be(o);if(u!==o){var _=String(u),w=ie.call(s,_.length+1);return ae.call(_,i,"$&_")+"."+ae.call(ae.call(w,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ae.call(s,i,"$&_")}var qe=i(42634),$e=qe.custom,ze=isSymbol($e)?$e:null;function wrapQuotes(o,s,i){var u="double"===(i.quoteStyle||s)?'"':"'";return u+o+u}function quote(o){return ae.call(String(o),/"/g,""")}function isArray(o){return!("[object Array]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}function isRegExp(o){return!("[object RegExp]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}function isSymbol(o){if(xe)return o&&"object"==typeof o&&o instanceof Symbol;if("symbol"==typeof o)return!0;if(!o||"object"!=typeof o||!Se)return!1;try{return Se.call(o),!0}catch(o){}return!1}o.exports=function inspect_(o,s,u,_){var C=s||{};if(has(C,"quoteStyle")&&"single"!==C.quoteStyle&&"double"!==C.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(C,"maxStringLength")&&("number"==typeof C.maxStringLength?C.maxStringLength<0&&C.maxStringLength!==1/0:null!==C.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var j=!has(C,"customInspect")||C.customInspect;if("boolean"!=typeof j&&"symbol"!==j)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(C,"indent")&&null!==C.indent&&"\t"!==C.indent&&!(parseInt(C.indent,10)===C.indent&&C.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(C,"numericSeparator")&&"boolean"!=typeof C.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Y=C.numericSeparator;if(void 0===o)return"undefined";if(null===o)return"null";if("boolean"==typeof o)return o?"true":"false";if("string"==typeof o)return inspectString(o,C);if("number"==typeof o){if(0===o)return 1/0/o>0?"0":"-0";var ce=String(o);return Y?addNumericSeparator(o,ce):ce}if("bigint"==typeof o){var pe=String(o)+"n";return Y?addNumericSeparator(o,pe):pe}var be=void 0===C.depth?5:C.depth;if(void 0===u&&(u=0),u>=be&&be>0&&"object"==typeof o)return isArray(o)?"[Array]":"[Object]";var we=function getIndent(o,s){var i;if("\t"===o.indent)i="\t";else{if(!("number"==typeof o.indent&&o.indent>0))return null;i=fe.call(Array(o.indent+1)," ")}return{base:i,prev:fe.call(Array(s+1),i)}}(C,u);if(void 0===_)_=[];else if(indexOf(_,o)>=0)return"[Circular]";function inspect(o,s,i){if(s&&(_=ye.call(_)).push(s),i){var w={depth:C.depth};return has(C,"quoteStyle")&&(w.quoteStyle=C.quoteStyle),inspect_(o,w,u+1,_)}return inspect_(o,C,u+1,_)}if("function"==typeof o&&!isRegExp(o)){var $e=function nameOf(o){if(o.name)return o.name;var s=ee.call(Z.call(o),/^function\s*([\w$]+)/);if(s)return s[1];return null}(o),We=arrObjKeys(o,inspect);return"[Function"+($e?": "+$e:" (anonymous)")+"]"+(We.length>0?" { "+fe.call(We,", ")+" }":"")}if(isSymbol(o)){var He=xe?ae.call(String(o),/^(Symbol\(.*\))_[^)]*$/,"$1"):Se.call(o);return"object"!=typeof o||xe?He:markBoxed(He)}if(function isElement(o){if(!o||"object"!=typeof o)return!1;if("undefined"!=typeof HTMLElement&&o instanceof HTMLElement)return!0;return"string"==typeof o.nodeName&&"function"==typeof o.getAttribute}(o)){for(var Ye="<"+le.call(String(o.nodeName)),Xe=o.attributes||[],Qe=0;Qe"}if(isArray(o)){if(0===o.length)return"[]";var et=arrObjKeys(o,inspect);return we&&!function singleLineValues(o){for(var s=0;s=0)return!1;return!0}(et)?"["+indentedJoin(et,we)+"]":"[ "+fe.call(et,", ")+" ]"}if(function isError(o){return!("[object Error]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}(o)){var tt=arrObjKeys(o,inspect);return"cause"in Error.prototype||!("cause"in o)||Te.call(o,"cause")?0===tt.length?"["+String(o)+"]":"{ ["+String(o)+"] "+fe.call(tt,", ")+" }":"{ ["+String(o)+"] "+fe.call(de.call("[cause]: "+inspect(o.cause),tt),", ")+" }"}if("object"==typeof o&&j){if(ze&&"function"==typeof o[ze]&&qe)return qe(o,{depth:be-u});if("symbol"!==j&&"function"==typeof o.inspect)return o.inspect()}if(function isMap(o){if(!w||!o||"object"!=typeof o)return!1;try{w.call(o);try{L.call(o)}catch(o){return!0}return o instanceof Map}catch(o){}return!1}(o)){var rt=[];return x&&x.call(o,(function(s,i){rt.push(inspect(i,o,!0)+" => "+inspect(s,o))})),collectionOf("Map",w.call(o),rt,we)}if(function isSet(o){if(!L||!o||"object"!=typeof o)return!1;try{L.call(o);try{w.call(o)}catch(o){return!0}return o instanceof Set}catch(o){}return!1}(o)){var nt=[];return B&&B.call(o,(function(s){nt.push(inspect(s,o))})),collectionOf("Set",L.call(o),nt,we)}if(function isWeakMap(o){if(!$||!o||"object"!=typeof o)return!1;try{$.call(o,$);try{V.call(o,V)}catch(o){return!0}return o instanceof WeakMap}catch(o){}return!1}(o))return weakCollectionOf("WeakMap");if(function isWeakSet(o){if(!V||!o||"object"!=typeof o)return!1;try{V.call(o,V);try{$.call(o,$)}catch(o){return!0}return o instanceof WeakSet}catch(o){}return!1}(o))return weakCollectionOf("WeakSet");if(function isWeakRef(o){if(!U||!o||"object"!=typeof o)return!1;try{return U.call(o),!0}catch(o){}return!1}(o))return weakCollectionOf("WeakRef");if(function isNumber(o){return!("[object Number]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}(o))return markBoxed(inspect(Number(o)));if(function isBigInt(o){if(!o||"object"!=typeof o||!_e)return!1;try{return _e.call(o),!0}catch(o){}return!1}(o))return markBoxed(inspect(_e.call(o)));if(function isBoolean(o){return!("[object Boolean]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}(o))return markBoxed(z.call(o));if(function isString(o){return!("[object String]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}(o))return markBoxed(inspect(String(o)));if("undefined"!=typeof window&&o===window)return"{ [object Window] }";if(o===i.g)return"{ [object globalThis] }";if(!function isDate(o){return!("[object Date]"!==toStr(o)||Pe&&"object"==typeof o&&Pe in o)}(o)&&!isRegExp(o)){var ot=arrObjKeys(o,inspect),st=Re?Re(o)===Object.prototype:o instanceof Object||o.constructor===Object,it=o instanceof Object?"":"null prototype",at=!st&&Pe&&Object(o)===o&&Pe in o?ie.call(toStr(o),8,-1):it?"Object":"",ct=(st||"function"!=typeof o.constructor?"":o.constructor.name?o.constructor.name+" ":"")+(at||it?"["+fe.call(de.call([],at||[],it||[]),": ")+"] ":"");return 0===ot.length?ct+"{}":we?ct+"{"+indentedJoin(ot,we)+"}":ct+"{ "+fe.call(ot,", ")+" }"}return String(o)};var We=Object.prototype.hasOwnProperty||function(o){return o in this};function has(o,s){return We.call(o,s)}function toStr(o){return Y.call(o)}function indexOf(o,s){if(o.indexOf)return o.indexOf(s);for(var i=0,u=o.length;is.maxStringLength){var i=o.length-s.maxStringLength,u="... "+i+" more character"+(i>1?"s":"");return inspectString(ie.call(o,0,s.maxStringLength),s)+u}return wrapQuotes(ae.call(ae.call(o,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",s)}function lowbyte(o){var s=o.charCodeAt(0),i={8:"b",9:"t",10:"n",12:"f",13:"r"}[s];return i?"\\"+i:"\\x"+(s<16?"0":"")+ce.call(s.toString(16))}function markBoxed(o){return"Object("+o+")"}function weakCollectionOf(o){return o+" { ? }"}function collectionOf(o,s,i,u){return o+" ("+s+") {"+(u?indentedJoin(i,u):fe.call(i,", "))+"}"}function indentedJoin(o,s){if(0===o.length)return"";var i="\n"+s.prev+s.base;return i+fe.call(o,","+i)+"\n"+s.prev}function arrObjKeys(o,s){var i=isArray(o),u=[];if(i){u.length=o.length;for(var _=0;_{var s,i,u=o.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(o){if(s===setTimeout)return setTimeout(o,0);if((s===defaultSetTimout||!s)&&setTimeout)return s=setTimeout,setTimeout(o,0);try{return s(o,0)}catch(i){try{return s.call(null,o,0)}catch(i){return s.call(this,o,0)}}}!function(){try{s="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(o){s=defaultSetTimout}try{i="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(o){i=defaultClearTimeout}}();var _,w=[],x=!1,C=-1;function cleanUpNextTick(){x&&_&&(x=!1,_.length?w=_.concat(w):C=-1,w.length&&drainQueue())}function drainQueue(){if(!x){var o=runTimeout(cleanUpNextTick);x=!0;for(var s=w.length;s;){for(_=w,w=[];++C1)for(var i=1;i{"use strict";var u=i(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,o.exports=function(){function shim(o,s,i,_,w,x){if(x!==u){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}function getShim(){return shim}shim.isRequired=shim;var o={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return o.PropTypes=o,o}},5556:(o,s,i)=>{o.exports=i(2694)()},6925:o=>{"use strict";o.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},74765:o=>{"use strict";var s=String.prototype.replace,i=/%20/g,u="RFC1738",_="RFC3986";o.exports={default:_,formatters:{RFC1738:function(o){return s.call(o,i,"+")},RFC3986:function(o){return String(o)}},RFC1738:u,RFC3986:_}},55373:(o,s,i)=>{"use strict";var u=i(98636),_=i(62642),w=i(74765);o.exports={formats:w,parse:_,stringify:u}},62642:(o,s,i)=>{"use strict";var u=i(37720),_=Object.prototype.hasOwnProperty,w=Array.isArray,x={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:u.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(o){return o.replace(/&#(\d+);/g,(function(o,s){return String.fromCharCode(parseInt(s,10))}))},parseArrayValue=function(o,s){return o&&"string"==typeof o&&s.comma&&o.indexOf(",")>-1?o.split(","):o},C=function parseQueryStringKeys(o,s,i,u){if(o){var w=i.allowDots?o.replace(/\.([^.[]+)/g,"[$1]"):o,x=/(\[[^[\]]*])/g,C=i.depth>0&&/(\[[^[\]]*])/.exec(w),j=C?w.slice(0,C.index):w,L=[];if(j){if(!i.plainObjects&&_.call(Object.prototype,j)&&!i.allowPrototypes)return;L.push(j)}for(var B=0;i.depth>0&&null!==(C=x.exec(w))&&B=0;--w){var x,C=o[w];if("[]"===C&&i.parseArrays)x=[].concat(_);else{x=i.plainObjects?Object.create(null):{};var j="["===C.charAt(0)&&"]"===C.charAt(C.length-1)?C.slice(1,-1):C,L=parseInt(j,10);i.parseArrays||""!==j?!isNaN(L)&&C!==j&&String(L)===j&&L>=0&&i.parseArrays&&L<=i.arrayLimit?(x=[])[L]=_:"__proto__"!==j&&(x[j]=_):x={0:_}}_=x}return _}(L,s,i,u)}};o.exports=function(o,s){var i=function normalizeParseOptions(o){if(!o)return x;if(null!==o.decoder&&void 0!==o.decoder&&"function"!=typeof o.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==o.charset&&"utf-8"!==o.charset&&"iso-8859-1"!==o.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=void 0===o.charset?x.charset:o.charset;return{allowDots:void 0===o.allowDots?x.allowDots:!!o.allowDots,allowPrototypes:"boolean"==typeof o.allowPrototypes?o.allowPrototypes:x.allowPrototypes,allowSparse:"boolean"==typeof o.allowSparse?o.allowSparse:x.allowSparse,arrayLimit:"number"==typeof o.arrayLimit?o.arrayLimit:x.arrayLimit,charset:s,charsetSentinel:"boolean"==typeof o.charsetSentinel?o.charsetSentinel:x.charsetSentinel,comma:"boolean"==typeof o.comma?o.comma:x.comma,decoder:"function"==typeof o.decoder?o.decoder:x.decoder,delimiter:"string"==typeof o.delimiter||u.isRegExp(o.delimiter)?o.delimiter:x.delimiter,depth:"number"==typeof o.depth||!1===o.depth?+o.depth:x.depth,ignoreQueryPrefix:!0===o.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof o.interpretNumericEntities?o.interpretNumericEntities:x.interpretNumericEntities,parameterLimit:"number"==typeof o.parameterLimit?o.parameterLimit:x.parameterLimit,parseArrays:!1!==o.parseArrays,plainObjects:"boolean"==typeof o.plainObjects?o.plainObjects:x.plainObjects,strictNullHandling:"boolean"==typeof o.strictNullHandling?o.strictNullHandling:x.strictNullHandling}}(s);if(""===o||null==o)return i.plainObjects?Object.create(null):{};for(var j="string"==typeof o?function parseQueryStringValues(o,s){var i,C={},j=s.ignoreQueryPrefix?o.replace(/^\?/,""):o,L=s.parameterLimit===1/0?void 0:s.parameterLimit,B=j.split(s.delimiter,L),$=-1,V=s.charset;if(s.charsetSentinel)for(i=0;i-1&&(z=w(z)?[z]:z),_.call(C,U)?C[U]=u.combine(C[U],z):C[U]=z}return C}(o,i):o,L=i.plainObjects?Object.create(null):{},B=Object.keys(j),$=0;${"use strict";var u=i(920),_=i(37720),w=i(74765),x=Object.prototype.hasOwnProperty,C={brackets:function brackets(o){return o+"[]"},comma:"comma",indices:function indices(o,s){return o+"["+s+"]"},repeat:function repeat(o){return o}},j=Array.isArray,L=String.prototype.split,B=Array.prototype.push,pushToArray=function(o,s){B.apply(o,j(s)?s:[s])},$=Date.prototype.toISOString,V=w.default,U={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:_.encode,encodeValuesOnly:!1,format:V,formatter:w.formatters[V],indices:!1,serializeDate:function serializeDate(o){return $.call(o)},skipNulls:!1,strictNullHandling:!1},z={},Y=function stringify(o,s,i,w,x,C,B,$,V,Y,Z,ee,ie,ae,ce,le){for(var pe=o,de=le,fe=0,ye=!1;void 0!==(de=de.get(z))&&!ye;){var be=de.get(o);if(fe+=1,void 0!==be){if(be===fe)throw new RangeError("Cyclic object value");ye=!0}void 0===de.get(z)&&(fe=0)}if("function"==typeof $?pe=$(s,pe):pe instanceof Date?pe=Z(pe):"comma"===i&&j(pe)&&(pe=_.maybeMap(pe,(function(o){return o instanceof Date?Z(o):o}))),null===pe){if(x)return B&&!ae?B(s,U.encoder,ce,"key",ee):s;pe=""}if(function isNonNullishPrimitive(o){return"string"==typeof o||"number"==typeof o||"boolean"==typeof o||"symbol"==typeof o||"bigint"==typeof o}(pe)||_.isBuffer(pe)){if(B){var _e=ae?s:B(s,U.encoder,ce,"key",ee);if("comma"===i&&ae){for(var we=L.call(String(pe),","),Se="",xe=0;xe0?pe.join(",")||null:void 0}];else if(j($))Pe=$;else{var Re=Object.keys(pe);Pe=V?Re.sort(V):Re}for(var qe=w&&j(pe)&&1===pe.length?s+"[]":s,$e=0;$e0?ce+ae:""}},37720:(o,s,i)=>{"use strict";var u=i(74765),_=Object.prototype.hasOwnProperty,w=Array.isArray,x=function(){for(var o=[],s=0;s<256;++s)o.push("%"+((s<16?"0":"")+s.toString(16)).toUpperCase());return o}(),C=function arrayToObject(o,s){for(var i=s&&s.plainObjects?Object.create(null):{},u=0;u1;){var s=o.pop(),i=s.obj[s.prop];if(w(i)){for(var u=[],_=0;_=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||w===u.RFC1738&&(40===B||41===B)?j+=C.charAt(L):B<128?j+=x[B]:B<2048?j+=x[192|B>>6]+x[128|63&B]:B<55296||B>=57344?j+=x[224|B>>12]+x[128|B>>6&63]+x[128|63&B]:(L+=1,B=65536+((1023&B)<<10|1023&C.charCodeAt(L)),j+=x[240|B>>18]+x[128|B>>12&63]+x[128|B>>6&63]+x[128|63&B])}return j},isBuffer:function isBuffer(o){return!(!o||"object"!=typeof o)&&!!(o.constructor&&o.constructor.isBuffer&&o.constructor.isBuffer(o))},isRegExp:function isRegExp(o){return"[object RegExp]"===Object.prototype.toString.call(o)},maybeMap:function maybeMap(o,s){if(w(o)){for(var i=[],u=0;u{"use strict";var i=Object.prototype.hasOwnProperty;function decode(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch(o){return null}}function encode(o){try{return encodeURIComponent(o)}catch(o){return null}}s.stringify=function querystringify(o,s){s=s||"";var u,_,w=[];for(_ in"string"!=typeof s&&(s="?"),o)if(i.call(o,_)){if((u=o[_])||null!=u&&!isNaN(u)||(u=""),_=encode(_),u=encode(u),null===_||null===u)continue;w.push(_+"="+u)}return w.length?s+w.join("&"):""},s.parse=function querystring(o){for(var s,i=/([^=?#&]+)=?([^&]*)/g,u={};s=i.exec(o);){var _=decode(s[1]),w=decode(s[2]);null===_||null===w||_ in u||(u[_]=w)}return u}},41859:(o,s,i)=>{const u=i(27096),_=i(78004),w=u.types;o.exports=class RandExp{constructor(o,s){if(this._setDefaults(o),o instanceof RegExp)this.ignoreCase=o.ignoreCase,this.multiline=o.multiline,o=o.source;else{if("string"!=typeof o)throw new Error("Expected a regexp or string");this.ignoreCase=s&&-1!==s.indexOf("i"),this.multiline=s&&-1!==s.indexOf("m")}this.tokens=u(o)}_setDefaults(o){this.max=null!=o.max?o.max:null!=RandExp.prototype.max?RandExp.prototype.max:100,this.defaultRange=o.defaultRange?o.defaultRange:this.defaultRange.clone(),o.randInt&&(this.randInt=o.randInt)}gen(){return this._gen(this.tokens,[])}_gen(o,s){var i,u,_,x,C;switch(o.type){case w.ROOT:case w.GROUP:if(o.followedBy||o.notFollowedBy)return"";for(o.remember&&void 0===o.groupNumber&&(o.groupNumber=s.push(null)-1),u="",x=0,C=(i=o.options?this._randSelect(o.options):o.stack).length;x{"use strict";var u=i(65606),_=65536,w=4294967295;var x=i(92861).Buffer,C=i.g.crypto||i.g.msCrypto;C&&C.getRandomValues?o.exports=function randomBytes(o,s){if(o>w)throw new RangeError("requested too many random bytes");var i=x.allocUnsafe(o);if(o>0)if(o>_)for(var j=0;j{"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}Object.defineProperty(s,"__esModule",{value:!0}),s.CopyToClipboard=void 0;var u=_interopRequireDefault(i(96540)),_=_interopRequireDefault(i(17965)),w=["text","onCopy","options","children"];function _interopRequireDefault(o){return o&&o.__esModule?o:{default:o}}function ownKeys(o,s){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(o);s&&(u=u.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),i.push.apply(i,u)}return i}function _objectSpread(o){for(var s=1;s=0||(_[i]=o[i]);return _}(o,s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(o);for(u=0;u=0||Object.prototype.propertyIsEnumerable.call(o,i)&&(_[i]=o[i])}return _}function _defineProperties(o,s){for(var i=0;i{"use strict";var u=i(25264).CopyToClipboard;u.CopyToClipboard=u,o.exports=u},81214:(o,s,i)=>{"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}Object.defineProperty(s,"__esModule",{value:!0}),s.DebounceInput=void 0;var u=_interopRequireDefault(i(96540)),_=_interopRequireDefault(i(20181)),w=["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"];function _interopRequireDefault(o){return o&&o.__esModule?o:{default:o}}function _objectWithoutProperties(o,s){if(null==o)return{};var i,u,_=function _objectWithoutPropertiesLoose(o,s){if(null==o)return{};var i,u,_={},w=Object.keys(o);for(u=0;u=0||(_[i]=o[i]);return _}(o,s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(o);for(u=0;u=0||Object.prototype.propertyIsEnumerable.call(o,i)&&(_[i]=o[i])}return _}function ownKeys(o,s){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(o);s&&(u=u.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),i.push.apply(i,u)}return i}function _objectSpread(o){for(var s=1;s=u?i.notify(o):s.length>_.length&&i.notify(_objectSpread(_objectSpread({},o),{},{target:_objectSpread(_objectSpread({},o.target),{},{value:""})}))}))})),_defineProperty(_assertThisInitialized(i),"onKeyDown",(function(o){"Enter"===o.key&&i.forceNotify(o);var s=i.props.onKeyDown;s&&(o.persist(),s(o))})),_defineProperty(_assertThisInitialized(i),"onBlur",(function(o){i.forceNotify(o);var s=i.props.onBlur;s&&(o.persist(),s(o))})),_defineProperty(_assertThisInitialized(i),"createNotifier",(function(o){if(o<0)i.notify=function(){return null};else if(0===o)i.notify=i.doNotify;else{var s=(0,_.default)((function(o){i.isDebouncing=!1,i.doNotify(o)}),o);i.notify=function(o){i.isDebouncing=!0,s(o)},i.flush=function(){return s.flush()},i.cancel=function(){i.isDebouncing=!1,s.cancel()}}})),_defineProperty(_assertThisInitialized(i),"doNotify",(function(){i.props.onChange.apply(void 0,arguments)})),_defineProperty(_assertThisInitialized(i),"forceNotify",(function(o){var s=i.props.debounceTimeout;if(i.isDebouncing||!(s>0)){i.cancel&&i.cancel();var u=i.state.value,_=i.props.minLength;u.length>=_?i.doNotify(o):i.doNotify(_objectSpread(_objectSpread({},o),{},{target:_objectSpread(_objectSpread({},o.target),{},{value:u})}))}})),i.isDebouncing=!1,i.state={value:void 0===o.value||null===o.value?"":o.value};var u=i.props.debounceTimeout;return i.createNotifier(u),i}return function _createClass(o,s,i){return s&&_defineProperties(o.prototype,s),i&&_defineProperties(o,i),Object.defineProperty(o,"prototype",{writable:!1}),o}(DebounceInput,[{key:"componentDidUpdate",value:function componentDidUpdate(o){if(!this.isDebouncing){var s=this.props,i=s.value,u=s.debounceTimeout,_=o.debounceTimeout,w=o.value,x=this.state.value;void 0!==i&&w!==i&&x!==i&&this.setState({value:i}),u!==_&&this.createNotifier(u)}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.flush&&this.flush()}},{key:"render",value:function render(){var o,s,i=this.props,_=i.element,x=(i.onChange,i.value,i.minLength,i.debounceTimeout,i.forceNotifyByEnter),C=i.forceNotifyOnBlur,j=i.onKeyDown,L=i.onBlur,B=i.inputRef,$=_objectWithoutProperties(i,w),V=this.state.value;o=x?{onKeyDown:this.onKeyDown}:j?{onKeyDown:j}:{},s=C?{onBlur:this.onBlur}:L?{onBlur:L}:{};var U=B?{ref:B}:{};return u.default.createElement(_,_objectSpread(_objectSpread(_objectSpread(_objectSpread({},$),{},{onChange:this.onChange,value:V},o),s),U))}}]),DebounceInput}(u.default.PureComponent);s.DebounceInput=x,_defineProperty(x,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},24677:(o,s,i)=>{"use strict";var u=i(81214).DebounceInput;u.DebounceInput=u,o.exports=u},22551:(o,s,i)=>{"use strict";var u=i(96540),_=i(69982);function p(o){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+o,i=1;i