diff --git a/.github/workflows/add-new-issues-to-project.yml b/.github/workflows/add-new-issues-to-project.yml
new file mode 100644
index 00000000..63932bb4
--- /dev/null
+++ b/.github/workflows/add-new-issues-to-project.yml
@@ -0,0 +1,16 @@
+name: Add new issues to GNS3 project
+
+on:
+ issues:
+ types:
+ - opened
+
+jobs:
+ add-to-project:
+ name: Add issue to project
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/add-to-project@v0.4.0
+ with:
+ project-url: https://github.com/orgs/GNS3/projects/3
+ github-token: ${{ secrets.ADD_NEW_ISSUES_TO_PROJECT }}
diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish-api-documentation.yml
similarity index 100%
rename from .github/workflows/publish_api_documentation.yml
rename to .github/workflows/publish-api-documentation.yml
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 8456ec06..aa78d289 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -30,10 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- python -m pip install -r dev-requirements.txt
- - name: Install Windows dependencies
- if: matrix.os == 'windows-latest'
- run: python -m pip install -r win-requirements.txt
+ python -m pip install .[dev]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
diff --git a/.whitesource b/.whitesource
index 60fc783c..e112468f 100644
--- a/.whitesource
+++ b/.whitesource
@@ -2,7 +2,8 @@
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
- "projectToken" : ""
+ "projectToken" : "",
+ "baseBranches": ["master", "2.2", "3.0"]
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 783e04bb..00000000
--- a/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Jeremy Grossmann
-Julien Duponchelle
\ No newline at end of file
diff --git a/CHANGELOG b/CHANGELOG
index 83d2e083..571c5931 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,77 @@
# Change Log
+## 2.2.42 09/08/2023
+
+* Bundle web-ui v2.2.42
+* Handle API version key in VirtualBox 7. Fixes #2266
+* Enable system certificate store for SSL connections
+* Use DEFAULT_BUFFER_SIZE for md5sum
+* Fix version check when installing appliances. Ref https://github.com/GNS3/gns3-gui/issues/3486
+* Allow connection to ws console over IPv6. Fixes https://github.com/GNS3/gns3-web-ui/issues/1400
+* Support for Python 3.12
+* Remove import urllib3 and let sentry_sdk import and patch it. Fixes https://github.com/GNS3/gns3-gui/issues/3498
+
+## 2.2.41 12/07/2023
+
+* Bundle web-ui v2.2.41
+* Catch urllib3 exceptions when sending crash report. Ref https://github.com/GNS3/gns3-gui/issues/3483
+* Only fetch Qemu version once when starting Qemu + only add speed/duplex for virtio-net-pci with Qemu version >= 2.12
+* Use recent OVMF firmware (stable-202305) and use flash drives to configure Qemu command line
+* Remove the useless executable permissions to the file gns3server/disks/empty8G.qcow2
+* Backport UEFI boot mode support for Qemu VMs
+
+## 2.2.40.1 10/06/2023
+
+* Re-bundle Web-Ui v2.2.40. Fixes #2239
+
+## 2.2.40 06/06/2023
+
+* qemu : with network adapter_type equal to "virtio-net-pci", fix the speed to 10000 and duplex to full. The values are actually fake. (https://github.com/GNS3/gns3-gui/issues/3476)
+* Parse name for request to node creation from template
+* Remove Xvfb + x11vnc support
+* Require a Host-Only Network to start the VirtualBox GNS3 VM on macOS with VirtualBox 7
+* Properly catch aiohttp client exception. Ref #2228
+* Catch ConnectionResetError when waiting for the wrap console
+* Fix open IPv6 address for HTTP consoles on controller. Fixes https://github.com/GNS3/gns3-gui/issues/3448
+* Use proc.communicate() when checking for subprocess output As recommended in https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process.stderr
+
+## 2.2.39 08/05/2023
+
+* Install web-ui v2.2.39
+* Add generic function to install resource files
+* Install empty Qemu disks on first start
+* Check for colon in project name. Fixes #2203
+* Upgrade distro and aiohttp dependencies
+
+## 2.2.38 28/02/2023
+
+* Bundle web-ui v2.2.38
+* Fix c7200_i0_log.txt is created in the current directory. Fixes #2191
+* Check swtpm version and start swtpm before qemu
+* Fix broken websocket console with Python 3.11
+* Fix "cannot reopen console". Ref #2182
+* Fix Qemu binary not set when adding appliance from template
+
+## 2.2.37 25/01/2023
+
+* Fix link communication issues on Windows with uBridge
+* Fix StreamWriter doesn't have the wait_closed() method in Python3.6. Fixes #2170
+* Install built-in appliances when no previous version has been detected. Fixes #2168
+* Update documentation to install gns3-server. Fixes #2124
+* Give udhcpc executable right. Fixes #2159
+
+## 2.2.36 04/01/2023
+
+* Install web-ui v2.2.36
+* Add Trusted Platform Module (TPM) support for Qemu VMs
+* Require Dynamips 0.2.23 and bind Dynamips hypervisor on 127.0.0.1
+* Delete the built-in appliance directory before installing updated files
+* Use a stock BusyBox for the Docker integration
+* Overwrite built-in appliance files when starting a more recent version of the server
+* Fix reset console. Fixes #1619
+* Only use importlib_resources for Python <= 3.9. Fixes #2147
+* Support when the user field defined in Docker container is an ID. Fixes #2134
+
## 3.0.0a3 27/12/2022
* Add web-ui v3.0.0a3
diff --git a/Dockerfile b/Dockerfile
index 159a729f..4ced87dc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -34,4 +34,4 @@ COPY . /gns3server
RUN mkdir -p ~/.config/GNS3/3.0/
RUN cp scripts/gns3_server.conf ~/.config/GNS3/3.0/
-RUN python3 setup.py install
+RUN python3 -m pip install .
diff --git a/MANIFEST.in b/MANIFEST.in
index 2b9ab0ff..e8286093 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,11 +1,7 @@
-include README.rst
-include AUTHORS
+include README.md
include LICENSE
-include MANIFEST.in
-include requirements.txt
-include conf/*.conf
-recursive-include tests *
-recursive-exclude docs *
+include CHANGELOG
recursive-include gns3server *
+recursive-exclude docs *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
diff --git a/README.md b/README.md
index b12ddd1f..f4761960 100644
--- a/README.md
+++ b/README.md
@@ -85,8 +85,8 @@ cd gns3-server
git checkout 3.0
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
-python3 setup.py install
-python3 -m gns3server --local
+python3 -m pip install .
+python3 -m gns3server
```
You will have to manually install other software dependencies (see above), for Dynamips, VPCS and uBridge the easiest is to install from our PPA.
diff --git a/SECURITY.md b/SECURITY.md
index 7161ebd1..b2ad79b8 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -14,4 +14,4 @@ currently being supported with security updates.
## Reporting a Vulnerability
-Please contact us at security@gns3.net
+Please use GitHub's report a vulnerability feature. More information can be found in https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability
diff --git a/dev-requirements.txt b/dev-requirements.txt
index faefc4dd..5e29ebc7 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -1,8 +1,6 @@
--r requirements.txt
-
-pytest==7.2.0
+pytest==7.4.0
flake8==5.0.4 # v5.0.4 is the last to support Python 3.7
pytest-timeout==2.1.0
-pytest-asyncio==0.20.3
-requests==2.28.1
-httpx==0.23.1
+pytest-asyncio==0.21.1
+requests==2.31.0
+httpx==0.24.1
diff --git a/gns3server/alembic.ini b/gns3server/alembic.ini
new file mode 100644
index 00000000..7252c9bf
--- /dev/null
+++ b/gns3server/alembic.ini
@@ -0,0 +1,103 @@
+# A generic, single database configuration.
+
+[alembic]
+# path to migration scripts
+script_location = db_migrations
+
+# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
+# Uncomment the line below if you want the files to be prepended with date and time
+# file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
+
+# sys.path path, will be prepended to sys.path if present.
+# defaults to the current working directory.
+prepend_sys_path = .
+
+# timezone to use when rendering the date within the migration file
+# as well as the filename.
+# If specified, requires the python-dateutil library that can be
+# installed by adding `alembic[tz]` to the pip requirements
+# string value is passed to dateutil.tz.gettz()
+# leave blank for localtime
+# timezone =
+
+# max length of characters to apply to the
+# "slug" field
+# truncate_slug_length = 40
+
+# set to 'true' to run the environment during
+# the 'revision' command, regardless of autogenerate
+# revision_environment = false
+
+# set to 'true' to allow .pyc and .pyo files without
+# a source .py file to be detected as revisions in the
+# versions/ directory
+# sourceless = false
+
+# version location specification; This defaults
+# to db_migrations/versions. When using multiple version
+# directories, initial revisions must be specified with --version-path.
+# The path separator used here should be the separator specified by "version_path_separator" below.
+# version_locations = %(here)s/bar:%(here)s/bat:db_migrations/versions
+
+# version path separator; As mentioned above, this is the character used to split
+# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
+# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
+# Valid values for version_path_separator are:
+#
+# version_path_separator = :
+# version_path_separator = ;
+# version_path_separator = space
+version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
+
+# the output encoding used when revision files
+# are written from script.py.mako
+# output_encoding = utf-8
+
+sqlalchemy.url =
+
+
+[post_write_hooks]
+# post_write_hooks defines scripts or Python functions that are run
+# on newly generated revision scripts. See the documentation for further
+# detail and examples
+
+# format using "black" - use the console_scripts runner, against the "black" entrypoint
+# hooks = black
+# black.type = console_scripts
+# black.entrypoint = black
+# black.options = -l 79 REVISION_SCRIPT_FILENAME
+
+# Logging configuration
+[loggers]
+keys = root,sqlalchemy,alembic
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = WARN
+handlers = console
+qualname =
+
+[logger_sqlalchemy]
+level = WARN
+handlers =
+qualname = sqlalchemy.engine
+
+[logger_alembic]
+level = INFO
+handlers =
+qualname = alembic
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(levelname)-5.5s [%(name)s] %(message)s
+datefmt = %H:%M:%S
diff --git a/gns3server/api/routes/compute/__init__.py b/gns3server/api/routes/compute/__init__.py
index 041ada28..4628dfd8 100644
--- a/gns3server/api/routes/compute/__init__.py
+++ b/gns3server/api/routes/compute/__init__.py
@@ -58,7 +58,6 @@ log = logging.getLogger(__name__)
compute_api = FastAPI(
title="GNS3 compute API",
- dependencies=[Depends(compute_authentication)],
description="This page describes the private compute API for GNS3. PLEASE DO NOT USE DIRECTLY!",
version="v3",
)
@@ -158,11 +157,13 @@ async def http_exception_handler(request: Request, exc: StarletteHTTPException):
compute_api.include_router(
capabilities.router,
+ dependencies=[Depends(compute_authentication)],
tags=["Capabilities"]
)
compute_api.include_router(
compute.router,
+ dependencies=[Depends(compute_authentication)],
tags=["Compute"]
)
@@ -173,86 +174,101 @@ compute_api.include_router(
compute_api.include_router(
projects.router,
+ dependencies=[Depends(compute_authentication)],
tags=["Projects"]
)
compute_api.include_router(
images.router,
+ dependencies=[Depends(compute_authentication)],
tags=["Images"]
)
compute_api.include_router(
atm_switch_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/atm_switch/nodes",
tags=["ATM switch"]
)
compute_api.include_router(
cloud_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/cloud/nodes",
tags=["Cloud nodes"]
)
compute_api.include_router(
docker_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/docker/nodes",
tags=["Docker nodes"]
)
compute_api.include_router(
dynamips_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/dynamips/nodes",
tags=["Dynamips nodes"]
)
compute_api.include_router(
ethernet_hub_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/ethernet_hub/nodes",
tags=["Ethernet hub nodes"]
)
compute_api.include_router(
ethernet_switch_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/ethernet_switch/nodes",
tags=["Ethernet switch nodes"]
)
compute_api.include_router(
frame_relay_switch_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/frame_relay_switch/nodes",
tags=["Frame Relay switch nodes"]
)
compute_api.include_router(
iou_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/iou/nodes",
tags=["IOU nodes"])
compute_api.include_router(
nat_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/nat/nodes",
tags=["NAT nodes"]
)
compute_api.include_router(
qemu_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/qemu/nodes",
tags=["Qemu nodes"]
)
compute_api.include_router(
virtualbox_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/virtualbox/nodes",
tags=["VirtualBox nodes"]
)
compute_api.include_router(
vmware_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/vmware/nodes",
tags=["VMware nodes"]
)
compute_api.include_router(
vpcs_nodes.router,
+ dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/vpcs/nodes",
tags=["VPCS nodes"]
)
diff --git a/gns3server/api/routes/compute/compute.py b/gns3server/api/routes/compute/compute.py
index db257965..ba6156fc 100644
--- a/gns3server/api/routes/compute/compute.py
+++ b/gns3server/api/routes/compute/compute.py
@@ -45,7 +45,7 @@ router = APIRouter()
@router.post("/projects/{project_id}/ports/udp", status_code=status.HTTP_201_CREATED)
def allocate_udp_port(project_id: UUID) -> dict:
"""
- Allocate an UDP port on the compute.
+ Allocate a UDP port on the compute.
"""
pm = ProjectManager.instance()
@@ -56,7 +56,7 @@ def allocate_udp_port(project_id: UUID) -> dict:
@router.get("/network/interfaces")
-def network_interfaces() -> dict:
+def network_interfaces() -> List[dict]:
"""
List all the network interfaces available on the compute"
"""
diff --git a/gns3server/api/routes/compute/images.py b/gns3server/api/routes/compute/images.py
index f32c07fd..3c329393 100644
--- a/gns3server/api/routes/compute/images.py
+++ b/gns3server/api/routes/compute/images.py
@@ -34,7 +34,7 @@ router = APIRouter()
@router.get("/docker/images")
-async def get_docker_images() -> List[str]:
+async def get_docker_images() -> List[dict]:
"""
Get all Docker images.
"""
@@ -44,7 +44,7 @@ async def get_docker_images() -> List[str]:
@router.get("/dynamips/images")
-async def get_dynamips_images() -> List[str]:
+async def get_dynamips_images() -> List[dict]:
"""
Get all Dynamips images.
"""
@@ -85,7 +85,7 @@ async def download_dynamips_image(filename: str) -> FileResponse:
@router.get("/iou/images")
-async def get_iou_images() -> List[str]:
+async def get_iou_images() -> List[dict]:
"""
Get all IOU images.
"""
@@ -125,7 +125,7 @@ async def download_iou_image(filename: str) -> FileResponse:
@router.get("/qemu/images")
-async def get_qemu_images() -> List[str]:
+async def get_qemu_images() -> List[dict]:
qemu_manager = Qemu.instance()
return await qemu_manager.list_images()
diff --git a/gns3server/api/routes/compute/notifications.py b/gns3server/api/routes/compute/notifications.py
index 621107a7..26a04b61 100644
--- a/gns3server/api/routes/compute/notifications.py
+++ b/gns3server/api/routes/compute/notifications.py
@@ -35,7 +35,7 @@ router = APIRouter()
@router.websocket("/notifications/ws")
-async def notification_ws(websocket: WebSocket) -> None:
+async def project_ws_notifications(websocket: WebSocket) -> None:
"""
Receive project notifications about the project from WebSocket.
"""
diff --git a/gns3server/api/routes/compute/virtualbox_nodes.py b/gns3server/api/routes/compute/virtualbox_nodes.py
index 18c28751..f457cbff 100644
--- a/gns3server/api/routes/compute/virtualbox_nodes.py
+++ b/gns3server/api/routes/compute/virtualbox_nodes.py
@@ -32,7 +32,7 @@ from gns3server.compute.virtualbox.virtualbox_vm import VirtualBoxVM
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or VirtualBox node"}}
-router = APIRouter(responses=responses)
+router = APIRouter(responses=responses, deprecated=True)
def dep_node(project_id: UUID, node_id: UUID) -> VirtualBoxVM:
diff --git a/gns3server/api/routes/compute/vmware_nodes.py b/gns3server/api/routes/compute/vmware_nodes.py
index a289455b..d7c38844 100644
--- a/gns3server/api/routes/compute/vmware_nodes.py
+++ b/gns3server/api/routes/compute/vmware_nodes.py
@@ -32,7 +32,7 @@ from gns3server.compute.vmware.vmware_vm import VMwareVM
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or VMware node"}}
-router = APIRouter(responses=responses)
+router = APIRouter(responses=responses, deprecated=True)
def dep_node(project_id: UUID, node_id: UUID) -> VMwareVM:
diff --git a/gns3server/api/routes/controller/__init__.py b/gns3server/api/routes/controller/__init__.py
index 7f6cdcdd..28ad9b01 100644
--- a/gns3server/api/routes/controller/__init__.py
+++ b/gns3server/api/routes/controller/__init__.py
@@ -23,7 +23,6 @@ from . import drawings
from . import gns3vm
from . import links
from . import nodes
-from . import notifications
from . import projects
from . import snapshots
from . import symbols
@@ -32,73 +31,72 @@ from . import images
from . import users
from . import groups
from . import roles
-from . import permissions
+from . import acl
from .dependencies.authentication import get_current_active_user
router = APIRouter()
-router.include_router(controller.router, tags=["Controller"])
-router.include_router(users.router, prefix="/users", tags=["Users"])
+router.include_router(
+ controller.router,
+ tags=["Controller"]
+)
+
+router.include_router(
+ users.router,
+ prefix="/access/users",
+ tags=["Users"]
+)
router.include_router(
groups.router,
- dependencies=[Depends(get_current_active_user)],
- prefix="/groups",
+ prefix="/access/groups",
tags=["Users groups"]
)
router.include_router(
roles.router,
- dependencies=[Depends(get_current_active_user)],
- prefix="/roles",
+ prefix="/access/roles",
tags=["Roles"]
)
router.include_router(
- permissions.router,
- dependencies=[Depends(get_current_active_user)],
- prefix="/permissions",
- tags=["Permissions"]
+ acl.router,
+ prefix="/access/acl",
+ tags=["ACL"]
)
router.include_router(
images.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/images",
tags=["Images"]
)
router.include_router(
templates.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/templates",
tags=["Templates"]
)
router.include_router(
projects.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/projects",
tags=["Projects"])
router.include_router(
nodes.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/projects/{project_id}/nodes",
tags=["Nodes"]
)
router.include_router(
links.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/projects/{project_id}/links",
tags=["Links"]
)
router.include_router(
drawings.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/projects/{project_id}/drawings",
tags=["Drawings"])
@@ -109,7 +107,6 @@ router.include_router(
router.include_router(
snapshots.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/projects/{project_id}/snapshots",
tags=["Snapshots"])
@@ -120,23 +117,16 @@ router.include_router(
tags=["Computes"]
)
-router.include_router(
- notifications.router,
- dependencies=[Depends(get_current_active_user)],
- prefix="/notifications",
- tags=["Notifications"])
-
router.include_router(
appliances.router,
- dependencies=[Depends(get_current_active_user)],
prefix="/appliances",
tags=["Appliances"]
)
router.include_router(
gns3vm.router,
- deprecated=True,
dependencies=[Depends(get_current_active_user)],
+ deprecated=True,
prefix="/gns3vm",
tags=["GNS3 VM"]
)
diff --git a/gns3server/api/routes/controller/acl.py b/gns3server/api/routes/controller/acl.py
new file mode 100644
index 00000000..778ef51b
--- /dev/null
+++ b/gns3server/api/routes/controller/acl.py
@@ -0,0 +1,250 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2023 GNS3 Technologies Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+"""
+API routes for ACL.
+"""
+
+import re
+
+from fastapi import APIRouter, Depends, Request, status
+from fastapi.routing import APIRoute
+from uuid import UUID
+from typing import List
+
+
+from gns3server import schemas
+from gns3server.controller.controller_error import (
+ ControllerBadRequestError,
+ ControllerNotFoundError
+)
+
+from gns3server.controller import Controller
+from gns3server.db.repositories.users import UsersRepository
+from gns3server.db.repositories.rbac import RbacRepository
+from gns3server.db.repositories.images import ImagesRepository
+from gns3server.db.repositories.templates import TemplatesRepository
+from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
+
+import logging
+
+log = logging.getLogger(__name__)
+
+router = APIRouter()
+
+
+@router.get(
+ "/endpoints",
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("ACE.Audit"))]
+)
+async def endpoints(
+ users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
+ images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
+ templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository))
+) -> List[dict]:
+ """
+ List all endpoints to be used in ACL entries.
+ """
+
+ controller = Controller.instance()
+ endpoints = [{"endpoint": "/", "name": "All endpoints", "endpoint_type": "root"}]
+
+ def add_to_endpoints(endpoint: str, name: str, endpoint_type: str) -> None:
+ if endpoint not in endpoints:
+ endpoints.append({"endpoint": endpoint, "name": name, "endpoint_type": endpoint_type})
+
+ # projects
+ add_to_endpoints("/projects", "All projects", "project")
+ projects = [p for p in controller.projects.values()]
+ for project in projects:
+ add_to_endpoints(f"/projects/{project.id}", f'Project "{project.name}"', "project")
+
+ # nodes
+ add_to_endpoints(f"/projects/{project.id}/nodes", f'All nodes in project "{project.name}"', "node")
+ for node in project.nodes.values():
+ add_to_endpoints(
+ f"/projects/{project.id}/nodes/{node['node_id']}",
+ f'Node "{node["name"]}" in project "{project.name}"',
+ endpoint_type="node"
+ )
+
+ # links
+ add_to_endpoints(f"/projects/{project.id}/links", f'All links in project "{project.name}"', "link")
+ for link in project.links.values():
+ node_id_1 = link["nodes"][0]["node_id"]
+ node_id_2 = link["nodes"][1]["node_id"]
+ node_name_1 = project.nodes[node_id_1]["name"]
+ node_name_2 = project.nodes[node_id_2]["name"]
+ add_to_endpoints(
+ f"/projects/{project.id}/links/{link['link_id']}",
+ f'Link from "{node_name_1}" to "{node_name_2}" in project "{project.name}"',
+ endpoint_type="link"
+ )
+
+ # users
+ add_to_endpoints("/access/users", "All users", "user")
+ users = await users_repo.get_users()
+ for user in users:
+ add_to_endpoints(f"/users/{user.user_id}", f'User "{user.username}"', "user")
+
+ # groups
+ add_to_endpoints("/access/groups", "All groups", "group")
+ groups = await users_repo.get_user_groups()
+ for group in groups:
+ add_to_endpoints(f"/groups/{group.user_group_id}", f'Group "{group.name}"', "group")
+
+ # roles
+ add_to_endpoints("/access/roles", "All roles", "role")
+ roles = await rbac_repo.get_roles()
+ for role in roles:
+ add_to_endpoints(f"/roles/{role.role_id}", f'Role "{role.name}"', "role")
+
+ # images
+ add_to_endpoints("/images", "All images", "image")
+ images = await images_repo.get_images()
+ for image in images:
+ add_to_endpoints(f"/images/{image.filename}", f'Image "{image.filename}"', "image")
+
+ # templates
+ add_to_endpoints("/templates", "All templates", "template")
+ templates = await templates_repo.get_templates()
+ for template in templates:
+ add_to_endpoints(f"/templates/{template.template_id}", f'Template "{template.name}"', "template")
+
+ return endpoints
+
+
+@router.get(
+ "",
+ response_model=List[schemas.ACE],
+ dependencies=[Depends(has_privilege("ACE.Audit"))]
+)
+async def get_aces(
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+) -> List[schemas.ACE]:
+ """
+ Get all ACL entries.
+
+ Required privilege: ACE.Audit
+ """
+
+ return await rbac_repo.get_aces()
+
+
+@router.post(
+ "",
+ response_model=schemas.ACE,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("ACE.Allocate"))]
+)
+async def create_ace(
+ request: Request,
+ ace_create: schemas.ACECreate,
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+) -> schemas.ACE:
+ """
+ Create a new ACL entry.
+
+ Required privilege: ACE.Allocate
+ """
+
+ for route in request.app.routes:
+ if isinstance(route, APIRoute):
+
+ # remove the prefix (e.g. "/v3") from the route path
+ route_path = re.sub(r"^/v[0-9]", "", route.path)
+ # replace route path ID parameters by a UUID regex
+ route_path = re.sub(r"{\w+_id}", "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", route_path)
+ # replace remaining route path parameters by a word matching regex
+ route_path = re.sub(r"/{[\w:]+}", r"/\\w+", route_path)
+
+ if re.fullmatch(route_path, ace_create.path):
+ log.info("Creating ACE for route path", ace_create.path, route_path)
+ return await rbac_repo.create_ace(ace_create)
+
+ raise ControllerBadRequestError(f"Path '{ace_create.path}' doesn't match any existing endpoint")
+
+
+@router.get(
+ "/{ace_id}",
+ response_model=schemas.ACE,
+ dependencies=[Depends(has_privilege("ACE.Audit"))]
+)
+async def get_ace(
+ ace_id: UUID,
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
+) -> schemas.ACE:
+ """
+ Get an ACL entry.
+
+ Required privilege: ACE.Audit
+ """
+
+ ace = await rbac_repo.get_ace(ace_id)
+ if not ace:
+ raise ControllerNotFoundError(f"ACL entry '{ace_id}' not found")
+ return ace
+
+
+@router.put(
+ "/{ace_id}",
+ response_model=schemas.ACE,
+ dependencies=[Depends(has_privilege("ACE.Modify"))]
+)
+async def update_ace(
+ ace_id: UUID,
+ ace_update: schemas.ACEUpdate,
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+) -> schemas.ACE:
+ """
+ Update an ACL entry.
+
+ Required privilege: ACE.Modify
+ """
+
+ ace = await rbac_repo.get_ace(ace_id)
+ if not ace:
+ raise ControllerNotFoundError(f"ACL entry '{ace_id}' not found")
+
+ return await rbac_repo.update_ace(ace_id, ace_update)
+
+
+@router.delete(
+ "/{ace_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("ACE.Allocate"))]
+)
+async def delete_ace(
+ ace_id: UUID,
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
+) -> None:
+ """
+ Delete an ACL entry.
+
+ Required privilege: ACE.Allocate
+ """
+
+ ace = await rbac_repo.get_ace(ace_id)
+ if not ace:
+ raise ControllerNotFoundError(f"ACL entry '{ace_id}' not found")
+
+ success = await rbac_repo.delete_ace(ace_id)
+ if not success:
+ raise ControllerNotFoundError(f"ACL entry '{ace_id}' could not be deleted")
diff --git a/gns3server/api/routes/controller/appliances.py b/gns3server/api/routes/controller/appliances.py
index c27f5a8f..93db5b20 100644
--- a/gns3server/api/routes/controller/appliances.py
+++ b/gns3server/api/routes/controller/appliances.py
@@ -20,7 +20,7 @@ API routes for appliances.
import logging
-from fastapi import APIRouter, Depends, Response, status
+from fastapi import APIRouter, Depends, status
from typing import Optional, List
from uuid import UUID
@@ -38,19 +38,28 @@ from gns3server.db.repositories.rbac import RbacRepository
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
+
log = logging.getLogger(__name__)
router = APIRouter()
-@router.get("")
+@router.get(
+ "",
+ response_model=List[schemas.Appliance],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Appliance.Audit"))]
+)
async def get_appliances(
update: Optional[bool] = False,
symbol_theme: Optional[str] = None
) -> List[schemas.Appliance]:
"""
Return all appliances known by the controller.
+
+ Required privilege: Appliance.Audit
"""
controller = Controller.instance()
@@ -60,10 +69,17 @@ async def get_appliances(
return [c.asdict() for c in controller.appliance_manager.appliances.values()]
-@router.get("/{appliance_id}")
+@router.get(
+ "/{appliance_id}",
+ response_model=schemas.Appliance,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Appliance.Audit"))]
+)
def get_appliance(appliance_id: UUID) -> schemas.Appliance:
"""
Get an appliance file.
+
+ Required privilege: Appliance.Audit
"""
controller = Controller.instance()
@@ -73,10 +89,16 @@ def get_appliance(appliance_id: UUID) -> schemas.Appliance:
return appliance.asdict()
-@router.post("/{appliance_id}/version", status_code=status.HTTP_201_CREATED)
-def add_appliance_version(appliance_id: UUID, appliance_version: schemas.ApplianceVersion) -> schemas.Appliance:
+@router.post(
+ "/{appliance_id}/version",
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Appliance.Allocate"))]
+)
+def add_appliance_version(appliance_id: UUID, appliance_version: schemas.ApplianceVersion) -> dict:
"""
- Add a version to an appliance
+ Add a version to an appliance.
+
+ Required privilege: Appliance.Allocate
"""
controller = Controller.instance()
@@ -94,11 +116,15 @@ def add_appliance_version(appliance_id: UUID, appliance_version: schemas.Applian
if version.get("name") == appliance_version.name:
raise ControllerError(message=f"Appliance '{appliance_id}' already has version '{appliance_version.name}'")
- appliance.versions.append(appliance_version.dict(exclude_unset=True))
+ appliance.versions.append(appliance_version.model_dump(exclude_unset=True))
return appliance.asdict()
-@router.post("/{appliance_id}/install", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{appliance_id}/install",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Appliance.Allocate"))]
+)
async def install_appliance(
appliance_id: UUID,
version: Optional[str] = None,
@@ -109,6 +135,8 @@ async def install_appliance(
) -> None:
"""
Install an appliance.
+
+ Required privilege: Appliance.Allocate
"""
controller = Controller.instance()
diff --git a/gns3server/api/routes/controller/computes.py b/gns3server/api/routes/controller/computes.py
index ce8c1629..e9619d0b 100644
--- a/gns3server/api/routes/controller/computes.py
+++ b/gns3server/api/routes/controller/computes.py
@@ -18,16 +18,18 @@
API routes for computes.
"""
-from fastapi import APIRouter, Depends, Response, status
-from typing import List, Union, Optional
+from fastapi import APIRouter, Depends, status
+from typing import Any, List, Union, Optional
from uuid import UUID
from gns3server.controller import Controller
from gns3server.db.repositories.computes import ComputesRepository
+from gns3server.db.repositories.rbac import RbacRepository
from gns3server.services.computes import ComputesService
from gns3server import schemas
from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
responses = {404: {"model": schemas.ErrorMessage, "description": "Compute not found"}}
@@ -43,6 +45,7 @@ router = APIRouter(responses=responses)
409: {"model": schemas.ErrorMessage, "description": "Could not create compute"},
401: {"model": schemas.ErrorMessage, "description": "Invalid authentication for compute"},
},
+ dependencies=[Depends(has_privilege("Compute.Allocate"))]
)
async def create_compute(
compute_create: schemas.ComputeCreate,
@@ -51,15 +54,23 @@ async def create_compute(
) -> schemas.Compute:
"""
Create a new compute on the controller.
+
+ Required privilege: Compute.Allocate
"""
return await ComputesService(computes_repo).create_compute(compute_create, connect)
-@router.post("/{compute_id}/connect", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{compute_id}/connect",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Compute.Audit"))]
+)
async def connect_compute(compute_id: Union[str, UUID]) -> None:
"""
Connect to compute on the controller.
+
+ Required privilege: Compute.Audit
"""
compute = Controller.instance().get_compute(str(compute_id))
@@ -67,29 +78,48 @@ async def connect_compute(compute_id: Union[str, UUID]) -> None:
await compute.connect(report_failed_connection=True)
-@router.get("/{compute_id}", response_model=schemas.Compute, response_model_exclude_unset=True)
+@router.get(
+ "/{compute_id}",
+ response_model=schemas.Compute,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Compute.Audit"))]
+)
async def get_compute(
compute_id: Union[str, UUID], computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository))
) -> schemas.Compute:
"""
Return a compute from the controller.
+
+ Required privilege: Compute.Audit
"""
return await ComputesService(computes_repo).get_compute(compute_id)
-@router.get("", response_model=List[schemas.Compute], response_model_exclude_unset=True)
+@router.get(
+ "",
+ response_model=List[schemas.Compute],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Compute.Audit"))]
+)
async def get_computes(
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
) -> List[schemas.Compute]:
"""
Return all computes known by the controller.
+
+ Required privilege: Compute.Audit
"""
return await ComputesService(computes_repo).get_computes()
-@router.put("/{compute_id}", response_model=schemas.Compute, response_model_exclude_unset=True)
+@router.put(
+ "/{compute_id}",
+ response_model=schemas.Compute,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Compute.Modify"))]
+)
async def update_compute(
compute_id: Union[str, UUID],
compute_update: schemas.ComputeUpdate,
@@ -97,20 +127,31 @@ async def update_compute(
) -> schemas.Compute:
"""
Update a compute on the controller.
+
+ Required privilege: Compute.Modify
"""
return await ComputesService(computes_repo).update_compute(compute_id, compute_update)
-@router.delete("/{compute_id}", status_code=status.HTTP_204_NO_CONTENT)
+@router.delete(
+ "/{compute_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Compute.Allocate"))]
+)
async def delete_compute(
- compute_id: Union[str, UUID], computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository))
+ compute_id: Union[str, UUID],
+ computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a compute from the controller.
+
+ Required privilege: Compute.Allocate
"""
await ComputesService(computes_repo).delete_compute(compute_id)
+ await rbac_repo.delete_all_ace_starting_with_path(f"/computes/{compute_id}")
@router.get("/{compute_id}/docker/images", response_model=List[schemas.ComputeDockerImage])
@@ -157,7 +198,7 @@ async def dynamips_autoidlepc(compute_id: Union[str, UUID], auto_idle_pc: schema
@router.get("/{compute_id}/{emulator}/{endpoint_path:path}", deprecated=True)
-async def forward_get(compute_id: Union[str, UUID], emulator: str, endpoint_path: str) -> dict:
+async def forward_get(compute_id: Union[str, UUID], emulator: str, endpoint_path: str) -> Any:
"""
Forward a GET request to a compute.
Read the full compute API documentation for available routes.
@@ -169,7 +210,7 @@ async def forward_get(compute_id: Union[str, UUID], emulator: str, endpoint_path
@router.post("/{compute_id}/{emulator}/{endpoint_path:path}", deprecated=True)
-async def forward_post(compute_id: Union[str, UUID], emulator: str, endpoint_path: str, compute_data: dict) -> dict:
+async def forward_post(compute_id: Union[str, UUID], emulator: str, endpoint_path: str, compute_data: dict) -> Any:
"""
Forward a POST request to a compute.
Read the full compute API documentation for available routes.
@@ -180,7 +221,7 @@ async def forward_post(compute_id: Union[str, UUID], emulator: str, endpoint_pat
@router.put("/{compute_id}/{emulator}/{endpoint_path:path}", deprecated=True)
-async def forward_put(compute_id: Union[str, UUID], emulator: str, endpoint_path: str, compute_data: dict) -> dict:
+async def forward_put(compute_id: Union[str, UUID], emulator: str, endpoint_path: str, compute_data: dict) -> Any:
"""
Forward a PUT request to a compute.
Read the full compute API documentation for available routes.
diff --git a/gns3server/api/routes/controller/controller.py b/gns3server/api/routes/controller/controller.py
index a20de078..b47dd416 100644
--- a/gns3server/api/routes/controller/controller.py
+++ b/gns3server/api/routes/controller/controller.py
@@ -18,9 +18,12 @@ import asyncio
import signal
import os
-from fastapi import APIRouter, Depends, Request, Response, status
+from fastapi import APIRouter, Request, Depends, WebSocket, WebSocketDisconnect, status
+from fastapi.responses import StreamingResponse
from fastapi.encoders import jsonable_encoder
from fastapi.routing import Mount
+from websockets.exceptions import ConnectionClosed, WebSocketException
+
from typing import List
from gns3server.config import Config
@@ -29,7 +32,7 @@ from gns3server.version import __version__
from gns3server.controller.controller_error import ControllerError, ControllerForbiddenError
from gns3server import schemas
-from .dependencies.authentication import get_current_active_user
+from .dependencies.authentication import get_current_active_user, get_current_active_user_from_websocket
import logging
@@ -174,6 +177,57 @@ async def statistics() -> List[dict]:
return compute_statistics
+@router.get("/notifications", dependencies=[Depends(get_current_active_user)])
+async def controller_http_notifications(request: Request) -> StreamingResponse:
+ """
+ Receive controller notifications about the controller from HTTP stream.
+ """
+
+ from gns3server.api.server import app
+ log.info(f"New client {request.client.host}:{request.client.port} has connected to controller HTTP "
+ f"notification stream")
+
+ async def event_stream():
+ try:
+ with Controller.instance().notification.controller_queue() as queue:
+ while not app.state.exiting:
+ msg = await queue.get_json(5)
+ yield f"{msg}\n".encode("utf-8")
+ finally:
+ log.info(f"Client {request.client.host}:{request.client.port} has disconnected from controller HTTP "
+ f"notification stream")
+ return StreamingResponse(event_stream(), media_type="application/json")
+
+
+@router.websocket("/notifications/ws")
+async def controller_ws_notifications(
+ websocket: WebSocket,
+ current_user: schemas.User = Depends(get_current_active_user_from_websocket)
+) -> None:
+ """
+ Receive project notifications about the controller from WebSocket.
+ """
+
+ if current_user is None:
+ return
+
+ log.info(f"New client {websocket.client.host}:{websocket.client.port} has connected to controller WebSocket")
+ try:
+ with Controller.instance().notification.controller_queue() as queue:
+ while True:
+ notification = await queue.get_json(5)
+ await websocket.send_text(notification)
+ except (ConnectionClosed, WebSocketDisconnect):
+ log.info(f"Client {websocket.client.host}:{websocket.client.port} has disconnected from controller WebSocket")
+ except WebSocketException as e:
+ log.warning(f"Error while sending to controller event to WebSocket client: {e}")
+ finally:
+ try:
+ await websocket.close()
+ except OSError:
+ pass # ignore OSError: [Errno 107] Transport endpoint is not connected
+
+
# @Route.post(
# r"/debug",
# description="Dump debug information to disk (debug directory in config directory). Work only for local server",
diff --git a/gns3server/api/routes/controller/dependencies/authentication.py b/gns3server/api/routes/controller/dependencies/authentication.py
index ce07e9b3..fa846cb4 100644
--- a/gns3server/api/routes/controller/dependencies/authentication.py
+++ b/gns3server/api/routes/controller/dependencies/authentication.py
@@ -74,21 +74,6 @@ async def get_current_active_user(
headers={"WWW-Authenticate": "Bearer"},
)
- # remove the prefix (e.g. "/v3") from URL path
- path = re.sub(r"^/v[0-9]", "", request.url.path)
-
- # special case: always authorize access to the "/users/me" endpoint
- if path == "/users/me":
- return current_user
-
- authorized = await rbac_repo.check_user_is_authorized(current_user.user_id, request.method, path)
- if not authorized:
- raise HTTPException(
- status_code=status.HTTP_401_UNAUTHORIZED,
- detail=f"User is not authorized '{current_user.user_id}' on {request.method} '{path}'",
- headers={"WWW-Authenticate": "Bearer"},
- )
-
return current_user
@@ -96,7 +81,6 @@ async def get_current_active_user_from_websocket(
websocket: WebSocket,
token: str = Query(...),
user_repo: UsersRepository = Depends(get_repository(UsersRepository)),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> Optional[schemas.User]:
await websocket.accept()
@@ -121,18 +105,6 @@ async def get_current_active_user_from_websocket(
detail=f"'{username}' is not an active user"
)
- # remove the prefix (e.g. "/v3") from URL path
- path = re.sub(r"^/v[0-9]", "", websocket.url.path)
-
- # there are no HTTP methods for web sockets, assuming "GET"...
- authorized = await rbac_repo.check_user_is_authorized(user.user_id, "GET", path)
- if not authorized:
- raise HTTPException(
- status_code=status.HTTP_401_UNAUTHORIZED,
- detail=f"User is not authorized '{user.user_id}' on '{path}'",
- headers={"WWW-Authenticate": "Bearer"},
- )
-
return user
except HTTPException as e:
diff --git a/gns3server/api/routes/controller/dependencies/rbac.py b/gns3server/api/routes/controller/dependencies/rbac.py
new file mode 100644
index 00000000..e6795348
--- /dev/null
+++ b/gns3server/api/routes/controller/dependencies/rbac.py
@@ -0,0 +1,78 @@
+#
+# Copyright (C) 2023 GNS3 Technologies Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+import re
+
+from fastapi import Request, WebSocket, Depends, HTTPException
+from gns3server import schemas
+from gns3server.db.repositories.rbac import RbacRepository
+from .authentication import get_current_active_user, get_current_active_user_from_websocket
+from .database import get_repository
+
+import logging
+
+log = logging.getLogger()
+
+
+def has_privilege(
+ privilege_name: str
+):
+ async def get_user_and_check_privilege(
+ request: Request,
+ current_user: schemas.User = Depends(get_current_active_user),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+ ):
+ if not current_user.is_superadmin:
+ path = re.sub(r"^/v[0-9]", "", request.url.path) # remove the prefix (e.g. "/v3") from URL path
+ log.debug(f"Checking user {current_user.username} has privilege {privilege_name} on '{path}'")
+ if not await rbac_repo.check_user_has_privilege(current_user.user_id, path, privilege_name):
+ raise HTTPException(status_code=403, detail=f"Permission denied (privilege {privilege_name} is required)")
+ return current_user
+ return get_user_and_check_privilege
+
+
+def has_privilege_on_websocket(
+ privilege_name: str
+):
+ async def get_user_and_check_privilege(
+ websocket: WebSocket,
+ current_user: schemas.User = Depends(get_current_active_user_from_websocket),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+ ):
+ if not current_user.is_superadmin:
+ path = re.sub(r"^/v[0-9]", "", websocket.url.path) # remove the prefix (e.g. "/v3") from URL path
+ log.debug(f"Checking user {current_user.username} has privilege {privilege_name} on '{path}'")
+ if not await rbac_repo.check_user_has_privilege(current_user.user_id, path, privilege_name):
+ raise HTTPException(status_code=403, detail=f"Permission denied (privilege {privilege_name} is required)")
+ return current_user
+ return get_user_and_check_privilege
+
+# class PrivilegeChecker:
+#
+# def __init__(self, required_privilege: str) -> None:
+# self._required_privilege = required_privilege
+#
+# async def __call__(
+# self,
+# current_user: schemas.User = Depends(get_current_active_user),
+# rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+# ) -> bool:
+#
+# if not await rbac_repo.check_user_has_privilege(current_user.user_id, "/projects", self._required_privilege):
+# raise HTTPException(status_code=403, detail=f"Permission denied (privilege {self._required_privilege} is required)")
+# return True
+
+# Depends(PrivilegeChecker("Project.Audit"))
diff --git a/gns3server/api/routes/controller/drawings.py b/gns3server/api/routes/controller/drawings.py
index 18b0f80a..22ca1b95 100644
--- a/gns3server/api/routes/controller/drawings.py
+++ b/gns3server/api/routes/controller/drawings.py
@@ -18,33 +18,51 @@
API routes for drawings.
"""
-from fastapi import APIRouter, Response, status
+from fastapi import APIRouter, Depends, status
from fastapi.encoders import jsonable_encoder
from typing import List
from uuid import UUID
from gns3server.controller import Controller
+from gns3server.db.repositories.rbac import RbacRepository
from gns3server import schemas
+from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
+
responses = {404: {"model": schemas.ErrorMessage, "description": "Project or drawing not found"}}
router = APIRouter(responses=responses)
-@router.get("", response_model=List[schemas.Drawing], response_model_exclude_unset=True)
+@router.get(
+ "",
+ response_model=List[schemas.Drawing],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Drawing.Audit"))]
+)
async def get_drawings(project_id: UUID) -> List[schemas.Drawing]:
"""
Return the list of all drawings for a given project.
+
+ Required privilege: Drawing.Audit
"""
project = await Controller.instance().get_loaded_project(str(project_id))
return [v.asdict() for v in project.drawings.values()]
-@router.post("", status_code=status.HTTP_201_CREATED, response_model=schemas.Drawing)
+@router.post(
+ "",
+ status_code=status.HTTP_201_CREATED,
+ response_model=schemas.Drawing,
+ dependencies=[Depends(has_privilege("Drawing.Allocate"))]
+)
async def create_drawing(project_id: UUID, drawing_data: schemas.Drawing) -> schemas.Drawing:
"""
Create a new drawing.
+
+ Required privilege: Drawing.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
@@ -52,10 +70,17 @@ async def create_drawing(project_id: UUID, drawing_data: schemas.Drawing) -> sch
return drawing.asdict()
-@router.get("/{drawing_id}", response_model=schemas.Drawing, response_model_exclude_unset=True)
+@router.get(
+ "/{drawing_id}",
+ response_model=schemas.Drawing,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Drawing.Audit"))]
+)
async def get_drawing(project_id: UUID, drawing_id: UUID) -> schemas.Drawing:
"""
Return a drawing.
+
+ Required privilege: Drawing.Audit
"""
project = await Controller.instance().get_loaded_project(str(project_id))
@@ -63,10 +88,17 @@ async def get_drawing(project_id: UUID, drawing_id: UUID) -> schemas.Drawing:
return drawing.asdict()
-@router.put("/{drawing_id}", response_model=schemas.Drawing, response_model_exclude_unset=True)
+@router.put(
+ "/{drawing_id}",
+ response_model=schemas.Drawing,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Drawing.Modify"))]
+)
async def update_drawing(project_id: UUID, drawing_id: UUID, drawing_data: schemas.Drawing) -> schemas.Drawing:
"""
Update a drawing.
+
+ Required privilege: Drawing.Modify
"""
project = await Controller.instance().get_loaded_project(str(project_id))
@@ -75,11 +107,22 @@ async def update_drawing(project_id: UUID, drawing_id: UUID, drawing_data: schem
return drawing.asdict()
-@router.delete("/{drawing_id}", status_code=status.HTTP_204_NO_CONTENT)
-async def delete_drawing(project_id: UUID, drawing_id: UUID) -> None:
+@router.delete(
+ "/{drawing_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Drawing.Allocate"))]
+)
+async def delete_drawing(
+ project_id: UUID,
+ drawing_id: UUID,
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+) -> None:
"""
Delete a drawing.
+
+ Required privilege: Drawing.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
await project.delete_drawing(str(drawing_id))
+ await rbac_repo.delete_all_ace_starting_with_path(f"/drawings/{drawing_id}")
diff --git a/gns3server/api/routes/controller/groups.py b/gns3server/api/routes/controller/groups.py
index 85ebfdc0..d4652353 100644
--- a/gns3server/api/routes/controller/groups.py
+++ b/gns3server/api/routes/controller/groups.py
@@ -19,7 +19,7 @@
API routes for user groups.
"""
-from fastapi import APIRouter, Depends, Response, status
+from fastapi import APIRouter, Depends, status
from uuid import UUID
from typing import List
@@ -33,6 +33,8 @@ from gns3server.controller.controller_error import (
from gns3server.db.repositories.users import UsersRepository
from gns3server.db.repositories.rbac import RbacRepository
+
+from .dependencies.rbac import has_privilege
from .dependencies.database import get_repository
import logging
@@ -42,12 +44,18 @@ log = logging.getLogger(__name__)
router = APIRouter()
-@router.get("", response_model=List[schemas.UserGroup])
+@router.get(
+ "",
+ response_model=List[schemas.UserGroup],
+ dependencies=[Depends(has_privilege("Group.Audit"))]
+)
async def get_user_groups(
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.UserGroup]:
"""
Get all user groups.
+
+ Required privilege: Group.Audit
"""
return await users_repo.get_user_groups()
@@ -56,7 +64,8 @@ async def get_user_groups(
@router.post(
"",
response_model=schemas.UserGroup,
- status_code=status.HTTP_201_CREATED
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Group.Allocate"))]
)
async def create_user_group(
user_group_create: schemas.UserGroupCreate,
@@ -64,6 +73,8 @@ async def create_user_group(
) -> schemas.UserGroup:
"""
Create a new user group.
+
+ Required privilege: Group.Allocate
"""
if await users_repo.get_user_group_by_name(user_group_create.name):
@@ -72,13 +83,19 @@ async def create_user_group(
return await users_repo.create_user_group(user_group_create)
-@router.get("/{user_group_id}", response_model=schemas.UserGroup)
+@router.get(
+ "/{user_group_id}",
+ response_model=schemas.UserGroup,
+ dependencies=[Depends(has_privilege("Group.Audit"))]
+)
async def get_user_group(
user_group_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> schemas.UserGroup:
"""
- Get an user group.
+ Get a user group.
+
+ Required privilege: Group.Audit
"""
user_group = await users_repo.get_user_group(user_group_id)
@@ -87,14 +104,20 @@ async def get_user_group(
return user_group
-@router.put("/{user_group_id}", response_model=schemas.UserGroup)
+@router.put(
+ "/{user_group_id}",
+ response_model=schemas.UserGroup,
+ dependencies=[Depends(has_privilege("Group.Modify"))]
+)
async def update_user_group(
user_group_id: UUID,
user_group_update: schemas.UserGroupUpdate,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.UserGroup:
"""
- Update an user group.
+ Update a user group.
+
+ Required privilege: Group.Modify
"""
user_group = await users_repo.get_user_group(user_group_id)
if not user_group:
@@ -108,14 +131,18 @@ async def update_user_group(
@router.delete(
"/{user_group_id}",
- status_code=status.HTTP_204_NO_CONTENT
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Group.Allocate"))]
)
async def delete_user_group(
- user_group_id: UUID,
- users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
+ user_group_id: UUID,
+ users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
- Delete an user group
+ Delete a user group.
+
+ Required privilege: Group.Allocate
"""
user_group = await users_repo.get_user_group(user_group_id)
@@ -128,15 +155,22 @@ async def delete_user_group(
success = await users_repo.delete_user_group(user_group_id)
if not success:
raise ControllerError(f"User group '{user_group_id}' could not be deleted")
+ await rbac_repo.delete_all_ace_starting_with_path(f"/groups/{user_group_id}")
-@router.get("/{user_group_id}/members", response_model=List[schemas.User])
+@router.get(
+ "/{user_group_id}/members",
+ response_model=List[schemas.User],
+ dependencies=[Depends(has_privilege("Group.Audit"))]
+)
async def get_user_group_members(
user_group_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.User]:
"""
Get all user group members.
+
+ Required privilege: Group.Audit
"""
return await users_repo.get_user_group_members(user_group_id)
@@ -144,7 +178,8 @@ async def get_user_group_members(
@router.put(
"/{user_group_id}/members/{user_id}",
- status_code=status.HTTP_204_NO_CONTENT
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Group.Modify"))]
)
async def add_member_to_group(
user_group_id: UUID,
@@ -152,7 +187,9 @@ async def add_member_to_group(
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> None:
"""
- Add member to an user group.
+ Add member to a user group.
+
+ Required privilege: Group.Modify
"""
user = await users_repo.get_user(user_id)
@@ -166,7 +203,8 @@ async def add_member_to_group(
@router.delete(
"/{user_group_id}/members/{user_id}",
- status_code=status.HTTP_204_NO_CONTENT
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Group.Modify"))]
)
async def remove_member_from_group(
user_group_id: UUID,
@@ -174,7 +212,9 @@ async def remove_member_from_group(
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> None:
"""
- Remove member from an user group.
+ Remove member from a user group.
+
+ Required privilege: Group.Modify
"""
user = await users_repo.get_user(user_id)
@@ -184,61 +224,3 @@ async def remove_member_from_group(
user_group = await users_repo.remove_member_from_user_group(user_group_id, user)
if not user_group:
raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
-
-
-@router.get("/{user_group_id}/roles", response_model=List[schemas.Role])
-async def get_user_group_roles(
- user_group_id: UUID,
- users_repo: UsersRepository = Depends(get_repository(UsersRepository))
-) -> List[schemas.Role]:
- """
- Get all user group roles.
- """
-
- return await users_repo.get_user_group_roles(user_group_id)
-
-
-@router.put(
- "/{user_group_id}/roles/{role_id}",
- status_code=status.HTTP_204_NO_CONTENT
-)
-async def add_role_to_group(
- user_group_id: UUID,
- role_id: UUID,
- users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> Response:
- """
- Add role to an user group.
- """
-
- role = await rbac_repo.get_role(role_id)
- if not role:
- raise ControllerNotFoundError(f"Role '{role_id}' not found")
-
- user_group = await users_repo.add_role_to_user_group(user_group_id, role)
- if not user_group:
- raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
-
-
-@router.delete(
- "/{user_group_id}/roles/{role_id}",
- status_code=status.HTTP_204_NO_CONTENT
-)
-async def remove_role_from_group(
- user_group_id: UUID,
- role_id: UUID,
- users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> None:
- """
- Remove role from an user group.
- """
-
- role = await rbac_repo.get_role(role_id)
- if not role:
- raise ControllerNotFoundError(f"Role '{role_id}' not found")
-
- user_group = await users_repo.remove_role_from_user_group(user_group_id, role)
- if not user_group:
- raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
diff --git a/gns3server/api/routes/controller/images.py b/gns3server/api/routes/controller/images.py
index a37566fa..f4780db0 100644
--- a/gns3server/api/routes/controller/images.py
+++ b/gns3server/api/routes/controller/images.py
@@ -22,7 +22,7 @@ import os
import logging
import urllib.parse
-from fastapi import APIRouter, Request, Response, Depends, status
+from fastapi import APIRouter, Request, Depends, status
from starlette.requests import ClientDisconnect
from sqlalchemy.orm.exc import MultipleResultsFound
from typing import List, Optional
@@ -43,25 +43,37 @@ from gns3server.controller.controller_error import (
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
log = logging.getLogger(__name__)
router = APIRouter()
-@router.get("", response_model=List[schemas.Image])
+@router.get(
+ "",
+ response_model=List[schemas.Image],
+ dependencies=[Depends(has_privilege("Image.Audit"))]
+)
async def get_images(
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
image_type: Optional[schemas.ImageType] = None
) -> List[schemas.Image]:
"""
Return all images.
+
+ Required privilege: Image.Audit
"""
return await images_repo.get_images(image_type)
-@router.post("/upload/{image_path:path}", response_model=schemas.Image, status_code=status.HTTP_201_CREATED)
+@router.post(
+ "/upload/{image_path:path}",
+ response_model=schemas.Image,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Image.Allocate"))]
+)
async def upload_image(
image_path: str,
request: Request,
@@ -76,6 +88,8 @@ async def upload_image(
Example: curl -X POST http://host:port/v3/images/upload/my_image_name.qcow2 \
-H 'Authorization: Bearer ' --data-binary @"/path/to/image.qcow2"
+
+ Required privilege: Image.Allocate
"""
image_path = urllib.parse.unquote(image_path)
@@ -110,13 +124,19 @@ async def upload_image(
return image
-@router.get("/{image_path:path}", response_model=schemas.Image)
+@router.get(
+ "/{image_path:path}",
+ response_model=schemas.Image,
+ dependencies=[Depends(has_privilege("Image.Audit"))]
+)
async def get_image(
image_path: str,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> schemas.Image:
"""
Return an image.
+
+ Required privilege: Image.Audit
"""
image_path = urllib.parse.unquote(image_path)
@@ -126,13 +146,19 @@ async def get_image(
return image
-@router.delete("/{image_path:path}", status_code=status.HTTP_204_NO_CONTENT)
+@router.delete(
+ "/{image_path:path}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Image.Allocate"))]
+)
async def delete_image(
image_path: str,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> None:
"""
Delete an image.
+
+ Required privilege: Image.Allocate
"""
image_path = urllib.parse.unquote(image_path)
@@ -161,12 +187,18 @@ async def delete_image(
raise ControllerError(f"Image '{image_path}' could not be deleted")
-@router.post("/prune", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/prune",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Image.Allocate"))]
+)
async def prune_images(
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> None:
"""
Prune images not attached to any template.
+
+ Required privilege: Image.Allocate
"""
await images_repo.prune_images()
diff --git a/gns3server/api/routes/controller/links.py b/gns3server/api/routes/controller/links.py
index c228751f..28743b75 100644
--- a/gns3server/api/routes/controller/links.py
+++ b/gns3server/api/routes/controller/links.py
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2016 GNS3 Technologies Inc.
+# Copyright (C) 2023 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ API routes for links.
import multidict
import aiohttp
-from fastapi import APIRouter, Depends, Request, Response, status
+from fastapi import APIRouter, Depends, Request, status
from fastapi.responses import StreamingResponse
from fastapi.encoders import jsonable_encoder
from typing import List
@@ -29,10 +29,14 @@ from uuid import UUID
from gns3server.controller import Controller
from gns3server.controller.controller_error import ControllerError
+from gns3server.db.repositories.rbac import RbacRepository
from gns3server.controller.link import Link
from gns3server.utils.http_client import HTTPClient
from gns3server import schemas
+from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
+
import logging
log = logging.getLogger(__name__)
@@ -52,10 +56,17 @@ async def dep_link(project_id: UUID, link_id: UUID) -> Link:
return link
-@router.get("", response_model=List[schemas.Link], response_model_exclude_unset=True)
+@router.get(
+ "",
+ response_model=List[schemas.Link],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Link.Audit"))]
+)
async def get_links(project_id: UUID) -> List[schemas.Link]:
"""
Return all links for a given project.
+
+ Required privilege: Link.Audit
"""
project = await Controller.instance().get_loaded_project(str(project_id))
@@ -70,10 +81,13 @@ async def get_links(project_id: UUID) -> List[schemas.Link]:
404: {"model": schemas.ErrorMessage, "description": "Could not find project"},
409: {"model": schemas.ErrorMessage, "description": "Could not create link"},
},
+ dependencies=[Depends(has_privilege("Link.Allocate"))]
)
async def create_link(project_id: UUID, link_data: schemas.LinkCreate) -> schemas.Link:
"""
Create a new link.
+
+ Required privilege: Link.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
@@ -99,28 +113,47 @@ async def create_link(project_id: UUID, link_data: schemas.LinkCreate) -> schema
return link.asdict()
-@router.get("/{link_id}/available_filters")
+@router.get(
+ "/{link_id}/available_filters",
+ dependencies=[Depends(has_privilege("Link.Audit"))]
+)
async def get_filters(link: Link = Depends(dep_link)) -> List[dict]:
"""
Return all filters available for a given link.
+
+ Required privilege: Link.Audit
"""
return link.available_filters()
-@router.get("/{link_id}", response_model=schemas.Link, response_model_exclude_unset=True)
+@router.get(
+ "/{link_id}",
+ response_model=schemas.Link,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Link.Audit"))]
+)
async def get_link(link: Link = Depends(dep_link)) -> schemas.Link:
"""
Return a link.
+
+ Required privilege: Link.Audit
"""
return link.asdict()
-@router.put("/{link_id}", response_model=schemas.Link, response_model_exclude_unset=True)
+@router.put(
+ "/{link_id}",
+ response_model=schemas.Link,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Link.Modify"))]
+)
async def update_link(link_data: schemas.LinkUpdate, link: Link = Depends(dep_link)) -> schemas.Link:
"""
Update a link.
+
+ Required privilege: Link.Modify
"""
link_data = jsonable_encoder(link_data, exclude_unset=True)
@@ -135,30 +168,54 @@ async def update_link(link_data: schemas.LinkUpdate, link: Link = Depends(dep_li
return link.asdict()
-@router.delete("/{link_id}", status_code=status.HTTP_204_NO_CONTENT)
-async def delete_link(project_id: UUID, link: Link = Depends(dep_link)) -> None:
+@router.delete(
+ "/{link_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Link.Allocate"))]
+)
+async def delete_link(
+ project_id: UUID,
+ link: Link = Depends(dep_link),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+) -> None:
"""
Delete a link.
+
+ Required privilege: Link.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
await project.delete_link(link.id)
+ await rbac_repo.delete_all_ace_starting_with_path(f"/links/{link.id}")
-@router.post("/{link_id}/reset", response_model=schemas.Link)
+@router.post(
+ "/{link_id}/reset",
+ response_model=schemas.Link,
+ dependencies=[Depends(has_privilege("Link.Modify"))]
+)
async def reset_link(link: Link = Depends(dep_link)) -> schemas.Link:
"""
Reset a link.
+
+ Required privilege: Link.Modify
"""
await link.reset()
return link.asdict()
-@router.post("/{link_id}/capture/start", status_code=status.HTTP_201_CREATED, response_model=schemas.Link)
+@router.post(
+ "/{link_id}/capture/start",
+ status_code=status.HTTP_201_CREATED,
+ response_model=schemas.Link,
+ dependencies=[Depends(has_privilege("Link.Capture"))]
+)
async def start_capture(capture_data: dict, link: Link = Depends(dep_link)) -> schemas.Link:
"""
Start packet capture on the link.
+
+ Required privilege: Link.Capture
"""
await link.start_capture(
@@ -168,19 +225,30 @@ async def start_capture(capture_data: dict, link: Link = Depends(dep_link)) -> s
return link.asdict()
-@router.post("/{link_id}/capture/stop", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{link_id}/capture/stop",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Link.Capture"))]
+)
async def stop_capture(link: Link = Depends(dep_link)) -> None:
"""
Stop packet capture on the link.
+
+ Required privilege: Link.Capture
"""
await link.stop_capture()
-@router.get("/{link_id}/capture/stream")
+@router.get(
+ "/{link_id}/capture/stream",
+ dependencies=[Depends(has_privilege("Link.Capture"))]
+)
async def stream_pcap(request: Request, link: Link = Depends(dep_link)) -> StreamingResponse:
"""
Stream the PCAP capture file from compute.
+
+ Required privilege: Link.Capture
"""
if not link.capturing:
diff --git a/gns3server/api/routes/controller/nodes.py b/gns3server/api/routes/controller/nodes.py
index cdd94693..b096b634 100644
--- a/gns3server/api/routes/controller/nodes.py
+++ b/gns3server/api/routes/controller/nodes.py
@@ -20,6 +20,7 @@ API routes for nodes.
import aiohttp
import asyncio
+import ipaddress
from fastapi import APIRouter, Depends, WebSocket, WebSocketDisconnect, Request, Response, status
from fastapi.encoders import jsonable_encoder
@@ -33,8 +34,12 @@ from gns3server.controller.project import Project
from gns3server.utils import force_unix_path
from gns3server.utils.http_client import HTTPClient
from gns3server.controller.controller_error import ControllerForbiddenError, ControllerBadRequestError
+from gns3server.db.repositories.rbac import RbacRepository
from gns3server import schemas
+from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege, has_privilege_on_websocket
+
import logging
log = logging.getLogger(__name__)
@@ -107,10 +112,13 @@ async def dep_node(node_id: UUID, project: Project = Depends(dep_project)) -> No
404: {"model": schemas.ErrorMessage, "description": "Could not find project"},
409: {"model": schemas.ErrorMessage, "description": "Could not create node"},
},
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def create_node(node_data: schemas.NodeCreate, project: Project = Depends(dep_project)) -> schemas.Node:
"""
Create a new node.
+
+ Required privilege: Node.Allocate
"""
controller = Controller.instance()
@@ -120,65 +128,89 @@ async def create_node(node_data: schemas.NodeCreate, project: Project = Depends(
return node.asdict()
-@router.get("", response_model=List[schemas.Node], response_model_exclude_unset=True)
-async def get_nodes(project: Project = Depends(dep_project)) -> List[schemas.Node]:
+@router.get(
+ "",
+ response_model=List[schemas.Node],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Node.Audit"))]
+)
+def get_nodes(project: Project = Depends(dep_project)) -> List[schemas.Node]:
"""
Return all nodes belonging to a given project.
+
+ Required privilege: Node.Audit
"""
return [v.asdict() for v in project.nodes.values()]
-@router.post("/start", status_code=status.HTTP_204_NO_CONTENT)
+@router.post("/start", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def start_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Start all nodes belonging to a given project.
+
+ Required privilege: Node.PowerMgmt
"""
await project.start_all()
-@router.post("/stop", status_code=status.HTTP_204_NO_CONTENT)
+@router.post("/stop", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def stop_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Stop all nodes belonging to a given project.
+
+ Required privilege: Node.PowerMgmt
"""
await project.stop_all()
-@router.post("/suspend", status_code=status.HTTP_204_NO_CONTENT)
+@router.post("/suspend", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def suspend_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Suspend all nodes belonging to a given project.
+
+ Required privilege: Node.PowerMgmt
"""
await project.suspend_all()
-@router.post("/reload", status_code=status.HTTP_204_NO_CONTENT)
+@router.post("/reload", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def reload_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Reload all nodes belonging to a given project.
+
+ Required privilege: Node.PowerMgmt
"""
await project.stop_all()
await project.start_all()
-@router.get("/{node_id}", response_model=schemas.Node)
+@router.get("/{node_id}", response_model=schemas.Node, dependencies=[Depends(has_privilege("Node.Audit"))])
def get_node(node: Node = Depends(dep_node)) -> schemas.Node:
"""
Return a node from a given project.
+
+ Required privilege: Node.Audit
"""
return node.asdict()
-@router.put("/{node_id}", response_model=schemas.Node, response_model_exclude_unset=True)
+@router.put(
+ "/{node_id}",
+ response_model=schemas.Node,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Node.Modify"))]
+)
async def update_node(node_data: schemas.NodeUpdate, node: Node = Depends(dep_node)) -> schemas.Node:
"""
Update a node.
+
+ Required privilege: Node.Modify
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
@@ -196,85 +228,142 @@ async def update_node(node_data: schemas.NodeUpdate, node: Node = Depends(dep_no
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Cannot delete node"}},
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
)
-async def delete_node(node_id: UUID, project: Project = Depends(dep_project)) -> None:
+async def delete_node(
+ node_id: UUID, project: Project = Depends(dep_project),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
+) -> None:
"""
Delete a node from a project.
+
+ Required privilege: Node.Allocate
"""
await project.delete_node(str(node_id))
+ await rbac_repo.delete_all_ace_starting_with_path(f"/projects/{project.id}/nodes/{node_id}")
-@router.post("/{node_id}/duplicate", response_model=schemas.Node, status_code=status.HTTP_201_CREATED)
+@router.post(
+ "/{node_id}/duplicate",
+ response_model=schemas.Node,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
+)
async def duplicate_node(duplicate_data: schemas.NodeDuplicate, node: Node = Depends(dep_node)) -> schemas.Node:
"""
Duplicate a node.
+
+ Required privilege: Node.Allocate
"""
new_node = await node.project.duplicate_node(node, duplicate_data.x, duplicate_data.y, duplicate_data.z)
return new_node.asdict()
-@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/start",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
+)
async def start_node(start_data: dict, node: Node = Depends(dep_node)) -> None:
"""
Start a node.
+
+ Required privilege: Node.PowerMgmt
"""
await node.start(data=start_data)
-@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/stop",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
+)
async def stop_node(node: Node = Depends(dep_node)) -> None:
"""
Stop a node.
+
+ Required privilege: Node.PowerMgmt
"""
await node.stop()
-@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/suspend",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
+)
async def suspend_node(node: Node = Depends(dep_node)) -> None:
"""
Suspend a node.
+
+ Required privilege: Node.PowerMgmt
"""
await node.suspend()
-@router.post("/{node_id}/reload", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/reload",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
+)
async def reload_node(node: Node = Depends(dep_node)) -> None:
"""
Reload a node.
+
+ Required privilege: Node.PowerMgmt
"""
await node.reload()
-@router.post("/{node_id}/isolate", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/isolate",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Link.Modify"))]
+)
async def isolate_node(node: Node = Depends(dep_node)) -> None:
"""
Isolate a node (suspend all attached links).
+
+ Required privilege: Link.Modify
"""
for link in node.links:
await link.update_suspend(True)
-@router.post("/{node_id}/unisolate", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/unisolate",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Link.Modify"))]
+)
async def unisolate_node(node: Node = Depends(dep_node)) -> None:
"""
Un-isolate a node (resume all attached suspended links).
+
+ Required privilege: Link.Modify
"""
for link in node.links:
await link.update_suspend(False)
-@router.get("/{node_id}/links", response_model=List[schemas.Link], response_model_exclude_unset=True)
+@router.get(
+ "/{node_id}/links",
+ response_model=List[schemas.Link],
+ response_model_exclude_unset=True,
+ dependencies = [Depends(has_privilege("Link.Audit"))]
+)
async def get_node_links(node: Node = Depends(dep_node)) -> List[schemas.Link]:
"""
Return all the links connected to a node.
+
+ Required privilege: Link.Audit
"""
links = []
@@ -283,10 +372,12 @@ async def get_node_links(node: Node = Depends(dep_node)) -> List[schemas.Link]:
return links
-@router.get("/{node_id}/dynamips/auto_idlepc")
-async def auto_idlepc(node: Node = Depends(dep_node)) -> str:
+@router.get("/{node_id}/dynamips/auto_idlepc", dependencies=[Depends(has_privilege("Node.Audit"))])
+async def auto_idlepc(node: Node = Depends(dep_node)) -> dict:
"""
Compute an Idle-PC value for a Dynamips node
+
+ Required privilege: Node.Audit
"""
if node.node_type != "dynamips":
@@ -294,10 +385,12 @@ async def auto_idlepc(node: Node = Depends(dep_node)) -> str:
return await node.dynamips_auto_idlepc()
-@router.get("/{node_id}/dynamips/idlepc_proposals")
+@router.get("/{node_id}/dynamips/idlepc_proposals", dependencies=[Depends(has_privilege("Node.Audit"))])
async def idlepc_proposals(node: Node = Depends(dep_node)) -> List[str]:
"""
Compute a list of potential idle-pc values for a Dynamips node
+
+ Required privilege: Node.Audit
"""
if node.node_type != "dynamips":
@@ -305,7 +398,11 @@ async def idlepc_proposals(node: Node = Depends(dep_node)) -> List[str]:
return await node.dynamips_idlepc_proposals()
-@router.post("/{node_id}/qemu/disk_image/{disk_name}", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/qemu/disk_image/{disk_name}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
+)
async def create_disk_image(
disk_name: str,
disk_data: schemas.QemuDiskImageCreate,
@@ -313,14 +410,20 @@ async def create_disk_image(
) -> None:
"""
Create a Qemu disk image.
+
+ Required privilege: Node.Allocate
"""
if node.node_type != "qemu":
raise ControllerBadRequestError("Creating a disk image is only supported on a Qemu node")
- await node.post(f"/disk_image/{disk_name}", data=disk_data.dict(exclude_unset=True))
+ await node.post(f"/disk_image/{disk_name}", data=disk_data.model_dump(exclude_unset=True))
-@router.put("/{node_id}/qemu/disk_image/{disk_name}", status_code=status.HTTP_204_NO_CONTENT)
+@router.put(
+ "/{node_id}/qemu/disk_image/{disk_name}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
+)
async def update_disk_image(
disk_name: str,
disk_data: schemas.QemuDiskImageUpdate,
@@ -328,20 +431,28 @@ async def update_disk_image(
) -> None:
"""
Update a Qemu disk image.
+
+ Required privilege: Node.Allocate
"""
if node.node_type != "qemu":
raise ControllerBadRequestError("Updating a disk image is only supported on a Qemu node")
- await node.put(f"/disk_image/{disk_name}", data=disk_data.dict(exclude_unset=True))
+ await node.put(f"/disk_image/{disk_name}", data=disk_data.model_dump(exclude_unset=True))
-@router.delete("/{node_id}/qemu/disk_image/{disk_name}", status_code=status.HTTP_204_NO_CONTENT)
+@router.delete(
+ "/{node_id}/qemu/disk_image/{disk_name}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
+)
async def delete_disk_image(
disk_name: str,
node: Node = Depends(dep_node)
) -> None:
"""
Delete a Qemu disk image.
+
+ Required privilege: Node.Allocate
"""
if node.node_type != "qemu":
@@ -349,10 +460,12 @@ async def delete_disk_image(
await node.delete(f"/disk_image/{disk_name}")
-@router.get("/{node_id}/files/{file_path:path}")
+@router.get("/{node_id}/files/{file_path:path}", dependencies=[Depends(has_privilege("Node.Audit"))])
async def get_file(file_path: str, node: Node = Depends(dep_node)) -> Response:
"""
- Return a file in the node directory
+ Return a file from the node directory.
+
+ Required privilege: Node.Audit
"""
path = force_unix_path(file_path)
@@ -368,10 +481,16 @@ async def get_file(file_path: str, node: Node = Depends(dep_node)) -> Response:
return Response(res.body, media_type="application/octet-stream", status_code=res.status)
-@router.post("/{node_id}/files/{file_path:path}", status_code=status.HTTP_201_CREATED)
+@router.post(
+ "/{node_id}/files/{file_path:path}",
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Node.Modify"))]
+)
async def post_file(file_path: str, request: Request, node: Node = Depends(dep_node)):
"""
Write a file in the node directory.
+
+ Required privilege: Node.Modify
"""
path = force_unix_path(file_path)
@@ -388,10 +507,12 @@ async def post_file(file_path: str, request: Request, node: Node = Depends(dep_n
# FIXME: response with correct status code (from compute)
-@router.websocket("/{node_id}/console/ws")
+@router.websocket("/{node_id}/console/ws", dependencies=[Depends(has_privilege_on_websocket("Node.Console"))])
async def ws_console(websocket: WebSocket, node: Node = Depends(dep_node)) -> None:
"""
WebSocket console.
+
+ Required privilege: Node.Console
"""
compute = node.compute
@@ -399,8 +520,18 @@ async def ws_console(websocket: WebSocket, node: Node = Depends(dep_node)) -> No
log.info(
f"New client {websocket.client.host}:{websocket.client.port} has connected to controller console WebSocket"
)
+
+ compute_host = compute.host
+ try:
+ # handle IPv6 address
+ ip = ipaddress.ip_address(compute_host)
+ if isinstance(ip, ipaddress.IPv6Address):
+ compute_host = '[' + compute_host + ']'
+ except ValueError:
+ pass
+
ws_console_compute_url = (
- f"ws://{compute.host}:{compute.port}/v3/compute/projects/"
+ f"ws://{compute_host}:{compute.port}/v3/compute/projects/"
f"{node.project.id}/{node.node_type}/nodes/{node.id}/console/ws"
)
@@ -436,16 +567,31 @@ async def ws_console(websocket: WebSocket, node: Node = Depends(dep_node)) -> No
log.error(f"Client error received when forwarding to compute console WebSocket: {e}")
-@router.post("/console/reset", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/console/reset",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.Console"))]
+)
async def reset_console_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Reset console for all nodes belonging to the project.
+
+ Required privilege: Node.Console
"""
await project.reset_console_all()
-@router.post("/{node_id}/console/reset", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{node_id}/console/reset",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Node.Console"))]
+)
async def console_reset(node: Node = Depends(dep_node)) -> None:
+ """
+ Reset a console for a given node.
+
+ Required privilege: Node.Console
+ """
await node.post("/console/reset")
diff --git a/gns3server/api/routes/controller/notifications.py b/gns3server/api/routes/controller/notifications.py
deleted file mode 100644
index 52d29e74..00000000
--- a/gns3server/api/routes/controller/notifications.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# Copyright (C) 2020 GNS3 Technologies Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-"""
-API routes for controller notifications.
-"""
-
-from fastapi import APIRouter, Request, Depends, WebSocket, WebSocketDisconnect
-from fastapi.responses import StreamingResponse
-from websockets.exceptions import ConnectionClosed, WebSocketException
-
-from gns3server.controller import Controller
-from gns3server import schemas
-
-from .dependencies.authentication import get_current_active_user, get_current_active_user_from_websocket
-
-import logging
-
-log = logging.getLogger(__name__)
-
-router = APIRouter()
-
-
-@router.get("", dependencies=[Depends(get_current_active_user)])
-async def controller_http_notifications(request: Request) -> StreamingResponse:
- """
- Receive controller notifications about the controller from HTTP stream.
- """
-
- from gns3server.api.server import app
- log.info(f"New client {request.client.host}:{request.client.port} has connected to controller HTTP "
- f"notification stream")
-
- async def event_stream():
- try:
- with Controller.instance().notification.controller_queue() as queue:
- while not app.state.exiting:
- msg = await queue.get_json(5)
- yield f"{msg}\n".encode("utf-8")
- finally:
- log.info(f"Client {request.client.host}:{request.client.port} has disconnected from controller HTTP "
- f"notification stream")
- return StreamingResponse(event_stream(), media_type="application/json")
-
-
-@router.websocket("/ws")
-async def controller_ws_notifications(
- websocket: WebSocket,
- current_user: schemas.User = Depends(get_current_active_user_from_websocket)
-) -> None:
- """
- Receive project notifications about the controller from WebSocket.
- """
-
- if current_user is None:
- return
-
- log.info(f"New client {websocket.client.host}:{websocket.client.port} has connected to controller WebSocket")
- try:
- with Controller.instance().notification.controller_queue() as queue:
- while True:
- notification = await queue.get_json(5)
- await websocket.send_text(notification)
- except (ConnectionClosed, WebSocketDisconnect):
- log.info(f"Client {websocket.client.host}:{websocket.client.port} has disconnected from controller WebSocket")
- except WebSocketException as e:
- log.warning(f"Error while sending to controller event to WebSocket client: {e}")
- finally:
- try:
- await websocket.close()
- except OSError:
- pass # ignore OSError: [Errno 107] Transport endpoint is not connected
diff --git a/gns3server/api/routes/controller/permissions.py b/gns3server/api/routes/controller/permissions.py
deleted file mode 100644
index d5b31e1b..00000000
--- a/gns3server/api/routes/controller/permissions.py
+++ /dev/null
@@ -1,161 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2021 GNS3 Technologies Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-"""
-API routes for permissions.
-"""
-
-import re
-
-from fastapi import APIRouter, Depends, Response, Request, status
-from fastapi.routing import APIRoute
-from uuid import UUID
-from typing import List
-
-
-from gns3server import schemas
-from gns3server.controller.controller_error import (
- ControllerBadRequestError,
- ControllerNotFoundError,
- ControllerForbiddenError,
-)
-
-from gns3server.db.repositories.rbac import RbacRepository
-from .dependencies.database import get_repository
-from .dependencies.authentication import get_current_active_user
-
-import logging
-
-log = logging.getLogger(__name__)
-
-router = APIRouter()
-
-
-@router.get("", response_model=List[schemas.Permission])
-async def get_permissions(
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> List[schemas.Permission]:
- """
- Get all permissions.
- """
-
- return await rbac_repo.get_permissions()
-
-
-@router.post("", response_model=schemas.Permission, status_code=status.HTTP_201_CREATED)
-async def create_permission(
- request: Request,
- permission_create: schemas.PermissionCreate,
- current_user: schemas.User = Depends(get_current_active_user),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> schemas.Permission:
- """
- Create a new permission.
- """
-
- # TODO: should we prevent having multiple permissions with same methods/path?
- #if await rbac_repo.check_permission_exists(permission_create):
- # raise ControllerBadRequestError(f"Permission '{permission_create.methods} {permission_create.path} "
- # f"{permission_create.action}' already exists")
-
- for route in request.app.routes:
- if isinstance(route, APIRoute):
-
- # remove the prefix (e.g. "/v3") from the route path
- route_path = re.sub(r"^/v[0-9]", "", route.path)
- # replace route path ID parameters by an UUID regex
- route_path = re.sub(r"{\w+_id}", "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", route_path)
- # replace remaining route path parameters by an word matching regex
- route_path = re.sub(r"/{[\w:]+}", r"/\\w+", route_path)
-
- # the permission can match multiple routes
- if permission_create.path.endswith("/*"):
- route_path += r"/.*"
-
- if re.fullmatch(route_path, permission_create.path):
- for method in permission_create.methods:
- if method in list(route.methods):
- # check user has the right to add the permission (i.e has already to right on the path)
- if not await rbac_repo.check_user_is_authorized(current_user.user_id, method, permission_create.path):
- raise ControllerForbiddenError(f"User '{current_user.username}' doesn't have the rights to "
- f"add a permission on {method} {permission_create.path} or "
- f"the endpoint doesn't exist")
- return await rbac_repo.create_permission(permission_create)
-
- raise ControllerBadRequestError(f"Permission '{permission_create.methods} {permission_create.path}' "
- f"doesn't match any existing endpoint")
-
-
-@router.get("/{permission_id}", response_model=schemas.Permission)
-async def get_permission(
- permission_id: UUID,
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
-) -> schemas.Permission:
- """
- Get a permission.
- """
-
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
- return permission
-
-
-@router.put("/{permission_id}", response_model=schemas.Permission)
-async def update_permission(
- permission_id: UUID,
- permission_update: schemas.PermissionUpdate,
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> schemas.Permission:
- """
- Update a permission.
- """
-
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
-
- return await rbac_repo.update_permission(permission_id, permission_update)
-
-
-@router.delete("/{permission_id}", status_code=status.HTTP_204_NO_CONTENT)
-async def delete_permission(
- permission_id: UUID,
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
-) -> None:
- """
- Delete a permission.
- """
-
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
-
- success = await rbac_repo.delete_permission(permission_id)
- if not success:
- raise ControllerNotFoundError(f"Permission '{permission_id}' could not be deleted")
-
-
-@router.post("/prune", status_code=status.HTTP_204_NO_CONTENT)
-async def prune_permissions(
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> None:
- """
- Prune orphaned permissions.
- """
-
- await rbac_repo.prune_permissions()
diff --git a/gns3server/api/routes/controller/projects.py b/gns3server/api/routes/controller/projects.py
index 302173d0..d228fcf7 100644
--- a/gns3server/api/routes/controller/projects.py
+++ b/gns3server/api/routes/controller/projects.py
@@ -45,11 +45,11 @@ from gns3server.controller.import_project import import_project as import_contro
from gns3server.controller.export_project import export_project as export_controller_project
from gns3server.utils.asyncio import aiozipstream
from gns3server.utils.path import is_safe_path
-from gns3server.db.repositories.rbac import RbacRepository
from gns3server.db.repositories.templates import TemplatesRepository
+from gns3server.db.repositories.rbac import RbacRepository
from gns3server.services.templates import TemplatesService
-from .dependencies.authentication import get_current_active_user, get_current_active_user_from_websocket
+from .dependencies.rbac import has_privilege, has_privilege_on_websocket
from .dependencies.database import get_repository
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project"}}
@@ -66,29 +66,21 @@ def dep_project(project_id: UUID) -> Project:
return project
-CHUNK_SIZE = 1024 * 8 # 8KB
-
-
-@router.get("", response_model=List[schemas.Project], response_model_exclude_unset=True)
-async def get_projects(
- current_user: schemas.User = Depends(get_current_active_user),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> List[schemas.Project]:
+@router.get(
+ "",
+ response_model=List[schemas.Project],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Project.Audit"))]
+)
+async def get_projects() -> List[schemas.Project]:
"""
Return all projects.
+
+ Required privilege: Project.Audit
"""
controller = Controller.instance()
- if current_user.is_superadmin:
- return [p.asdict() for p in controller.projects.values()]
- else:
- user_projects = []
- for project in controller.projects.values():
- authorized = await rbac_repo.check_user_is_authorized(
- current_user.user_id, "GET", f"/projects/{project.id}")
- if authorized:
- user_projects.append(project.asdict())
- return user_projects
+ return [p.asdict() for p in controller.projects.values()]
@router.post(
@@ -97,63 +89,80 @@ async def get_projects(
response_model=schemas.Project,
response_model_exclude_unset=True,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create project"}},
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def create_project(
project_data: schemas.ProjectCreate,
- current_user: schemas.User = Depends(get_current_active_user),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.Project:
"""
Create a new project.
+
+ Required privilege: Project.Allocate
"""
controller = Controller.instance()
project = await controller.add_project(**jsonable_encoder(project_data, exclude_unset=True))
- await rbac_repo.add_permission_to_user_with_path(current_user.user_id, f"/projects/{project.id}/*")
return project.asdict()
-@router.get("/{project_id}", response_model=schemas.Project)
+@router.get("/{project_id}", response_model=schemas.Project, dependencies=[Depends(has_privilege("Project.Audit"))])
def get_project(project: Project = Depends(dep_project)) -> schemas.Project:
"""
Return a project.
+
+ Required privilege: Project.Audit
"""
return project.asdict()
-@router.put("/{project_id}", response_model=schemas.Project, response_model_exclude_unset=True)
+@router.put(
+ "/{project_id}",
+ response_model=schemas.Project,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Project.Modify"))]
+)
async def update_project(
project_data: schemas.ProjectUpdate,
project: Project = Depends(dep_project)
) -> schemas.Project:
"""
Update a project.
+
+ Required privilege: Project.Modify
"""
await project.update(**jsonable_encoder(project_data, exclude_unset=True))
return project.asdict()
-@router.delete("/{project_id}", status_code=status.HTTP_204_NO_CONTENT)
+@router.delete(
+ "/{project_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
+)
async def delete_project(
project: Project = Depends(dep_project),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a project.
+
+ Required privilege: Project.Allocate
"""
controller = Controller.instance()
await project.delete()
controller.remove_project(project)
- await rbac_repo.delete_all_permissions_with_path(f"/projects/{project.id}")
+ await rbac_repo.delete_all_ace_starting_with_path(f"/projects/{project.id}")
-@router.get("/{project_id}/stats")
+@router.get("/{project_id}/stats", dependencies=[Depends(has_privilege("Project.Audit"))])
def get_project_stats(project: Project = Depends(dep_project)) -> dict:
"""
Return a project statistics.
+
+ Required privilege: Project.Audit
"""
return project.stats()
@@ -163,10 +172,13 @@ def get_project_stats(project: Project = Depends(dep_project)) -> dict:
"/{project_id}/close",
status_code=status.HTTP_204_NO_CONTENT,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not close project"}},
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def close_project(project: Project = Depends(dep_project)) -> None:
"""
Close a project.
+
+ Required privilege: Project.Allocate
"""
await project.close()
@@ -177,10 +189,13 @@ async def close_project(project: Project = Depends(dep_project)) -> None:
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not open project"}},
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def open_project(project: Project = Depends(dep_project)) -> schemas.Project:
"""
Open a project.
+
+ Required privilege: Project.Allocate
"""
await project.open()
@@ -192,10 +207,13 @@ async def open_project(project: Project = Depends(dep_project)) -> schemas.Proje
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not load project"}},
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def load_project(path: str = Body(..., embed=True)) -> schemas.Project:
"""
Load a project (local server only).
+
+ Required privilege: Project.Allocate
"""
controller = Controller.instance()
@@ -204,10 +222,12 @@ async def load_project(path: str = Body(..., embed=True)) -> schemas.Project:
return project.asdict()
-@router.get("/{project_id}/notifications")
+@router.get("/{project_id}/notifications", dependencies=[Depends(has_privilege("Project.Audit"))])
async def project_http_notifications(project_id: UUID) -> StreamingResponse:
"""
Receive project notifications about the controller from HTTP stream.
+
+ Required privilege: Project.Audit
"""
from gns3server.api.server import app
@@ -240,10 +260,12 @@ async def project_http_notifications(project_id: UUID) -> StreamingResponse:
async def project_ws_notifications(
project_id: UUID,
websocket: WebSocket,
- current_user: schemas.User = Depends(get_current_active_user_from_websocket)
+ current_user: schemas.User = Depends(has_privilege_on_websocket("Project.Audit"))
) -> None:
"""
Receive project notifications about the controller from WebSocket.
+
+ Required privilege: Project.Audit
"""
if current_user is None:
@@ -276,7 +298,7 @@ async def project_ws_notifications(
await project.close()
-@router.get("/{project_id}/export")
+@router.get("/{project_id}/export", dependencies=[Depends(has_privilege("Project.Audit"))])
async def export_project(
project: Project = Depends(dep_project),
include_snapshots: bool = False,
@@ -287,6 +309,8 @@ async def export_project(
) -> StreamingResponse:
"""
Export a project as a portable archive.
+
+ Required privilege: Project.Audit
"""
compression_query = compression.lower()
@@ -333,7 +357,7 @@ async def export_project(
log.info(f"Project '{project.name}' exported in {time.time() - begin:.4f} seconds")
- # Will be raise if you have no space left or permission issue on your temporary directory
+ # Will be raised if you have no space left or permission issue on your temporary directory
# RuntimeError: something was wrong during the zip process
except (ValueError, OSError, RuntimeError) as e:
raise ConnectionError(f"Cannot export project: {e}")
@@ -342,7 +366,12 @@ async def export_project(
return StreamingResponse(streamer(), media_type="application/gns3project", headers=headers)
-@router.post("/{project_id}/import", status_code=status.HTTP_201_CREATED, response_model=schemas.Project)
+@router.post(
+ "/{project_id}/import",
+ status_code=status.HTTP_201_CREATED,
+ response_model=schemas.Project,
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
+)
async def import_project(
project_id: UUID,
request: Request,
@@ -350,6 +379,8 @@ async def import_project(
) -> schemas.Project:
"""
Import a project from a portable archive.
+
+ Required privilege: Project.Allocate
"""
controller = Controller.instance()
@@ -377,56 +408,72 @@ async def import_project(
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not duplicate project"}},
+ dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def duplicate_project(
project_data: schemas.ProjectDuplicate,
- project: Project = Depends(dep_project),
- current_user: schemas.User = Depends(get_current_active_user),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+ project: Project = Depends(dep_project)
) -> schemas.Project:
"""
Duplicate a project.
+
+ Required privilege: Project.Allocate
"""
reset_mac_addresses = project_data.reset_mac_addresses
new_project = await project.duplicate(
name=project_data.name, reset_mac_addresses=reset_mac_addresses
)
- await rbac_repo.add_permission_to_user_with_path(current_user.user_id, f"/projects/{new_project.id}/*")
return new_project.asdict()
-@router.get("/{project_id}/locked")
+@router.get("/{project_id}/locked", dependencies=[Depends(has_privilege("Project.Audit"))])
async def locked_project(project: Project = Depends(dep_project)) -> bool:
"""
- Returns whether a project is locked or not
+ Returns whether a project is locked or not.
+
+ Required privilege: Project.Audit
"""
return project.locked
-@router.post("/{project_id}/lock", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{project_id}/lock",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Project.Modify"))]
+)
async def lock_project(project: Project = Depends(dep_project)) -> None:
"""
Lock all drawings and nodes in a given project.
+
+ Required privilege: Project.Audit
"""
project.lock()
-@router.post("/{project_id}/unlock", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{project_id}/unlock",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Project.Modify"))]
+)
async def unlock_project(project: Project = Depends(dep_project)) -> None:
"""
Unlock all drawings and nodes in a given project.
+
+ Required privilege: Project.Modify
"""
project.unlock()
-@router.get("/{project_id}/files/{file_path:path}")
+@router.get("/{project_id}/files/{file_path:path}", dependencies=[Depends(has_privilege("Project.Audit"))])
async def get_file(file_path: str, project: Project = Depends(dep_project)) -> FileResponse:
"""
Return a file from a project.
+
+ Required privilege: Project.Audit
"""
file_path = urllib.parse.unquote(file_path)
@@ -443,10 +490,16 @@ async def get_file(file_path: str, project: Project = Depends(dep_project)) -> F
return FileResponse(path, media_type="application/octet-stream")
-@router.post("/{project_id}/files/{file_path:path}", status_code=status.HTTP_204_NO_CONTENT)
+@router.post(
+ "/{project_id}/files/{file_path:path}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Project.Modify"))]
+)
async def write_file(file_path: str, request: Request, project: Project = Depends(dep_project)) -> None:
"""
Write a file to a project.
+
+ Required privilege: Project.Modify
"""
file_path = urllib.parse.unquote(file_path)
@@ -475,6 +528,7 @@ async def write_file(file_path: str, request: Request, project: Project = Depend
response_model=schemas.Node,
status_code=status.HTTP_201_CREATED,
responses={404: {"model": schemas.ErrorMessage, "description": "Could not find project or template"}},
+ dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def create_node_from_template(
project_id: UUID,
@@ -484,6 +538,8 @@ async def create_node_from_template(
) -> schemas.Node:
"""
Create a new node from a template.
+
+ Required privilege: Node.Allocate
"""
template = await TemplatesService(templates_repo).get_template(template_id)
diff --git a/gns3server/api/routes/controller/roles.py b/gns3server/api/routes/controller/roles.py
index 2c9ee0d6..f1a5434f 100644
--- a/gns3server/api/routes/controller/roles.py
+++ b/gns3server/api/routes/controller/roles.py
@@ -19,7 +19,7 @@
API routes for roles.
"""
-from fastapi import APIRouter, Depends, Response, status
+from fastapi import APIRouter, Depends, status
from uuid import UUID
from typing import List
@@ -33,6 +33,7 @@ from gns3server.controller.controller_error import (
from gns3server.db.repositories.rbac import RbacRepository
from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
import logging
@@ -41,24 +42,37 @@ log = logging.getLogger(__name__)
router = APIRouter()
-@router.get("", response_model=List[schemas.Role])
+@router.get(
+ "",
+ response_model=List[schemas.Role],
+ dependencies=[Depends(has_privilege("Role.Audit"))]
+)
async def get_roles(
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> List[schemas.Role]:
"""
Get all roles.
+
+ Required privilege: Role.Audit
"""
return await rbac_repo.get_roles()
-@router.post("", response_model=schemas.Role, status_code=status.HTTP_201_CREATED)
+@router.post(
+ "",
+ response_model=schemas.Role,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Role.Allocate"))]
+)
async def create_role(
role_create: schemas.RoleCreate,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.Role:
"""
Create a new role.
+
+ Required privilege: Role.Allocate
"""
if await rbac_repo.get_role_by_name(role_create.name):
@@ -67,13 +81,19 @@ async def create_role(
return await rbac_repo.create_role(role_create)
-@router.get("/{role_id}", response_model=schemas.Role)
+@router.get(
+ "/{role_id}",
+ response_model=schemas.Role,
+ dependencies=[Depends(has_privilege("Role.Audit"))]
+)
async def get_role(
role_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> schemas.Role:
"""
Get a role.
+
+ Required privilege: Role.Audit
"""
role = await rbac_repo.get_role(role_id)
@@ -82,7 +102,11 @@ async def get_role(
return role
-@router.put("/{role_id}", response_model=schemas.Role)
+@router.put(
+ "/{role_id}",
+ response_model=schemas.Role,
+ dependencies=[Depends(has_privilege("Role.Modify"))]
+)
async def update_role(
role_id: UUID,
role_update: schemas.RoleUpdate,
@@ -90,6 +114,8 @@ async def update_role(
) -> schemas.Role:
"""
Update a role.
+
+ Required privilege: Role.Modify
"""
role = await rbac_repo.get_role(role_id)
@@ -102,13 +128,19 @@ async def update_role(
return await rbac_repo.update_role(role_id, role_update)
-@router.delete("/{role_id}", status_code=status.HTTP_204_NO_CONTENT)
+@router.delete(
+ "/{role_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Role.Allocate"))]
+)
async def delete_role(
role_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a role.
+
+ Required privilege: Role.Allocate
"""
role = await rbac_repo.get_role(role_id)
@@ -121,59 +153,72 @@ async def delete_role(
success = await rbac_repo.delete_role(role_id)
if not success:
raise ControllerError(f"Role '{role_id}' could not be deleted")
+ await rbac_repo.delete_all_ace_starting_with_path(f"/roles/{role_id}")
-@router.get("/{role_id}/permissions", response_model=List[schemas.Permission])
-async def get_role_permissions(
+@router.get(
+ "/{role_id}/privileges",
+ response_model=List[schemas.Privilege],
+ dependencies=[Depends(has_privilege("Role.Audit"))]
+)
+async def get_role_privileges(
role_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> List[schemas.Permission]:
+) -> List[schemas.Privilege]:
"""
- Get all role permissions.
+ Get all role privileges.
+
+ Required privilege: Role.Audit
"""
- return await rbac_repo.get_role_permissions(role_id)
+ return await rbac_repo.get_role_privileges(role_id)
@router.put(
- "/{role_id}/permissions/{permission_id}",
- status_code=status.HTTP_204_NO_CONTENT
+ "/{role_id}/privileges/{privilege_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Role.Modify"))]
)
-async def add_permission_to_role(
+async def add_privilege_to_role(
role_id: UUID,
- permission_id: UUID,
+ privilege_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
- Add a permission to a role.
+ Add a privilege to a role.
+
+ Required privilege: Role.Modify
"""
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
+ privilege = await rbac_repo.get_privilege(privilege_id)
+ if not privilege:
+ raise ControllerNotFoundError(f"Privilege '{privilege_id}' not found")
- role = await rbac_repo.add_permission_to_role(role_id, permission)
+ role = await rbac_repo.add_privilege_to_role(role_id, privilege)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")
@router.delete(
- "/{role_id}/permissions/{permission_id}",
- status_code=status.HTTP_204_NO_CONTENT
+ "/{role_id}/privileges/{privilege_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Role.Modify"))]
)
-async def remove_permission_from_role(
+async def remove_privilege_from_role(
role_id: UUID,
- permission_id: UUID,
+ privilege_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
- Remove member from an user group.
+ Remove privilege from a role.
+
+ Required privilege: Role.Modify
"""
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
+ privilege = await rbac_repo.get_privilege(privilege_id)
+ if not privilege:
+ raise ControllerNotFoundError(f"Privilege '{privilege_id}' not found")
- role = await rbac_repo.remove_permission_from_role(role_id, permission)
+ role = await rbac_repo.remove_privilege_from_role(role_id, privilege)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")
diff --git a/gns3server/api/routes/controller/snapshots.py b/gns3server/api/routes/controller/snapshots.py
index c372a8e8..37d9f777 100644
--- a/gns3server/api/routes/controller/snapshots.py
+++ b/gns3server/api/routes/controller/snapshots.py
@@ -23,14 +23,18 @@ import logging
log = logging.getLogger()
-from fastapi import APIRouter, Depends, Response, status
+from fastapi import APIRouter, Depends, status
from typing import List
from uuid import UUID
from gns3server.controller.project import Project
+from gns3server.db.repositories.rbac import RbacRepository
from gns3server import schemas
from gns3server.controller import Controller
+from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
+
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or snapshot"}}
router = APIRouter(responses=responses)
@@ -45,42 +49,74 @@ def dep_project(project_id: UUID) -> Project:
return project
-@router.post("", status_code=status.HTTP_201_CREATED, response_model=schemas.Snapshot)
+@router.post(
+ "",
+ status_code=status.HTTP_201_CREATED,
+ response_model=schemas.Snapshot,
+ dependencies=[Depends(has_privilege("Snapshot.Allocate"))]
+)
async def create_snapshot(
snapshot_data: schemas.SnapshotCreate,
project: Project = Depends(dep_project)
) -> schemas.Snapshot:
"""
Create a new snapshot of a project.
+
+ Required privilege: Snapshot.Allocate
"""
snapshot = await project.snapshot(snapshot_data.name)
return snapshot.asdict()
-@router.get("", response_model=List[schemas.Snapshot], response_model_exclude_unset=True)
+@router.get(
+ "",
+ response_model=List[schemas.Snapshot],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Snapshot.Audit"))]
+)
def get_snapshots(project: Project = Depends(dep_project)) -> List[schemas.Snapshot]:
"""
Return all snapshots belonging to a given project.
+
+ Required privilege: Snapshot.Audit
"""
snapshots = [s for s in project.snapshots.values()]
return [s.asdict() for s in sorted(snapshots, key=lambda s: (s.created_at, s.name))]
-@router.delete("/{snapshot_id}", status_code=status.HTTP_204_NO_CONTENT)
-async def delete_snapshot(snapshot_id: UUID, project: Project = Depends(dep_project)) -> None:
+@router.delete(
+ "/{snapshot_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Snapshot.Allocate"))]
+)
+async def delete_snapshot(
+ snapshot_id: UUID,
+ project: Project = Depends(dep_project),
+ rbac_repo=Depends(get_repository(RbacRepository))
+) -> None:
"""
Delete a snapshot.
+
+ Required privilege: Snapshot.Allocate
"""
await project.delete_snapshot(str(snapshot_id))
+ await rbac_repo.delete_all_ace_starting_with_path(f"/projects/{project.id}/snapshots/{snapshot_id}")
-@router.post("/{snapshot_id}/restore", status_code=status.HTTP_201_CREATED, response_model=schemas.Project)
+@router.post(
+ "/{snapshot_id}/restore",
+ status_code=status.HTTP_201_CREATED,
+ response_model=schemas.Project,
+ dependencies=[Depends(has_privilege("Snapshot.Restore"))]
+)
async def restore_snapshot(snapshot_id: UUID, project: Project = Depends(dep_project)) -> schemas.Project:
"""
Restore a snapshot.
+
+ Required privilege: Snapshot.Restore
"""
snapshot = project.get_snapshot(str(snapshot_id))
diff --git a/gns3server/api/routes/controller/symbols.py b/gns3server/api/routes/controller/symbols.py
index c992570b..6d73c623 100644
--- a/gns3server/api/routes/controller/symbols.py
+++ b/gns3server/api/routes/controller/symbols.py
@@ -29,7 +29,7 @@ from gns3server.controller import Controller
from gns3server import schemas
from gns3server.controller.controller_error import ControllerError, ControllerNotFoundError
-from .dependencies.authentication import get_current_active_user
+from .dependencies.rbac import has_privilege
import logging
@@ -39,19 +39,28 @@ log = logging.getLogger(__name__)
router = APIRouter()
-@router.get("")
-def get_symbols() -> List[str]:
+@router.get("", dependencies=[Depends(has_privilege("Symbol.Audit"))])
+def get_symbols() -> List[dict]:
+ """
+ Return all symbols.
+
+ Required privilege: Symbol.Audit
+ """
controller = Controller.instance()
return controller.symbols.list()
@router.get(
- "/{symbol_id:path}/raw", responses={404: {"model": schemas.ErrorMessage, "description": "Could not find symbol"}}
+ "/{symbol_id:path}/raw",
+ responses={404: {"model": schemas.ErrorMessage, "description": "Could not find symbol"}},
+ dependencies=[Depends(has_privilege("Symbol.Audit"))]
)
async def get_symbol(symbol_id: str) -> FileResponse:
"""
Download a symbol file.
+
+ Required privilege: Symbol.Audit
"""
controller = Controller.instance()
@@ -65,10 +74,13 @@ async def get_symbol(symbol_id: str) -> FileResponse:
@router.get(
"/{symbol_id:path}/dimensions",
responses={404: {"model": schemas.ErrorMessage, "description": "Could not find symbol"}},
+ dependencies=[Depends(has_privilege("Symbol.Audit"))]
)
async def get_symbol_dimensions(symbol_id: str) -> dict:
"""
Get a symbol dimensions.
+
+ Required privilege: Symbol.Audit
"""
controller = Controller.instance()
@@ -80,10 +92,12 @@ async def get_symbol_dimensions(symbol_id: str) -> dict:
raise ControllerNotFoundError(f"Could not get symbol file: {e}")
-@router.get("/default_symbols")
+@router.get("/default_symbols", dependencies=[Depends(has_privilege("Symbol.Audit"))])
def get_default_symbols() -> dict:
"""
Return all default symbols.
+
+ Required privilege: Symbol.Audit
"""
controller = Controller.instance()
@@ -92,12 +106,14 @@ def get_default_symbols() -> dict:
@router.post(
"/{symbol_id:path}/raw",
- dependencies=[Depends(get_current_active_user)],
- status_code=status.HTTP_204_NO_CONTENT
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Symbol.Allocate"))]
)
async def upload_symbol(symbol_id: str, request: Request) -> None:
"""
Upload a symbol file.
+
+ Required privilege: Symbol.Allocate
"""
controller = Controller.instance()
@@ -111,4 +127,3 @@ async def upload_symbol(symbol_id: str, request: Request) -> None:
# Reset the symbol list
controller.symbols.list()
-
diff --git a/gns3server/api/routes/controller/templates.py b/gns3server/api/routes/controller/templates.py
index 3dfe2ceb..9d67a74d 100644
--- a/gns3server/api/routes/controller/templates.py
+++ b/gns3server/api/routes/controller/templates.py
@@ -36,6 +36,7 @@ from gns3server.db.repositories.rbac import RbacRepository
from gns3server.db.repositories.images import ImagesRepository
from .dependencies.authentication import get_current_active_user
+from .dependencies.rbac import has_privilege
from .dependencies.database import get_repository
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find template"}}
@@ -43,24 +44,32 @@ responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find
router = APIRouter(responses=responses)
-@router.post("", response_model=schemas.Template, status_code=status.HTTP_201_CREATED)
+@router.post(
+ "",
+ response_model=schemas.Template,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Template.Allocate"))]
+)
async def create_template(
template_create: schemas.TemplateCreate,
- templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
- current_user: schemas.User = Depends(get_current_active_user),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+ templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository))
) -> schemas.Template:
"""
Create a new template.
+
+ Required privilege: Template.Allocate
"""
template = await TemplatesService(templates_repo).create_template(template_create)
- template_id = template.get("template_id")
- await rbac_repo.add_permission_to_user_with_path(current_user.user_id, f"/templates/{template_id}/*")
return template
-@router.get("/{template_id}", response_model=schemas.Template, response_model_exclude_unset=True)
+@router.get(
+ "/{template_id}",
+ response_model=schemas.Template,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Template.Audit"))]
+)
async def get_template(
template_id: UUID,
request: Request,
@@ -69,6 +78,8 @@ async def get_template(
) -> schemas.Template:
"""
Return a template.
+
+ Required privilege: Template.Audit
"""
request_etag = request.headers.get("If-None-Match", "")
@@ -82,7 +93,12 @@ async def get_template(
return template
-@router.put("/{template_id}", response_model=schemas.Template, response_model_exclude_unset=True)
+@router.put(
+ "/{template_id}",
+ response_model=schemas.Template,
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Template.Modify"))]
+)
async def update_template(
template_id: UUID,
template_update: schemas.TemplateUpdate,
@@ -90,12 +106,18 @@ async def update_template(
) -> schemas.Template:
"""
Update a template.
+
+ Required privilege: Template.Modify
"""
return await TemplatesService(templates_repo).update_template(template_id, template_update)
-@router.delete("/{template_id}", status_code=status.HTTP_204_NO_CONTENT)
+@router.delete(
+ "/{template_id}",
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("Template.Allocate"))]
+)
async def delete_template(
template_id: UUID,
prune_images: Optional[bool] = False,
@@ -105,15 +127,22 @@ async def delete_template(
) -> None:
"""
Delete a template.
+
+ Required privilege: Template.Allocate
"""
await TemplatesService(templates_repo).delete_template(template_id)
- await rbac_repo.delete_all_permissions_with_path(f"/templates/{template_id}")
+ await rbac_repo.delete_all_ace_starting_with_path(f"/templates/{template_id}")
if prune_images:
await images_repo.prune_images()
-@router.get("", response_model=List[schemas.Template], response_model_exclude_unset=True)
+@router.get(
+ "",
+ response_model=List[schemas.Template],
+ response_model_exclude_unset=True,
+ dependencies=[Depends(has_privilege("Template.Audit"))]
+)
async def get_templates(
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
current_user: schemas.User = Depends(get_current_active_user),
@@ -121,6 +150,8 @@ async def get_templates(
) -> List[schemas.Template]:
"""
Return all templates.
+
+ Required privilege: Template.Audit
"""
templates = await TemplatesService(templates_repo).get_templates()
@@ -129,27 +160,31 @@ async def get_templates(
else:
user_templates = []
for template in templates:
- if template.get("builtin") is True:
- user_templates.append(template)
- continue
- template_id = template.get("template_id")
- authorized = await rbac_repo.check_user_is_authorized(
- current_user.user_id, "GET", f"/templates/{template_id}")
- if authorized:
- user_templates.append(template)
+ # if template.get("builtin") is True:
+ # user_templates.append(template)
+ # continue
+ # template_id = template.get("template_id")
+ # authorized = await rbac_repo.check_user_is_authorized(
+ # current_user.user_id, "GET", f"/templates/{template_id}")
+ # if authorized:
+ user_templates.append(template)
return user_templates
-@router.post("/{template_id}/duplicate", response_model=schemas.Template, status_code=status.HTTP_201_CREATED)
+@router.post(
+ "/{template_id}/duplicate",
+ response_model=schemas.Template,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("Template.Allocate"))]
+)
async def duplicate_template(
- template_id: UUID, templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
- current_user: schemas.User = Depends(get_current_active_user),
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
+ template_id: UUID, templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository))
) -> schemas.Template:
"""
Duplicate a template.
+
+ Required privilege: Template.Allocate
"""
template = await TemplatesService(templates_repo).duplicate_template(template_id)
- await rbac_repo.add_permission_to_user_with_path(current_user.user_id, f"/templates/{template_id}/*")
return template
diff --git a/gns3server/api/routes/controller/users.py b/gns3server/api/routes/controller/users.py
index 577e1167..9901dd5c 100644
--- a/gns3server/api/routes/controller/users.py
+++ b/gns3server/api/routes/controller/users.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2020 GNS3 Technologies Inc.
+# Copyright (C) 2023 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,6 +38,7 @@ from gns3server.services import auth_service
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
+from .dependencies.rbac import has_privilege
import logging
@@ -115,12 +116,18 @@ async def update_logged_in_user(
return await users_repo.update_user(current_user.user_id, user_update)
-@router.get("", response_model=List[schemas.User], dependencies=[Depends(get_current_active_user)])
+@router.get(
+ "",
+ response_model=List[schemas.User],
+ dependencies=[Depends(has_privilege("User.Audit"))]
+)
async def get_users(
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.User]:
"""
Get all users.
+
+ Required privilege: User.Audit
"""
return await users_repo.get_users()
@@ -129,8 +136,8 @@ async def get_users(
@router.post(
"",
response_model=schemas.User,
- dependencies=[Depends(get_current_active_user)],
- status_code=status.HTTP_201_CREATED
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(has_privilege("User.Allocate"))]
)
async def create_user(
user_create: schemas.UserCreate,
@@ -138,6 +145,8 @@ async def create_user(
) -> schemas.User:
"""
Create a new user.
+
+ Required privilege: User.Allocate
"""
if await users_repo.get_user_by_username(user_create.username):
@@ -149,13 +158,19 @@ async def create_user(
return await users_repo.create_user(user_create)
-@router.get("/{user_id}", dependencies=[Depends(get_current_active_user)], response_model=schemas.User)
+@router.get(
+ "/{user_id}",
+ response_model=schemas.User,
+ dependencies=[Depends(has_privilege("User.Audit"))]
+)
async def get_user(
user_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> schemas.User:
"""
- Get an user.
+ Get a user.
+
+ Required privilege: User.Audit
"""
user = await users_repo.get_user(user_id)
@@ -164,14 +179,20 @@ async def get_user(
return user
-@router.put("/{user_id}", dependencies=[Depends(get_current_active_user)], response_model=schemas.User)
+@router.put(
+ "/{user_id}",
+ response_model=schemas.User,
+ dependencies=[Depends(has_privilege("User.Modify"))]
+)
async def update_user(
user_id: UUID,
user_update: schemas.UserUpdate,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.User:
"""
- Update an user.
+ Update a user.
+
+ Required privilege: User.Modify
"""
if user_update.username and await users_repo.get_user_by_username(user_update.username):
@@ -188,15 +209,18 @@ async def update_user(
@router.delete(
"/{user_id}",
- dependencies=[Depends(get_current_active_user)],
- status_code=status.HTTP_204_NO_CONTENT
+ status_code=status.HTTP_204_NO_CONTENT,
+ dependencies=[Depends(has_privilege("User.Allocate"))]
)
async def delete_user(
- user_id: UUID,
- users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
+ user_id: UUID,
+ users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
+ rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
- Delete an user.
+ Delete a user.
+
+ Required privilege: User.Allocate
"""
user = await users_repo.get_user(user_id)
@@ -209,12 +233,13 @@ async def delete_user(
success = await users_repo.delete_user(user_id)
if not success:
raise ControllerError(f"User '{user_id}' could not be deleted")
+ await rbac_repo.delete_all_ace_starting_with_path(f"/users/{user_id}")
@router.get(
"/{user_id}/groups",
- dependencies=[Depends(get_current_active_user)],
- response_model=List[schemas.UserGroup]
+ response_model=List[schemas.UserGroup],
+ dependencies=[Depends(has_privilege("Group.Audit"))]
)
async def get_user_memberships(
user_id: UUID,
@@ -222,68 +247,8 @@ async def get_user_memberships(
) -> List[schemas.UserGroup]:
"""
Get user memberships.
+
+ Required privilege: Group.Audit
"""
return await users_repo.get_user_memberships(user_id)
-
-
-@router.get(
- "/{user_id}/permissions",
- dependencies=[Depends(get_current_active_user)],
- response_model=List[schemas.Permission]
-)
-async def get_user_permissions(
- user_id: UUID,
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> List[schemas.Permission]:
- """
- Get user permissions.
- """
-
- return await rbac_repo.get_user_permissions(user_id)
-
-
-@router.put(
- "/{user_id}/permissions/{permission_id}",
- dependencies=[Depends(get_current_active_user)],
- status_code=status.HTTP_204_NO_CONTENT
-)
-async def add_permission_to_user(
- user_id: UUID,
- permission_id: UUID,
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
-) -> None:
- """
- Add a permission to an user.
- """
-
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
-
- user = await rbac_repo.add_permission_to_user(user_id, permission)
- if not user:
- raise ControllerNotFoundError(f"User '{user_id}' not found")
-
-
-@router.delete(
- "/{user_id}/permissions/{permission_id}",
- dependencies=[Depends(get_current_active_user)],
- status_code=status.HTTP_204_NO_CONTENT
-)
-async def remove_permission_from_user(
- user_id: UUID,
- permission_id: UUID,
- rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
-) -> None:
- """
- Remove permission from an user.
- """
-
- permission = await rbac_repo.get_permission(permission_id)
- if not permission:
- raise ControllerNotFoundError(f"Permission '{permission_id}' not found")
-
- user = await rbac_repo.remove_permission_from_user(user_id, permission)
- if not user:
- raise ControllerNotFoundError(f"User '{user_id}' not found")
diff --git a/gns3server/api/server.py b/gns3server/api/server.py
index c3ceb816..61ed5737 100644
--- a/gns3server/api/server.py
+++ b/gns3server/api/server.py
@@ -21,9 +21,10 @@ FastAPI app
import time
-from fastapi import FastAPI, Request, HTTPException
+from fastapi import FastAPI, Request, HTTPException, status
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse
+from fastapi.exceptions import RequestValidationError
from sqlalchemy.exc import SQLAlchemyError
from uvicorn.main import Server as UvicornServer
@@ -87,54 +88,54 @@ UvicornServer.handle_exit = handle_exit
@app.exception_handler(ControllerError)
async def controller_error_handler(request: Request, exc: ControllerError):
- log.error(f"Controller error: {exc}")
+ log.error(f"Controller error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=409,
+ status_code=status.HTTP_409_CONFLICT,
content={"message": str(exc)},
)
@app.exception_handler(ControllerTimeoutError)
async def controller_timeout_error_handler(request: Request, exc: ControllerTimeoutError):
- log.error(f"Controller timeout error: {exc}")
+ log.error(f"Controller timeout error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=408,
+ status_code=status.HTTP_408_REQUEST_TIMEOUT,
content={"message": str(exc)},
)
@app.exception_handler(ControllerUnauthorizedError)
async def controller_unauthorized_error_handler(request: Request, exc: ControllerUnauthorizedError):
- log.error(f"Controller unauthorized error: {exc}")
+ log.error(f"Controller unauthorized error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=401,
+ status_code=status.HTTP_401_UNAUTHORIZED,
content={"message": str(exc)},
)
@app.exception_handler(ControllerForbiddenError)
async def controller_forbidden_error_handler(request: Request, exc: ControllerForbiddenError):
- log.error(f"Controller forbidden error: {exc}")
+ log.error(f"Controller forbidden error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=403,
+ status_code=status.HTTP_403_FORBIDDEN,
content={"message": str(exc)},
)
@app.exception_handler(ControllerNotFoundError)
async def controller_not_found_error_handler(request: Request, exc: ControllerNotFoundError):
- log.error(f"Controller not found error: {exc}")
+ log.error(f"Controller not found error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=404,
+ status_code=status.HTTP_404_NOT_FOUND,
content={"message": str(exc)},
)
@app.exception_handler(ControllerBadRequestError)
async def controller_bad_request_error_handler(request: Request, exc: ControllerBadRequestError):
- log.error(f"Controller bad request error: {exc}")
+ log.error(f"Controller bad request error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=400,
+ status_code=status.HTTP_400_BAD_REQUEST,
content={"message": str(exc)},
)
@@ -143,7 +144,7 @@ async def controller_bad_request_error_handler(request: Request, exc: Controller
async def compute_conflict_error_handler(request: Request, exc: ComputeConflictError):
log.error(f"Controller received error from compute for request '{exc.url()}': {exc}")
return JSONResponse(
- status_code=409,
+ status_code=status.HTTP_409_CONFLICT,
content={"message": str(exc)},
)
@@ -160,12 +161,21 @@ async def http_exception_handler(request: Request, exc: HTTPException):
@app.exception_handler(SQLAlchemyError)
async def sqlalchemry_error_handler(request: Request, exc: SQLAlchemyError):
- log.error(f"Controller database error: {exc}")
+ log.error(f"Controller database error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
- status_code=500,
+ status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
content={"message": "Database error detected, please check logs to find details"},
)
+
+@app.exception_handler(RequestValidationError)
+async def validation_exception_handler(request: Request, exc: RequestValidationError):
+ log.error(f"Request validation error in {request.url.path} ({request.method}): {exc}")
+ return JSONResponse(
+ status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
+ content={"message": str(exc)}
+ )
+
# FIXME: do not use this middleware since it creates issue when using StreamingResponse
# see https://starlette-context.readthedocs.io/en/latest/middleware.html#why-are-there-two-middlewares-that-do-the-same-thing
diff --git a/gns3server/appliances/IPCop.gns3a b/gns3server/appliances/IPCop.gns3a
index 98476d38..929eb6ef 100644
--- a/gns3server/appliances/IPCop.gns3a
+++ b/gns3server/appliances/IPCop.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://www.kali.org/",
"documentation_url": "http://www.ipcop.org/docs.html",
"product_name": "IP Cop",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
diff --git a/gns3server/appliances/a10-vthunder.gns3a b/gns3server/appliances/a10-vthunder.gns3a
index ec9ec434..ad00c68f 100644
--- a/gns3server/appliances/a10-vthunder.gns3a
+++ b/gns3server/appliances/a10-vthunder.gns3a
@@ -7,8 +7,8 @@
"vendor_url": "https://www.a10networks.com/",
"documentation_url": "https://www.a10networks.com/support",
"product_name": "A10 vThunder",
- "product_url": "https://www.a10networks.com/products/thunder-series-appliances/vthunder-virtualized-application_delivery_controller/",
- "registry_version": 3,
+ "product_url": "https://www.a10networks.com/products/vthunder-trial/",
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/aaa.gns3a b/gns3server/appliances/aaa.gns3a
index 7bb024ad..ea702a91 100644
--- a/gns3server/appliances/aaa.gns3a
+++ b/gns3server/appliances/aaa.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Ubuntu",
"vendor_url": "https://www.ubuntu.com/",
"product_name": "AAA",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Andras Dosztal",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/alcatel-7750.gns3a b/gns3server/appliances/alcatel-7750.gns3a
index 872006d8..b002d2b7 100644
--- a/gns3server/appliances/alcatel-7750.gns3a
+++ b/gns3server/appliances/alcatel-7750.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.alcatel-lucent.com/support",
"product_name": "Alcatel 7750",
"product_url": "https://www.alcatel-lucent.com/products/7750-service-router",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/almalinux.gns3a b/gns3server/appliances/almalinux.gns3a
index 109e9673..56e3f9cf 100644
--- a/gns3server/appliances/almalinux.gns3a
+++ b/gns3server/appliances/almalinux.gns3a
@@ -25,26 +25,57 @@
},
"images": [
{
- "filename": "AlmaLinux-8-GenericCloud-8.5-20211119.x86_64.qcow2",
- "version": "8.5",
- "md5sum": "a64ece809ae06180ac59cfa622d98af0",
- "filesize": 561774592,
+ "filename": "AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2",
+ "version": "9.2",
+ "md5sum": "c5bc76e8c95ac9f810a3482c80a54cc7",
+ "filesize": 563347456,
+ "download_url": "https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/",
+ "direct_download_url": "https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2"
+ },
+ {
+ "filename": "AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2",
+ "version": "8.8",
+ "md5sum": "3958c5fc25770ef63cf97aa5d93f0a0b",
+ "filesize": 565444608,
"download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/",
- "direct_download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-8.5-20211119.x86_64.qcow2"
+ "direct_download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2"
+ },
+ {
+ "filename": "AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2",
+ "version": "8.7",
+ "md5sum": "b2b8c7fd3b6869362f3f8ed47549c804",
+ "filesize": 566231040,
+ "download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/",
+ "direct_download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2"
},
{
"filename": "almalinux-cloud-init-data.iso",
"version": "1.0",
"md5sum": "72fb52af76e9561d125dd99224e2c1d1",
"filesize": 374784,
- "download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/AlmaLinux/almalinux-cloud-init-data.iso"
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/AlmaLinux",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/AlmaLinux/almalinux-cloud-init-data.iso"
}
],
"versions": [
{
- "name": "8.5",
+ "name": "9.2",
"images": {
- "hda_disk_image": "AlmaLinux-8-GenericCloud-8.5-20211119.x86_64.qcow2",
+ "hda_disk_image": "AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2",
+ "cdrom_image": "almalinux-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "8.8",
+ "images": {
+ "hda_disk_image": "AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2",
+ "cdrom_image": "almalinux-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "8.7",
+ "images": {
+ "hda_disk_image": "AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2",
"cdrom_image": "almalinux-cloud-init-data.iso"
}
}
diff --git a/gns3server/appliances/alpine-linux-virt.gns3a b/gns3server/appliances/alpine-linux-virt.gns3a
index d7c2883d..fcfc7bf6 100644
--- a/gns3server/appliances/alpine-linux-virt.gns3a
+++ b/gns3server/appliances/alpine-linux-virt.gns3a
@@ -12,7 +12,7 @@
"availability": "free",
"maintainer": "Adnan RIHAN",
"maintainer_email": "adnan@rihan.fr",
- "usage": "Autologin is enabled as \"root\" with no password.\n\nThe network interfaces aren't configured, you can do either of the following:\n- Use alpine's DHCP client: `udhcpc`\n- Configure them manually (ip address add …, ip route add …)\n- Modify interfaces file in /etc/network/interfaces\n- Use alpine's wizard: `setup-interfaces`",
+ "usage": "Autologin is enabled as \"root\" with no password.\n\nThe network interfaces aren't configured, you can do either of the following:\n- Use alpine's DHCP client: `udhcpc`\n- Configure them manually (ip address add \u2026, ip route add \u2026)\n- Modify interfaces file in /etc/network/interfaces\n- Use alpine's wizard: `setup-interfaces`",
"symbol": "alpine-virt-qemu.svg",
"port_name_format": "eth{0}",
"qemu": {
diff --git a/gns3server/appliances/alpine-linux.gns3a b/gns3server/appliances/alpine-linux.gns3a
index 590e740b..4ad16883 100644
--- a/gns3server/appliances/alpine-linux.gns3a
+++ b/gns3server/appliances/alpine-linux.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://alpinelinux.org",
"documentation_url": "http://wiki.alpinelinux.org",
"product_name": "Alpine Linux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/arista-ceos.gns3a b/gns3server/appliances/arista-ceos.gns3a
index 2fbd791a..afabdb61 100644
--- a/gns3server/appliances/arista-ceos.gns3a
+++ b/gns3server/appliances/arista-ceos.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Arista",
"vendor_url": "http://www.arista.com/",
"product_name": "cEOS",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/arista-veos.gns3a b/gns3server/appliances/arista-veos.gns3a
index 5d75152c..2ec349b7 100644
--- a/gns3server/appliances/arista-veos.gns3a
+++ b/gns3server/appliances/arista-veos.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.arista.com/assets/data/docs/Manuals/EOS-4.17.2F-Manual.pdf",
"product_name": "vEOS",
"product_url": "https://eos.arista.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/aruba-arubaoscx.gns3a b/gns3server/appliances/aruba-arubaoscx.gns3a
index 39afe6a6..1fecc275 100644
--- a/gns3server/appliances/aruba-arubaoscx.gns3a
+++ b/gns3server/appliances/aruba-arubaoscx.gns3a
@@ -2,10 +2,12 @@
"appliance_id": "8f074218-9d61-4e99-ab89-35ca19ad44ee",
"name": "ArubaOS-CX Simulation Software",
"category": "multilayer_switch",
- "description": "The ArubaOS-CX Simulation Software is a virtual platform to enable simulation of the ArubaOS-CX Network Operating System. Simulated networks can be created using many of the protocols in the ArubaOS-CX Operating system like OSPF, BGP (inc. EVPN). Key features like the Aruba Network Analytics Engine and the REST API can be simulated, providing a lightweight development platform to building the modern network.",
+ "description": "The Aruba AOS-CX Switch Simulator is a virtual platform to enable simulation of the Aruba AOS-CX Network Operating System. Simulated networks can be created using many of the protocols in the ArubaOS-CX Operating system like OSPF, BGP (inc. EVPN). Key features like the Aruba Network Analytics Engine and the REST API can be simulated, providing a lightweight development platform to building the modern network.",
"vendor_name": "HPE Aruba",
"vendor_url": "https://www.arubanetworks.com",
- "product_name": "ArubaOS-CX Simulation Software",
+ "documentation_url": "https://asp.arubanetworks.com/downloads;search=Aruba%20AOS%20CX%20Switch%20Simulator;products=Aruba%20Switches",
+ "product_name": "Aruba AOS-CX Switch Simulator",
+ "product_url": "https://www.arubanetworks.com/products/switches/",
"registry_version": 4,
"status": "stable",
"availability": "service-contract",
@@ -30,13 +32,27 @@
"process_priority": "normal"
},
"images": [
+ {
+ "filename": "arubaoscx-disk-image-genericx86-p4-20230531220439.vmdk",
+ "version": "10.12.0006",
+ "md5sum": "c4f80fecd02ef93b431b75dd610e0063",
+ "filesize": 384638464,
+ "download_url": "https://asp.arubanetworks.com/"
+ },
+ {
+ "filename": "arubaoscx-disk-image-genericx86-p4-20221130174651.vmdk",
+ "version": "10.11.0001",
+ "md5sum": "ed5434173c898f47f19bfda51000611a",
+ "filesize": 364597760,
+ "download_url": "https://asp.arubanetworks.com/"
+ },
{
"filename": "arubaoscx-disk-image-genericx86-p4-20220815162137.vmdk",
"version": "10.10.1000",
"md5sum": "40f9ddf1e12640376af443b5d982f2f6",
"filesize": 356162560,
"download_url": "https://asp.arubanetworks.com/"
- },
+ },
{
"filename": "arubaoscx-disk-image-genericx86-p4-20220616193419.vmdk",
"version": "10.10.0002",
@@ -102,6 +118,18 @@
}
],
"versions": [
+ {
+ "name": "10.12.0006",
+ "images": {
+ "hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20230531220439.vmdk"
+ }
+ },
+ {
+ "name": "10.11.0001",
+ "images": {
+ "hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20221130174651.vmdk"
+ }
+ },
{
"name": "10.10.1000",
"images": {
diff --git a/gns3server/appliances/asterisk.gns3a b/gns3server/appliances/asterisk.gns3a
index e89cec7b..00ba3950 100644
--- a/gns3server/appliances/asterisk.gns3a
+++ b/gns3server/appliances/asterisk.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://wiki.asterisk.org/wiki/display/AST/Installing+AsteriskNOW",
"product_name": "AsteriskNOW / FreePBX",
"product_url": "http://www.asterisk.org/downloads/asterisknow",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/bigswitch-bigcloud-fabric.gns3a b/gns3server/appliances/bigswitch-bigcloud-fabric.gns3a
index 96d907b4..c6db4d64 100644
--- a/gns3server/appliances/bigswitch-bigcloud-fabric.gns3a
+++ b/gns3server/appliances/bigswitch-bigcloud-fabric.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.bigswitch.com/support",
"product_name": "Big Cloud Fabric",
"product_url": "http://www.bigswitch.com/sdn-products/big-cloud-fabrictm",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/bird.gns3a b/gns3server/appliances/bird.gns3a
index 688f072e..ac4dac99 100644
--- a/gns3server/appliances/bird.gns3a
+++ b/gns3server/appliances/bird.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://bird.network.cz/",
"documentation_url": "http://bird.network.cz/?get_doc&f=bird.html",
"product_name": "BIRD internet routing daemon",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/bird2.gns3a b/gns3server/appliances/bird2.gns3a
new file mode 100644
index 00000000..4d573e11
--- /dev/null
+++ b/gns3server/appliances/bird2.gns3a
@@ -0,0 +1,43 @@
+{
+ "appliance_id": "8fecbf89-5cd1-4aea-b735-5f36cf0efbb7",
+ "name": "BIRD2",
+ "category": "router",
+ "description": "The BIRD project aims to develop a fully functional dynamic IP routing daemon primarily targeted on (but not limited to) Linux, FreeBSD and other UNIX-like systems and distributed under the GNU General Public License.",
+ "vendor_name": "CZ.NIC Labs",
+ "vendor_url": "https://bird.network.cz",
+ "documentation_url": "https://bird.network.cz/?get_doc&f=bird.html&v=20",
+ "product_name": "BIRD internet routing daemon",
+ "registry_version": 4,
+ "status": "stable",
+ "maintainer": "Bernhard Ehlers",
+ "maintainer_email": "dev-ehlers@mailbox.org",
+ "usage": "Username:\tgns3\nPassword:\tgns3\nTo become root, use \"sudo -s\".\n\nNetwork configuration:\nsudo nano /etc/network/interfaces\nsudo systemctl restart networking\n\nBIRD:\nRestart: sudo systemctl restart bird\nReconfigure: birdc configure",
+ "port_name_format": "eth{0}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 4,
+ "ram": 512,
+ "hda_disk_interface": "scsi",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "kvm": "allow"
+ },
+ "images": [
+ {
+ "filename": "bird2-debian-2.0.12.qcow2",
+ "version": "2.0.12",
+ "md5sum": "435218a2e90cba921cc7fde1d64a9419",
+ "filesize": 287965184,
+ "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
+ "direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/bird2-debian-2.0.12.qcow2"
+ }
+ ],
+ "versions": [
+ {
+ "name": "2.0.12",
+ "images": {
+ "hda_disk_image": "bird2-debian-2.0.12.qcow2"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/brocade-vadx.gns3a b/gns3server/appliances/brocade-vadx.gns3a
index dc8c85ae..806176ea 100644
--- a/gns3server/appliances/brocade-vadx.gns3a
+++ b/gns3server/appliances/brocade-vadx.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Brocade",
"vendor_url": "https://www.brocade.com",
"product_name": "Virtual ADX",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/brocade-vrouter.gns3a b/gns3server/appliances/brocade-vrouter.gns3a
index 98c33d53..6665582c 100644
--- a/gns3server/appliances/brocade-vrouter.gns3a
+++ b/gns3server/appliances/brocade-vrouter.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.brocade.com/en/products-services/software-networking/network-functions-virtualization/vrouter.html",
"product_name": "vRouter",
"product_url": "http://www.brocade.com/en/products-services/software-networking/network-functions-virtualization/vrouter.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/brocade-vtm.gns3a b/gns3server/appliances/brocade-vtm.gns3a
index 08510a06..42f505fd 100644
--- a/gns3server/appliances/brocade-vtm.gns3a
+++ b/gns3server/appliances/brocade-vtm.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.brocade.com/en/products-services/software-networking/application-delivery-controllers/virtual-traffic-manager.html",
"product_name": "vTM DE",
"product_url": "http://www.brocade.com/en/products-services/software-networking/application-delivery-controllers/virtual-traffic-manager.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/bsdrp.gns3a b/gns3server/appliances/bsdrp.gns3a
index eadbaf67..f3f84494 100644
--- a/gns3server/appliances/bsdrp.gns3a
+++ b/gns3server/appliances/bsdrp.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Olivier Cochard-Labbe",
"vendor_url": "https://bsdrp.net/",
"product_name": "BSDRP",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/centos-cloud.gns3a b/gns3server/appliances/centos-cloud.gns3a
index 4e2232ec..c9666c40 100644
--- a/gns3server/appliances/centos-cloud.gns3a
+++ b/gns3server/appliances/centos-cloud.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://wiki.centos.org/Documentation",
"product_name": "Centos Cloud",
"product_url": "https://wiki.centos.org/Cloud",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -27,35 +27,69 @@
},
"images": [
{
- "filename": "CentOS-7-x86_64-GenericCloud-2111.qcow2",
- "version": "7 (2111)",
- "md5sum": "730b8662695831670721c8245be61dac",
- "filesize": 897384448,
- "download_url": "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2111.qcow2"
+ "filename": "CentOS-Stream-GenericCloud-9-20230727.1.x86_64.qcow2",
+ "version": "Stream-9 (20230727.1)",
+ "md5sum": "b66b7e4951cb5491ae44d5616d56b7cf",
+ "filesize": 1128764416,
+ "download_url": "https://cloud.centos.org/centos/9-stream/x86_64/images",
+ "direct_download_url": "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20230727.1.x86_64.qcow2"
},
{
- "filename": "CentOS-7-x86_64-GenericCloud-1809.qcow2",
- "version": "7 (1809)",
- "md5sum": "da79108d1324b27bd1759362b82fbe40",
- "filesize": 914948096,
- "download_url": "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1809.qcow2"
+ "filename": "CentOS-Stream-GenericCloud-8-20230710.0.x86_64.qcow2",
+ "version": "Stream-8 (20230710.0)",
+ "md5sum": "83e02ce98c29753c86fb7be7d802aa75",
+ "filesize": 1676164096,
+ "download_url": "https://cloud.centos.org/centos/8-stream/x86_64/images",
+ "direct_download_url": "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20230710.0.x86_64.qcow2"
},
{
"filename": "CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2",
"version": "8.4 (2105)",
"md5sum": "032eed270415526546eac07628905a62",
"filesize": 1309652992,
- "download_url": "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2"
+ "download_url": "https://cloud.centos.org/centos/8/x86_64/images",
+ "direct_download_url": "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2"
+ },
+ {
+ "filename": "CentOS-7-x86_64-GenericCloud-2111.qcow2",
+ "version": "7 (2111)",
+ "md5sum": "730b8662695831670721c8245be61dac",
+ "filesize": 897384448,
+ "download_url": "https://cloud.centos.org/centos/7/images",
+ "direct_download_url": "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2111.qcow2"
+ },
+ {
+ "filename": "CentOS-7-x86_64-GenericCloud-1809.qcow2",
+ "version": "7 (1809)",
+ "md5sum": "da79108d1324b27bd1759362b82fbe40",
+ "filesize": 914948096,
+ "download_url": "https://cloud.centos.org/centos/7/images",
+ "direct_download_url": "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1809.qcow2"
},
{
"filename": "centos-cloud-init-data.iso",
- "version": "1.0",
- "md5sum": "15ca60c12db6d13b8eeae1a19613fd6e",
- "filesize": 378880,
- "download_url": "https://github.com/asenci/gns3-centos-cloud-init-data/raw/master/centos-cloud-init-data.iso"
+ "version": "1.1",
+ "md5sum": "59ea8223fd659d8bce9081ff175912e9",
+ "filesize": 374784,
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/centos-cloud",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/centos-cloud/centos-cloud-init-data.iso"
}
],
"versions": [
+ {
+ "name": "Stream-9 (20230727.1)",
+ "images": {
+ "hda_disk_image": "CentOS-Stream-GenericCloud-9-20230727.1.x86_64.qcow2",
+ "cdrom_image": "centos-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "Stream-8 (20230710.0)",
+ "images": {
+ "hda_disk_image": "CentOS-Stream-GenericCloud-8-20230710.0.x86_64.qcow2",
+ "cdrom_image": "centos-cloud-init-data.iso"
+ }
+ },
{
"name": "8.4 (2105)",
"images": {
diff --git a/gns3server/appliances/chromium.gns3a b/gns3server/appliances/chromium.gns3a
index e109c79a..1b3d0e80 100644
--- a/gns3server/appliances/chromium.gns3a
+++ b/gns3server/appliances/chromium.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Chromium",
"vendor_url": "https://www.chromium.org/",
"product_name": "Chromium",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-1700.gns3a b/gns3server/appliances/cisco-1700.gns3a
index c136b7c4..65577819 100644
--- a/gns3server/appliances/cisco-1700.gns3a
+++ b/gns3server/appliances/cisco-1700.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "1700",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-2600.gns3a b/gns3server/appliances/cisco-2600.gns3a
index 817e8584..d565a086 100644
--- a/gns3server/appliances/cisco-2600.gns3a
+++ b/gns3server/appliances/cisco-2600.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "2600",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-2691.gns3a b/gns3server/appliances/cisco-2691.gns3a
index cc6123bf..2fd995e6 100644
--- a/gns3server/appliances/cisco-2691.gns3a
+++ b/gns3server/appliances/cisco-2691.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "2691",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-3620.gns3a b/gns3server/appliances/cisco-3620.gns3a
index 97477e61..9519d072 100644
--- a/gns3server/appliances/cisco-3620.gns3a
+++ b/gns3server/appliances/cisco-3620.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "3620",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-3640.gns3a b/gns3server/appliances/cisco-3640.gns3a
index 71b3f90b..bcfff3fd 100644
--- a/gns3server/appliances/cisco-3640.gns3a
+++ b/gns3server/appliances/cisco-3640.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "3640",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-3660.gns3a b/gns3server/appliances/cisco-3660.gns3a
index 57f2c551..ebb1f34b 100644
--- a/gns3server/appliances/cisco-3660.gns3a
+++ b/gns3server/appliances/cisco-3660.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "3660",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-3725.gns3a b/gns3server/appliances/cisco-3725.gns3a
index 6eeafb06..1b0c7b3c 100644
--- a/gns3server/appliances/cisco-3725.gns3a
+++ b/gns3server/appliances/cisco-3725.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/index.html",
"product_name": "3725",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-3745.gns3a b/gns3server/appliances/cisco-3745.gns3a
index f48765a0..d0c6f240 100644
--- a/gns3server/appliances/cisco-3745.gns3a
+++ b/gns3server/appliances/cisco-3745.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/support/routers/3745-multiservice-access-router/model.html",
"product_name": "3745",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-7200.gns3a b/gns3server/appliances/cisco-7200.gns3a
index 59371e21..6638702b 100644
--- a/gns3server/appliances/cisco-7200.gns3a
+++ b/gns3server/appliances/cisco-7200.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com",
"documentation_url": "http://www.cisco.com/c/en/us/products/routers/7200-series-routers/index.html",
"product_name": "7200",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -21,6 +21,18 @@
"npe": "npe-400"
},
"images": [
+ {
+ "filename": "c7200-adventerprisek9-mz.153-3.XB12.image",
+ "version": "153-3.XB12",
+ "md5sum": "3d234a3793331c972776354531f87221",
+ "filesize": 131471340
+ },
+ {
+ "filename": "c7200-advipservicesk9-mz.152-4.S5.image",
+ "version": "152-4.S5",
+ "md5sum": "cbbbea66a253f1dac0fcf81274dc778d",
+ "filesize": 87756936
+ },
{
"filename": "c7200-adventerprisek9-mz.124-24.T5.image",
"version": "124-24.T5",
@@ -29,6 +41,20 @@
}
],
"versions": [
+ {
+ "name": "153-3.XB12",
+ "idlepc": "0x60630d08",
+ "images": {
+ "image": "c7200-adventerprisek9-mz.153-3.XB12.image"
+ }
+ },
+ {
+ "name": "152-4.S5",
+ "idlepc": "0x62cc930c",
+ "images": {
+ "image": "c7200-advipservicesk9-mz.152-4.S5.image"
+ }
+ },
{
"name": "124-24.T5",
"idlepc": "0x606df838",
diff --git a/gns3server/appliances/cisco-asa.gns3a b/gns3server/appliances/cisco-asa.gns3a
index 1227a674..92b9e082 100644
--- a/gns3server/appliances/cisco-asa.gns3a
+++ b/gns3server/appliances/cisco-asa.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com/",
"product_name": "ASA",
"product_url": "http://www.cisco.com/c/en/us/products/security/adaptive-security-appliance-asa-software/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "broken",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-asav.gns3a b/gns3server/appliances/cisco-asav.gns3a
index 31b695d0..0d16abf1 100644
--- a/gns3server/appliances/cisco-asav.gns3a
+++ b/gns3server/appliances/cisco-asav.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/support/security/virtual-adaptive-security-appliance-firewall/products-installation-guides-list.html",
"product_name": "ASAv",
"product_url": "http://www.cisco.com/c/en/us/products/security/virtual-adaptive-security-appliance-firewall/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -26,7 +26,7 @@
"kvm": "require"
},
"images": [
- {
+ {
"filename": "asav9-16-2.qcow2",
"version": "9.16.2 CML",
"md5sum": "1f8db97063a7f738fddc81ac880a906c",
diff --git a/gns3server/appliances/cisco-c8000v.gns3a b/gns3server/appliances/cisco-c8000v.gns3a
index 14ab53c8..dae024ad 100644
--- a/gns3server/appliances/cisco-c8000v.gns3a
+++ b/gns3server/appliances/cisco-c8000v.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.cisco.com/c/en/us/td/docs/routers/C8000V/Configuration/c8000v-installation-configuration-guide.html",
"product_name": "c8000v",
"product_url": "https://www.cisco.com/c/en/us/support/routers/catalyst-8000v-edge-software/series.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -24,10 +24,17 @@
"kvm": "require"
},
"images": [
+ {
+ "filename": "c8000v-universalk9_8G_serial.17.06.05.qcow2",
+ "version": "17.06.05 8G",
+ "md5sum": "aeb15ab8e1cbd0cd76f7260a81442f98",
+ "filesize": 1777795072,
+ "download_url": "https://software.cisco.com/download/home/286327102/type/282046477/release/Bengaluru-17.6.5"
+ },
{
"filename": "c8000v-universalk9_8G_serial.17.06.01a.qcow2",
"version": "17.06.01a 8G",
- "md5sum": "d8b8ae633d953ec1b6d8f18a09a4f4e7",
+ "md5sum": "e278fa644295c703976a86f7f1c1cd65",
"filesize": 1595277312,
"download_url": "https://software.cisco.com/download/home/286327102/type/282046477/release/Bengaluru-17.6.1a"
},
@@ -47,6 +54,12 @@
}
],
"versions": [
+ {
+ "name": "17.06.05 8G",
+ "images": {
+ "hda_disk_image": "c8000v-universalk9_8G_serial.17.06.05.qcow2"
+ }
+ },
{
"name": "17.06.01a 8G",
"images": {
diff --git a/gns3server/appliances/cisco-cat9k.gns3a b/gns3server/appliances/cisco-cat9k.gns3a
new file mode 100644
index 00000000..7ebf7c22
--- /dev/null
+++ b/gns3server/appliances/cisco-cat9k.gns3a
@@ -0,0 +1,45 @@
+{
+ "appliance_id": "57a85f0e-b8ae-4820-bd2b-816b2cceb842",
+ "name": "Cisco CAT IOS-XE 9000v",
+ "category": "multilayer_switch",
+ "description": "Cisco IOS-XE 9000v. This appliance requires 16GB of memory to run! Recommend 2 or more vCPUs for faster boot performance",
+ "vendor_name": "Cisco",
+ "vendor_url": "http://www.cisco.com/",
+ "documentation_url": "https://developer.cisco.com/docs/modeling-labs/2-5/#!cml-release-notes",
+ "product_name": "Cisco CAT IOS-XE 9000v",
+ "product_url": "http://virl.cisco.com/",
+ "registry_version": 4,
+ "status": "experimental",
+ "maintainer": "GNS3 Team",
+ "maintainer_email": "developers@gns3.net",
+ "usage": "There is no default configuration present. Virtual Switch and Interfaces may take several minutes to be usable after appliance boot.",
+ "first_port_name": "GigabitEthernet0/0",
+ "port_name_format": "GigabitEthernet1/0/{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 9,
+ "ram": 16384,
+ "cpus": 2,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "kvm": "require"
+ },
+ "images": [
+ {
+ "filename": "cat9kv-prd-17.10.01prd7.qcow2",
+ "version": "17.10(1)",
+ "md5sum": "ffdbace33d31deae33e2a920a96b79ef",
+ "filesize": 2155806720,
+ "download_url": "https://learningnetworkstore.cisco.com/myaccount"
+ }
+ ],
+ "versions": [
+ {
+ "name": "17.10(1)",
+ "images": {
+ "hda_disk_image": "cat9kv-prd-17.10.01prd7.qcow2"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/cisco-csr1000v.gns3a b/gns3server/appliances/cisco-csr1000v.gns3a
index 0d062d3c..135367c6 100644
--- a/gns3server/appliances/cisco-csr1000v.gns3a
+++ b/gns3server/appliances/cisco-csr1000v.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/support/routers/cloud-services-router-1000v-series/products-installation-and-configuration-guides-list.html",
"product_name": "CSR1000v",
"product_url": "http://www.cisco.com/c/en/us/support/routers/cloud-services-router-1000v-series/tsd-products-support-series-home.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-dcnm.gns3a b/gns3server/appliances/cisco-dcnm.gns3a
index 4942faa7..8599150c 100644
--- a/gns3server/appliances/cisco-dcnm.gns3a
+++ b/gns3server/appliances/cisco-dcnm.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/support/cloud-systems-management/data-center-network-manager-10/model.html",
"product_name": "DCNM",
"product_url": "http://www.cisco.com/c/en/us/products/cloud-systems-management/prime-data-center-network-manager/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-iosv.gns3a b/gns3server/appliances/cisco-iosv.gns3a
index 8cfd5dc9..179159aa 100644
--- a/gns3server/appliances/cisco-iosv.gns3a
+++ b/gns3server/appliances/cisco-iosv.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com/",
"product_name": "IOSv",
"product_url": "http://virl.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -32,6 +32,13 @@
"download_url": "https://sourceforge.net/projects/gns-3/files",
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/IOSv_startup_config.img/download"
},
+ {
+ "filename": "vios-adventerprisek9-m.spa.159-3.m6.qcow2",
+ "version": "15.9(3)M6",
+ "md5sum": "49a6977977263b2774bebc56e4e678ff",
+ "filesize": 57309696,
+ "download_url": "https://learningnetworkstore.cisco.com/myaccount"
+ },
{
"filename": "vios-adventerprisek9-m.spa.159-3.m4.qcow2",
"version": "15.9(3)M4",
@@ -90,6 +97,13 @@
}
],
"versions": [
+ {
+ "name": "15.9(3)M6",
+ "images": {
+ "hda_disk_image": "vios-adventerprisek9-m.spa.159-3.m6.qcow2",
+ "hdb_disk_image": "IOSv_startup_config.img"
+ }
+ },
{
"name": "15.9(3)M4",
"images": {
diff --git a/gns3server/appliances/cisco-iosvl2.gns3a b/gns3server/appliances/cisco-iosvl2.gns3a
index 821ca78d..0a9e5e6f 100644
--- a/gns3server/appliances/cisco-iosvl2.gns3a
+++ b/gns3server/appliances/cisco-iosvl2.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com/",
"product_name": "IOSvL2",
"product_url": "http://virl.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-iosxrv.gns3a b/gns3server/appliances/cisco-iosxrv.gns3a
index 53fd8ad9..c6045502 100644
--- a/gns3server/appliances/cisco-iosxrv.gns3a
+++ b/gns3server/appliances/cisco-iosxrv.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/td/docs/ios_xr_sw/ios_xrv/release/notes/xrv-rn.html",
"product_name": "IOS XRv",
"product_url": "http://virl.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-iosxrv9k.gns3a b/gns3server/appliances/cisco-iosxrv9k.gns3a
index c1a8930a..18f0551c 100644
--- a/gns3server/appliances/cisco-iosxrv9k.gns3a
+++ b/gns3server/appliances/cisco-iosxrv9k.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/td/docs/ios_xr_sw/ios_xrv/release/notes/xrv-rn.html",
"product_name": "IOS XRv 9000",
"product_url": "http://virl.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-iou-l2.gns3a b/gns3server/appliances/cisco-iou-l2.gns3a
index 2f6ace04..a30ce59d 100644
--- a/gns3server/appliances/cisco-iou-l2.gns3a
+++ b/gns3server/appliances/cisco-iou-l2.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Cisco",
"vendor_url": "http://www.cisco.com",
"product_name": "Cisco IOU L2",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-iou-l3.gns3a b/gns3server/appliances/cisco-iou-l3.gns3a
index 3b0ac2f0..385c9c4e 100644
--- a/gns3server/appliances/cisco-iou-l3.gns3a
+++ b/gns3server/appliances/cisco-iou-l3.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Cisco",
"vendor_url": "http://www.cisco.com",
"product_name": "Cisco IOU L3",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-nxosv.gns3a b/gns3server/appliances/cisco-nxosv.gns3a
index b49a026d..c43f2a35 100644
--- a/gns3server/appliances/cisco-nxosv.gns3a
+++ b/gns3server/appliances/cisco-nxosv.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.cisco.com/",
"product_name": "NX-OSv",
"product_url": "http://virl.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-nxosv9k.gns3a b/gns3server/appliances/cisco-nxosv9k.gns3a
index 9c4516e8..b830275b 100644
--- a/gns3server/appliances/cisco-nxosv9k.gns3a
+++ b/gns3server/appliances/cisco-nxosv9k.gns3a
@@ -33,6 +33,27 @@
"filesize": 1592000512,
"download_url": "https://software.cisco.com/download/home/286312239/type/282088129/release/10.1(1)"
},
+ {
+ "filename": "nexus9300v.10.1.1.qcow2",
+ "version": "9300v 10.1.1",
+ "md5sum": "4051bdb96aff6e54b72b7e3b06c9d6eb",
+ "filesize": 1990983680,
+ "download_url": "https://software.cisco.com/download/home/286312239/type/282088129/release/10.1(1)"
+ },
+ {
+ "filename": "nexus9500v.9.3.9.qcow2",
+ "version": "9500v 9.3.9",
+ "md5sum": "30c25039927f89aebe73ea20d15abd6d",
+ "filesize": 1980760064,
+ "download_url": "https://software.cisco.com/download/home/286312239/type/282088129/release/9.3(9)"
+ },
+ {
+ "filename": "nexus9300v.9.3.9.qcow2",
+ "version": "9300v 9.3.9",
+ "md5sum": "e807005cb7d2d2957b4af0e59f368b36",
+ "filesize": 1980563456,
+ "download_url": "https://software.cisco.com/download/home/286312239/type/282088129/release/9.3(9)"
+ },
{
"filename": "nexus9300v.9.3.8.qcow2",
"version": "9300v 9.3.8",
@@ -167,12 +188,12 @@
"download_url": "https://software.cisco.com/download/"
},
{
- "filename": "OVMF-20160813.fd",
- "version": "16.08.13",
- "md5sum": "8ff0ef1ec56345db5b6bda1a8630e3c6",
- "filesize": 2097152,
- "download_url": "",
- "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/OVMF-20160813.fd.zip/download",
+ "filename": "OVMF-edk2-stable202305.fd",
+ "version": "stable202305",
+ "md5sum": "6c4cf1519fec4a4b95525d9ae562963a",
+ "filesize": 4194304,
+ "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
+ "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/OVMF-edk2-stable202305.fd.zip/download",
"compression": "zip"
}
],
@@ -180,140 +201,161 @@
{
"name": "9500v 10.1.1",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nexus9500v64.10.1.1.qcow2"
}
},
- {
+ {
+ "name": "9300v 10.1.1",
+ "images": {
+ "bios_image": "OVMF-edk2-stable202305.fd",
+ "hda_disk_image": "nexus9300v.10.1.1.qcow2"
+ }
+ },
+ {
+ "name": "9500v 9.3.9",
+ "images": {
+ "bios_image": "OVMF-edk2-stable202305.fd",
+ "hda_disk_image": "nexus9500v.9.3.9.qcow2"
+ }
+ },
+ {
+ "name": "9300v 9.3.9",
+ "images": {
+ "bios_image": "OVMF-edk2-stable202305.fd",
+ "hda_disk_image": "nexus9300v.9.3.9.qcow2"
+ }
+ },
+ {
"name": "9300v 9.3.8",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nexus9300v.9.3.8.qcow2"
}
},
{
"name": "9500v 9.3.7",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nexus9500v.9.3.7.qcow2"
}
},
{
"name": "9500v 9.3.3",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nexus9500v.9.3.3.qcow2"
}
},
{
"name": "9300v 9.3.3",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nexus9300v.9.3.3.qcow2"
}
},
{
"name": "9.3.1",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv.9.3.1.qcow2"
}
},
{
"name": "9.2.3",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.9.2.3.qcow2"
}
},
{
"name": "9.2.2",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.9.2.2.qcow2"
}
},
{
"name": "9.2.1",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.9.2.1.qcow2"
}
},
{
"name": "7.0.3.I7.9",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.9.qcow2"
}
},
{
"name": "7.0.3.I7.7",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.7.qcow2"
}
},
{
"name": "7.0.3.I7.6",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.6.qcow2"
}
},
{
"name": "7.0.3.I7.5",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.5.qcow2"
}
},
{
"name": "7.0.3.I7.4",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.4.qcow2"
}
},
{
"name": "7.0.3.I7.3",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.3.qcow2"
}
},
{
"name": "7.0.3.I7.2",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.2.qcow2"
}
},
{
"name": "7.0.3.I7.1",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I7.1.qcow2"
}
},
{
"name": "7.0.3.I6.1",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I6.1.qcow2"
}
},
{
"name": "7.0.3.I5.2",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I5.2.qcow2"
}
},
{
"name": "7.0.3.I5.1",
"images": {
- "bios_image": "OVMF-20160813.fd",
+ "bios_image": "OVMF-edk2-stable202305.fd",
"hda_disk_image": "nxosv-final.7.0.3.I5.1.qcow2"
}
}
diff --git a/gns3server/appliances/cisco-pyats.gns3a b/gns3server/appliances/cisco-pyats.gns3a
new file mode 100644
index 00000000..52aeb6e6
--- /dev/null
+++ b/gns3server/appliances/cisco-pyats.gns3a
@@ -0,0 +1,19 @@
+{
+ "appliance_id": "d9ce131e-ecdc-49d2-be7d-d883d3919a06",
+ "name": "Cisco PyATS",
+ "category": "guest",
+ "description": "pyATS is an end-to-end DevOps automation ecosystem. Agnostic by design, pyATS enable network engineers to automate their day-to-day DevOps activities, perform stateful validation of their device operational status, build a safety-net of scalable, data-driven and reusable tests around their network, and visualize everything in a modern, easy to use dashboard.",
+ "vendor_name": "Cisco",
+ "vendor_url": "https://cisco.com",
+ "product_name": "PyATS",
+ "product_url": "https://developer.cisco.com/pyats/",
+ "registry_version": 4,
+ "status": "stable",
+ "maintainer": "Xander Petty",
+ "maintainer_email": "Xander.Petty@protonmail.com",
+ "docker": {
+ "adapters": 1,
+ "image": "gns3/pyats:latest",
+ "console_type": "telnet"
+ }
+}
diff --git a/gns3server/appliances/cisco-vWLC.gns3a b/gns3server/appliances/cisco-vWLC.gns3a
index d99504b1..a17374d7 100644
--- a/gns3server/appliances/cisco-vWLC.gns3a
+++ b/gns3server/appliances/cisco-vWLC.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/products/wireless/wireless-lan-controller/index.html",
"product_name": "Virtual Wireless LAN Controller",
"product_url": "http://www.cisco.com/c/en/us/support/wireless/virtual-wireless-controller/tsd-products-support-series-home.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cisco-wsav.gns3a b/gns3server/appliances/cisco-wsav.gns3a
index 85b08b31..eec913b0 100644
--- a/gns3server/appliances/cisco-wsav.gns3a
+++ b/gns3server/appliances/cisco-wsav.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/c/en/us/support/security/web-security-appliance/tsd-products-support-series-home.html",
"product_name": "Web Security Virtual Appliance",
"product_url": "http://www.cisco.com/c/en/us/products/security/web-security-appliance/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/citrix-netscaler-vpx.gns3a b/gns3server/appliances/citrix-netscaler-vpx.gns3a
index bd1402c3..3b1ad054 100644
--- a/gns3server/appliances/citrix-netscaler-vpx.gns3a
+++ b/gns3server/appliances/citrix-netscaler-vpx.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.citrix.com/products/netscaler-adc/support.html",
"product_name": "NetScaler VPX",
"product_url": "https://www.citrix.com/products/netscaler-adc/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/citrix-sd-wan.gns3a b/gns3server/appliances/citrix-sd-wan.gns3a
index a2d67c49..a4bcdca1 100644
--- a/gns3server/appliances/citrix-sd-wan.gns3a
+++ b/gns3server/appliances/citrix-sd-wan.gns3a
@@ -2,7 +2,7 @@
"appliance_id": "2d5634dc-ad39-46cf-a2fd-17b291abab91",
"name": "Citrix SD-WAN",
"category": "router",
- "description": "A software-defined wide area network (SD-WAN) is a virtual WAN architecture, in which any blend of network transport types — not only multiprotocol label switching (MPLS) but also broadband internet, cellular, and satellite — can be virtualized and bonded then centrally managed in software, to securely connect users to applications and desktops in accordance with policy. Essentially, SD-WAN is software-defined networking (SDN) for the WAN.",
+ "description": "A software-defined wide area network (SD-WAN) is a virtual WAN architecture, in which any blend of network transport types \u2014 not only multiprotocol label switching (MPLS) but also broadband internet, cellular, and satellite \u2014 can be virtualized and bonded then centrally managed in software, to securely connect users to applications and desktops in accordance with policy. Essentially, SD-WAN is software-defined networking (SDN) for the WAN.",
"vendor_name": "Citrix",
"vendor_url": "http://www.citrix.com/",
"documentation_url": "https://docs.citrix.com/en-us/citrix-sd-wan",
diff --git a/gns3server/appliances/citrix-sdwan-center.gns3a b/gns3server/appliances/citrix-sdwan-center.gns3a
index a8761d6b..d0e14124 100644
--- a/gns3server/appliances/citrix-sdwan-center.gns3a
+++ b/gns3server/appliances/citrix-sdwan-center.gns3a
@@ -18,7 +18,7 @@
"adapter_type": "virtio-net-pci",
"adapters": 4,
"ram": 8192,
- "cpus": 4,
+ "cpus": 4,
"hda_disk_interface": "ide",
"arch": "x86_64",
"console_type": "telnet",
diff --git a/gns3server/appliances/clavister-netsheild.gns3a b/gns3server/appliances/clavister-netsheild.gns3a
index f9ac0f11..b60b2c7f 100644
--- a/gns3server/appliances/clavister-netsheild.gns3a
+++ b/gns3server/appliances/clavister-netsheild.gns3a
@@ -18,7 +18,7 @@
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 4,
- "ram": 1024,
+ "ram": 1024,
"hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
@@ -37,10 +37,10 @@
],
"versions": [
{
+ "name": "cOS Stream 3.80.09",
"images": {
"hda_disk_image": "clavister-cos-stream-3.80.09.01-virtual-x64-generic.qcow2"
- },
- "name": "cOS Stream 3.80.09"
+ }
}
]
}
diff --git a/gns3server/appliances/clavister-netwall.gns3a b/gns3server/appliances/clavister-netwall.gns3a
index 37d2e59e..b7c37ccf 100644
--- a/gns3server/appliances/clavister-netwall.gns3a
+++ b/gns3server/appliances/clavister-netwall.gns3a
@@ -43,16 +43,16 @@
],
"versions": [
{
+ "name": "cOS Core 14.00.01 (x86)",
"images": {
"hda_disk_image": "clavister-cos-core-14.00.01.13-kvm-en.img"
- },
- "name": "cOS Core 14.00.01 (x86)"
+ }
},
{
+ "name": "cOS Core 14.00.00 (x86)",
"images": {
"hda_disk_image": "clavister-cos-core-14.00.00.12-kvm-en.img"
- },
- "name": "cOS Core 14.00.00 (x86)"
+ }
}
]
}
diff --git a/gns3server/appliances/clearos.gns3a b/gns3server/appliances/clearos.gns3a
index 8ec83838..2736d98f 100644
--- a/gns3server/appliances/clearos.gns3a
+++ b/gns3server/appliances/clearos.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.clearos.com/resources/documentation/clearos-7-documentation-overview",
"product_name": "ClearOS CE",
"product_url": "https://www.clearos.com/clearfoundation/software/clearos-7-community",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cloudrouter.gns3a b/gns3server/appliances/cloudrouter.gns3a
index b6d6b9f5..20c72ca2 100644
--- a/gns3server/appliances/cloudrouter.gns3a
+++ b/gns3server/appliances/cloudrouter.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://cloudrouter.atlassian.net/wiki/display/CPD/CloudRouter+Project+Information",
"product_name": "CloudRouter",
"product_url": "https://cloudrouter.org/about/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/coreos.gns3a b/gns3server/appliances/coreos.gns3a
index babf9f1b..cdd5d0cf 100644
--- a/gns3server/appliances/coreos.gns3a
+++ b/gns3server/appliances/coreos.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://coreos.com/",
"documentation_url": "https://coreos.com/docs/",
"product_name": "CoreOS",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/cumulus-vx.gns3a b/gns3server/appliances/cumulus-vx.gns3a
index cdf27052..8183d425 100644
--- a/gns3server/appliances/cumulus-vx.gns3a
+++ b/gns3server/appliances/cumulus-vx.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.cumulusnetworks.com/",
"product_name": "Cumulus VX",
"product_url": "https://cumulusnetworks.com/cumulus-vx/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -18,13 +18,21 @@
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 7,
- "ram": 768,
- "hda_disk_interface": "ide",
+ "ram": 1024,
+ "hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "require"
},
"images": [
+ {
+ "filename": "cumulus-linux-5.4.0-vx-amd64-qemu.qcow2",
+ "version": "5.4.0",
+ "md5sum": "b36d781a168e381e0db5b1d85a2f970d",
+ "filesize": 6254493696,
+ "download_url": "https://www.nvidia.com/en-us/networking/ethernet-switching/cumulus-vx/download/",
+ "direct_download_url": "https://d2cd9e7ca6hntp.cloudfront.net/public/CumulusLinux-5.4.0/cumulus-linux-5.4.0-vx-amd64-qemu.qcow2"
+ },
{
"filename": "cumulus-linux-5.3.1-vx-amd64-qemu.qcow2",
"version": "5.3.1",
@@ -247,6 +255,18 @@
}
],
"versions": [
+ {
+ "name": "5.4.0",
+ "images": {
+ "hda_disk_image": "cumulus-linux-5.4.0-vx-amd64-qemu.qcow2"
+ }
+ },
+ {
+ "name": "5.3.1",
+ "images": {
+ "hda_disk_image": "cumulus-linux-5.3.1-vx-amd64-qemu.qcow2"
+ }
+ },
{
"name": "5.1.0",
"images": {
diff --git a/gns3server/appliances/debian.gns3a b/gns3server/appliances/debian.gns3a
index 0ab950ca..bb3909f4 100644
--- a/gns3server/appliances/debian.gns3a
+++ b/gns3server/appliances/debian.gns3a
@@ -6,10 +6,10 @@
"vendor_name": "Debian",
"vendor_url": "https://www.debian.org",
"product_name": "Debian",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
- "maintainer": "GNS3 Team",
- "maintainer_email": "developers@gns3.net",
+ "maintainer": "Bernhard Ehlers",
+ "maintainer_email": "dev-ehlers@mailbox.org",
"usage": "Username:\tdebian\nPassword:\tdebian\nTo become root, use \"sudo -s\".\n\nNetwork configuration:\n- In \"/etc/network/interfaces\" comment out \"source-directory /run/network/interfaces.d\"\n- Remove \"/etc/network/interfaces.d/50-cloud-init\"\n- Create \"/etc/network/interfaces.d/10-ens4\", for example:\n\nauto ens4\n#iface ens4 inet dhcp\niface ens4 inet static\n address 10.1.1.100/24\n gateway 10.1.1.1\n dns-nameservers 10.1.1.1\n",
"symbol": "linux_guest.svg",
"port_name_format": "ens{port4}",
@@ -24,41 +24,57 @@
},
"images": [
{
- "filename": "debian-11-genericcloud-amd64-20221219-1234.qcow2",
- "version": "11.6",
- "md5sum": "bd6ddbccc89e40deb7716b812958238d",
- "filesize": 258801664,
- "download_url": "https://cloud.debian.org/images/cloud/bullseye/",
- "direct_download_url": "https://cloud.debian.org/images/cloud/bullseye/20221219-1234/debian-11-genericcloud-amd64-20221219-1234.qcow2"
+ "filename": "debian-12-genericcloud-amd64-20230723-1450.qcow2",
+ "version": "12.1",
+ "md5sum": "6d1efcaa206de01eeeb590d773421c5c",
+ "filesize": 280166400,
+ "download_url": "https://cloud.debian.org/images/cloud/bookworm/",
+ "direct_download_url": "https://cloud.debian.org/images/cloud/bookworm/20230723-1450/debian-12-genericcloud-amd64-20230723-1450.qcow2"
},
{
- "filename": "debian-10-genericcloud-amd64-20220911-1135.qcow2",
+ "filename": "debian-11-genericcloud-amd64-20230601-1398.qcow2",
+ "version": "11.7",
+ "md5sum": "1b24a841dc5ca9bcf40b94ad4b4775d4",
+ "filesize": 259063808,
+ "download_url": "https://cloud.debian.org/images/cloud/bullseye/",
+ "direct_download_url": "https://cloud.debian.org/images/cloud/bullseye/20230601-1398/debian-11-genericcloud-amd64-20230601-1398.qcow2"
+ },
+ {
+ "filename": "debian-10-genericcloud-amd64-20230601-1398.qcow2",
"version": "10.13",
- "md5sum": "9d4d1175bef974caba79dd6ca33d500c",
- "filesize": 234749952,
+ "md5sum": "ca799fb4011712f4686c422c1a9731cf",
+ "filesize": 228130816,
"download_url": "https://cloud.debian.org/images/cloud/buster/",
- "direct_download_url": "https://cloud.debian.org/images/cloud/buster/20220911-1135/debian-10-genericcloud-amd64-20220911-1135.qcow2"
+ "direct_download_url": "https://cloud.debian.org/images/cloud/buster/20230601-1398/debian-10-genericcloud-amd64-20230601-1398.qcow2"
},
{
"filename": "debian-cloud-init-data.iso",
"version": "1.0",
"md5sum": "43f6bf70c178a9d3c270b5c24971e578",
"filesize": 374784,
- "download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/Debian/debian-cloud-init-data.iso"
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/Debian",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/Debian/debian-cloud-init-data.iso"
}
],
"versions": [
{
- "name": "11.6",
+ "name": "12.1",
"images": {
- "hda_disk_image": "debian-11-genericcloud-amd64-20221219-1234.qcow2",
+ "hda_disk_image": "debian-12-genericcloud-amd64-20230723-1450.qcow2",
+ "cdrom_image": "debian-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "11.7",
+ "images": {
+ "hda_disk_image": "debian-11-genericcloud-amd64-20230601-1398.qcow2",
"cdrom_image": "debian-cloud-init-data.iso"
}
},
{
"name": "10.13",
"images": {
- "hda_disk_image": "debian-10-genericcloud-amd64-20220911-1135.qcow2",
+ "hda_disk_image": "debian-10-genericcloud-amd64-20230601-1398.qcow2",
"cdrom_image": "debian-cloud-init-data.iso"
}
}
diff --git a/gns3server/appliances/deft-linux.gns3a b/gns3server/appliances/deft-linux.gns3a
index 0c39a22c..27bf051a 100644
--- a/gns3server/appliances/deft-linux.gns3a
+++ b/gns3server/appliances/deft-linux.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.deftlinux.net/",
"documentation_url": "http://www.deftlinux.net/deft-manual/",
"product_name": "DEFT Linux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/dell-ftos.gns3a b/gns3server/appliances/dell-ftos.gns3a
index 79314dcf..763d0e81 100644
--- a/gns3server/appliances/dell-ftos.gns3a
+++ b/gns3server/appliances/dell-ftos.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.dell.com/",
"product_name": "Dell OS9",
"product_url": "http://www.dell.com/us/business/p/open-platform-software/pd",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/dns.gns3a b/gns3server/appliances/dns.gns3a
index fb9cbcc2..857b18f7 100644
--- a/gns3server/appliances/dns.gns3a
+++ b/gns3server/appliances/dns.gns3a
@@ -6,11 +6,11 @@
"vendor_name": "Ubuntu",
"vendor_url": "https://www.ubuntu.com/",
"product_name": "DNS",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Andras Dosztal",
"maintainer_email": "developers@gns3.net",
- "usage": "You can add records by adding entries to the /etc/hosts file in the following format:\n%IP_ADDRESS% %HOSTNAME%.lab %HOSTNAME%\n\nExample:\n192.168.123.10 router1.lab router1\n\nIf you require DNS requests to be serviced from a different subnet than the one that the DNS server resides on then do the following:\n\n1. Edit (nano or vim) /ect/init.d/dnsmasq\n2. Find the line DNSMASQ_OPTS=\"$DNSMASQ_OPTS --local-service\"\n3. Remove the --local-service or comment that line out and add DNSMASQ_OPTS=\"\"\n4. Restart dnsmasq - service dnsmaq restart",
+ "usage": "You can add records by adding entries to the /etc/hosts file in the following format:\n%IP_ADDRESS% %HOSTNAME%.lab %HOSTNAME%\n\nExample:\n192.168.123.10 router1.lab router1\n\nIf you require DNS requests to be serviced from a different subnet than the one that the DNS server resides on then do the following:\n\n1. Edit (nano or vim) /ect/init.d/dnsmasq\n2. Find the line DNSMASQ_OPTS=\"$DNSMASQ_OPTS --local-service\"\n3. Remove the --local-service or comment that line out and add DNSMASQ_OPTS=\"\"\n4. Restart dnsmasq using the following command: service dnsmasq restart \n\n There is an error in this Docker container, edit /etc/dnsmasq.conf, add: interface=eth0",
"symbol": "linux_guest.svg",
"docker": {
"adapters": 1,
diff --git a/gns3server/appliances/empty-vm.gns3a b/gns3server/appliances/empty-vm.gns3a
index 8e2ac20f..52f73331 100644
--- a/gns3server/appliances/empty-vm.gns3a
+++ b/gns3server/appliances/empty-vm.gns3a
@@ -18,9 +18,9 @@
"adapter_type": "e1000",
"adapters": 1,
"ram": 1024,
+ "hda_disk_interface": "sata",
"arch": "x86_64",
"console_type": "vnc",
- "hda_disk_interface": "sata",
"boot_priority": "d",
"kvm": "allow"
},
@@ -33,7 +33,7 @@
"download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/",
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty8G.qcow2/download"
},
- {
+ {
"filename": "empty30G.qcow2",
"version": "30G",
"md5sum": "3411a599e822f2ac6be560a26405821a",
@@ -41,7 +41,7 @@
"download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/",
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty30G.qcow2/download"
},
- {
+ {
"filename": "empty100G.qcow2",
"version": "100G",
"md5sum": "1e6409a4523ada212dea2ebc50e50a65",
@@ -77,11 +77,11 @@
"hda_disk_image": "empty100G.qcow2"
}
},
- {
+ {
"name": "200G",
"images": {
"hda_disk_image": "empty200G.qcow2"
}
}
- ]
+ ]
}
diff --git a/gns3server/appliances/endhost.gns3a b/gns3server/appliances/endhost.gns3a
new file mode 100644
index 00000000..574db347
--- /dev/null
+++ b/gns3server/appliances/endhost.gns3a
@@ -0,0 +1,17 @@
+{
+ "appliance_id": "f59a5cf6-baaa-45a6-9685-989a2c3f3f4a",
+ "name": "endhost",
+ "category": "guest",
+ "description": "General purpose alpine-based endhost",
+ "vendor_name": "endhost",
+ "vendor_url": "https://www.alpinelinux.org",
+ "product_name": "endhost",
+ "registry_version": 4,
+ "status": "experimental",
+ "maintainer": "GNS3 Team",
+ "maintainer_email": "developers@gns3.net",
+ "docker": {
+ "adapters": 1,
+ "image": "gns3/endhost:latest"
+ }
+}
diff --git a/gns3server/appliances/exos.gns3a b/gns3server/appliances/exos.gns3a
index 4b67b8ac..8132452e 100644
--- a/gns3server/appliances/exos.gns3a
+++ b/gns3server/appliances/exos.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://www.extremenetworks.com",
"documentation_url": "https://www.extremenetworks.com/support/documentation",
"product_name": "EXOS VM",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Extreme Networks",
"maintainer_email": "GitHubscripting@extremenetworks.com",
@@ -27,14 +27,14 @@
"options": "-cpu core2duo"
},
"images": [
- {
+ {
"filename": "EXOS-VM_v32.1.1.6.qcow2",
"version": "32.1.1.6",
"md5sum": "48868bbcb4255d6365049b5941dd2af7",
"filesize": 231211008,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_EXOS/EXOS-VM_v32.1.1.6.qcow2"
},
- {
+ {
"filename": "EXOS-VM_v31.7.1.4.qcow2",
"version": "31.7.1.4",
"md5sum": "a70e4fa3bc361434237ad12937aaf0fb",
diff --git a/gns3server/appliances/extreme-networks-voss.gns3a b/gns3server/appliances/extreme-networks-voss.gns3a
index 0246472e..abe36275 100644
--- a/gns3server/appliances/extreme-networks-voss.gns3a
+++ b/gns3server/appliances/extreme-networks-voss.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.extremenetworks.com",
"documentation_url": "http://www.extremenetworks.com/support/documentation",
"product_name": "VOSS_VM",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "Extreme Networks",
"maintainer_email": "voss@extremenetworks.com",
@@ -27,12 +27,19 @@
"options": "-nographic"
},
"images": [
+ {
+ "filename": "VOSSGNS3.8.10.1.0.qcow2",
+ "version": "v8.10.1.0",
+ "md5sum": "d8f09f5a9759882be84ad7e4be575ed3",
+ "filesize": 433258496,
+ "direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.8.10.1.0.qcow2"
+ },
{
"filename": "VOSSGNS3.8.8.0.0.qcow2",
"version": "v8.8.0.0",
"md5sum": "caa01094bad8ea5750261924b82ca746",
"filesize": 348389376,
- "direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.8.8.0.0.qcow2"
+ "direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.8.8.0.0.qcow2"
},
{
"filename": "VOSSGNS3.8.4.0.0.qcow2",
@@ -86,9 +93,15 @@
],
"versions": [
{
- "name": "v8.8.0.0",
+ "name": "v8.10.1.0",
"images":
{
+ "hda_disk_image": "VOSSGNS3.8.10.1.0.qcow2"
+ }
+ },
+ {
+ "name": "v8.8.0.0",
+ "images": {
"hda_disk_image": "VOSSGNS3.8.8.0.0.qcow2"
}
},
diff --git a/gns3server/appliances/f5-bigip.gns3a b/gns3server/appliances/f5-bigip.gns3a
index 6d2061f4..b04caac3 100644
--- a/gns3server/appliances/f5-bigip.gns3a
+++ b/gns3server/appliances/f5-bigip.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/bigip-ve-kvm-setup-11-3-0.html",
"product_name": "F5 BIG-IP LTM VE",
"product_url": "https://f5.com/products/modules/local-traffic-manager",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/f5-bigiq.gns3a b/gns3server/appliances/f5-bigiq.gns3a
index 26517845..9a799e64 100644
--- a/gns3server/appliances/f5-bigiq.gns3a
+++ b/gns3server/appliances/f5-bigiq.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://support.f5.com/csp/#/knowledge-center/software/BIG-IQ?module=BIG-IQ%20Centralized%20Management",
"product_name": "F5 BIG-IQ CM",
"product_url": "https://f5.com/products/big-iq-centralized-management",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fedora-cloud.gns3a b/gns3server/appliances/fedora-cloud.gns3a
index 4a718196..1a1c27e6 100644
--- a/gns3server/appliances/fedora-cloud.gns3a
+++ b/gns3server/appliances/fedora-cloud.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://docs.fedoraproject.org/en-US/docs/",
"product_name": "Fedora Cloud Base",
"product_url": "https://alt.fedoraproject.org/cloud/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Da-Geek",
"maintainer_email": "dageek@dageeks-geeks.gg",
@@ -26,23 +26,70 @@
"options": "-nographic"
},
"images": [
+ {
+ "filename": "Fedora-Cloud-Base-38-1.6.x86_64.qcow2",
+ "version": "38-1.6",
+ "md5sum": "53ddfe7b28666d5ddc55e93ff06abad2",
+ "filesize": 497287168,
+ "download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images",
+ "direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2"
+ },
+ {
+ "filename": "Fedora-Cloud-Base-37-1.7.x86_64.qcow2",
+ "version": "37-1.7",
+ "md5sum": "36f7b464b6ab46ad97c001b539495e90",
+ "filesize": 492830720,
+ "download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images",
+ "direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.qcow2"
+ },
+ {
+ "filename": "Fedora-Cloud-Base-36-1.5.x86_64.qcow2",
+ "version": "36-1.5",
+ "md5sum": "7f7cdad25b77f232078bf454c39529d3",
+ "filesize": 448266240,
+ "download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/36/Cloud/x86_64/images",
+ "direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-1.5.x86_64.qcow2"
+ },
{
"filename": "Fedora-Cloud-Base-35-1.2.x86_64.qcow2",
"version": "35-1.2",
"md5sum": "cfa9cdcfb946e5f4cf9dd4d7906008d0",
"filesize": 376897536,
- "download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-1.2.x86_64.qcow2"
+ "download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images",
+ "direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-1.2.x86_64.qcow2"
},
{
"filename": "fedora-cloud-init-data.iso",
"version": "1.0",
"md5sum": "3d0d6391d3f5ece1180c70b9667c4dca",
"filesize": 374784,
- "download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/fedora-cloud/fedora-cloud-init-data.iso"
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/fedora-cloud",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/fedora-cloud/fedora-cloud-init-data.iso"
}
],
"versions": [
- {
+ {
+ "name": "38-1.6",
+ "images": {
+ "hda_disk_image": "Fedora-Cloud-Base-38-1.6.x86_64.qcow2",
+ "cdrom_image": "fedora-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "37-1.7",
+ "images": {
+ "hda_disk_image": "Fedora-Cloud-Base-37-1.7.x86_64.qcow2",
+ "cdrom_image": "fedora-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "36-1.5",
+ "images": {
+ "hda_disk_image": "Fedora-Cloud-Base-36-1.5.x86_64.qcow2",
+ "cdrom_image": "fedora-cloud-init-data.iso"
+ }
+ },
+ {
"name": "35-1.2",
"images": {
"hda_disk_image": "Fedora-Cloud-Base-35-1.2.x86_64.qcow2",
diff --git a/gns3server/appliances/firefox.gns3a b/gns3server/appliances/firefox.gns3a
index 14fe1ba4..8e43cfd6 100644
--- a/gns3server/appliances/firefox.gns3a
+++ b/gns3server/appliances/firefox.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://support.mozilla.org",
"product_name": "Firefox",
"product_url": "https://www.mozilla.org/firefox",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortiadc-manager.gns3a b/gns3server/appliances/fortiadc-manager.gns3a
index d1df156f..f87882a1 100644
--- a/gns3server/appliances/fortiadc-manager.gns3a
+++ b/gns3server/appliances/fortiadc-manager.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://docs.fortinet.com/fortiadc-manager/",
"product_name": "FortiADC Manager",
"product_url": "https://www.fortinet.com/products/application-delivery-controller/fortiadc.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortiadc.gns3a b/gns3server/appliances/fortiadc.gns3a
index dce76870..5996848c 100644
--- a/gns3server/appliances/fortiadc.gns3a
+++ b/gns3server/appliances/fortiadc.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/fortiadc-d-series/admin-guides",
"product_name": "FortiADC",
"product_url": "https://www.fortinet.com/products-services/products/application-delivery-controllers/fortiadc.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -34,6 +34,48 @@
"filesize": 30998528,
"download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
},
+ {
+ "filename": "FAD_KVM-V7.2.0-build0210-FORTINET.out.kvm-boot.qcow2",
+ "version": "7.2.0",
+ "md5sum": "e01f14443b0434adc803c482bb92e3a2",
+ "filesize": 145817600,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FAD_KVM-V7.1.1-build0117-FORTINET.out.kvm-boot.qcow2",
+ "version": "7.1.1",
+ "md5sum": "3ab1a886e4961ded804588de6f3b2e27",
+ "filesize": 134807552,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FAD_KVM-v700-build0111-FORTINET.out.kvm-boot.qcow2",
+ "version": "7.1.0",
+ "md5sum": "5977fe2e031dfa5759b7b2c9958eeb09",
+ "filesize": 134676480,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FAD_KVM-V7.0.5-build0053-FORTINET.out.kvm-boot.qcow2",
+ "version": "7.0.5",
+ "md5sum": "3285114b8f317a367b7bcf79631a42f9",
+ "filesize": 127860736,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FAD_KVM-v700-build0048-FORTINET.out.kvm-boot.qcow2",
+ "version": "7.0.4",
+ "md5sum": "ea3329a7e18085838c83436ee7a6e3f8",
+ "filesize": 127664128,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FAD_KVM-v600-build0237-FORTINET.out.kvm-boot.qcow2",
+ "version": "6.2.4",
+ "md5sum": "7cf30c1af4891e13b37e6a5c3933169f",
+ "filesize": 125304832,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FAD_KVM-V500-build0655-FORTINET.out.kvm-boot.qcow2",
"version": "5.3.3",
@@ -204,6 +246,48 @@
}
],
"versions": [
+ {
+ "name": "7.2.0",
+ "images": {
+ "hda_disk_image": "FAD_KVM-V7.2.0-build0210-FORTINET.out.kvm-boot.qcow2",
+ "hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
+ }
+ },
+ {
+ "name": "7.1.1",
+ "images": {
+ "hda_disk_image": "FAD_KVM-V7.1.1-build0117-FORTINET.out.kvm-boot.qcow2",
+ "hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
+ }
+ },
+ {
+ "name": "7.1.0",
+ "images": {
+ "hda_disk_image": "FAD_KVM-v700-build0111-FORTINET.out.kvm-boot.qcow2",
+ "hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
+ }
+ },
+ {
+ "name": "7.0.5",
+ "images": {
+ "hda_disk_image": "FAD_KVM-V7.0.5-build0053-FORTINET.out.kvm-boot.qcow2",
+ "hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
+ }
+ },
+ {
+ "name": "7.0.4",
+ "images": {
+ "hda_disk_image": "FAD_KVM-v700-build0048-FORTINET.out.kvm-boot.qcow2",
+ "hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
+ }
+ },
+ {
+ "name": "6.2.4",
+ "images": {
+ "hda_disk_image": "FAD_KVM-v600-build0237-FORTINET.out.kvm-boot.qcow2",
+ "hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
+ }
+ },
{
"name": "5.3.3",
"images": {
diff --git a/gns3server/appliances/fortianalyzer.gns3a b/gns3server/appliances/fortianalyzer.gns3a
index 4ff054c5..57f14c9b 100644
--- a/gns3server/appliances/fortianalyzer.gns3a
+++ b/gns3server/appliances/fortianalyzer.gns3a
@@ -8,11 +8,11 @@
"documentation_url": "http://docs.fortinet.com/fortianalyzer/",
"product_name": "FortiAnalyzer",
"product_url": "https://www.fortinet.com/products-services/products/management-reporting/fortianalyzer.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
- "usage": "Default username is admin, no password is set.",
+ "usage": "Default username is admin, no password is set.\n\n- Versions 7.0 and higher require:\n--RAM: 8192 MB\n--CPU:4",
"symbol": "fortinet.svg",
"port_name_format": "Port{port1}",
"qemu": {
@@ -27,6 +27,13 @@
"kvm": "allow"
},
"images": [
+ {
+ "filename": "FAZ_VM64_KVM-v7.2.2-build1334-FORTINET.out.kvm.qcow2",
+ "version": "7.2.2",
+ "md5sum": "fe445cc79eed00b3abcdba9c36e7445d",
+ "filesize": 345501696,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FAZ_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2",
"version": "7.2.1",
@@ -34,6 +41,13 @@
"filesize": 340631552,
"download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
},
+ {
+ "filename": "FAZ_VM64_KVM-v7.0.6-build0372-FORTINET.out.kvm.qcow2",
+ "version": "7.0.6",
+ "md5sum": "2e382abcf661c41c1a69178e9cdc5a3f",
+ "filesize": 335556608,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FAZ_VM64_KVM-v7.0.5-build0365-FORTINET.out.kvm.qcow2",
"version": "7.0.5",
@@ -191,6 +205,13 @@
}
],
"versions": [
+ {
+ "name": "7.2.2",
+ "images": {
+ "hda_disk_image": "FAZ_VM64_KVM-v7.2.2-build1334-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.2.1",
"images": {
@@ -198,6 +219,13 @@
"hdb_disk_image": "empty30G.qcow2"
}
},
+ {
+ "name": "7.0.6",
+ "images": {
+ "hda_disk_image": "FAZ_VM64_KVM-v7.0.6-build0372-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.0.5",
"images": {
diff --git a/gns3server/appliances/fortiauthenticator.gns3a b/gns3server/appliances/fortiauthenticator.gns3a
index f766ad96..24ec0f4b 100644
--- a/gns3server/appliances/fortiauthenticator.gns3a
+++ b/gns3server/appliances/fortiauthenticator.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/fortiauthenticator/admin-guides",
"product_name": "FortiAuthenticator",
"product_url": "https://www.fortinet.com/products/identity-access-management/fortiauthenticator.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/forticache.gns3a b/gns3server/appliances/forticache.gns3a
index b2a6d037..c41ae745 100644
--- a/gns3server/appliances/forticache.gns3a
+++ b/gns3server/appliances/forticache.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/forticache/admin-guides",
"product_name": "FortiCache",
"product_url": "https://www.fortinet.com/products-services/products/wan-appliances/forticache.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortigate.gns3a b/gns3server/appliances/fortigate.gns3a
index 9e48f232..c730d176 100644
--- a/gns3server/appliances/fortigate.gns3a
+++ b/gns3server/appliances/fortigate.gns3a
@@ -8,11 +8,11 @@
"documentation_url": "http://docs.fortinet.com/p/inside-fortios",
"product_name": "FortiGate",
"product_url": "http://www.fortinet.com/products/fortigate/virtual-appliances.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
- "usage": "Default username is admin, no password is set.",
+ "usage": "Default username is admin, no password is set.\n\n- FortiGate version 7.0.0 and above require 2GB RAM.\n\n- FortiGate versions higher than 7.2.0 trial license is VERY restrictive, not recommended for use.",
"symbol": "fortinet.svg",
"port_name_format": "Port{port1}",
"qemu": {
@@ -27,6 +27,13 @@
"kvm": "allow"
},
"images": [
+ {
+ "filename": "FGT_VM64_KVM-v7.2.4.F-build1396-FORTINET.out.kvm.qcow2",
+ "version": "7.2.4",
+ "md5sum": "e3bd5958ff3d4f9363152c340e9b9578",
+ "filesize": 95158272,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FGT_VM64_KVM-v7.2.3.F-build1262-FORTINET.out.kvm.qcow2",
"version": "7.2.3",
@@ -41,6 +48,13 @@
"filesize": 86704128,
"download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
},
+ {
+ "filename": "FGT_VM64_KVM-v7.0.10.M-build0450-FORTINET.out.kvm.qcow2",
+ "version": "7.0.10",
+ "md5sum": "c7eb9fad8484405aa5bd8a4dd9e67722",
+ "filesize": 77135872,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FGT_VM64_KVM-v7.0.9.M-build0444-FORTINET.out.kvm.qcow2",
"version": "7.0.9",
@@ -48,6 +62,13 @@
"filesize": 77135872,
"download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
},
+ {
+ "filename": "FGT_VM64_KVM-v6.4.12.M-build2060-FORTINET.out.kvm.qcow2",
+ "version": "6.4.12",
+ "md5sum": "df2569f9fa3e40b65fa0db741cf6e01e",
+ "filesize": 69861376,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FGT_VM64_KVM-v6.M-build2030-FORTINET.out.kvm.qcow2",
"version": "6.4.11",
@@ -282,6 +303,13 @@
}
],
"versions": [
+ {
+ "name": "7.2.4",
+ "images": {
+ "hda_disk_image": "FGT_VM64_KVM-v7.2.4.F-build1396-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.2.3",
"images": {
@@ -296,6 +324,13 @@
"hdb_disk_image": "empty30G.qcow2"
}
},
+ {
+ "name": "7.0.10",
+ "images": {
+ "hda_disk_image": "FGT_VM64_KVM-v7.0.10.M-build0450-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.0.9",
"images": {
@@ -303,6 +338,13 @@
"hdb_disk_image": "empty30G.qcow2"
}
},
+ {
+ "name": "6.4.12",
+ "images": {
+ "hda_disk_image": "FGT_VM64_KVM-v6.4.12.M-build2060-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "6.4.11",
"images": {
diff --git a/gns3server/appliances/fortimail.gns3a b/gns3server/appliances/fortimail.gns3a
index 4d5cf111..774b17b5 100644
--- a/gns3server/appliances/fortimail.gns3a
+++ b/gns3server/appliances/fortimail.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/fortimail/admin-guides",
"product_name": "FortiMail",
"product_url": "http://www.fortinet.com/products/fortimail/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -27,6 +27,13 @@
"kvm": "allow"
},
"images": [
+ {
+ "filename": "FML_VMKV-64-v722.M-build0380-FORTINET.out.kvm.qcow2",
+ "version": "7.2.2",
+ "md5sum": "ec7c32c90f4cfba32a744ea74adc596b",
+ "filesize": 124387328,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FML_VMKV-64-v721.M-build0364-FORTINET.out.kvm.qcow2",
"version": "7.2.1",
@@ -34,6 +41,20 @@
"filesize": 123535360,
"download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
},
+ {
+ "filename": "FML_VMKV-64-v705-build0208-FORTINET.out.kvm.qcow2",
+ "version": "7.0.5",
+ "md5sum": "62e561465ff8134efdea6f66ba9ccf20",
+ "filesize": 118226944,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FML_VMKV-64-v647-build0467-FORTINET.out.kvm.qcow2",
+ "version": "6.4.7",
+ "md5sum": "11fab90b39d88446a711bbd01802aca1",
+ "filesize": 112066560,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FML_VMKV-64-v60-build0257-FORTINET.out.kvm.qcow2",
"version": "6.2.1",
@@ -191,6 +212,13 @@
}
],
"versions": [
+ {
+ "name": "7.2.2",
+ "images": {
+ "hda_disk_image": "FML_VMKV-64-v722.M-build0380-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.2.1",
"images": {
@@ -198,6 +226,20 @@
"hdb_disk_image": "empty30G.qcow2"
}
},
+ {
+ "name": "7.0.5",
+ "images": {
+ "hda_disk_image": "FML_VMKV-64-v705-build0208-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
+ {
+ "name": "6.4.7",
+ "images": {
+ "hda_disk_image": "FML_VMKV-64-v647-build0467-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "6.2.1",
"images": {
diff --git a/gns3server/appliances/fortimanager.gns3a b/gns3server/appliances/fortimanager.gns3a
index faf00d78..a8333452 100644
--- a/gns3server/appliances/fortimanager.gns3a
+++ b/gns3server/appliances/fortimanager.gns3a
@@ -8,11 +8,11 @@
"documentation_url": "http://docs.fortinet.com/p/inside-fortios",
"product_name": "FortiManager",
"product_url": "http://www.fortinet.com/products/fortimanager/virtual-security-management.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
- "usage": "Default username is admin, no password is set.",
+ "usage": "Default username is admin, no password is set.\n\n- Versions 7.0 and higher require:\n--RAM: 8192 MB\n--CPU:4",
"symbol": "fortinet.svg",
"port_name_format": "Port{port1}",
"qemu": {
@@ -27,6 +27,13 @@
"kvm": "allow"
},
"images": [
+ {
+ "filename": "FMG_VM64_KVM-v7.2.2-build1334-FORTINET.out.kvm.qcow2",
+ "version": "7.2.2",
+ "md5sum": "2ff1298257321cd485d2cad91d6ce510",
+ "filesize": 246083584,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FMG_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2",
"version": "7.2.1",
@@ -34,6 +41,13 @@
"filesize": 242814976,
"download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
},
+ {
+ "filename": "FMG_VM64_KVM-v7.0.6-build0372-FORTINET.out.kvm.qcow2",
+ "version": "7.0.6",
+ "md5sum": "dfa4df9e976ed87e73cb9601a8a70323",
+ "filesize": 239190016,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FMG_VM64_KVM-v7.0.5-build0365-FORTINET.out.kvm.qcow2",
"version": "7.0.5",
@@ -191,6 +205,13 @@
}
],
"versions": [
+ {
+ "name": "7.2.2",
+ "images": {
+ "hda_disk_image": "FMG_VM64_KVM-v7.2.2-build1334-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.2.1",
"images": {
@@ -198,6 +219,13 @@
"hdb_disk_image": "empty30G.qcow2"
}
},
+ {
+ "name": "7.0.6",
+ "images": {
+ "hda_disk_image": "FMG_VM64_KVM-v7.0.6-build0372-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.0.5",
"images": {
diff --git a/gns3server/appliances/fortiproxy.gns3a b/gns3server/appliances/fortiproxy.gns3a
index a03f9cce..4782f4c1 100644
--- a/gns3server/appliances/fortiproxy.gns3a
+++ b/gns3server/appliances/fortiproxy.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://docs.fortinet.com/fortiproxy/",
"product_name": "FortiProxy",
"product_url": "https://www.fortinet.com/content/dam/fortinet/assets/data-sheets/FortiProxy.pdf",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortirecorder.gns3a b/gns3server/appliances/fortirecorder.gns3a
index 9a1331d8..e38aff3f 100644
--- a/gns3server/appliances/fortirecorder.gns3a
+++ b/gns3server/appliances/fortirecorder.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://docs.fortinet.com/fortirecorder/",
"product_name": "FortiRecorder",
"product_url": "https://www.fortinet.com/products/network-based-video-security/forticam-fortirecorder.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortisandbox.gns3a b/gns3server/appliances/fortisandbox.gns3a
index 6fa98c51..7173fba2 100644
--- a/gns3server/appliances/fortisandbox.gns3a
+++ b/gns3server/appliances/fortisandbox.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/fortisandbox/admin-guides",
"product_name": "FortiSandbox",
"product_url": "https://www.fortinet.com/products/sandbox/fortisandbox.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortisiem-super_worker.gns3a b/gns3server/appliances/fortisiem-super_worker.gns3a
index 92c345d3..4500c4bf 100644
--- a/gns3server/appliances/fortisiem-super_worker.gns3a
+++ b/gns3server/appliances/fortisiem-super_worker.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/fortisiem/admin-guides",
"product_name": "FortiSIEM",
"product_url": "https://www.fortinet.com/products/siem/fortisiem.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/fortiweb.gns3a b/gns3server/appliances/fortiweb.gns3a
index 6a39036d..451ce1dc 100644
--- a/gns3server/appliances/fortiweb.gns3a
+++ b/gns3server/appliances/fortiweb.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://docs.fortinet.com/fortiweb",
"product_name": "FortiWeb",
"product_url": "http://www.fortinet.com/products/fortiweb/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -27,6 +27,27 @@
"kvm": "allow"
},
"images": [
+ {
+ "filename": "FWB_KVM-v7.2.1-build0330-FORTINET.out.kvm.boot.qcow2",
+ "version": "7.2.1",
+ "md5sum": "5806524ca31401c313e0e86e992b6659",
+ "filesize": 260506112,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FWB_KVM-v7.0.6-build0140-FORTINET.out.kvm.boot.qcow2",
+ "version": "7.0.6",
+ "md5sum": "1327019e891678a0f2fb9602086d998d",
+ "filesize": 258408960,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
+ {
+ "filename": "FWB_KVM-v700-build0129-FORTINET.out.kvm.qcow2",
+ "version": "7.0.5",
+ "md5sum": "dc14114c68cf42df322e5b89bffd9bf7",
+ "filesize": 258146816,
+ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx"
+ },
{
"filename": "FWB_KVM-v700-build0097-FORTINET.out.kvm.qcow2",
"version": "7.0.1",
@@ -128,6 +149,27 @@
}
],
"versions": [
+ {
+ "name": "7.2.1",
+ "images": {
+ "hda_disk_image": "FWB_KVM-v7.2.1-build0330-FORTINET.out.kvm.boot.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
+ {
+ "name": "7.0.6",
+ "images": {
+ "hda_disk_image": "FWB_KVM-v7.0.6-build0140-FORTINET.out.kvm.boot.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
+ {
+ "name": "7.0.5",
+ "images": {
+ "hda_disk_image": "FWB_KVM-v700-build0129-FORTINET.out.kvm.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
{
"name": "7.0.1",
"images": {
diff --git a/gns3server/appliances/freeRouter.gns3a b/gns3server/appliances/freeRouter.gns3a
index cc9b887b..ca53df88 100644
--- a/gns3server/appliances/freeRouter.gns3a
+++ b/gns3server/appliances/freeRouter.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://freerouter.nop.hu/",
"product_name": "freeRouter",
"product_url": "http://freerouter.nop.hu/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/freebsd.gns3a b/gns3server/appliances/freebsd.gns3a
index f05f2986..ad1821d5 100644
--- a/gns3server/appliances/freebsd.gns3a
+++ b/gns3server/appliances/freebsd.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.freebsd.org",
"documentation_url": "https://www.freebsd.org/docs.html",
"product_name": "FreeBSD",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/freenas.gns3a b/gns3server/appliances/freenas.gns3a
index 5d2a684a..55567d4a 100644
--- a/gns3server/appliances/freenas.gns3a
+++ b/gns3server/appliances/freenas.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://doc.freenas.org/9.10/freenas.html",
"product_name": "FreeNAS",
"product_url": "http://www.openfiler.com/products",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/frr.gns3a b/gns3server/appliances/frr.gns3a
index fc2ab658..0ab9a66a 100644
--- a/gns3server/appliances/frr.gns3a
+++ b/gns3server/appliances/frr.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "FRRouting Project",
"vendor_url": "https://frrouting.org",
"product_name": "FRR",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/haproxy.gns3a b/gns3server/appliances/haproxy.gns3a
new file mode 100644
index 00000000..3aa86a1e
--- /dev/null
+++ b/gns3server/appliances/haproxy.gns3a
@@ -0,0 +1,18 @@
+{
+ "appliance_id": "79df483d-8cc9-48de-85ea-e6cb45b93e2a",
+ "name": "haproxy",
+ "category": "guest",
+ "description": "haproxy alpine container",
+ "vendor_name": "haproxy",
+ "vendor_url": "https://www.haproxy.org",
+ "product_name": "haproxy",
+ "registry_version": 4,
+ "status": "experimental",
+ "maintainer": "GNS3 Team",
+ "maintainer_email": "developers@gns3.net",
+ "usage": "Modify /etc/haproxy/haproxy.cfg to suit your needs.",
+ "docker": {
+ "adapters": 1,
+ "image": "gns3/haproxy:latest"
+ }
+}
diff --git a/gns3server/appliances/hp-vsr1001.gns3a b/gns3server/appliances/hp-vsr1001.gns3a
index 015eb771..ccbc2c9c 100644
--- a/gns3server/appliances/hp-vsr1001.gns3a
+++ b/gns3server/appliances/hp-vsr1001.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://support.hpe.com/hpesc/public/home/documentHome?document_type=135&sp4ts.oid=5195141",
"product_name": "VSR1001",
"product_url": "https://www.hpe.com/us/en/product-catalog/networking/networking-routers/pip.hpe-flexnetwork-vsr1000-virtual-services-router-series.5443163.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/huawei-ar1kv.gns3a b/gns3server/appliances/huawei-ar1kv.gns3a
index f98698a7..ea556578 100644
--- a/gns3server/appliances/huawei-ar1kv.gns3a
+++ b/gns3server/appliances/huawei-ar1kv.gns3a
@@ -26,7 +26,7 @@
"options": "-machine type=pc,accel=kvm -vga std -usbdevice tablet -cpu host"
},
"images": [
- {
+ {
"filename": "huaweiar1k-5.170-V300R021C00SPC100T-Auto-update-esn.qcow2",
"version": "V300R021C00SPC100T",
"md5sum": "9d98b31d400a94af37b5af6e9cfe8d80",
@@ -40,10 +40,9 @@
"filesize": 534904832,
"download_url": "https://support.huawei.com/enterprise/en/routers/ar1000v-pid-21768212/software"
}
-
],
"versions": [
- {
+ {
"name": "V300R021C00SPC100T",
"images": {
"hda_disk_image": "huaweiar1k-5.170-V300R021C00SPC100T-Auto-update-esn.qcow2"
@@ -55,6 +54,5 @@
"hda_disk_image": "ar1k-V300R019C00SPC300.qcow2"
}
}
-
]
}
diff --git a/gns3server/appliances/huawei-ce12800.gns3a b/gns3server/appliances/huawei-ce12800.gns3a
index 8626d8cb..8d05abeb 100644
--- a/gns3server/appliances/huawei-ce12800.gns3a
+++ b/gns3server/appliances/huawei-ce12800.gns3a
@@ -21,7 +21,7 @@
"arch": "x86_64",
"console_type": "telnet",
"kvm": "require",
- "options": "-machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host"
+ "options": "-machine type=pc,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host"
},
"images": [
{
diff --git a/gns3server/appliances/huawei-ne40e.gns3a b/gns3server/appliances/huawei-ne40e.gns3a
index 4248f204..1e7f89d6 100644
--- a/gns3server/appliances/huawei-ne40e.gns3a
+++ b/gns3server/appliances/huawei-ne40e.gns3a
@@ -23,7 +23,7 @@
"arch": "x86_64",
"console_type": "telnet",
"kvm": "require",
- "options": "-machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host"
+ "options": "-machine type=pc,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host"
},
"images": [
{
diff --git a/gns3server/appliances/internet.gns3a b/gns3server/appliances/internet.gns3a
deleted file mode 100644
index 489d35ce..00000000
--- a/gns3server/appliances/internet.gns3a
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "appliance_id": "f8302832-ad07-47e2-a750-004f700bd47c",
- "name": "Internet",
- "category": "router",
- "description": "This appliance simulate a domestic modem. It provide an IP via DHCP and will nat all connection to the internet without the need of using a cloud interface in your topologies. IP will be in the subnet 172.16.0.0/16. Multiple internet will have different IP range from 172.16.1.0/24 to 172.16.253.0/24 .\n\nWARNING USE IT ONLY WITH THE GNS3 VM.",
- "vendor_name": "GNS3",
- "vendor_url": "http://www.gns3.com",
- "documentation_url": "http://www.gns3.com",
- "product_name": "Internet",
- "registry_version": 3,
- "status": "stable",
- "maintainer": "GNS3 Team",
- "maintainer_email": "developers@gns3.net",
- "usage": "Just connect stuff to the appliance. Everything is automated.",
- "symbol": ":/symbols/cloud.svg",
- "qemu": {
- "adapter_type": "e1000",
- "adapters": 1,
- "ram": 64,
- "hda_disk_interface": "ide",
- "arch": "i386",
- "console_type": "telnet",
- "kvm": "allow",
- "options": "-device e1000,netdev=internet0 -netdev vde,sock=/var/run/vde2/qemu0.ctl,id=internet0"
- },
- "images": [
- {
- "filename": "core-linux-6.4-internet-0.1.img",
- "version": "0.1",
- "md5sum": "8ebc5a6ec53a1c05b7aa101b5ceefe31",
- "filesize": 16711680,
- "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
- "direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/core-linux-6.4-internet-0.1.img"
- }
- ],
- "versions": [
- {
- "name": "0.1",
- "images": {
- "hda_disk_image": "core-linux-6.4-internet-0.1.img"
- }
- }
- ]
-}
diff --git a/gns3server/appliances/ipfire.gns3a b/gns3server/appliances/ipfire.gns3a
index 07610b57..fd86dd88 100644
--- a/gns3server/appliances/ipfire.gns3a
+++ b/gns3server/appliances/ipfire.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.ipfire.org/en/start",
"product_name": "IPFire",
"product_url": "http://www.ipfire.org/features",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/ipterm.gns3a b/gns3server/appliances/ipterm.gns3a
index be1875ab..45b108fb 100644
--- a/gns3server/appliances/ipterm.gns3a
+++ b/gns3server/appliances/ipterm.gns3a
@@ -6,10 +6,10 @@
"vendor_name": "ipterm",
"vendor_url": "https://www.debian.org",
"product_name": "ipterm",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
- "maintainer": "GNS3 Team",
- "maintainer_email": "developers@gns3.net",
+ "maintainer": "Bernhard Ehlers",
+ "maintainer_email": "dev-ehlers@mailbox.org",
"usage": "The /root directory is persistent.",
"symbol": "linux_guest.svg",
"docker": {
diff --git a/gns3server/appliances/ipxe.gns3a b/gns3server/appliances/ipxe.gns3a
index ad4af414..e4fe2e9b 100644
--- a/gns3server/appliances/ipxe.gns3a
+++ b/gns3server/appliances/ipxe.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://ipxe.org",
"product_name": "iPXE netboot",
"product_url": "http://ipxe.org/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/juniper-junos-space.gns3a b/gns3server/appliances/juniper-junos-space.gns3a
index ea462c32..c333c349 100644
--- a/gns3server/appliances/juniper-junos-space.gns3a
+++ b/gns3server/appliances/juniper-junos-space.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.juniper.net/techpubs/",
"product_name": "Junos Space",
"product_url": "https://www.juniper.net/us/en/dm/free-vqfx-trial/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/juniper-vmx-vcp.gns3a b/gns3server/appliances/juniper-vmx-vcp.gns3a
index 6a94a9fb..089f4dce 100644
--- a/gns3server/appliances/juniper-vmx-vcp.gns3a
+++ b/gns3server/appliances/juniper-vmx-vcp.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.juniper.net/techpubs/",
"product_name": "Juniper vMX vCP",
"product_url": "https://www.juniper.net/us/en/products/routers/mx-series/vmx-virtual-router-software.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "none",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/juniper-vmx-vfp.gns3a b/gns3server/appliances/juniper-vmx-vfp.gns3a
index 11708d3c..dba3ee1e 100644
--- a/gns3server/appliances/juniper-vmx-vfp.gns3a
+++ b/gns3server/appliances/juniper-vmx-vfp.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.juniper.net/techpubs/",
"product_name": "Juniper vMX vFP",
"product_url": "http://www.juniper.net/us/en/products-services/routing/mx-series/vmx/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "none",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/juniper-vqfx-pfe.gns3a b/gns3server/appliances/juniper-vqfx-pfe.gns3a
index b605c22e..23cacef5 100644
--- a/gns3server/appliances/juniper-vqfx-pfe.gns3a
+++ b/gns3server/appliances/juniper-vqfx-pfe.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.juniper.net/techpubs/",
"product_name": "Juniper vQFX PFE",
"product_url": "https://www.juniper.net/us/en/dm/free-vqfx-trial/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "none",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/juniper-vqfx-re.gns3a b/gns3server/appliances/juniper-vqfx-re.gns3a
index 4235c280..b47c34d5 100644
--- a/gns3server/appliances/juniper-vqfx-re.gns3a
+++ b/gns3server/appliances/juniper-vqfx-re.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.juniper.net/techpubs/",
"product_name": "Juniper vQFX RE",
"product_url": "https://www.juniper.net/us/en/dm/free-vqfx-trial/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "none",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/juniper-vrr.gns3a b/gns3server/appliances/juniper-vrr.gns3a
index acfe6a9c..8c447a26 100644
--- a/gns3server/appliances/juniper-vrr.gns3a
+++ b/gns3server/appliances/juniper-vrr.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.juniper.net/documentation/product/en_US/virtual-route-reflector",
"product_name": "Juniper vRR",
"product_url": "https://www.juniper.net/us/en/products-services/nos/junos/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "none",
"maintainer_email": "developers@gns3.net",
@@ -34,12 +34,6 @@
"md5sum": "69638ba0ad83d7a99a28b658b1dd8def",
"filesize": 2773090304
},
- {
- "filename": "metadata.img",
- "version": "20.4R3.8-KVM",
- "md5sum": "ae4e3562aa389929476d82420c79d511",
- "filesize": 393216
- },
{
"filename": "junos-x86-64-20.3R1.8.img",
"version": "20.3R1.8-KVM",
@@ -48,7 +42,7 @@
},
{
"filename": "metadata.img",
- "version": "20.3R1.8-KVM",
+ "version": "1",
"md5sum": "ae4e3562aa389929476d82420c79d511",
"filesize": 393216
}
diff --git a/gns3server/appliances/juniper-vsrx.gns3a b/gns3server/appliances/juniper-vsrx.gns3a
index d78ed8a2..bd13122d 100644
--- a/gns3server/appliances/juniper-vsrx.gns3a
+++ b/gns3server/appliances/juniper-vsrx.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.juniper.net/techpubs/",
"product_name": "Juniper vSRX",
"product_url": "https://www.juniper.net/us/en/products-services/security/srx-series/vsrx/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -26,6 +26,13 @@
"options": "-smp 2"
},
"images": [
+ {
+ "filename": "junos-vsrx3-x86-64-21.2R3-S4.8.qcow2",
+ "version": "21.2R3-S4",
+ "md5sum": "18fdcbfe0acbc935b4f677b4be7e228d",
+ "filesize": 762773504,
+ "download_url": "https://www.juniper.net/us/en/dm/free-vsrx-trial/"
+ },
{
"filename": "junos-media-vsrx-x86-64-vmdisk-20.4R1.12.qcow2",
"version": "20.4R1",
@@ -182,6 +189,12 @@
}
],
"versions": [
+ {
+ "name": "21.2R3-S4",
+ "images": {
+ "hda_disk_image": "junos-vsrx3-x86-64-21.2R3-S4.8.qcow2"
+ }
+ },
{
"name": "20.4R1",
"images": {
diff --git a/gns3server/appliances/jupyter.gns3a b/gns3server/appliances/jupyter.gns3a
index 3ba8b88a..0e16d1aa 100644
--- a/gns3server/appliances/jupyter.gns3a
+++ b/gns3server/appliances/jupyter.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Project Jupyter",
"vendor_url": "http://jupyter.org/",
"product_name": "Jupyter",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/jupyter27.gns3a b/gns3server/appliances/jupyter27.gns3a
index 30ac7a14..ce10ebbd 100644
--- a/gns3server/appliances/jupyter27.gns3a
+++ b/gns3server/appliances/jupyter27.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Project Jupyter",
"vendor_url": "http://jupyter.org/",
"product_name": "Jupyter",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/kali-linux-cli.gns3a b/gns3server/appliances/kali-linux-cli.gns3a
index 89585cac..028446b5 100644
--- a/gns3server/appliances/kali-linux-cli.gns3a
+++ b/gns3server/appliances/kali-linux-cli.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://www.kali.org/",
"documentation_url": "https://www.kali.org/kali-linux-documentation/",
"product_name": "Kali Linux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/kali-linux.gns3a b/gns3server/appliances/kali-linux.gns3a
index c5ad4112..5452ec05 100644
--- a/gns3server/appliances/kali-linux.gns3a
+++ b/gns3server/appliances/kali-linux.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://www.kali.org/",
"documentation_url": "https://www.kali.org/kali-linux-documentation/",
"product_name": "Kali Linux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/kemp-vlm.gns3a b/gns3server/appliances/kemp-vlm.gns3a
index 0f02a734..eeacce77 100644
--- a/gns3server/appliances/kemp-vlm.gns3a
+++ b/gns3server/appliances/kemp-vlm.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://support.kemptechnologies.com/hc/en-us/articles/204427785",
"product_name": "KEMP Free VLM",
"product_url": "http://freeloadbalancer.com/#about",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/kerio-connect.gns3a b/gns3server/appliances/kerio-connect.gns3a
index d7e9bb0e..0e9f168e 100644
--- a/gns3server/appliances/kerio-connect.gns3a
+++ b/gns3server/appliances/kerio-connect.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://kb.kerio.com/product/kerio-connect/",
"product_name": "Kerio Connect",
"product_url": "http://www.kerio.com/products/kerio-connect",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/kerio-control.gns3a b/gns3server/appliances/kerio-control.gns3a
index baaf2b39..440a0a46 100644
--- a/gns3server/appliances/kerio-control.gns3a
+++ b/gns3server/appliances/kerio-control.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://kb.kerio.com/product/kerio-control/",
"product_name": "Kerio Control",
"product_url": "http://www.kerio.com/products/kerio-control",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/kerio-operator.gns3a b/gns3server/appliances/kerio-operator.gns3a
index 83d68701..3733c12b 100644
--- a/gns3server/appliances/kerio-operator.gns3a
+++ b/gns3server/appliances/kerio-operator.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://kb.kerio.com/product/kerio-operator/",
"product_name": "Kerio Operator",
"product_url": "http://www.kerio.com/products/kerio-operator",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/loadbalancer_org-va.gns3a b/gns3server/appliances/loadbalancer_org-va.gns3a
index c8479f65..3dd59b3a 100644
--- a/gns3server/appliances/loadbalancer_org-va.gns3a
+++ b/gns3server/appliances/loadbalancer_org-va.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://loadbalancer.org/support/support-resources",
"product_name": "Loadbalancer.org Enterprise VA",
"product_url": "https://loadbalancer.org/products/virtual",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/mcjoin.gns3a b/gns3server/appliances/mcjoin.gns3a
index d99ff3ff..8e936994 100644
--- a/gns3server/appliances/mcjoin.gns3a
+++ b/gns3server/appliances/mcjoin.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Joachim Nilsson",
"vendor_url": "https://github.com/troglobit",
"product_name": "mcjoin",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/microcore-linux.gns3a b/gns3server/appliances/microcore-linux.gns3a
index 0085a680..a7507164 100644
--- a/gns3server/appliances/microcore-linux.gns3a
+++ b/gns3server/appliances/microcore-linux.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.tinycorelinux.net/",
"product_name": "Micro Core Linux",
"product_url": "http://distro.ibiblio.org/tinycorelinux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/mikrotik-ccr1036-8g-2s+.gns3a b/gns3server/appliances/mikrotik-ccr1036-8g-2s+.gns3a
new file mode 100644
index 00000000..737c22e7
--- /dev/null
+++ b/gns3server/appliances/mikrotik-ccr1036-8g-2s+.gns3a
@@ -0,0 +1,165 @@
+{
+ "appliance_id": "cec3cf6f-36c1-4a15-9fe0-4e88b5f3bffa",
+ "name": "MikroTik CCR1036-8G-2S+",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the CCR1036-8G-2S+ model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik CCR1036-8G-2S+",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 10,
+ "ram": 8192,
+ "cpus": 36,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 8,
+ "port_name": "sfp-sfpplus1"
+ },
+ {
+ "adapter_number": 9,
+ "port_name": "sfp-sfpplus2"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-ccr1072-1g-8s+.gns3a b/gns3server/appliances/mikrotik-ccr1072-1g-8s+.gns3a
new file mode 100644
index 00000000..069c7cab
--- /dev/null
+++ b/gns3server/appliances/mikrotik-ccr1072-1g-8s+.gns3a
@@ -0,0 +1,161 @@
+{
+ "appliance_id": "b7023032-61e9-4ca6-a36d-f917cfc498b4",
+ "name": "MikroTik CCR1072-1G-8S+",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the CCR1072-1G-8S+ model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik CCR1072-1G-8S+",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "sfp-sfpplus{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 9,
+ "ram": 16384,
+ "cpus": 72,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 8,
+ "port_name": "ether1"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-chr.gns3a b/gns3server/appliances/mikrotik-chr.gns3a
index 69092601..b3970598 100644
--- a/gns3server/appliances/mikrotik-chr.gns3a
+++ b/gns3server/appliances/mikrotik-chr.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
"product_name": "MikroTik Cloud Hosted Router",
"product_url": "http://www.mikrotik.com/download",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -17,8 +17,8 @@
"port_name_format": "ether{port1}",
"qemu": {
"adapter_type": "virtio-net-pci",
- "adapters": 2,
- "ram": 128,
+ "adapters": 8,
+ "ram": 384,
"hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
@@ -28,12 +28,30 @@
},
"images": [
{
- "filename": "chr-7.4rc2.img",
- "version": "7.4rc2",
- "md5sum": "ddb107c95cc7d231f8d8bbdb4eebdab6",
+ "filename": "chr-7.10.1.img",
+ "version": "7.10.1",
+ "md5sum": "917729e79b9992562f4160d461b21cac",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
- "direct_download_url": "https://download.mikrotik.com/routeros/7.4rc2/chr-7.4rc2.img.zip",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.10.1/chr-7.10.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
"compression": "zip"
},
{
@@ -75,9 +93,21 @@
],
"versions": [
{
- "name": "7.4rc2",
+ "name": "7.10.1",
"images": {
- "hda_disk_image": "chr-7.4rc2.img"
+ "hda_disk_image": "chr-7.10.1.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
}
},
{
@@ -105,4 +135,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/gns3server/appliances/mikrotik-crs328-24p-4s+.gns3a b/gns3server/appliances/mikrotik-crs328-24p-4s+.gns3a
new file mode 100644
index 00000000..f27b59d5
--- /dev/null
+++ b/gns3server/appliances/mikrotik-crs328-24p-4s+.gns3a
@@ -0,0 +1,173 @@
+{
+ "appliance_id": "5b583e53-197c-4ec1-a153-df9405320eec",
+ "name": "MikroTik CRS328-24P-4S+",
+ "category": "multilayer_switch",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the CRS328-24P-4S+ model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik CRS328-24P-4S+",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/multilayer_switch.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 28,
+ "ram": 512,
+ "cpus": 1,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 24,
+ "port_name": "sfp-sfpplus1"
+ },
+ {
+ "adapter_number": 25,
+ "port_name": "sfp-sfpplus2"
+ },
+ {
+ "adapter_number": 26,
+ "port_name": "sfp-sfpplus3"
+ },
+ {
+ "adapter_number": 27,
+ "port_name": "sfp-sfpplus4"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-crs328-4c-20s-4s+.gns3a b/gns3server/appliances/mikrotik-crs328-4c-20s-4s+.gns3a
new file mode 100644
index 00000000..f484f81f
--- /dev/null
+++ b/gns3server/appliances/mikrotik-crs328-4c-20s-4s+.gns3a
@@ -0,0 +1,189 @@
+{
+ "appliance_id": "8d94af97-7e2f-4d8f-8ad7-49f48107c8ce",
+ "name": "MikroTik CRS328-4C-20S-4S+",
+ "category": "multilayer_switch",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the CRS328-4C-20S-4S+ model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik CRS328-4C-20S-4S+",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/multilayer_switch.svg",
+ "port_name_format": "sfp{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 28,
+ "ram": 512,
+ "cpus": 1,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 20,
+ "port_name": "combo1"
+ },
+ {
+ "adapter_number": 21,
+ "port_name": "combo2"
+ },
+ {
+ "adapter_number": 22,
+ "port_name": "combo3"
+ },
+ {
+ "adapter_number": 23,
+ "port_name": "combo4"
+ },
+ {
+ "adapter_number": 24,
+ "port_name": "sfp-sfpplus1"
+ },
+ {
+ "adapter_number": 25,
+ "port_name": "sfp-sfpplus2"
+ },
+ {
+ "adapter_number": 26,
+ "port_name": "sfp-sfpplus3"
+ },
+ {
+ "adapter_number": 27,
+ "port_name": "sfp-sfpplus4"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-rb1100ahx4-dude-edition.gns3a b/gns3server/appliances/mikrotik-rb1100ahx4-dude-edition.gns3a
new file mode 100644
index 00000000..247943fb
--- /dev/null
+++ b/gns3server/appliances/mikrotik-rb1100ahx4-dude-edition.gns3a
@@ -0,0 +1,155 @@
+{
+ "appliance_id": "d88d159f-ac6e-41ba-83a4-88e91548131e",
+ "name": "MikroTik RB1100AHx4 Dude Edition",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the RB1100AHx4 Dude Edition model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik RouterBOARD 1100AHx4 Dude Edition",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 5,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 13,
+ "ram": 1024,
+ "cpus": 4,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal"
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-rb2011uias.gns3a b/gns3server/appliances/mikrotik-rb2011uias.gns3a
new file mode 100644
index 00000000..cd8ee564
--- /dev/null
+++ b/gns3server/appliances/mikrotik-rb2011uias.gns3a
@@ -0,0 +1,161 @@
+{
+ "appliance_id": "475336ed-cd52-4ed8-9ef1-db9a81e2e0ce",
+ "name": "MikroTik RB2011UiAS",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the RB2011UiAS model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik RouterBOARD 2011UiAS",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 11,
+ "ram": 128,
+ "cpus": 1,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 10,
+ "port_name": "sfp1"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-rb3011uias.gns3a b/gns3server/appliances/mikrotik-rb3011uias.gns3a
new file mode 100644
index 00000000..5726df55
--- /dev/null
+++ b/gns3server/appliances/mikrotik-rb3011uias.gns3a
@@ -0,0 +1,161 @@
+{
+ "appliance_id": "363f3e40-569b-445a-83fc-0e25bfc9c3ff",
+ "name": "MikroTik RB3011UiAS",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the RB3011UiAS model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik RouterBOARD 3011UiAS",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 11,
+ "ram": 1024,
+ "cpus": 2,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 10,
+ "port_name": "sfp1"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-rb4011igs+.gns3a b/gns3server/appliances/mikrotik-rb4011igs+.gns3a
new file mode 100644
index 00000000..7c0c8021
--- /dev/null
+++ b/gns3server/appliances/mikrotik-rb4011igs+.gns3a
@@ -0,0 +1,161 @@
+{
+ "appliance_id": "014c6b0b-0558-4120-a7f1-d20d4d92b073",
+ "name": "MikroTik RB4011iGS+",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the RB4011iGS+ model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik RouterBOARD 4011iGS+",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 6,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 9,
+ "ram": 1024,
+ "cpus": 4,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal",
+ "custom_adapters": [
+ {
+ "adapter_number": 8,
+ "port_name": "sfp-sfpplus1"
+ }
+ ]
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-rb450g.gns3a b/gns3server/appliances/mikrotik-rb450g.gns3a
new file mode 100644
index 00000000..b547386b
--- /dev/null
+++ b/gns3server/appliances/mikrotik-rb450g.gns3a
@@ -0,0 +1,155 @@
+{
+ "appliance_id": "e2d71a59-6b15-495d-9dd5-67f56072ee32",
+ "name": "MikroTik RB450G",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the RB450G model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik RouterBOARD 450G",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 5,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 5,
+ "ram": 256,
+ "cpus": 1,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal"
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-rb450gx4.gns3a b/gns3server/appliances/mikrotik-rb450gx4.gns3a
new file mode 100644
index 00000000..385d412e
--- /dev/null
+++ b/gns3server/appliances/mikrotik-rb450gx4.gns3a
@@ -0,0 +1,155 @@
+{
+ "appliance_id": "aa26d321-415c-46ee-b3e9-3bc04dd96423",
+ "name": "MikroTik RB450Gx4",
+ "category": "router",
+ "description": "This is a variation of Cloud Hosted Router (CHR) which is meant to mimic the basic hardware configuration of the RB450Gx4 model.",
+ "vendor_name": "MikroTik",
+ "vendor_url": "http://mikrotik.com/",
+ "documentation_url": "http://wiki.mikrotik.com/wiki/Manual:CHR",
+ "product_name": "MikroTik RouterBOARD 450Gx4",
+ "product_url": "http://www.mikrotik.com/download",
+ "registry_version": 5,
+ "status": "stable",
+ "maintainer": "Azorian Solutions",
+ "maintainer_email": "help@azorian.solutions",
+ "usage": "If you'd like a different sized main disk, resize the image before booting the VM for the first time.\n\nOn first boot, RouterOS is actually being installed, formatting the whole main virtual disk, before finally rebooting. That whole process may take a minute or so.\n\nThe console will become available after the installation is complete. Most Telnet/SSH clients (certainly SuperPutty) will keep retrying to connect, thus letting you know when installation is done.\n\nFrom that point on, everything about RouterOS is also true about Cloud Hosted Router, including the default credentials: Username \"admin\" and an empty password.\n\nThe primary differences between RouterOS and CHR are in support for virtual devices (this appliance comes with them being selected), and in the different license model, for which you can read more about at http://wiki.mikrotik.com/wiki/Manual:CHR.",
+ "symbol": ":/symbols/classic/router.svg",
+ "port_name_format": "ether{port1}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 5,
+ "ram": 1024,
+ "cpus": 4,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "allow",
+ "options": "-nographic",
+ "on_close": "shutdown_signal"
+ },
+ "images": [
+ {
+ "filename": "chr-7.8.img",
+ "version": "7.8",
+ "md5sum": "08fc9baf18d920bc65c974cafa3719be",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.8/chr-7.8.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.7.img",
+ "version": "7.7",
+ "md5sum": "efc4fdeb1cc06dc240a14f1215fd59b3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.7/chr-7.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.6.img",
+ "version": "7.6",
+ "md5sum": "864482f9efaea9d40910c050318f65b9",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.6/chr-7.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.3.1.img",
+ "version": "7.3.1",
+ "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-7.1.5.img",
+ "version": "7.1.5",
+ "md5sum": "9c0be05f891df2b1400bdae5e719898e",
+ "filesize": 134217728,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.7.img",
+ "version": "6.49.7",
+ "md5sum": "0686d07f69d15d41467ada4a58a92cd2",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.7/chr-6.49.7.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.49.6.img",
+ "version": "6.49.6",
+ "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip",
+ "compression": "zip"
+ },
+ {
+ "filename": "chr-6.48.6.img",
+ "version": "6.48.6",
+ "md5sum": "875574a561570227ff8f395aabe478c6",
+ "filesize": 67108864,
+ "download_url": "http://www.mikrotik.com/download",
+ "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "7.8",
+ "images": {
+ "hda_disk_image": "chr-7.8.img"
+ }
+ },
+ {
+ "name": "7.7",
+ "images": {
+ "hda_disk_image": "chr-7.7.img"
+ }
+ },
+ {
+ "name": "7.6",
+ "images": {
+ "hda_disk_image": "chr-7.6.img"
+ }
+ },
+ {
+ "name": "7.3.1",
+ "images": {
+ "hda_disk_image": "chr-7.3.1.img"
+ }
+ },
+ {
+ "name": "7.1.5",
+ "images": {
+ "hda_disk_image": "chr-7.1.5.img"
+ }
+ },
+ {
+ "name": "6.49.7",
+ "images": {
+ "hda_disk_image": "chr-6.49.7.img"
+ }
+ },
+ {
+ "name": "6.49.6",
+ "images": {
+ "hda_disk_image": "chr-6.49.6.img"
+ }
+ },
+ {
+ "name": "6.48.6",
+ "images": {
+ "hda_disk_image": "chr-6.48.6.img"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/mikrotik-winbox.gns3a b/gns3server/appliances/mikrotik-winbox.gns3a
new file mode 100644
index 00000000..ce0f9caf
--- /dev/null
+++ b/gns3server/appliances/mikrotik-winbox.gns3a
@@ -0,0 +1,19 @@
+{
+ "appliance_id": "b770027f-1822-4ab6-b2f9-73336ca0983d",
+ "name": "Mikrotik WinBox",
+ "category": "guest",
+ "description": "Mikrotik's WinBox router management software for GNS3",
+ "vendor_name": "Mikrotik",
+ "vendor_url": "https://mikrotik.com",
+ "product_name": "Mikrotik WinBox",
+ "registry_version": 4,
+ "status": "stable",
+ "availability": "free",
+ "maintainer": "Alexander Horner",
+ "maintainer_email": "contact@alexhorner.cc",
+ "docker": {
+ "adapters": 1,
+ "image": "gns3/mikrotik-winbox",
+ "console_type": "vnc"
+ }
+}
diff --git a/gns3server/appliances/net_toolbox.gns3a b/gns3server/appliances/net_toolbox.gns3a
index 3bcc2a6b..90ebe293 100644
--- a/gns3server/appliances/net_toolbox.gns3a
+++ b/gns3server/appliances/net_toolbox.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Ubuntu",
"vendor_url": "https://www.ubuntu.com/",
"product_name": "Networkers' toolbox",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Andras Dosztal",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/netapp-ontapsim.gns3a b/gns3server/appliances/netapp-ontapsim.gns3a
new file mode 100644
index 00000000..c2192bdb
--- /dev/null
+++ b/gns3server/appliances/netapp-ontapsim.gns3a
@@ -0,0 +1,185 @@
+{
+ "appliance_id": "35436b76-dae0-4f9a-848d-8f89a0dce1ce",
+ "name": "ONTAP Simulator",
+ "category": "guest",
+ "description": "NetApp ONTAP Simulator. ONTAP is the industry's leading data management software.\n\nExtract the OVA file with a zip decompressor to get the files required for this installation.",
+ "vendor_name": "NetApp",
+ "vendor_url": "https://www.netapp.com",
+ "documentation_url": "https://docs.netapp.com/us-en/ontap-family",
+ "product_name": "NetApp ONTAP Simulator",
+ "product_url": "https://www.netapp.com/data-management/",
+ "registry_version": 4,
+ "status": "stable",
+ "maintainer": "Jose Phillips",
+ "maintainer_email": "jose@hddlive.net",
+ "usage": "NetApp ONTAP Simulator Initial Configuration\n\n1.Press Ctrl-C when you see the option.\n2.Hit Option 4 Clean configuration and initialize all disks.\n3.Press Y to Continue\n4.Follow the NetApp ONTAP Configurations on screen.\n",
+ "symbol": ":/symbols/affinity/square/blue/nas.svg",
+ "port_name_format": "e0{0}",
+ "qemu": {
+ "adapter_type": "e1000",
+ "adapters": 4,
+ "ram": 8192,
+ "cpus": 2,
+ "hda_disk_interface": "ide",
+ "hdb_disk_interface": "ide",
+ "hdc_disk_interface": "ide",
+ "hdd_disk_interface": "ide",
+ "arch": "x86_64",
+ "console_type": "vnc",
+ "boot_priority": "c",
+ "kvm": "require",
+ "on_close": "shutdown_signal"
+ },
+ "images": [
+ {
+ "filename": "9.8-vsim-NetAppDOT-simulate-disk1.vmdk",
+ "version": "9.8",
+ "md5sum": "823a69e1278405f430b73208ea7c231c",
+ "filesize": 505134080,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.8-vsim-NetAppDOT-simulate-disk2.vmdk",
+ "version": "9.8",
+ "md5sum": "575ba875b3916bf408729551d1e83ea6",
+ "filesize": 71168,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.8-vsim-NetAppDOT-simulate-disk3.vmdk",
+ "version": "9.8",
+ "md5sum": "9f17106079e69b4f66999adf12bb793d",
+ "filesize": 71680,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.8-vsim-NetAppDOT-simulate-disk4.vmdk",
+ "version": "9.8",
+ "md5sum": "ddcb8695bba25d884b4978e20f03c00f",
+ "filesize": 100352,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.7-vsim-NetAppDOT-simulate-disk1.vmdk",
+ "version": "9.7",
+ "md5sum": "595d92221e036fb2b4d4768f5e4a3967",
+ "filesize": 460700672,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.7-vsim-NetAppDOT-simulate-disk2.vmdk",
+ "version": "9.7",
+ "md5sum": "da95d010ed13a3eb14fa5abbc3de18f7",
+ "filesize": 71168,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.7-vsim-NetAppDOT-simulate-disk3.vmdk",
+ "version": "9.7",
+ "md5sum": "937f9bc2eb8f44e7a609c1ec937edc16",
+ "filesize": 71680,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "9.7-vsim-NetAppDOT-simulate-disk4.vmdk",
+ "version": "9.7",
+ "md5sum": "399ad53530615968f95b0f3de9e3c7fe",
+ "filesize": 100352,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.6-cm-disk1.vmdk",
+ "version": "9.6",
+ "md5sum": "381f7e1b0a3c670b25a32436e51fe465",
+ "filesize": 433936896,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.6-cm-disk2.vmdk",
+ "version": "9.6",
+ "md5sum": "ef534b1d1c454c9a78a82dc77c214adb",
+ "filesize": 71168,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.6-cm-disk3.vmdk",
+ "version": "9.6",
+ "md5sum": "96cbd798a18c50c86dbb49ead406cb02",
+ "filesize": 71680,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.6-cm-disk4.vmdk",
+ "version": "9.6",
+ "md5sum": "b67a738e7f3212a45a3eace0813d8a60",
+ "filesize": 100352,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.5-cm-disk1.vmdk",
+ "version": "9.5",
+ "md5sum": "94a3b46fdd5add410a1ec6ac8fd6994f",
+ "filesize": 1220402176,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.5-cm-disk2.vmdk",
+ "version": "9.5",
+ "md5sum": "53e6a05a90819fff6f80c86bbdb9b193",
+ "filesize": 71168,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.5-cm-disk3.vmdk",
+ "version": "9.5",
+ "md5sum": "028cedade23c58d755b1fff0db59d70b",
+ "filesize": 71680,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ },
+ {
+ "filename": "vsim-netapp-DOT9.5-cm-disk4.vmdk",
+ "version": "9.5",
+ "md5sum": "fb44126d338189ee38ae20b96b702715",
+ "filesize": 100352,
+ "download_url": "https://mysupport.netapp.com/site/tools/tool-eula/simulate-ontap/download"
+ }
+ ],
+ "versions": [
+ {
+ "name": "9.8",
+ "images": {
+ "hda_disk_image": "9.8-vsim-NetAppDOT-simulate-disk1.vmdk",
+ "hdb_disk_image": "9.8-vsim-NetAppDOT-simulate-disk2.vmdk",
+ "hdc_disk_image": "9.8-vsim-NetAppDOT-simulate-disk3.vmdk",
+ "hdd_disk_image": "9.8-vsim-NetAppDOT-simulate-disk4.vmdk"
+ }
+ },
+ {
+ "name": "9.7",
+ "images": {
+ "hda_disk_image": "9.7-vsim-NetAppDOT-simulate-disk1.vmdk",
+ "hdb_disk_image": "9.7-vsim-NetAppDOT-simulate-disk2.vmdk",
+ "hdc_disk_image": "9.7-vsim-NetAppDOT-simulate-disk3.vmdk",
+ "hdd_disk_image": "9.7-vsim-NetAppDOT-simulate-disk4.vmdk"
+ }
+ },
+ {
+ "name": "9.6",
+ "images": {
+ "hda_disk_image": "vsim-netapp-DOT9.6-cm-disk1.vmdk",
+ "hdb_disk_image": "vsim-netapp-DOT9.6-cm-disk2.vmdk",
+ "hdc_disk_image": "vsim-netapp-DOT9.6-cm-disk3.vmdk",
+ "hdd_disk_image": "vsim-netapp-DOT9.6-cm-disk4.vmdk"
+ }
+ },
+ {
+ "name": "9.5",
+ "images": {
+ "hda_disk_image": "vsim-netapp-DOT9.5-cm-disk1.vmdk",
+ "hdb_disk_image": "vsim-netapp-DOT9.5-cm-disk2.vmdk",
+ "hdc_disk_image": "vsim-netapp-DOT9.5-cm-disk3.vmdk",
+ "hdd_disk_image": "vsim-netapp-DOT9.5-cm-disk4.vmdk"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/netem.gns3a b/gns3server/appliances/netem.gns3a
index ce071fa8..6bee7e81 100644
--- a/gns3server/appliances/netem.gns3a
+++ b/gns3server/appliances/netem.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.linuxfoundation.org/",
"documentation_url": "http://www.cs.unm.edu/~crandall/netsfall13/TCtutorial.pdf",
"product_name": "netem",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "Bernhard Ehlers",
"maintainer_email": "none@b-ehlers.de",
diff --git a/gns3server/appliances/network_automation.gns3a b/gns3server/appliances/network_automation.gns3a
index 8d10a494..b9bcd83c 100644
--- a/gns3server/appliances/network_automation.gns3a
+++ b/gns3server/appliances/network_automation.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "GNS3",
"vendor_url": "http://www.gns3.com",
"product_name": "Network Automation",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/ntopng.gns3a b/gns3server/appliances/ntopng.gns3a
index 8804d7cb..c54cc217 100644
--- a/gns3server/appliances/ntopng.gns3a
+++ b/gns3server/appliances/ntopng.gns3a
@@ -7,14 +7,14 @@
"vendor_url": "https://www.ntop.org/",
"documentation_url": "https://www.ntop.org/guides/ntopng/",
"product_name": "ntopng",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "In the web interface login as admin/admin\n\nPersistent configuration:\n- Add \"/var/lib/redis\" as an additional persistent directory.\n- Use \"redis-cli save\" in an auxiliary console to save the configuration.",
"docker": {
"adapters": 1,
- "image": "ntop/ntopng:latest",
+ "image": "ntop/ntopng:stable",
"start_command": "--dns-mode 2 --interface eth0",
"console_type": "http",
"console_http_port": 3000,
diff --git a/gns3server/appliances/onos.gns3a b/gns3server/appliances/onos.gns3a
index 28f7f6ab..14b87882 100644
--- a/gns3server/appliances/onos.gns3a
+++ b/gns3server/appliances/onos.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://wiki.onosproject.org",
"product_name": "Onos",
"product_url": "http://onosproject.org/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/op5-monitor.gns3a b/gns3server/appliances/op5-monitor.gns3a
index 70f97de9..32881514 100644
--- a/gns3server/appliances/op5-monitor.gns3a
+++ b/gns3server/appliances/op5-monitor.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://kb.op5.com/display/MAN/Documentation+Home#sthash.pohb5bis.dpbs",
"product_name": "OP5 Monitor",
"product_url": "https://www.op5.com/op5-monitor/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/open-media-vault.gns3a b/gns3server/appliances/open-media-vault.gns3a
index 26c7fbe0..262a8db0 100644
--- a/gns3server/appliances/open-media-vault.gns3a
+++ b/gns3server/appliances/open-media-vault.gns3a
@@ -26,6 +26,14 @@
"kvm": "require"
},
"images": [
+ {
+ "filename": "openmediavault_6.0.24-amd64.iso",
+ "version": "6.0.24",
+ "md5sum": "6f71b9470eb06954bda621972c546a13",
+ "filesize": 868220928,
+ "download_url": "https://www.openmediavault.org/download.html",
+ "direct_download_url": "https://sourceforge.net/projects/openmediavault/files/6.0.24/openmediavault_6.0.24-amd64.iso"
+ },
{
"filename": "openmediavault_5.6.13-amd64.iso",
"version": "5.6.13",
@@ -52,6 +60,14 @@
}
],
"versions": [
+ {
+ "name": "6.0.24",
+ "images": {
+ "hda_disk_image": "empty30G.qcow2",
+ "hdb_disk_image": "empty30G.qcow2",
+ "cdrom_image": "openmediavault_6.0.24-amd64.iso"
+ }
+ },
{
"name": "5.6.13",
"images": {
diff --git a/gns3server/appliances/openbsd.gns3a b/gns3server/appliances/openbsd.gns3a
index d39c956d..c25a59d6 100644
--- a/gns3server/appliances/openbsd.gns3a
+++ b/gns3server/appliances/openbsd.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.openbsd.org",
"documentation_url": "http://www.openbsd.org/faq/index.html",
"product_name": "OpenBSD",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/opennac.gns3a b/gns3server/appliances/opennac.gns3a
index f189c9c4..c68890bc 100644
--- a/gns3server/appliances/opennac.gns3a
+++ b/gns3server/appliances/opennac.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.opennac.org/opennac/en/support.html",
"product_name": "OpenNAC",
"product_url": "https://opennac.org/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
diff --git a/gns3server/appliances/openvswitch-management.gns3a b/gns3server/appliances/openvswitch-management.gns3a
index a9637293..a31b36eb 100644
--- a/gns3server/appliances/openvswitch-management.gns3a
+++ b/gns3server/appliances/openvswitch-management.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://openvswitch.org/",
"documentation_url": "http://openvswitch.org/support/",
"product_name": "Open vSwitch",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/openvswitch.gns3a b/gns3server/appliances/openvswitch.gns3a
index e792689a..14c35d2c 100644
--- a/gns3server/appliances/openvswitch.gns3a
+++ b/gns3server/appliances/openvswitch.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://openvswitch.org/support/",
"product_name": "Open vSwitch",
"product_url": "http://openvswitch.org/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/openwrt-realview.gns3a b/gns3server/appliances/openwrt-realview.gns3a
index ee520702..46a6ec3e 100644
--- a/gns3server/appliances/openwrt-realview.gns3a
+++ b/gns3server/appliances/openwrt-realview.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.openwrt.org/doc/",
"product_name": "OpenWrt",
"product_url": "http://openwrt.org",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/openwrt.gns3a b/gns3server/appliances/openwrt.gns3a
index a8bc8bf7..e6428658 100644
--- a/gns3server/appliances/openwrt.gns3a
+++ b/gns3server/appliances/openwrt.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.openwrt.org/doc/",
"product_name": "OpenWrt",
"product_url": "http://openwrt.org",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -23,7 +23,7 @@
"kvm": "allow"
},
"images": [
- {
+ {
"filename": "openwrt-22.03.0-x86-64-generic-ext4-combined.img",
"version": "22.03.0",
"md5sum": "0f9a266bd8a6cdfcaf0b59f7ba103a0e",
diff --git a/gns3server/appliances/opnsense.gns3a b/gns3server/appliances/opnsense.gns3a
index 45583124..c6fb2de1 100644
--- a/gns3server/appliances/opnsense.gns3a
+++ b/gns3server/appliances/opnsense.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://wiki.opnsense.org/",
"product_name": "OPNsense",
"product_url": "https://opnsense.org/about/about-opnsense/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -25,6 +25,13 @@
"kvm": "require"
},
"images": [
+ {
+ "filename": "OPNsense-23.1-OpenSSL-nano-amd64.img",
+ "version": "23.1",
+ "md5sum": "db7d3b9fd3b94894623368db1041ff11",
+ "filesize": 3221225472,
+ "download_url": "https://opnsense.c0urier.net/releases/23.1/"
+ },
{
"filename": "OPNsense-22.1.2-OpenSSL-nano-amd64.img",
"version": "22.1.2",
@@ -55,6 +62,12 @@
}
],
"versions": [
+ {
+ "name": "23.1",
+ "images": {
+ "hda_disk_image": "OPNsense-23.1-OpenSSL-nano-amd64.img"
+ }
+ },
{
"name": "22.1.2",
"images": {
diff --git a/gns3server/appliances/oracle-linux-cloud.gns3a b/gns3server/appliances/oracle-linux-cloud.gns3a
new file mode 100644
index 00000000..a9709bcc
--- /dev/null
+++ b/gns3server/appliances/oracle-linux-cloud.gns3a
@@ -0,0 +1,70 @@
+{
+ "appliance_id": "88e67f45-e0de-4e5e-9f36-2dc83e4a6c60",
+ "name": "Oracle Linux Cloud Guest",
+ "category": "guest",
+ "description": "A highly performant and secure operating environment, Oracle Linux delivers virtualization, management, automation, and cloud native computing tools, along with the operating system, in a single, easy-to-manage support offering. Oracle Linux provides a 100% application binary compatible alternative to Red Hat Enterprise Linux and CentOS Linux and is supported across both hybrid and multicloud environments.",
+ "vendor_name": "Oracle Corporation",
+ "vendor_url": "https://www.oracle.com",
+ "documentation_url": "https://docs.oracle.com/en-us/iaas/images/",
+ "product_name": "Oracle Linux Cloud Guest",
+ "product_url": "https://www.oracle.com/au/linux/",
+ "registry_version": 4,
+ "status": "stable",
+ "maintainer": "GNS3 Team",
+ "maintainer_email": "developers@gns3.net",
+ "usage": "Username: oracle\nPassword: oracle",
+ "port_name_format": "Ethernet{0}",
+ "qemu": {
+ "adapter_type": "virtio-net-pci",
+ "adapters": 1,
+ "ram": 1024,
+ "hda_disk_interface": "virtio",
+ "arch": "x86_64",
+ "console_type": "telnet",
+ "boot_priority": "c",
+ "kvm": "require",
+ "options": "-cpu host -nographic"
+ },
+ "images": [
+ {
+ "filename": "OL9U1_x86_64-kvm-b158.qcow",
+ "version": "9.1",
+ "md5sum": "9f32851b96fc38191892197fa11f7435",
+ "filesize": 539033600,
+ "download_url": "https://yum.oracle.com/oracle-linux-templates.html",
+ "direct_download_url": "https://yum.oracle.com/templates/OracleLinux/OL9/u1/x86_64/OL9U1_x86_64-kvm-b158.qcow"
+ },
+ {
+ "filename": "OL8U7_x86_64-kvm-b148.qcow",
+ "version": "8.7",
+ "md5sum": "962cdde7e810888b9914e937222f687f",
+ "filesize": 913965056,
+ "download_url": "https://yum.oracle.com/oracle-linux-templates.html",
+ "direct_download_url": "https://yum.oracle.com/templates/OracleLinux/OL8/u7/x86_64/OL8U7_x86_64-kvm-b148.qcow"
+ },
+ {
+ "filename": "oracle-cloud-init-data.iso",
+ "version": "1.1",
+ "md5sum": "cb51bc42ae9dfb7345bfa7362a313baf",
+ "filesize": 374784,
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/oracle-cloud",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/oracle-cloud/oracle-cloud-init-data.iso"
+ }
+ ],
+ "versions": [
+ {
+ "name": "9.1",
+ "images": {
+ "hda_disk_image": "OL9U1_x86_64-kvm-b158.qcow",
+ "cdrom_image": "oracle-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "8.7",
+ "images": {
+ "hda_disk_image": "OL8U7_x86_64-kvm-b148.qcow",
+ "cdrom_image": "oracle-cloud-init-data.iso"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/ostinato-wireshark.gns3a b/gns3server/appliances/ostinato-wireshark.gns3a
new file mode 100644
index 00000000..351a91f8
--- /dev/null
+++ b/gns3server/appliances/ostinato-wireshark.gns3a
@@ -0,0 +1,20 @@
+{
+ "appliance_id": "8377ddaa-ecd1-4cde-a510-3ef2ddc48f11",
+ "name": "Ostinato Wireshark",
+ "category": "guest",
+ "description": "Alpine Linux with Ostinato Network Traffic Generator and Wireshark Network Traffic Analyser pre-installed.",
+ "vendor_name": "Ostinato/Wireshark",
+ "vendor_url": "https://ostinato.org/",
+ "documentation_url": "https://ostinato.org/docs/",
+ "product_name": "Ostinato Wireshark",
+ "registry_version": 4,
+ "status": "stable",
+ "availability": "free",
+ "maintainer": "Mark Young",
+ "maintainer_email": "miyoung999@hotmail.com",
+ "docker": {
+ "adapters": 2,
+ "image": "gns3/ostinato-wireshark:latest",
+ "console_type": "vnc"
+ }
+}
diff --git a/gns3server/appliances/ostinato.gns3a b/gns3server/appliances/ostinato.gns3a
index 585b67ef..fe00eddf 100644
--- a/gns3server/appliances/ostinato.gns3a
+++ b/gns3server/appliances/ostinato.gns3a
@@ -29,6 +29,13 @@
"options": "-vga std -usbdevice tablet"
},
"images": [
+ {
+ "filename": "ostinatostd-1.2.0-1.qcow2",
+ "version": "1.2.0",
+ "md5sum": "682680fe75f88975992c0a1a5c973149",
+ "filesize": 173801472,
+ "download_url": "https://ostinato.org/pricing/gns3"
+ },
{
"filename": "ostinatostd-1.1-1.qcow2",
"version": "1.1",
@@ -38,6 +45,12 @@
}
],
"versions": [
+ {
+ "name": "1.2.0",
+ "images": {
+ "hda_disk_image": "ostinatostd-1.2.0-1.qcow2"
+ }
+ },
{
"name": "1.1",
"images": {
diff --git a/gns3server/appliances/ovs-snmp.gns3a b/gns3server/appliances/ovs-snmp.gns3a
index 2592022f..7e4b8ca4 100644
--- a/gns3server/appliances/ovs-snmp.gns3a
+++ b/gns3server/appliances/ovs-snmp.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Open vSwitch",
"vendor_url": "http://openvswitch.org/",
"product_name": "Open vSwitch",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -15,4 +15,4 @@
"adapters": 8,
"image": "gns3/ovs-snmp:latest"
}
-}
\ No newline at end of file
+}
diff --git a/gns3server/appliances/packetfence-zen.gns3a b/gns3server/appliances/packetfence-zen.gns3a
index 6a6a8dea..06cedbe8 100644
--- a/gns3server/appliances/packetfence-zen.gns3a
+++ b/gns3server/appliances/packetfence-zen.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://packetfence.org/support/index.html#/documentation",
"product_name": "PacketFence ZEN",
"product_url": "https://packetfence.org/about.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/pan-vm-fw.gns3a b/gns3server/appliances/pan-vm-fw.gns3a
index 25f8725e..1406aed8 100644
--- a/gns3server/appliances/pan-vm-fw.gns3a
+++ b/gns3server/appliances/pan-vm-fw.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.paloaltonetworks.com/documentation/80/virtualization/virtualization",
"product_name": "PAN VM-Series Firewall",
"product_url": "https://www.paloaltonetworks.com/products/secure-the-network/virtualized-next-generation-firewall/vm-series",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "Community",
"maintainer_email": "",
@@ -27,6 +27,13 @@
"options": "-smp 2"
},
"images": [
+ {
+ "filename": "PA-VM-KVM-10.1.0.qcow2",
+ "version": "10.1.0",
+ "md5sum": "8266fd412a22694749f2cd4afcd5fa33",
+ "filesize": 3597467648,
+ "download_url": "https://support.paloaltonetworks.com/Updates/SoftwareUpdates/"
+ },
{
"filename": "PA-VM-KVM-10.0.0.qcow2",
"version": "10.0.0",
@@ -120,6 +127,12 @@
}
],
"versions": [
+ {
+ "name": "10.1.0",
+ "images": {
+ "hda_disk_image": "PA-VM-KVM-10.1.0.qcow2"
+ }
+ },
{
"name": "10.0.0",
"images": {
diff --git a/gns3server/appliances/parrot-os.gns3a b/gns3server/appliances/parrot-os.gns3a
index e9270803..d5b9fe1a 100644
--- a/gns3server/appliances/parrot-os.gns3a
+++ b/gns3server/appliances/parrot-os.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://docs.parrotsec.org/doku.php",
"product_name": "ParrotOS",
"product_url": "https://parrotsec.org/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
diff --git a/gns3server/appliances/pfsense.gns3a b/gns3server/appliances/pfsense.gns3a
index bf3cf1ae..c0f0ebfa 100644
--- a/gns3server/appliances/pfsense.gns3a
+++ b/gns3server/appliances/pfsense.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://www.pfsense.org",
"documentation_url": "https://doc.pfsense.org/index.php/Main_Page",
"product_name": "pfSense",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Jose Phillips",
"maintainer_email": "jose@latinol.com",
@@ -24,6 +24,13 @@
"process_priority": "normal"
},
"images": [
+ {
+ "filename": "pfSense-CE-2.7.0-RELEASE-amd64.iso",
+ "version": "2.7.0",
+ "md5sum": "cb0b72ca864d06682265de5e5a72a1fb",
+ "filesize": 765218816,
+ "download_url": "https://www.pfsense.org/download/mirror.php?section=downloads"
+ },
{
"filename": "pfSense-CE-2.6.0-RELEASE-amd64.iso",
"version": "2.6.0",
@@ -69,6 +76,13 @@
}
],
"versions": [
+ {
+ "name": "2.7.0",
+ "images": {
+ "hda_disk_image": "empty100G.qcow2",
+ "cdrom_image": "pfSense-CE-2.7.0-RELEASE-amd64.iso"
+ }
+ },
{
"name": "2.6.0",
"images": {
diff --git a/gns3server/appliances/proxmox-mg.gns3a b/gns3server/appliances/proxmox-mg.gns3a
index 588073da..f18137f1 100644
--- a/gns3server/appliances/proxmox-mg.gns3a
+++ b/gns3server/appliances/proxmox-mg.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.proxmox.com/en/downloads/category/documentation-pmg",
"product_name": "Proxmox MG",
"product_url": "http://www.proxmox.com/en/proxmox-mail-gateway",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/puppy-linux.gns3a b/gns3server/appliances/puppy-linux.gns3a
index e6bfca79..ac2d7048 100644
--- a/gns3server/appliances/puppy-linux.gns3a
+++ b/gns3server/appliances/puppy-linux.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://puppylinux.com/",
"documentation_url": "http://wikka.puppylinux.com/HomePage",
"product_name": "Puppy Linux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Savio D'souza",
"maintainer_email": "savio2002@yahoo.in",
diff --git a/gns3server/appliances/python-go-perl-php.gns3a b/gns3server/appliances/python-go-perl-php.gns3a
index 6ab1298f..5ec5f39c 100644
--- a/gns3server/appliances/python-go-perl-php.gns3a
+++ b/gns3server/appliances/python-go-perl-php.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "GNS3 Team",
"vendor_url": "https://www.gns3.com",
"product_name": "Python, Go, Perl, PHP",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/raspian.gns3a b/gns3server/appliances/raspian.gns3a
index 0c4cafca..97431dc8 100644
--- a/gns3server/appliances/raspian.gns3a
+++ b/gns3server/appliances/raspian.gns3a
@@ -38,7 +38,7 @@
"filesize": 3091660800,
"download_url": "https://www.raspberrypi.org/downloads/raspberry-pi-desktop/"
},
- {
+ {
"filename": "2020-02-12-rpd-x86-buster.iso",
"version": "2020-02-12",
"md5sum": "98f34fb53086752b4c9c452094f30740",
@@ -68,7 +68,7 @@
"cdrom_image": "2021-01-11-raspios-buster-i386.iso"
}
},
- {
+ {
"name": "2020-02-12",
"images": {
"hda_disk_image": "empty8G.qcow2",
diff --git a/gns3server/appliances/reactos.gns3a b/gns3server/appliances/reactos.gns3a
index 391abe95..1b1c2fd8 100644
--- a/gns3server/appliances/reactos.gns3a
+++ b/gns3server/appliances/reactos.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://reactos.org/what-is-reactos/",
"product_name": "ReactOS",
"product_url": "https://reactos.org/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Savio D'souza",
"maintainer_email": "savio2002@yahoo.co.in",
diff --git a/gns3server/appliances/rhel.gns3a b/gns3server/appliances/rhel.gns3a
index feacaf27..cff50307 100644
--- a/gns3server/appliances/rhel.gns3a
+++ b/gns3server/appliances/rhel.gns3a
@@ -13,7 +13,7 @@
"availability": "service-contract",
"maintainer": "Neyder Achahuanco",
"maintainer_email": "neyder@neyder.net",
- "usage": "You should download Red Hat Enterprise Linux KVM Guest Image from https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.5/x86_64/product-software attach/customize cloud-init.iso and start.\nusername: cloud-user\npassword: redhat",
+ "usage": "You should download Red Hat Enterprise Linux KVM Guest Image from https://access.redhat.com/downloads/content/479/ver=/rhel---9/9.2/x86_64/product-software attach/customize cloud-init.iso and start.\nusername: cloud-user\npassword: redhat",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 1,
@@ -26,6 +26,48 @@
"options": "-nographic"
},
"images": [
+ {
+ "filename": "rhel-9.2-x86_64-kvm.qcow2",
+ "version": "9.2",
+ "md5sum": "f33845298b387dbcfbf162c6b4e3f8c8",
+ "filesize": 819265536,
+ "download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/9.2/x86_64/product-software"
+ },
+ {
+ "filename": "rhel-baseos-9.1-x86_64-kvm.qcow2",
+ "version": "9.1",
+ "md5sum": "622de743da83bcec1ad2959ecaedb8f4",
+ "filesize": 753401856,
+ "download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/9.1/x86_64/product-software"
+ },
+ {
+ "filename": "rhel-baseos-9.0-x86_64-kvm.qcow2",
+ "version": "9.0",
+ "md5sum": "4a41497d354fe99a4abf55f1ed73edcb",
+ "filesize": 696582144,
+ "download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/9.0/x86_64/product-software"
+ },
+ {
+ "filename": "rhel-8.8-x86_64-kvm.qcow2",
+ "version": "8.8",
+ "md5sum": "bf22af816ba6abd846bbb0c9ecf7bce1",
+ "filesize": 926810112,
+ "download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.8/x86_64/product-software"
+ },
+ {
+ "filename": "rhel-8.7-x86_64-kvm.qcow2",
+ "version": "8.7",
+ "md5sum": "ab71a2c4cc276441bf999f531e064507",
+ "filesize": 858128384,
+ "download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.7/x86_64/product-software"
+ },
+ {
+ "filename": "rhel-8.6-x86_64-kvm.qcow2",
+ "version": "8.6",
+ "md5sum": "19501666f46df6b5472db1254e86a339",
+ "filesize": 832438272,
+ "download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.6/x86_64/product-software"
+ },
{
"filename": "rhel-8.5-x86_64-kvm.qcow2",
"version": "8.5",
@@ -70,6 +112,48 @@
}
],
"versions": [
+ {
+ "name": "9.2",
+ "images": {
+ "hda_disk_image": "rhel-9.2-x86_64-kvm.qcow2",
+ "cdrom_image": "rhel-cloud-init.iso"
+ }
+ },
+ {
+ "name": "9.1",
+ "images": {
+ "hda_disk_image": "rhel-baseos-9.1-x86_64-kvm.qcow2",
+ "cdrom_image": "rhel-cloud-init.iso"
+ }
+ },
+ {
+ "name": "9.0",
+ "images": {
+ "hda_disk_image": "rhel-baseos-9.0-x86_64-kvm.qcow2",
+ "cdrom_image": "rhel-cloud-init.iso"
+ }
+ },
+ {
+ "name": "8.8",
+ "images": {
+ "hda_disk_image": "rhel-8.8-x86_64-kvm.qcow2",
+ "cdrom_image": "rhel-cloud-init.iso"
+ }
+ },
+ {
+ "name": "8.7",
+ "images": {
+ "hda_disk_image": "rhel-8.7-x86_64-kvm.qcow2",
+ "cdrom_image": "rhel-cloud-init.iso"
+ }
+ },
+ {
+ "name": "8.6",
+ "images": {
+ "hda_disk_image": "rhel-8.6-x86_64-kvm.qcow2",
+ "cdrom_image": "rhel-cloud-init.iso"
+ }
+ },
{
"name": "8.5",
"images": {
diff --git a/gns3server/appliances/rockylinux.gns3a b/gns3server/appliances/rockylinux.gns3a
index 5829bbc8..2dd3fd1b 100644
--- a/gns3server/appliances/rockylinux.gns3a
+++ b/gns3server/appliances/rockylinux.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://rockylinux.org",
"documentation_url": "https://docs.rockylinux.org",
"product_name": "Rocky Linux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Da-Geek",
"maintainer_email": "dageek@dageeks-geeks.gg",
@@ -23,7 +23,7 @@
"console_type": "telnet",
"boot_priority": "c",
"kvm": "require",
- "options": "-nographic"
+ "options": "-nographic -cpu host"
},
"images": [
{
@@ -39,7 +39,8 @@
"version": "1.0",
"md5sum": "33ffda3a81436e305f37fb913edd6d43",
"filesize": 374784,
- "download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/rocky-cloud/rocky-cloud-init-data.iso"
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/rocky-cloud",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/rocky-cloud/rocky-cloud-init-data.iso"
}
],
"versions": [
diff --git a/gns3server/appliances/security-onion.gns3a b/gns3server/appliances/security-onion.gns3a
index abaf5003..cccca609 100644
--- a/gns3server/appliances/security-onion.gns3a
+++ b/gns3server/appliances/security-onion.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://github.com/Security-Onion-Solutions/security-onion/wiki",
"product_name": "Security Onion",
"product_url": "https://securityonion.net/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
diff --git a/gns3server/appliances/smoothwall.gns3a b/gns3server/appliances/smoothwall.gns3a
index 987cd791..ab285019 100644
--- a/gns3server/appliances/smoothwall.gns3a
+++ b/gns3server/appliances/smoothwall.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://sourceforge.net/projects/smoothwall/files/SmoothWall%20Manuals/",
"product_name": "Smoothwall Express",
"product_url": "http://www.smoothwall.org/about/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/sophos-iview.gns3a b/gns3server/appliances/sophos-iview.gns3a
index 28d131b1..08188887 100644
--- a/gns3server/appliances/sophos-iview.gns3a
+++ b/gns3server/appliances/sophos-iview.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.sophos.com/en-us/support/documentation/sophos-iview.aspx",
"product_name": "Sophos iView",
"product_url": "https://www.sophos.com/en-us/products/next-gen-firewall.aspx",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/sophos-utm.gns3a b/gns3server/appliances/sophos-utm.gns3a
index 6bbc6cff..5fbac719 100644
--- a/gns3server/appliances/sophos-utm.gns3a
+++ b/gns3server/appliances/sophos-utm.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://community.sophos.com/products/unified-threat-management/",
"product_name": "Sophos UTM Home Edition",
"product_url": "https://www.sophos.com/en-us/products/free-tools/sophos-utm-home-edition.aspx",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/sophos-xg.gns3a b/gns3server/appliances/sophos-xg.gns3a
index 54496c71..670946cb 100644
--- a/gns3server/appliances/sophos-xg.gns3a
+++ b/gns3server/appliances/sophos-xg.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://www.sophos.com/en-us/support/documentation/sophos-xg-firewall.aspx",
"product_name": "Sophos XG Firewall",
"product_url": "https://www.sophos.com/en-us/products/next-gen-firewall.aspx",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/tacacs-gui.gns3a b/gns3server/appliances/tacacs-gui.gns3a
index 3738523e..a5dab0a9 100644
--- a/gns3server/appliances/tacacs-gui.gns3a
+++ b/gns3server/appliances/tacacs-gui.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://tacacsgui.com/documentation/",
"product_name": "TacacsGUI",
"product_url": "https://drive.google.com/open?id=1U8tbj14NqEyCmarayhZm54qTyjgsJm4B",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/tinycore-linux.gns3a b/gns3server/appliances/tinycore-linux.gns3a
index ef1e23aa..7fa60832 100644
--- a/gns3server/appliances/tinycore-linux.gns3a
+++ b/gns3server/appliances/tinycore-linux.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.tinycorelinux.net/",
"product_name": "Tiny Core Linux",
"product_url": "http://distro.ibiblio.org/tinycorelinux",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -17,7 +17,7 @@
"qemu": {
"adapter_type": "e1000",
"adapters": 1,
- "ram": 96,
+ "ram": 128,
"hda_disk_interface": "virtio",
"arch": "i386",
"console_type": "vnc",
@@ -28,7 +28,7 @@
{
"filename": "linux-tinycore-11.1.qcow2",
"version": "11.1",
- "md5sum": "993d1ce9b86cb131c90e8263891d51b8",
+ "md5sum": "00a65300a1dcc956e4e677c638bf4445",
"filesize": 33816576,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/linux-tinycore-11.1.qcow2"
diff --git a/gns3server/appliances/trendmicro-imsva.gns3a b/gns3server/appliances/trendmicro-imsva.gns3a
index 6520be66..655c3b1c 100644
--- a/gns3server/appliances/trendmicro-imsva.gns3a
+++ b/gns3server/appliances/trendmicro-imsva.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://success.trendmicro.com/product-support/interscan-messaging-security",
"product_name": "IMS VA",
"product_url": "http://www.trendmicro.com/enterprise/network-security/interscan-message-security/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/trendmicro-iwsva.gns3a b/gns3server/appliances/trendmicro-iwsva.gns3a
index 17bd1161..12e0c1c6 100644
--- a/gns3server/appliances/trendmicro-iwsva.gns3a
+++ b/gns3server/appliances/trendmicro-iwsva.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://success.trendmicro.com/product-support/interscan-web-security-virtual-appliance",
"product_name": "IWS VA",
"product_url": "http://www.trendmicro.com/enterprise/network-security/interscan-web-security/virtual-appliance/index.html",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/turnkey-wordpress.gns3a b/gns3server/appliances/turnkey-wordpress.gns3a
index 377b6bd4..20dd1c69 100644
--- a/gns3server/appliances/turnkey-wordpress.gns3a
+++ b/gns3server/appliances/turnkey-wordpress.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "https://www.turnkeylinux.org/",
"product_name": "TurnKey Linux WordPress",
"product_url": "https://www.turnkeylinux.org/wordpress",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/ubuntu-cloud.gns3a b/gns3server/appliances/ubuntu-cloud.gns3a
index d0ddd03e..49d007cf 100644
--- a/gns3server/appliances/ubuntu-cloud.gns3a
+++ b/gns3server/appliances/ubuntu-cloud.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://help.ubuntu.com/community/UEC/Images",
"product_name": "Ubuntu Cloud Guest",
"product_url": "https://www.ubuntu.com/cloud",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
@@ -26,98 +26,75 @@
"options": "-nographic"
},
"images": [
+ {
+ "filename": "ubuntu-23.04-server-cloudimg-arm64.img",
+ "version": "Ubuntu 23.04 (Lunar Lobster)",
+ "md5sum": "35fa3b31b65717af6f0520a769aac8c0",
+ "filesize": 786432000,
+ "download_url": "https://cloud-images.ubuntu.com/releases/23.04/release/",
+ "direct_download_url": "https://cloud-images.ubuntu.com/releases/23.04/release/ubuntu-23.04-server-cloudimg-arm64.img"
+ },
{
"filename": "ubuntu-22.04-server-cloudimg-amd64.img",
- "version": "22.04 (LTS)",
- "md5sum": "ac2351289daa173fa1ed6b2b81d81d7c",
- "filesize": 624295936,
- "download_url": "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img"
+ "version": "Ubuntu 22.04 LTS (Jammy Jellyfish)",
+ "md5sum": "3ce0b84f9592482fb645e8253b979827",
+ "filesize": 686096384,
+ "download_url": "https://cloud-images.ubuntu.com/releases/jammy/release",
+ "direct_download_url": "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img"
},
{
"filename": "ubuntu-20.04-server-cloudimg-amd64.img",
- "version": "20.04 (LTS)",
+ "version": "Ubuntu 20.04 LTS (Focal Fossa)",
"md5sum": "044bc979b2238192ee3edb44e2bb6405",
"filesize": 552337408,
- "download_url": "https://cloud-images.ubuntu.com/releases/focal/release-20210119.1/ubuntu-20.04-server-cloudimg-amd64.img"
+ "download_url": "https://cloud-images.ubuntu.com/releases/focal/release-20210119.1/",
+ "direct_download_url": "https://cloud-images.ubuntu.com/releases/focal/release-20210119.1/ubuntu-20.04-server-cloudimg-amd64.img"
},
{
"filename": "ubuntu-18.04-server-cloudimg-amd64.img",
- "version": "18.04 (LTS)",
+ "version": "Ubuntu 18.04 LTS (Bionic Beaver)",
"md5sum": "f4134e7fa16d7fa766c7467cbe25c949",
"filesize": 336134144,
- "download_url": "https://cloud-images.ubuntu.com/releases/18.04/release-20180426.2/ubuntu-18.04-server-cloudimg-amd64.img"
- },
- {
- "filename": "ubuntu-17.10-server-cloudimg-amd64.img",
- "version": "17.10",
- "md5sum": "331b44f2b05858c251b3ea92c8b65152",
- "filesize": 320405504,
- "download_url": "https://cloud-images.ubuntu.com/releases/17.10/release-20180404/ubuntu-17.10-server-cloudimg-amd64.img"
- },
- {
- "filename": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
- "version": "16.04 (LTS)",
- "md5sum": "22c124ba65ea096cdef8b0a197dd613a",
- "filesize": 290193408,
- "download_url": "https://cloud-images.ubuntu.com/releases/16.04/release-20180405/ubuntu-16.04-server-cloudimg-amd64-disk1.img"
- },
- {
- "filename": "ubuntu-14.04-server-cloudimg-amd64-disk1.img",
- "version": "14.04 (LTS)",
- "md5sum": "d11b89321d41d0eeddcacf73bf0d2262",
- "filesize": 262668800,
- "download_url": "https://cloud-images.ubuntu.com/releases/14.04/release-20180404/ubuntu-14.04-server-cloudimg-amd64-disk1.img"
+ "download_url": "https://cloud-images.ubuntu.com/releases/18.04/release-20180426.2/",
+ "direct_download_url": "https://cloud-images.ubuntu.com/releases/18.04/release-20180426.2/ubuntu-18.04-server-cloudimg-amd64.img"
},
{
"filename": "ubuntu-cloud-init-data.iso",
- "version": "1.0",
- "md5sum": "328469100156ae8dbf262daa319c27ff",
- "filesize": 131072,
- "download_url": "https://github.com/asenci/gns3-ubuntu-cloud-init-data/raw/master/ubuntu-cloud-init-data.iso"
+ "version": "1.1",
+ "md5sum": "9a90ee8f88736204c756015b3cd86500",
+ "filesize": 374784,
+ "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/ubuntu-cloud",
+ "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/ubuntu-cloud/ubuntu-cloud-init-data.iso"
}
],
"versions": [
{
- "name": "22.04 (LTS)",
+ "name": "Ubuntu 23.04 (Lunar Lobster)",
+ "images": {
+ "hda_disk_image": "ubuntu-23.04-server-cloudimg-arm64.img",
+ "cdrom_image": "ubuntu-cloud-init-data.iso"
+ }
+ },
+ {
+ "name": "Ubuntu 22.04 LTS (Jammy Jellyfish)",
"images": {
"hda_disk_image": "ubuntu-22.04-server-cloudimg-amd64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso"
}
},
{
- "name": "20.04 (LTS)",
+ "name": "Ubuntu 20.04 LTS (Focal Fossa)",
"images": {
"hda_disk_image": "ubuntu-20.04-server-cloudimg-amd64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso"
}
},
{
- "name": "18.04 (LTS)",
+ "name": "Ubuntu 18.04 LTS (Bionic Beaver)",
"images": {
"hda_disk_image": "ubuntu-18.04-server-cloudimg-amd64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso"
}
- },
- {
- "name": "17.10",
- "images": {
- "hda_disk_image": "ubuntu-17.10-server-cloudimg-amd64.img",
- "cdrom_image": "ubuntu-cloud-init-data.iso"
- }
- },
- {
- "name": "16.04 (LTS)",
- "images": {
- "hda_disk_image": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
- "cdrom_image": "ubuntu-cloud-init-data.iso"
- }
- },
- {
- "name": "14.04 (LTS)",
- "images": {
- "hda_disk_image": "ubuntu-14.04-server-cloudimg-amd64-disk1.img",
- "cdrom_image": "ubuntu-cloud-init-data.iso"
- }
}
]
}
diff --git a/gns3server/appliances/ubuntu-docker.gns3a b/gns3server/appliances/ubuntu-docker.gns3a
index 1753f147..bd6dcca7 100644
--- a/gns3server/appliances/ubuntu-docker.gns3a
+++ b/gns3server/appliances/ubuntu-docker.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Canonical",
"vendor_url": "http://www.ubuntu.com",
"product_name": "Ubuntu",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/ubuntu-gui.gns3a b/gns3server/appliances/ubuntu-gui.gns3a
index 5a073e4f..fc1e5d2d 100644
--- a/gns3server/appliances/ubuntu-gui.gns3a
+++ b/gns3server/appliances/ubuntu-gui.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://help.ubuntu.com",
"product_name": "Ubuntu",
"product_url": "https://www.ubuntu.com/desktop",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/ubuntu-server.gns3a b/gns3server/appliances/ubuntu-server.gns3a
deleted file mode 100644
index 534be61c..00000000
--- a/gns3server/appliances/ubuntu-server.gns3a
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "appliance_id": "d2a23e69-9e92-4c3f-83c8-8caa1aa58ece",
- "name": "Ubuntu Server",
- "category": "guest",
- "description": "This is a custom Ubuntu server which comes with Canonical security updates, Xorg and Telnetd",
- "vendor_name": "Canonical Inc.",
- "vendor_url": "https://www.ubuntu.com",
- "documentation_url": "https://help.ubuntu.com",
- "product_name": "Ubuntu",
- "product_url": "https://ubuntu.com/server",
- "registry_version": 3,
- "status": "stable",
- "maintainer": "Mohamad Siblini",
- "maintainer_email": "info@ictkin.com",
- "usage": "Username: gns3\nPassword: gns3 | MD5: 435f15a54f7f673e302ad26f05226e0e",
- "port_name_format": "ens{0}",
- "qemu": {
- "adapter_type": "virtio-net-pci",
- "adapters": 1,
- "ram": 2048,
- "hda_disk_interface": "virtio",
- "arch": "x86_64",
- "console_type": "vnc",
- "boot_priority": "c",
- "kvm": "require",
- "options": "-vga virtio"
- },
- "images": [
- {
- "filename": "Ubuntu Server 18.04.3 LTS (64bit).vmdk",
- "version": "18.04.3 LTS Server",
- "md5sum": "435f15a54f7f673e302ad26f05226e0e",
- "filesize": 2707814912,
- "download_url": "https://www.ictkin.com/gns3-appliance/"
- }
- ],
- "versions": [
- {
- "name": "18.04.3 LTS Server",
- "images": {
- "hda_disk_image": "Ubuntu Server 18.04.3 LTS (64bit).vmdk"
- }
- }
- ]
-}
diff --git a/gns3server/appliances/untangle.gns3a b/gns3server/appliances/untangle.gns3a
index 38f6b1d1..cdf0bbad 100644
--- a/gns3server/appliances/untangle.gns3a
+++ b/gns3server/appliances/untangle.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://wiki.untangle.com/index.php/Main_Page",
"product_name": "Untangle NG",
"product_url": "https://www.untangle.com/untangle-ng-firewall/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/viptela-edge-genericx86-64.gns3a b/gns3server/appliances/viptela-edge-genericx86-64.gns3a
index 34589774..f729590d 100644
--- a/gns3server/appliances/viptela-edge-genericx86-64.gns3a
+++ b/gns3server/appliances/viptela-edge-genericx86-64.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/",
"product_name": "VIPtela Edge",
"product_url": "http://www.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "Laurent LEVIER",
"maintainer_email": "laurent.levier@orange.com",
diff --git a/gns3server/appliances/viptela-smart-genericx86-64.gns3a b/gns3server/appliances/viptela-smart-genericx86-64.gns3a
index 040cd6f4..c877743e 100644
--- a/gns3server/appliances/viptela-smart-genericx86-64.gns3a
+++ b/gns3server/appliances/viptela-smart-genericx86-64.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/",
"product_name": "VIPtela Smart",
"product_url": "http://www.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "Laurent LEVIER",
"maintainer_email": "laurent.levier@orange.com",
diff --git a/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a b/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a
index ad94b338..8c547ec4 100644
--- a/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a
+++ b/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "http://www.cisco.com/",
"product_name": "VIPtela Manage",
"product_url": "http://www.cisco.com/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "Laurent LEVIER",
"maintainer_email": "laurent.levier@orange.com",
diff --git a/gns3server/appliances/vrin.gns3a b/gns3server/appliances/vrin.gns3a
index 830e7ea7..ef386123 100644
--- a/gns3server/appliances/vrin.gns3a
+++ b/gns3server/appliances/vrin.gns3a
@@ -6,7 +6,7 @@
"vendor_name": "Andras Dosztal",
"vendor_url": "https://sourceforge.net/projects/vrin/",
"product_name": "vRIN",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "Andras Dosztal",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/vyos.gns3a b/gns3server/appliances/vyos.gns3a
index 7fbe68ca..fd6f97f1 100644
--- a/gns3server/appliances/vyos.gns3a
+++ b/gns3server/appliances/vyos.gns3a
@@ -8,11 +8,11 @@
"documentation_url": "https://docs.vyos.io/",
"product_name": "VyOS",
"product_url": "https://vyos.net/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
- "usage": "Default username/password is vyos/vyos.\n\nAt first boot the router will start from the cdrom. Login and then type \"install image\" and follow the instructions.",
+ "usage": "Default username/password is vyos/vyos.\n\nThe -KVM versions are ready to use, no installation is required.\nThe other images will start the router from the CDROM on initial boot. Login and then type \"install image\" and follow the instructions.",
"symbol": "vyos.svg",
"port_name_format": "eth{0}",
"qemu": {
@@ -54,12 +54,37 @@
"filesize": 338690048,
"download_url": "https://support.vyos.io/en/downloads/files/vyos-1-3-0-generic-iso-image"
},
+ {
+ "filename": "vyos-1.2.9-S1-amd64.iso",
+ "version": "1.2.9-S1",
+ "md5sum": "3fece6363f9766f862e26d292d0ed5a3",
+ "filesize": 430964736,
+ "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-s1-generic-iso-image",
+ "direct_download_url": "https://s3-us.vyos.io/1.2.9-S1/vyos-1.2.9-S1-amd64.iso"
+ },
+ {
+ "filename": "vyos-1.2.9-S1-10G-qemu.qcow2",
+ "version": "1.2.9-S1-KVM",
+ "md5sum": "0a70d78b80a3716d42487c02ef44f41f",
+ "filesize": 426967040,
+ "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-s1-for-kvm",
+ "direct_download_url": "https://s3-us.vyos.io/1.2.9-S1/vyos-1.2.9-S1-10G-qemu.qcow2"
+ },
{
"filename": "vyos-1.2.9-amd64.iso",
"version": "1.2.9",
"md5sum": "586be23b6256173e174c82d8f1f699a1",
"filesize": 430964736,
- "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-generic-iso-image"
+ "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-generic-iso-image",
+ "direct_download_url": "https://s3-us.vyos.io/1.2.9/vyos-1.2.9-amd64.iso"
+ },
+ {
+ "filename": "vyos-1.2.9-10G-qemu.qcow2",
+ "version": "1.2.9-KVM",
+ "md5sum": "76871c7b248c32f75177c419128257ac",
+ "filesize": 427360256,
+ "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-10g-qemu-qcow2",
+ "direct_download_url": "https://s3-us.vyos.io/1.2.9/vyos-1.2.9-10G-qemu.qcow2"
},
{
"filename": "vyos-1.2.8-amd64.iso",
@@ -68,20 +93,12 @@
"filesize": 429916160,
"download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-8-generic-iso-image"
},
- {
- "filename": "vyos-1.2.7-amd64.iso",
- "version": "1.2.7",
- "md5sum": "1a06255edfac63fa3ea89353317130bf",
- "filesize": 428867584,
- "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-7-generic-iso-image"
- },
{
"filename": "vyos-1.1.8-amd64.iso",
"version": "1.1.8",
"md5sum": "95a141d4b592b81c803cdf7e9b11d8ea",
"filesize": 241172480,
- "download_url": "https://support.vyos.io/en/downloads/files/vyos-1-1-8-iso",
- "direct_download_url": "https://s3.amazonaws.com/s3-us.vyos.io/vyos-1.1.8-amd64.iso"
+ "direct_download_url": "https://s3-us.vyos.io/vyos-1.1.8-amd64.iso"
},
{
"filename": "empty8G.qcow2",
@@ -121,6 +138,19 @@
"cdrom_image": "vyos-1.3.0-amd64.iso"
}
},
+ {
+ "name": "1.2.9-S1",
+ "images": {
+ "hda_disk_image": "empty8G.qcow2",
+ "cdrom_image": "vyos-1.2.9-S1-amd64.iso"
+ }
+ },
+ {
+ "name": "1.2.9-S1-KVM",
+ "images": {
+ "hda_disk_image": "vyos-1.2.9-S1-10G-qemu.qcow2"
+ }
+ },
{
"name": "1.2.9",
"images": {
@@ -128,6 +158,12 @@
"cdrom_image": "vyos-1.2.9-amd64.iso"
}
},
+ {
+ "name": "1.2.9-KVM",
+ "images": {
+ "hda_disk_image": "vyos-1.2.9-10G-qemu.qcow2"
+ }
+ },
{
"name": "1.2.8",
"images": {
@@ -135,13 +171,6 @@
"cdrom_image": "vyos-1.2.8-amd64.iso"
}
},
- {
- "name": "1.2.7",
- "images": {
- "hda_disk_image": "empty8G.qcow2",
- "cdrom_image": "vyos-1.2.7-amd64.iso"
- }
- },
{
"name": "1.1.8",
"images": {
diff --git a/gns3server/appliances/watchguard-fireboxv.gns3a b/gns3server/appliances/watchguard-fireboxv.gns3a
index c6ddd2f2..0719ba6b 100644
--- a/gns3server/appliances/watchguard-fireboxv.gns3a
+++ b/gns3server/appliances/watchguard-fireboxv.gns3a
@@ -1,6 +1,6 @@
{
"appliance_id": "dee2b360-e1f4-487f-bd2f-2296f7167543",
- "name": "WatchGuard",
+ "name": "WatchGuard FireboxV",
"category": "firewall",
"description": "Organizations of all sizes are turning to virtualization to reduce costs and increase the efficiency, availability, and flexibility of their IT resources. But virtualization comes at a cost. Virtual environments are complex to manage and vulnerable to security threats. IT must be prepared. Now applications can be secured, resources can be maximized and your IT department can reap the rewards of having a single, unified management system - without a security risk in sight. WatchGuard FireboxV brings best-in-class network security to the world of virtualization. With real-time monitoring, multi-WAN support and scalable solutions to fit any-sized business, your virtual environments can be just as secure as your physical one.",
"vendor_name": "WatchGuard",
diff --git a/gns3server/appliances/watchguard-xtmv.gns3a b/gns3server/appliances/watchguard-xtmv.gns3a
index 62451a59..3153e695 100644
--- a/gns3server/appliances/watchguard-xtmv.gns3a
+++ b/gns3server/appliances/watchguard-xtmv.gns3a
@@ -1,6 +1,6 @@
{
"appliance_id": "816cedad-04ae-46e5-840d-20c2a50b6ba5",
- "name": "WatchGuard",
+ "name": "WatchGuard XTMv",
"category": "firewall",
"description": "Organizations of all sizes are turning to virtualization to reduce costs and increase the efficiency, availability, and flexibility of their IT resources. But virtualization comes at a cost. Virtual environments are complex to manage and vulnerable to security threats. IT must be prepared. Now applications can be secured, resources can be maximized and your IT department can reap the rewards of having a single, unified management system - without a security risk in sight. WatchGuard XTMv brings best-in-class network security to the world of virtualization. With real-time monitoring, multi-WAN support and scalable solutions to fit any-sized business, your virtual environments can be just as secure as your physical one.",
"vendor_name": "WatchGuard",
diff --git a/gns3server/appliances/webterm.gns3a b/gns3server/appliances/webterm.gns3a
index ffb71d7a..fa20816d 100644
--- a/gns3server/appliances/webterm.gns3a
+++ b/gns3server/appliances/webterm.gns3a
@@ -6,10 +6,10 @@
"vendor_name": "webterm",
"vendor_url": "https://www.debian.org",
"product_name": "webterm",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
- "maintainer": "GNS3 Team",
- "maintainer_email": "developers@gns3.net",
+ "maintainer": "Bernhard Ehlers",
+ "maintainer_email": "dev-ehlers@mailbox.org",
"usage": "The /root directory is persistent.",
"symbol": "firefox.svg",
"docker": {
diff --git a/gns3server/appliances/windows-11-dev-env.gns3a b/gns3server/appliances/windows-11-dev-env.gns3a
new file mode 100644
index 00000000..b0888e46
--- /dev/null
+++ b/gns3server/appliances/windows-11-dev-env.gns3a
@@ -0,0 +1,59 @@
+{
+ "appliance_id": "f3b6a3ac-7be5-4bb0-b204-da3712fb646c",
+ "name": "Windows-11-Dev-Env",
+ "category": "guest",
+ "description": "Windows 11 Developer Environment Virtual Machine.",
+ "vendor_name": "Microsoft",
+ "vendor_url": "https://www.microsoft.com",
+ "documentation_url": "https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/",
+ "product_name": "Windows 11 Development Environment",
+ "product_url": "https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/",
+ "registry_version": 5,
+ "status": "experimental",
+ "availability": "free",
+ "maintainer": "Ean Towne",
+ "maintainer_email": "eantowne@gmail.com",
+ "usage": "Uses SPICE not VNC\nHighly recommended to install the SPICE-agent from: https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe to be able to change resolution and increase performance.\nThis is an evaluation virtual machine (90 days) and includes:\n* Window 11 Enterprise (Evaluation)\n* Visual Studio 2022 Community Edition with UWP .NET Desktop, Azure, and Windows App SDK for C# workloads enabled\n* Windows Subsystem for Linux 2 enabled with Ubuntu installed\n* Windows Terminal installed\n* Developer mode enabled",
+ "symbol": "microsoft.svg",
+ "first_port_name": "Network Adapter 1",
+ "port_name_format": "Network Adapter {0}",
+ "qemu": {
+ "adapter_type": "e1000",
+ "adapters": 1,
+ "ram": 4096,
+ "cpus": 4,
+ "hda_disk_interface": "sata",
+ "arch": "x86_64",
+ "console_type": "spice",
+ "boot_priority": "c",
+ "kvm": "require"
+ },
+ "images": [
+ {
+ "filename": "WinDev2212Eval-disk1.vmdk",
+ "version": "2212",
+ "md5sum": "c79f393a067b92e01a513a118d455ac8",
+ "filesize": 24620493824,
+ "download_url": "https://aka.ms/windev_VM_vmware",
+ "compression": "zip"
+ },
+ {
+ "filename": "OVMF-edk2-stable202305.fd",
+ "version": "stable202305",
+ "md5sum": "6c4cf1519fec4a4b95525d9ae562963a",
+ "filesize": 4194304,
+ "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
+ "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/OVMF-edk2-stable202305.fd.zip/download",
+ "compression": "zip"
+ }
+ ],
+ "versions": [
+ {
+ "name": "2212",
+ "images": {
+ "bios_image": "OVMF-edk2-stable202305.fd",
+ "hda_disk_image": "WinDev2212Eval-disk1.vmdk"
+ }
+ }
+ ]
+}
diff --git a/gns3server/appliances/windows-xp+ie.gns3a b/gns3server/appliances/windows-xp+ie.gns3a
index eedc0de2..15b40cee 100644
--- a/gns3server/appliances/windows-xp+ie.gns3a
+++ b/gns3server/appliances/windows-xp+ie.gns3a
@@ -1,12 +1,12 @@
{
"appliance_id": "3976f732-7d50-4dba-b5f7-e2f2c17129eb",
- "name": "Windows",
+ "name": "Windows XP",
"category": "guest",
"description": "Microsoft Windows XP is a graphical operating system developed, marketed, and sold by Microsoft.\n\nMicrosoft has released time limited VMs for testing Internet Explorer.",
"vendor_name": "Microsoft",
"vendor_url": "http://www.microsoft.com",
"product_name": "Windows XP",
- "registry_version": 3,
+ "registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/windows_server.gns3a b/gns3server/appliances/windows_server.gns3a
index 153391ba..fec9bcf0 100644
--- a/gns3server/appliances/windows_server.gns3a
+++ b/gns3server/appliances/windows_server.gns3a
@@ -27,6 +27,13 @@
"options": "-usbdevice tablet"
},
"images": [
+ {
+ "filename": "SERVER_EVAL_x64FRE_en-us.iso",
+ "version": "2022",
+ "md5sum": "e7908933449613edc97e1b11180429d1",
+ "filesize": 5044094976,
+ "download_url": "https://www.microsoft.com/en-gb/evalcenter/evaluate-windows-server-2022"
+ },
{
"filename": "Win2k16_14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"version": "2016",
@@ -51,6 +58,13 @@
}
],
"versions": [
+ {
+ "name": "2022",
+ "images": {
+ "hda_disk_image": "empty100G.qcow2",
+ "cdrom_image": "SERVER_EVAL_x64FRE_en-us.iso"
+ }
+ },
{
"name": "2016",
"images": {
diff --git a/gns3server/appliances/zentyal-server.gns3a b/gns3server/appliances/zentyal-server.gns3a
index b173b812..9d45ab94 100644
--- a/gns3server/appliances/zentyal-server.gns3a
+++ b/gns3server/appliances/zentyal-server.gns3a
@@ -8,7 +8,7 @@
"documentation_url": "https://wiki.zentyal.org/wiki/Zentyal_Wiki",
"product_name": "Zentyal Server",
"product_url": "http://www.zentyal.com/zentyal-server/",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/appliances/zeroshell.gns3a b/gns3server/appliances/zeroshell.gns3a
index e34dc337..27ea916a 100644
--- a/gns3server/appliances/zeroshell.gns3a
+++ b/gns3server/appliances/zeroshell.gns3a
@@ -7,7 +7,7 @@
"vendor_url": "http://www.zeroshell.org",
"documentation_url": "http://www.zeroshell.org/documentation/",
"product_name": "ZeroShell",
- "registry_version": 3,
+ "registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
diff --git a/gns3server/compute/base_manager.py b/gns3server/compute/base_manager.py
index a96fe2e7..48082e57 100644
--- a/gns3server/compute/base_manager.py
+++ b/gns3server/compute/base_manager.py
@@ -423,7 +423,7 @@ class BaseManager:
# Windows path should not be send to a unix server
if re.match(r"^[A-Z]:", path) is not None:
raise NodeError(
- f"'{path}' is not allowed on this remote server. Please only use a file from '{img_directory}'"
+ f"'{path}' is not allowed on this remote server (Windows path). Please only use a file from '{img_directory}'"
)
if not os.path.isabs(orig_path):
diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py
index 1ae0bb57..c877f5ff 100644
--- a/gns3server/compute/base_node.py
+++ b/gns3server/compute/base_node.py
@@ -92,6 +92,8 @@ class BaseNode:
self._wrap_console = wrap_console
self._wrap_aux = wrap_aux
self._wrapper_telnet_servers = []
+ self._wrap_console_reader = None
+ self._wrap_console_writer = None
self._internal_console_port = None
self._internal_aux_port = None
self._custom_adapters = []
@@ -375,7 +377,6 @@ class BaseNode:
if self._wrap_console:
self._manager.port_manager.release_tcp_port(self._internal_console_port, self._project)
self._internal_console_port = None
-
if self._aux:
self._manager.port_manager.release_tcp_port(self._aux, self._project)
self._aux = None
@@ -415,15 +416,23 @@ class BaseNode:
remaining_trial = 60
while True:
try:
- (reader, writer) = await asyncio.open_connection(host="127.0.0.1", port=internal_port)
+ (self._wrap_console_reader, self._wrap_console_writer) = await asyncio.open_connection(
+ host="127.0.0.1",
+ port=self._internal_console_port
+ )
break
except (OSError, ConnectionRefusedError) as e:
if remaining_trial <= 0:
raise e
await asyncio.sleep(0.1)
remaining_trial -= 1
- await AsyncioTelnetServer.write_client_intro(writer, echo=True)
- server = AsyncioTelnetServer(reader=reader, writer=writer, binary=True, echo=True)
+ await AsyncioTelnetServer.write_client_intro(self._wrap_console_writer, echo=True)
+ server = AsyncioTelnetServer(
+ reader=self._wrap_console_reader,
+ writer=self._wrap_console_writer,
+ binary=True,
+ echo=True
+ )
# warning: this will raise OSError exception if there is a problem...
telnet_server = await asyncio.start_server(server.run, self._manager.port_manager.console_host, external_port)
self._wrapper_telnet_servers.append(telnet_server)
@@ -453,14 +462,17 @@ class BaseNode:
Stops the telnet proxy servers.
"""
+ if self._wrap_console_writer:
+ self._wrap_console_writer.close()
+ await self._wrap_console_writer.wait_closed()
for telnet_proxy_server in self._wrapper_telnet_servers:
telnet_proxy_server.close()
await telnet_proxy_server.wait_closed()
self._wrapper_telnet_servers = []
- async def reset_console(self):
+ async def reset_wrap_console(self):
"""
- Reset console
+ Reset the wrap console (restarts the Telnet proxy)
"""
await self.stop_wrap_console()
@@ -515,14 +527,17 @@ class BaseNode:
if data:
await websocket.send_bytes(data)
- # keep forwarding WebSocket data in both direction
- done, pending = await asyncio.wait(
- [ws_forward(telnet_writer), telnet_forward(telnet_reader)], return_when=asyncio.FIRST_COMPLETED
- )
+ # keep forwarding websocket data in both direction
+ if sys.version_info >= (3, 11, 0):
+ # Starting with Python 3.11, passing coroutine objects to wait() directly is forbidden.
+ aws = [asyncio.create_task(ws_forward(telnet_writer)), asyncio.create_task(telnet_forward(telnet_reader))]
+ else:
+ aws = [ws_forward(telnet_writer), telnet_forward(telnet_reader)]
+
+ done, pending = await asyncio.wait(aws, return_when=asyncio.FIRST_COMPLETED)
for task in done:
if task.exception():
log.warning(f"Exception while forwarding WebSocket data to Telnet server {task.exception()}")
-
for task in pending:
task.cancel()
diff --git a/gns3server/compute/docker/__init__.py b/gns3server/compute/docker/__init__.py
index ad2324a1..9e9e72b1 100644
--- a/gns3server/compute/docker/__init__.py
+++ b/gns3server/compute/docker/__init__.py
@@ -18,11 +18,15 @@
Docker server module.
"""
+import os
import sys
import json
import asyncio
import logging
import aiohttp
+import shutil
+import subprocess
+
from gns3server.utils import parse_version
from gns3server.utils.asyncio import locking
from gns3server.compute.base_manager import BaseManager
@@ -54,6 +58,39 @@ class Docker(BaseManager):
self._session = None
self._api_version = DOCKER_MINIMUM_API_VERSION
+ @staticmethod
+ async def install_busybox():
+
+ if not sys.platform.startswith("linux"):
+ return
+ dst_busybox = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "bin", "busybox")
+ if os.path.isfile(dst_busybox):
+ return
+ for busybox_exec in ("busybox-static", "busybox.static", "busybox"):
+ busybox_path = shutil.which(busybox_exec)
+ if busybox_path:
+ try:
+ # check that busybox is statically linked
+ # (dynamically linked busybox will fail to run in a container)
+ proc = await asyncio.create_subprocess_exec(
+ "ldd",
+ busybox_path,
+ stdout=asyncio.subprocess.PIPE,
+ stderr=asyncio.subprocess.DEVNULL
+ )
+ stdout, _ = await proc.communicate()
+ if proc.returncode == 1:
+ # ldd returns 1 if the file is not a dynamic executable
+ log.info(f"Installing busybox from '{busybox_path}' to '{dst_busybox}'")
+ shutil.copy2(busybox_path, dst_busybox, follow_symlinks=True)
+ return
+ else:
+ log.warning(f"Busybox '{busybox_path}' is dynamically linked\n"
+ f"{stdout.decode('utf-8', errors='ignore').strip()}")
+ except OSError as e:
+ raise DockerError(f"Could not install busybox: {e}")
+ raise DockerError("No busybox executable could be found")
+
async def _check_connection(self):
if not self._connected:
@@ -155,7 +192,7 @@ class Docker(BaseManager):
)
except aiohttp.ClientError as e:
raise DockerError(f"Docker has returned an error: {e}")
- except (asyncio.TimeoutError):
+ except asyncio.TimeoutError:
raise DockerError("Docker timeout " + method + " " + path)
if response.status >= 300:
body = await response.read()
diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py
index 01212982..bd94e86e 100644
--- a/gns3server/compute/docker/docker_vm.py
+++ b/gns3server/compute/docker/docker_vm.py
@@ -107,7 +107,6 @@ class DockerVM(BaseNode):
self._ethernet_adapters = []
self._temporary_directory = None
self._telnet_servers = []
- self._xvfb_process = None
self._vnc_process = None
self._vncconfig_process = None
self._console_resolution = console_resolution
@@ -303,7 +302,12 @@ class DockerVM(BaseNode):
resources = get_resource("compute/docker/resources")
if not os.path.exists(resources):
raise DockerError(f"{resources} is missing, can't start Docker container")
- binds = [f"{resources}:/gns3:ro"]
+ binds = [{
+ "Type": "bind",
+ "Source": resources,
+ "Target": "/gns3",
+ "ReadOnly": True
+ }]
# We mount our own etc/network
try:
@@ -334,7 +338,11 @@ class DockerVM(BaseNode):
for volume in self._volumes:
source = os.path.join(self.working_dir, os.path.relpath(volume, "/"))
os.makedirs(source, exist_ok=True)
- binds.append(f"{source}:/gns3volumes{volume}")
+ binds.append({
+ "Type": "bind",
+ "Source": source,
+ "Target": "/gns3volumes{}".format(volume)
+ })
return binds
@@ -383,6 +391,9 @@ class DockerVM(BaseNode):
Creates the Docker container.
"""
+ if ":" in os.path.splitdrive(self.working_dir)[1]:
+ raise DockerError("Cannot create a Docker container with a project directory containing a colon character (':')")
+
try:
image_infos = await self._get_image_information()
except DockerHttp404Error:
@@ -410,7 +421,7 @@ class DockerVM(BaseNode):
"HostConfig": {
"CapAdd": ["ALL"],
"Privileged": True,
- "Binds": self._mount_binds(image_infos),
+ "Mounts": self._mount_binds(image_infos),
"Memory": self._memory * (1024 * 1024), # convert memory to bytes
"NanoCpus": int(self._cpus * 1e9), # convert cpus to nano cpus
},
@@ -475,7 +486,11 @@ class DockerVM(BaseNode):
"QT_GRAPHICSSYSTEM=native"
) # To fix a Qt issue: https://github.com/GNS3/gns3-server/issues/556
params["Env"].append(f"DISPLAY=:{self._display}")
- params["HostConfig"]["Binds"].append("/tmp/.X11-unix/:/tmp/.X11-unix/")
+ params["HostConfig"]["Mounts"].append({
+ "Type": "bind",
+ "Source": "/tmp/.X11-unix/",
+ "Target": "/tmp/.X11-unix/"
+ })
if self._extra_hosts:
extra_hosts = self._format_extra_hosts(self._extra_hosts)
@@ -508,7 +523,7 @@ class DockerVM(BaseNode):
async def update(self):
"""
- Destroy an recreate the container with the new settings
+ Destroy and recreate the container with the new settings
"""
# We need to save the console and state and restore it
@@ -529,6 +544,9 @@ class DockerVM(BaseNode):
Starts this Docker container.
"""
+ # make sure busybox is installed
+ await self.manager.install_busybox()
+
try:
state = await self._get_container_state()
except DockerHttp404Error:
@@ -665,8 +683,8 @@ class DockerVM(BaseNode):
self._display = self._get_free_display_port()
tigervnc_path = shutil.which("Xtigervnc") or shutil.which("Xvnc")
- if not (tigervnc_path or shutil.which("Xvfb") and shutil.which("x11vnc")):
- raise DockerError("Please install TigerVNC (recommended) or Xvfb + x11vnc before using VNC support")
+ if not tigervnc_path:
+ raise DockerError("Please install TigerVNC server before using VNC support")
if tigervnc_path:
with open(os.path.join(self.working_dir, "vnc.log"), "w") as fd:
@@ -680,29 +698,6 @@ class DockerVM(BaseNode):
"-SecurityTypes", "None",
":{}".format(self._display),
stdout=fd, stderr=subprocess.STDOUT)
- else:
- if restart is False:
- self._xvfb_process = await asyncio.create_subprocess_exec("Xvfb",
- "-nolisten", "tcp",
- "-extension", "MIT-SHM",
- ":{}".format(self._display),
- "-screen", "0",
- self._console_resolution + "x16")
-
- # We pass a port for TCPV6 due to a crash in X11VNC if not here: https://github.com/GNS3/gns3-server/issues/569
- with open(os.path.join(self.working_dir, "vnc.log"), "w") as fd:
- self._vnc_process = await asyncio.create_subprocess_exec("x11vnc",
- "-forever",
- "-nopw",
- "-shared",
- "-noshm",
- "-geometry", self._console_resolution,
- "-display", "WAIT:{}".format(self._display),
- "-rfbport", str(self.console),
- "-rfbportv6", str(self.console),
- "-noncache",
- "-listen", self._manager.port_manager.console_host,
- stdout=fd, stderr=subprocess.STDOUT)
async def _start_vnc(self):
"""
@@ -711,8 +706,8 @@ class DockerVM(BaseNode):
self._display = self._get_free_display_port()
tigervnc_path = shutil.which("Xtigervnc") or shutil.which("Xvnc")
- if not (tigervnc_path or shutil.which("Xvfb") and shutil.which("x11vnc")):
- raise DockerError("Please install TigerVNC server (recommended) or Xvfb + x11vnc before using VNC support")
+ if not tigervnc_path:
+ raise DockerError("Please install TigerVNC server before using VNC support")
await self._start_vnc_process()
x11_socket = os.path.join("/tmp/.X11-unix/", f"X{self._display}")
try:
@@ -986,12 +981,6 @@ class DockerVM(BaseNode):
await self._vnc_process.wait()
except ProcessLookupError:
pass
- if self._xvfb_process:
- try:
- self._xvfb_process.terminate()
- await self._xvfb_process.wait()
- except ProcessLookupError:
- pass
if self._display:
display = f"/tmp/.X11-unix/X{self._display}"
diff --git a/gns3server/compute/docker/resources/bin/udhcpc b/gns3server/compute/docker/resources/bin/udhcpc
old mode 100644
new mode 100755
diff --git a/gns3server/compute/docker/resources/init.sh b/gns3server/compute/docker/resources/init.sh
index e21627d7..695a7998 100755
--- a/gns3server/compute/docker/resources/init.sh
+++ b/gns3server/compute/docker/resources/init.sh
@@ -87,5 +87,13 @@ done
ifup -a -f
# continue normal docker startup
-eval HOME=$(echo ~${GNS3_USER-root})
+case "$GNS3_USER" in
+ [1-9][0-9]*)
+ # for when the user field defined in the Docker container is an ID
+ export GNS3_USER=$(cat /etc/passwd | grep ${GNS3_USER-root} | awk -F: '{print $1}')
+ ;;
+ *)
+ ;;
+esac
+eval HOME="$(echo ~${GNS3_USER-root})"
exec su ${GNS3_USER-root} -p -- /gns3/run-cmd.sh "$OLD_PATH" "$@"
diff --git a/gns3server/compute/dynamips/__init__.py b/gns3server/compute/dynamips/__init__.py
index f4b56d05..b1211a47 100644
--- a/gns3server/compute/dynamips/__init__.py
+++ b/gns3server/compute/dynamips/__init__.py
@@ -26,13 +26,14 @@ import time
import asyncio
import tempfile
import logging
+import subprocess
import glob
import re
log = logging.getLogger(__name__)
from gns3server.utils.interfaces import interfaces, is_interface_up
-from gns3server.utils.asyncio import wait_run_in_executor
+from gns3server.utils.asyncio import wait_run_in_executor, subprocess_check_output
from gns3server.utils import parse_version
from uuid import uuid4
from ..base_manager import BaseManager
@@ -263,6 +264,25 @@ class Dynamips(BaseManager):
self._dynamips_path = dynamips_path
return dynamips_path
+ @staticmethod
+ async def dynamips_version(dynamips_path):
+ """
+ Gets the Dynamips version
+
+ :param dynamips_path: path to Dynamips executable.
+ """
+
+ try:
+ output = await subprocess_check_output(dynamips_path, "-P", "none")
+ match = re.search(r"Cisco Router Simulation Platform \(version\s+([\d.]+)", output)
+ if match:
+ version = match.group(1)
+ return version
+ else:
+ raise DynamipsError("Could not determine the Dynamips version for {}".format(dynamips_path))
+ except (OSError, subprocess.SubprocessError) as e:
+ raise DynamipsError("Error while looking for the Dynamips version: {}".format(e))
+
async def start_new_hypervisor(self, working_dir=None):
"""
Creates a new Dynamips process and start it.
@@ -278,9 +298,20 @@ class Dynamips(BaseManager):
if not working_dir:
working_dir = tempfile.gettempdir()
- # FIXME: hypervisor should always listen to 127.0.0.1
- # See https://github.com/GNS3/dynamips/issues/62
server_host = self.config.settings.Server.host
+ bind_console_host = False
+
+ dynamips_version = await self.dynamips_version(self.dynamips_path)
+ if parse_version(dynamips_version) < parse_version('0.2.11'):
+ raise DynamipsError("Dynamips version must be >= 0.2.11, detected version is {}".format(dynamips_version))
+
+ if not sys.platform.startswith("win"):
+ # Hypervisor should always listen to 127.0.0.1
+ # See https://github.com/GNS3/dynamips/issues/62
+ # This was fixed in Dynamips v0.2.23 which hasn't been built for Windows
+ if parse_version(dynamips_version) >= parse_version('0.2.23'):
+ server_host = "127.0.0.1"
+ bind_console_host = True
try:
info = socket.getaddrinfo(server_host, 0, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
@@ -297,15 +328,12 @@ class Dynamips(BaseManager):
raise DynamipsError(f"Could not find free port for the Dynamips hypervisor: {e}")
port_manager = PortManager.instance()
- hypervisor = Hypervisor(self._dynamips_path, working_dir, server_host, port, port_manager.console_host)
+ hypervisor = Hypervisor(self._dynamips_path, working_dir, server_host, port, port_manager.console_host, bind_console_host)
log.info(f"Creating new hypervisor {hypervisor.host}:{hypervisor.port} with working directory {working_dir}")
await hypervisor.start()
log.info(f"Hypervisor {hypervisor.host}:{hypervisor.port} has successfully started")
await hypervisor.connect()
- if parse_version(hypervisor.version) < parse_version("0.2.11"):
- raise DynamipsError(f"Dynamips version must be >= 0.2.11, detected version is {hypervisor.version}")
-
return hypervisor
async def ghost_ios_support(self, vm):
diff --git a/gns3server/compute/dynamips/dynamips_hypervisor.py b/gns3server/compute/dynamips/dynamips_hypervisor.py
index e7465a55..187876eb 100644
--- a/gns3server/compute/dynamips/dynamips_hypervisor.py
+++ b/gns3server/compute/dynamips/dynamips_hypervisor.py
@@ -95,7 +95,9 @@ class DynamipsHypervisor:
try:
version = await self.send("hypervisor version")
self._version = version[0].split("-", 1)[0]
+ log.info("Dynamips version {} detected".format(self._version))
except IndexError:
+ log.warning("Dynamips version could not be detected")
self._version = "Unknown"
# this forces to send the working dir to Dynamips
diff --git a/gns3server/compute/dynamips/hypervisor.py b/gns3server/compute/dynamips/hypervisor.py
index 2d4999f6..517605f3 100644
--- a/gns3server/compute/dynamips/hypervisor.py
+++ b/gns3server/compute/dynamips/hypervisor.py
@@ -46,7 +46,7 @@ class Hypervisor(DynamipsHypervisor):
_instance_count = 1
- def __init__(self, path, working_dir, host, port, console_host):
+ def __init__(self, path, working_dir, host, port, console_host, bind_console_host=False):
super().__init__(working_dir, host, port)
@@ -55,6 +55,7 @@ class Hypervisor(DynamipsHypervisor):
Hypervisor._instance_count += 1
self._console_host = console_host
+ self._bind_console_host = bind_console_host
self._path = path
self._command = []
self._process = None
@@ -196,12 +197,14 @@ class Hypervisor(DynamipsHypervisor):
command = [self._path]
command.extend(["-N1"]) # use instance IDs for filenames
- command.extend(["-l", f"dynamips_i{self._id}_log.txt"]) # log file
- # Dynamips cannot listen for hypervisor commands and for console connections on
- # 2 different IP addresses.
- # See https://github.com/GNS3/dynamips/issues/62
- if self._console_host != "0.0.0.0" and self._console_host != "::":
- command.extend(["-H", f"{self._host}:{self._port}"])
+ command.extend(["-l", "dynamips_i{}_log.txt".format(self._id)]) # log file
+
+ if self._bind_console_host:
+ # support was added in Dynamips version 0.2.23
+ command.extend(["-H", "{}:{}".format(self._host, self._port), "--console-binding-addr", self._console_host])
+ elif self._console_host != "0.0.0.0" and self._console_host != "::":
+ command.extend(["-H", "{}:{}".format(self._host, self._port)])
else:
command.extend(["-H", str(self._port)])
+
return command
diff --git a/gns3server/compute/dynamips/nodes/router.py b/gns3server/compute/dynamips/nodes/router.py
index 1487ff2a..de353eb1 100644
--- a/gns3server/compute/dynamips/nodes/router.py
+++ b/gns3server/compute/dynamips/nodes/router.py
@@ -1012,11 +1012,8 @@ class Router(BaseNode):
if self.console_type != console_type:
status = await self.get_status()
if status == "running":
- raise DynamipsError(
- '"{name}" must be stopped to change the console type to {console_type}'.format(
- name=self._name, console_type=console_type
- )
- )
+ raise DynamipsError('"{name}" must be stopped to change the console type to {console_type}'.format(name=self._name,
+ console_type=console_type))
self.console_type = console_type
@@ -1033,6 +1030,13 @@ class Router(BaseNode):
self.aux = aux
await self._hypervisor.send(f'vm set_aux_tcp_port "{self._name}" {aux}')
+ async def reset_console(self):
+ """
+ Reset console
+ """
+
+ pass # reset console is not supported with Dynamips
+
async def get_cpu_usage(self, cpu_id=0):
"""
Shows cpu usage in seconds, "cpu_id" is ignored.
diff --git a/gns3server/compute/port_manager.py b/gns3server/compute/port_manager.py
index 1dfa58e2..6dd2549a 100644
--- a/gns3server/compute/port_manager.py
+++ b/gns3server/compute/port_manager.py
@@ -15,6 +15,7 @@
# along with this program. If not, see .
import socket
+import ipaddress
from fastapi import HTTPException, status
from gns3server.config import Config
@@ -145,13 +146,19 @@ class PortManager:
@console_host.setter
def console_host(self, new_host):
"""
- Bind console host to 0.0.0.0 if remote connections are allowed.
+ Bind console host to 0.0.0.0 or :: if remote connections are allowed.
"""
remote_console_connections = Config.instance().settings.Server.allow_remote_console
if remote_console_connections:
log.warning("Remote console connections are allowed")
self._console_host = "0.0.0.0"
+ try:
+ ip = ipaddress.ip_address(new_host)
+ if isinstance(ip, ipaddress.IPv6Address):
+ self._console_host = "::"
+ except ValueError:
+ log.warning("Could not determine IP address type for console host")
else:
self._console_host = new_host
diff --git a/gns3server/compute/qemu/__init__.py b/gns3server/compute/qemu/__init__.py
index 836c0ea3..e98bb9a8 100644
--- a/gns3server/compute/qemu/__init__.py
+++ b/gns3server/compute/qemu/__init__.py
@@ -193,9 +193,56 @@ class Qemu(BaseManager):
version = match.group(1)
return version
else:
- raise QemuError(f"Could not determine the Qemu-img version for {qemu_img_path}")
+ raise QemuError("Could not determine the Qemu-img version for '{}'".format(qemu_img_path))
except (OSError, subprocess.SubprocessError) as e:
- raise QemuError(f"Error while looking for the Qemu-img version: {e}")
+ raise QemuError("Error while looking for the Qemu-img version: {}".format(e))
+
+ @staticmethod
+ async def get_swtpm_version(swtpm_path):
+ """
+ Gets the swtpm version.
+
+ :param swtpm_path: path to swtpm executable.
+ """
+
+ try:
+ output = await subprocess_check_output(swtpm_path, "--version")
+ match = re.search(r"version\s+([\d.]+)", output)
+ if match:
+ version = match.group(1)
+ return version
+ else:
+ raise QemuError("Could not determine the swtpm version for '{}'".format(swtpm_path))
+ except (OSError, subprocess.SubprocessError) as e:
+ raise QemuError("Error while looking for the swtpm version: {}".format(e))
+
+ @staticmethod
+ def get_haxm_windows_version():
+ """
+ Gets the HAXM version number (Windows).
+
+ :returns: HAXM version number. Returns None if HAXM is not installed.
+ """
+
+ assert(sys.platform.startswith("win"))
+ import winreg
+
+ hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products")
+ version = None
+ for index in range(winreg.QueryInfoKey(hkey)[0]):
+ product_id = winreg.EnumKey(hkey, index)
+ try:
+ product_key = winreg.OpenKey(hkey, r"{}\InstallProperties".format(product_id))
+ try:
+ if winreg.QueryValueEx(product_key, "DisplayName")[0].endswith("Hardware Accelerated Execution Manager"):
+ version = winreg.QueryValueEx(product_key, "DisplayVersion")[0]
+ break
+ finally:
+ winreg.CloseKey(product_key)
+ except OSError:
+ continue
+ winreg.CloseKey(hkey)
+ return version
@staticmethod
def get_legacy_vm_workdir(legacy_vm_id, name):
diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py
index 7fe17f70..fa08fe2f 100644
--- a/gns3server/compute/qemu/qemu_vm.py
+++ b/gns3server/compute/qemu/qemu_vm.py
@@ -107,6 +107,7 @@ class QemuVM(BaseNode):
self._monitor_host = manager.config.settings.Qemu.monitor_host
self._process = None
self._cpulimit_process = None
+ self._swtpm_process = None
self._monitor = None
self._stdout_file = ""
self._qemu_img_stdout_file = ""
@@ -114,6 +115,7 @@ class QemuVM(BaseNode):
self._local_udp_tunnels = {}
self._guest_cid = None
self._command_line_changed = False
+ self._qemu_version = None
# QEMU VM settings
if qemu_path:
@@ -151,6 +153,8 @@ class QemuVM(BaseNode):
self._kernel_image = ""
self._kernel_command_line = ""
self._replicate_network_connection_state = True
+ self._tpm = False
+ self._uefi = False
self._create_config_disk = False
self._on_close = "power_off"
self._cpu_throttling = 0 # means no CPU throttling
@@ -253,7 +257,7 @@ class QemuVM(BaseNode):
if qemu_bin == "qemu":
self._platform = "i386"
else:
- self._platform = re.sub(r"^qemu-system-(.*)$", r"\1", qemu_bin, re.IGNORECASE)
+ self._platform = re.sub(r'^qemu-system-(\w+).*$', r'\1', qemu_bin, re.IGNORECASE)
try:
QemuPlatform(self._platform.split(".")[0])
@@ -728,7 +732,7 @@ class QemuVM(BaseNode):
"""
Sets whether a config disk is automatically created on HDD disk interface (secondary slave)
- :param replicate_network_connection_state: boolean
+ :param create_config_disk: boolean
"""
if create_config_disk:
@@ -874,6 +878,54 @@ class QemuVM(BaseNode):
log.info(f'QEMU VM "{self._name}" [{self._id}] has set maximum number of hotpluggable vCPUs to {maxcpus}')
self._maxcpus = maxcpus
+ @property
+ def tpm(self):
+ """
+ Returns whether TPM is activated for this QEMU VM.
+
+ :returns: boolean
+ """
+
+ return self._tpm
+
+ @tpm.setter
+ def tpm(self, tpm):
+ """
+ Sets whether TPM is activated for this QEMU VM.
+
+ :param tpm: boolean
+ """
+
+ if tpm:
+ log.info(f'QEMU VM "{self._name}" [{self._id}] has enabled the Trusted Platform Module (TPM)')
+ else:
+ log.info(f'QEMU VM "{self._name}" [{self._id}] has disabled the Trusted Platform Module (TPM)')
+ self._tpm = tpm
+
+ @property
+ def uefi(self):
+ """
+ Returns whether UEFI boot mode is activated for this QEMU VM.
+
+ :returns: boolean
+ """
+
+ return self._uefi
+
+ @uefi.setter
+ def uefi(self, uefi):
+ """
+ Sets whether UEFI boot mode is activated for this QEMU VM.
+
+ :param uefi: boolean
+ """
+
+ if uefi:
+ log.info(f'QEMU VM "{self._name}" [{self._id}] has enabled the UEFI boot mode')
+ else:
+ log.info(f'QEMU VM "{self._name}" [{self._id}] has disabled the UEFI boot mode')
+ self._uefi = uefi
+
@property
def options(self):
"""
@@ -1039,11 +1091,8 @@ class QemuVM(BaseNode):
"""
if self._cpulimit_process and self._cpulimit_process.returncode is None:
- self._cpulimit_process.kill()
- try:
- self._process.wait(3)
- except subprocess.TimeoutExpired:
- log.error(f"Could not kill cpulimit process {self._cpulimit_process.pid}")
+ self._cpulimit_process.terminate()
+ self._cpulimit_process = None
def _set_cpu_throttling(self):
"""
@@ -1054,10 +1103,13 @@ class QemuVM(BaseNode):
return
try:
- subprocess.Popen(
- ["cpulimit", "--lazy", f"--pid={self._process.pid}", f"--limit={self._cpu_throttling}"],
- cwd=self.working_dir,
- )
+ if sys.platform.startswith("win") and hasattr(sys, "frozen"):
+ cpulimit_exec = os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "cpulimit", "cpulimit.exe")
+ else:
+ cpulimit_exec = "cpulimit"
+
+ command = [cpulimit_exec, "--lazy", "--pid={}".format(self._process.pid), "--limit={}".format(self._cpu_throttling)]
+ self._cpulimit_process = subprocess.Popen(command, cwd=self.working_dir)
log.info(f"CPU throttled to {self._cpu_throttling}%")
except FileNotFoundError:
raise QemuError("cpulimit could not be found, please install it or deactivate CPU throttling")
@@ -1110,6 +1162,10 @@ class QemuVM(BaseNode):
# check if there is enough RAM to run
self.check_available_ram(self.ram)
+ # start swtpm (TPM emulator) first if TPM is enabled
+ if self._tpm:
+ await self._start_swtpm()
+
command = await self._build_command()
command_string = " ".join(shlex.quote(s) for s in command)
try:
@@ -1134,7 +1190,6 @@ class QemuVM(BaseNode):
await self._set_process_priority()
if self._cpu_throttling:
self._set_cpu_throttling()
-
if "-enable-kvm" in command_string or "-enable-hax" in command_string:
self._hw_virtualization = True
@@ -1219,6 +1274,7 @@ class QemuVM(BaseNode):
log.warning(f'QEMU VM "{self._name}" PID={self._process.pid} is still running')
self._process = None
self._stop_cpulimit()
+ self._stop_swtpm()
if self.on_close != "save_vm_state":
await self._clear_save_vm_stated()
await self._export_config()
@@ -1746,6 +1802,14 @@ class QemuVM(BaseNode):
self._process = None
return False
+ async def reset_console(self):
+ """
+ Reset console
+ """
+
+ if self.is_running():
+ await self.reset_wrap_console()
+
def command(self):
"""
Returns the QEMU command line.
@@ -2026,8 +2090,7 @@ class QemuVM(BaseNode):
f"file={disk},if=none,id=drive{disk_index},index={disk_index},media=disk{extra_drive_options}",
]
)
- qemu_version = await self.manager.get_qemu_version(self.qemu_path)
- if qemu_version and parse_version(qemu_version) >= parse_version("4.2.0"):
+ if self._qemu_version and parse_version(self._qemu_version) >= parse_version("4.2.0"):
# The ‘ide-drive’ device is deprecated since version 4.2.0
# https://qemu.readthedocs.io/en/latest/system/deprecated.html#ide-drive-since-4-2
options.extend(
@@ -2207,6 +2270,8 @@ class QemuVM(BaseNode):
options = []
if self._bios_image:
+ if self._uefi:
+ raise QemuError("Cannot use a bios image and the UEFI boot mode at the same time")
if not os.path.isfile(self._bios_image) or not os.path.exists(self._bios_image):
if os.path.islink(self._bios_image):
raise QemuError(
@@ -2215,6 +2280,20 @@ class QemuVM(BaseNode):
else:
raise QemuError(f"bios image '{self._bios_image}' is not accessible")
options.extend(["-bios", self._bios_image.replace(",", ",,")])
+ elif self._uefi:
+ # get the OVMF firmware from the images directory
+ ovmf_firmware_path = self.manager.get_abs_image_path("OVMF_CODE.fd")
+ log.info("Configuring UEFI boot mode using OVMF file: '{}'".format(ovmf_firmware_path))
+ options.extend(["-drive", "if=pflash,format=raw,readonly,file={}".format(ovmf_firmware_path)])
+
+ # the node should have its own copy of OVMF_VARS.fd (the UEFI variables store)
+ ovmf_vars_node_path = os.path.join(self.working_dir, "OVMF_VARS.fd")
+ if not os.path.exists(ovmf_vars_node_path):
+ try:
+ shutil.copyfile(self.manager.get_abs_image_path("OVMF_VARS.fd"), ovmf_vars_node_path)
+ except OSError as e:
+ raise QemuError("Cannot copy OVMF_VARS.fd file to the node working directory: {}".format(e))
+ options.extend(["-drive", "if=pflash,format=raw,file={}".format(ovmf_vars_node_path)])
return options
def _linux_boot_options(self):
@@ -2240,7 +2319,66 @@ class QemuVM(BaseNode):
options.extend(["-kernel", self._kernel_image.replace(",", ",,")])
if self._kernel_command_line:
options.extend(["-append", self._kernel_command_line])
+ return options
+ async def _start_swtpm(self):
+ """
+ Start swtpm (TPM emulator)
+ """
+
+ if sys.platform.startswith("win"):
+ raise QemuError("swtpm (TPM emulator) is not supported on Windows")
+ tpm_dir = os.path.join(self.working_dir, "tpm")
+ os.makedirs(tpm_dir, exist_ok=True)
+ tpm_sock = os.path.join(self.temporary_directory, "swtpm.sock")
+ swtpm = shutil.which("swtpm")
+ if not swtpm:
+ raise QemuError("Could not find swtpm (TPM emulator)")
+ swtpm_version = await self.manager.get_swtpm_version(swtpm)
+ if swtpm_version and parse_version(swtpm_version) < parse_version("0.8.0"):
+ # swtpm >= version 0.8.0 is required
+ raise QemuError("swtpm version 0.8.0 or above must be installed (detected version is {})".format(swtpm_version))
+ try:
+ command = [
+ swtpm,
+ "socket",
+ "--tpm2",
+ '--tpmstate', "dir={}".format(tpm_dir),
+ "--ctrl",
+ "type=unixio,path={},terminate".format(tpm_sock)
+ ]
+ command_string = " ".join(shlex.quote(s) for s in command)
+ log.info("Starting swtpm (TPM emulator) with: {}".format(command_string))
+ self._swtpm_process = subprocess.Popen(command, cwd=self.working_dir)
+ log.info("swtpm (TPM emulator) has started")
+ except (OSError, subprocess.SubprocessError) as e:
+ raise QemuError("Could not start swtpm (TPM emulator): {}".format(e))
+
+ def _stop_swtpm(self):
+ """
+ Stop swtpm (TPM emulator)
+ """
+
+ if self._swtpm_process and self._swtpm_process.returncode is None:
+ self._swtpm_process.terminate()
+ self._swtpm_process = None
+
+ def _tpm_options(self):
+ """
+ Return the TPM options for Qemu.
+ """
+
+ tpm_sock = os.path.join(self.temporary_directory, "swtpm.sock")
+ if not os.path.exists(tpm_sock):
+ raise QemuError("swtpm socket file '{}' does not exist".format(tpm_sock))
+ options = [
+ "-chardev",
+ "socket,id=chrtpm,path={}".format(tpm_sock),
+ "-tpmdev",
+ "emulator,id=tpm0,chardev=chrtpm",
+ "-device",
+ "tpm-tis,tpmdev=tpm0"
+ ]
return options
async def _network_options(self):
@@ -2255,8 +2393,7 @@ class QemuVM(BaseNode):
pci_bridges = math.floor(pci_devices / 32)
pci_bridges_created = 0
if pci_bridges >= 1:
- qemu_version = await self.manager.get_qemu_version(self.qemu_path)
- if qemu_version and parse_version(qemu_version) < parse_version("2.4.0"):
+ if self._qemu_version and parse_version(self._qemu_version) < parse_version("2.4.0"):
raise QemuError(
"Qemu version 2.4 or later is required to run this VM with a large number of network adapters"
)
@@ -2277,6 +2414,8 @@ class QemuVM(BaseNode):
mac = int_to_macaddress(macaddress_to_int(custom_mac_address))
device_string = f"{adapter_type},mac={mac}"
+ if adapter_type == "virtio-net-pci":
+ device_string = "{},speed=10000,duplex=full".format(device_string)
bridge_id = math.floor(pci_device_id / 32)
if bridge_id > 0:
if pci_bridges_created < bridge_id:
@@ -2320,8 +2459,7 @@ class QemuVM(BaseNode):
if any(opt in self._options for opt in ["-display", "-nographic", "-curses", "-sdl" "-spice", "-vnc"]):
return []
- version = await self.manager.get_qemu_version(self.qemu_path)
- if version and parse_version(version) >= parse_version("3.0"):
+ if self._qemu_version and parse_version(self._qemu_version) >= parse_version("3.0"):
return ["-display", "none"]
else:
return ["-nographic"]
@@ -2450,6 +2588,7 @@ class QemuVM(BaseNode):
(to be passed to subprocess.Popen())
"""
+ self._qemu_version = await self.manager.get_qemu_version(self.qemu_path)
vm_name = self._name.replace(",", ",,")
project_path = self.project.path.replace(",", ",,")
additional_options = self._options.strip()
@@ -2471,10 +2610,9 @@ class QemuVM(BaseNode):
if await self._run_with_hardware_acceleration(self.qemu_path, self._options):
if sys.platform.startswith("linux"):
command.extend(["-enable-kvm"])
- version = await self.manager.get_qemu_version(self.qemu_path)
# Issue on some combo Intel CPU + KVM + Qemu 2.4.0
# https://github.com/GNS3/gns3-server/issues/685
- if version and parse_version(version) >= parse_version("2.4.0") and self.platform == "x86_64":
+ if self._qemu_version and parse_version(self._qemu_version) >= parse_version("2.4.0") and self.platform == "x86_64":
command.extend(["-machine", "smm=off"])
elif sys.platform.startswith("darwin"):
command.extend(["-enable-hax"])
@@ -2495,6 +2633,8 @@ class QemuVM(BaseNode):
command.extend(await self._saved_state_option())
if self._console_type == "telnet":
command.extend(await self._disable_graphics())
+ if self._tpm:
+ command.extend(self._tpm_options())
if additional_options:
try:
command.extend(shlex.split(additional_options))
@@ -2505,7 +2645,7 @@ class QemuVM(BaseNode):
def asdict(self):
answer = {"project_id": self.project.id, "node_id": self.id, "node_directory": self.working_path}
# Qemu has a long list of options. The JSON schema is the single source of information
- for field in Qemu.schema()["properties"]:
+ for field in Qemu.model_json_schema()["properties"]:
if field not in answer:
try:
answer[field] = getattr(self, field)
diff --git a/gns3server/compute/vpcs/vpcs_vm.py b/gns3server/compute/vpcs/vpcs_vm.py
index 3ca0e297..47e66473 100644
--- a/gns3server/compute/vpcs/vpcs_vm.py
+++ b/gns3server/compute/vpcs/vpcs_vm.py
@@ -347,6 +347,14 @@ class VPCSVM(BaseNode):
return True
return False
+ async def reset_console(self):
+ """
+ Reset console
+ """
+
+ if self.is_running():
+ await self.reset_wrap_console()
+
@BaseNode.console_type.setter
def console_type(self, new_console_type):
"""
diff --git a/gns3server/config.py b/gns3server/config.py
index b01e076d..a01b5491 100644
--- a/gns3server/config.py
+++ b/gns3server/config.py
@@ -49,6 +49,8 @@ class Config:
self._profile = profile
if files and len(files):
+ if not os.access(files[0], os.R_OK) or not os.path.isfile(files[0]):
+ raise SystemExit(f"Unable to read configuration file: {files[0]}")
directory_name = os.path.dirname(files[0])
if not directory_name or directory_name == "":
files[0] = os.path.dirname(os.path.abspath(files[0])) + os.path.sep + files[0]
diff --git a/conf/gns3_server.conf b/gns3server/config_samples/gns3_server.conf
similarity index 100%
rename from conf/gns3_server.conf
rename to gns3server/config_samples/gns3_server.conf
diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py
index 21c05b9d..6608838a 100644
--- a/gns3server/controller/__init__.py
+++ b/gns3server/controller/__init__.py
@@ -18,13 +18,20 @@
import os
import sys
import uuid
-import socket
import shutil
import asyncio
import random
-import importlib_resources
+
+try:
+ import importlib_resources
+except ImportError:
+ from importlib import resources as importlib_resources
+
from ..config import Config
+from ..utils import parse_version
+from ..utils.images import default_images_directory
+
from .project import Project
from .appliance import Appliance
from .appliance_manager import ApplianceManager
@@ -62,7 +69,8 @@ class Controller:
async def start(self, computes=None):
log.info("Controller is starting")
- self._load_base_files()
+ self._install_base_configs()
+ self._install_builtin_disks()
server_config = Config.instance().settings.Server
Config.instance().listen_for_config_changes(self._update_config)
name = server_config.name
@@ -282,6 +290,10 @@ class Controller:
except OSError as e:
log.error(f"Cannot read Etag appliance file '{etag_appliances_path}': {e}")
+ # FIXME install builtin appliances only once, need to store "version" somewhere...
+ #if parse_version(__version__.split("+")[0]) > parse_version(controller_settings.get("version", "")):
+ # self._appliance_manager.install_builtin_appliances()
+
self._appliance_manager.install_builtin_appliances()
self._appliance_manager.load_appliances()
self._config_loaded = True
@@ -307,28 +319,50 @@ class Controller:
except OSError as e:
log.error(str(e))
- def _load_base_files(self):
+ @staticmethod
+ def install_resource_files(dst_path, resource_name):
"""
- At startup we copy base file to the user location to allow
+ Install files from resources to user's file system
+ """
+
+ if hasattr(sys, "frozen") and sys.platform.startswith("win"):
+ resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
+ for filename in os.listdir(resource_path):
+ if not os.path.exists(os.path.join(dst_path, filename)):
+ shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
+ else:
+ for entry in importlib_resources.files(f'gns3server.{resource_name}').iterdir():
+ full_path = os.path.join(dst_path, entry.name)
+ if entry.is_file() and not os.path.exists(full_path):
+ log.debug(f'Installing {resource_name} resource file "{entry.name}" to "{full_path}"')
+ shutil.copy(str(entry), os.path.join(dst_path, entry.name))
+
+ def _install_base_configs(self):
+ """
+ At startup we copy base configs to the user location to allow
them to customize it
"""
dst_path = self.configs_path()
+ log.info(f"Installing base configs in '{dst_path}'")
try:
- if hasattr(sys, "frozen") and sys.platform.startswith("win"):
- resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), "configs"))
- for filename in os.listdir(resource_path):
- if not os.path.exists(os.path.join(dst_path, filename)):
- shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
- else:
- for entry in importlib_resources.files('gns3server.configs').iterdir():
- full_path = os.path.join(dst_path, entry.name)
- if entry.is_file() and not os.path.exists(full_path):
- log.debug(f"Installing base config file {entry.name} to {full_path}")
- shutil.copy(str(entry), os.path.join(dst_path, entry.name))
+ Controller.install_resource_files(dst_path, "configs")
except OSError as e:
log.error(f"Could not install base config files to {dst_path}: {e}")
+ def _install_builtin_disks(self):
+ """
+ At startup we copy built-in Qemu disks to the user location to allow
+ them to use with appliances
+ """
+
+ dst_path = self.disks_path()
+ log.info(f"Installing built-in disks in '{dst_path}'")
+ try:
+ Controller.install_resource_files(dst_path, "disks")
+ except OSError as e:
+ log.error(f"Could not install disk files to {dst_path}: {e}")
+
def images_path(self):
"""
Get the image storage directory
@@ -349,6 +383,15 @@ class Controller:
os.makedirs(configs_path, exist_ok=True)
return configs_path
+ def disks_path(self, emulator_type="qemu"):
+ """
+ Get the disks storage directory
+ """
+
+ disks_path = default_images_directory(emulator_type)
+ os.makedirs(disks_path, exist_ok=True)
+ return disks_path
+
async def add_compute(self, compute_id=None, name=None, force=False, connect=True, wait_connection=True, **kwargs):
"""
Add a server to the dictionary of computes controlled by this controller
@@ -452,7 +495,8 @@ class Controller:
"""
if compute_id is None:
- computes = list(self._computes.values())
+ # get all connected computes
+ computes = [compute for compute in self._computes.values() if compute.connected is True]
if len(computes) == 1:
# return the only available compute
return computes[0]
diff --git a/gns3server/controller/appliance_manager.py b/gns3server/controller/appliance_manager.py
index 68554942..ac8bd7fd 100644
--- a/gns3server/controller/appliance_manager.py
+++ b/gns3server/controller/appliance_manager.py
@@ -20,9 +20,9 @@ import os
import json
import asyncio
import aiofiles
-import importlib_resources
import shutil
+
from typing import Tuple, List
from aiohttp.client_exceptions import ClientError
@@ -94,13 +94,15 @@ class ApplianceManager:
os.makedirs(appliances_path, exist_ok=True)
return appliances_path
- def _builtin_appliances_path(self):
+ def _builtin_appliances_path(self, delete_first=False):
"""
Get the built-in appliance storage directory
"""
config = Config.instance()
appliances_dir = os.path.join(config.config_dir, "appliances")
+ if delete_first:
+ shutil.rmtree(appliances_dir, ignore_errors=True)
os.makedirs(appliances_dir, exist_ok=True)
return appliances_dir
@@ -109,19 +111,11 @@ class ApplianceManager:
At startup we copy the built-in appliances files.
"""
- dst_path = self._builtin_appliances_path()
+ dst_path = self._builtin_appliances_path(delete_first=True)
+ log.info(f"Installing built-in appliances in '{dst_path}'")
+ from . import Controller
try:
- if hasattr(sys, "frozen") and sys.platform.startswith("win"):
- resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), "appliances"))
- for filename in os.listdir(resource_path):
- if not os.path.exists(os.path.join(dst_path, filename)):
- shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
- else:
- for entry in importlib_resources.files('gns3server.appliances').iterdir():
- full_path = os.path.join(dst_path, entry.name)
- if entry.is_file() and not os.path.exists(full_path):
- log.debug(f"Installing built-in appliance file {entry.name} to {full_path}")
- shutil.copy(str(entry), os.path.join(dst_path, entry.name))
+ Controller.instance().install_resource_files(dst_path, "appliances")
except OSError as e:
log.error(f"Could not install built-in appliance files to {dst_path}: {e}")
@@ -219,8 +213,8 @@ class ApplianceManager:
except ValidationError as e:
raise ControllerError(message=f"Could not validate template data: {e}")
template = await TemplatesService(templates_repo).create_template(template_create)
- template_id = template.get("template_id")
- await rbac_repo.add_permission_to_user_with_path(current_user.user_id, f"/templates/{template_id}/*")
+ #template_id = template.get("template_id")
+ #await rbac_repo.add_permission_to_user_with_path(current_user.user_id, f"/templates/{template_id}/*")
log.info(f"Template '{template.get('name')}' has been created")
async def _appliance_to_template(self, appliance: Appliance, version: str = None) -> dict:
@@ -254,7 +248,7 @@ class ApplianceManager:
appliances_info = self._find_appliances_from_image_checksum(image_checksum)
for appliance, image_version in appliances_info:
try:
- schemas.Appliance.parse_obj(appliance.asdict())
+ schemas.Appliance.model_validate(appliance.asdict())
except ValidationError as e:
log.warning(f"Could not validate appliance '{appliance.id}': {e}")
if appliance.versions:
@@ -285,7 +279,7 @@ class ApplianceManager:
raise ControllerNotFoundError(message=f"Could not find appliance '{appliance_id}'")
try:
- schemas.Appliance.parse_obj(appliance.asdict())
+ schemas.Appliance.model_validate(appliance.asdict())
except ValidationError as e:
raise ControllerError(message=f"Could not validate appliance '{appliance_id}': {e}")
@@ -340,7 +334,7 @@ class ApplianceManager:
appliance = Appliance(path, json.load(f), builtin=builtin)
json_data = appliance.asdict() # Check if loaded without error
if appliance.status != "broken":
- schemas.Appliance.parse_obj(json_data)
+ schemas.Appliance.model_validate(json_data)
self._appliances[appliance.id] = appliance
if not appliance.symbol or appliance.symbol.startswith(":/symbols/"):
# apply a default symbol if the appliance has none or a default symbol
diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py
index 35f235cc..c6cb4609 100644
--- a/gns3server/controller/compute.py
+++ b/gns3server/controller/compute.py
@@ -398,7 +398,7 @@ class Compute:
raise ControllerNotFoundError(msg)
self._capabilities = response.json
- if response.json["version"].split("-")[0] != __version__.split("-")[0]:
+ if response.json["version"].split("+")[0] != __version__.split("+")[0]:
if self._name.startswith("GNS3 VM"):
msg = (
"GNS3 version {} is not the same as the GNS3 VM version {}. Please upgrade the GNS3 VM.".format(
@@ -503,7 +503,7 @@ class Compute:
return self._getUrl(path)
async def _run_http_query(self, method, path, data=None, timeout=20, raw=False):
- with async_timeout.timeout(timeout):
+ async with async_timeout.timeout(delay=timeout):
url = self._getUrl(path)
headers = {"content-type": "application/json"}
chunked = None
diff --git a/gns3server/controller/gns3vm/virtualbox_gns3_vm.py b/gns3server/controller/gns3vm/virtualbox_gns3_vm.py
index 1329a31a..06ca5370 100644
--- a/gns3server/controller/gns3vm/virtualbox_gns3_vm.py
+++ b/gns3server/controller/gns3vm/virtualbox_gns3_vm.py
@@ -77,6 +77,9 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
except ValueError:
continue
self._system_properties[name.strip()] = value.strip()
+ if "API Version" in self._system_properties:
+ # API version is not consistent between VirtualBox versions, the key is named "API Version" in VirtualBox 7
+ self._system_properties["API version"] = self._system_properties.pop("API Version")
async def _check_requirements(self):
"""
@@ -124,18 +127,18 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
continue
return interface
- async def _look_for_vboxnet(self, interface_number):
+ async def _look_for_vboxnet(self, backend_type, interface_number):
"""
- Look for the VirtualBox network name associated with a host only interface.
+ Look for the VirtualBox network name associated with an interface.
:returns: None or vboxnet name
"""
result = await self._execute("showvminfo", [self._vmname, "--machinereadable"])
for info in result.splitlines():
- if "=" in info:
- name, value = info.split("=", 1)
- if name == f"hostonlyadapter{interface_number}":
+ if '=' in info:
+ name, value = info.split('=', 1)
+ if name == "{}{}".format(backend_type, interface_number):
return value.strip('"')
return None
@@ -161,7 +164,7 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
return True
return False
- async def _check_vboxnet_exists(self, vboxnet):
+ async def _check_vboxnet_exists(self, vboxnet, vboxnet_type):
"""
Check if the vboxnet interface exists
@@ -169,7 +172,7 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
:returns: boolean
"""
- properties = await self._execute("list", ["hostonlyifs"])
+ properties = await self._execute("list", ["{}".format(vboxnet_type)])
for prop in properties.splitlines():
try:
name, value = prop.split(":", 1)
@@ -232,25 +235,43 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
if nat_interface_number < 0:
raise GNS3VMError(f'VM "{self.vmname}" must have a NAT interface configured in order to start')
- hostonly_interface_number = await self._look_for_interface("hostonly")
- if hostonly_interface_number < 0:
- raise GNS3VMError(f'VM "{self.vmname}" must have a host-only interface configured in order to start')
+ if sys.platform.startswith("darwin") and parse_version(self._system_properties["API version"]) >= parse_version("7_0"):
+ # VirtualBox 7.0+ on macOS requires a host-only network interface
+ backend_type = "hostonly-network"
+ backend_description = "host-only network"
+ vboxnet_type = "hostonlynets"
+ interface_number = await self._look_for_interface("hostonlynetwork")
+ if interface_number < 0:
+ raise GNS3VMError('VM "{}" must have a network adapter attached to a host-only network in order to start'.format(self.vmname))
+ else:
+ backend_type = "hostonlyadapter"
+ backend_description = "host-only adapter"
+ vboxnet_type = "hostonlyifs"
+ interface_number = await self._look_for_interface("hostonly")
- vboxnet = await self._look_for_vboxnet(hostonly_interface_number)
+ if interface_number < 0:
+ raise GNS3VMError('VM "{}" must have a network adapter attached to a {} in order to start'.format(self.vmname, backend_description))
+
+ vboxnet = await self._look_for_vboxnet(backend_type, interface_number)
if vboxnet is None:
- raise GNS3VMError(
- f'A VirtualBox host-only network could not be found on network adapter {hostonly_interface_number} for "{self._vmname}"'
- )
+ raise GNS3VMError('A VirtualBox host-only network could not be found on network adapter {} for "{}"'.format(interface_number, self._vmname))
- if not (await self._check_vboxnet_exists(vboxnet)):
- raise GNS3VMError(
- 'VirtualBox host-only network "{}" does not exist, please make the sure the network adapter {} configuration is valid for "{}"'.format(
- vboxnet, hostonly_interface_number, self._vmname
- )
- )
+ if not (await self._check_vboxnet_exists(vboxnet, vboxnet_type)):
+ if sys.platform.startswith("win") and vboxnet == "vboxnet0":
+ # The GNS3 VM is configured with vboxnet0 by default which is not available
+ # on Windows. Try to patch this with the first available vboxnet we find.
+ first_available_vboxnet = await self._find_first_available_vboxnet()
+ if first_available_vboxnet is None:
+ raise GNS3VMError('Please add a VirtualBox host-only network with DHCP enabled and attached it to network adapter {} for "{}"'.format(interface_number, self._vmname))
+ await self.set_hostonly_network(interface_number, first_available_vboxnet)
+ vboxnet = first_available_vboxnet
+ else:
+ raise GNS3VMError('VirtualBox host-only network "{}" does not exist, please make the sure the network adapter {} configuration is valid for "{}"'.format(vboxnet,
+ interface_number,
+ self._vmname))
- if not (await self._check_dhcp_server(vboxnet)):
- raise GNS3VMError(f'DHCP must be enabled on VirtualBox host-only network "{vboxnet}"')
+ if backend_type == "hostonlyadapter" and not (await self._check_dhcp_server(vboxnet)):
+ raise GNS3VMError('DHCP must be enabled on VirtualBox host-only network "{}"'.format(vboxnet))
vm_state = await self._get_state()
log.info(f'"{self._vmname}" state is {vm_state}')
@@ -295,8 +316,8 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
[self._vmname, f"natpf{nat_interface_number}", f"GNS3VM,tcp,{ip_address},{api_port},,{self.port}"],
)
- self.ip_address = await self._get_ip(hostonly_interface_number, api_port)
- log.info(f"GNS3 VM has been started with IP {self.ip_address}")
+ self.ip_address = await self._get_ip(interface_number, api_port)
+ log.info("GNS3 VM has been started with IP {}".format(self.ip_address))
self.running = True
async def _get_ip(self, hostonly_interface_number, api_port):
diff --git a/gns3server/controller/node.py b/gns3server/controller/node.py
index 51a1bee5..68da72a7 100644
--- a/gns3server/controller/node.py
+++ b/gns3server/controller/node.py
@@ -39,7 +39,7 @@ log = logging.getLogger(__name__)
class Node:
- # This properties are used only on controller and are not forwarded to the compute
+ # These properties are used only on controller and are not forwarded to the compute
CONTROLLER_ONLY_PROPERTIES = [
"x",
"y",
diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py
index 7107429a..ec5c7184 100644
--- a/gns3server/controller/project.py
+++ b/gns3server/controller/project.py
@@ -524,12 +524,14 @@ class Project:
template["x"] = x
template["y"] = y
node_type = template.pop("template_type")
- if template.pop("builtin", False) is True:
- # compute_id is selected by clients for builtin templates
+
+ if compute_id:
+ # use a custom compute_id
compute = self.controller.get_compute(compute_id)
else:
- compute = self.controller.get_compute(template.pop("compute_id", compute_id))
+ compute = self.controller.get_compute(template.pop("compute_id"))
template_name = template.pop("name")
+ log.info(f'Creating node from template "{template_name}" on compute "{compute.name}" [{compute.id}]')
default_name_format = template.pop("default_name_format", "{name}-{0}")
if name is None:
name = default_name_format.replace("{name}", template_name)
diff --git a/gns3server/controller/topology.py b/gns3server/controller/topology.py
index a6bd2807..f6d3b039 100644
--- a/gns3server/controller/topology.py
+++ b/gns3server/controller/topology.py
@@ -52,12 +52,12 @@ class DynamipsNodeValidation(DynamipsCreate):
def _check_topology_schema(topo, path):
try:
- Topology.parse_obj(topo)
+ Topology.model_validate(topo)
# Check the nodes property against compute schemas
for node in topo["topology"].get("nodes", []):
if node["node_type"] == "dynamips":
- DynamipsNodeValidation.parse_obj(node.get("properties", {}))
+ DynamipsNodeValidation.model_validate(node.get("properties", {}))
except pydantic.ValidationError as e:
error = f"Invalid data in topology file {path}: {e}"
diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py
index cde05b5b..a529d78f 100644
--- a/gns3server/crash_report.py
+++ b/gns3server/crash_report.py
@@ -32,7 +32,6 @@ import distro
from .version import __version__, __version_info__
from .config import Config
-from .utils.get_resource import get_resource
import logging
@@ -72,24 +71,16 @@ class CrashReport:
sentry_uncaught.disabled = True
if SENTRY_SDK_AVAILABLE:
- cacert = None
- if hasattr(sys, "frozen"):
- cacert_resource = get_resource("cacert.pem")
- if cacert_resource is not None and os.path.isfile(cacert_resource):
- cacert = cacert_resource
- else:
- log.error(f"The SSL certificate bundle file '{cacert_resource}' could not be found")
-
# Don't send log records as events.
sentry_logging = LoggingIntegration(level=logging.INFO, event_level=None)
-
- sentry_sdk.init(
- dsn=CrashReport.DSN,
- release=__version__,
- ca_certs=cacert,
- default_integrations=False,
- integrations=[sentry_logging],
- )
+ try:
+ sentry_sdk.init(dsn=CrashReport.DSN,
+ release=__version__,
+ default_integrations=False,
+ integrations=[sentry_logging])
+ except Exception as e:
+ log.error("Crash report could not be sent: {}".format(e))
+ return
tags = {
"os:name": platform.system(),
diff --git a/gns3server/db/models/__init__.py b/gns3server/db/models/__init__.py
index d10d0668..c31c21b1 100644
--- a/gns3server/db/models/__init__.py
+++ b/gns3server/db/models/__init__.py
@@ -16,11 +16,13 @@
# along with this program. If not, see .
from .base import Base
+from .acl import ACE
from .users import User, UserGroup
from .roles import Role
-from .permissions import Permission
+from .privileges import Privilege
from .computes import Compute
from .images import Image
+from .resource_pools import Resource, ResourcePool
from .templates import (
Template,
CloudTemplate,
diff --git a/gns3server/db/models/acl.py b/gns3server/db/models/acl.py
new file mode 100644
index 00000000..20df831d
--- /dev/null
+++ b/gns3server/db/models/acl.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2023 GNS3 Technologies Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+from sqlalchemy import Column, String, Boolean, ForeignKey, CheckConstraint
+from sqlalchemy.orm import relationship
+
+from .base import BaseTable, generate_uuid, GUID
+
+import logging
+
+log = logging.getLogger(__name__)
+
+
+class ACE(BaseTable):
+
+ __tablename__ = "acl"
+
+ ace_id = Column(GUID, primary_key=True, default=generate_uuid)
+ ace_type: str = Column(String)
+ path = Column(String)
+ propagate = Column(Boolean, default=True)
+ allowed = Column(Boolean, default=True)
+ user_id = Column(GUID, ForeignKey('users.user_id', ondelete="CASCADE"))
+ user = relationship("User", back_populates="acl_entries")
+ group_id = Column(GUID, ForeignKey('user_groups.user_group_id', ondelete="CASCADE"))
+ group = relationship("UserGroup", back_populates="acl_entries")
+ role_id = Column(GUID, ForeignKey('roles.role_id', ondelete="CASCADE"))
+ role = relationship("Role", back_populates="acl_entries")
+
+ __table_args__ = (
+ CheckConstraint("(user_id IS NOT NULL AND ace_type = 'user') OR (group_id IS NOT NULL AND ace_type = 'group')"),
+ )
diff --git a/gns3server/db/models/base.py b/gns3server/db/models/base.py
index 731a4547..97bd2fcb 100644
--- a/gns3server/db/models/base.py
+++ b/gns3server/db/models/base.py
@@ -21,7 +21,7 @@ from fastapi.encoders import jsonable_encoder
from sqlalchemy import Column, DateTime, func, inspect
from sqlalchemy.types import TypeDecorator, CHAR, VARCHAR
from sqlalchemy.dialects.postgresql import UUID
-from sqlalchemy.ext.declarative import as_declarative
+from sqlalchemy.orm import as_declarative
@as_declarative()
diff --git a/gns3server/db/models/images.py b/gns3server/db/models/images.py
index 175ab278..529afe4b 100644
--- a/gns3server/db/models/images.py
+++ b/gns3server/db/models/images.py
@@ -21,8 +21,8 @@ from sqlalchemy.orm import relationship
from .base import Base, BaseTable, GUID
-image_template_link = Table(
- "images_templates_link",
+image_template_map = Table(
+ "image_template_map",
Base.metadata,
Column("image_id", Integer, ForeignKey("images.image_id", ondelete="CASCADE")),
Column("template_id", GUID, ForeignKey("templates.template_id", ondelete="CASCADE"))
@@ -40,4 +40,4 @@ class Image(BaseTable):
image_size = Column(BigInteger)
checksum = Column(String, index=True)
checksum_algorithm = Column(String)
- templates = relationship("Template", secondary=image_template_link, back_populates="images")
+ templates = relationship("Template", secondary=image_template_map, back_populates="images")
diff --git a/gns3server/db/models/permissions.py b/gns3server/db/models/permissions.py
deleted file mode 100644
index f7344e31..00000000
--- a/gns3server/db/models/permissions.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2021 GNS3 Technologies Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-from sqlalchemy import Table, Column, String, ForeignKey, event
-from sqlalchemy.orm import relationship
-
-from .base import Base, BaseTable, generate_uuid, GUID, ListType
-
-import logging
-
-log = logging.getLogger(__name__)
-
-
-permission_role_link = Table(
- "permissions_roles_link",
- Base.metadata,
- Column("permission_id", GUID, ForeignKey("permissions.permission_id", ondelete="CASCADE")),
- Column("role_id", GUID, ForeignKey("roles.role_id", ondelete="CASCADE"))
-
-)
-
-
-class Permission(BaseTable):
-
- __tablename__ = "permissions"
-
- permission_id = Column(GUID, primary_key=True, default=generate_uuid)
- description = Column(String)
- methods = Column(ListType)
- path = Column(String)
- action = Column(String)
- user_id = Column(GUID, ForeignKey('users.user_id', ondelete="CASCADE"))
- roles = relationship("Role", secondary=permission_role_link, back_populates="permissions")
-
-
-@event.listens_for(Permission.__table__, 'after_create')
-def create_default_roles(target, connection, **kw):
-
- default_permissions = [
- {
- "description": "Allow access to all endpoints",
- "methods": ["GET", "POST", "PUT", "DELETE"],
- "path": "/",
- "action": "ALLOW"
- },
- {
- "description": "Allow to receive controller notifications",
- "methods": ["GET"],
- "path": "/notifications",
- "action": "ALLOW"
- },
- {
- "description": "Allow to create and list projects",
- "methods": ["GET", "POST"],
- "path": "/projects",
- "action": "ALLOW"
- },
- {
- "description": "Allow to create and list templates",
- "methods": ["GET", "POST"],
- "path": "/templates",
- "action": "ALLOW"
- },
- {
- "description": "Allow to list computes",
- "methods": ["GET"],
- "path": "/computes/*",
- "action": "ALLOW"
- },
- {
- "description": "Allow access to all symbol endpoints",
- "methods": ["GET", "POST"],
- "path": "/symbols/*",
- "action": "ALLOW"
- },
- ]
-
- stmt = target.insert().values(default_permissions)
- connection.execute(stmt)
- connection.commit()
- log.debug("The default permissions have been created in the database")
-
-
-@event.listens_for(permission_role_link, 'after_create')
-def add_permissions_to_role(target, connection, **kw):
-
- from .roles import Role
- roles_table = Role.__table__
- stmt = roles_table.select().where(roles_table.c.name == "Administrator")
- result = connection.execute(stmt)
- role_id = result.first().role_id
-
- permissions_table = Permission.__table__
- stmt = permissions_table.select().where(permissions_table.c.path == "/")
- result = connection.execute(stmt)
- permission_id = result.first().permission_id
-
- # add root path to the "Administrator" role
- stmt = target.insert().values(permission_id=permission_id, role_id=role_id)
- connection.execute(stmt)
-
- stmt = roles_table.select().where(roles_table.c.name == "User")
- result = connection.execute(stmt)
- role_id = result.first().role_id
-
- # add minimum required paths to the "User" role
- for path in ("/notifications", "/projects", "/templates", "/computes/*", "/symbols/*"):
- stmt = permissions_table.select().where(permissions_table.c.path == path)
- result = connection.execute(stmt)
- permission_id = result.first().permission_id
- stmt = target.insert().values(permission_id=permission_id, role_id=role_id)
- connection.execute(stmt)
-
- connection.commit()
diff --git a/gns3server/db/models/privileges.py b/gns3server/db/models/privileges.py
new file mode 100644
index 00000000..65f0df38
--- /dev/null
+++ b/gns3server/db/models/privileges.py
@@ -0,0 +1,347 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2023 GNS3 Technologies Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+from sqlalchemy import Table, Column, String, ForeignKey, event
+from sqlalchemy.orm import relationship
+
+from .base import Base, BaseTable, generate_uuid, GUID
+
+import logging
+
+log = logging.getLogger(__name__)
+
+
+privilege_role_map = Table(
+ "privilege_role_map",
+ Base.metadata,
+ Column("privilege_id", GUID, ForeignKey("privileges.privilege_id", ondelete="CASCADE")),
+ Column("role_id", GUID, ForeignKey("roles.role_id", ondelete="CASCADE"))
+)
+
+
+class Privilege(BaseTable):
+
+ __tablename__ = "privileges"
+
+ privilege_id = Column(GUID, primary_key=True, default=generate_uuid)
+ name = Column(String)
+ description = Column(String)
+ roles = relationship("Role", secondary=privilege_role_map, back_populates="privileges")
+
+
+@event.listens_for(Privilege.__table__, 'after_create')
+def create_default_roles(target, connection, **kw):
+
+ default_privileges = [
+ {
+ "description": "Create or delete a user",
+ "name": "User.Allocate"
+ },
+ {
+ "description": "View a user",
+ "name": "User.Audit"
+ },
+ {
+ "description": "Update a user",
+ "name": "User.Modify"
+ },
+ {
+ "description": "Create or delete a group",
+ "name": "Group.Allocate"
+ },
+ {
+ "description": "View a group",
+ "name": "Group.Audit"
+ },
+ {
+ "description": "Update a group",
+ "name": "Group.Modify"
+ },
+ {
+ "description": "Create or delete a role",
+ "name": "Role.Allocate"
+ },
+ {
+ "description": "View a role",
+ "name": "Role.Audit"
+ },
+ {
+ "description": "Update a role",
+ "name": "Role.Modify"
+ },
+ {
+ "description": "Create or delete an ACE",
+ "name": "ACE.Allocate"
+ },
+ {
+ "description": "View an ACE",
+ "name": "ACE.Audit"
+ },
+ {
+ "description": "Update an ACE",
+ "name": "ACE.Modify"
+ },
+ {
+ "description": "Create or delete a template",
+ "name": "Template.Allocate"
+ },
+ {
+ "description": "View a template",
+ "name": "Template.Audit"
+ },
+ {
+ "description": "Update a template",
+ "name": "Template.Modify"
+ },
+ {
+ "description": "Create or delete a project",
+ "name": "Project.Allocate"
+ },
+ {
+ "description": "View a project",
+ "name": "Project.Audit"
+ },
+ {
+ "description": "Update a project",
+ "name": "Project.Modify"
+ },
+ {
+ "description": "Create or delete project snapshots",
+ "name": "Snapshot.Allocate"
+ },
+ {
+ "description": "Restore a snapshot",
+ "name": "Snapshot.Restore"
+ },
+ {
+ "description": "View a snapshot",
+ "name": "Snapshot.Audit"
+ },
+ {
+ "description": "Create or delete a node",
+ "name": "Node.Allocate"
+ },
+ {
+ "description": "View a node",
+ "name": "Node.Audit"
+ },
+ {
+ "description": "Update a node",
+ "name": "Node.Modify"
+ },
+ {
+ "description": "Console access to a node",
+ "name": "Node.Console"
+ },
+ {
+ "description": "Power management for a node",
+ "name": "Node.PowerMgmt"
+ },
+ {
+ "description": "Create or delete a link",
+ "name": "Link.Allocate"
+ },
+ {
+ "description": "View a link",
+ "name": "Link.Audit"
+ },
+ {
+ "description": "Update a link",
+ "name": "Link.Modify"
+ },
+ {
+ "description": "Capture packets on a link",
+ "name": "Link.Capture"
+ },
+ {
+ "description": "Create or delete a drawing",
+ "name": "Drawing.Allocate"
+ },
+ {
+ "description": "View a drawing",
+ "name": "Drawing.Audit"
+ },
+ {
+ "description": "Update a drawing",
+ "name": "Drawing.Modify"
+ },
+ {
+ "description": "Create or delete a symbol",
+ "name": "Symbol.Allocate"
+ },
+ {
+ "description": "View a symbol",
+ "name": "Symbol.Audit"
+ },
+ {
+ "description": "Create or delete an image",
+ "name": "Image.Allocate"
+ },
+ {
+ "description": "View an image",
+ "name": "Image.Audit"
+ },
+ {
+ "description": "Create or delete a compute",
+ "name": "Compute.Allocate"
+ },
+ {
+ "description": "Update a compute",
+ "name": "Compute.Modify"
+ },
+ {
+ "description": "View a compute",
+ "name": "Compute.Audit"
+ },
+ {
+ "description": "Install an appliance",
+ "name": "Appliance.Allocate"
+ },
+ {
+ "description": "View an appliance",
+ "name": "Appliance.Audit"
+ }
+ ]
+
+ stmt = target.insert().values(default_privileges)
+ connection.execute(stmt)
+ connection.commit()
+ log.debug("The default privileges have been created in the database")
+
+
+def add_privileges_to_role(target, connection, role, privileges):
+
+ from .roles import Role
+ roles_table = Role.__table__
+ privileges_table = Privilege.__table__
+
+ stmt = roles_table.select().where(roles_table.c.name == role)
+ result = connection.execute(stmt)
+ role_id = result.first().role_id
+ for privilege_name in privileges:
+ stmt = privileges_table.select().where(privileges_table.c.name == privilege_name)
+ result = connection.execute(stmt)
+ privilege_id = result.first().privilege_id
+ stmt = target.insert().values(privilege_id=privilege_id, role_id=role_id)
+ connection.execute(stmt)
+
+
+@event.listens_for(privilege_role_map, 'after_create')
+def add_privileges_to_default_roles(target, connection, **kw):
+
+ from .roles import Role
+ roles_table = Role.__table__
+ stmt = roles_table.select().where(roles_table.c.name == "Administrator")
+ result = connection.execute(stmt)
+ role_id = result.first().role_id
+
+ # add all privileges to the "Administrator" role
+ privileges_table = Privilege.__table__
+ stmt = privileges_table.select()
+ result = connection.execute(stmt)
+ for row in result:
+ privilege_id = row.privilege_id
+ stmt = target.insert().values(privilege_id=privilege_id, role_id=role_id)
+ connection.execute(stmt)
+
+ # add required privileges to the "User" role
+ user_privileges = (
+ "Project.Allocate",
+ "Project.Audit",
+ "Project.Modify",
+ "Snapshot.Allocate",
+ "Snapshot.Audit",
+ "Snapshot.Restore",
+ "Node.Allocate",
+ "Node.Audit",
+ "Node.Modify",
+ "Node.Console",
+ "Node.PowerMgmt",
+ "Link.Allocate",
+ "Link.Audit",
+ "Link.Modify",
+ "Link.Capture",
+ "Drawing.Allocate",
+ "Drawing.Audit",
+ "Drawing.Modify",
+ "Template.Audit",
+ "Symbol.Audit",
+ "Image.Audit",
+ "Compute.Audit",
+ "Appliance.Allocate",
+ "Appliance.Audit"
+ )
+
+ add_privileges_to_role(target, connection, "User", user_privileges)
+
+ # add required privileges to the "Auditor" role
+ auditor_privileges = (
+ "Project.Audit",
+ "Snapshot.Audit",
+ "Node.Audit",
+ "Link.Audit",
+ "Drawing.Audit",
+ "Template.Audit",
+ "Symbol.Audit",
+ "Image.Audit",
+ "Compute.Audit",
+ "Appliance.Audit"
+ )
+
+ add_privileges_to_role(target, connection, "Auditor", auditor_privileges)
+
+ # add required privileges to the "Template manager" role
+ template_manager_privileges = (
+ "Template.Allocate",
+ "Template.Audit",
+ "Template.Modify",
+ "Symbol.Allocate",
+ "Symbol.Audit",
+ "Image.Allocate",
+ "Image.Audit",
+ "Appliance.Allocate",
+ "Appliance.Audit"
+ )
+
+ add_privileges_to_role(target, connection, "Template manager", template_manager_privileges)
+
+ # add required privileges to the "User manager" role
+ user_manager_privileges = (
+ "User.Allocate",
+ "User.Audit",
+ "User.Modify",
+ "Group.Allocate",
+ "Group.Audit",
+ "Group.Modify"
+ )
+
+ add_privileges_to_role(target, connection, "User manager", user_manager_privileges)
+
+ # add required privileges to the "ACL manager" role
+ acl_manager_privileges = (
+ "Role.Allocate",
+ "Role.Audit",
+ "Role.Modify",
+ "ACE.Allocate",
+ "ACE.Audit",
+ "ACE.Modify"
+ )
+
+ add_privileges_to_role(target, connection, "ACL manager", acl_manager_privileges)
+
+ connection.commit()
+ log.debug("Privileges have been added to the default roles in the database")
diff --git a/gns3server/db/models/resource_pools.py b/gns3server/db/models/resource_pools.py
new file mode 100644
index 00000000..dce9bf5b
--- /dev/null
+++ b/gns3server/db/models/resource_pools.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2023 GNS3 Technologies Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+from sqlalchemy import Table, Column, String, ForeignKey
+from sqlalchemy.orm import relationship
+
+from .base import Base, BaseTable, generate_uuid, GUID
+
+import logging
+
+log = logging.getLogger(__name__)
+
+
+resource_pool_map = Table(
+ "resource_pool_map",
+ Base.metadata,
+ Column("resource_id", GUID, ForeignKey("resources.resource_id", ondelete="CASCADE")),
+ Column("resource_pool_id", GUID, ForeignKey("resource_pools.resource_pool_id", ondelete="CASCADE"))
+)
+
+
+class Resource(BaseTable):
+
+ __tablename__ = "resources"
+
+ resource_id = Column(GUID, primary_key=True)
+ name = Column(String, unique=True, index=True)
+ resource_type = Column(String)
+ resource_pools = relationship("ResourcePool", secondary=resource_pool_map, back_populates="resources")
+
+
+class ResourcePool(BaseTable):
+
+ __tablename__ = "resource_pools"
+
+ resource_pool_id = Column(GUID, primary_key=True, default=generate_uuid)
+ name = Column(String, unique=True, index=True)
+ resources = relationship("Resource", secondary=resource_pool_map, back_populates="resource_pools")
diff --git a/gns3server/db/models/roles.py b/gns3server/db/models/roles.py
index b531a50f..ea02365f 100644
--- a/gns3server/db/models/roles.py
+++ b/gns3server/db/models/roles.py
@@ -15,23 +15,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from sqlalchemy import Table, Column, String, Boolean, ForeignKey, event
+from sqlalchemy import Column, String, Boolean, event
from sqlalchemy.orm import relationship
-from .base import Base, BaseTable, generate_uuid, GUID
-from .permissions import permission_role_link
+from .base import BaseTable, generate_uuid, GUID
+from .privileges import privilege_role_map
import logging
log = logging.getLogger(__name__)
-role_group_link = Table(
- "roles_groups_link",
- Base.metadata,
- Column("role_id", GUID, ForeignKey("roles.role_id", ondelete="CASCADE")),
- Column("user_group_id", GUID, ForeignKey("user_groups.user_group_id", ondelete="CASCADE"))
-)
-
class Role(BaseTable):
@@ -41,8 +34,8 @@ class Role(BaseTable):
name = Column(String, unique=True, index=True)
description = Column(String)
is_builtin = Column(Boolean, default=False)
- permissions = relationship("Permission", secondary=permission_role_link, back_populates="roles")
- groups = relationship("UserGroup", secondary=role_group_link, back_populates="roles")
+ privileges = relationship("Privilege", secondary=privilege_role_map, back_populates="roles")
+ acl_entries = relationship("ACE")
@event.listens_for(Role.__table__, 'after_create')
@@ -51,31 +44,14 @@ def create_default_roles(target, connection, **kw):
default_roles = [
{"name": "Administrator", "description": "Administrator role", "is_builtin": True},
{"name": "User", "description": "User role", "is_builtin": True},
+ {"name": "Auditor", "description": "Role with read only access", "is_builtin": True},
+ {"name": "Template manager", "description": "Role to manage templates", "is_builtin": True},
+ {"name": "User manager", "description": "Role to manage users and groups", "is_builtin": True},
+ {"name": "ACL manager", "description": "Role to manage other roles and the ACL", "is_builtin": True},
+ {"name": "No Access", "description": "Role with no privileges (used to forbid access)", "is_builtin": True}
]
stmt = target.insert().values(default_roles)
connection.execute(stmt)
connection.commit()
log.debug("The default roles have been created in the database")
-
-
-@event.listens_for(role_group_link, 'after_create')
-def add_admin_to_group(target, connection, **kw):
-
- from .users import UserGroup
- user_groups_table = UserGroup.__table__
- roles_table = Role.__table__
-
- # Add roles to built-in user groups
- groups_to_roles = {"Administrators": "Administrator", "Users": "User"}
- for user_group, role in groups_to_roles.items():
- stmt = user_groups_table.select().where(user_groups_table.c.name == user_group)
- result = connection.execute(stmt)
- user_group_id = result.first().user_group_id
- stmt = roles_table.select().where(roles_table.c.name == role)
- result = connection.execute(stmt)
- role_id = result.first().role_id
- stmt = target.insert().values(role_id=role_id, user_group_id=user_group_id)
- connection.execute(stmt)
-
- connection.commit()
diff --git a/gns3server/db/models/templates.py b/gns3server/db/models/templates.py
index 3086a15c..a35ed076 100644
--- a/gns3server/db/models/templates.py
+++ b/gns3server/db/models/templates.py
@@ -20,7 +20,7 @@ from sqlalchemy import Boolean, Column, String, Integer, ForeignKey, PickleType
from sqlalchemy.orm import relationship
from .base import BaseTable, generate_uuid, GUID
-from .images import image_template_link
+from .images import image_template_map
class Template(BaseTable):
@@ -37,7 +37,7 @@ class Template(BaseTable):
usage = Column(String)
template_type = Column(String)
compute_id = Column(String)
- images = relationship("Image", secondary=image_template_link, back_populates="templates")
+ images = relationship("Image", secondary=image_template_map, back_populates="templates")
__mapper_args__ = {
"polymorphic_identity": "templates",
@@ -203,6 +203,8 @@ class QemuTemplate(Template):
kernel_command_line = Column(String)
replicate_network_connection_state = Column(Boolean)
create_config_disk = Column(Boolean)
+ tpm = Column(Boolean)
+ uefi = Column(Boolean)
on_close = Column(String)
cpu_throttling = Column(Integer)
process_priority = Column(String)
diff --git a/gns3server/db/models/users.py b/gns3server/db/models/users.py
index 0c85ccbe..f68bc49f 100644
--- a/gns3server/db/models/users.py
+++ b/gns3server/db/models/users.py
@@ -19,7 +19,6 @@ from sqlalchemy import Table, Boolean, Column, String, DateTime, ForeignKey, eve
from sqlalchemy.orm import relationship
from .base import Base, BaseTable, generate_uuid, GUID
-from .roles import role_group_link
from gns3server.config import Config
from gns3server.services import auth_service
@@ -28,8 +27,8 @@ import logging
log = logging.getLogger(__name__)
-user_group_link = Table(
- "users_groups_link",
+user_group_map = Table(
+ "user_group_map",
Base.metadata,
Column("user_id", GUID, ForeignKey("users.user_id", ondelete="CASCADE")),
Column("user_group_id", GUID, ForeignKey("user_groups.user_group_id", ondelete="CASCADE"))
@@ -48,8 +47,8 @@ class User(BaseTable):
last_login = Column(DateTime)
is_active = Column(Boolean, default=True)
is_superadmin = Column(Boolean, default=False)
- groups = relationship("UserGroup", secondary=user_group_link, back_populates="users")
- permissions = relationship("Permission")
+ groups = relationship("UserGroup", secondary=user_group_map, back_populates="users")
+ acl_entries = relationship("ACE")
@event.listens_for(User.__table__, 'after_create')
@@ -77,8 +76,8 @@ class UserGroup(BaseTable):
user_group_id = Column(GUID, primary_key=True, default=generate_uuid)
name = Column(String, unique=True, index=True)
is_builtin = Column(Boolean, default=False)
- users = relationship("User", secondary=user_group_link, back_populates="groups")
- roles = relationship("Role", secondary=role_group_link, back_populates="groups")
+ users = relationship("User", secondary=user_group_map, back_populates="groups")
+ acl_entries = relationship("ACE")
@event.listens_for(UserGroup.__table__, 'after_create')
@@ -93,21 +92,3 @@ def create_default_user_groups(target, connection, **kw):
connection.execute(stmt)
connection.commit()
log.debug("The default user groups have been created in the database")
-
-
-# @event.listens_for(user_group_link, 'after_create')
-# def add_admin_to_group(target, connection, **kw):
-#
-# user_groups_table = UserGroup.__table__
-# stmt = user_groups_table.select().where(user_groups_table.c.name == "Administrators")
-# result = connection.execute(stmt)
-# user_group_id = result.first().user_group_id
-#
-# users_table = User.__table__
-# stmt = users_table.select().where(users_table.c.is_superadmin.is_(True))
-# result = connection.execute(stmt)
-# user_id = result.first().user_id
-#
-# stmt = target.insert().values(user_id=user_id, user_group_id=user_group_id)
-# connection.execute(stmt)
-# connection.commit()
diff --git a/gns3server/db/repositories/computes.py b/gns3server/db/repositories/computes.py
index e5dfb1f8..578fb0c0 100644
--- a/gns3server/db/repositories/computes.py
+++ b/gns3server/db/repositories/computes.py
@@ -68,7 +68,7 @@ class ComputesRepository(BaseRepository):
async def update_compute(self, compute_id: UUID, compute_update: schemas.ComputeUpdate) -> Optional[models.Compute]:
- update_values = compute_update.dict(exclude_unset=True)
+ update_values = compute_update.model_dump(exclude_unset=True)
password = compute_update.password
if password:
diff --git a/gns3server/db/repositories/rbac.py b/gns3server/db/repositories/rbac.py
index 02fd652c..cf1aa9a8 100644
--- a/gns3server/db/repositories/rbac.py
+++ b/gns3server/db/repositories/rbac.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2020 GNS3 Technologies Inc.
+# Copyright (C) 2023 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@
# along with this program. If not, see .
from uuid import UUID
+from urllib.parse import urlparse
from typing import Optional, List, Union
from sqlalchemy import select, update, delete, null
from sqlalchemy.ext.asyncio import AsyncSession
@@ -24,7 +25,6 @@ from sqlalchemy.orm import selectinload
from .base import BaseRepository
import gns3server.db.models as models
-from gns3server.schemas.controller.rbac import HTTPMethods, PermissionAction
from gns3server import schemas
import logging
@@ -44,7 +44,7 @@ class RbacRepository(BaseRepository):
"""
query = select(models.Role).\
- options(selectinload(models.Role.permissions)).\
+ options(selectinload(models.Role.privileges)).\
where(models.Role.role_id == role_id)
result = await self._db_session.execute(query)
return result.scalars().first()
@@ -55,9 +55,8 @@ class RbacRepository(BaseRepository):
"""
query = select(models.Role).\
- options(selectinload(models.Role.permissions)).\
+ options(selectinload(models.Role.privileges)).\
where(models.Role.name == name)
- #query = select(models.Role).where(models.Role.name == name)
result = await self._db_session.execute(query)
return result.scalars().first()
@@ -66,7 +65,7 @@ class RbacRepository(BaseRepository):
Get all roles.
"""
- query = select(models.Role).options(selectinload(models.Role.permissions))
+ query = select(models.Role).options(selectinload(models.Role.privileges))
result = await self._db_session.execute(query)
return result.scalars().all()
@@ -81,7 +80,6 @@ class RbacRepository(BaseRepository):
)
self._db_session.add(db_role)
await self._db_session.commit()
- #await self._db_session.refresh(db_role)
return await self.get_role(db_role.role_id)
async def update_role(
@@ -93,7 +91,7 @@ class RbacRepository(BaseRepository):
Update a role.
"""
- update_values = role_update.dict(exclude_unset=True)
+ update_values = role_update.model_dump(exclude_unset=True)
query = update(models.Role).\
where(models.Role.role_id == role_id).\
values(update_values)
@@ -115,312 +113,246 @@ class RbacRepository(BaseRepository):
await self._db_session.commit()
return result.rowcount > 0
- async def add_permission_to_role(
+ async def add_privilege_to_role(
self,
role_id: UUID,
- permission: models.Permission
+ privilege: models.Privilege
) -> Union[None, models.Role]:
"""
- Add a permission to a role.
+ Add a privilege to a role.
"""
query = select(models.Role).\
- options(selectinload(models.Role.permissions)).\
+ options(selectinload(models.Role.privileges)).\
where(models.Role.role_id == role_id)
result = await self._db_session.execute(query)
role_db = result.scalars().first()
if not role_db:
return None
- role_db.permissions.append(permission)
+ role_db.privileges.append(privilege)
await self._db_session.commit()
await self._db_session.refresh(role_db)
return role_db
- async def remove_permission_from_role(
+ async def remove_privilege_from_role(
self,
role_id: UUID,
- permission: models.Permission
+ privilege: models.Privilege
) -> Union[None, models.Role]:
"""
- Remove a permission from a role.
+ Remove a privilege from a role.
"""
query = select(models.Role).\
- options(selectinload(models.Role.permissions)).\
+ options(selectinload(models.Role.privileges)).\
where(models.Role.role_id == role_id)
result = await self._db_session.execute(query)
role_db = result.scalars().first()
if not role_db:
return None
- role_db.permissions.remove(permission)
+ role_db.privileges.remove(privilege)
await self._db_session.commit()
await self._db_session.refresh(role_db)
return role_db
- async def get_role_permissions(self, role_id: UUID) -> List[models.Permission]:
+ async def get_role_privileges(self, role_id: UUID) -> List[models.Privilege]:
"""
- Get all the role permissions.
+ Get all the role privileges.
"""
- query = select(models.Permission).\
- join(models.Permission.roles).\
+ query = select(models.Privilege).\
+ join(models.Privilege.roles).\
filter(models.Role.role_id == role_id)
result = await self._db_session.execute(query)
return result.scalars().all()
- async def get_permission(self, permission_id: UUID) -> Optional[models.Permission]:
+ async def get_privilege(self, privilege_id: UUID) -> Optional[models.Privilege]:
"""
- Get a permission by its ID.
+ Get a privilege by its ID.
"""
- query = select(models.Permission).where(models.Permission.permission_id == permission_id)
+ query = select(models.Privilege).where(models.Privilege.privilege_id == privilege_id)
result = await self._db_session.execute(query)
return result.scalars().first()
- async def get_permission_by_path(self, path: str) -> Optional[models.Permission]:
+ async def get_privilege_by_name(self, name: str) -> Optional[models.Privilege]:
"""
- Get a permission by its path.
+ Get a privilege by its name.
"""
- query = select(models.Permission).where(models.Permission.path == path)
+ query = select(models.Privilege).where(models.Privilege.name == name)
result = await self._db_session.execute(query)
return result.scalars().first()
- async def get_permissions(self) -> List[models.Permission]:
+ async def get_privileges(self) -> List[models.Privilege]:
"""
- Get all permissions.
+ Get all privileges.
"""
- query = select(models.Permission).\
- order_by(models.Permission.path.desc())
+ query = select(models.Privilege)
result = await self._db_session.execute(query)
return result.scalars().all()
- async def check_permission_exists(self, permission_create: schemas.PermissionCreate) -> bool:
+ async def get_ace(self, ace_id: UUID) -> Optional[models.ACE]:
"""
- Check if a permission exists.
+ Get an ACE by its ID.
"""
- query = select(models.Permission).\
- where(models.Permission.methods == permission_create.methods,
- models.Permission.path == permission_create.path,
- models.Permission.action == permission_create.action)
+ query = select(models.ACE).where(models.ACE.ace_id == ace_id)
+ result = await self._db_session.execute(query)
+ return result.scalars().first()
+
+ async def get_ace_by_path(self, path: str) -> Optional[models.ACE]:
+ """
+ Get an ACE by its path.
+ """
+
+ query = select(models.ACE).where(models.ACE.path == path)
+ result = await self._db_session.execute(query)
+ return result.scalars().first()
+
+ async def get_aces(self) -> List[models.ACE]:
+ """
+ Get all ACEs.
+ """
+
+ query = select(models.ACE)
+ result = await self._db_session.execute(query)
+ return result.scalars().all()
+
+ async def check_ace_exists(self, path: str) -> bool:
+ """
+ Check if an ACE exists.
+ """
+
+ query = select(models.ACE).\
+ where(models.ACE.path == path)
result = await self._db_session.execute(query)
return result.scalars().first() is not None
- async def create_permission(self, permission_create: schemas.PermissionCreate) -> models.Permission:
+ async def create_ace(self, ace_create: schemas.ACECreate) -> models.ACE:
"""
- Create a new permission.
+ Create a new ACE
"""
- db_permission = models.Permission(
- description=permission_create.description,
- methods=permission_create.methods,
- path=permission_create.path,
- action=permission_create.action,
- )
- self._db_session.add(db_permission)
+ create_values = ace_create.model_dump(exclude_unset=True)
+ db_ace = models.ACE(**create_values)
+ self._db_session.add(db_ace)
await self._db_session.commit()
- await self._db_session.refresh(db_permission)
- return db_permission
+ await self._db_session.refresh(db_ace)
+ return db_ace
- async def update_permission(
+ async def update_ace(
self,
- permission_id: UUID,
- permission_update: schemas.PermissionUpdate
- ) -> Optional[models.Permission]:
+ ace_id: UUID,
+ ace_update: schemas.ACEUpdate
+ ) -> Optional[models.ACE]:
"""
- Update a permission.
+ Update an ACE
"""
- update_values = permission_update.dict(exclude_unset=True)
- query = update(models.Permission).\
- where(models.Permission.permission_id == permission_id).\
+ update_values = ace_update.model_dump(exclude_unset=True)
+ query = update(models.ACE).\
+ where(models.ACE.ace_id == ace_id).\
values(update_values)
await self._db_session.execute(query)
await self._db_session.commit()
- permission_db = await self.get_permission(permission_id)
- if permission_db:
- await self._db_session.refresh(permission_db) # force refresh of updated_at value
- return permission_db
+ ace_db = await self.get_ace(ace_id)
+ if ace_db:
+ await self._db_session.refresh(ace_db) # force refresh of updated_at value
+ return ace_db
- async def delete_permission(self, permission_id: UUID) -> bool:
+ async def delete_ace(self, ace_id: UUID) -> bool:
"""
- Delete a permission.
+ Delete an ACE
"""
- query = delete(models.Permission).where(models.Permission.permission_id == permission_id)
+ query = delete(models.ACE).where(models.ACE.ace_id == ace_id)
result = await self._db_session.execute(query)
await self._db_session.commit()
return result.rowcount > 0
- async def prune_permissions(self) -> int:
+ async def delete_all_ace_starting_with_path(self, path: str) -> None:
"""
- Prune orphaned permissions.
+ Delete all ACEs starting with path.
"""
- query = select(models.Permission).\
- filter((~models.Permission.roles.any()) & (models.Permission.user_id == null()))
- result = await self._db_session.execute(query)
- permissions = result.scalars().all()
- permissions_deleted = 0
- for permission in permissions:
- if await self.delete_permission(permission.permission_id):
- permissions_deleted += 1
- log.info(f"{permissions_deleted} orphaned permissions have been deleted")
- return permissions_deleted
-
- def _match_permission(
- self,
- permissions: List[models.Permission],
- method: str,
- path: str
- ) -> Union[None, models.Permission]:
- """
- Match the methods and path with a permission.
- """
-
- for permission in permissions:
- log.debug(f"RBAC: checking permission {permission.methods} {permission.path} {permission.action}")
- if method not in permission.methods:
- continue
- if permission.path.endswith("/*") and path.startswith(permission.path[:-2]):
- return permission
- elif permission.path == path:
- return permission
-
- async def get_user_permissions(self, user_id: UUID):
- """
- Get all permissions from an user.
- """
-
- query = select(models.Permission).\
- join(models.User.permissions).\
- filter(models.User.user_id == user_id).\
- order_by(models.Permission.path.desc())
-
- result = await self._db_session.execute(query)
- return result.scalars().all()
-
- async def add_permission_to_user(
- self,
- user_id: UUID,
- permission: models.Permission
- ) -> Union[None, models.User]:
- """
- Add a permission to an user.
- """
-
- query = select(models.User).\
- options(selectinload(models.User.permissions)).\
- where(models.User.user_id == user_id)
- result = await self._db_session.execute(query)
- user_db = result.scalars().first()
- if not user_db:
- return None
-
- user_db.permissions.append(permission)
- await self._db_session.commit()
- await self._db_session.refresh(user_db)
- return user_db
-
- async def remove_permission_from_user(
- self,
- user_id: UUID,
- permission: models.Permission
- ) -> Union[None, models.User]:
- """
- Remove a permission from a role.
- """
-
- query = select(models.User).\
- options(selectinload(models.User.permissions)).\
- where(models.User.user_id == user_id)
- result = await self._db_session.execute(query)
- user_db = result.scalars().first()
- if not user_db:
- return None
-
- user_db.permissions.remove(permission)
- await self._db_session.commit()
- await self._db_session.refresh(user_db)
- return user_db
-
- async def add_permission_to_user_with_path(self, user_id: UUID, path: str) -> Union[None, models.User]:
- """
- Add a permission to an user.
- """
-
- # Create a new permission with full rights on path
- new_permission = schemas.PermissionCreate(
- description=f"Allow access to {path}",
- methods=[HTTPMethods.get, HTTPMethods.head, HTTPMethods.post, HTTPMethods.put, HTTPMethods.delete],
- path=path,
- action=PermissionAction.allow
- )
- permission_db = await self.create_permission(new_permission)
-
- # Add the permission to the user
- query = select(models.User).\
- options(selectinload(models.User.permissions)).\
- where(models.User.user_id == user_id)
-
- result = await self._db_session.execute(query)
- user_db = result.scalars().first()
- if not user_db:
- return None
-
- user_db.permissions.append(permission_db)
- await self._db_session.commit()
- await self._db_session.refresh(user_db)
- return user_db
-
- async def delete_all_permissions_with_path(self, path: str) -> None:
- """
- Delete all permissions with path.
- """
-
- query = delete(models.Permission).\
- where(models.Permission.path.startswith(path)).\
+ query = delete(models.ACE).\
+ where(models.ACE.path.startswith(path)).\
execution_options(synchronize_session=False)
result = await self._db_session.execute(query)
- log.debug(f"{result.rowcount} permission(s) have been deleted")
+ log.debug(f"{result.rowcount} ACE(s) have been deleted")
- async def check_user_is_authorized(self, user_id: UUID, method: str, path: str) -> bool:
+ @staticmethod
+ def _check_path_with_aces(path: str, aces) -> bool:
"""
- Check if an user is authorized to access a resource.
+ Compare path with existing ACEs to check if the user has the required privilege on that path.
"""
- query = select(models.Permission).\
- join(models.Permission.roles).\
- join(models.Role.groups).\
- join(models.UserGroup.users).\
+ parsed_url = urlparse(path)
+ original_path = path
+ path_components = parsed_url.path.split("/")
+ # traverse the path in reverse order
+ for i in range(len(path_components), 0, -1):
+ path = "/".join(path_components[:i])
+ if not path:
+ path = "/"
+ for ace_path, ace_propagate, ace_allowed, ace_privilege in aces:
+ if ace_path == path:
+ if not ace_allowed:
+ raise PermissionError(f"Permission denied for {path}")
+ if path == original_path or ace_propagate:
+ return True # only allow if the path is the original path or the ACE is set to propagate
+ return False
+
+ async def check_user_has_privilege(self, user_id: UUID, path: str, privilege_name: str) -> bool:
+ """
+ Resource paths form a file system like tree and privileges can be inherited by paths down that tree
+ (the propagate field is True by default)
+
+ The following inheritance rules are used:
+
+ * Privileges for individual users always replace group privileges.
+ * Privileges for groups apply when the user is member of that group.
+ * Privileges on deeper levels replace those inherited from an upper level.
+ """
+
+ # retrieve all user ACEs matching the user_id and privilege name
+ query = select(models.ACE.path, models.ACE.propagate, models.ACE.allowed, models.Privilege.name).\
+ join(models.Privilege.roles).\
+ join(models.Role.acl_entries).\
+ join(models.ACE.user). \
filter(models.User.user_id == user_id).\
- order_by(models.Permission.path.desc())
+ filter(models.Privilege.name == privilege_name).\
+ order_by(models.ACE.path.desc())
result = await self._db_session.execute(query)
- permissions = result.scalars().all()
- log.debug(f"RBAC: checking authorization for user '{user_id}' on {method} '{path}'")
- matched_permission = self._match_permission(permissions, method, path)
- if matched_permission:
- log.debug(f"RBAC: matched role permission {matched_permission.methods} "
- f"{matched_permission.path} {matched_permission.action}")
- if matched_permission.action == "DENY":
- return False
- return True
+ aces = result.all()
- log.debug(f"RBAC: could not find a role permission, checking user permissions...")
- permissions = await self.get_user_permissions(user_id)
- matched_permission = self._match_permission(permissions, method, path)
- if matched_permission:
- log.debug(f"RBAC: matched user permission {matched_permission.methods} "
- f"{matched_permission.path} {matched_permission.action}")
- if matched_permission.action == "DENY":
- return False
- return True
+ try:
+ if self._check_path_with_aces(path, aces):
+ # the user has an ACE matching the path and privilege,there is no need to check group ACEs
+ return True
+ except PermissionError:
+ return False
- return False
+ # retrieve all group ACEs matching the user_id and privilege name
+ query = select(models.ACE.path, models.ACE.propagate, models.ACE.allowed, models.Privilege.name). \
+ join(models.Privilege.roles). \
+ join(models.Role.acl_entries). \
+ join(models.ACE.group). \
+ join(models.UserGroup.users).\
+ filter(models.User.user_id == user_id). \
+ filter(models.Privilege.name == privilege_name)
+
+ result = await self._db_session.execute(query)
+ aces = result.all()
+
+ try:
+ return self._check_path_with_aces(path, aces)
+ except PermissionError:
+ return False
diff --git a/gns3server/db/repositories/users.py b/gns3server/db/repositories/users.py
index 310d67a2..ea53c2e3 100644
--- a/gns3server/db/repositories/users.py
+++ b/gns3server/db/repositories/users.py
@@ -41,7 +41,7 @@ class UsersRepository(BaseRepository):
async def get_user(self, user_id: UUID) -> Optional[models.User]:
"""
- Get an user by its ID.
+ Get a user by its ID.
"""
query = select(models.User).where(models.User.user_id == user_id)
@@ -50,7 +50,7 @@ class UsersRepository(BaseRepository):
async def get_user_by_username(self, username: str) -> Optional[models.User]:
"""
- Get an user by its name.
+ Get a user by its name.
"""
query = select(models.User).where(models.User.username == username)
@@ -59,7 +59,7 @@ class UsersRepository(BaseRepository):
async def get_user_by_email(self, email: str) -> Optional[models.User]:
"""
- Get an user by its email.
+ Get a user by its email.
"""
query = select(models.User).where(models.User.email == email)
@@ -94,10 +94,10 @@ class UsersRepository(BaseRepository):
async def update_user(self, user_id: UUID, user_update: schemas.UserUpdate) -> Optional[models.User]:
"""
- Update an user.
+ Update a user.
"""
- update_values = user_update.dict(exclude_unset=True)
+ update_values = user_update.model_dump(exclude_unset=True)
password = update_values.pop("password", None)
if password:
update_values["hashed_password"] = self._auth_service.hash_password(password=password.get_secret_value())
@@ -115,7 +115,7 @@ class UsersRepository(BaseRepository):
async def delete_user(self, user_id: UUID) -> bool:
"""
- Delete an user.
+ Delete a user.
"""
query = delete(models.User).where(models.User.user_id == user_id)
@@ -165,7 +165,7 @@ class UsersRepository(BaseRepository):
async def get_user_group(self, user_group_id: UUID) -> Optional[models.UserGroup]:
"""
- Get an user group by its ID.
+ Get a user group by its ID.
"""
query = select(models.UserGroup).where(models.UserGroup.user_group_id == user_group_id)
@@ -174,7 +174,7 @@ class UsersRepository(BaseRepository):
async def get_user_group_by_name(self, name: str) -> Optional[models.UserGroup]:
"""
- Get an user group by its name.
+ Get a user group by its name.
"""
query = select(models.UserGroup).where(models.UserGroup.name == name)
@@ -207,10 +207,10 @@ class UsersRepository(BaseRepository):
user_group_update: schemas.UserGroupUpdate
) -> Optional[models.UserGroup]:
"""
- Update an user group.
+ Update a user group.
"""
- update_values = user_group_update.dict(exclude_unset=True)
+ update_values = user_group_update.model_dump(exclude_unset=True)
query = update(models.UserGroup).\
where(models.UserGroup.user_group_id == user_group_id).\
values(update_values)
@@ -224,7 +224,7 @@ class UsersRepository(BaseRepository):
async def delete_user_group(self, user_group_id: UUID) -> bool:
"""
- Delete an user group.
+ Delete a user group.
"""
query = delete(models.UserGroup).where(models.UserGroup.user_group_id == user_group_id)
@@ -238,7 +238,7 @@ class UsersRepository(BaseRepository):
user: models.User
) -> Union[None, models.UserGroup]:
"""
- Add a member to an user group.
+ Add a member to a user group.
"""
query = select(models.UserGroup).\
@@ -260,7 +260,7 @@ class UsersRepository(BaseRepository):
user: models.User
) -> Union[None, models.UserGroup]:
"""
- Remove a member from an user group.
+ Remove a member from a user group.
"""
query = select(models.UserGroup).\
@@ -278,7 +278,7 @@ class UsersRepository(BaseRepository):
async def get_user_group_members(self, user_group_id: UUID) -> List[models.User]:
"""
- Get all members from an user group.
+ Get all members from a user group.
"""
query = select(models.User).\
@@ -287,60 +287,3 @@ class UsersRepository(BaseRepository):
result = await self._db_session.execute(query)
return result.scalars().all()
-
- async def add_role_to_user_group(
- self,
- user_group_id: UUID,
- role: models.Role
- ) -> Union[None, models.UserGroup]:
- """
- Add a role to an user group.
- """
-
- query = select(models.UserGroup).\
- options(selectinload(models.UserGroup.roles)).\
- where(models.UserGroup.user_group_id == user_group_id)
- result = await self._db_session.execute(query)
- user_group_db = result.scalars().first()
- if not user_group_db:
- return None
-
- user_group_db.roles.append(role)
- await self._db_session.commit()
- await self._db_session.refresh(user_group_db)
- return user_group_db
-
- async def remove_role_from_user_group(
- self,
- user_group_id: UUID,
- role: models.Role
- ) -> Union[None, models.UserGroup]:
- """
- Remove a role from an user group.
- """
-
- query = select(models.UserGroup).\
- options(selectinload(models.UserGroup.roles)).\
- where(models.UserGroup.user_group_id == user_group_id)
- result = await self._db_session.execute(query)
- user_group_db = result.scalars().first()
- if not user_group_db:
- return None
-
- user_group_db.roles.remove(role)
- await self._db_session.commit()
- await self._db_session.refresh(user_group_db)
- return user_group_db
-
- async def get_user_group_roles(self, user_group_id: UUID) -> List[models.Role]:
- """
- Get all roles from an user group.
- """
-
- query = select(models.Role). \
- options(selectinload(models.Role.permissions)). \
- join(models.UserGroup.roles). \
- filter(models.UserGroup.user_group_id == user_group_id)
-
- result = await self._db_session.execute(query)
- return result.scalars().all()
diff --git a/gns3server/db/tasks.py b/gns3server/db/tasks.py
index 3b270b0d..35b31ec1 100644
--- a/gns3server/db/tasks.py
+++ b/gns3server/db/tasks.py
@@ -28,6 +28,11 @@ from sqlalchemy import event
from sqlalchemy.engine import Engine
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
+from alembic import command, config
+from alembic.script import ScriptDirectory
+from alembic.runtime.migration import MigrationContext
+from alembic.util.exc import CommandError
+
from gns3server.db.repositories.computes import ComputesRepository
from gns3server.db.repositories.images import ImagesRepository
from gns3server.utils.images import discover_images, check_valid_image_header, read_image_info, default_images_directory, InvalidImageError
@@ -41,15 +46,52 @@ import logging
log = logging.getLogger(__name__)
+def run_upgrade(connection, cfg):
+
+ cfg.attributes["connection"] = connection
+ try:
+ command.upgrade(cfg, "head")
+ except CommandError as e:
+ log.error(f"Could not upgrade database: {e}")
+
+
+def run_stamp(connection, cfg):
+
+ cfg.attributes["connection"] = connection
+ try:
+ command.stamp(cfg, "head")
+ except CommandError as e:
+ log.error(f"Could not stamp database: {e}")
+
+
+def check_revision(connection, cfg):
+
+ script = ScriptDirectory.from_config(cfg)
+ head_rev = script.get_revision("head").revision
+ context = MigrationContext.configure(connection)
+ current_rev = context.get_current_revision()
+ return current_rev, head_rev
+
+
async def connect_to_db(app: FastAPI) -> None:
db_path = os.path.join(Config.instance().config_dir, "gns3_controller.db")
db_url = os.environ.get("GNS3_DATABASE_URI", f"sqlite+aiosqlite:///{db_path}")
engine = create_async_engine(db_url, connect_args={"check_same_thread": False}, future=True)
+ alembic_cfg = config.Config()
+ alembic_cfg.set_main_option("script_location", "gns3server:db_migrations")
+ #alembic_cfg.set_main_option('sqlalchemy.url', db_url)
try:
async with engine.connect() as conn:
- await conn.run_sync(Base.metadata.create_all)
- log.info(f"Successfully connected to database '{db_url}'")
+ current_rev, head_rev = await conn.run_sync(check_revision, alembic_cfg)
+ log.info(f"Current database revision is {current_rev}")
+ if current_rev is None:
+ await conn.run_sync(Base.metadata.create_all)
+ await conn.run_sync(run_stamp, alembic_cfg)
+ elif current_rev != head_rev:
+ # upgrade the database if needed
+ await conn.run_sync(run_upgrade, alembic_cfg)
+ await conn.commit()
app.state._db_engine = engine
except SQLAlchemyError as e:
log.fatal(f"Error while connecting to database '{db_url}: {e}")
@@ -80,7 +122,7 @@ async def get_computes(app: FastAPI) -> List[dict]:
db_computes = await ComputesRepository(db_session).get_computes()
for db_compute in db_computes:
try:
- compute = schemas.Compute.from_orm(db_compute)
+ compute = schemas.Compute.model_validate(db_compute)
except ValidationError as e:
log.error(f"Could not load compute '{db_compute.compute_id}' from database: {e}")
continue
@@ -170,7 +212,7 @@ async def discover_images_on_filesystem(app: FastAPI):
existing_image_paths = []
for db_image in db_images:
try:
- image = schemas.Image.from_orm(db_image)
+ image = schemas.Image.model_validate(db_image)
existing_image_paths.append(image.path)
except ValidationError as e:
log.error(f"Could not load image '{db_image.filename}' from database: {e}")
diff --git a/gns3server/db_migrations/README b/gns3server/db_migrations/README
new file mode 100644
index 00000000..a2087ba3
--- /dev/null
+++ b/gns3server/db_migrations/README
@@ -0,0 +1,4 @@
+Generic single-database configuration with an async dbapi.
+
+# Command to generate a revision
+alembic revision --autogenerate -m "add fields in table"
diff --git a/gns3server/db_migrations/env.py b/gns3server/db_migrations/env.py
new file mode 100644
index 00000000..043c832b
--- /dev/null
+++ b/gns3server/db_migrations/env.py
@@ -0,0 +1,101 @@
+import asyncio
+import os
+from logging.config import fileConfig
+
+from sqlalchemy import pool
+from sqlalchemy.ext.asyncio import async_engine_from_config
+
+from alembic import context
+
+# this is the Alembic Config object, which provides
+# access to the values within the .ini file in use.
+config = context.config
+
+# Interpret the config file for Python logging.
+# This line sets up loggers basically.
+if config.config_file_name is not None:
+ fileConfig(config.config_file_name)
+
+# add your model's MetaData object here
+# for 'autogenerate' support
+# from myapp import mymodel
+# target_metadata = mymodel.Base.metadata
+from gns3server.db.models.base import Base
+target_metadata = Base.metadata
+
+# other values from the config, defined by the needs of env.py,
+# can be acquired:
+# my_important_option = config.get_main_option("my_important_option")
+# ... etc.
+
+
+def run_migrations_offline() -> None:
+ """Run migrations in 'offline' mode.
+
+ This configures the context with just a URL
+ and not an Engine, though an Engine is acceptable
+ here as well. By skipping the Engine creation
+ we don't even need a DBAPI to be available.
+
+ Calls to context.execute() here emit the given string to the
+ script output.
+
+ """
+ url = config.get_main_option("sqlalchemy.url")
+ context.configure(
+ url=url,
+ target_metadata=target_metadata,
+ literal_binds=True,
+ dialect_opts={"paramstyle": "named"},
+ )
+
+ with context.begin_transaction():
+ context.run_migrations()
+
+
+def do_run_migrations(connection):
+ context.configure(connection=connection, target_metadata=target_metadata)
+
+ with context.begin_transaction():
+ context.run_migrations()
+
+
+async def run_async_migrations():
+
+ from gns3server.config import Config as GNS3Config
+ db_path = os.path.join(GNS3Config.instance().config_dir, "gns3_controller.db")
+ db_url = os.environ.get("GNS3_DATABASE_URI", f"sqlite+aiosqlite:///{db_path}")
+ config.set_main_option('sqlalchemy.url', db_url)
+
+ connectable = async_engine_from_config(
+ config.get_section(config.config_ini_section),
+ prefix="sqlalchemy.",
+ poolclass=pool.NullPool,
+ )
+
+ async with connectable.connect() as connection:
+ await connection.run_sync(do_run_migrations)
+
+ await connectable.dispose()
+
+
+def run_migrations_online():
+ """Run migrations in 'online' mode.
+
+ In this scenario we need to create an Engine
+ and associate a connection with the context.
+
+ """
+
+ connectable = config.attributes.get("connection", None)
+
+ if connectable is None:
+ asyncio.run(run_async_migrations())
+ else:
+ do_run_migrations(connectable)
+
+
+if context.is_offline_mode():
+ run_migrations_offline()
+else:
+ run_migrations_online()
diff --git a/gns3server/db_migrations/script.py.mako b/gns3server/db_migrations/script.py.mako
new file mode 100644
index 00000000..55df2863
--- /dev/null
+++ b/gns3server/db_migrations/script.py.mako
@@ -0,0 +1,24 @@
+"""${message}
+
+Revision ID: ${up_revision}
+Revises: ${down_revision | comma,n}
+Create Date: ${create_date}
+
+"""
+from alembic import op
+import sqlalchemy as sa
+${imports if imports else ""}
+
+# revision identifiers, used by Alembic.
+revision = ${repr(up_revision)}
+down_revision = ${repr(down_revision)}
+branch_labels = ${repr(branch_labels)}
+depends_on = ${repr(depends_on)}
+
+
+def upgrade() -> None:
+ ${upgrades if upgrades else "pass"}
+
+
+def downgrade() -> None:
+ ${downgrades if downgrades else "pass"}
diff --git a/gns3server/db_migrations/versions/7ceeddd9c9a8_init.py b/gns3server/db_migrations/versions/7ceeddd9c9a8_init.py
new file mode 100644
index 00000000..ca9a5ff2
--- /dev/null
+++ b/gns3server/db_migrations/versions/7ceeddd9c9a8_init.py
@@ -0,0 +1,28 @@
+"""init
+
+Revision ID: 7ceeddd9c9a8
+Revises:
+Create Date: 2023-01-11 08:55:25.116126
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '7ceeddd9c9a8'
+down_revision = None
+branch_labels = None
+depends_on = None
+
+
+def upgrade() -> None:
+ # ### commands auto generated by Alembic - please adjust! ###
+ pass
+ # ### end Alembic commands ###
+
+
+def downgrade() -> None:
+ # ### commands auto generated by Alembic - please adjust! ###
+ pass
+ # ### end Alembic commands ###
diff --git a/gns3server/disks/OVMF.fd b/gns3server/disks/OVMF.fd
new file mode 100644
index 00000000..d05e10cb
Binary files /dev/null and b/gns3server/disks/OVMF.fd differ
diff --git a/gns3server/disks/OVMF_CODE.fd b/gns3server/disks/OVMF_CODE.fd
new file mode 100644
index 00000000..7df46b8b
Binary files /dev/null and b/gns3server/disks/OVMF_CODE.fd differ
diff --git a/gns3server/disks/OVMF_VARS.fd b/gns3server/disks/OVMF_VARS.fd
new file mode 100644
index 00000000..efb4f46c
Binary files /dev/null and b/gns3server/disks/OVMF_VARS.fd differ
diff --git a/gns3server/disks/empty100G.qcow2 b/gns3server/disks/empty100G.qcow2
new file mode 100644
index 00000000..94ed3e44
Binary files /dev/null and b/gns3server/disks/empty100G.qcow2 differ
diff --git a/gns3server/disks/empty10G.qcow2 b/gns3server/disks/empty10G.qcow2
new file mode 100644
index 00000000..6a4d79b5
Binary files /dev/null and b/gns3server/disks/empty10G.qcow2 differ
diff --git a/gns3server/disks/empty150G.qcow2 b/gns3server/disks/empty150G.qcow2
new file mode 100644
index 00000000..da508060
Binary files /dev/null and b/gns3server/disks/empty150G.qcow2 differ
diff --git a/gns3server/disks/empty1T.qcow2 b/gns3server/disks/empty1T.qcow2
new file mode 100644
index 00000000..62e992ee
Binary files /dev/null and b/gns3server/disks/empty1T.qcow2 differ
diff --git a/gns3server/disks/empty200G.qcow2 b/gns3server/disks/empty200G.qcow2
new file mode 100644
index 00000000..ee7ce517
Binary files /dev/null and b/gns3server/disks/empty200G.qcow2 differ
diff --git a/gns3server/disks/empty20G.qcow2 b/gns3server/disks/empty20G.qcow2
new file mode 100644
index 00000000..968f8fcf
Binary files /dev/null and b/gns3server/disks/empty20G.qcow2 differ
diff --git a/gns3server/disks/empty250G.qcow2 b/gns3server/disks/empty250G.qcow2
new file mode 100644
index 00000000..7be4641e
Binary files /dev/null and b/gns3server/disks/empty250G.qcow2 differ
diff --git a/gns3server/disks/empty30G.qcow2 b/gns3server/disks/empty30G.qcow2
new file mode 100644
index 00000000..414611bb
Binary files /dev/null and b/gns3server/disks/empty30G.qcow2 differ
diff --git a/gns3server/disks/empty40G.qcow2 b/gns3server/disks/empty40G.qcow2
new file mode 100644
index 00000000..74d53888
Binary files /dev/null and b/gns3server/disks/empty40G.qcow2 differ
diff --git a/gns3server/disks/empty500G.qcow2 b/gns3server/disks/empty500G.qcow2
new file mode 100644
index 00000000..76d863a8
Binary files /dev/null and b/gns3server/disks/empty500G.qcow2 differ
diff --git a/gns3server/disks/empty50G.qcow2 b/gns3server/disks/empty50G.qcow2
new file mode 100644
index 00000000..14366951
Binary files /dev/null and b/gns3server/disks/empty50G.qcow2 differ
diff --git a/gns3server/disks/empty8G.qcow2 b/gns3server/disks/empty8G.qcow2
new file mode 100644
index 00000000..35f83ab7
Binary files /dev/null and b/gns3server/disks/empty8G.qcow2 differ
diff --git a/gns3server/schemas/__init__.py b/gns3server/schemas/__init__.py
index d9ff9015..5b764c7e 100644
--- a/gns3server/schemas/__init__.py
+++ b/gns3server/schemas/__init__.py
@@ -30,7 +30,7 @@ from .controller.gns3vm import GNS3VM
from .controller.nodes import NodeCreate, NodeUpdate, NodeDuplicate, NodeCapture, Node
from .controller.projects import ProjectCreate, ProjectUpdate, ProjectDuplicate, Project, ProjectFile, ProjectCompression
from .controller.users import UserCreate, UserUpdate, LoggedInUserUpdate, User, Credentials, UserGroupCreate, UserGroupUpdate, UserGroup
-from .controller.rbac import RoleCreate, RoleUpdate, Role, PermissionCreate, PermissionUpdate, Permission
+from .controller.rbac import RoleCreate, RoleUpdate, Role, Privilege, ACECreate, ACEUpdate, ACE
from .controller.tokens import Token
from .controller.snapshots import SnapshotCreate, Snapshot
from .controller.iou_license import IOULicense
diff --git a/gns3server/schemas/common.py b/gns3server/schemas/common.py
index ad6d6866..31aa9f47 100644
--- a/gns3server/schemas/common.py
+++ b/gns3server/schemas/common.py
@@ -43,9 +43,9 @@ class CustomAdapter(BaseModel):
"""
adapter_number: int
- port_name: str
+ port_name: Optional[str] = None
adapter_type: Optional[str] = None
- mac_address: Optional[str] = Field(None, regex="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$")
+ mac_address: Optional[str] = Field(None, pattern="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$")
class ConsoleType(str, Enum):
diff --git a/gns3server/schemas/compute/docker_nodes.py b/gns3server/schemas/compute/docker_nodes.py
index 7129aaae..964b88e7 100644
--- a/gns3server/schemas/compute/docker_nodes.py
+++ b/gns3server/schemas/compute/docker_nodes.py
@@ -31,7 +31,7 @@ class DockerBase(BaseModel):
node_id: Optional[UUID] = None
console: Optional[int] = Field(None, gt=0, le=65535, description="Console TCP port")
console_type: Optional[ConsoleType] = Field(None, description="Console type")
- console_resolution: Optional[str] = Field(None, regex="^[0-9]+x[0-9]+$", description="Console resolution for VNC")
+ console_resolution: Optional[str] = Field(None, pattern="^[0-9]+x[0-9]+$", description="Console resolution for VNC")
console_http_port: Optional[int] = Field(None, description="Internal port in the container for the HTTP server")
console_http_path: Optional[str] = Field(None, description="Path of the web interface")
aux: Optional[int] = Field(None, gt=0, le=65535, description="Auxiliary TCP port")
@@ -67,7 +67,7 @@ class DockerUpdate(DockerBase):
class Docker(DockerBase):
container_id: str = Field(
- ..., min_length=12, max_length=64, regex="^[a-f0-9]+$", description="Docker container ID (read only)"
+ ..., min_length=12, max_length=64, pattern="^[a-f0-9]+$", description="Docker container ID (read only)"
)
project_id: UUID = Field(..., description="Project ID")
node_directory: str = Field(..., description="Path to the node working directory (read only)")
diff --git a/gns3server/schemas/compute/dynamips_nodes.py b/gns3server/schemas/compute/dynamips_nodes.py
index 2ef6c86c..f59790c5 100644
--- a/gns3server/schemas/compute/dynamips_nodes.py
+++ b/gns3server/schemas/compute/dynamips_nodes.py
@@ -129,13 +129,13 @@ class DynamipsBase(BaseModel):
image: Optional[str] = Field(None, description="Path to the IOS image")
image_md5sum: Optional[str] = Field(None, description="Checksum of the IOS image")
usage: Optional[str] = Field(None, description="How to use the Dynamips VM")
- chassis: Optional[str] = Field(None, description="Cisco router chassis model", regex="^[0-9]{4}(XM)?$")
+ chassis: Optional[str] = Field(None, description="Cisco router chassis model", pattern="^[0-9]{4}(XM)?$")
startup_config_content: Optional[str] = Field(None, description="Content of IOS startup configuration file")
private_config_content: Optional[str] = Field(None, description="Content of IOS private configuration file")
mmap: Optional[bool] = Field(None, description="MMAP feature")
sparsemem: Optional[bool] = Field(None, description="Sparse memory feature")
clock_divisor: Optional[int] = Field(None, description="Clock divisor")
- idlepc: Optional[str] = Field(None, description="Idle-PC value", regex="^(0x[0-9a-fA-F]+)?$")
+ idlepc: Optional[str] = Field(None, description="Idle-PC value", pattern="^(0x[0-9a-fA-F]+)?$")
idlemax: Optional[int] = Field(None, description="Idlemax value")
idlesleep: Optional[int] = Field(None, description="Idlesleep value")
exec_area: Optional[int] = Field(None, description="Exec area value")
@@ -147,7 +147,7 @@ class DynamipsBase(BaseModel):
aux: Optional[int] = Field(None, gt=0, le=65535, description="Auxiliary console TCP port")
aux_type: Optional[DynamipsConsoleType] = Field(None, description="Auxiliary console type")
mac_addr: Optional[str] = Field(
- None, description="Base MAC address", regex="^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$"
+ None, description="Base MAC address", pattern="^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$"
)
system_id: Optional[str] = Field(None, description="System ID")
slot0: Optional[DynamipsAdapters] = Field(None, description="Network module slot 0")
@@ -174,7 +174,7 @@ class DynamipsCreate(DynamipsBase):
"""
name: str
- platform: str = Field(..., description="Cisco router platform", regex="^c[0-9]{4}$")
+ platform: str = Field(..., description="Cisco router platform", pattern="^c[0-9]{4}$")
image: str = Field(..., description="Path to the IOS image")
ram: int = Field(..., description="Amount of RAM in MB")
diff --git a/gns3server/schemas/compute/ethernet_switch_nodes.py b/gns3server/schemas/compute/ethernet_switch_nodes.py
index 5265aa4c..62c3a66c 100644
--- a/gns3server/schemas/compute/ethernet_switch_nodes.py
+++ b/gns3server/schemas/compute/ethernet_switch_nodes.py
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from pydantic import BaseModel, Field, validator
+from pydantic import BaseModel, Field, model_validator
from typing import Optional, List
from uuid import UUID
from enum import Enum
@@ -43,15 +43,14 @@ class EthernetSwitchPort(BaseModel):
port_number: int
type: EthernetSwitchPortType = Field(..., description="Port type")
vlan: int = Field(..., ge=1, le=4094, description="VLAN number")
- ethertype: Optional[EthernetSwitchEtherType] = Field(None, description="QinQ Ethertype")
+ ethertype: Optional[EthernetSwitchEtherType] = Field("0x8100", description="QinQ Ethertype")
- @validator("ethertype")
- def validate_ethertype(cls, v, values):
+ @model_validator(mode="after")
+ def check_ethertype(self) -> "EthernetSwitchPort":
- if v is not None:
- if "type" not in values or values["type"] != EthernetSwitchPortType.qinq:
- raise ValueError("Ethertype is only for QinQ port type")
- return v
+ if self.ethertype != EthernetSwitchEtherType.ethertype_8021q and self.type != EthernetSwitchPortType.qinq:
+ raise ValueError("Ethertype is only for QinQ port type")
+ return self
class TelnetConsoleType(str, Enum):
diff --git a/gns3server/schemas/compute/iou_nodes.py b/gns3server/schemas/compute/iou_nodes.py
index aa09323b..61dcae9c 100644
--- a/gns3server/schemas/compute/iou_nodes.py
+++ b/gns3server/schemas/compute/iou_nodes.py
@@ -29,7 +29,7 @@ class IOUBase(BaseModel):
name: str
path: str = Field(..., description="IOU executable path")
application_id: int = Field(..., description="Application ID for running IOU executable")
- node_id: Optional[UUID]
+ node_id: Optional[UUID] = None
usage: Optional[str] = Field(None, description="How to use the node")
console: Optional[int] = Field(None, gt=0, le=65535, description="Console TCP port")
console_type: Optional[ConsoleType] = Field(None, description="Console type")
@@ -57,7 +57,7 @@ class IOUUpdate(IOUBase):
Properties to update an IOU node.
"""
- name: Optional[str]
+ name: Optional[str] = None
path: Optional[str] = Field(None, description="IOU executable path")
application_id: Optional[int] = Field(None, description="Application ID for running IOU executable")
diff --git a/gns3server/schemas/compute/qemu_nodes.py b/gns3server/schemas/compute/qemu_nodes.py
index 3a10fe8b..ec007edf 100644
--- a/gns3server/schemas/compute/qemu_nodes.py
+++ b/gns3server/schemas/compute/qemu_nodes.py
@@ -156,7 +156,7 @@ class QemuBase(BaseModel):
"""
name: str
- node_id: Optional[UUID]
+ node_id: Optional[UUID] = None
usage: Optional[str] = Field(None, description="How to use the node")
linked_clone: Optional[bool] = Field(None, description="Whether the VM is a linked clone or not")
qemu_path: Optional[str] = Field(None, description="Qemu executable path")
@@ -197,7 +197,7 @@ class QemuBase(BaseModel):
adapters: Optional[int] = Field(None, ge=0, le=275, description="Number of adapters")
adapter_type: Optional[QemuAdapterType] = Field(None, description="QEMU adapter type")
mac_address: Optional[str] = Field(
- None, description="QEMU MAC address", regex="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
+ None, description="QEMU MAC address", pattern="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
)
replicate_network_connection_state: Optional[bool] = Field(
None, description="Replicate the network connection state for links in Qemu"
@@ -205,6 +205,8 @@ class QemuBase(BaseModel):
create_config_disk: Optional[bool] = Field(
None, description="Automatically create a config disk on HDD disk interface (secondary slave)"
)
+ tpm: Optional[bool] = Field(None, description="Enable Trusted Platform Module (TPM)")
+ uefi: Optional[bool] = Field(None, description="Enable UEFI boot mode")
on_close: Optional[QemuOnCloseAction] = Field(None, description="Action to execute on the VM is closed")
cpu_throttling: Optional[int] = Field(None, ge=0, le=800, description="Percentage of CPU allowed for QEMU")
process_priority: Optional[QemuProcessPriority] = Field(None, description="Process priority for QEMU")
@@ -225,7 +227,7 @@ class QemuUpdate(QemuBase):
Properties to update a Qemu node.
"""
- name: Optional[str]
+ name: Optional[str] = None
class Qemu(QemuBase):
diff --git a/gns3server/schemas/compute/virtualbox_nodes.py b/gns3server/schemas/compute/virtualbox_nodes.py
index 53f93975..cdfc6ae3 100644
--- a/gns3server/schemas/compute/virtualbox_nodes.py
+++ b/gns3server/schemas/compute/virtualbox_nodes.py
@@ -58,7 +58,7 @@ class VirtualBoxBase(BaseModel):
name: str
vmname: str = Field(..., description="VirtualBox VM name (in VirtualBox itself)")
- node_id: Optional[UUID]
+ node_id: Optional[UUID] = None
linked_clone: Optional[bool] = Field(None, description="Whether the VM is a linked clone or not")
usage: Optional[str] = Field(None, description="How to use the node")
# 36 adapters is the maximum given by the ICH9 chipset in VirtualBox
@@ -86,8 +86,8 @@ class VirtualBoxUpdate(VirtualBoxBase):
Properties to update a VirtualBox node.
"""
- name: Optional[str]
- vmname: Optional[str]
+ name: Optional[str] = None
+ vmname: Optional[str] = None
class VirtualBox(VirtualBoxBase):
diff --git a/gns3server/schemas/compute/vmware_nodes.py b/gns3server/schemas/compute/vmware_nodes.py
index a2fb26f2..7e0a78f0 100644
--- a/gns3server/schemas/compute/vmware_nodes.py
+++ b/gns3server/schemas/compute/vmware_nodes.py
@@ -64,7 +64,7 @@ class VMwareBase(BaseModel):
name: str
vmx_path: str = Field(..., description="Path to the vmx file")
linked_clone: bool = Field(..., description="Whether the VM is a linked clone or not")
- node_id: Optional[UUID]
+ node_id: Optional[UUID] = None
usage: Optional[str] = Field(None, description="How to use the node")
console: Optional[int] = Field(None, gt=0, le=65535, description="Console TCP port")
console_type: Optional[VMwareConsoleType] = Field(None, description="Console type")
@@ -90,9 +90,9 @@ class VMwareUpdate(VMwareBase):
Properties to update a VMware node.
"""
- name: Optional[str]
- vmx_path: Optional[str]
- linked_clone: Optional[bool]
+ name: Optional[str] = None
+ vmx_path: Optional[str] = None
+ linked_clone: Optional[bool] = None
class VMware(VMwareBase):
diff --git a/gns3server/schemas/compute/vpcs_nodes.py b/gns3server/schemas/compute/vpcs_nodes.py
index 6373182c..a0adf91b 100644
--- a/gns3server/schemas/compute/vpcs_nodes.py
+++ b/gns3server/schemas/compute/vpcs_nodes.py
@@ -37,7 +37,7 @@ class VPCSBase(BaseModel):
"""
name: str
- node_id: Optional[UUID]
+ node_id: Optional[UUID] = None
usage: Optional[str] = Field(None, description="How to use the node")
console: Optional[int] = Field(None, gt=0, le=65535, description="Console TCP port")
console_type: Optional[ConsoleType] = Field(None, description="Console type")
@@ -57,7 +57,7 @@ class VPCSUpdate(VPCSBase):
Properties to update a VPCS node.
"""
- name: Optional[str]
+ name: Optional[str] = None
class VPCS(VPCSBase):
diff --git a/gns3server/schemas/config.py b/gns3server/schemas/config.py
index 99202c48..f5155ec3 100644
--- a/gns3server/schemas/config.py
+++ b/gns3server/schemas/config.py
@@ -17,7 +17,16 @@
import socket
from enum import Enum
-from pydantic import BaseModel, Field, SecretStr, FilePath, DirectoryPath, validator
+from pydantic import (
+ ConfigDict,
+ BaseModel,
+ Field,
+ SecretStr,
+ FilePath,
+ DirectoryPath,
+ field_validator,
+ model_validator
+)
from typing import List
@@ -28,19 +37,13 @@ class ControllerSettings(BaseModel):
jwt_access_token_expire_minutes: int = 1440 # 24 hours
default_admin_username: str = "admin"
default_admin_password: SecretStr = SecretStr("admin")
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
class VPCSSettings(BaseModel):
vpcs_path: str = "vpcs"
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
class DynamipsSettings(BaseModel):
@@ -50,20 +53,14 @@ class DynamipsSettings(BaseModel):
dynamips_path: str = "dynamips"
sparse_memory_support: bool = True
ghost_ios_support: bool = True
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
class IOUSettings(BaseModel):
iourc_path: str = None
license_check: bool = True
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
class QemuSettings(BaseModel):
@@ -72,19 +69,13 @@ class QemuSettings(BaseModel):
monitor_host: str = "127.0.0.1"
enable_hardware_acceleration: bool = True
require_hardware_acceleration: bool = False
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
class VirtualBoxSettings(BaseModel):
vboxmanage_path: str = None
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
class VMwareSettings(BaseModel):
@@ -93,16 +84,13 @@ class VMwareSettings(BaseModel):
vmnet_start_range: int = Field(2, ge=1, le=255)
vmnet_end_range: int = Field(255, ge=1, le=255) # should be limited to 19 on Windows
block_host_traffic: bool = False
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)
- @validator("vmnet_end_range")
- def vmnet_port_range(cls, v, values):
- if "vmnet_start_range" in values and v <= values["vmnet_start_range"]:
+ @model_validator(mode="after")
+ def check_vmnet_port_range(self) -> "VMwareSettings":
+ if self.vmnet_end_range <= self.vmnet_start_range:
raise ValueError("vmnet_end_range must be > vmnet_start_range")
- return v
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
+ return self
class ServerProtocol(str, Enum):
@@ -156,45 +144,42 @@ class ServerSettings(BaseModel):
default_nat_interface: str = None
allow_remote_console: bool = False
enable_builtin_templates: bool = True
+ model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True, use_enum_values=True)
- @validator("additional_images_paths", pre=True)
+ @field_validator("additional_images_paths", mode="before")
+ @classmethod
def split_additional_images_paths(cls, v):
if v:
return v.split(";")
return list()
- @validator("allowed_interfaces", pre=True)
+ @field_validator("allowed_interfaces", mode="before")
+ @classmethod
def split_allowed_interfaces(cls, v):
if v:
return v.split(",")
return list()
- @validator("console_end_port_range")
- def console_port_range(cls, v, values):
- if "console_start_port_range" in values and v <= values["console_start_port_range"]:
+ @model_validator(mode="after")
+ def check_console_port_range(self) -> "ServerSettings":
+ if self.console_end_port_range <= self.console_start_port_range:
raise ValueError("console_end_port_range must be > console_start_port_range")
- return v
+ return self
- @validator("vnc_console_end_port_range")
- def vnc_console_port_range(cls, v, values):
- if "vnc_console_start_port_range" in values and v <= values["vnc_console_start_port_range"]:
+ @model_validator(mode="after")
+ def check_vnc_port_range(self) -> "ServerSettings":
+ if self.vnc_console_end_port_range <= self.vnc_console_start_port_range:
raise ValueError("vnc_console_end_port_range must be > vnc_console_start_port_range")
- return v
+ return self
- @validator("enable_ssl")
- def validate_enable_ssl(cls, v, values):
-
- if v is True:
- if "certfile" not in values or not values["certfile"]:
+ @model_validator(mode="after")
+ def check_enable_ssl(self) -> "ServerSettings":
+ if self.enable_ssl is True:
+ if not self.certfile:
raise ValueError("SSL is enabled but certfile is not configured")
- if "certkey" not in values or not values["certkey"]:
+ if not self.certkey:
raise ValueError("SSL is enabled but certkey is not configured")
- return v
-
- class Config:
- validate_assignment = True
- anystr_strip_whitespace = True
- use_enum_values = True
+ return self
class ServerConfig(BaseModel):
diff --git a/gns3server/schemas/controller/appliances.py b/gns3server/schemas/controller/appliances.py
index af816d4a..cfece410 100644
--- a/gns3server/schemas/controller/appliances.py
+++ b/gns3server/schemas/controller/appliances.py
@@ -321,7 +321,7 @@ class ApplianceImage(BaseModel):
filename: str = Field(..., title='Filename')
version: str = Field(..., title='Version of the file')
- md5sum: str = Field(..., title='md5sum of the file', regex='^[a-f0-9]{32}$')
+ md5sum: str = Field(..., title='md5sum of the file', pattern='^[a-f0-9]{32}$')
filesize: int = Field(..., title='File size in bytes')
download_url: Optional[Union[AnyUrl, constr(max_length=0)]] = Field(
None, title='Download url where you can download the appliance from a browser'
@@ -351,7 +351,7 @@ class ApplianceVersionImages(BaseModel):
class ApplianceVersion(BaseModel):
name: str = Field(..., title='Name of the version')
- idlepc: Optional[str] = Field(None, regex='^0x[0-9a-f]{8}')
+ idlepc: Optional[str] = Field(None, pattern='^0x[0-9a-f]{8}')
images: Optional[ApplianceVersionImages] = Field(None, title='Images used for this version')
@@ -417,6 +417,7 @@ class Appliance(BaseModel):
appliance_id: UUID = Field(..., title='Appliance ID')
name: str = Field(..., title='Appliance name')
+ builtin: Optional[bool] = Field(None, title='Whether the appliance is builtin or not')
category: Category = Field(..., title='Category of the appliance')
description: str = Field(
..., title='Description of the appliance. Could be a marketing description'
diff --git a/gns3server/schemas/controller/base.py b/gns3server/schemas/controller/base.py
index 90d536a6..08f44699 100644
--- a/gns3server/schemas/controller/base.py
+++ b/gns3server/schemas/controller/base.py
@@ -21,5 +21,5 @@ from pydantic import BaseModel
class DateTimeModelMixin(BaseModel):
- created_at: Optional[datetime]
- updated_at: Optional[datetime]
+ created_at: Optional[datetime] = None
+ updated_at: Optional[datetime] = None
diff --git a/gns3server/schemas/controller/computes.py b/gns3server/schemas/controller/computes.py
index 58039670..ecb4e333 100644
--- a/gns3server/schemas/controller/computes.py
+++ b/gns3server/schemas/controller/computes.py
@@ -16,8 +16,15 @@
import uuid
-from pydantic import BaseModel, Field, SecretStr, validator
-from typing import List, Optional, Union
+from pydantic import (
+ ConfigDict,
+ BaseModel,
+ Field,
+ SecretStr,
+ field_validator,
+ model_validator
+)
+from typing import List, Optional, Union, Any
from enum import Enum
from .nodes import NodeType
@@ -44,9 +51,7 @@ class ComputeBase(BaseModel):
user: str = None
password: Optional[SecretStr] = None
name: Optional[str] = None
-
- class Config:
- use_enum_values = True
+ model_config = ConfigDict(use_enum_values=True)
class ComputeCreate(ComputeBase):
@@ -55,46 +60,28 @@ class ComputeCreate(ComputeBase):
"""
compute_id: Union[str, uuid.UUID] = None
-
- class Config:
- schema_extra = {
- "example": {
- "name": "My compute",
- "host": "127.0.0.1",
- "port": 3080,
- "user": "user",
- "password": "password"
- }
+ model_config = ConfigDict(json_schema_extra={
+ "example": {
+ "name": "My compute",
+ "host": "127.0.0.1",
+ "port": 3080,
+ "user": "user",
+ "password": "password"
}
+ })
- @validator("compute_id", pre=True, always=True)
- def default_compute_id(cls, v, values):
+ @model_validator(mode='before')
+ @classmethod
+ def set_default_compute_id_and_name(cls, data: Any) -> Any:
- if v is not None:
- return v
- else:
- protocol = values.get("protocol")
- host = values.get("host")
- port = values.get("port")
- return uuid.uuid5(uuid.NAMESPACE_URL, f"{protocol}://{host}:{port}")
-
- @validator("name", pre=True, always=True)
- def generate_name(cls, name, values):
-
- if name is not None:
- return name
- else:
- protocol = values.get("protocol")
- host = values.get("host")
- port = values.get("port")
- user = values.get("user")
- if user:
- # due to random user generated by 1.4 it's common to have a very long user
- if len(user) > 14:
- user = user[:11] + "..."
- return f"{protocol}://{user}@{host}:{port}"
- else:
- return f"{protocol}://{host}:{port}"
+ if "compute_id" not in data:
+ data['compute_id'] = uuid.uuid5(
+ uuid.NAMESPACE_URL,
+ f"{data.get('protocol')}://{data.get('host')}:{data.get('port')}"
+ )
+ if "name" not in data:
+ data['name'] = f"{data.get('protocol')}://{data.get('user', '')}@{data.get('host')}:{data.get('port')}"
+ return data
class ComputeUpdate(ComputeBase):
@@ -107,14 +94,12 @@ class ComputeUpdate(ComputeBase):
port: Optional[int] = Field(None, gt=0, le=65535)
user: Optional[str] = None
password: Optional[SecretStr] = None
-
- class Config:
- schema_extra = {
- "example": {
- "host": "10.0.0.1",
- "port": 8080,
- }
+ model_config = ConfigDict(json_schema_extra={
+ "example": {
+ "host": "10.0.0.1",
+ "port": 8080,
}
+ })
class Capabilities(BaseModel):
@@ -143,9 +128,7 @@ class Compute(DateTimeModelMixin, ComputeBase):
disk_usage_percent: Optional[float] = Field(None, description="Disk usage of the compute", ge=0, le=100)
last_error: Optional[str] = Field(None, description="Last error found on the compute")
capabilities: Optional[Capabilities] = None
-
- class Config:
- orm_mode = True
+ model_config = ConfigDict(from_attributes=True)
class ComputeVirtualBoxVM(BaseModel):
@@ -182,6 +165,4 @@ class AutoIdlePC(BaseModel):
platform: str = Field(..., description="Cisco platform")
image: str = Field(..., description="Image path")
ram: int = Field(..., description="Amount of RAM in MB")
-
- class Config:
- schema_extra = {"example": {"platform": "c7200", "image": "/path/to/c7200_image.bin", "ram": 256}}
+ model_config = ConfigDict(json_schema_extra={"example": {"platform": "c7200", "image": "/path/to/c7200_image.bin", "ram": 256}})
diff --git a/gns3server/schemas/controller/images.py b/gns3server/schemas/controller/images.py
index 64efcdbf..417bc086 100644
--- a/gns3server/schemas/controller/images.py
+++ b/gns3server/schemas/controller/images.py
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from pydantic import BaseModel, Field
+from pydantic import ConfigDict, BaseModel, Field
from enum import Enum
from .base import DateTimeModelMixin
@@ -41,6 +41,4 @@ class ImageBase(BaseModel):
class Image(DateTimeModelMixin, ImageBase):
-
- class Config:
- orm_mode = True
+ model_config = ConfigDict(from_attributes=True)
diff --git a/gns3server/schemas/controller/links.py b/gns3server/schemas/controller/links.py
index af3f3952..fd853e2f 100644
--- a/gns3server/schemas/controller/links.py
+++ b/gns3server/schemas/controller/links.py
@@ -54,7 +54,7 @@ class LinkBase(BaseModel):
Link data.
"""
- nodes: Optional[List[LinkNode]] = Field(None, min_items=0, max_items=2)
+ nodes: Optional[List[LinkNode]] = Field(None, min_length=0, max_length=2)
suspend: Optional[bool] = None
link_style: Optional[LinkStyle] = None
filters: Optional[dict] = None
@@ -63,7 +63,7 @@ class LinkBase(BaseModel):
class LinkCreate(LinkBase):
link_id: UUID = Field(default_factory=uuid4)
- nodes: List[LinkNode] = Field(..., min_items=2, max_items=2)
+ nodes: List[LinkNode] = Field(..., min_length=2, max_length=2)
class LinkUpdate(LinkBase):
diff --git a/gns3server/schemas/controller/nodes.py b/gns3server/schemas/controller/nodes.py
index 1e59fef1..c05014bc 100644
--- a/gns3server/schemas/controller/nodes.py
+++ b/gns3server/schemas/controller/nodes.py
@@ -14,8 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from pydantic import BaseModel, Field, validator
-from typing import List, Optional, Union
+from pydantic import BaseModel, Field, model_validator
+from typing import List, Optional, Union, Any
from enum import Enum
from uuid import UUID, uuid4
@@ -96,7 +96,7 @@ class NodePort(BaseModel):
port_number: int = Field(..., description="Port slot")
link_type: LinkType = Field(..., description="Type of link")
data_link_types: dict = Field(..., description="Available PCAP types for capture")
- mac_address: Union[str, None] = Field(None, regex="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$")
+ mac_address: Union[str, None] = Field(None, pattern="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$")
class NodeBase(BaseModel):
@@ -117,7 +117,7 @@ class NodeBase(BaseModel):
False, description="Automatically start the console when the node has started"
)
aux: Optional[int] = Field(None, gt=0, le=65535, description="Auxiliary console TCP port")
- aux_type: Optional[ConsoleType]
+ aux_type: Optional[ConsoleType] = None
properties: Optional[dict] = Field(default_factory=dict, description="Properties specific to an emulator")
label: Optional[Label] = None
@@ -134,21 +134,18 @@ class NodeBase(BaseModel):
first_port_name: Optional[str] = Field(None, description="Name of the first port")
custom_adapters: Optional[List[CustomAdapter]] = None
- @validator("port_name_format", pre=True, always=True)
- def default_port_name_format(cls, v, values):
- if v is None:
- if "node_type" in values and values["node_type"] == NodeType.iou:
- return "Ethernet{segment0}/{port0}"
- return "Ethernet{0}"
- return v
+ @model_validator(mode='before')
+ @classmethod
+ def set_default_port_name_format_and_port_segment_size(cls, data: Any) -> Any:
- @validator("port_segment_size", pre=True, always=True)
- def default_port_segment_size(cls, v, values):
- if v is None:
- if "node_type" in values and values["node_type"] == NodeType.iou:
- return 4
- return 0
- return v
+ if "port_name_format" not in data:
+ if data.get('node_type') == NodeType.iou:
+ data['port_name_format'] = "Ethernet{segment0}/{port0}"
+ data['port_segment_size'] = 4
+ else:
+ data['port_name_format'] = "Ethernet{0}"
+ data['port_segment_size'] = 0
+ return data
class NodeCreate(NodeBase):
diff --git a/gns3server/schemas/controller/rbac.py b/gns3server/schemas/controller/rbac.py
index a3f4c9c1..9d44e5c4 100644
--- a/gns3server/schemas/controller/rbac.py
+++ b/gns3server/schemas/controller/rbac.py
@@ -15,75 +15,69 @@
# along with this program. If not, see .
from typing import Optional, List
-from pydantic import BaseModel, validator
+from pydantic import ConfigDict, BaseModel, Field
from uuid import UUID
from enum import Enum
from .base import DateTimeModelMixin
-class HTTPMethods(str, Enum):
+class PrivilegeBase(BaseModel):
"""
- HTTP method type.
+ Common privilege properties.
"""
- get = "GET"
- head = "HEAD"
- post = "POST"
- patch = "PATCH"
- put = "PUT"
- delete = "DELETE"
-
-
-class PermissionAction(str, Enum):
- """
- Action to perform when permission is matched.
- """
-
- allow = "ALLOW"
- deny = "DENY"
-
-
-class PermissionBase(BaseModel):
- """
- Common permission properties.
- """
-
- methods: List[HTTPMethods]
- path: str
- action: PermissionAction
+ name: str
description: Optional[str] = None
- class Config:
- use_enum_values = True
- @validator("action", pre=True)
- def action_uppercase(cls, v):
- return v.upper()
+class Privilege(DateTimeModelMixin, PrivilegeBase):
+
+ privilege_id: UUID
+ model_config = ConfigDict(from_attributes=True)
-class PermissionCreate(PermissionBase):
+class ACEType(str, Enum):
+
+ user = "user"
+ group = "group"
+
+
+class ACEBase(BaseModel):
"""
- Properties to create a permission.
+ Common ACE properties.
+ """
+
+ ace_type: ACEType = Field(..., description="Type of the ACE")
+ path: str
+ propagate: Optional[bool] = True
+ allowed: Optional[bool] = True
+ user_id: Optional[UUID] = None
+ group_id: Optional[UUID] = None
+ role_id: UUID
+ model_config = ConfigDict(use_enum_values=True)
+
+
+class ACECreate(ACEBase):
+ """
+ Properties to create an ACE.
"""
pass
-class PermissionUpdate(PermissionBase):
+class ACEUpdate(ACEBase):
"""
- Properties to update a role.
+ Properties to update an ACE.
"""
pass
-class Permission(DateTimeModelMixin, PermissionBase):
+class ACE(DateTimeModelMixin, ACEBase):
- permission_id: UUID
-
- class Config:
- orm_mode = True
+ ace_id: UUID
+ model_config = ConfigDict(from_attributes=True)
class RoleBase(BaseModel):
@@ -115,7 +109,5 @@ class Role(DateTimeModelMixin, RoleBase):
role_id: UUID
is_builtin: bool
- permissions: List[Permission]
-
- class Config:
- orm_mode = True
+ privileges: List[Privilege]
+ model_config = ConfigDict(from_attributes=True)
diff --git a/gns3server/schemas/controller/templates/__init__.py b/gns3server/schemas/controller/templates/__init__.py
index b57e4e33..33741e2b 100644
--- a/gns3server/schemas/controller/templates/__init__.py
+++ b/gns3server/schemas/controller/templates/__init__.py
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from pydantic import BaseModel, Field
+from pydantic import ConfigDict, BaseModel, Field
from typing import Optional, Union
from enum import Enum
from uuid import UUID
@@ -58,15 +58,11 @@ class TemplateCreate(TemplateBase):
name: str
template_type: NodeType
-
- class Config:
- extra = "allow"
+ model_config = ConfigDict(extra="allow")
class TemplateUpdate(TemplateBase):
-
- class Config:
- extra = "allow"
+ model_config = ConfigDict(extra="allow")
class Template(DateTimeModelMixin, TemplateBase):
@@ -77,10 +73,7 @@ class Template(DateTimeModelMixin, TemplateBase):
symbol: str
builtin: bool
template_type: NodeType
-
- class Config:
- extra = "allow"
- orm_mode = True
+ model_config = ConfigDict(extra="allow", from_attributes=True)
class TemplateUsage(BaseModel):
diff --git a/gns3server/schemas/controller/templates/docker_templates.py b/gns3server/schemas/controller/templates/docker_templates.py
index 9d020cf8..2225f39a 100644
--- a/gns3server/schemas/controller/templates/docker_templates.py
+++ b/gns3server/schemas/controller/templates/docker_templates.py
@@ -44,7 +44,7 @@ class DockerTemplate(TemplateBase):
description="Path of the web interface",
)
console_resolution: Optional[str] = Field(
- "1024x768", regex="^[0-9]+x[0-9]+$", description="Console resolution for VNC"
+ "1024x768", pattern="^[0-9]+x[0-9]+$", description="Console resolution for VNC"
)
extra_hosts: Optional[str] = Field("", description="Docker extra hosts (added to /etc/hosts)")
extra_volumes: Optional[List] = Field([], description="Additional directories to make persistent")
diff --git a/gns3server/schemas/controller/templates/dynamips_templates.py b/gns3server/schemas/controller/templates/dynamips_templates.py
index 4c590eec..5f0d5773 100644
--- a/gns3server/schemas/controller/templates/dynamips_templates.py
+++ b/gns3server/schemas/controller/templates/dynamips_templates.py
@@ -40,12 +40,12 @@ class DynamipsTemplate(TemplateBase):
exec_area: Optional[int] = Field(64, description="Exec area value")
mmap: Optional[bool] = Field(True, description="MMAP feature")
mac_addr: Optional[str] = Field(
- "", description="Base MAC address", regex="^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$|^$"
+ "", description="Base MAC address", pattern="^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$|^$"
)
system_id: Optional[str] = Field("FTX0945W0MY", description="System ID")
startup_config: Optional[str] = Field("ios_base_startup-config.txt", description="IOS startup configuration file")
private_config: Optional[str] = Field("", description="IOS private configuration file")
- idlepc: Optional[str] = Field("", description="Idle-PC value", regex="^(0x[0-9a-fA-F]+)?$|^$")
+ idlepc: Optional[str] = Field("", description="Idle-PC value", pattern="^(0x[0-9a-fA-F]+)?$|^$")
idlemax: Optional[int] = Field(500, description="Idlemax value")
idlesleep: Optional[int] = Field(30, description="Idlesleep value")
disk0: Optional[int] = Field(0, description="Disk0 size in MB")
diff --git a/gns3server/schemas/controller/templates/ethernet_hub_templates.py b/gns3server/schemas/controller/templates/ethernet_hub_templates.py
index 9501f2e2..263a942c 100644
--- a/gns3server/schemas/controller/templates/ethernet_hub_templates.py
+++ b/gns3server/schemas/controller/templates/ethernet_hub_templates.py
@@ -22,14 +22,14 @@ from typing import Optional, List
DEFAULT_PORTS = [
- dict(port_number=0, name="Ethernet0"),
- dict(port_number=1, name="Ethernet1"),
- dict(port_number=2, name="Ethernet2"),
- dict(port_number=3, name="Ethernet3"),
- dict(port_number=4, name="Ethernet4"),
- dict(port_number=5, name="Ethernet5"),
- dict(port_number=6, name="Ethernet6"),
- dict(port_number=7, name="Ethernet7"),
+ EthernetHubPort(port_number=0, name="Ethernet0"),
+ EthernetHubPort(port_number=1, name="Ethernet1"),
+ EthernetHubPort(port_number=2, name="Ethernet2"),
+ EthernetHubPort(port_number=3, name="Ethernet3"),
+ EthernetHubPort(port_number=4, name="Ethernet4"),
+ EthernetHubPort(port_number=5, name="Ethernet5"),
+ EthernetHubPort(port_number=6, name="Ethernet6"),
+ EthernetHubPort(port_number=7, name="Ethernet7"),
]
diff --git a/gns3server/schemas/controller/templates/ethernet_switch_templates.py b/gns3server/schemas/controller/templates/ethernet_switch_templates.py
index ab1ab52d..4831d2a4 100644
--- a/gns3server/schemas/controller/templates/ethernet_switch_templates.py
+++ b/gns3server/schemas/controller/templates/ethernet_switch_templates.py
@@ -23,14 +23,14 @@ from typing import Optional, List
from enum import Enum
DEFAULT_PORTS = [
- dict(port_number=0, name="Ethernet0", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=1, name="Ethernet1", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=2, name="Ethernet2", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=3, name="Ethernet3", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=4, name="Ethernet4", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=5, name="Ethernet5", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=6, name="Ethernet6", vlan=1, type="access", ethertype="0x8100"),
- dict(port_number=7, name="Ethernet7", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=0, name="Ethernet0", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=1, name="Ethernet1", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=2, name="Ethernet2", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=3, name="Ethernet3", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=4, name="Ethernet4", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=5, name="Ethernet5", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=6, name="Ethernet6", vlan=1, type="access", ethertype="0x8100"),
+ EthernetSwitchPort(port_number=7, name="Ethernet7", vlan=1, type="access", ethertype="0x8100"),
]
diff --git a/gns3server/schemas/controller/templates/qemu_templates.py b/gns3server/schemas/controller/templates/qemu_templates.py
index 2de491e1..5b73f50d 100644
--- a/gns3server/schemas/controller/templates/qemu_templates.py
+++ b/gns3server/schemas/controller/templates/qemu_templates.py
@@ -45,7 +45,7 @@ class QemuTemplate(TemplateBase):
adapters: Optional[int] = Field(1, ge=0, le=275, description="Number of adapters")
adapter_type: Optional[QemuAdapterType] = Field("e1000", description="QEMU adapter type")
mac_address: Optional[str] = Field(
- "", description="QEMU MAC address", regex="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$|^$"
+ "", description="QEMU MAC address", pattern="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$|^$"
)
first_port_name: Optional[str] = Field("", description="Optional name of the first networking port example: eth0")
port_name_format: Optional[str] = Field(
@@ -80,6 +80,8 @@ class QemuTemplate(TemplateBase):
create_config_disk: Optional[bool] = Field(
False, description="Automatically create a config disk on HDD disk interface (secondary slave)"
)
+ tpm: Optional[bool] = Field(False, description="Enable Trusted Platform Module (TPM)")
+ uefi: Optional[bool] = Field(False, description="Enable UEFI boot mode")
on_close: Optional[QemuOnCloseAction] = Field("power_off", description="Action to execute on the VM is closed")
cpu_throttling: Optional[int] = Field(0, ge=0, le=800, description="Percentage of CPU allowed for QEMU")
process_priority: Optional[QemuProcessPriority] = Field("normal", description="Process priority for QEMU")
diff --git a/gns3server/schemas/controller/topology.py b/gns3server/schemas/controller/topology.py
index ee0c69a1..d62930ee 100644
--- a/gns3server/schemas/controller/topology.py
+++ b/gns3server/schemas/controller/topology.py
@@ -75,7 +75,7 @@ def main():
with open(sys.argv[1]) as f:
data = json.load(f)
- Topology.parse_obj(data)
+ Topology.model_validate(data)
if __name__ == "__main__":
diff --git a/gns3server/schemas/controller/users.py b/gns3server/schemas/controller/users.py
index cef4a076..673b28dd 100644
--- a/gns3server/schemas/controller/users.py
+++ b/gns3server/schemas/controller/users.py
@@ -16,7 +16,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import EmailStr, BaseModel, Field, SecretStr
+from pydantic import ConfigDict, EmailStr, BaseModel, Field, SecretStr
from uuid import UUID
from .base import DateTimeModelMixin
@@ -27,24 +27,24 @@ class UserBase(BaseModel):
Common user properties.
"""
- username: Optional[str] = Field(None, min_length=3, regex="[a-zA-Z0-9_-]+$")
+ username: Optional[str] = Field(None, min_length=3, pattern="[a-zA-Z0-9_-]+$")
is_active: bool = True
- email: Optional[EmailStr]
- full_name: Optional[str]
+ email: Optional[EmailStr] = None
+ full_name: Optional[str] = None
class UserCreate(UserBase):
"""
- Properties to create an user.
+ Properties to create a user.
"""
- username: str = Field(..., min_length=3, regex="[a-zA-Z0-9_-]+$")
+ username: str = Field(..., min_length=3, pattern="[a-zA-Z0-9_-]+$")
password: SecretStr = Field(..., min_length=6, max_length=100)
class UserUpdate(UserBase):
"""
- Properties to update an user.
+ Properties to update a user.
"""
password: Optional[SecretStr] = Field(None, min_length=6, max_length=100)
@@ -52,12 +52,12 @@ class UserUpdate(UserBase):
class LoggedInUserUpdate(BaseModel):
"""
- Properties to update a logged in user.
+ Properties to update a logged-in user.
"""
password: Optional[SecretStr] = Field(None, min_length=6, max_length=100)
- email: Optional[EmailStr]
- full_name: Optional[str]
+ email: Optional[EmailStr] = None
+ full_name: Optional[str] = None
class User(DateTimeModelMixin, UserBase):
@@ -65,9 +65,7 @@ class User(DateTimeModelMixin, UserBase):
user_id: UUID
last_login: Optional[datetime] = None
is_superadmin: bool = False
-
- class Config:
- orm_mode = True
+ model_config = ConfigDict(from_attributes=True)
class UserGroupBase(BaseModel):
@@ -75,20 +73,20 @@ class UserGroupBase(BaseModel):
Common user group properties.
"""
- name: Optional[str] = Field(None, min_length=3, regex="[a-zA-Z0-9_-]+$")
+ name: Optional[str] = Field(None, min_length=3, pattern="[a-zA-Z0-9_-]+$")
class UserGroupCreate(UserGroupBase):
"""
- Properties to create an user group.
+ Properties to create a user group.
"""
- name: Optional[str] = Field(..., min_length=3, regex="[a-zA-Z0-9_-]+$")
+ name: Optional[str] = Field(..., min_length=3, pattern="[a-zA-Z0-9_-]+$")
class UserGroupUpdate(UserGroupBase):
"""
- Properties to update an user group.
+ Properties to update a user group.
"""
pass
@@ -98,9 +96,7 @@ class UserGroup(DateTimeModelMixin, UserGroupBase):
user_group_id: UUID
is_builtin: bool
-
- class Config:
- orm_mode = True
+ model_config = ConfigDict(from_attributes=True)
class Credentials(BaseModel):
diff --git a/gns3server/schemas/qemu_disk_image.py b/gns3server/schemas/qemu_disk_image.py
index f1a6c000..98007a4f 100644
--- a/gns3server/schemas/qemu_disk_image.py
+++ b/gns3server/schemas/qemu_disk_image.py
@@ -81,14 +81,14 @@ class QemuDiskImageBase(BaseModel):
format: QemuDiskImageFormat = Field(..., description="Image format type")
size: int = Field(..., description="Image size in Megabytes")
- preallocation: Optional[QemuDiskImagePreallocation]
- cluster_size: Optional[int]
- refcount_bits: Optional[int]
- lazy_refcounts: Optional[QemuDiskImageOnOff]
- subformat: Optional[QemuDiskImageSubformat]
- static: Optional[QemuDiskImageOnOff]
- zeroed_grain: Optional[QemuDiskImageOnOff]
- adapter_type: Optional[QemuDiskImageAdapterType]
+ preallocation: Optional[QemuDiskImagePreallocation] = None
+ cluster_size: Optional[int] = None
+ refcount_bits: Optional[int] = None
+ lazy_refcounts: Optional[QemuDiskImageOnOff] = None
+ subformat: Optional[QemuDiskImageSubformat] = None
+ static: Optional[QemuDiskImageOnOff] = None
+ zeroed_grain: Optional[QemuDiskImageOnOff] = None
+ adapter_type: Optional[QemuDiskImageAdapterType] = None
class QemuDiskImageCreate(QemuDiskImageBase):
diff --git a/gns3server/server.py b/gns3server/server.py
index 553fc6f2..6673d81c 100644
--- a/gns3server/server.py
+++ b/gns3server/server.py
@@ -167,8 +167,10 @@ class Server:
config.Server.allow_remote_console = args.allow
config.Server.host = args.host
config.Server.port = args.port
- config.Server.certfile = args.certfile
- config.Server.certkey = args.certkey
+ if args.certfile:
+ config.Server.certfile = args.certfile
+ if args.certkey:
+ config.Server.certkey = args.certkey
config.Server.enable_ssl = args.ssl
def _signal_handling(self):
@@ -284,6 +286,13 @@ class Server:
log.critical("The current working directory doesn't exist")
return
+ try:
+ import truststore
+ truststore.inject_into_ssl()
+ log.info("Using system certificate store for SSL connections")
+ except ImportError:
+ pass
+
CrashReport.instance()
host = config.Server.host
port = config.Server.port
diff --git a/gns3server/services/computes.py b/gns3server/services/computes.py
index 46a58b0e..995cb769 100644
--- a/gns3server/services/computes.py
+++ b/gns3server/services/computes.py
@@ -49,7 +49,7 @@ class ComputesService:
compute = await self._controller.add_compute(
compute_id=str(db_compute.compute_id),
connect=connect,
- **compute_create.dict(exclude_unset=True, exclude={"compute_id"}),
+ **compute_create.model_dump(exclude_unset=True, exclude={"compute_id"}),
)
self._controller.notification.controller_emit("compute.created", compute.asdict())
return db_compute
@@ -66,7 +66,7 @@ class ComputesService:
) -> models.Compute:
compute = self._controller.get_compute(str(compute_id))
- await compute.update(**compute_update.dict(exclude_unset=True))
+ await compute.update(**compute_update.model_dump(exclude_unset=True))
db_compute = await self._computes_repo.update_compute(compute_id, compute_update)
if not db_compute:
raise ControllerNotFoundError(f"Compute '{compute_id}' not found")
diff --git a/gns3server/services/templates.py b/gns3server/services/templates.py
index 62e206da..125610dd 100644
--- a/gns3server/services/templates.py
+++ b/gns3server/services/templates.py
@@ -237,11 +237,11 @@ class TemplatesService:
# get the default template settings
create_settings = jsonable_encoder(template_create, exclude_unset=True)
template_schema = TEMPLATE_TYPE_TO_SCHEMA[template_create.template_type]
- template_settings = template_schema.parse_obj(create_settings).dict()
+ template_settings = template_schema.model_validate(create_settings).model_dump()
if template_create.template_type == "dynamips":
# special case for Dynamips to cover all platform types that contain specific settings
dynamips_template_schema = DYNAMIPS_PLATFORM_TO_SCHEMA[template_settings["platform"]]
- template_settings = dynamips_template_schema.parse_obj(create_settings).dict()
+ template_settings = dynamips_template_schema.model_validate(create_settings).model_dump()
except pydantic.ValidationError as e:
raise ControllerBadRequestError(f"JSON schema error received while creating new template: {e}")
@@ -287,7 +287,7 @@ class TemplatesService:
template_schema = DYNAMIPS_PLATFORM_TO_UPDATE_SCHEMA[db_template.platform]
else:
template_schema = TEMPLATE_TYPE_TO_UPDATE_SCHEMA[db_template.template_type]
- template_settings = template_schema.parse_obj(update_settings).dict(exclude_unset=True)
+ template_settings = template_schema.model_validate(update_settings).model_dump(exclude_unset=True)
except pydantic.ValidationError as e:
raise ControllerBadRequestError(f"JSON schema error received while updating template: {e}")
@@ -297,7 +297,7 @@ class TemplatesService:
elif db_template.template_type == "iou" and "path" in template_settings:
await self._remove_image(db_template.template_id, db_template.path)
elif db_template.template_type == "qemu":
- for key in template_update.dict().keys():
+ for key in template_update.model_dump().keys():
if key.endswith("_image") and key in template_settings:
await self._remove_image(db_template.template_id, db_template.__dict__[key])
diff --git a/gns3server/static/web-ui/26.49028ab13de5de406c90.js b/gns3server/static/web-ui/26.49028ab13de5de406c90.js
new file mode 100644
index 00000000..0c692c06
--- /dev/null
+++ b/gns3server/static/web-ui/26.49028ab13de5de406c90.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkgns3_web_ui=self.webpackChunkgns3_web_ui||[]).push([[26],{91026:function(W,g,a){a.r(g),a.d(g,{TopologySummaryComponent:function(){return U}});var t=a(38999),_=a(96852),h=a(14200),f=a(36889),v=a(3941),y=a(15132),p=a(40098),x=a(39095),c=a(88802),S=a(73044),d=a(59412),T=a(93386);function C(i,e){if(1&i){var o=t.EpF();t.TgZ(0,"div",2),t.NdJ("mousemove",function(r){return t.CHM(o),t.oxw().dragWidget(r)},!1,t.evT)("mouseup",function(){return t.CHM(o),t.oxw().toggleDragging(!1)},!1,t.evT),t.qZA()}}function b(i,e){1&i&&(t.O4$(),t.TgZ(0,"svg",28),t._UZ(1,"rect",29),t.qZA())}function E(i,e){1&i&&(t.O4$(),t.TgZ(0,"svg",28),t._UZ(1,"rect",30),t.qZA())}function Z(i,e){1&i&&(t.O4$(),t.TgZ(0,"svg",28),t._UZ(1,"rect",31),t.qZA())}function O(i,e){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){var o=t.oxw().$implicit;t.xp6(1),t.lnq(" ",o.console_type,"://",o.console_host,":",o.console," ")}}function P(i,e){1&i&&(t.TgZ(0,"div"),t._uU(1," none "),t.qZA())}function M(i,e){if(1&i&&(t.TgZ(0,"div",25),t.TgZ(1,"div"),t.YNc(2,b,2,0,"svg",26),t.YNc(3,E,2,0,"svg",26),t.YNc(4,Z,2,0,"svg",26),t._uU(5),t.qZA(),t.YNc(6,O,2,3,"div",27),t.YNc(7,P,2,0,"div",27),t.qZA()),2&i){var o=e.$implicit;t.xp6(2),t.Q6J("ngIf","started"===o.status),t.xp6(1),t.Q6J("ngIf","suspended"===o.status),t.xp6(1),t.Q6J("ngIf","stopped"===o.status),t.xp6(1),t.hij(" ",o.name," "),t.xp6(1),t.Q6J("ngIf",null!=o.console&&null!=o.console&&"none"!=o.console_type),t.xp6(1),t.Q6J("ngIf",null==o.console||"none"===o.console_type)}}function w(i,e){1&i&&(t.O4$(),t.TgZ(0,"svg",28),t._UZ(1,"rect",29),t.qZA())}function A(i,e){1&i&&(t.O4$(),t.TgZ(0,"svg",28),t._UZ(1,"rect",31),t.qZA())}function F(i,e){if(1&i&&(t.TgZ(0,"div",25),t.TgZ(1,"div"),t.YNc(2,w,2,0,"svg",26),t.YNc(3,A,2,0,"svg",26),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA(),t.TgZ(7,"div"),t._uU(8),t.qZA(),t.qZA()),2&i){var o=e.$implicit,s=t.oxw(2);t.xp6(2),t.Q6J("ngIf",o.connected),t.xp6(1),t.Q6J("ngIf",!o.connected),t.xp6(1),t.hij(" ",o.name," "),t.xp6(2),t.hij(" ",o.host," "),t.xp6(2),t.hij(" ",s.server.location," ")}}var I=function(i){return{lightTheme:i}},D=function(){return{right:!0,left:!0,bottom:!0,top:!0}};function N(i,e){if(1&i){var o=t.EpF();t.TgZ(0,"div",3),t.NdJ("mousedown",function(){return t.CHM(o),t.oxw().toggleDragging(!0)})("resizeStart",function(){return t.CHM(o),t.oxw().toggleDragging(!1)})("resizeEnd",function(n){return t.CHM(o),t.oxw().onResizeEnd(n)}),t.TgZ(1,"div",4),t.TgZ(2,"mat-tab-group"),t.TgZ(3,"mat-tab",5),t.NdJ("click",function(){return t.CHM(o),t.oxw().toggleTopologyVisibility(!0)}),t.TgZ(4,"div",6),t.TgZ(5,"div",7),t.TgZ(6,"mat-select",8),t.TgZ(7,"mat-optgroup",9),t.TgZ(8,"mat-option",10),t.NdJ("onSelectionChange",function(){return t.CHM(o),t.oxw().applyStatusFilter("started")}),t._uU(9,"started"),t.qZA(),t.TgZ(10,"mat-option",11),t.NdJ("onSelectionChange",function(){return t.CHM(o),t.oxw().applyStatusFilter("suspended")}),t._uU(11,"suspended"),t.qZA(),t.TgZ(12,"mat-option",12),t.NdJ("onSelectionChange",function(){return t.CHM(o),t.oxw().applyStatusFilter("stopped")}),t._uU(13,"stopped"),t.qZA(),t.qZA(),t.TgZ(14,"mat-optgroup",13),t.TgZ(15,"mat-option",14),t.NdJ("onSelectionChange",function(){return t.CHM(o),t.oxw().applyCaptureFilter("capture")}),t._uU(16,"active capture(s)"),t.qZA(),t.TgZ(17,"mat-option",15),t.NdJ("onSelectionChange",function(){return t.CHM(o),t.oxw().applyCaptureFilter("packet")}),t._uU(18,"active packet captures"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(19,"div",16),t.TgZ(20,"mat-select",17),t.NdJ("selectionChange",function(){return t.CHM(o),t.oxw().setSortingOrder()})("valueChange",function(n){return t.CHM(o),t.oxw().sortingOrder=n}),t.TgZ(21,"mat-option",18),t._uU(22,"sort by name ascending"),t.qZA(),t.TgZ(23,"mat-option",19),t._uU(24,"sort by name descending"),t.qZA(),t.qZA(),t.qZA(),t._UZ(25,"mat-divider",20),t.TgZ(26,"div",21),t.YNc(27,M,8,6,"div",22),t.qZA(),t.qZA(),t.qZA(),t.TgZ(28,"mat-tab",23),t.NdJ("click",function(){return t.CHM(o),t.oxw().toggleTopologyVisibility(!1)}),t.TgZ(29,"div",6),t.TgZ(30,"div",24),t.YNc(31,F,9,5,"div",22),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&i){var s=t.oxw();t.Q6J("ngStyle",s.style)("ngClass",t.VKq(9,I,s.isLightThemeEnabled))("validateResize",s.validate)("resizeEdges",t.DdM(11,D))("enableGhostResize",!0),t.xp6(20),t.Q6J("value",s.sortingOrder),t.xp6(6),t.Q6J("ngStyle",s.styleInside),t.xp6(1),t.Q6J("ngForOf",s.filteredNodes),t.xp6(4),t.Q6J("ngForOf",s.computes)}}var U=function(){function i(e,o,s,r,n){this.nodesDataSource=e,this.projectService=o,this.computeService=s,this.linksDataSource=r,this.themeService=n,this.closeTopologySummary=new t.vpe,this.style={},this.styleInside={height:"280px"},this.subscriptions=[],this.nodes=[],this.filteredNodes=[],this.sortingOrder="asc",this.startedStatusFilterEnabled=!1,this.suspendedStatusFilterEnabled=!1,this.stoppedStatusFilterEnabled=!1,this.captureFilterEnabled=!1,this.packetFilterEnabled=!1,this.computes=[],this.isTopologyVisible=!0,this.isDraggingEnabled=!1,this.isLightThemeEnabled=!1}return i.prototype.ngOnInit=function(){var e=this;this.isLightThemeEnabled="light"===this.themeService.getActualTheme(),this.subscriptions.push(this.nodesDataSource.changes.subscribe(function(o){e.nodes=o,e.nodes.forEach(function(s){("0.0.0.0"===s.console_host||"0:0:0:0:0:0:0:0"===s.console_host||"::"===s.console_host)&&(s.console_host=e.server.host)}),e.filteredNodes=o.sort("asc"===e.sortingOrder?e.compareAsc:e.compareDesc)})),this.projectService.getStatistics(this.server,this.project.project_id).subscribe(function(o){e.projectsStatistics=o}),this.computeService.getComputes(this.server).subscribe(function(o){e.computes=o}),this.revertPosition()},i.prototype.revertPosition=function(){var e=localStorage.getItem("leftPosition"),o=localStorage.getItem("rightPosition"),s=localStorage.getItem("topPosition"),r=localStorage.getItem("widthOfWidget"),n=localStorage.getItem("heightOfWidget");this.style=s?{position:"fixed",left:+e+"px",right:+o+"px",top:+s+"px",width:+r+"px",height:+n+"px"}:{top:"60px",right:"0px",width:"320px",height:"400px"}},i.prototype.toggleDragging=function(e){this.isDraggingEnabled=e},i.prototype.dragWidget=function(e){var o=Number(e.movementX),s=Number(e.movementY),r=Number(this.style.width.split("px")[0]),n=Number(this.style.height.split("px")[0]),l=Number(this.style.top.split("px")[0])+s;if(this.style.left){var u=Number(this.style.left.split("px")[0])+o;this.style={position:"fixed",left:u+"px",top:l+"px",width:r+"px",height:n+"px"},localStorage.setItem("leftPosition",u.toString()),localStorage.setItem("topPosition",l.toString()),localStorage.setItem("widthOfWidget",r.toString()),localStorage.setItem("heightOfWidget",n.toString())}else{var m=Number(this.style.right.split("px")[0])-o;this.style={position:"fixed",right:m+"px",top:l+"px",width:r+"px",height:n+"px"},localStorage.setItem("rightPosition",m.toString()),localStorage.setItem("topPosition",l.toString()),localStorage.setItem("widthOfWidget",r.toString()),localStorage.setItem("heightOfWidget",n.toString())}},i.prototype.validate=function(e){return!(e.rectangle.width&&e.rectangle.height&&(e.rectangle.width<290||e.rectangle.height<260))},i.prototype.onResizeEnd=function(e){this.style={position:"fixed",left:e.rectangle.left+"px",top:e.rectangle.top+"px",width:e.rectangle.width+"px",height:e.rectangle.height+"px"},this.styleInside={height:e.rectangle.height-120+"px"}},i.prototype.toggleTopologyVisibility=function(e){this.isTopologyVisible=e,this.revertPosition()},i.prototype.compareAsc=function(e,o){return e.namef.length)&&(U=f.length);for(var B=0,V=new Array(U);B0&&oe[oe.length-1])&&(6===qe[0]||2===qe[0])){se=0;continue}if(3===qe[0]&&(!oe||qe[1]>oe[0]&&qe[1]1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:j,timings:K}}function I(K){var j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:K,options:j}}function D(K){return{type:6,styles:K,offset:null}}function k(K,j,J){return{type:0,name:K,styles:j,options:J}}function M(K){return{type:5,steps:K}}function _(K,j){var J=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:K,animation:j,options:J}}function E(){var K=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:K}}function A(K,j){var J=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:K,animation:j,options:J}}function S(K){Promise.resolve(null).then(K)}var O=function(){function K(){var j=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,J=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,B.Z)(this,K),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=j+J}return(0,U.Z)(K,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(J){return J()}),this._onDoneFns=[])}},{key:"onStart",value:function(J){this._onStartFns.push(J)}},{key:"onDone",value:function(J){this._onDoneFns.push(J)}},{key:"onDestroy",value:function(J){this._onDestroyFns.push(J)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var J=this;S(function(){return J._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(J){return J()}),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(J){return J()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this._started=!1}},{key:"setPosition",value:function(J){this._position=this.totalTime?J*this.totalTime:1}},{key:"getPosition",value:function(){return this.totalTime?this._position/this.totalTime:1}},{key:"triggerCallback",value:function(J){var ee="start"==J?this._onStartFns:this._onDoneFns;ee.forEach(function($){return $()}),ee.length=0}}]),K}(),F=function(){function K(j){var J=this;(0,B.Z)(this,K),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=j;var ee=0,$=0,ae=0,se=this.players.length;0==se?S(function(){return J._onFinish()}):this.players.forEach(function(ce){ce.onDone(function(){++ee==se&&J._onFinish()}),ce.onDestroy(function(){++$==se&&J._onDestroy()}),ce.onStart(function(){++ae==se&&J._onStart()})}),this.totalTime=this.players.reduce(function(ce,le){return Math.max(ce,le.totalTime)},0)}return(0,U.Z)(K,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(J){return J()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(J){return J.init()})}},{key:"onStart",value:function(J){this._onStartFns.push(J)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(J){return J()}),this._onStartFns=[])}},{key:"onDone",value:function(J){this._onDoneFns.push(J)}},{key:"onDestroy",value:function(J){this._onDestroyFns.push(J)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(J){return J.play()})}},{key:"pause",value:function(){this.players.forEach(function(J){return J.pause()})}},{key:"restart",value:function(){this.players.forEach(function(J){return J.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(J){return J.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(J){return J.destroy()}),this._onDestroyFns.forEach(function(J){return J()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(J){return J.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(J){var ee=J*this.totalTime;this.players.forEach(function($){var ae=$.totalTime?Math.min(1,ee/$.totalTime):1;$.setPosition(ae)})}},{key:"getPosition",value:function(){var J=this.players.reduce(function(ee,$){return null===ee||$.totalTime>ee.totalTime?$:ee},null);return null!=J?J.getPosition():0}},{key:"beforeDestroy",value:function(){this.players.forEach(function(J){J.beforeDestroy&&J.beforeDestroy()})}},{key:"triggerCallback",value:function(J){var ee="start"==J?this._onStartFns:this._onDoneFns;ee.forEach(function($){return $()}),ee.length=0}}]),K}(),z="!"},6517:function(ue,q,f){"use strict";f.d(q,{rt:function(){return rt},s1:function(){return xe},$s:function(){return qe},kH:function(){return cr},Em:function(){return De},tE:function(){return tr},qV:function(){return Zn},qm:function(){return Pe},Kd:function(){return Pn},X6:function(){return we},yG:function(){return ct}});var U=f(71955),B=f(13920),V=f(89200),Z=f(10509),T=f(97154),R=f(18967),b=f(14105),v=f(40098),I=f(38999),D=f(68707),k=f(5051),M=f(90838),_=f(43161),g=f(32819),E=f(59371),N=f(57263),A=f(58780),w=f(85639),S=f(48359),O=f(18756),F=f(76161),z=f(44213),K=f(78081),j=f(15427),J=f(96798);function se(he,Ie){return(he.getAttribute(Ie)||"").match(/\S+/g)||[]}var ce="cdk-describedby-message-container",le="cdk-describedby-message",oe="cdk-describedby-host",Ae=0,be=new Map,it=null,qe=function(){var he=function(){function Ie(Ne){(0,R.Z)(this,Ie),this._document=Ne}return(0,b.Z)(Ie,[{key:"describe",value:function(Le,ze,At){if(this._canBeDescribed(Le,ze)){var an=_t(ze,At);"string"!=typeof ze?(yt(ze),be.set(an,{messageElement:ze,referenceCount:0})):be.has(an)||this._createMessageElement(ze,At),this._isElementDescribedByMessage(Le,an)||this._addMessageReference(Le,an)}}},{key:"removeDescription",value:function(Le,ze,At){if(ze&&this._isElementNode(Le)){var an=_t(ze,At);if(this._isElementDescribedByMessage(Le,an)&&this._removeMessageReference(Le,an),"string"==typeof ze){var qn=be.get(an);qn&&0===qn.referenceCount&&this._deleteMessageElement(an)}it&&0===it.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var Le=this._document.querySelectorAll("[".concat(oe,"]")),ze=0;ze-1&&At!==Ne._activeItemIndex&&(Ne._activeItemIndex=At)}})}return(0,b.Z)(he,[{key:"skipPredicate",value:function(Ne){return this._skipPredicateFn=Ne,this}},{key:"withWrap",value:function(){var Ne=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=Ne,this}},{key:"withVerticalOrientation",value:function(){var Ne=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=Ne,this}},{key:"withHorizontalOrientation",value:function(Ne){return this._horizontal=Ne,this}},{key:"withAllowedModifierKeys",value:function(Ne){return this._allowedModifierKeys=Ne,this}},{key:"withTypeAhead",value:function(){var Ne=this,Le=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe((0,E.b)(function(ze){return Ne._pressedLetters.push(ze)}),(0,N.b)(Le),(0,A.h)(function(){return Ne._pressedLetters.length>0}),(0,w.U)(function(){return Ne._pressedLetters.join("")})).subscribe(function(ze){for(var At=Ne._getItemsArray(),an=1;an0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=Ne,this}},{key:"setActiveItem",value:function(Ne){var Le=this._activeItem;this.updateActiveItem(Ne),this._activeItem!==Le&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(Ne){var Le=this,ze=Ne.keyCode,an=["altKey","ctrlKey","metaKey","shiftKey"].every(function(qn){return!Ne[qn]||Le._allowedModifierKeys.indexOf(qn)>-1});switch(ze){case g.Mf:return void this.tabOut.next();case g.JH:if(this._vertical&&an){this.setNextItemActive();break}return;case g.LH:if(this._vertical&&an){this.setPreviousItemActive();break}return;case g.SV:if(this._horizontal&&an){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case g.oh:if(this._horizontal&&an){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case g.Sd:if(this._homeAndEnd&&an){this.setFirstItemActive();break}return;case g.uR:if(this._homeAndEnd&&an){this.setLastItemActive();break}return;default:return void((an||(0,g.Vb)(Ne,"shiftKey"))&&(Ne.key&&1===Ne.key.length?this._letterKeyStream.next(Ne.key.toLocaleUpperCase()):(ze>=g.A&&ze<=g.Z||ze>=g.xE&&ze<=g.aO)&&this._letterKeyStream.next(String.fromCharCode(ze))))}this._pressedLetters=[],Ne.preventDefault()}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}},{key:"isTyping",value:function(){return this._pressedLetters.length>0}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(Ne){var Le=this._getItemsArray(),ze="number"==typeof Ne?Ne:Le.indexOf(Ne),At=Le[ze];this._activeItem=null==At?null:At,this._activeItemIndex=ze}},{key:"_setActiveItemByDelta",value:function(Ne){this._wrap?this._setActiveInWrapMode(Ne):this._setActiveInDefaultMode(Ne)}},{key:"_setActiveInWrapMode",value:function(Ne){for(var Le=this._getItemsArray(),ze=1;ze<=Le.length;ze++){var At=(this._activeItemIndex+Ne*ze+Le.length)%Le.length;if(!this._skipPredicateFn(Le[At]))return void this.setActiveItem(At)}}},{key:"_setActiveInDefaultMode",value:function(Ne){this._setActiveItemByIndex(this._activeItemIndex+Ne,Ne)}},{key:"_setActiveItemByIndex",value:function(Ne,Le){var ze=this._getItemsArray();if(ze[Ne]){for(;this._skipPredicateFn(ze[Ne]);)if(!ze[Ne+=Le])return;this.setActiveItem(Ne)}}},{key:"_getItemsArray",value:function(){return this._items instanceof I.n_E?this._items.toArray():this._items}}]),he}(),xe=function(he){(0,Z.Z)(Ne,he);var Ie=(0,T.Z)(Ne);function Ne(){return(0,R.Z)(this,Ne),Ie.apply(this,arguments)}return(0,b.Z)(Ne,[{key:"setActiveItem",value:function(ze){this.activeItem&&this.activeItem.setInactiveStyles(),(0,B.Z)((0,V.Z)(Ne.prototype),"setActiveItem",this).call(this,ze),this.activeItem&&this.activeItem.setActiveStyles()}}]),Ne}(Ft),De=function(he){(0,Z.Z)(Ne,he);var Ie=(0,T.Z)(Ne);function Ne(){var Le;return(0,R.Z)(this,Ne),(Le=Ie.apply(this,arguments))._origin="program",Le}return(0,b.Z)(Ne,[{key:"setFocusOrigin",value:function(ze){return this._origin=ze,this}},{key:"setActiveItem",value:function(ze){(0,B.Z)((0,V.Z)(Ne.prototype),"setActiveItem",this).call(this,ze),this.activeItem&&this.activeItem.focus(this._origin)}}]),Ne}(Ft),dt=function(){var he=function(){function Ie(Ne){(0,R.Z)(this,Ie),this._platform=Ne}return(0,b.Z)(Ie,[{key:"isDisabled",value:function(Le){return Le.hasAttribute("disabled")}},{key:"isVisible",value:function(Le){return function(he){return!!(he.offsetWidth||he.offsetHeight||"function"==typeof he.getClientRects&&he.getClientRects().length)}(Le)&&"visible"===getComputedStyle(Le).visibility}},{key:"isTabbable",value:function(Le){if(!this._platform.isBrowser)return!1;var ze=function(he){try{return he.frameElement}catch(Ie){return null}}(function(he){return he.ownerDocument&&he.ownerDocument.defaultView||window}(Le));if(ze&&(-1===bt(ze)||!this.isVisible(ze)))return!1;var At=Le.nodeName.toLowerCase(),an=bt(Le);return Le.hasAttribute("contenteditable")?-1!==an:!("iframe"===At||"object"===At||this._platform.WEBKIT&&this._platform.IOS&&!function(he){var Ie=he.nodeName.toLowerCase(),Ne="input"===Ie&&he.type;return"text"===Ne||"password"===Ne||"select"===Ie||"textarea"===Ie}(Le))&&("audio"===At?!!Le.hasAttribute("controls")&&-1!==an:"video"===At?-1!==an&&(null!==an||this._platform.FIREFOX||Le.hasAttribute("controls")):Le.tabIndex>=0)}},{key:"isFocusable",value:function(Le,ze){return function(he){return!function(he){return function(he){return"input"==he.nodeName.toLowerCase()}(he)&&"hidden"==he.type}(he)&&(function(he){var Ie=he.nodeName.toLowerCase();return"input"===Ie||"select"===Ie||"button"===Ie||"textarea"===Ie}(he)||function(he){return function(he){return"a"==he.nodeName.toLowerCase()}(he)&&he.hasAttribute("href")}(he)||he.hasAttribute("contenteditable")||qt(he))}(Le)&&!this.isDisabled(Le)&&((null==ze?void 0:ze.ignoreVisibility)||this.isVisible(Le))}}]),Ie}();return he.\u0275fac=function(Ne){return new(Ne||he)(I.LFG(j.t4))},he.\u0275prov=I.Yz7({factory:function(){return new he(I.LFG(j.t4))},token:he,providedIn:"root"}),he}();function qt(he){if(!he.hasAttribute("tabindex")||void 0===he.tabIndex)return!1;var Ie=he.getAttribute("tabindex");return"-32768"!=Ie&&!(!Ie||isNaN(parseInt(Ie,10)))}function bt(he){if(!qt(he))return null;var Ie=parseInt(he.getAttribute("tabindex")||"",10);return isNaN(Ie)?-1:Ie}var En=function(){function he(Ie,Ne,Le,ze){var At=this,an=arguments.length>4&&void 0!==arguments[4]&&arguments[4];(0,R.Z)(this,he),this._element=Ie,this._checker=Ne,this._ngZone=Le,this._document=ze,this._hasAttached=!1,this.startAnchorListener=function(){return At.focusLastTabbableElement()},this.endAnchorListener=function(){return At.focusFirstTabbableElement()},this._enabled=!0,an||this.attachAnchors()}return(0,b.Z)(he,[{key:"enabled",get:function(){return this._enabled},set:function(Ne){this._enabled=Ne,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(Ne,this._startAnchor),this._toggleAnchorTabIndex(Ne,this._endAnchor))}},{key:"destroy",value:function(){var Ne=this._startAnchor,Le=this._endAnchor;Ne&&(Ne.removeEventListener("focus",this.startAnchorListener),Ne.parentNode&&Ne.parentNode.removeChild(Ne)),Le&&(Le.removeEventListener("focus",this.endAnchorListener),Le.parentNode&&Le.parentNode.removeChild(Le)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var Ne=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){Ne._startAnchor||(Ne._startAnchor=Ne._createAnchor(),Ne._startAnchor.addEventListener("focus",Ne.startAnchorListener)),Ne._endAnchor||(Ne._endAnchor=Ne._createAnchor(),Ne._endAnchor.addEventListener("focus",Ne.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(Ne){var Le=this;return new Promise(function(ze){Le._executeOnStable(function(){return ze(Le.focusInitialElement(Ne))})})}},{key:"focusFirstTabbableElementWhenReady",value:function(Ne){var Le=this;return new Promise(function(ze){Le._executeOnStable(function(){return ze(Le.focusFirstTabbableElement(Ne))})})}},{key:"focusLastTabbableElementWhenReady",value:function(Ne){var Le=this;return new Promise(function(ze){Le._executeOnStable(function(){return ze(Le.focusLastTabbableElement(Ne))})})}},{key:"_getRegionBoundary",value:function(Ne){for(var Le=this._element.querySelectorAll("[cdk-focus-region-".concat(Ne,"], ")+"[cdkFocusRegion".concat(Ne,"], ")+"[cdk-focus-".concat(Ne,"]")),ze=0;ze=0;ze--){var At=Le[ze].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(Le[ze]):null;if(At)return At}return null}},{key:"_createAnchor",value:function(){var Ne=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,Ne),Ne.classList.add("cdk-visually-hidden"),Ne.classList.add("cdk-focus-trap-anchor"),Ne.setAttribute("aria-hidden","true"),Ne}},{key:"_toggleAnchorTabIndex",value:function(Ne,Le){Ne?Le.setAttribute("tabindex","0"):Le.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(Ne){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(Ne,this._startAnchor),this._toggleAnchorTabIndex(Ne,this._endAnchor))}},{key:"_executeOnStable",value:function(Ne){this._ngZone.isStable?Ne():this._ngZone.onStable.pipe((0,S.q)(1)).subscribe(Ne)}}]),he}(),Zn=function(){var he=function(){function Ie(Ne,Le,ze){(0,R.Z)(this,Ie),this._checker=Ne,this._ngZone=Le,this._document=ze}return(0,b.Z)(Ie,[{key:"create",value:function(Le){var ze=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new En(Le,this._checker,this._ngZone,this._document,ze)}}]),Ie}();return he.\u0275fac=function(Ne){return new(Ne||he)(I.LFG(dt),I.LFG(I.R0b),I.LFG(v.K0))},he.\u0275prov=I.Yz7({factory:function(){return new he(I.LFG(dt),I.LFG(I.R0b),I.LFG(v.K0))},token:he,providedIn:"root"}),he}();function we(he){return 0===he.offsetX&&0===he.offsetY}function ct(he){var Ie=he.touches&&he.touches[0]||he.changedTouches&&he.changedTouches[0];return!(!Ie||-1!==Ie.identifier||null!=Ie.radiusX&&1!==Ie.radiusX||null!=Ie.radiusY&&1!==Ie.radiusY)}"undefined"!=typeof Element&∈var ft=new I.OlP("cdk-input-modality-detector-options"),Yt={ignoreKeys:[g.zL,g.jx,g.b2,g.MW,g.JU]},Jt=(0,j.i$)({passive:!0,capture:!0}),nn=function(){var he=function(){function Ie(Ne,Le,ze,At){var an=this;(0,R.Z)(this,Ie),this._platform=Ne,this._mostRecentTarget=null,this._modality=new M.X(null),this._lastTouchMs=0,this._onKeydown=function(qn){var Nr,Vr;(null===(Vr=null===(Nr=an._options)||void 0===Nr?void 0:Nr.ignoreKeys)||void 0===Vr?void 0:Vr.some(function(br){return br===qn.keyCode}))||(an._modality.next("keyboard"),an._mostRecentTarget=(0,j.sA)(qn))},this._onMousedown=function(qn){Date.now()-an._lastTouchMs<650||(an._modality.next(we(qn)?"keyboard":"mouse"),an._mostRecentTarget=(0,j.sA)(qn))},this._onTouchstart=function(qn){ct(qn)?an._modality.next("keyboard"):(an._lastTouchMs=Date.now(),an._modality.next("touch"),an._mostRecentTarget=(0,j.sA)(qn))},this._options=Object.assign(Object.assign({},Yt),At),this.modalityDetected=this._modality.pipe((0,O.T)(1)),this.modalityChanged=this.modalityDetected.pipe((0,F.x)()),Ne.isBrowser&&Le.runOutsideAngular(function(){ze.addEventListener("keydown",an._onKeydown,Jt),ze.addEventListener("mousedown",an._onMousedown,Jt),ze.addEventListener("touchstart",an._onTouchstart,Jt)})}return(0,b.Z)(Ie,[{key:"mostRecentModality",get:function(){return this._modality.value}},{key:"ngOnDestroy",value:function(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Jt),document.removeEventListener("mousedown",this._onMousedown,Jt),document.removeEventListener("touchstart",this._onTouchstart,Jt))}}]),Ie}();return he.\u0275fac=function(Ne){return new(Ne||he)(I.LFG(j.t4),I.LFG(I.R0b),I.LFG(v.K0),I.LFG(ft,8))},he.\u0275prov=I.Yz7({factory:function(){return new he(I.LFG(j.t4),I.LFG(I.R0b),I.LFG(v.K0),I.LFG(ft,8))},token:he,providedIn:"root"}),he}(),ln=new I.OlP("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),Tn=new I.OlP("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Pn=function(){var he=function(){function Ie(Ne,Le,ze,At){(0,R.Z)(this,Ie),this._ngZone=Le,this._defaultOptions=At,this._document=ze,this._liveElement=Ne||this._createLiveElement()}return(0,b.Z)(Ie,[{key:"announce",value:function(Le){for(var an,qn,ze=this,At=this._defaultOptions,Nr=arguments.length,Vr=new Array(Nr>1?Nr-1:0),br=1;br1&&void 0!==arguments[1]&&arguments[1],At=(0,K.fI)(Le);if(!this._platform.isBrowser||1!==At.nodeType)return(0,_.of)(null);var an=(0,j.kV)(At)||this._getDocument(),qn=this._elementInfo.get(At);if(qn)return ze&&(qn.checkChildren=!0),qn.subject;var Nr={checkChildren:ze,subject:new D.xQ,rootNode:an};return this._elementInfo.set(At,Nr),this._registerGlobalListeners(Nr),Nr.subject}},{key:"stopMonitoring",value:function(Le){var ze=(0,K.fI)(Le),At=this._elementInfo.get(ze);At&&(At.subject.complete(),this._setClasses(ze),this._elementInfo.delete(ze),this._removeGlobalListeners(At))}},{key:"focusVia",value:function(Le,ze,At){var an=this,qn=(0,K.fI)(Le);qn===this._getDocument().activeElement?this._getClosestElementsInfo(qn).forEach(function(Vr){var br=(0,U.Z)(Vr,2);return an._originChanged(br[0],ze,br[1])}):(this._setOrigin(ze),"function"==typeof qn.focus&&qn.focus(At))}},{key:"ngOnDestroy",value:function(){var Le=this;this._elementInfo.forEach(function(ze,At){return Le.stopMonitoring(At)})}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(Le,ze,At){At?Le.classList.add(ze):Le.classList.remove(ze)}},{key:"_getFocusOrigin",value:function(Le){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(Le)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}},{key:"_shouldBeAttributedToTouch",value:function(Le){return 1===this._detectionMode||!!(null==Le?void 0:Le.contains(this._inputModalityDetector._mostRecentTarget))}},{key:"_setClasses",value:function(Le,ze){this._toggleClass(Le,"cdk-focused",!!ze),this._toggleClass(Le,"cdk-touch-focused","touch"===ze),this._toggleClass(Le,"cdk-keyboard-focused","keyboard"===ze),this._toggleClass(Le,"cdk-mouse-focused","mouse"===ze),this._toggleClass(Le,"cdk-program-focused","program"===ze)}},{key:"_setOrigin",value:function(Le){var ze=this,At=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._ngZone.runOutsideAngular(function(){ze._origin=Le,ze._originFromTouchInteraction="touch"===Le&&At,0===ze._detectionMode&&(clearTimeout(ze._originTimeoutId),ze._originTimeoutId=setTimeout(function(){return ze._origin=null},ze._originFromTouchInteraction?650:1))})}},{key:"_onFocus",value:function(Le,ze){var At=this._elementInfo.get(ze),an=(0,j.sA)(Le);!At||!At.checkChildren&&ze!==an||this._originChanged(ze,this._getFocusOrigin(an),At)}},{key:"_onBlur",value:function(Le,ze){var At=this._elementInfo.get(ze);!At||At.checkChildren&&Le.relatedTarget instanceof Node&&ze.contains(Le.relatedTarget)||(this._setClasses(ze),this._emitOrigin(At.subject,null))}},{key:"_emitOrigin",value:function(Le,ze){this._ngZone.run(function(){return Le.next(ze)})}},{key:"_registerGlobalListeners",value:function(Le){var ze=this;if(this._platform.isBrowser){var At=Le.rootNode,an=this._rootNodeFocusListenerCount.get(At)||0;an||this._ngZone.runOutsideAngular(function(){At.addEventListener("focus",ze._rootNodeFocusAndBlurListener,Sn),At.addEventListener("blur",ze._rootNodeFocusAndBlurListener,Sn)}),this._rootNodeFocusListenerCount.set(At,an+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(function(){ze._getWindow().addEventListener("focus",ze._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,z.R)(this._stopInputModalityDetector)).subscribe(function(qn){ze._setOrigin(qn,!0)}))}}},{key:"_removeGlobalListeners",value:function(Le){var ze=Le.rootNode;if(this._rootNodeFocusListenerCount.has(ze)){var At=this._rootNodeFocusListenerCount.get(ze);At>1?this._rootNodeFocusListenerCount.set(ze,At-1):(ze.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Sn),ze.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Sn),this._rootNodeFocusListenerCount.delete(ze))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}},{key:"_originChanged",value:function(Le,ze,At){this._setClasses(Le,ze),this._emitOrigin(At.subject,ze),this._lastFocusOrigin=ze}},{key:"_getClosestElementsInfo",value:function(Le){var ze=[];return this._elementInfo.forEach(function(At,an){(an===Le||At.checkChildren&&an.contains(Le))&&ze.push([an,At])}),ze}}]),Ie}();return he.\u0275fac=function(Ne){return new(Ne||he)(I.LFG(I.R0b),I.LFG(j.t4),I.LFG(nn),I.LFG(v.K0,8),I.LFG(Cn,8))},he.\u0275prov=I.Yz7({factory:function(){return new he(I.LFG(I.R0b),I.LFG(j.t4),I.LFG(nn),I.LFG(v.K0,8),I.LFG(Cn,8))},token:he,providedIn:"root"}),he}(),cr=function(){var he=function(){function Ie(Ne,Le){(0,R.Z)(this,Ie),this._elementRef=Ne,this._focusMonitor=Le,this.cdkFocusChange=new I.vpe}return(0,b.Z)(Ie,[{key:"ngAfterViewInit",value:function(){var Le=this,ze=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(ze,1===ze.nodeType&&ze.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(At){return Le.cdkFocusChange.emit(At)})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),Ie}();return he.\u0275fac=function(Ne){return new(Ne||he)(I.Y36(I.SBq),I.Y36(tr))},he.\u0275dir=I.lG2({type:he,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),he}(),Ut="cdk-high-contrast-black-on-white",Rt="cdk-high-contrast-white-on-black",Lt="cdk-high-contrast-active",Pe=function(){var he=function(){function Ie(Ne,Le){(0,R.Z)(this,Ie),this._platform=Ne,this._document=Le}return(0,b.Z)(Ie,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var Le=this._document.createElement("div");Le.style.backgroundColor="rgb(1,2,3)",Le.style.position="absolute",this._document.body.appendChild(Le);var ze=this._document.defaultView||window,At=ze&&ze.getComputedStyle?ze.getComputedStyle(Le):null,an=(At&&At.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(Le),an){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){var Le=this._document.body.classList;Le.remove(Lt),Le.remove(Ut),Le.remove(Rt),this._hasCheckedHighContrastMode=!0;var ze=this.getHighContrastMode();1===ze?(Le.add(Lt),Le.add(Ut)):2===ze&&(Le.add(Lt),Le.add(Rt))}}}]),Ie}();return he.\u0275fac=function(Ne){return new(Ne||he)(I.LFG(j.t4),I.LFG(v.K0))},he.\u0275prov=I.Yz7({factory:function(){return new he(I.LFG(j.t4),I.LFG(v.K0))},token:he,providedIn:"root"}),he}(),rt=function(){var he=function Ie(Ne){(0,R.Z)(this,Ie),Ne._applyBodyHighContrastModeCssClasses()};return he.\u0275fac=function(Ne){return new(Ne||he)(I.LFG(Pe))},he.\u0275mod=I.oAB({type:he}),he.\u0275inj=I.cJS({imports:[[j.ud,J.Q8]]}),he}()},8392:function(ue,q,f){"use strict";f.d(q,{vT:function(){return I},Is:function(){return b}});var U=f(18967),B=f(14105),V=f(38999),Z=f(40098),T=new V.OlP("cdk-dir-doc",{providedIn:"root",factory:function(){return(0,V.f3M)(Z.K0)}}),b=function(){var D=function(){function k(M){if((0,U.Z)(this,k),this.value="ltr",this.change=new V.vpe,M){var E=(M.body?M.body.dir:null)||(M.documentElement?M.documentElement.dir:null);this.value="ltr"===E||"rtl"===E?E:"ltr"}}return(0,B.Z)(k,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),k}();return D.\u0275fac=function(M){return new(M||D)(V.LFG(T,8))},D.\u0275prov=V.Yz7({factory:function(){return new D(V.LFG(T,8))},token:D,providedIn:"root"}),D}(),I=function(){var D=function k(){(0,U.Z)(this,k)};return D.\u0275fac=function(M){return new(M||D)},D.\u0275mod=V.oAB({type:D}),D.\u0275inj=V.cJS({}),D}()},37429:function(ue,q,f){"use strict";f.d(q,{P3:function(){return M},o2:function(){return D},Ov:function(){return E},A8:function(){return A},yy:function(){return _},eX:function(){return g},k:function(){return w},Z9:function(){return k}});var U=f(36683),B=f(14105),V=f(10509),Z=f(97154),T=f(18967),R=f(17504),b=f(43161),v=f(68707),I=f(38999),D=function S(){(0,T.Z)(this,S)};function k(S){return S&&"function"==typeof S.connect}var M=function(S){(0,V.Z)(F,S);var O=(0,Z.Z)(F);function F(z){var K;return(0,T.Z)(this,F),(K=O.call(this))._data=z,K}return(0,B.Z)(F,[{key:"connect",value:function(){return(0,R.b)(this._data)?this._data:(0,b.of)(this._data)}},{key:"disconnect",value:function(){}}]),F}(D),_=function(){function S(){(0,T.Z)(this,S)}return(0,B.Z)(S,[{key:"applyChanges",value:function(F,z,K,j,J){F.forEachOperation(function(ee,$,ae){var se,ce;if(null==ee.previousIndex){var le=K(ee,$,ae);se=z.createEmbeddedView(le.templateRef,le.context,le.index),ce=1}else null==ae?(z.remove($),ce=3):(se=z.get($),z.move(se,ae),ce=2);J&&J({context:null==se?void 0:se.context,operation:ce,record:ee})})}},{key:"detach",value:function(){}}]),S}(),g=function(){function S(){(0,T.Z)(this,S),this.viewCacheSize=20,this._viewCache=[]}return(0,B.Z)(S,[{key:"applyChanges",value:function(F,z,K,j,J){var ee=this;F.forEachOperation(function($,ae,se){var ce,le;null==$.previousIndex?le=(ce=ee._insertView(function(){return K($,ae,se)},se,z,j($)))?1:0:null==se?(ee._detachAndCacheView(ae,z),le=3):(ce=ee._moveView(ae,se,z,j($)),le=2),J&&J({context:null==ce?void 0:ce.context,operation:le,record:$})})}},{key:"detach",value:function(){var z,F=(0,U.Z)(this._viewCache);try{for(F.s();!(z=F.n()).done;)z.value.destroy()}catch(j){F.e(j)}finally{F.f()}this._viewCache=[]}},{key:"_insertView",value:function(F,z,K,j){var J=this._insertViewFromCache(z,K);if(!J){var ee=F();return K.createEmbeddedView(ee.templateRef,ee.context,ee.index)}J.context.$implicit=j}},{key:"_detachAndCacheView",value:function(F,z){var K=z.detach(F);this._maybeCacheView(K,z)}},{key:"_moveView",value:function(F,z,K,j){var J=K.get(F);return K.move(J,z),J.context.$implicit=j,J}},{key:"_maybeCacheView",value:function(F,z){if(this._viewCache.length0&&void 0!==arguments[0]&&arguments[0],z=arguments.length>1?arguments[1]:void 0,K=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];(0,T.Z)(this,S),this._multiple=F,this._emitChanges=K,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new v.xQ,z&&z.length&&(F?z.forEach(function(j){return O._markSelected(j)}):this._markSelected(z[0]),this._selectedToEmit.length=0)}return(0,B.Z)(S,[{key:"selected",get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}},{key:"select",value:function(){for(var F=this,z=arguments.length,K=new Array(z),j=0;j1?Gn-1:0),zn=1;znTe.height||ye.scrollWidth>Te.width}}]),ut}(),ee=function(){function ut(He,ve,ye,Te){var we=this;(0,b.Z)(this,ut),this._scrollDispatcher=He,this._ngZone=ve,this._viewportRuler=ye,this._config=Te,this._scrollSubscription=null,this._detach=function(){we.disable(),we._overlayRef.hasAttached()&&we._ngZone.run(function(){return we._overlayRef.detach()})}}return(0,v.Z)(ut,[{key:"attach",value:function(ve){this._overlayRef=ve}},{key:"enable",value:function(){var ve=this;if(!this._scrollSubscription){var ye=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=ye.subscribe(function(){var Te=ve._viewportRuler.getViewportScrollPosition().top;Math.abs(Te-ve._initialScrollPosition)>ve._config.threshold?ve._detach():ve._overlayRef.updatePosition()})):this._scrollSubscription=ye.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),ut}(),$=function(){function ut(){(0,b.Z)(this,ut)}return(0,v.Z)(ut,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),ut}();function ae(ut,He){return He.some(function(ve){return ut.bottomve.bottom||ut.rightve.right})}function se(ut,He){return He.some(function(ve){return ut.topve.bottom||ut.leftve.right})}var ce=function(){function ut(He,ve,ye,Te){(0,b.Z)(this,ut),this._scrollDispatcher=He,this._viewportRuler=ve,this._ngZone=ye,this._config=Te,this._scrollSubscription=null}return(0,v.Z)(ut,[{key:"attach",value:function(ve){this._overlayRef=ve}},{key:"enable",value:function(){var ve=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(ve._overlayRef.updatePosition(),ve._config&&ve._config.autoClose){var Te=ve._overlayRef.overlayElement.getBoundingClientRect(),we=ve._viewportRuler.getViewportSize(),ct=we.width,ft=we.height;ae(Te,[{width:ct,height:ft,bottom:ft,right:ct,top:0,left:0}])&&(ve.disable(),ve._ngZone.run(function(){return ve._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),ut}(),le=function(){var ut=function He(ve,ye,Te,we){var ct=this;(0,b.Z)(this,He),this._scrollDispatcher=ve,this._viewportRuler=ye,this._ngZone=Te,this.noop=function(){return new $},this.close=function(ft){return new ee(ct._scrollDispatcher,ct._ngZone,ct._viewportRuler,ft)},this.block=function(){return new j(ct._viewportRuler,ct._document)},this.reposition=function(ft){return new ce(ct._scrollDispatcher,ct._viewportRuler,ct._ngZone,ft)},this._document=we};return ut.\u0275fac=function(ve){return new(ve||ut)(D.LFG(I.mF),D.LFG(I.rL),D.LFG(D.R0b),D.LFG(_.K0))},ut.\u0275prov=D.Yz7({factory:function(){return new ut(D.LFG(I.mF),D.LFG(I.rL),D.LFG(D.R0b),D.LFG(_.K0))},token:ut,providedIn:"root"}),ut}(),oe=function ut(He){if((0,b.Z)(this,ut),this.scrollStrategy=new $,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,He)for(var ye=0,Te=Object.keys(He);ye-1&&this._attachedOverlays.splice(Te,1),0===this._attachedOverlays.length&&this.detach()}}]),He}();return ut.\u0275fac=function(ve){return new(ve||ut)(D.LFG(_.K0))},ut.\u0275prov=D.Yz7({factory:function(){return new ut(D.LFG(_.K0))},token:ut,providedIn:"root"}),ut}(),Ft=function(){var ut=function(He){(0,T.Z)(ye,He);var ve=(0,R.Z)(ye);function ye(Te){var we;return(0,b.Z)(this,ye),(we=ve.call(this,Te))._keydownListener=function(ct){for(var ft=we._attachedOverlays,Yt=ft.length-1;Yt>-1;Yt--)if(ft[Yt]._keydownEvents.observers.length>0){ft[Yt]._keydownEvents.next(ct);break}},we}return(0,v.Z)(ye,[{key:"add",value:function(we){(0,V.Z)((0,Z.Z)(ye.prototype),"add",this).call(this,we),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),ye}(yt);return ut.\u0275fac=function(ve){return new(ve||ut)(D.LFG(_.K0))},ut.\u0275prov=D.Yz7({factory:function(){return new ut(D.LFG(_.K0))},token:ut,providedIn:"root"}),ut}(),xe=function(){var ut=function(He){(0,T.Z)(ye,He);var ve=(0,R.Z)(ye);function ye(Te,we){var ct;return(0,b.Z)(this,ye),(ct=ve.call(this,Te))._platform=we,ct._cursorStyleIsSet=!1,ct._pointerDownListener=function(ft){ct._pointerDownEventTarget=(0,k.sA)(ft)},ct._clickListener=function(ft){var Yt=(0,k.sA)(ft),Kt="click"===ft.type&&ct._pointerDownEventTarget?ct._pointerDownEventTarget:Yt;ct._pointerDownEventTarget=null;for(var Jt=ct._attachedOverlays.slice(),nn=Jt.length-1;nn>-1;nn--){var ln=Jt[nn];if(!(ln._outsidePointerEvents.observers.length<1)&&ln.hasAttached()){if(ln.overlayElement.contains(Yt)||ln.overlayElement.contains(Kt))break;ln._outsidePointerEvents.next(ft)}}},ct}return(0,v.Z)(ye,[{key:"add",value:function(we){if((0,V.Z)((0,Z.Z)(ye.prototype),"add",this).call(this,we),!this._isAttached){var ct=this._document.body;ct.addEventListener("pointerdown",this._pointerDownListener,!0),ct.addEventListener("click",this._clickListener,!0),ct.addEventListener("auxclick",this._clickListener,!0),ct.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=ct.style.cursor,ct.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}},{key:"detach",value:function(){if(this._isAttached){var we=this._document.body;we.removeEventListener("pointerdown",this._pointerDownListener,!0),we.removeEventListener("click",this._clickListener,!0),we.removeEventListener("auxclick",this._clickListener,!0),we.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(we.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}}]),ye}(yt);return ut.\u0275fac=function(ve){return new(ve||ut)(D.LFG(_.K0),D.LFG(k.t4))},ut.\u0275prov=D.Yz7({factory:function(){return new ut(D.LFG(_.K0),D.LFG(k.t4))},token:ut,providedIn:"root"}),ut}(),De=function(){var ut=function(){function He(ve,ye){(0,b.Z)(this,He),this._platform=ye,this._document=ve}return(0,v.Z)(He,[{key:"ngOnDestroy",value:function(){var ye=this._containerElement;ye&&ye.parentNode&&ye.parentNode.removeChild(ye)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var ye="cdk-overlay-container";if(this._platform.isBrowser||(0,k.Oy)())for(var Te=this._document.querySelectorAll(".".concat(ye,'[platform="server"], ')+".".concat(ye,'[platform="test"]')),we=0;weTn&&(Tn=Sn,yn=Cn)}}catch(tr){Pn.e(tr)}finally{Pn.f()}return this._isPushed=!1,void this._applyPosition(yn.position,yn.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(ct.position,ct.originPoint);this._applyPosition(ct.position,ct.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&xt(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(dt),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var ve=this._lastPosition||this._preferredPositions[0],ye=this._getOriginPoint(this._originRect,ve);this._applyPosition(ve,ye)}}},{key:"withScrollableContainers",value:function(ve){return this._scrollables=ve,this}},{key:"withPositions",value:function(ve){return this._preferredPositions=ve,-1===ve.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(ve){return this._viewportMargin=ve,this}},{key:"withFlexibleDimensions",value:function(){var ve=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=ve,this}},{key:"withGrowAfterOpen",value:function(){var ve=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=ve,this}},{key:"withPush",value:function(){var ve=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=ve,this}},{key:"withLockedPosition",value:function(){var ve=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=ve,this}},{key:"setOrigin",value:function(ve){return this._origin=ve,this}},{key:"withDefaultOffsetX",value:function(ve){return this._offsetX=ve,this}},{key:"withDefaultOffsetY",value:function(ve){return this._offsetY=ve,this}},{key:"withTransformOriginOn",value:function(ve){return this._transformOriginSelector=ve,this}},{key:"_getOriginPoint",value:function(ve,ye){var Te;if("center"==ye.originX)Te=ve.left+ve.width/2;else{var we=this._isRtl()?ve.right:ve.left,ct=this._isRtl()?ve.left:ve.right;Te="start"==ye.originX?we:ct}return{x:Te,y:"center"==ye.originY?ve.top+ve.height/2:"top"==ye.originY?ve.top:ve.bottom}}},{key:"_getOverlayPoint",value:function(ve,ye,Te){var we;return we="center"==Te.overlayX?-ye.width/2:"start"===Te.overlayX?this._isRtl()?-ye.width:0:this._isRtl()?0:-ye.width,{x:ve.x+we,y:ve.y+("center"==Te.overlayY?-ye.height/2:"top"==Te.overlayY?0:-ye.height)}}},{key:"_getOverlayFit",value:function(ve,ye,Te,we){var ct=Qt(ye),ft=ve.x,Yt=ve.y,Kt=this._getOffset(we,"x"),Jt=this._getOffset(we,"y");Kt&&(ft+=Kt),Jt&&(Yt+=Jt);var yn=0-Yt,Tn=Yt+ct.height-Te.height,Pn=this._subtractOverflows(ct.width,0-ft,ft+ct.width-Te.width),Yn=this._subtractOverflows(ct.height,yn,Tn),Cn=Pn*Yn;return{visibleArea:Cn,isCompletelyWithinViewport:ct.width*ct.height===Cn,fitsInViewportVertically:Yn===ct.height,fitsInViewportHorizontally:Pn==ct.width}}},{key:"_canFitWithFlexibleDimensions",value:function(ve,ye,Te){if(this._hasFlexibleDimensions){var we=Te.bottom-ye.y,ct=Te.right-ye.x,ft=vt(this._overlayRef.getConfig().minHeight),Yt=vt(this._overlayRef.getConfig().minWidth);return(ve.fitsInViewportVertically||null!=ft&&ft<=we)&&(ve.fitsInViewportHorizontally||null!=Yt&&Yt<=ct)}return!1}},{key:"_pushOverlayOnScreen",value:function(ve,ye,Te){if(this._previousPushAmount&&this._positionLocked)return{x:ve.x+this._previousPushAmount.x,y:ve.y+this._previousPushAmount.y};var nn,ln,we=Qt(ye),ct=this._viewportRect,ft=Math.max(ve.x+we.width-ct.width,0),Yt=Math.max(ve.y+we.height-ct.height,0),Kt=Math.max(ct.top-Te.top-ve.y,0),Jt=Math.max(ct.left-Te.left-ve.x,0);return this._previousPushAmount={x:nn=we.width<=ct.width?Jt||-ft:ve.xJt&&!this._isInitialRender&&!this._growAfterOpen&&(ft=ve.y-Jt/2)}if("end"===ye.overlayX&&!we||"start"===ye.overlayX&&we)Pn=Te.width-ve.x+this._viewportMargin,yn=ve.x-this._viewportMargin;else if("start"===ye.overlayX&&!we||"end"===ye.overlayX&&we)Tn=ve.x,yn=Te.right-ve.x;else{var Yn=Math.min(Te.right-ve.x+Te.left,ve.x),Cn=this._lastBoundingBoxSize.width;Tn=ve.x-Yn,(yn=2*Yn)>Cn&&!this._isInitialRender&&!this._growAfterOpen&&(Tn=ve.x-Cn/2)}return{top:ft,left:Tn,bottom:Yt,right:Pn,width:yn,height:ct}}},{key:"_setBoundingBoxStyles",value:function(ve,ye){var Te=this._calculateBoundingBoxRect(ve,ye);!this._isInitialRender&&!this._growAfterOpen&&(Te.height=Math.min(Te.height,this._lastBoundingBoxSize.height),Te.width=Math.min(Te.width,this._lastBoundingBoxSize.width));var we={};if(this._hasExactPosition())we.top=we.left="0",we.bottom=we.right=we.maxHeight=we.maxWidth="",we.width=we.height="100%";else{var ct=this._overlayRef.getConfig().maxHeight,ft=this._overlayRef.getConfig().maxWidth;we.height=(0,g.HM)(Te.height),we.top=(0,g.HM)(Te.top),we.bottom=(0,g.HM)(Te.bottom),we.width=(0,g.HM)(Te.width),we.left=(0,g.HM)(Te.left),we.right=(0,g.HM)(Te.right),we.alignItems="center"===ye.overlayX?"center":"end"===ye.overlayX?"flex-end":"flex-start",we.justifyContent="center"===ye.overlayY?"center":"bottom"===ye.overlayY?"flex-end":"flex-start",ct&&(we.maxHeight=(0,g.HM)(ct)),ft&&(we.maxWidth=(0,g.HM)(ft))}this._lastBoundingBoxSize=Te,xt(this._boundingBox.style,we)}},{key:"_resetBoundingBoxStyles",value:function(){xt(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){xt(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(ve,ye){var Te={},we=this._hasExactPosition(),ct=this._hasFlexibleDimensions,ft=this._overlayRef.getConfig();if(we){var Yt=this._viewportRuler.getViewportScrollPosition();xt(Te,this._getExactOverlayY(ye,ve,Yt)),xt(Te,this._getExactOverlayX(ye,ve,Yt))}else Te.position="static";var Kt="",Jt=this._getOffset(ye,"x"),nn=this._getOffset(ye,"y");Jt&&(Kt+="translateX(".concat(Jt,"px) ")),nn&&(Kt+="translateY(".concat(nn,"px)")),Te.transform=Kt.trim(),ft.maxHeight&&(we?Te.maxHeight=(0,g.HM)(ft.maxHeight):ct&&(Te.maxHeight="")),ft.maxWidth&&(we?Te.maxWidth=(0,g.HM)(ft.maxWidth):ct&&(Te.maxWidth="")),xt(this._pane.style,Te)}},{key:"_getExactOverlayY",value:function(ve,ye,Te){var we={top:"",bottom:""},ct=this._getOverlayPoint(ye,this._overlayRect,ve);this._isPushed&&(ct=this._pushOverlayOnScreen(ct,this._overlayRect,Te));var ft=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return ct.y-=ft,"bottom"===ve.overlayY?we.bottom="".concat(this._document.documentElement.clientHeight-(ct.y+this._overlayRect.height),"px"):we.top=(0,g.HM)(ct.y),we}},{key:"_getExactOverlayX",value:function(ve,ye,Te){var we={left:"",right:""},ct=this._getOverlayPoint(ye,this._overlayRect,ve);return this._isPushed&&(ct=this._pushOverlayOnScreen(ct,this._overlayRect,Te)),"right"==(this._isRtl()?"end"===ve.overlayX?"left":"right":"end"===ve.overlayX?"right":"left")?we.right="".concat(this._document.documentElement.clientWidth-(ct.x+this._overlayRect.width),"px"):we.left=(0,g.HM)(ct.x),we}},{key:"_getScrollVisibility",value:function(){var ve=this._getOriginRect(),ye=this._pane.getBoundingClientRect(),Te=this._scrollables.map(function(we){return we.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:se(ve,Te),isOriginOutsideView:ae(ve,Te),isOverlayClipped:se(ye,Te),isOverlayOutsideView:ae(ye,Te)}}},{key:"_subtractOverflows",value:function(ve){for(var ye=arguments.length,Te=new Array(ye>1?ye-1:0),we=1;we0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=ve,this._alignItems="flex-start",this}},{key:"left",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=ve,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=ve,this._alignItems="flex-end",this}},{key:"right",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=ve,this._justifyContent="flex-end",this}},{key:"width",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:ve}):this._width=ve,this}},{key:"height",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:ve}):this._height=ve,this}},{key:"centerHorizontally",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(ve),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(ve),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var ve=this._overlayRef.overlayElement.style,ye=this._overlayRef.hostElement.style,Te=this._overlayRef.getConfig(),we=Te.width,ct=Te.height,ft=Te.maxWidth,Yt=Te.maxHeight,Kt=!("100%"!==we&&"100vw"!==we||ft&&"100%"!==ft&&"100vw"!==ft),Jt=!("100%"!==ct&&"100vh"!==ct||Yt&&"100%"!==Yt&&"100vh"!==Yt);ve.position=this._cssPosition,ve.marginLeft=Kt?"0":this._leftOffset,ve.marginTop=Jt?"0":this._topOffset,ve.marginBottom=this._bottomOffset,ve.marginRight=this._rightOffset,Kt?ye.justifyContent="flex-start":"center"===this._justifyContent?ye.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?ye.justifyContent="flex-end":"flex-end"===this._justifyContent&&(ye.justifyContent="flex-start"):ye.justifyContent=this._justifyContent,ye.alignItems=Jt?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var ve=this._overlayRef.overlayElement.style,ye=this._overlayRef.hostElement,Te=ye.style;ye.classList.remove(Ct),Te.justifyContent=Te.alignItems=ve.marginTop=ve.marginBottom=ve.marginLeft=ve.marginRight=ve.position="",this._overlayRef=null,this._isDisposed=!0}}}]),ut}(),bt=function(){var ut=function(){function He(ve,ye,Te,we){(0,b.Z)(this,He),this._viewportRuler=ve,this._document=ye,this._platform=Te,this._overlayContainer=we}return(0,v.Z)(He,[{key:"global",value:function(){return new qt}},{key:"connectedTo",value:function(ye,Te,we){return new Ht(Te,we,ye,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(ye){return new Bt(ye,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),He}();return ut.\u0275fac=function(ve){return new(ve||ut)(D.LFG(I.rL),D.LFG(_.K0),D.LFG(k.t4),D.LFG(De))},ut.\u0275prov=D.Yz7({factory:function(){return new ut(D.LFG(I.rL),D.LFG(_.K0),D.LFG(k.t4),D.LFG(De))},token:ut,providedIn:"root"}),ut}(),en=0,Nt=function(){var ut=function(){function He(ve,ye,Te,we,ct,ft,Yt,Kt,Jt,nn,ln){(0,b.Z)(this,He),this.scrollStrategies=ve,this._overlayContainer=ye,this._componentFactoryResolver=Te,this._positionBuilder=we,this._keyboardDispatcher=ct,this._injector=ft,this._ngZone=Yt,this._document=Kt,this._directionality=Jt,this._location=nn,this._outsideClickDispatcher=ln}return(0,v.Z)(He,[{key:"create",value:function(ye){var Te=this._createHostElement(),we=this._createPaneElement(Te),ct=this._createPortalOutlet(we),ft=new oe(ye);return ft.direction=ft.direction||this._directionality.value,new je(ct,Te,we,ft,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(ye){var Te=this._document.createElement("div");return Te.id="cdk-overlay-".concat(en++),Te.classList.add("cdk-overlay-pane"),ye.appendChild(Te),Te}},{key:"_createHostElement",value:function(){var ye=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(ye),ye}},{key:"_createPortalOutlet",value:function(ye){return this._appRef||(this._appRef=this._injector.get(D.z2F)),new E.u0(ye,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),He}();return ut.\u0275fac=function(ve){return new(ve||ut)(D.LFG(le),D.LFG(De),D.LFG(D._Vd),D.LFG(bt),D.LFG(Ft),D.LFG(D.zs3),D.LFG(D.R0b),D.LFG(_.K0),D.LFG(M.Is),D.LFG(_.Ye),D.LFG(xe))},ut.\u0275prov=D.Yz7({token:ut,factory:ut.\u0275fac}),ut}(),rn=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],En=new D.OlP("cdk-connected-overlay-scroll-strategy"),Zn=function(){var ut=function He(ve){(0,b.Z)(this,He),this.elementRef=ve};return ut.\u0275fac=function(ve){return new(ve||ut)(D.Y36(D.SBq))},ut.\u0275dir=D.lG2({type:ut,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),ut}(),In=function(){var ut=function(){function He(ve,ye,Te,we,ct){(0,b.Z)(this,He),this._overlay=ve,this._dir=ct,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=A.w.EMPTY,this._attachSubscription=A.w.EMPTY,this._detachSubscription=A.w.EMPTY,this._positionSubscription=A.w.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new D.vpe,this.positionChange=new D.vpe,this.attach=new D.vpe,this.detach=new D.vpe,this.overlayKeydown=new D.vpe,this.overlayOutsideClick=new D.vpe,this._templatePortal=new E.UE(ye,Te),this._scrollStrategyFactory=we,this.scrollStrategy=this._scrollStrategyFactory()}return(0,v.Z)(He,[{key:"offsetX",get:function(){return this._offsetX},set:function(ye){this._offsetX=ye,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(ye){this._offsetY=ye,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(ye){this._hasBackdrop=(0,g.Ig)(ye)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(ye){this._lockPosition=(0,g.Ig)(ye)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(ye){this._flexibleDimensions=(0,g.Ig)(ye)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(ye){this._growAfterOpen=(0,g.Ig)(ye)}},{key:"push",get:function(){return this._push},set:function(ye){this._push=(0,g.Ig)(ye)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}},{key:"ngOnDestroy",value:function(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}},{key:"ngOnChanges",value:function(ye){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),ye.origin&&this.open&&this._position.apply()),ye.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var ye=this;(!this.positions||!this.positions.length)&&(this.positions=rn);var Te=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=Te.attachments().subscribe(function(){return ye.attach.emit()}),this._detachSubscription=Te.detachments().subscribe(function(){return ye.detach.emit()}),Te.keydownEvents().subscribe(function(we){ye.overlayKeydown.next(we),we.keyCode===z.hY&&!ye.disableClose&&!(0,z.Vb)(we)&&(we.preventDefault(),ye._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(function(we){ye.overlayOutsideClick.next(we)})}},{key:"_buildConfig",value:function(){var ye=this._position=this.positionStrategy||this._createPositionStrategy(),Te=new oe({direction:this._dir,positionStrategy:ye,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(Te.width=this.width),(this.height||0===this.height)&&(Te.height=this.height),(this.minWidth||0===this.minWidth)&&(Te.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(Te.minHeight=this.minHeight),this.backdropClass&&(Te.backdropClass=this.backdropClass),this.panelClass&&(Te.panelClass=this.panelClass),Te}},{key:"_updatePositionStrategy",value:function(ye){var Te=this,we=this.positions.map(function(ct){return{originX:ct.originX,originY:ct.originY,overlayX:ct.overlayX,overlayY:ct.overlayY,offsetX:ct.offsetX||Te.offsetX,offsetY:ct.offsetY||Te.offsetY,panelClass:ct.panelClass||void 0}});return ye.setOrigin(this.origin.elementRef).withPositions(we).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}},{key:"_createPositionStrategy",value:function(){var ye=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(ye),ye}},{key:"_attachOverlay",value:function(){var ye=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(Te){ye.backdropClick.emit(Te)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe((0,F.o)(function(){return ye.positionChange.observers.length>0})).subscribe(function(Te){ye.positionChange.emit(Te),0===ye.positionChange.observers.length&&ye._positionSubscription.unsubscribe()}))}},{key:"_detachOverlay",value:function(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}]),He}();return ut.\u0275fac=function(ve){return new(ve||ut)(D.Y36(Nt),D.Y36(D.Rgc),D.Y36(D.s_b),D.Y36(En),D.Y36(M.Is,8))},ut.\u0275dir=D.lG2({type:ut,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[D.TTD]}),ut}(),Rn={provide:En,deps:[Nt],useFactory:function(ut){return function(){return ut.scrollStrategies.reposition()}}},wn=function(){var ut=function He(){(0,b.Z)(this,He)};return ut.\u0275fac=function(ve){return new(ve||ut)},ut.\u0275mod=D.oAB({type:ut}),ut.\u0275inj=D.cJS({providers:[Nt,Rn],imports:[[M.vT,E.eL,I.Cl],I.Cl]}),ut}()},15427:function(ue,q,f){"use strict";f.d(q,{t4:function(){return T},ud:function(){return R},sA:function(){return F},ht:function(){return O},kV:function(){return S},Oy:function(){return K},_i:function(){return N},qK:function(){return I},i$:function(){return M},Mq:function(){return E}});var Z,U=f(18967),B=f(38999),V=f(40098);try{Z="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(j){Z=!1}var b,D,_,g,A,z,T=function(){var j=function J(ee){(0,U.Z)(this,J),this._platformId=ee,this.isBrowser=this._platformId?(0,V.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Z)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT};return j.\u0275fac=function(ee){return new(ee||j)(B.LFG(B.Lbi))},j.\u0275prov=B.Yz7({factory:function(){return new j(B.LFG(B.Lbi))},token:j,providedIn:"root"}),j}(),R=function(){var j=function J(){(0,U.Z)(this,J)};return j.\u0275fac=function(ee){return new(ee||j)},j.\u0275mod=B.oAB({type:j}),j.\u0275inj=B.cJS({}),j}(),v=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function I(){if(b)return b;if("object"!=typeof document||!document)return b=new Set(v);var j=document.createElement("input");return b=new Set(v.filter(function(J){return j.setAttribute("type",J),j.type===J}))}function M(j){return function(){if(null==D&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return D=!0}}))}finally{D=D||!1}return D}()?j:!!j.capture}function E(){if(null==g){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return g=!1;if("scrollBehavior"in document.documentElement.style)g=!0;else{var j=Element.prototype.scrollTo;g=!!j&&!/\{\s*\[native code\]\s*\}/.test(j.toString())}}return g}function N(){if("object"!=typeof document||!document)return 0;if(null==_){var j=document.createElement("div"),J=j.style;j.dir="rtl",J.width="1px",J.overflow="auto",J.visibility="hidden",J.pointerEvents="none",J.position="absolute";var ee=document.createElement("div"),$=ee.style;$.width="2px",$.height="1px",j.appendChild(ee),document.body.appendChild(j),_=0,0===j.scrollLeft&&(j.scrollLeft=1,_=0===j.scrollLeft?1:2),j.parentNode.removeChild(j)}return _}function S(j){if(function(){if(null==A){var j="undefined"!=typeof document?document.head:null;A=!(!j||!j.createShadowRoot&&!j.attachShadow)}return A}()){var J=j.getRootNode?j.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&J instanceof ShadowRoot)return J}return null}function O(){for(var j="undefined"!=typeof document&&document?document.activeElement:null;j&&j.shadowRoot;){var J=j.shadowRoot.activeElement;if(J===j)break;j=J}return j}function F(j){return j.composedPath?j.composedPath()[0]:j.target}function K(){return void 0!==z.__karma__&&!!z.__karma__||void 0!==z.jasmine&&!!z.jasmine||void 0!==z.jest&&!!z.jest||void 0!==z.Mocha&&!!z.Mocha}z="undefined"!=typeof global?global:"undefined"!=typeof window?window:{}},80785:function(ue,q,f){"use strict";f.d(q,{en:function(){return O},ig:function(){return j},Pl:function(){return ee},C5:function(){return A},u0:function(){return z},eL:function(){return ae},UE:function(){return w}});var U=f(88009),B=f(13920),V=f(89200),Z=f(10509),T=f(97154),R=f(18967),b=f(14105),v=f(38999),I=f(40098),N=function(){function ce(){(0,R.Z)(this,ce)}return(0,b.Z)(ce,[{key:"attach",value:function(oe){return this._attachedHost=oe,oe.attach(this)}},{key:"detach",value:function(){var oe=this._attachedHost;null!=oe&&(this._attachedHost=null,oe.detach())}},{key:"isAttached",get:function(){return null!=this._attachedHost}},{key:"setAttachedHost",value:function(oe){this._attachedHost=oe}}]),ce}(),A=function(ce){(0,Z.Z)(oe,ce);var le=(0,T.Z)(oe);function oe(Ae,be,it,qe){var _t;return(0,R.Z)(this,oe),(_t=le.call(this)).component=Ae,_t.viewContainerRef=be,_t.injector=it,_t.componentFactoryResolver=qe,_t}return oe}(N),w=function(ce){(0,Z.Z)(oe,ce);var le=(0,T.Z)(oe);function oe(Ae,be,it){var qe;return(0,R.Z)(this,oe),(qe=le.call(this)).templateRef=Ae,qe.viewContainerRef=be,qe.context=it,qe}return(0,b.Z)(oe,[{key:"origin",get:function(){return this.templateRef.elementRef}},{key:"attach",value:function(be){var it=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=it,(0,B.Z)((0,V.Z)(oe.prototype),"attach",this).call(this,be)}},{key:"detach",value:function(){return this.context=void 0,(0,B.Z)((0,V.Z)(oe.prototype),"detach",this).call(this)}}]),oe}(N),S=function(ce){(0,Z.Z)(oe,ce);var le=(0,T.Z)(oe);function oe(Ae){var be;return(0,R.Z)(this,oe),(be=le.call(this)).element=Ae instanceof v.SBq?Ae.nativeElement:Ae,be}return oe}(N),O=function(){function ce(){(0,R.Z)(this,ce),this._isDisposed=!1,this.attachDomPortal=null}return(0,b.Z)(ce,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(oe){return oe instanceof A?(this._attachedPortal=oe,this.attachComponentPortal(oe)):oe instanceof w?(this._attachedPortal=oe,this.attachTemplatePortal(oe)):this.attachDomPortal&&oe instanceof S?(this._attachedPortal=oe,this.attachDomPortal(oe)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(oe){this._disposeFn=oe}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),ce}(),z=function(ce){(0,Z.Z)(oe,ce);var le=(0,T.Z)(oe);function oe(Ae,be,it,qe,_t){var yt,Ft;return(0,R.Z)(this,oe),(Ft=le.call(this)).outletElement=Ae,Ft._componentFactoryResolver=be,Ft._appRef=it,Ft._defaultInjector=qe,Ft.attachDomPortal=function(xe){var De=xe.element,je=Ft._document.createComment("dom-portal");De.parentNode.insertBefore(je,De),Ft.outletElement.appendChild(De),Ft._attachedPortal=xe,(0,B.Z)((yt=(0,U.Z)(Ft),(0,V.Z)(oe.prototype)),"setDisposeFn",yt).call(yt,function(){je.parentNode&&je.parentNode.replaceChild(De,je)})},Ft._document=_t,Ft}return(0,b.Z)(oe,[{key:"attachComponentPortal",value:function(be){var yt,it=this,_t=(be.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(be.component);return be.viewContainerRef?(yt=be.viewContainerRef.createComponent(_t,be.viewContainerRef.length,be.injector||be.viewContainerRef.injector),this.setDisposeFn(function(){return yt.destroy()})):(yt=_t.create(be.injector||this._defaultInjector),this._appRef.attachView(yt.hostView),this.setDisposeFn(function(){it._appRef.detachView(yt.hostView),yt.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(yt)),this._attachedPortal=be,yt}},{key:"attachTemplatePortal",value:function(be){var it=this,qe=be.viewContainerRef,_t=qe.createEmbeddedView(be.templateRef,be.context);return _t.rootNodes.forEach(function(yt){return it.outletElement.appendChild(yt)}),_t.detectChanges(),this.setDisposeFn(function(){var yt=qe.indexOf(_t);-1!==yt&&qe.remove(yt)}),this._attachedPortal=be,_t}},{key:"dispose",value:function(){(0,B.Z)((0,V.Z)(oe.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(be){return be.hostView.rootNodes[0]}}]),oe}(O),j=function(){var ce=function(le){(0,Z.Z)(Ae,le);var oe=(0,T.Z)(Ae);function Ae(be,it){return(0,R.Z)(this,Ae),oe.call(this,be,it)}return Ae}(w);return ce.\u0275fac=function(oe){return new(oe||ce)(v.Y36(v.Rgc),v.Y36(v.s_b))},ce.\u0275dir=v.lG2({type:ce,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[v.qOj]}),ce}(),ee=function(){var ce=function(le){(0,Z.Z)(Ae,le);var oe=(0,T.Z)(Ae);function Ae(be,it,qe){var _t,yt;return(0,R.Z)(this,Ae),(yt=oe.call(this))._componentFactoryResolver=be,yt._viewContainerRef=it,yt._isInitialized=!1,yt.attached=new v.vpe,yt.attachDomPortal=function(Ft){var xe=Ft.element,De=yt._document.createComment("dom-portal");Ft.setAttachedHost((0,U.Z)(yt)),xe.parentNode.insertBefore(De,xe),yt._getRootNode().appendChild(xe),yt._attachedPortal=Ft,(0,B.Z)((_t=(0,U.Z)(yt),(0,V.Z)(Ae.prototype)),"setDisposeFn",_t).call(_t,function(){De.parentNode&&De.parentNode.replaceChild(xe,De)})},yt._document=qe,yt}return(0,b.Z)(Ae,[{key:"portal",get:function(){return this._attachedPortal},set:function(it){this.hasAttached()&&!it&&!this._isInitialized||(this.hasAttached()&&(0,B.Z)((0,V.Z)(Ae.prototype),"detach",this).call(this),it&&(0,B.Z)((0,V.Z)(Ae.prototype),"attach",this).call(this,it),this._attachedPortal=it)}},{key:"attachedRef",get:function(){return this._attachedRef}},{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){(0,B.Z)((0,V.Z)(Ae.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(it){it.setAttachedHost(this);var qe=null!=it.viewContainerRef?it.viewContainerRef:this._viewContainerRef,yt=(it.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(it.component),Ft=qe.createComponent(yt,qe.length,it.injector||qe.injector);return qe!==this._viewContainerRef&&this._getRootNode().appendChild(Ft.hostView.rootNodes[0]),(0,B.Z)((0,V.Z)(Ae.prototype),"setDisposeFn",this).call(this,function(){return Ft.destroy()}),this._attachedPortal=it,this._attachedRef=Ft,this.attached.emit(Ft),Ft}},{key:"attachTemplatePortal",value:function(it){var qe=this;it.setAttachedHost(this);var _t=this._viewContainerRef.createEmbeddedView(it.templateRef,it.context);return(0,B.Z)((0,V.Z)(Ae.prototype),"setDisposeFn",this).call(this,function(){return qe._viewContainerRef.clear()}),this._attachedPortal=it,this._attachedRef=_t,this.attached.emit(_t),_t}},{key:"_getRootNode",value:function(){var it=this._viewContainerRef.element.nativeElement;return it.nodeType===it.ELEMENT_NODE?it:it.parentNode}}]),Ae}(O);return ce.\u0275fac=function(oe){return new(oe||ce)(v.Y36(v._Vd),v.Y36(v.s_b),v.Y36(I.K0))},ce.\u0275dir=v.lG2({type:ce,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[v.qOj]}),ce}(),ae=function(){var ce=function le(){(0,R.Z)(this,le)};return ce.\u0275fac=function(oe){return new(oe||ce)},ce.\u0275mod=v.oAB({type:ce}),ce.\u0275inj=v.cJS({}),ce}()},28722:function(ue,q,f){"use strict";f.d(q,{PQ:function(){return Ft},ZD:function(){return vt},mF:function(){return yt},Cl:function(){return Qt},rL:function(){return De}}),f(71955),f(36683),f(13920),f(89200),f(10509),f(97154);var b=f(18967),v=f(14105),I=f(78081),D=f(38999),k=f(68707),M=f(43161),_=f(89797),g=f(33090),O=(f(58172),f(8285),f(5051),f(17504),f(76161),f(54562)),F=f(58780),z=f(44213),$=(f(57682),f(4363),f(34487),f(61106),f(15427)),ae=f(40098),se=f(8392);f(37429);var yt=function(){var Ht=function(){function Ct(qt,bt,en){(0,b.Z)(this,Ct),this._ngZone=qt,this._platform=bt,this._scrolled=new k.xQ,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=en}return(0,v.Z)(Ct,[{key:"register",value:function(bt){var en=this;this.scrollContainers.has(bt)||this.scrollContainers.set(bt,bt.elementScrolled().subscribe(function(){return en._scrolled.next(bt)}))}},{key:"deregister",value:function(bt){var en=this.scrollContainers.get(bt);en&&(en.unsubscribe(),this.scrollContainers.delete(bt))}},{key:"scrolled",value:function(){var bt=this,en=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new _.y(function(Nt){bt._globalSubscription||bt._addGlobalListener();var rn=en>0?bt._scrolled.pipe((0,O.e)(en)).subscribe(Nt):bt._scrolled.subscribe(Nt);return bt._scrolledCount++,function(){rn.unsubscribe(),bt._scrolledCount--,bt._scrolledCount||bt._removeGlobalListener()}}):(0,M.of)()}},{key:"ngOnDestroy",value:function(){var bt=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(en,Nt){return bt.deregister(Nt)}),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(bt,en){var Nt=this.getAncestorScrollContainers(bt);return this.scrolled(en).pipe((0,F.h)(function(rn){return!rn||Nt.indexOf(rn)>-1}))}},{key:"getAncestorScrollContainers",value:function(bt){var en=this,Nt=[];return this.scrollContainers.forEach(function(rn,En){en._scrollableContainsElement(En,bt)&&Nt.push(En)}),Nt}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_scrollableContainsElement",value:function(bt,en){var Nt=(0,I.fI)(en),rn=bt.getElementRef().nativeElement;do{if(Nt==rn)return!0}while(Nt=Nt.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var bt=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){var en=bt._getWindow();return(0,g.R)(en.document,"scroll").subscribe(function(){return bt._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),Ct}();return Ht.\u0275fac=function(qt){return new(qt||Ht)(D.LFG(D.R0b),D.LFG($.t4),D.LFG(ae.K0,8))},Ht.\u0275prov=D.Yz7({factory:function(){return new Ht(D.LFG(D.R0b),D.LFG($.t4),D.LFG(ae.K0,8))},token:Ht,providedIn:"root"}),Ht}(),Ft=function(){var Ht=function(){function Ct(qt,bt,en,Nt){var rn=this;(0,b.Z)(this,Ct),this.elementRef=qt,this.scrollDispatcher=bt,this.ngZone=en,this.dir=Nt,this._destroyed=new k.xQ,this._elementScrolled=new _.y(function(En){return rn.ngZone.runOutsideAngular(function(){return(0,g.R)(rn.elementRef.nativeElement,"scroll").pipe((0,z.R)(rn._destroyed)).subscribe(En)})})}return(0,v.Z)(Ct,[{key:"ngOnInit",value:function(){this.scrollDispatcher.register(this)}},{key:"ngOnDestroy",value:function(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}},{key:"elementScrolled",value:function(){return this._elementScrolled}},{key:"getElementRef",value:function(){return this.elementRef}},{key:"scrollTo",value:function(bt){var en=this.elementRef.nativeElement,Nt=this.dir&&"rtl"==this.dir.value;null==bt.left&&(bt.left=Nt?bt.end:bt.start),null==bt.right&&(bt.right=Nt?bt.start:bt.end),null!=bt.bottom&&(bt.top=en.scrollHeight-en.clientHeight-bt.bottom),Nt&&0!=(0,$._i)()?(null!=bt.left&&(bt.right=en.scrollWidth-en.clientWidth-bt.left),2==(0,$._i)()?bt.left=bt.right:1==(0,$._i)()&&(bt.left=bt.right?-bt.right:bt.right)):null!=bt.right&&(bt.left=en.scrollWidth-en.clientWidth-bt.right),this._applyScrollToOptions(bt)}},{key:"_applyScrollToOptions",value:function(bt){var en=this.elementRef.nativeElement;(0,$.Mq)()?en.scrollTo(bt):(null!=bt.top&&(en.scrollTop=bt.top),null!=bt.left&&(en.scrollLeft=bt.left))}},{key:"measureScrollOffset",value:function(bt){var en="left",rn=this.elementRef.nativeElement;if("top"==bt)return rn.scrollTop;if("bottom"==bt)return rn.scrollHeight-rn.clientHeight-rn.scrollTop;var En=this.dir&&"rtl"==this.dir.value;return"start"==bt?bt=En?"right":en:"end"==bt&&(bt=En?en:"right"),En&&2==(0,$._i)()?bt==en?rn.scrollWidth-rn.clientWidth-rn.scrollLeft:rn.scrollLeft:En&&1==(0,$._i)()?bt==en?rn.scrollLeft+rn.scrollWidth-rn.clientWidth:-rn.scrollLeft:bt==en?rn.scrollLeft:rn.scrollWidth-rn.clientWidth-rn.scrollLeft}}]),Ct}();return Ht.\u0275fac=function(qt){return new(qt||Ht)(D.Y36(D.SBq),D.Y36(yt),D.Y36(D.R0b),D.Y36(se.Is,8))},Ht.\u0275dir=D.lG2({type:Ht,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),Ht}(),De=function(){var Ht=function(){function Ct(qt,bt,en){var Nt=this;(0,b.Z)(this,Ct),this._platform=qt,this._change=new k.xQ,this._changeListener=function(rn){Nt._change.next(rn)},this._document=en,bt.runOutsideAngular(function(){if(qt.isBrowser){var rn=Nt._getWindow();rn.addEventListener("resize",Nt._changeListener),rn.addEventListener("orientationchange",Nt._changeListener)}Nt.change().subscribe(function(){return Nt._viewportSize=null})})}return(0,v.Z)(Ct,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var bt=this._getWindow();bt.removeEventListener("resize",this._changeListener),bt.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var bt={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),bt}},{key:"getViewportRect",value:function(){var bt=this.getViewportScrollPosition(),en=this.getViewportSize(),Nt=en.width,rn=en.height;return{top:bt.top,left:bt.left,bottom:bt.top+rn,right:bt.left+Nt,height:rn,width:Nt}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var bt=this._document,en=this._getWindow(),Nt=bt.documentElement,rn=Nt.getBoundingClientRect();return{top:-rn.top||bt.body.scrollTop||en.scrollY||Nt.scrollTop||0,left:-rn.left||bt.body.scrollLeft||en.scrollX||Nt.scrollLeft||0}}},{key:"change",value:function(){var bt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return bt>0?this._change.pipe((0,O.e)(bt)):this._change}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_updateViewportSize",value:function(){var bt=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:bt.innerWidth,height:bt.innerHeight}:{width:0,height:0}}}]),Ct}();return Ht.\u0275fac=function(qt){return new(qt||Ht)(D.LFG($.t4),D.LFG(D.R0b),D.LFG(ae.K0,8))},Ht.\u0275prov=D.Yz7({factory:function(){return new Ht(D.LFG($.t4),D.LFG(D.R0b),D.LFG(ae.K0,8))},token:Ht,providedIn:"root"}),Ht}(),vt=function(){var Ht=function Ct(){(0,b.Z)(this,Ct)};return Ht.\u0275fac=function(qt){return new(qt||Ht)},Ht.\u0275mod=D.oAB({type:Ht}),Ht.\u0275inj=D.cJS({}),Ht}(),Qt=function(){var Ht=function Ct(){(0,b.Z)(this,Ct)};return Ht.\u0275fac=function(qt){return new(qt||Ht)},Ht.\u0275mod=D.oAB({type:Ht}),Ht.\u0275inj=D.cJS({imports:[[se.vT,$.ud,vt],se.vT,vt]}),Ht}()},78081:function(ue,q,f){"use strict";f.d(q,{t6:function(){return Z},Eq:function(){return T},Ig:function(){return B},HM:function(){return R},fI:function(){return b},su:function(){return V}});var U=f(38999);function B(I){return null!=I&&"false"!=="".concat(I)}function V(I){var D=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Z(I)?Number(I):D}function Z(I){return!isNaN(parseFloat(I))&&!isNaN(Number(I))}function T(I){return Array.isArray(I)?I:[I]}function R(I){return null==I?"":"string"==typeof I?I:"".concat(I,"px")}function b(I){return I instanceof U.SBq?I.nativeElement:I}},40098:function(ue,q,f){"use strict";f.d(q,{mr:function(){return J},Ov:function(){return po},ez:function(){return Fn},K0:function(){return _},Do:function(){return $},V_:function(){return N},Ye:function(){return ae},S$:function(){return K},mk:function(){return Xt},sg:function(){return jn},O5:function(){return Ci},PC:function(){return qi},RF:function(){return Oo},n9:function(){return Qo},ED:function(){return wo},tP:function(){return Gi},b0:function(){return ee},lw:function(){return g},EM:function(){return ja},JF:function(){return bl},NF:function(){return ji},w_:function(){return M},bD:function(){return Da},q:function(){return I},Mx:function(){return Gt},HT:function(){return k}});var U=f(36683),B=f(71955),V=f(10509),Z=f(97154),T=f(14105),R=f(18967),b=f(38999),v=null;function I(){return v}function k(pe){v||(v=pe)}var M=function pe(){(0,R.Z)(this,pe)},_=new b.OlP("DocumentToken"),g=function(){var pe=function(){function Fe(){(0,R.Z)(this,Fe)}return(0,T.Z)(Fe,[{key:"historyGo",value:function(We){throw new Error("Not implemented")}}]),Fe}();return pe.\u0275fac=function($e){return new($e||pe)},pe.\u0275prov=(0,b.Yz7)({factory:E,token:pe,providedIn:"platform"}),pe}();function E(){return(0,b.LFG)(A)}var N=new b.OlP("Location Initialized"),A=function(){var pe=function(Fe){(0,V.Z)(We,Fe);var $e=(0,Z.Z)(We);function We(ie){var fe;return(0,R.Z)(this,We),(fe=$e.call(this))._doc=ie,fe._init(),fe}return(0,T.Z)(We,[{key:"_init",value:function(){this.location=window.location,this._history=window.history}},{key:"getBaseHrefFromDOM",value:function(){return I().getBaseHref(this._doc)}},{key:"onPopState",value:function(fe){var _e=I().getGlobalEventTarget(this._doc,"window");return _e.addEventListener("popstate",fe,!1),function(){return _e.removeEventListener("popstate",fe)}}},{key:"onHashChange",value:function(fe){var _e=I().getGlobalEventTarget(this._doc,"window");return _e.addEventListener("hashchange",fe,!1),function(){return _e.removeEventListener("hashchange",fe)}}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(fe){this.location.pathname=fe}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}},{key:"pushState",value:function(fe,_e,Ce){w()?this._history.pushState(fe,_e,Ce):this.location.hash=Ce}},{key:"replaceState",value:function(fe,_e,Ce){w()?this._history.replaceState(fe,_e,Ce):this.location.hash=Ce}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"historyGo",value:function(){var fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._history.go(fe)}},{key:"getState",value:function(){return this._history.state}}]),We}(g);return pe.\u0275fac=function($e){return new($e||pe)(b.LFG(_))},pe.\u0275prov=(0,b.Yz7)({factory:S,token:pe,providedIn:"platform"}),pe}();function w(){return!!window.history.pushState}function S(){return new A((0,b.LFG)(_))}function O(pe,Fe){if(0==pe.length)return Fe;if(0==Fe.length)return pe;var $e=0;return pe.endsWith("/")&&$e++,Fe.startsWith("/")&&$e++,2==$e?pe+Fe.substring(1):1==$e?pe+Fe:pe+"/"+Fe}function F(pe){var Fe=pe.match(/#|\?|$/),$e=Fe&&Fe.index||pe.length;return pe.slice(0,$e-("/"===pe[$e-1]?1:0))+pe.slice($e)}function z(pe){return pe&&"?"!==pe[0]?"?"+pe:pe}var K=function(){var pe=function(){function Fe(){(0,R.Z)(this,Fe)}return(0,T.Z)(Fe,[{key:"historyGo",value:function(We){throw new Error("Not implemented")}}]),Fe}();return pe.\u0275fac=function($e){return new($e||pe)},pe.\u0275prov=(0,b.Yz7)({factory:j,token:pe,providedIn:"root"}),pe}();function j(pe){var Fe=(0,b.LFG)(_).location;return new ee((0,b.LFG)(g),Fe&&Fe.origin||"")}var J=new b.OlP("appBaseHref"),ee=function(){var pe=function(Fe){(0,V.Z)(We,Fe);var $e=(0,Z.Z)(We);function We(ie,fe){var _e;if((0,R.Z)(this,We),(_e=$e.call(this))._platformLocation=ie,_e._removeListenerFns=[],null==fe&&(fe=_e._platformLocation.getBaseHrefFromDOM()),null==fe)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return _e._baseHref=fe,_e}return(0,T.Z)(We,[{key:"ngOnDestroy",value:function(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}},{key:"onPopState",value:function(fe){this._removeListenerFns.push(this._platformLocation.onPopState(fe),this._platformLocation.onHashChange(fe))}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(fe){return O(this._baseHref,fe)}},{key:"path",value:function(){var fe=arguments.length>0&&void 0!==arguments[0]&&arguments[0],_e=this._platformLocation.pathname+z(this._platformLocation.search),Ce=this._platformLocation.hash;return Ce&&fe?"".concat(_e).concat(Ce):_e}},{key:"pushState",value:function(fe,_e,Ce,Re){var Ge=this.prepareExternalUrl(Ce+z(Re));this._platformLocation.pushState(fe,_e,Ge)}},{key:"replaceState",value:function(fe,_e,Ce,Re){var Ge=this.prepareExternalUrl(Ce+z(Re));this._platformLocation.replaceState(fe,_e,Ge)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}},{key:"historyGo",value:function(){var _e,Ce,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;null===(Ce=(_e=this._platformLocation).historyGo)||void 0===Ce||Ce.call(_e,fe)}}]),We}(K);return pe.\u0275fac=function($e){return new($e||pe)(b.LFG(g),b.LFG(J,8))},pe.\u0275prov=b.Yz7({token:pe,factory:pe.\u0275fac}),pe}(),$=function(){var pe=function(Fe){(0,V.Z)(We,Fe);var $e=(0,Z.Z)(We);function We(ie,fe){var _e;return(0,R.Z)(this,We),(_e=$e.call(this))._platformLocation=ie,_e._baseHref="",_e._removeListenerFns=[],null!=fe&&(_e._baseHref=fe),_e}return(0,T.Z)(We,[{key:"ngOnDestroy",value:function(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}},{key:"onPopState",value:function(fe){this._removeListenerFns.push(this._platformLocation.onPopState(fe),this._platformLocation.onHashChange(fe))}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var _e=this._platformLocation.hash;return null==_e&&(_e="#"),_e.length>0?_e.substring(1):_e}},{key:"prepareExternalUrl",value:function(fe){var _e=O(this._baseHref,fe);return _e.length>0?"#"+_e:_e}},{key:"pushState",value:function(fe,_e,Ce,Re){var Ge=this.prepareExternalUrl(Ce+z(Re));0==Ge.length&&(Ge=this._platformLocation.pathname),this._platformLocation.pushState(fe,_e,Ge)}},{key:"replaceState",value:function(fe,_e,Ce,Re){var Ge=this.prepareExternalUrl(Ce+z(Re));0==Ge.length&&(Ge=this._platformLocation.pathname),this._platformLocation.replaceState(fe,_e,Ge)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}},{key:"historyGo",value:function(){var _e,Ce,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;null===(Ce=(_e=this._platformLocation).historyGo)||void 0===Ce||Ce.call(_e,fe)}}]),We}(K);return pe.\u0275fac=function($e){return new($e||pe)(b.LFG(g),b.LFG(J,8))},pe.\u0275prov=b.Yz7({token:pe,factory:pe.\u0275fac}),pe}(),ae=function(){var pe=function(){function Fe($e,We){var ie=this;(0,R.Z)(this,Fe),this._subject=new b.vpe,this._urlChangeListeners=[],this._platformStrategy=$e;var fe=this._platformStrategy.getBaseHref();this._platformLocation=We,this._baseHref=F(le(fe)),this._platformStrategy.onPopState(function(_e){ie._subject.emit({url:ie.path(!0),pop:!0,state:_e.state,type:_e.type})})}return(0,T.Z)(Fe,[{key:"path",value:function(){var We=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(We))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(We){var ie=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(We+z(ie))}},{key:"normalize",value:function(We){return Fe.stripTrailingSlash(function(pe,Fe){return pe&&Fe.startsWith(pe)?Fe.substring(pe.length):Fe}(this._baseHref,le(We)))}},{key:"prepareExternalUrl",value:function(We){return We&&"/"!==We[0]&&(We="/"+We),this._platformStrategy.prepareExternalUrl(We)}},{key:"go",value:function(We){var ie=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",fe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(fe,"",We,ie),this._notifyUrlChangeListeners(this.prepareExternalUrl(We+z(ie)),fe)}},{key:"replaceState",value:function(We){var ie=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",fe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(fe,"",We,ie),this._notifyUrlChangeListeners(this.prepareExternalUrl(We+z(ie)),fe)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"historyGo",value:function(){var ie,fe,We=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;null===(fe=(ie=this._platformStrategy).historyGo)||void 0===fe||fe.call(ie,We)}},{key:"onUrlChange",value:function(We){var ie=this;this._urlChangeListeners.push(We),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(fe){ie._notifyUrlChangeListeners(fe.url,fe.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var We=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",ie=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(fe){return fe(We,ie)})}},{key:"subscribe",value:function(We,ie,fe){return this._subject.subscribe({next:We,error:ie,complete:fe})}}]),Fe}();return pe.\u0275fac=function($e){return new($e||pe)(b.LFG(K),b.LFG(g))},pe.normalizeQueryParams=z,pe.joinWithSlash=O,pe.stripTrailingSlash=F,pe.\u0275prov=(0,b.Yz7)({factory:se,token:pe,providedIn:"root"}),pe}();function se(){return new ae((0,b.LFG)(K),(0,b.LFG)(g))}function le(pe){return pe.replace(/\/index.html$/,"")}var be=function(pe){return pe[pe.Zero=0]="Zero",pe[pe.One=1]="One",pe[pe.Two=2]="Two",pe[pe.Few=3]="Few",pe[pe.Many=4]="Many",pe[pe.Other=5]="Other",pe}({}),En=b.kL8,Ot=function pe(){(0,R.Z)(this,pe)},Pt=function(){var pe=function(Fe){(0,V.Z)(We,Fe);var $e=(0,Z.Z)(We);function We(ie){var fe;return(0,R.Z)(this,We),(fe=$e.call(this)).locale=ie,fe}return(0,T.Z)(We,[{key:"getPluralCategory",value:function(fe,_e){switch(En(_e||this.locale)(fe)){case be.Zero:return"zero";case be.One:return"one";case be.Two:return"two";case be.Few:return"few";case be.Many:return"many";default:return"other"}}}]),We}(Ot);return pe.\u0275fac=function($e){return new($e||pe)(b.LFG(b.soG))},pe.\u0275prov=b.Yz7({token:pe,factory:pe.\u0275fac}),pe}();function Gt(pe,Fe){Fe=encodeURIComponent(Fe);var We,$e=(0,U.Z)(pe.split(";"));try{for($e.s();!(We=$e.n()).done;){var ie=We.value,fe=ie.indexOf("="),_e=-1==fe?[ie,""]:[ie.slice(0,fe),ie.slice(fe+1)],Ce=(0,B.Z)(_e,2),Ge=Ce[1];if(Ce[0].trim()===Fe)return decodeURIComponent(Ge)}}catch(St){$e.e(St)}finally{$e.f()}return null}var Xt=function(){var pe=function(){function Fe($e,We,ie,fe){(0,R.Z)(this,Fe),this._iterableDiffers=$e,this._keyValueDiffers=We,this._ngEl=ie,this._renderer=fe,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return(0,T.Z)(Fe,[{key:"klass",set:function(We){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof We?We.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(We){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof We?We.split(/\s+/):We,this._rawClass&&((0,b.sIi)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}},{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var We=this._iterableDiffer.diff(this._rawClass);We&&this._applyIterableChanges(We)}else if(this._keyValueDiffer){var ie=this._keyValueDiffer.diff(this._rawClass);ie&&this._applyKeyValueChanges(ie)}}},{key:"_applyKeyValueChanges",value:function(We){var ie=this;We.forEachAddedItem(function(fe){return ie._toggleClass(fe.key,fe.currentValue)}),We.forEachChangedItem(function(fe){return ie._toggleClass(fe.key,fe.currentValue)}),We.forEachRemovedItem(function(fe){fe.previousValue&&ie._toggleClass(fe.key,!1)})}},{key:"_applyIterableChanges",value:function(We){var ie=this;We.forEachAddedItem(function(fe){if("string"!=typeof fe.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat((0,b.AaK)(fe.item)));ie._toggleClass(fe.item,!0)}),We.forEachRemovedItem(function(fe){return ie._toggleClass(fe.item,!1)})}},{key:"_applyClasses",value:function(We){var ie=this;We&&(Array.isArray(We)||We instanceof Set?We.forEach(function(fe){return ie._toggleClass(fe,!0)}):Object.keys(We).forEach(function(fe){return ie._toggleClass(fe,!!We[fe])}))}},{key:"_removeClasses",value:function(We){var ie=this;We&&(Array.isArray(We)||We instanceof Set?We.forEach(function(fe){return ie._toggleClass(fe,!1)}):Object.keys(We).forEach(function(fe){return ie._toggleClass(fe,!1)}))}},{key:"_toggleClass",value:function(We,ie){var fe=this;(We=We.trim())&&We.split(/\s+/g).forEach(function(_e){ie?fe._renderer.addClass(fe._ngEl.nativeElement,_e):fe._renderer.removeClass(fe._ngEl.nativeElement,_e)})}}]),Fe}();return pe.\u0275fac=function($e){return new($e||pe)(b.Y36(b.ZZ4),b.Y36(b.aQg),b.Y36(b.SBq),b.Y36(b.Qsj))},pe.\u0275dir=b.lG2({type:pe,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),pe}(),Gn=function(){function pe(Fe,$e,We,ie){(0,R.Z)(this,pe),this.$implicit=Fe,this.ngForOf=$e,this.index=We,this.count=ie}return(0,T.Z)(pe,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),pe}(),jn=function(){var pe=function(){function Fe($e,We,ie){(0,R.Z)(this,Fe),this._viewContainer=$e,this._template=We,this._differs=ie,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return(0,T.Z)(Fe,[{key:"ngForOf",set:function(We){this._ngForOf=We,this._ngForOfDirty=!0}},{key:"ngForTrackBy",get:function(){return this._trackByFn},set:function(We){this._trackByFn=We}},{key:"ngForTemplate",set:function(We){We&&(this._template=We)}},{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var We=this._ngForOf;if(!this._differ&&We)try{this._differ=this._differs.find(We).create(this.ngForTrackBy)}catch(fe){throw new Error("Cannot find a differ supporting object '".concat(We,"' of type '").concat(function(pe){return pe.name||typeof pe}(We),"'. NgFor only supports binding to Iterables such as Arrays."))}}if(this._differ){var ie=this._differ.diff(this._ngForOf);ie&&this._applyChanges(ie)}}},{key:"_applyChanges",value:function(We){var ie=this,fe=[];We.forEachOperation(function(St,ht,gt){if(null==St.previousIndex){var Kr=ie._viewContainer.createEmbeddedView(ie._template,new Gn(null,ie._ngForOf,-1,-1),null===gt?void 0:gt),qr=new zn(St,Kr);fe.push(qr)}else if(null==gt)ie._viewContainer.remove(null===ht?void 0:ht);else if(null!==ht){var Oi=ie._viewContainer.get(ht);ie._viewContainer.move(Oi,gt);var ya=new zn(St,Oi);fe.push(ya)}});for(var _e=0;_e0){var ct=Te.slice(0,we),ft=ct.toLowerCase(),Yt=Te.slice(we+1).trim();ye.maybeSetNormalizedName(ct,ft),ye.headers.has(ft)?ye.headers.get(ft).push(Yt):ye.headers.set(ft,[Yt])}})}:function(){ye.headers=new Map,Object.keys(ve).forEach(function(Te){var we=ve[Te],ct=Te.toLowerCase();"string"==typeof we&&(we=[we]),we.length>0&&(ye.headers.set(ct,we),ye.maybeSetNormalizedName(Te,ct))})}:this.headers=new Map}return(0,T.Z)(He,[{key:"has",value:function(ye){return this.init(),this.headers.has(ye.toLowerCase())}},{key:"get",value:function(ye){this.init();var Te=this.headers.get(ye.toLowerCase());return Te&&Te.length>0?Te[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(ye){return this.init(),this.headers.get(ye.toLowerCase())||null}},{key:"append",value:function(ye,Te){return this.clone({name:ye,value:Te,op:"a"})}},{key:"set",value:function(ye,Te){return this.clone({name:ye,value:Te,op:"s"})}},{key:"delete",value:function(ye,Te){return this.clone({name:ye,value:Te,op:"d"})}},{key:"maybeSetNormalizedName",value:function(ye,Te){this.normalizedNames.has(Te)||this.normalizedNames.set(Te,ye)}},{key:"init",value:function(){var ye=this;this.lazyInit&&(this.lazyInit instanceof He?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(Te){return ye.applyUpdate(Te)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(ye){var Te=this;ye.init(),Array.from(ye.headers.keys()).forEach(function(we){Te.headers.set(we,ye.headers.get(we)),Te.normalizedNames.set(we,ye.normalizedNames.get(we))})}},{key:"clone",value:function(ye){var Te=new He;return Te.lazyInit=this.lazyInit&&this.lazyInit instanceof He?this.lazyInit:this,Te.lazyUpdate=(this.lazyUpdate||[]).concat([ye]),Te}},{key:"applyUpdate",value:function(ye){var Te=ye.name.toLowerCase();switch(ye.op){case"a":case"s":var we=ye.value;if("string"==typeof we&&(we=[we]),0===we.length)return;this.maybeSetNormalizedName(ye.name,Te);var ct=("a"===ye.op?this.headers.get(Te):void 0)||[];ct.push.apply(ct,(0,Z.Z)(we)),this.headers.set(Te,ct);break;case"d":var ft=ye.value;if(ft){var Yt=this.headers.get(Te);if(!Yt)return;0===(Yt=Yt.filter(function(Kt){return-1===ft.indexOf(Kt)})).length?(this.headers.delete(Te),this.normalizedNames.delete(Te)):this.headers.set(Te,Yt)}else this.headers.delete(Te),this.normalizedNames.delete(Te)}}},{key:"forEach",value:function(ye){var Te=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(we){return ye(Te.normalizedNames.get(we),Te.headers.get(we))})}}]),He}(),A=function(){function He(){(0,R.Z)(this,He)}return(0,T.Z)(He,[{key:"encodeKey",value:function(ye){return F(ye)}},{key:"encodeValue",value:function(ye){return F(ye)}},{key:"decodeKey",value:function(ye){return decodeURIComponent(ye)}},{key:"decodeValue",value:function(ye){return decodeURIComponent(ye)}}]),He}();function w(He,ve){var ye=new Map;return He.length>0&&He.replace(/^\?/,"").split("&").forEach(function(we){var ct=we.indexOf("="),ft=-1==ct?[ve.decodeKey(we),""]:[ve.decodeKey(we.slice(0,ct)),ve.decodeValue(we.slice(ct+1))],Yt=(0,V.Z)(ft,2),Kt=Yt[0],Jt=Yt[1],nn=ye.get(Kt)||[];nn.push(Jt),ye.set(Kt,nn)}),ye}var S=/%(\d[a-f0-9])/gi,O={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function F(He){return encodeURIComponent(He).replace(S,function(ve,ye){var Te;return null!==(Te=O[ye])&&void 0!==Te?Te:ve})}function z(He){return"".concat(He)}var K=function(){function He(){var ve=this,ye=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,R.Z)(this,He),this.updates=null,this.cloneFrom=null,this.encoder=ye.encoder||new A,ye.fromString){if(ye.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=w(ye.fromString,this.encoder)}else ye.fromObject?(this.map=new Map,Object.keys(ye.fromObject).forEach(function(Te){var we=ye.fromObject[Te];ve.map.set(Te,Array.isArray(we)?we:[we])})):this.map=null}return(0,T.Z)(He,[{key:"has",value:function(ye){return this.init(),this.map.has(ye)}},{key:"get",value:function(ye){this.init();var Te=this.map.get(ye);return Te?Te[0]:null}},{key:"getAll",value:function(ye){return this.init(),this.map.get(ye)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(ye,Te){return this.clone({param:ye,value:Te,op:"a"})}},{key:"appendAll",value:function(ye){var Te=[];return Object.keys(ye).forEach(function(we){var ct=ye[we];Array.isArray(ct)?ct.forEach(function(ft){Te.push({param:we,value:ft,op:"a"})}):Te.push({param:we,value:ct,op:"a"})}),this.clone(Te)}},{key:"set",value:function(ye,Te){return this.clone({param:ye,value:Te,op:"s"})}},{key:"delete",value:function(ye,Te){return this.clone({param:ye,value:Te,op:"d"})}},{key:"toString",value:function(){var ye=this;return this.init(),this.keys().map(function(Te){var we=ye.encoder.encodeKey(Te);return ye.map.get(Te).map(function(ct){return we+"="+ye.encoder.encodeValue(ct)}).join("&")}).filter(function(Te){return""!==Te}).join("&")}},{key:"clone",value:function(ye){var Te=new He({encoder:this.encoder});return Te.cloneFrom=this.cloneFrom||this,Te.updates=(this.updates||[]).concat(ye),Te}},{key:"init",value:function(){var ye=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(Te){return ye.map.set(Te,ye.cloneFrom.map.get(Te))}),this.updates.forEach(function(Te){switch(Te.op){case"a":case"s":var we=("a"===Te.op?ye.map.get(Te.param):void 0)||[];we.push(z(Te.value)),ye.map.set(Te.param,we);break;case"d":if(void 0===Te.value){ye.map.delete(Te.param);break}var ct=ye.map.get(Te.param)||[],ft=ct.indexOf(z(Te.value));-1!==ft&&ct.splice(ft,1),ct.length>0?ye.map.set(Te.param,ct):ye.map.delete(Te.param)}}),this.cloneFrom=this.updates=null)}}]),He}(),J=function(){function He(){(0,R.Z)(this,He),this.map=new Map}return(0,T.Z)(He,[{key:"set",value:function(ye,Te){return this.map.set(ye,Te),this}},{key:"get",value:function(ye){return this.map.has(ye)||this.map.set(ye,ye.defaultValue()),this.map.get(ye)}},{key:"delete",value:function(ye){return this.map.delete(ye),this}},{key:"keys",value:function(){return this.map.keys()}}]),He}();function $(He){return"undefined"!=typeof ArrayBuffer&&He instanceof ArrayBuffer}function ae(He){return"undefined"!=typeof Blob&&He instanceof Blob}function se(He){return"undefined"!=typeof FormData&&He instanceof FormData}var le=function(){function He(ve,ye,Te,we){var ct;if((0,R.Z)(this,He),this.url=ye,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=ve.toUpperCase(),function(He){switch(He){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||we?(this.body=void 0!==Te?Te:null,ct=we):ct=Te,ct&&(this.reportProgress=!!ct.reportProgress,this.withCredentials=!!ct.withCredentials,ct.responseType&&(this.responseType=ct.responseType),ct.headers&&(this.headers=ct.headers),ct.context&&(this.context=ct.context),ct.params&&(this.params=ct.params)),this.headers||(this.headers=new N),this.context||(this.context=new J),this.params){var ft=this.params.toString();if(0===ft.length)this.urlWithParams=ye;else{var Yt=ye.indexOf("?");this.urlWithParams=ye+(-1===Yt?"?":Yt0&&void 0!==arguments[0]?arguments[0]:{},we=ye.method||this.method,ct=ye.url||this.url,ft=ye.responseType||this.responseType,Yt=void 0!==ye.body?ye.body:this.body,Kt=void 0!==ye.withCredentials?ye.withCredentials:this.withCredentials,Jt=void 0!==ye.reportProgress?ye.reportProgress:this.reportProgress,nn=ye.headers||this.headers,ln=ye.params||this.params,yn=null!==(Te=ye.context)&&void 0!==Te?Te:this.context;return void 0!==ye.setHeaders&&(nn=Object.keys(ye.setHeaders).reduce(function(Tn,Pn){return Tn.set(Pn,ye.setHeaders[Pn])},nn)),ye.setParams&&(ln=Object.keys(ye.setParams).reduce(function(Tn,Pn){return Tn.set(Pn,ye.setParams[Pn])},ln)),new He(we,ct,Yt,{params:ln,headers:nn,context:yn,reportProgress:Jt,responseType:ft,withCredentials:Kt})}}]),He}(),oe=function(He){return He[He.Sent=0]="Sent",He[He.UploadProgress=1]="UploadProgress",He[He.ResponseHeader=2]="ResponseHeader",He[He.DownloadProgress=3]="DownloadProgress",He[He.Response=4]="Response",He[He.User=5]="User",He}({}),Ae=function He(ve){var ye=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,Te=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";(0,R.Z)(this,He),this.headers=ve.headers||new N,this.status=void 0!==ve.status?ve.status:ye,this.statusText=ve.statusText||Te,this.url=ve.url||null,this.ok=this.status>=200&&this.status<300},be=function(He){(0,U.Z)(ye,He);var ve=(0,B.Z)(ye);function ye(){var Te,we=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,ye),(Te=ve.call(this,we)).type=oe.ResponseHeader,Te}return(0,T.Z)(ye,[{key:"clone",value:function(){var we=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ye({headers:we.headers||this.headers,status:void 0!==we.status?we.status:this.status,statusText:we.statusText||this.statusText,url:we.url||this.url||void 0})}}]),ye}(Ae),it=function(He){(0,U.Z)(ye,He);var ve=(0,B.Z)(ye);function ye(){var Te,we=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,ye),(Te=ve.call(this,we)).type=oe.Response,Te.body=void 0!==we.body?we.body:null,Te}return(0,T.Z)(ye,[{key:"clone",value:function(){var we=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ye({body:void 0!==we.body?we.body:this.body,headers:we.headers||this.headers,status:void 0!==we.status?we.status:this.status,statusText:we.statusText||this.statusText,url:we.url||this.url||void 0})}}]),ye}(Ae),qe=function(He){(0,U.Z)(ye,He);var ve=(0,B.Z)(ye);function ye(Te){var we;return(0,R.Z)(this,ye),(we=ve.call(this,Te,0,"Unknown Error")).name="HttpErrorResponse",we.ok=!1,we.message=we.status>=200&&we.status<300?"Http failure during parsing for ".concat(Te.url||"(unknown url)"):"Http failure response for ".concat(Te.url||"(unknown url)",": ").concat(Te.status," ").concat(Te.statusText),we.error=Te.error||null,we}return ye}(Ae);function _t(He,ve){return{body:ve,headers:He.headers,context:He.context,observe:He.observe,params:He.params,reportProgress:He.reportProgress,responseType:He.responseType,withCredentials:He.withCredentials}}var yt=function(){var He=function(){function ve(ye){(0,R.Z)(this,ve),this.handler=ye}return(0,T.Z)(ve,[{key:"request",value:function(Te,we){var Yt,ct=this,ft=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Te instanceof le)Yt=Te;else{var Kt=void 0;Kt=ft.headers instanceof N?ft.headers:new N(ft.headers);var Jt=void 0;ft.params&&(Jt=ft.params instanceof K?ft.params:new K({fromObject:ft.params})),Yt=new le(Te,we,void 0!==ft.body?ft.body:null,{headers:Kt,context:ft.context,params:Jt,reportProgress:ft.reportProgress,responseType:ft.responseType||"json",withCredentials:ft.withCredentials})}var nn=(0,I.of)(Yt).pipe((0,k.b)(function(yn){return ct.handler.handle(yn)}));if(Te instanceof le||"events"===ft.observe)return nn;var ln=nn.pipe((0,M.h)(function(yn){return yn instanceof it}));switch(ft.observe||"body"){case"body":switch(Yt.responseType){case"arraybuffer":return ln.pipe((0,_.U)(function(yn){if(null!==yn.body&&!(yn.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return yn.body}));case"blob":return ln.pipe((0,_.U)(function(yn){if(null!==yn.body&&!(yn.body instanceof Blob))throw new Error("Response is not a Blob.");return yn.body}));case"text":return ln.pipe((0,_.U)(function(yn){if(null!==yn.body&&"string"!=typeof yn.body)throw new Error("Response is not a string.");return yn.body}));case"json":default:return ln.pipe((0,_.U)(function(yn){return yn.body}))}case"response":return ln;default:throw new Error("Unreachable: unhandled observe type ".concat(ft.observe,"}"))}}},{key:"delete",value:function(Te){var we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",Te,we)}},{key:"get",value:function(Te){var we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",Te,we)}},{key:"head",value:function(Te){var we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",Te,we)}},{key:"jsonp",value:function(Te,we){return this.request("JSONP",Te,{params:(new K).append(we,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(Te){var we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",Te,we)}},{key:"patch",value:function(Te,we){var ct=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",Te,_t(ct,we))}},{key:"post",value:function(Te,we){var ct=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",Te,_t(ct,we))}},{key:"put",value:function(Te,we){var ct=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",Te,_t(ct,we))}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)(v.LFG(g))},He.\u0275prov=v.Yz7({token:He,factory:He.\u0275fac}),He}(),Ft=function(){function He(ve,ye){(0,R.Z)(this,He),this.next=ve,this.interceptor=ye}return(0,T.Z)(He,[{key:"handle",value:function(ye){return this.interceptor.intercept(ye,this.next)}}]),He}(),xe=new v.OlP("HTTP_INTERCEPTORS"),De=function(){var He=function(){function ve(){(0,R.Z)(this,ve)}return(0,T.Z)(ve,[{key:"intercept",value:function(Te,we){return we.handle(Te)}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)},He.\u0275prov=v.Yz7({token:He,factory:He.\u0275fac}),He}(),Ht=/^\)\]\}',?\n/,qt=function(){var He=function(){function ve(ye){(0,R.Z)(this,ve),this.xhrFactory=ye}return(0,T.Z)(ve,[{key:"handle",value:function(Te){var we=this;if("JSONP"===Te.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new D.y(function(ct){var ft=we.xhrFactory.build();if(ft.open(Te.method,Te.urlWithParams),Te.withCredentials&&(ft.withCredentials=!0),Te.headers.forEach(function(Sn,tr){return ft.setRequestHeader(Sn,tr.join(","))}),Te.headers.has("Accept")||ft.setRequestHeader("Accept","application/json, text/plain, */*"),!Te.headers.has("Content-Type")){var Yt=Te.detectContentTypeHeader();null!==Yt&&ft.setRequestHeader("Content-Type",Yt)}if(Te.responseType){var Kt=Te.responseType.toLowerCase();ft.responseType="json"!==Kt?Kt:"text"}var Jt=Te.serializeBody(),nn=null,ln=function(){if(null!==nn)return nn;var tr=1223===ft.status?204:ft.status,cr=ft.statusText||"OK",Ut=new N(ft.getAllResponseHeaders()),Rt=function(He){return"responseURL"in He&&He.responseURL?He.responseURL:/^X-Request-URL:/m.test(He.getAllResponseHeaders())?He.getResponseHeader("X-Request-URL"):null}(ft)||Te.url;return nn=new be({headers:Ut,status:tr,statusText:cr,url:Rt})},yn=function(){var tr=ln(),cr=tr.headers,Ut=tr.status,Rt=tr.statusText,Lt=tr.url,Pe=null;204!==Ut&&(Pe=void 0===ft.response?ft.responseText:ft.response),0===Ut&&(Ut=Pe?200:0);var rt=Ut>=200&&Ut<300;if("json"===Te.responseType&&"string"==typeof Pe){var he=Pe;Pe=Pe.replace(Ht,"");try{Pe=""!==Pe?JSON.parse(Pe):null}catch(Ie){Pe=he,rt&&(rt=!1,Pe={error:Ie,text:Pe})}}rt?(ct.next(new it({body:Pe,headers:cr,status:Ut,statusText:Rt,url:Lt||void 0})),ct.complete()):ct.error(new qe({error:Pe,headers:cr,status:Ut,statusText:Rt,url:Lt||void 0}))},Tn=function(tr){var cr=ln(),Rt=new qe({error:tr,status:ft.status||0,statusText:ft.statusText||"Unknown Error",url:cr.url||void 0});ct.error(Rt)},Pn=!1,Yn=function(tr){Pn||(ct.next(ln()),Pn=!0);var cr={type:oe.DownloadProgress,loaded:tr.loaded};tr.lengthComputable&&(cr.total=tr.total),"text"===Te.responseType&&!!ft.responseText&&(cr.partialText=ft.responseText),ct.next(cr)},Cn=function(tr){var cr={type:oe.UploadProgress,loaded:tr.loaded};tr.lengthComputable&&(cr.total=tr.total),ct.next(cr)};return ft.addEventListener("load",yn),ft.addEventListener("error",Tn),ft.addEventListener("timeout",Tn),ft.addEventListener("abort",Tn),Te.reportProgress&&(ft.addEventListener("progress",Yn),null!==Jt&&ft.upload&&ft.upload.addEventListener("progress",Cn)),ft.send(Jt),ct.next({type:oe.Sent}),function(){ft.removeEventListener("error",Tn),ft.removeEventListener("abort",Tn),ft.removeEventListener("load",yn),ft.removeEventListener("timeout",Tn),Te.reportProgress&&(ft.removeEventListener("progress",Yn),null!==Jt&&ft.upload&&ft.upload.removeEventListener("progress",Cn)),ft.readyState!==ft.DONE&&ft.abort()}})}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)(v.LFG(b.JF))},He.\u0275prov=v.Yz7({token:He,factory:He.\u0275fac}),He}(),bt=new v.OlP("XSRF_COOKIE_NAME"),en=new v.OlP("XSRF_HEADER_NAME"),Nt=function He(){(0,R.Z)(this,He)},rn=function(){var He=function(){function ve(ye,Te,we){(0,R.Z)(this,ve),this.doc=ye,this.platform=Te,this.cookieName=we,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return(0,T.Z)(ve,[{key:"getToken",value:function(){if("server"===this.platform)return null;var Te=this.doc.cookie||"";return Te!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,b.Mx)(Te,this.cookieName),this.lastCookieString=Te),this.lastToken}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)(v.LFG(b.K0),v.LFG(v.Lbi),v.LFG(bt))},He.\u0275prov=v.Yz7({token:He,factory:He.\u0275fac}),He}(),En=function(){var He=function(){function ve(ye,Te){(0,R.Z)(this,ve),this.tokenService=ye,this.headerName=Te}return(0,T.Z)(ve,[{key:"intercept",value:function(Te,we){var ct=Te.url.toLowerCase();if("GET"===Te.method||"HEAD"===Te.method||ct.startsWith("http://")||ct.startsWith("https://"))return we.handle(Te);var ft=this.tokenService.getToken();return null!==ft&&!Te.headers.has(this.headerName)&&(Te=Te.clone({headers:Te.headers.set(this.headerName,ft)})),we.handle(Te)}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)(v.LFG(Nt),v.LFG(en))},He.\u0275prov=v.Yz7({token:He,factory:He.\u0275fac}),He}(),Zn=function(){var He=function(){function ve(ye,Te){(0,R.Z)(this,ve),this.backend=ye,this.injector=Te,this.chain=null}return(0,T.Z)(ve,[{key:"handle",value:function(Te){if(null===this.chain){var we=this.injector.get(xe,[]);this.chain=we.reduceRight(function(ct,ft){return new Ft(ct,ft)},this.backend)}return this.chain.handle(Te)}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)(v.LFG(E),v.LFG(v.zs3))},He.\u0275prov=v.Yz7({token:He,factory:He.\u0275fac}),He}(),Rn=function(){var He=function(){function ve(){(0,R.Z)(this,ve)}return(0,T.Z)(ve,null,[{key:"disable",value:function(){return{ngModule:ve,providers:[{provide:En,useClass:De}]}}},{key:"withOptions",value:function(){var Te=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:ve,providers:[Te.cookieName?{provide:bt,useValue:Te.cookieName}:[],Te.headerName?{provide:en,useValue:Te.headerName}:[]]}}}]),ve}();return He.\u0275fac=function(ye){return new(ye||He)},He.\u0275mod=v.oAB({type:He}),He.\u0275inj=v.cJS({providers:[En,{provide:xe,useExisting:En,multi:!0},{provide:Nt,useClass:rn},{provide:bt,useValue:"XSRF-TOKEN"},{provide:en,useValue:"X-XSRF-TOKEN"}]}),He}(),wn=function(){var He=function ve(){(0,R.Z)(this,ve)};return He.\u0275fac=function(ye){return new(ye||He)},He.\u0275mod=v.oAB({type:He}),He.\u0275inj=v.cJS({providers:[yt,{provide:g,useClass:Zn},qt,{provide:E,useExisting:qt}],imports:[[Rn.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),He}()},38999:function(ue,q,f){"use strict";f.d(q,{deG:function(){return yD},tb:function(){return fk},AFp:function(){return c_},ip1:function(){return Vu},CZH:function(){return kf},hGG:function(){return NR},z2F:function(){return Em},sBO:function(){return KI},Sil:function(){return Df},_Vd:function(){return Fg},EJc:function(){return BC},SBq:function(){return fu},a5r:function(){return bR},qLn:function(){return xc},vpe:function(){return vu},gxx:function(){return tf},tBr:function(){return bh},XFs:function(){return ft},OlP:function(){return Io},zs3:function(){return Za},ZZ4:function(){return Bg},aQg:function(){return Ug},soG:function(){return bm},YKP:function(){return X0},v3s:function(){return Dk},h0i:function(){return Uc},PXZ:function(){return JC},R0b:function(){return _u},FiY:function(){return Iu},Lbi:function(){return pk},g9A:function(){return Kd},n_E:function(){return Vc},Qsj:function(){return DB},FYo:function(){return Q0},JOm:function(){return Mh},Tiy:function(){return sE},q3G:function(){return Os},tp0:function(){return Ru},EAV:function(){return yR},Rgc:function(){return nm},dDg:function(){return Sk},DyG:function(){return ru},GfV:function(){return lE},s_b:function(){return _f},ifc:function(){return Cn},eFA:function(){return QC},G48:function(){return wk},Gpc:function(){return $},f3M:function(){return kD},X6Q:function(){return Tm},_c5:function(){return MR},VLi:function(){return cR},c2e:function(){return hk},zSh:function(){return Uh},wAp:function(){return Ig},vHH:function(){return le},EiD:function(){return Tc},mCW:function(){return Up},qzn:function(){return Al},JVY:function(){return ID},pB0:function(){return Jy},eBb:function(){return qv},L6k:function(){return RD},LAX:function(){return Sh},cg1:function(){return Lw},Tjo:function(){return ER},kL8:function(){return nI},yhl:function(){return OT},dqk:function(){return Rt},sIi:function(){return Pc},CqO:function(){return _0},QGY:function(){return Bc},F4k:function(){return rw},RDi:function(){return Ce},AaK:function(){return j},z3N:function(){return su},qOj:function(){return qh},TTD:function(){return ja},_Bn:function(){return LI},xp6:function(){return lO},uIk:function(){return t0},Q2q:function(){return xg},zWS:function(){return n0},Tol:function(){return k0},Gre:function(){return Pw},ekj:function(){return E0},Suo:function(){return JE},Xpm:function(){return Vr},lG2:function(){return wi},Yz7:function(){return In},cJS:function(){return Rn},oAB:function(){return _o},Yjl:function(){return to},Y36:function(){return Gh},_UZ:function(){return nw},GkF:function(){return v0},BQk:function(){return Yh},ynx:function(){return Gd},qZA:function(){return m0},TgZ:function(){return kg},EpF:function(){return g0},n5z:function(){return vh},Ikx:function(){return Nw},LFG:function(){return zo},$8M:function(){return Zy},NdJ:function(){return y0},CRH:function(){return QE},kcU:function(){return Au},O4$:function(){return dh},oxw:function(){return Jh},ALo:function(){return zi},lcZ:function(){return $i},xi3:function(){return $g},Hsn:function(){return lw},F$t:function(){return sw},Q6J:function(){return Eg},s9C:function(){return b0},MGl:function(){return hf},hYB:function(){return Dg},DdM:function(){return O3},VKq:function(){return UE},WLB:function(){return bC},iGM:function(){return YE},MAs:function(){return Bx},evT:function(){return Zd},Jf7:function(){return Il},CHM:function(){return Q},oJD:function(){return zp},Ckj:function(){return BD},LSH:function(){return rb},B6R:function(){return br},kYT:function(){return uo},Akn:function(){return Nl},Udp:function(){return w0},WFA:function(){return Mg},d8E:function(){return Zw},YNc:function(){return u0},W1O:function(){return i_},_uU:function(){return N0},Oqu:function(){return Z0},hij:function(){return Pg},AsE:function(){return L0},lnq:function(){return F0},Gf:function(){return xf}});var U=f(13920),B=f(89200),V=f(88009),Z=f(71955),b=(f(42515),f(99890),f(36683)),v=f(62467),I=f(99740),D=f(14105),k=f(18967),M=f(10509),_=f(97154),g=f(35470);function N(l){var c="function"==typeof Map?new Map:void 0;return(N=function(h){if(null===h||!function(l){return-1!==Function.toString.call(l).indexOf("[native code]")}(h))return h;if("function"!=typeof h)throw new TypeError("Super expression must either be null or a function");if(void 0!==c){if(c.has(h))return c.get(h);c.set(h,y)}function y(){return(0,I.Z)(h,arguments,(0,B.Z)(this).constructor)}return y.prototype=Object.create(h.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),(0,g.Z)(y,h)})(l)}var A=f(5051),w=f(68707),S=f(89797),O=f(55371),F=f(16338);function z(l){for(var c in l)if(l[c]===z)return c;throw Error("Could not find renamed property on target object.")}function K(l,c){for(var d in c)c.hasOwnProperty(d)&&!l.hasOwnProperty(d)&&(l[d]=c[d])}function j(l){if("string"==typeof l)return l;if(Array.isArray(l))return"["+l.map(j).join(", ")+"]";if(null==l)return""+l;if(l.overriddenName)return"".concat(l.overriddenName);if(l.name)return"".concat(l.name);var c=l.toString();if(null==c)return""+c;var d=c.indexOf("\n");return-1===d?c:c.substring(0,d)}function J(l,c){return null==l||""===l?null===c?"":c:null==c||""===c?l:l+" "+c}var ee=z({__forward_ref__:z});function $(l){return l.__forward_ref__=$,l.toString=function(){return j(this())},l}function ae(l){return se(l)?l():l}function se(l){return"function"==typeof l&&l.hasOwnProperty(ee)&&l.__forward_ref__===$}var le=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h,y){var x;return(0,k.Z)(this,d),(x=c.call(this,function(l,c){var d=l?"NG0".concat(l,": "):"";return"".concat(d).concat(c)}(h,y))).code=h,x}return d}(N(Error));function be(l){return"string"==typeof l?l:null==l?"":String(l)}function it(l){return"function"==typeof l?l.name||l.toString():"object"==typeof l&&null!=l&&"function"==typeof l.type?l.type.name||l.type.toString():be(l)}function Ft(l,c){var d=c?" in ".concat(c):"";throw new le("201","No provider for ".concat(it(l)," found").concat(d))}function en(l,c){null==l&&function(l,c,d,h){throw new Error("ASSERTION ERROR: ".concat(l)+(null==h?"":" [Expected=> ".concat(d," ").concat(h," ").concat(c," <=Actual]")))}(c,l,null,"!=")}function In(l){return{token:l.token,providedIn:l.providedIn||null,factory:l.factory,value:void 0}}function Rn(l){return{providers:l.providers||[],imports:l.imports||[]}}function wn(l){return yr(l,ye)||yr(l,we)}function yr(l,c){return l.hasOwnProperty(c)?l[c]:null}function ve(l){return l&&(l.hasOwnProperty(Te)||l.hasOwnProperty(ct))?l[Te]:null}var Yt,ye=z({"\u0275prov":z}),Te=z({"\u0275inj":z}),we=z({ngInjectableDef:z}),ct=z({ngInjectorDef:z}),ft=function(l){return l[l.Default=0]="Default",l[l.Host=1]="Host",l[l.Self=2]="Self",l[l.SkipSelf=4]="SkipSelf",l[l.Optional=8]="Optional",l}({});function Kt(){return Yt}function Jt(l){var c=Yt;return Yt=l,c}function nn(l,c,d){var h=wn(l);return h&&"root"==h.providedIn?void 0===h.value?h.value=h.factory():h.value:d&ft.Optional?null:void 0!==c?c:void Ft(j(l),"Injector")}function yn(l){return{toString:l}.toString()}var Tn=function(l){return l[l.OnPush=0]="OnPush",l[l.Default=1]="Default",l}({}),Cn=function(l){return l[l.Emulated=0]="Emulated",l[l.None=2]="None",l[l.ShadowDom=3]="ShadowDom",l}({}),Sn="undefined"!=typeof globalThis&&globalThis,tr="undefined"!=typeof window&&window,cr="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ut="undefined"!=typeof global&&global,Rt=Sn||Ut||tr||cr,rt={},he=[],Ie=z({"\u0275cmp":z}),Ne=z({"\u0275dir":z}),Le=z({"\u0275pipe":z}),ze=z({"\u0275mod":z}),At=z({"\u0275loc":z}),an=z({"\u0275fac":z}),qn=z({__NG_ELEMENT_ID__:z}),Nr=0;function Vr(l){return yn(function(){var d={},h={type:l.type,providersResolver:null,decls:l.decls,vars:l.vars,factory:null,template:l.template||null,consts:l.consts||null,ngContentSelectors:l.ngContentSelectors,hostBindings:l.hostBindings||null,hostVars:l.hostVars||0,hostAttrs:l.hostAttrs||null,contentQueries:l.contentQueries||null,declaredInputs:d,inputs:null,outputs:null,exportAs:l.exportAs||null,onPush:l.changeDetection===Tn.OnPush,directiveDefs:null,pipeDefs:null,selectors:l.selectors||he,viewQuery:l.viewQuery||null,features:l.features||null,data:l.data||{},encapsulation:l.encapsulation||Cn.Emulated,id:"c",styles:l.styles||he,_:null,setInput:null,schemas:l.schemas||null,tView:null},y=l.directives,x=l.features,H=l.pipes;return h.id+=Nr++,h.inputs=Jo(l.inputs,d),h.outputs=Jo(l.outputs),x&&x.forEach(function(W){return W(h)}),h.directiveDefs=y?function(){return("function"==typeof y?y():y).map(Jr)}:null,h.pipeDefs=H?function(){return("function"==typeof H?H():H).map(lo)}:null,h})}function br(l,c,d){var h=l.\u0275cmp;h.directiveDefs=function(){return c.map(Jr)},h.pipeDefs=function(){return d.map(lo)}}function Jr(l){return bi(l)||function(l){return l[Ne]||null}(l)}function lo(l){return function(l){return l[Le]||null}(l)}var Ri={};function _o(l){return yn(function(){var c={type:l.type,bootstrap:l.bootstrap||he,declarations:l.declarations||he,imports:l.imports||he,exports:l.exports||he,transitiveCompileScopes:null,schemas:l.schemas||null,id:l.id||null};return null!=l.id&&(Ri[l.id]=l.type),c})}function uo(l,c){return yn(function(){var d=pi(l,!0);d.declarations=c.declarations||he,d.imports=c.imports||he,d.exports=c.exports||he})}function Jo(l,c){if(null==l)return rt;var d={};for(var h in l)if(l.hasOwnProperty(h)){var y=l[h],x=y;Array.isArray(y)&&(x=y[1],y=y[0]),d[y]=h,c&&(c[y]=x)}return d}var wi=Vr;function to(l){return{type:l.type,name:l.name,factory:null,pure:!1!==l.pure,onDestroy:l.type.prototype.ngOnDestroy||null}}function bi(l){return l[Ie]||null}function pi(l,c){var d=l[ze]||null;if(!d&&!0===c)throw new Error("Type ".concat(j(l)," does not have '\u0275mod' property."));return d}function fr(l){return Array.isArray(l)&&"object"==typeof l[1]}function po(l){return Array.isArray(l)&&!0===l[1]}function ha(l){return 0!=(8&l.flags)}function Ti(l){return 2==(2&l.flags)}function bo(l){return 1==(1&l.flags)}function Ni(l){return null!==l.template}function ma(l){return 0!=(512&l[2])}function Ka(l,c){return l.hasOwnProperty(an)?l[an]:null}var Qi=function(){function l(c,d,h){(0,k.Z)(this,l),this.previousValue=c,this.currentValue=d,this.firstChange=h}return(0,D.Z)(l,[{key:"isFirstChange",value:function(){return this.firstChange}}]),l}();function ja(){return _l}function _l(l){return l.type.prototype.ngOnChanges&&(l.setInput=eu),tn}function tn(){var l=bl(this),c=null==l?void 0:l.current;if(c){var d=l.previous;if(d===rt)l.previous=c;else for(var h in c)d[h]=c[h];l.current=null,this.ngOnChanges(c)}}function eu(l,c,d,h){var y=bl(l)||function(l,c){return l[yl]=c}(l,{previous:rt,current:null}),x=y.current||(y.current={}),H=y.previous,W=this.declaredInputs[d],X=H[W];x[W]=new Qi(X&&X.currentValue,c,H===rt),l[h]=c}ja.ngInherit=!0;var yl="__ngSimpleChanges__";function bl(l){return l[yl]||null}var ie="http://www.w3.org/2000/svg",_e=void 0;function Ce(l){_e=l}function Re(){return void 0!==_e?_e:"undefined"!=typeof document?document:void 0}function St(l){return!!l.listen}var gt={createRenderer:function(c,d){return Re()}};function qr(l){for(;Array.isArray(l);)l=l[0];return l}function si(l,c){return qr(c[l])}function Pi(l,c){return qr(c[l.index])}function Oa(l,c){return l.data[c]}function Xa(l,c){return l[c]}function ba(l,c){var d=c[l];return fr(d)?d:d[0]}function ks(l){return 4==(4&l[2])}function Tp(l){return 128==(128&l[2])}function Js(l,c){return null==c?null:l[c]}function cc(l){l[18]=0}function Sl(l,c){l[5]+=c;for(var d=l,h=l[3];null!==h&&(1===c&&1===d[5]||-1===c&&0===d[5]);)h[5]+=c,d=h,h=h[3]}var Ar={lFrame:bn(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function gd(){return Ar.bindingsEnabled}function Se(){return Ar.lFrame.lView}function ge(){return Ar.lFrame.tView}function Q(l){return Ar.lFrame.contextLView=l,l[8]}function ne(){for(var l=ke();null!==l&&64===l.type;)l=l.parent;return l}function ke(){return Ar.lFrame.currentTNode}function lt(l,c){var d=Ar.lFrame;d.currentTNode=l,d.isParent=c}function wt(){return Ar.lFrame.isParent}function Zt(){Ar.lFrame.isParent=!1}function An(){return Ar.isInCheckNoChangesMode}function Un(l){Ar.isInCheckNoChangesMode=l}function Qn(){var l=Ar.lFrame,c=l.bindingRootIndex;return-1===c&&(c=l.bindingRootIndex=l.tView.bindingStartIndex),c}function hr(){return Ar.lFrame.bindingIndex}function Cr(){return Ar.lFrame.bindingIndex++}function kr(l){var c=Ar.lFrame,d=c.bindingIndex;return c.bindingIndex=c.bindingIndex+l,d}function ii(l,c){var d=Ar.lFrame;d.bindingIndex=d.bindingRootIndex=l,Be(c)}function Be(l){Ar.lFrame.currentDirectiveIndex=l}function Ye(l){var c=Ar.lFrame.currentDirectiveIndex;return-1===c?null:l[c]}function Ee(){return Ar.lFrame.currentQueryIndex}function Ue(l){Ar.lFrame.currentQueryIndex=l}function Ze(l){var c=l[1];return 2===c.type?c.declTNode:1===c.type?l[6]:null}function nt(l,c,d){if(d&ft.SkipSelf){for(var h=c,y=l;!(null!==(h=h.parent)||d&ft.Host||null===(h=Ze(y))||(y=y[15],10&h.type)););if(null===h)return!1;c=h,l=y}var x=Ar.lFrame=sn();return x.currentTNode=c,x.lView=l,!0}function Tt(l){var c=sn(),d=l[1];Ar.lFrame=c,c.currentTNode=d.firstChild,c.lView=l,c.tView=d,c.contextLView=l,c.bindingIndex=d.bindingStartIndex,c.inI18n=!1}function sn(){var l=Ar.lFrame,c=null===l?null:l.child;return null===c?bn(l):c}function bn(l){var c={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:l,child:null,inI18n:!1};return null!==l&&(l.child=c),c}function xr(){var l=Ar.lFrame;return Ar.lFrame=l.parent,l.currentTNode=null,l.lView=null,l}var Ii=xr;function Ko(){var l=xr();l.isParent=!0,l.tView=null,l.selectedIndex=-1,l.contextLView=null,l.elementDepthCount=0,l.currentDirectiveIndex=-1,l.currentNamespace=null,l.bindingRootIndex=-1,l.bindingIndex=-1,l.currentQueryIndex=0}function Pa(l){return(Ar.lFrame.contextLView=function(l,c){for(;l>0;)c=c[15],l--;return c}(l,Ar.lFrame.contextLView))[8]}function Mo(){return Ar.lFrame.selectedIndex}function ms(l){Ar.lFrame.selectedIndex=l}function fo(){var l=Ar.lFrame;return Oa(l.tView,l.selectedIndex)}function dh(){Ar.lFrame.currentNamespace=ie}function Au(){Ar.lFrame.currentNamespace=null}function qo(l,c){for(var d=c.directiveStart,h=c.directiveEnd;d=h)break}else c[X]<0&&(l[18]+=65536),(W>11>16&&(3&l[2])===c){l[2]+=2048;try{x.call(W)}finally{}}}else try{x.call(W)}finally{}}var Ki=function l(c,d,h){(0,k.Z)(this,l),this.factory=c,this.resolving=!1,this.canSeeViewProviders=d,this.injectImpl=h};function Ks(l,c,d){for(var h=St(l),y=0;yc){H=x-1;break}}}for(;x>16}(l),h=c;d>0;)h=h[15],d--;return h}var lT=!0;function Py(l){var c=lT;return lT=l,c}var AF=0;function hh(l,c){var d=cT(l,c);if(-1!==d)return d;var h=c[1];h.firstCreatePass&&(l.injectorIndex=c.length,uT(h.data,l),uT(c,null),uT(h.blueprint,null));var y=Iy(l,c),x=l.injectorIndex;if(hD(y))for(var H=fh(y),W=Op(y,c),X=W[1].data,me=0;me<8;me++)c[x+me]=W[H+me]|X[H+me];return c[x+8]=y,x}function uT(l,c){l.push(0,0,0,0,0,0,0,0,c)}function cT(l,c){return-1===l.injectorIndex||l.parent&&l.parent.injectorIndex===l.injectorIndex||null===c[l.injectorIndex+8]?-1:l.injectorIndex}function Iy(l,c){if(l.parent&&-1!==l.parent.injectorIndex)return l.parent.injectorIndex;for(var d=0,h=null,y=c;null!==y;){var x=y[1],H=x.type;if(null===(h=2===H?x.declTNode:1===H?y[6]:null))return-1;if(d++,y=y[15],-1!==h.injectorIndex)return h.injectorIndex|d<<16}return-1}function Av(l,c,d){!function(l,c,d){var h;"string"==typeof d?h=d.charCodeAt(0)||0:d.hasOwnProperty(qn)&&(h=d[qn]),null==h&&(h=d[qn]=AF++);var y=255&h;c.data[l+(y>>5)]|=1<3&&void 0!==arguments[3]?arguments[3]:ft.Default,y=arguments.length>4?arguments[4]:void 0;if(null!==l){var x=Ov(d);if("function"==typeof x){if(!nt(c,l,h))return h&ft.Host?dT(y,d,h):Ry(c,d,h,y);try{var H=x(h);if(null!=H||h&ft.Optional)return H;Ft(d)}finally{Ii()}}else if("number"==typeof x){var W=null,X=cT(l,c),me=-1,Oe=h&ft.Host?c[16][6]:null;for((-1===X||h&ft.SkipSelf)&&(-1!==(me=-1===X?Iy(l,c):c[X+8])&&mT(h,!1)?(W=c[1],X=fh(me),c=Op(me,c)):X=-1);-1!==X;){var Xe=c[1];if(hT(x,X,Xe.data)){var Ke=fT(X,c,d,W,h,Oe);if(Ke!==pT)return Ke}-1!==(me=c[X+8])&&mT(h,c[1].data[X+8]===Oe)&&hT(x,X,c)?(W=Xe,X=fh(me),c=Op(me,c)):X=-1}}}return Ry(c,d,h,y)}var pT={};function _D(){return new bd(ne(),Se())}function fT(l,c,d,h,y,x){var H=c[1],W=H.data[l+8],Oe=mh(W,H,d,null==h?Ti(W)&&lT:h!=H&&0!=(3&W.type),y&ft.Host&&x===W);return null!==Oe?Ou(c,H,Oe,W):pT}function mh(l,c,d,h,y){for(var x=l.providerIndexes,H=c.data,W=1048575&x,X=l.directiveStart,Oe=x>>20,Ke=y?W+Oe:l.directiveEnd,mt=h?W:W+Oe;mt=X&&Mt.type===d)return mt}if(y){var zt=H[X];if(zt&&Ni(zt)&&zt.type===d)return X}return null}function Ou(l,c,d,h){var y=l[d],x=c.data;if(function(l){return l instanceof Ki}(y)){var H=y;H.resolving&&function(l,c){throw new le("200","Circular dependency in DI detected for ".concat(l).concat(""))}(it(x[d]));var W=Py(H.canSeeViewProviders);H.resolving=!0;var X=H.injectImpl?Jt(H.injectImpl):null;nt(l,h,ft.Default);try{y=l[d]=H.factory(void 0,x,l,h),c.firstCreatePass&&d>=h.directiveStart&&function(l,c,d){var h=c.type.prototype,x=h.ngOnInit,H=h.ngDoCheck;if(h.ngOnChanges){var W=_l(c);(d.preOrderHooks||(d.preOrderHooks=[])).push(l,W),(d.preOrderCheckHooks||(d.preOrderCheckHooks=[])).push(l,W)}x&&(d.preOrderHooks||(d.preOrderHooks=[])).push(0-l,x),H&&((d.preOrderHooks||(d.preOrderHooks=[])).push(l,H),(d.preOrderCheckHooks||(d.preOrderCheckHooks=[])).push(l,H))}(d,x[d],c)}finally{null!==X&&Jt(X),Py(W),H.resolving=!1,Ii()}}return y}function Ov(l){if("string"==typeof l)return l.charCodeAt(0)||0;var c=l.hasOwnProperty(qn)?l[qn]:void 0;return"number"==typeof c?c>=0?255&c:_D:c}function hT(l,c,d){return!!(d[c+(l>>5)]&1<=l.length?l.push(d):l.splice(c,0,d)}function xd(l,c){return c>=l.length-1?l.pop():l.splice(c,1)[0]}function vc(l,c){for(var d=[],h=0;h=0?l[1|h]=d:function(l,c,d,h){var y=l.length;if(y==c)l.push(d,h);else if(1===y)l.push(h,l[0]),l[0]=d;else{for(y--,l.push(l[y-1],l[y]);y>c;)l[y]=l[y-2],y--;l[c]=d,l[c+1]=h}}(l,h=~h,c,d),h}function _h(l,c){var d=wd(l,c);if(d>=0)return l[1|d]}function wd(l,c){return function(l,c,d){for(var h=0,y=l.length>>d;y!==h;){var x=h+(y-h>>1),H=l[x<c?y=x:h=x+1}return~(y<1&&void 0!==arguments[1]?arguments[1]:ft.Default;if(void 0===Rp)throw new Error("inject() must be called from an injection context");return null===Rp?nn(l,void 0,c):Rp.get(l,c&ft.Optional?null:void 0,c)}function zo(l){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft.Default;return(Kt()||ED)(ae(l),c)}var kD=zo;function Ad(l){for(var c=[],d=0;d3&&void 0!==arguments[3]?arguments[3]:null;l=l&&"\n"===l.charAt(0)&&"\u0275"==l.charAt(1)?l.substr(2):l;var y=j(c);if(Array.isArray(c))y=c.map(j).join(" -> ");else if("object"==typeof c){var x=[];for(var H in c)if(c.hasOwnProperty(H)){var W=c[H];x.push(H+":"+("string"==typeof W?JSON.stringify(W):j(W)))}y="{".concat(x.join(", "),"}")}return"".concat(d).concat(h?"("+h+")":"","[").concat(y,"]: ").concat(l.replace(wl,"\n "))}("\n"+l.message,y,d,h),l.ngTokenPath=y,l[kd]=null,l}var gc,Pd,bh=Np(hc("Inject",function(c){return{token:c}}),-1),Iu=Np(hc("Optional"),8),Ru=Np(hc("SkipSelf"),4);function Ml(l){var c;return(null===(c=function(){if(void 0===gc&&(gc=null,Rt.trustedTypes))try{gc=Rt.trustedTypes.createPolicy("angular",{createHTML:function(c){return c},createScript:function(c){return c},createScriptURL:function(c){return c}})}catch(l){}return gc}())||void 0===c?void 0:c.createHTML(l))||l}function ou(l){var c;return(null===(c=function(){if(void 0===Pd&&(Pd=null,Rt.trustedTypes))try{Pd=Rt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:function(c){return c},createScript:function(c){return c},createScriptURL:function(c){return c}})}catch(l){}return Pd}())||void 0===c?void 0:c.createHTML(l))||l}var Xs=function(){function l(c){(0,k.Z)(this,l),this.changingThisBreaksApplicationSecurity=c}return(0,D.Z)(l,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see https://g.co/ng/security#xss)"}}]),l}(),Fp=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return(0,D.Z)(d,[{key:"getTypeName",value:function(){return"HTML"}}]),d}(Xs),bc=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return(0,D.Z)(d,[{key:"getTypeName",value:function(){return"Style"}}]),d}(Xs),DT=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return(0,D.Z)(d,[{key:"getTypeName",value:function(){return"Script"}}]),d}(Xs),Yy=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return(0,D.Z)(d,[{key:"getTypeName",value:function(){return"URL"}}]),d}(Xs),PD=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return(0,D.Z)(d,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),d}(Xs);function su(l){return l instanceof Xs?l.changingThisBreaksApplicationSecurity:l}function Al(l,c){var d=OT(l);if(null!=d&&d!==c){if("ResourceURL"===d&&"URL"===c)return!0;throw new Error("Required a safe ".concat(c,", got a ").concat(d," (see https://g.co/ng/security#xss)"))}return d===c}function OT(l){return l instanceof Xs&&l.getTypeName()||null}function ID(l){return new Fp(l)}function RD(l){return new bc(l)}function qv(l){return new DT(l)}function Sh(l){return new Yy(l)}function Jy(l){return new PD(l)}var ND=function(){function l(c){(0,k.Z)(this,l),this.inertDocumentHelper=c}return(0,D.Z)(l,[{key:"getInertBodyElement",value:function(d){d=""+d;try{var h=(new window.DOMParser).parseFromString(Ml(d),"text/html").body;return null===h?this.inertDocumentHelper.getInertBodyElement(d):(h.removeChild(h.firstChild),h)}catch(y){return null}}}]),l}(),Qy=function(){function l(c){if((0,k.Z)(this,l),this.defaultDoc=c,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var d=this.inertDocument.createElement("html");this.inertDocument.appendChild(d);var h=this.inertDocument.createElement("body");d.appendChild(h)}}return(0,D.Z)(l,[{key:"getInertBodyElement",value:function(d){var h=this.inertDocument.createElement("template");if("content"in h)return h.innerHTML=Ml(d),h;var y=this.inertDocument.createElement("body");return y.innerHTML=Ml(d),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(y),y}},{key:"stripCustomNsAttrs",value:function(d){for(var h=d.attributes,y=h.length-1;0"),!0}},{key:"endElement",value:function(d){var h=d.nodeName.toLowerCase();jv.hasOwnProperty(h)&&!$y.hasOwnProperty(h)&&(this.buf.push(""),this.buf.push(h),this.buf.push(">"))}},{key:"chars",value:function(d){this.buf.push(nb(d))}},{key:"checkClobberedElement",value:function(d,h){if(h&&(d.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(d.outerHTML));return h}}]),l}(),FD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NT=/([^\#-~ |!])/g;function nb(l){return l.replace(/&/g,"&").replace(FD,function(c){return""+(1024*(c.charCodeAt(0)-55296)+(c.charCodeAt(1)-56320)+65536)+";"}).replace(NT,function(c){return""+c.charCodeAt(0)+";"}).replace(//g,">")}function Tc(l,c){var d=null;try{qp=qp||function(l){var c=new Qy(l);return function(){try{return!!(new window.DOMParser).parseFromString(Ml(""),"text/html")}catch(l){return!1}}()?new ND(c):c}(l);var h=c?String(c):"";d=qp.getInertBodyElement(h);var y=5,x=h;do{if(0===y)throw new Error("Failed to sanitize html because the input is unstable");y--,h=x,x=d.innerHTML,d=qp.getInertBodyElement(h)}while(h!==x);return Ml((new tb).sanitizeChildren(jp(d)||d))}finally{if(d)for(var X=jp(d)||d;X.firstChild;)X.removeChild(X.firstChild)}}function jp(l){return"content"in l&&function(l){return l.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===l.nodeName}(l)?l.content:null}var Os=function(l){return l[l.NONE=0]="NONE",l[l.HTML=1]="HTML",l[l.STYLE=2]="STYLE",l[l.SCRIPT=3]="SCRIPT",l[l.URL=4]="URL",l[l.RESOURCE_URL=5]="RESOURCE_URL",l}({});function zp(l){var c=Ol();return c?ou(c.sanitize(Os.HTML,l)||""):Al(l,"HTML")?ou(su(l)):Tc(Re(),be(l))}function BD(l){var c=Ol();return c?c.sanitize(Os.STYLE,l)||"":Al(l,"Style")?su(l):be(l)}function rb(l){var c=Ol();return c?c.sanitize(Os.URL,l)||"":Al(l,"URL")?su(l):Up(be(l))}function Ol(){var l=Se();return l&&l[12]}var FT="__ngContext__";function Wa(l,c){l[FT]=c}function ob(l){var c=function(l){return l[FT]||null}(l);return c?Array.isArray(c)?c:c.lView:null}function wh(l){return l.ngOriginalError}function Eh(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h0&&(l[d-1][4]=h[4]);var x=xd(l,10+c);!function(l,c){Ih(l,c,c[11],2,null,null),c[0]=null,c[6]=null}(h[1],h);var H=x[19];null!==H&&H.detachView(x[1]),h[3]=null,h[4]=null,h[2]&=-129}return h}}function Cb(l,c){if(!(256&c[2])){var d=c[11];St(d)&&d.destroyNode&&Ih(l,c,d,3,null,null),function(l){var c=l[13];if(!c)return Sb(l[1],l);for(;c;){var d=null;if(fr(c))d=c[13];else{var h=c[10];h&&(d=h)}if(!d){for(;c&&!c[4]&&c!==l;)fr(c)&&Sb(c[1],c),c=c[3];null===c&&(c=l),fr(c)&&Sb(c[1],c),d=c&&c[4]}c=d}}(c)}}function Sb(l,c){if(!(256&c[2])){c[2]&=-129,c[2]|=256,function(l,c){var d;if(null!=l&&null!=(d=l.destroyHooks))for(var h=0;h=0?h[y=me]():h[y=-me].unsubscribe(),x+=2}else{var Oe=h[y=d[x+1]];d[x].call(Oe)}if(null!==h){for(var Xe=y+1;Xex?"":y[Xe+1].toLowerCase();var mt=8&h?Ke:null;if(mt&&-1!==Ud(mt,me,0)||2&h&&me!==Ke){if(Ns(h))return!1;H=!0}}}}else{if(!H&&!Ns(h)&&!Ns(X))return!1;if(H&&Ns(X))continue;H=!1,h=X|1&h}}return Ns(h)||H}function Ns(l){return 0==(1&l)}function nO(l,c,d,h){if(null===c)return-1;var y=0;if(h||!d){for(var x=!1;y-1)for(d++;d2&&void 0!==arguments[2]&&arguments[2],h=0;h0?'="'+W+'"':"")+"]"}else 8&h?y+="."+H:4&h&&(y+=" "+H);else""!==y&&!Ns(H)&&(c+=Db(x,y),y=""),h=H,x=x||!Ns(h);d++}return""!==y&&(c+=Db(x,y)),c}var Br={};function lO(l){uO(ge(),Se(),Mo()+l,An())}function uO(l,c,d,h){if(!h)if(3==(3&c[2])){var x=l.preOrderCheckHooks;null!==x&&Du(c,x,d)}else{var H=l.preOrderHooks;null!==H&&pc(c,H,0,d)}ms(d)}function Ob(l,c){return l<<17|c<<2}function uu(l){return l>>17&32767}function Pb(l){return 2|l}function is(l){return(131068&l)>>2}function nx(l,c){return-131069&l|c<<2}function rx(l){return 1|l}function lx(l,c){var d=l.contentQueries;if(null!==d)for(var h=0;h20&&uO(l,c,20,An()),d(h,y)}finally{ms(x)}}function cx(l,c,d){if(ha(c))for(var y=c.directiveEnd,x=c.directiveStart;x2&&void 0!==arguments[2]?arguments[2]:Pi,h=c.localNames;if(null!==h)for(var y=c.index+1,x=0;x0;){var d=l[--c];if("number"==typeof d&&d<0)return d}return 0})(W)!=X&&W.push(X),W.push(h,y,H)}}function kO(l,c){null!==l.hostBindings&&l.hostBindings(1,c)}function AO(l,c){c.flags|=2,(l.components||(l.components=[])).push(c.index)}function t5(l,c,d){if(d){if(c.exportAs)for(var h=0;h0&&mx(d)}}function mx(l){for(var c=_b(l);null!==c;c=Xv(c))for(var d=10;d0&&mx(h)}var H=l[1].components;if(null!==H)for(var W=0;W0&&mx(X)}}function o5(l,c){var d=ba(c,l),h=d[1];(function(l,c){for(var d=c.length;d1&&void 0!==arguments[1]?arguments[1]:yh;if(h===yh){var y=new Error("NullInjectorError: No provider for ".concat(j(d),"!"));throw y.name="NullInjectorError",y}return h}}]),l}(),Uh=new Io("Set Injector scope."),Vd={},Yb={},pu=void 0;function xx(){return void 0===pu&&(pu=new Tx),pu}function wx(l){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,h=arguments.length>3?arguments[3]:void 0;return new jO(l,d,c||xx(),h)}var jO=function(){function l(c,d,h){var y=this,x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;(0,k.Z)(this,l),this.parent=h,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var H=[];d&&Ds(d,function(X){return y.processProvider(X,c,d)}),Ds([c],function(X){return y.processInjectorType(X,[],H)}),this.records.set(tf,nf(void 0,this));var W=this.records.get(Uh);this.scope=null!=W?W.value:null,this.source=x||("object"==typeof c?null:j(c))}return(0,D.Z)(l,[{key:"destroyed",get:function(){return this._destroyed}},{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(d){return d.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(d){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yh,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ft.Default;this.assertNotDestroyed();var x=Bv(this),H=Jt(void 0);try{if(!(y&ft.SkipSelf)){var W=this.records.get(d);if(void 0===W){var X=d5(d)&&wn(d);W=X&&this.injectableDefInScope(X)?nf(Jb(d),Vd):null,this.records.set(d,W)}if(null!=W)return this.hydrate(d,W)}var me=y&ft.Self?xx():this.parent;return me.get(d,h=y&ft.Optional&&h===yh?null:h)}catch(Xe){if("NullInjectorError"===Xe.name){var Oe=Xe[kd]=Xe[kd]||[];if(Oe.unshift(j(d)),x)throw Xe;return wT(Xe,d,"R3InjectorError",this.source)}throw Xe}finally{Jt(H),Bv(x)}}},{key:"_resolveInjectorDefTypes",value:function(){var d=this;this.injectorDefTypes.forEach(function(h){return d.get(h)})}},{key:"toString",value:function(){var d=[];return this.records.forEach(function(y,x){return d.push(j(x))}),"R3Injector[".concat(d.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(d,h,y){var x=this;if(!(d=ae(d)))return!1;var H=ve(d),W=null==H&&d.ngModule||void 0,X=void 0===W?d:W,Xe=-1!==y.indexOf(X);if(void 0!==W&&(H=ve(W)),null==H)return!1;if(null!=H.imports&&!Xe){var Ke;y.push(X);try{Ds(H.imports,function(_n){x.processInjectorType(_n,h,y)&&(void 0===Ke&&(Ke=[]),Ke.push(_n))})}finally{}if(void 0!==Ke)for(var mt=function(Kn){var lr=Ke[Kn],zr=lr.ngModule,Mi=lr.providers;Ds(Mi,function(vo){return x.processProvider(vo,zr,Mi||he)})},Mt=0;Mt0){var d=vc(c,"?");throw new Error("Can't resolve all parameters for ".concat(j(l),": (").concat(d.join(", "),")."))}var h=function(l){var c=l&&(l[ye]||l[we]);if(c){var d=function(l){if(l.hasOwnProperty("name"))return l.name;var c=(""+l).match(/^function\s*([^\s(]+)/);return null===c?"":c[1]}(l);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(d,'" that inherits its @Injectable decorator but does not provide one itself.\n')+'This will become an error in a future version of Angular. Please add @Injectable() to the "'.concat(d,'" class.')),c}return null}(l);return null!==h?function(){return h.factory(l)}:function(){return new l}}(l);throw new Error("unreachable")}function Ex(l,c,d){var h=void 0;if(rf(l)){var y=ae(l);return Ka(y)||Jb(y)}if(yg(l))h=function(){return ae(l.useValue)};else if(function(l){return!(!l||!l.useFactory)}(l))h=function(){return l.useFactory.apply(l,(0,v.Z)(Ad(l.deps||[])))};else if(function(l){return!(!l||!l.useExisting)}(l))h=function(){return zo(ae(l.useExisting))};else{var x=ae(l&&(l.useClass||l.provide));if(!function(l){return!!l.deps}(l))return Ka(x)||Jb(x);h=function(){return(0,I.Z)(x,(0,v.Z)(Ad(l.deps)))}}return h}function nf(l,c){var d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:l,value:c,multi:d?[]:void 0}}function yg(l){return null!==l&&"object"==typeof l&&Fv in l}function rf(l){return"function"==typeof l}function d5(l){return"function"==typeof l||"object"==typeof l&&l instanceof Io}var YO=function(l,c,d){return function(l){var y=wx(l,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0);return y._resolveInjectorDefTypes(),y}({name:d},c,l,d)},Za=function(){var l=function(){function c(){(0,k.Z)(this,c)}return(0,D.Z)(c,null,[{key:"create",value:function(h,y){return Array.isArray(h)?YO(h,y,""):YO(h.providers,h.parent,h.name||"")}}]),c}();return l.THROW_IF_NOT_FOUND=yh,l.NULL=new Tx,l.\u0275prov=In({token:l,providedIn:"any",factory:function(){return zo(tf)}}),l.__NG_ELEMENT_ID__=-1,l}();function aP(l,c){qo(ob(l)[1],ne())}function qh(l){for(var c=function(l){return Object.getPrototypeOf(l.prototype).constructor}(l.type),d=!0,h=[l];c;){var y=void 0;if(Ni(l))y=c.\u0275cmp||c.\u0275dir;else{if(c.\u0275cmp)throw new Error("Directives cannot inherit Components");y=c.\u0275dir}if(y){if(d){h.push(y);var x=l;x.inputs=jh(l.inputs),x.declaredInputs=jh(l.declaredInputs),x.outputs=jh(l.outputs);var H=y.hostBindings;H&&lP(l,H);var W=y.viewQuery,X=y.contentQueries;if(W&&sP(l,W),X&&$b(l,X),K(l.inputs,y.inputs),K(l.declaredInputs,y.declaredInputs),K(l.outputs,y.outputs),Ni(y)&&y.data.animation){var me=l.data;me.animation=(me.animation||[]).concat(y.data.animation)}}var Oe=y.features;if(Oe)for(var Xe=0;Xe=0;h--){var y=l[h];y.hostVars=c+=y.hostVars,y.hostAttrs=Oy(y.hostAttrs,d=Oy(d,y.hostAttrs))}}(h)}function jh(l){return l===rt?{}:l===he?[]:l}function sP(l,c){var d=l.viewQuery;l.viewQuery=d?function(h,y){c(h,y),d(h,y)}:c}function $b(l,c){var d=l.contentQueries;l.contentQueries=d?function(h,y,x){c(h,y,x),d(h,y,x)}:c}function lP(l,c){var d=l.hostBindings;l.hostBindings=d?function(h,y){c(h,y),d(h,y)}:c}var Sg=null;function of(){if(!Sg){var l=Rt.Symbol;if(l&&l.iterator)Sg=l.iterator;else for(var c=Object.getOwnPropertyNames(Map.prototype),d=0;d1&&void 0!==arguments[1]?arguments[1]:ft.Default,d=Se();if(null===d)return zo(l,c);var h=ne();return Dv(h,d,ae(l),c)}function Eg(l,c,d){var h=Se();return aa(h,Cr(),c)&&Ls(ge(),fo(),h,l,c,h[11],d,!1),Eg}function h0(l,c,d,h,y){var H=y?"class":"style";Sx(l,d,c.inputs[H],H,h)}function kg(l,c,d,h){var y=Se(),x=ge(),H=20+l,W=y[11],X=y[H]=yb(W,c,Ar.lFrame.currentNamespace),me=x.firstCreatePass?function(l,c,d,h,y,x,H){var W=c.consts,me=$p(c,l,2,y,Js(W,x));return vg(c,d,me,Js(W,H)),null!==me.attrs&&_g(me,me.attrs,!1),null!==me.mergedAttrs&&_g(me,me.mergedAttrs,!0),null!==c.queries&&c.queries.elementStart(c,me),me}(H,x,y,0,c,d,h):x.data[H];lt(me,!0);var Oe=me.mergedAttrs;null!==Oe&&Ks(W,X,Oe);var Xe=me.classes;null!==Xe&&Mb(W,X,Xe);var Ke=me.styles;null!==Ke&&kb(W,X,Ke),64!=(64&me.flags)&&ig(x,y,X,me),0===Ar.lFrame.elementDepthCount&&Wa(X,y),Ar.lFrame.elementDepthCount++,bo(me)&&(Bh(x,y,me),cx(x,me,y)),null!==h&&Rl(y,me)}function m0(){var l=ne();wt()?Zt():lt(l=l.parent,!1);var c=l;Ar.lFrame.elementDepthCount--;var d=ge();d.firstCreatePass&&(qo(d,l),ha(l)&&d.queries.elementEnd(l)),null!=c.classesWithoutHost&&function(l){return 0!=(16&l.flags)}(c)&&h0(d,c,Se(),c.classesWithoutHost,!0),null!=c.stylesWithoutHost&&function(l){return 0!=(32&l.flags)}(c)&&h0(d,c,Se(),c.stylesWithoutHost,!1)}function nw(l,c,d,h){kg(l,c,d,h),m0()}function Gd(l,c,d){var h=Se(),y=ge(),x=l+20,H=y.firstCreatePass?function(l,c,d,h,y){var x=c.consts,H=Js(x,h),W=$p(c,l,8,"ng-container",H);return null!==H&&_g(W,H,!0),vg(c,d,W,Js(x,y)),null!==c.queries&&c.queries.elementStart(c,W),W}(x,y,h,c,d):y.data[x];lt(H,!0);var W=h[x]=h[11].createComment("");ig(y,h,W,H),Wa(W,h),bo(H)&&(Bh(y,h,H),cx(y,H,h)),null!=d&&Rl(h,H)}function Yh(){var l=ne(),c=ge();wt()?Zt():lt(l=l.parent,!1),c.firstCreatePass&&(qo(c,l),ha(l)&&c.queries.elementEnd(l))}function v0(l,c,d){Gd(l,c,d),Yh()}function g0(){return Se()}function Bc(l){return!!l&&"function"==typeof l.then}function rw(l){return!!l&&"function"==typeof l.subscribe}var _0=rw;function y0(l,c,d,h){var y=Se(),x=ge(),H=ne();return iw(x,y,y[11],H,l,c,!!d,h),y0}function Mg(l,c){var d=ne(),h=Se(),y=ge();return iw(y,h,bx(Ye(y.data),d,h),d,l,c,!1),Mg}function iw(l,c,d,h,y,x,H,W){var X=bo(h),Oe=l.firstCreatePass&&UO(l),Xe=c[8],Ke=Gb(c),mt=!0;if(3&h.type||W){var Mt=Pi(h,c),zt=W?W(Mt):Mt,hn=Ke.length,Bn=W?function(Kc){return W(qr(Kc[h.index]))}:h.index;if(St(d)){var _n=null;if(!W&&X&&(_n=function(l,c,d,h){var y=l.cleanup;if(null!=y)for(var x=0;xX?W[X]:null}"string"==typeof H&&(x+=2)}return null}(l,c,y,h.index)),null!==_n)(_n.__ngLastListenerFn__||_n).__ngNextListenerFn__=x,_n.__ngLastListenerFn__=x,mt=!1;else{x=Ag(h,c,Xe,x,!1);var lr=d.listen(zt,y,x);Ke.push(x,lr),Oe&&Oe.push(y,Bn,hn,hn+1)}}else x=Ag(h,c,Xe,x,!0),zt.addEventListener(y,x,H),Ke.push(x),Oe&&Oe.push(y,Bn,hn,H)}else x=Ag(h,c,Xe,x,!1);var Mi,zr=h.outputs;if(mt&&null!==zr&&(Mi=zr[y])){var vo=Mi.length;if(vo)for(var ua=0;ua0&&void 0!==arguments[0]?arguments[0]:1;return Pa(l)}function aw(l,c){for(var d=null,h=function(l){var c=l.attrs;if(null!=c){var d=c.indexOf(5);if(0==(1&d))return c[d+1]}return null}(l),y=0;y1&&void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2?arguments[2]:void 0,h=Se(),y=ge(),x=$p(y,20+l,16,null,d||null);null===x.projection&&(x.projection=c),Zt(),64!=(64&x.flags)&&KD(y,h,x)}function b0(l,c,d){return hf(l,"",c,"",d),b0}function hf(l,c,d,h,y){var x=Se(),H=sf(x,c,d,h);return H!==Br&&Ls(ge(),fo(),x,l,H,x[11],y,!1),hf}function Dg(l,c,d,h,y,x,H){var W=Se(),X=lf(W,c,d,h,y,x);return X!==Br&&Ls(ge(),fo(),W,l,X,W[11],H,!1),Dg}function vw(l,c,d,h,y){for(var x=l[d+1],H=null===c,W=h?uu(x):is(x),X=!1;0!==W&&(!1===X||H);){var Oe=l[W+1];ZP(l[W],c)&&(X=!0,l[W+1]=h?rx(Oe):Pb(Oe)),W=h?uu(Oe):is(Oe)}X&&(l[d+1]=h?Pb(x):rx(x))}function ZP(l,c){return null===l||null==c||(Array.isArray(l)?l[1]:l)===c||!(!Array.isArray(l)||"string"!=typeof c)&&wd(l,c)>=0}var sa={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function gw(l){return l.substring(sa.key,sa.keyEnd)}function _w(l){return l.substring(sa.value,sa.valueEnd)}function x0(l,c){var d=sa.textEnd;return d===c?-1:(c=sa.keyEnd=function(l,c,d){for(;c32;)c++;return c}(l,sa.key=c,d),Yd(l,c,d))}function bw(l,c){var d=sa.textEnd,h=sa.key=Yd(l,c,d);return d===h?-1:(h=sa.keyEnd=function(l,c,d){for(var h;c=65&&(-33&h)<=90||h>=48&&h<=57);)c++;return c}(l,h,d),h=Sw(l,h,d),h=sa.value=Yd(l,h,d),h=sa.valueEnd=function(l,c,d){for(var h=-1,y=-1,x=-1,H=c,W=H;H32&&(W=H),x=y,y=h,h=-33&X}return W}(l,h,d),Sw(l,h,d))}function Cw(l){sa.key=0,sa.keyEnd=0,sa.value=0,sa.valueEnd=0,sa.textEnd=l.length}function Yd(l,c,d){for(;c=0;d=bw(c,d))O0(l,gw(c),_w(c))}function k0(l){nl(es,Zl,l,!0)}function Zl(l,c){for(var d=function(l){return Cw(l),x0(l,Yd(l,0,sa.textEnd))}(c);d>=0;d=x0(c,d))es(l,gw(c),!0)}function tl(l,c,d,h){var y=Se(),x=ge(),H=kr(2);x.firstUpdatePass&&A0(x,l,H,h),c!==Br&&aa(y,H,c)&&P0(x,x.data[Mo()],y,y[11],l,y[H+1]=function(l,c){return null==l||("string"==typeof c?l+=c:"object"==typeof l&&(l=j(su(l)))),l}(c,d),h,H)}function nl(l,c,d,h){var y=ge(),x=kr(2);y.firstUpdatePass&&A0(y,null,x,h);var H=Se();if(d!==Br&&aa(H,x,d)){var W=y.data[Mo()];if(R0(W,h)&&!M0(y,x)){var me=h?W.classesWithoutHost:W.stylesWithoutHost;null!==me&&(d=J(me,d||"")),h0(y,W,H,d,h)}else!function(l,c,d,h,y,x,H,W){y===Br&&(y=he);for(var X=0,me=0,Oe=0=l.expandoStartIndex}function A0(l,c,d,h){var y=l.data;if(null===y[d+1]){var x=y[Mo()],H=M0(l,d);R0(x,h)&&null===c&&!H&&(c=!1),c=function(l,c,d,h){var y=Ye(l),x=h?c.residualClasses:c.residualStyles;if(null===y)0===(h?c.classBindings:c.styleBindings)&&(d=Qh(d=D0(null,l,c,d,h),c.attrs,h),x=null);else{var W=c.directiveStylingLast;if(-1===W||l[W]!==y)if(d=D0(y,l,c,d,h),null===x){var me=function(l,c,d){var h=d?c.classBindings:c.styleBindings;if(0!==is(h))return l[uu(h)]}(l,c,h);void 0!==me&&Array.isArray(me)&&function(l,c,d,h){l[uu(d?c.classBindings:c.styleBindings)]=h}(l,c,h,me=Qh(me=D0(null,l,c,me[1],h),c.attrs,h))}else x=function(l,c,d){for(var h=void 0,y=c.directiveEnd,x=1+c.directiveStylingLast;x0)&&(me=!0):Oe=d,y)if(0!==X){var mt=uu(l[W+1]);l[h+1]=Ob(mt,W),0!==mt&&(l[mt+1]=nx(l[mt+1],h)),l[W+1]=function(l,c){return 131071&l|c<<17}(l[W+1],h)}else l[h+1]=Ob(W,0),0!==W&&(l[W+1]=nx(l[W+1],h)),W=h;else l[h+1]=Ob(X,0),0===W?W=h:l[X+1]=nx(l[X+1],h),X=h;me&&(l[h+1]=Pb(l[h+1])),vw(l,Oe,h,!0),vw(l,Oe,h,!1),function(l,c,d,h,y){var x=y?l.residualClasses:l.residualStyles;null!=x&&"string"==typeof c&&wd(x,c)>=0&&(d[h+1]=rx(d[h+1]))}(c,Oe,l,h,x),H=Ob(W,X),x?c.classBindings=H:c.styleBindings=H}(y,x,c,d,H,h)}}function D0(l,c,d,h,y){var x=null,H=d.directiveEnd,W=d.directiveStylingLast;for(-1===W?W=d.directiveStart:W++;W0;){var X=l[y],me=Array.isArray(X),Oe=me?X[1]:X,Xe=null===Oe,Ke=d[y+1];Ke===Br&&(Ke=Xe?he:void 0);var mt=Xe?_h(Ke,h):Oe===h?Ke:void 0;if(me&&!Og(mt)&&(mt=_h(X,h)),Og(mt)&&(W=mt,H))return W;var Mt=l[y+1];y=H?uu(Mt):is(Mt)}if(null!==c){var zt=x?c.residualClasses:c.residualStyles;null!=zt&&(W=_h(zt,h))}return W}function Og(l){return void 0!==l}function R0(l,c){return 0!=(l.flags&(c?16:32))}function N0(l){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d=Se(),h=ge(),y=l+20,x=h.firstCreatePass?$p(h,y,1,c,null):h.data[y],H=d[y]=$v(d[11],c);ig(h,d,H,x),lt(x,!1)}function Z0(l){return Pg("",l,""),Z0}function Pg(l,c,d){var h=Se(),y=sf(h,l,c,d);return y!==Br&&du(h,Mo(),y),Pg}function L0(l,c,d,h,y){var x=Se(),H=lf(x,l,c,d,h,y);return H!==Br&&du(x,Mo(),H),L0}function F0(l,c,d,h,y,x,H){var W=Se(),X=uf(W,l,c,d,h,y,x,H);return X!==Br&&du(W,Mo(),X),F0}function Pw(l,c,d){nl(es,Zl,sf(Se(),l,c,d),!0)}function Nw(l,c,d){var h=Se();return aa(h,Cr(),c)&&Ls(ge(),fo(),h,l,c,h[11],d,!0),Nw}function Zw(l,c,d){var h=Se();if(aa(h,Cr(),c)){var x=ge(),H=fo();Ls(x,H,h,l,c,bx(Ye(x.data),H,h),d,!0)}return Zw}var vf=void 0,Y5=["en",[["a","p"],["AM","PM"],vf],[["AM","PM"],vf,vf],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],vf,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],vf,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",vf,"{1} 'at' {0}",vf],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(l){var c=Math.floor(Math.abs(l)),d=l.toString().replace(/^[^.]*\.?/,"").length;return 1===c&&0===d?1:5}],Kh={};function Lw(l){var c=function(l){return l.toLowerCase().replace(/_/g,"-")}(l),d=rI(c);if(d)return d;var h=c.split("-")[0];if(d=rI(h))return d;if("en"===h)return Y5;throw new Error('Missing locale data for the locale "'.concat(l,'".'))}function nI(l){return Lw(l)[Ig.PluralCase]}function rI(l){return l in Kh||(Kh[l]=Rt.ng&&Rt.ng.common&&Rt.ng.common.locales&&Rt.ng.common.locales[l]),Kh[l]}var Ig=function(l){return l[l.LocaleId=0]="LocaleId",l[l.DayPeriodsFormat=1]="DayPeriodsFormat",l[l.DayPeriodsStandalone=2]="DayPeriodsStandalone",l[l.DaysFormat=3]="DaysFormat",l[l.DaysStandalone=4]="DaysStandalone",l[l.MonthsFormat=5]="MonthsFormat",l[l.MonthsStandalone=6]="MonthsStandalone",l[l.Eras=7]="Eras",l[l.FirstDayOfWeek=8]="FirstDayOfWeek",l[l.WeekendRange=9]="WeekendRange",l[l.DateFormat=10]="DateFormat",l[l.TimeFormat=11]="TimeFormat",l[l.DateTimeFormat=12]="DateTimeFormat",l[l.NumberSymbols=13]="NumberSymbols",l[l.NumberFormats=14]="NumberFormats",l[l.CurrencyCode=15]="CurrencyCode",l[l.CurrencySymbol=16]="CurrencySymbol",l[l.CurrencyName=17]="CurrencyName",l[l.Currencies=18]="Currencies",l[l.Directionality=19]="Directionality",l[l.PluralCase=20]="PluralCase",l[l.ExtraData=21]="ExtraData",l}({}),H0="en-US";function Fw(l){en(l,"Expected localeId to be defined"),"string"==typeof l&&l.toLowerCase().replace(/_/g,"-")}function ZI(l,c,d){var h=ge();if(h.firstCreatePass){var y=Ni(l);Xw(d,h.data,h.blueprint,y,!0),Xw(c,h.data,h.blueprint,y,!1)}}function Xw(l,c,d,h,y){if(l=ae(l),Array.isArray(l))for(var x=0;x>20;if(rf(l)||!l.multi){var Mt=new Ki(me,y,Gh),zt=tE(X,c,y?Xe:Xe+mt,Ke);-1===zt?(Av(hh(Oe,W),H,X),$w(H,l,c.length),c.push(X),Oe.directiveStart++,Oe.directiveEnd++,y&&(Oe.providerIndexes+=1048576),d.push(Mt),W.push(Mt)):(d[zt]=Mt,W[zt]=Mt)}else{var hn=tE(X,c,Xe+mt,Ke),Bn=tE(X,c,Xe,Xe+mt),Kn=Bn>=0&&d[Bn];if(y&&!Kn||!y&&!(hn>=0&&d[hn])){Av(hh(Oe,W),H,X);var lr=function(l,c,d,h,y){var x=new Ki(l,d,Gh);return x.multi=[],x.index=c,x.componentProviders=0,eE(x,y,h&&!d),x}(y?nE:Y0,d.length,y,h,me);!y&&Kn&&(d[Bn].providerFactory=lr),$w(H,l,c.length,0),c.push(X),Oe.directiveStart++,Oe.directiveEnd++,y&&(Oe.providerIndexes+=1048576),d.push(lr),W.push(lr)}else $w(H,l,hn>-1?hn:Bn,eE(d[y?Bn:hn],me,!y&&h));!y&&h&&Kn&&d[Bn].componentProviders++}}}function $w(l,c,d,h){var y=rf(c);if(y||function(l){return!!l.useClass}(c)){var H=(c.useClass||c).prototype.ngOnDestroy;if(H){var W=l.destroyHooks||(l.destroyHooks=[]);if(!y&&c.multi){var X=W.indexOf(d);-1===X?W.push(d,[h,H]):W[X+1].push(h,H)}else W.push(d,H)}}}function eE(l,c,d){return d&&l.componentProviders++,l.multi.push(c)-1}function tE(l,c,d,h){for(var y=d;y1&&void 0!==arguments[1]?arguments[1]:[];return function(d){d.providersResolver=function(h,y){return ZI(h,y?y(l):l,c)}}}var SB=function l(){(0,k.Z)(this,l)},iE=function l(){(0,k.Z)(this,l)},wB=function(){function l(){(0,k.Z)(this,l)}return(0,D.Z)(l,[{key:"resolveComponentFactory",value:function(d){throw function(l){var c=Error("No component factory found for ".concat(j(l),". Did you add it to @NgModule.entryComponents?"));return c.ngComponent=l,c}(d)}}]),l}(),Fg=function(){var l=function c(){(0,k.Z)(this,c)};return l.NULL=new wB,l}();function J0(){}function em(l,c){return new fu(Pi(l,c))}var AB=function(){return em(ne(),Se())},fu=function(){var l=function c(d){(0,k.Z)(this,c),this.nativeElement=d};return l.__NG_ELEMENT_ID__=AB,l}();function oE(l){return l instanceof fu?l.nativeElement:l}var Q0=function l(){(0,k.Z)(this,l)},DB=function(){var l=function c(){(0,k.Z)(this,c)};return l.__NG_ELEMENT_ID__=function(){return aE()},l}(),aE=function(){var l=Se(),d=ba(ne().index,l);return function(l){return l[11]}(fr(d)?d:l)},sE=function(){var l=function c(){(0,k.Z)(this,c)};return l.\u0275prov=In({token:l,providedIn:"root",factory:function(){return null}}),l}(),lE=function l(c){(0,k.Z)(this,l),this.full=c,this.major=c.split(".")[0],this.minor=c.split(".")[1],this.patch=c.split(".").slice(2).join(".")},UI=new lE("12.2.13"),uE=function(){function l(){(0,k.Z)(this,l)}return(0,D.Z)(l,[{key:"supports",value:function(d){return Pc(d)}},{key:"create",value:function(d){return new IB(d)}}]),l}(),HI=function(c,d){return d},IB=function(){function l(c){(0,k.Z)(this,l),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=c||HI}return(0,D.Z)(l,[{key:"forEachItem",value:function(d){var h;for(h=this._itHead;null!==h;h=h._next)d(h)}},{key:"forEachOperation",value:function(d){for(var h=this._itHead,y=this._removalsHead,x=0,H=null;h||y;){var W=!y||h&&h.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==d;){var x=c[d.index];if(null!==x&&h.push(qr(x)),po(x))for(var H=10;H-1&&(Ah(d,y),xd(h,y))}this._attachedToViewContainer=!1}Cb(this._lView[1],this._lView)}},{key:"onDestroy",value:function(d){Vb(this._lView[1],this._lView,null,d)}},{key:"markForCheck",value:function(){vx(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){_x(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(l,c,d){Un(!0);try{_x(l,c,d)}finally{Un(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}},{key:"detachFromAppRef",value:function(){this._appRef=null,function(l,c){Ih(l,c,c[11],2,null,null)}(this._lView[1],this._lView)}},{key:"attachToAppRef",value:function(d){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=d}}]),l}(),dE=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h){var y;return(0,k.Z)(this,d),(y=c.call(this,h))._view=h,y}return(0,D.Z)(d,[{key:"detectChanges",value:function(){ZO(this._view)}},{key:"checkNoChanges",value:function(){!function(l){Un(!0);try{ZO(l)}finally{Un(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),d}(Hg),QI=function(l){return function(l,c,d){if(Ti(l)&&!d){var h=ba(l.index,c);return new Hg(h,h)}return 47&l.type?new Hg(c[16],c):null}(ne(),Se(),16==(16&l))},KI=function(){var l=function c(){(0,k.Z)(this,c)};return l.__NG_ELEMENT_ID__=QI,l}(),XI=[new cE],$I=new Bg([new uE]),BB=new Ug(XI),HB=function(){return Vg(ne(),Se())},nm=function(){var l=function c(){(0,k.Z)(this,c)};return l.__NG_ELEMENT_ID__=HB,l}(),fE=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h,y,x){var H;return(0,k.Z)(this,d),(H=c.call(this))._declarationLView=h,H._declarationTContainer=y,H.elementRef=x,H}return(0,D.Z)(d,[{key:"createEmbeddedView",value:function(y){var x=this._declarationTContainer.tViews,H=Lh(this._declarationLView,x,y,16,null,x.declTNode,null,null,null,null);H[17]=this._declarationLView[this._declarationTContainer.index];var X=this._declarationLView[19];return null!==X&&(H[19]=X.createEmbeddedView(x)),Fh(x,H,y),new Hg(H)}}]),d}(nm);function Vg(l,c){return 4&l.type?new fE(c,l,em(l,c)):null}var Uc=function l(){(0,k.Z)(this,l)},X0=function l(){(0,k.Z)(this,l)},hE=function(){return i3(ne(),Se())},_f=function(){var l=function c(){(0,k.Z)(this,c)};return l.__NG_ELEMENT_ID__=hE,l}(),vE=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h,y,x){var H;return(0,k.Z)(this,d),(H=c.call(this))._lContainer=h,H._hostTNode=y,H._hostLView=x,H}return(0,D.Z)(d,[{key:"element",get:function(){return em(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new bd(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var y=Iy(this._hostTNode,this._hostLView);if(hD(y)){var x=Op(y,this._hostLView),H=fh(y);return new bd(x[1].data[H+8],x)}return new bd(null,this._hostLView)}},{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(y){var x=r3(this._lContainer);return null!==x&&x[y]||null}},{key:"length",get:function(){return this._lContainer.length-10}},{key:"createEmbeddedView",value:function(y,x,H){var W=y.createEmbeddedView(x||{});return this.insert(W,H),W}},{key:"createComponent",value:function(y,x,H,W,X){var me=H||this.parentInjector;if(!X&&null==y.ngModule&&me){var Oe=me.get(Uc,null);Oe&&(X=Oe)}var Xe=y.create(me,W,void 0,X);return this.insert(Xe.hostView,x),Xe}},{key:"insert",value:function(y,x){var H=y._lView,W=H[1];if(function(l){return po(l[3])}(H)){var X=this.indexOf(y);if(-1!==X)this.detach(X);else{var me=H[3],Oe=new vE(me,me[6],me[3]);Oe.detach(Oe.indexOf(y))}}var Xe=this._adjustIndex(x),Ke=this._lContainer;!function(l,c,d,h){var y=10+h,x=d.length;h>0&&(d[y-1][4]=c),h1&&void 0!==arguments[1]?arguments[1]:0;return null==y?this.length+x:y}}]),d}(_f);function r3(l){return l[8]}function gE(l){return l[8]||(l[8]=[])}function i3(l,c){var d,h=c[l.index];if(po(h))d=h;else{var y;if(8&l.type)y=qr(h);else{var x=c[11];y=x.createComment("");var H=Pi(l,c);Fd(x,rg(x,H),y,function(l,c){return St(l)?l.nextSibling(c):c.nextSibling}(x,H),!1)}c[l.index]=d=jb(h,c,y,l),zb(c,d)}return new vE(d,l,c)}var Bu={},Sf=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h){var y;return(0,k.Z)(this,d),(y=c.call(this)).ngModule=h,y}return(0,D.Z)(d,[{key:"resolveComponentFactory",value:function(y){var x=bi(y);return new _C(x,this.ngModule)}}]),d}(Fg);function vC(l){var c=[];for(var d in l)l.hasOwnProperty(d)&&c.push({propName:l[d],templateName:d});return c}var k3=new Io("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Na}}),_C=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h,y){var x;return(0,k.Z)(this,d),(x=c.call(this)).componentDef=h,x.ngModule=y,x.componentType=h.type,x.selector=function(l){return l.map(aO).join(",")}(h.selectors),x.ngContentSelectors=h.ngContentSelectors?h.ngContentSelectors:[],x.isBoundToModule=!!y,x}return(0,D.Z)(d,[{key:"inputs",get:function(){return vC(this.componentDef.inputs)}},{key:"outputs",get:function(){return vC(this.componentDef.outputs)}},{key:"create",value:function(y,x,H,W){var _n,Kn,X=(W=W||this.ngModule)?function(l,c){return{get:function(h,y,x){var H=l.get(h,Bu,x);return H!==Bu||y===Bu?H:c.get(h,y,x)}}}(y,W.injector):y,me=X.get(Q0,gt),Oe=X.get(sE,null),Xe=me.createRenderer(null,this.componentDef),Ke=this.componentDef.selectors[0][0]||"div",mt=H?function(l,c,d){if(St(l))return l.selectRootElement(c,d===Cn.ShadowDom);var y="string"==typeof c?l.querySelector(c):c;return y.textContent="",y}(Xe,H,this.componentDef.encapsulation):yb(me.createRenderer(null,this.componentDef),Ke,function(l){var c=l.toLowerCase();return"svg"===c?ie:"math"===c?"http://www.w3.org/1998/MathML/":null}(Ke)),Mt=this.componentDef.onPush?576:528,zt=function(l,c){return{components:[],scheduler:l||Na,clean:BO,playerHandler:c||null,flags:0}}(),hn=hg(0,null,null,1,0,null,null,null,null,null),Bn=Lh(null,hn,zt,Mt,null,null,me,Xe,Oe,X);Tt(Bn);try{var lr=function(l,c,d,h,y,x){var H=d[1];d[20]=l;var X=$p(H,20,2,"#host",null),me=X.mergedAttrs=c.hostAttrs;null!==me&&(_g(X,me,!0),null!==l&&(Ks(y,l,me),null!==X.classes&&Mb(y,l,X.classes),null!==X.styles&&kb(y,l,X.styles)));var Oe=h.createRenderer(l,c),Xe=Lh(d,fg(c),null,c.onPush?64:16,d[20],X,h,Oe,x||null,null);return H.firstCreatePass&&(Av(hh(X,d),H,c.type),AO(H,X),OO(X,d.length,1)),zb(d,Xe),d[20]=Xe}(mt,this.componentDef,Bn,me,Xe);if(mt)if(H)Ks(Xe,mt,["ng-version",UI.full]);else{var zr=function(l){for(var c=[],d=[],h=1,y=2;h0&&Mb(Xe,mt,vo.join(" "))}if(Kn=Oa(hn,20),void 0!==x)for(var ua=Kn.projection=[],ca=0;ca1&&void 0!==arguments[1]?arguments[1]:Za.THROW_IF_NOT_FOUND,H=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ft.Default;return y===Za||y===Uc||y===tf?this:this._r3Injector.get(y,x,H)}},{key:"destroy",value:function(){var y=this._r3Injector;!y.destroyed&&y.destroy(),this.destroyCbs.forEach(function(x){return x()}),this.destroyCbs=null}},{key:"onDestroy",value:function(y){this.destroyCbs.push(y)}}]),d}(Uc),Kg=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(h){var y;return(0,k.Z)(this,d),(y=c.call(this)).moduleType=h,null!==pi(h)&&function(l){var c=new Set;!function d(h){var y=pi(h,!0),x=y.id;null!==x&&(function(l,c,d){if(c&&c!==d)throw new Error("Duplicate module registered for ".concat(l," - ").concat(j(c)," vs ").concat(j(c.name)))}(x,Uu.get(x),h),Uu.set(x,h));var me,W=Rs(y.imports),X=(0,b.Z)(W);try{for(X.s();!(me=X.n()).done;){var Oe=me.value;c.has(Oe)||(c.add(Oe),d(Oe))}}catch(Xe){X.e(Xe)}finally{X.f()}}(l)}(h),y}return(0,D.Z)(d,[{key:"create",value:function(y){return new a4(this.moduleType,y)}}]),d}(X0);function O3(l,c,d){var h=Qn()+l,y=Se();return y[h]===Br?Fu(y,h,d?c.call(d):c()):function(l,c){return l[c]}(y,h)}function UE(l,c,d,h){return qE(Se(),Qn(),l,c,d,h)}function bC(l,c,d,h,y){return I3(Se(),Qn(),l,c,d,h,y)}function Xg(l,c){var d=l[c];return d===Br?void 0:d}function qE(l,c,d,h,y,x){var H=c+d;return aa(l,H,y)?Fu(l,H+1,x?h.call(x,y):h(y)):Xg(l,H+1)}function I3(l,c,d,h,y,x,H){var W=c+d;return Ic(l,W,y,x)?Fu(l,W+2,H?h.call(H,y,x):h(y,x)):Xg(l,W+2)}function zi(l,c){var h,d=ge(),y=l+20;d.firstCreatePass?(h=function(l,c){if(c)for(var d=c.length-1;d>=0;d--){var h=c[d];if(l===h.name)return h}throw new le("302","The pipe '".concat(l,"' could not be found!"))}(c,d.pipeRegistry),d.data[y]=h,h.onDestroy&&(d.destroyHooks||(d.destroyHooks=[])).push(y,h.onDestroy)):h=d.data[y];var x=h.factory||(h.factory=Ka(h.type)),H=Jt(Gh);try{var W=Py(!1),X=x();return Py(W),function(l,c,d,h){d>=l.data.length&&(l.data[d]=null,l.blueprint[d]=null),c[d]=h}(d,Se(),y,X),X}finally{Jt(H)}}function $i(l,c,d){var h=l+20,y=Se(),x=Xa(y,h);return um(y,lm(y,h)?qE(y,Qn(),c,x.transform,d,x):x.transform(d))}function $g(l,c,d,h){var y=l+20,x=Se(),H=Xa(x,y);return um(x,lm(x,y)?I3(x,Qn(),c,H.transform,d,h,H):H.transform(d,h))}function lm(l,c){return l[1].data[c].pure}function um(l,c){return qd.isWrapped(c)&&(c=qd.unwrap(c),l[hr()]=Br),c}function Hc(l){return function(c){setTimeout(l,void 0,c)}}var vu=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){var h,y=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,k.Z)(this,d),(h=c.call(this)).__isAsync=y,h}return(0,D.Z)(d,[{key:"emit",value:function(y){(0,U.Z)((0,B.Z)(d.prototype),"next",this).call(this,y)}},{key:"subscribe",value:function(y,x,H){var W,X,me,Oe=y,Xe=x||function(){return null},Ke=H;if(y&&"object"==typeof y){var mt=y;Oe=null===(W=mt.next)||void 0===W?void 0:W.bind(mt),Xe=null===(X=mt.error)||void 0===X?void 0:X.bind(mt),Ke=null===(me=mt.complete)||void 0===me?void 0:me.bind(mt)}this.__isAsync&&(Xe=Hc(Xe),Oe&&(Oe=Hc(Oe)),Ke&&(Ke=Hc(Ke)));var Mt=(0,U.Z)((0,B.Z)(d.prototype),"subscribe",this).call(this,{next:Oe,error:Xe,complete:Ke});return y instanceof A.w&&y.add(Mt),Mt}}]),d}(w.xQ);function Tf(){return this._results[of()]()}var Vc=function(){function l(){var c=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,k.Z)(this,l),this._emitDistinctChangesOnly=c,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;var d=of(),h=l.prototype;h[d]||(h[d]=Tf)}return(0,D.Z)(l,[{key:"changes",get:function(){return this._changes||(this._changes=new vu)}},{key:"get",value:function(d){return this._results[d]}},{key:"map",value:function(d){return this._results.map(d)}},{key:"filter",value:function(d){return this._results.filter(d)}},{key:"find",value:function(d){return this._results.find(d)}},{key:"reduce",value:function(d,h){return this._results.reduce(d,h)}},{key:"forEach",value:function(d){this._results.forEach(d)}},{key:"some",value:function(d){return this._results.some(d)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(d,h){var y=this;y.dirty=!1;var x=As(d);(this._changesDetected=!function(l,c,d){if(l.length!==c.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:[];(0,k.Z)(this,l),this.queries=c}return(0,D.Z)(l,[{key:"createEmbeddedView",value:function(d){var h=d.queries;if(null!==h){for(var y=null!==d.contentQueries?d.contentQueries[0]:h.length,x=[],H=0;H2&&void 0!==arguments[2]?arguments[2]:null;(0,k.Z)(this,l),this.predicate=c,this.flags=d,this.read=h},zE=function(){function l(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,k.Z)(this,l),this.queries=c}return(0,D.Z)(l,[{key:"elementStart",value:function(d,h){for(var y=0;y1&&void 0!==arguments[1]?arguments[1]:-1;(0,k.Z)(this,l),this.metadata=c,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=d}return(0,D.Z)(l,[{key:"elementStart",value:function(d,h){this.isApplyingToNode(h)&&this.matchTNode(d,h)}},{key:"elementEnd",value:function(d){this._declarationNodeIndex===d.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(d,h){this.elementStart(d,h)}},{key:"embeddedTView",value:function(d,h){return this.isApplyingToNode(d)?(this.crossesNgTemplate=!0,this.addMatch(-d.index,h),new l(this.metadata)):null}},{key:"isApplyingToNode",value:function(d){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){for(var h=this._declarationNodeIndex,y=d.parent;null!==y&&8&y.type&&y.index!==h;)y=y.parent;return h===(null!==y?y.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(d,h){var y=this.metadata.predicate;if(Array.isArray(y))for(var x=0;x0)h.push(H[W/2]);else{for(var me=x[W+1],Oe=c[-X],Xe=10;Xe0&&(W=setTimeout(function(){H._callbacks=H._callbacks.filter(function(X){return X.timeoutId!==W}),h(H._didWork,H.getPendingTasks())},y)),this._callbacks.push({doneCb:h,timeoutId:W,updateCb:x})}},{key:"whenStable",value:function(h,y,x){if(x&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(h,y,x),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(h,y,x){return[]}}]),c}();return l.\u0275fac=function(d){return new(d||l)(zo(_u))},l.\u0275prov=In({token:l,factory:l.\u0275fac}),l}(),Pf=function(){var l=function(){function c(){(0,k.Z)(this,c),this._applications=new Map,f_.addToWindow(this)}return(0,D.Z)(c,[{key:"registerApplication",value:function(h,y){this._applications.set(h,y)}},{key:"unregisterApplication",value:function(h){this._applications.delete(h)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(h){return this._applications.get(h)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(h){var y=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return f_.findTestabilityInTree(this,h,y)}}]),c}();return l.\u0275fac=function(d){return new(d||l)},l.\u0275prov=In({token:l,factory:l.\u0275fac}),l}();function cR(l){f_=l}var f_=new(function(){function l(){(0,k.Z)(this,l)}return(0,D.Z)(l,[{key:"addToWindow",value:function(d){}},{key:"findTestabilityInTree",value:function(d,h,y){return null}}]),l}()),Tk=!0,xk=!1;function Tm(){return xk=!0,Tk}function wk(){if(xk)throw new Error("Cannot enable prod mode after platform setup.");Tk=!1}var Fl,dR=function(l,c,d){var h=new Kg(d);return Promise.resolve(h)},xm=new Io("AllowMultipleToken"),JC=function l(c,d){(0,k.Z)(this,l),this.name=c,this.token=d};function wm(l){if(Fl&&!Fl.destroyed&&!Fl.injector.get(xm,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Fl=l.get(kk);var c=l.get(Kd,null);return c&&c.forEach(function(d){return d()}),Fl}function QC(l,c){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],h="Platform: ".concat(c),y=new Io(h);return function(){var x=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],H=Ek();if(!H||H.injector.get(xm,!1))if(l)l(d.concat(x).concat({provide:y,useValue:!0}));else{var W=d.concat(x).concat({provide:y,useValue:!0},{provide:Uh,useValue:"platform"});wm(Za.create({providers:W,name:h}))}return vR(y)}}function vR(l){var c=Ek();if(!c)throw new Error("No platform exists!");if(!c.injector.get(l,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return c}function Ek(){return Fl&&!Fl.destroyed?Fl:null}var kk=function(){var l=function(){function c(d){(0,k.Z)(this,c),this._injector=d,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return(0,D.Z)(c,[{key:"bootstrapModuleFactory",value:function(h,y){var x=this,me=function(l,c){return"noop"===l?new GC:("zone.js"===l?void 0:l)||new _u({enableLongStackTrace:Tm(),shouldCoalesceEventChangeDetection:!!(null==c?void 0:c.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==c?void 0:c.ngZoneRunCoalescing)})}(y?y.ngZone:void 0,{ngZoneEventCoalescing:y&&y.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:y&&y.ngZoneRunCoalescing||!1}),Oe=[{provide:_u,useValue:me}];return me.run(function(){var Xe=Za.create({providers:Oe,parent:x.injector,name:h.moduleType.name}),Ke=h.create(Xe),mt=Ke.injector.get(xc,null);if(!mt)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return me.runOutsideAngular(function(){var Mt=me.onError.subscribe({next:function(hn){mt.handleError(hn)}});Ke.onDestroy(function(){KC(x._modules,Ke),Mt.unsubscribe()})}),function(l,c,d){try{var h=((Mt=Ke.injector.get(kf)).runInitializers(),Mt.donePromise.then(function(){return Fw(Ke.injector.get(bm,H0)||H0),x._moduleDoBootstrap(Ke),Ke}));return Bc(h)?h.catch(function(y){throw c.runOutsideAngular(function(){return l.handleError(y)}),y}):h}catch(y){throw c.runOutsideAngular(function(){return l.handleError(y)}),y}var Mt}(mt,me)})}},{key:"bootstrapModule",value:function(h){var y=this,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],H=Mk({},x);return dR(0,0,h).then(function(W){return y.bootstrapModuleFactory(W,H)})}},{key:"_moduleDoBootstrap",value:function(h){var y=h.injector.get(Em);if(h._bootstrapComponents.length>0)h._bootstrapComponents.forEach(function(x){return y.bootstrap(x)});else{if(!h.instance.ngDoBootstrap)throw new Error("The module ".concat(j(h.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ')+"Please define one of these.");h.instance.ngDoBootstrap(y)}this._modules.push(h)}},{key:"onDestroy",value:function(h){this._destroyListeners.push(h)}},{key:"injector",get:function(){return this._injector}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(h){return h.destroy()}),this._destroyListeners.forEach(function(h){return h()}),this._destroyed=!0}},{key:"destroyed",get:function(){return this._destroyed}}]),c}();return l.\u0275fac=function(d){return new(d||l)(zo(Za))},l.\u0275prov=In({token:l,factory:l.\u0275fac}),l}();function Mk(l,c){return Array.isArray(c)?c.reduce(Mk,l):Object.assign(Object.assign({},l),c)}var Em=function(){var l=function(){function c(d,h,y,x,H){var W=this;(0,k.Z)(this,c),this._zone=d,this._injector=h,this._exceptionHandler=y,this._componentFactoryResolver=x,this._initStatus=H,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:function(){W._zone.run(function(){W.tick()})}});var X=new S.y(function(Oe){W._stable=W._zone.isStable&&!W._zone.hasPendingMacrotasks&&!W._zone.hasPendingMicrotasks,W._zone.runOutsideAngular(function(){Oe.next(W._stable),Oe.complete()})}),me=new S.y(function(Oe){var Xe;W._zone.runOutsideAngular(function(){Xe=W._zone.onStable.subscribe(function(){_u.assertNotInAngularZone(),jC(function(){!W._stable&&!W._zone.hasPendingMacrotasks&&!W._zone.hasPendingMicrotasks&&(W._stable=!0,Oe.next(!0))})})});var Ke=W._zone.onUnstable.subscribe(function(){_u.assertInAngularZone(),W._stable&&(W._stable=!1,W._zone.runOutsideAngular(function(){Oe.next(!1)}))});return function(){Xe.unsubscribe(),Ke.unsubscribe()}});this.isStable=(0,O.T)(X,me.pipe((0,F.B)()))}return(0,D.Z)(c,[{key:"bootstrap",value:function(h,y){var H,x=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");H=h instanceof iE?h:this._componentFactoryResolver.resolveComponentFactory(h),this.componentTypes.push(H.componentType);var W=function(l){return l.isBoundToModule}(H)?void 0:this._injector.get(Uc),me=H.create(Za.NULL,[],y||H.selector,W),Oe=me.location.nativeElement,Xe=me.injector.get(Sk,null),Ke=Xe&&me.injector.get(Pf);return Xe&&Ke&&Ke.registerApplication(Oe,Xe),me.onDestroy(function(){x.detachView(me.hostView),KC(x.components,me),Ke&&Ke.unregisterApplication(Oe)}),this._loadComponent(me),me}},{key:"tick",value:function(){var h=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var x,y=(0,b.Z)(this._views);try{for(y.s();!(x=y.n()).done;)x.value.detectChanges()}catch(Oe){y.e(Oe)}finally{y.f()}}catch(Oe){this._zone.runOutsideAngular(function(){return h._exceptionHandler.handleError(Oe)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(h){var y=h;this._views.push(y),y.attachToAppRef(this)}},{key:"detachView",value:function(h){var y=h;KC(this._views,y),y.detachFromAppRef()}},{key:"_loadComponent",value:function(h){this.attachView(h.hostView),this.tick(),this.components.push(h),this._injector.get(fk,[]).concat(this._bootstrapListeners).forEach(function(x){return x(h)})}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(h){return h.destroy()}),this._onMicrotaskEmptySubscription.unsubscribe()}},{key:"viewCount",get:function(){return this._views.length}}]),c}();return l.\u0275fac=function(d){return new(d||l)(zo(_u),zo(Za),zo(xc),zo(Fg),zo(kf))},l.\u0275prov=In({token:l,factory:l.\u0275fac}),l}();function KC(l,c){var d=l.indexOf(c);d>-1&&l.splice(d,1)}var Dk=function l(){(0,k.Z)(this,l)},t1=function l(){(0,k.Z)(this,l)},km={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},yR=function(){var l=function(){function c(d,h){(0,k.Z)(this,c),this._compiler=d,this._config=h||km}return(0,D.Z)(c,[{key:"load",value:function(h){return this.loadAndCompile(h)}},{key:"loadAndCompile",value:function(h){var y=this,x=h.split("#"),H=(0,Z.Z)(x,2),W=H[0],X=H[1];return void 0===X&&(X="default"),f(98255)(W).then(function(me){return me[X]}).then(function(me){return Ok(me,W,X)}).then(function(me){return y._compiler.compileModuleAsync(me)})}},{key:"loadFactory",value:function(h){var y=h.split("#"),x=(0,Z.Z)(y,2),H=x[0],W=x[1],X="NgFactory";return void 0===W&&(W="default",X=""),f(98255)(this._config.factoryPathPrefix+H+this._config.factoryPathSuffix).then(function(me){return me[W+X]}).then(function(me){return Ok(me,H,W)})}}]),c}();return l.\u0275fac=function(d){return new(d||l)(zo(Df),zo(t1,8))},l.\u0275prov=In({token:l,factory:l.\u0275fac}),l}();function Ok(l,c,d){if(!l)throw new Error("Cannot find '".concat(d,"' in '").concat(c,"'"));return l}var bR=function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return d}(function(l){(0,M.Z)(d,l);var c=(0,_.Z)(d);function d(){return(0,k.Z)(this,d),c.apply(this,arguments)}return d}(KI)),ER=function(l){return null},MR=QC(null,"core",[{provide:pk,useValue:"unknown"},{provide:kk,deps:[Za]},{provide:Pf,deps:[]},{provide:hk,deps:[]}]),s1=[{provide:Em,useClass:Em,deps:[_u,Za,xc,Fg,kf]},{provide:k3,deps:[_u],useFactory:function(l){var c=[];return l.onStable.subscribe(function(){for(;c.length;)c.pop()()}),function(d){c.push(d)}}},{provide:kf,useClass:kf,deps:[[new Iu,Vu]]},{provide:Df,useClass:Df,deps:[]},ym,{provide:Bg,useFactory:function(){return $I},deps:[]},{provide:Ug,useFactory:function(){return BB},deps:[]},{provide:bm,useFactory:function(l){return Fw(l=l||"undefined"!=typeof $localize&&$localize.locale||H0),l},deps:[[new bh(bm),new Iu,new Ru]]},{provide:BC,useValue:"USD"}],NR=function(){var l=function c(d){(0,k.Z)(this,c)};return l.\u0275fac=function(d){return new(d||l)(zo(Em))},l.\u0275mod=_o({type:l}),l.\u0275inj=Rn({providers:s1}),l}()},19061:function(ue,q,f){"use strict";f.d(q,{Zs:function(){return Bi},Fj:function(){return F},qu:function(){return $e},NI:function(){return wi},u:function(){return ha},cw:function(){return to},sg:function(){return Ho},u5:function(){return bl},Cf:function(){return j},JU:function(){return E},a5:function(){return En},JJ:function(){return Rn},JL:function(){return wn},F:function(){return Bo},On:function(){return jn},wV:function(){return Ci},UX:function(){return pe},kI:function(){return $},_Y:function(){return zn}});var U=f(88009),B=f(36683),V=f(62467),Z=f(10509),T=f(97154),R=f(18967),b=f(14105),v=f(38999),I=f(40098),D=f(61493),k=f(91925),M=f(85639),_=function(){var ie=function(){function fe(_e,Ce){(0,R.Z)(this,fe),this._renderer=_e,this._elementRef=Ce,this.onChange=function(Re){},this.onTouched=function(){}}return(0,b.Z)(fe,[{key:"setProperty",value:function(Ce,Re){this._renderer.setProperty(this._elementRef.nativeElement,Ce,Re)}},{key:"registerOnTouched",value:function(Ce){this.onTouched=Ce}},{key:"registerOnChange",value:function(Ce){this.onChange=Ce}},{key:"setDisabledState",value:function(Ce){this.setProperty("disabled",Ce)}}]),fe}();return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(v.Qsj),v.Y36(v.SBq))},ie.\u0275dir=v.lG2({type:ie}),ie}(),g=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(){return(0,R.Z)(this,Ce),_e.apply(this,arguments)}return Ce}(_);return ie.\u0275fac=function(){var fe;return function(Ce){return(fe||(fe=v.n5z(ie)))(Ce||ie)}}(),ie.\u0275dir=v.lG2({type:ie,features:[v.qOj]}),ie}(),E=new v.OlP("NgValueAccessor"),w={provide:E,useExisting:(0,v.Gpc)(function(){return F}),multi:!0},O=new v.OlP("CompositionEventMode"),F=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re,Ge,St){var ht;return(0,R.Z)(this,Ce),(ht=_e.call(this,Re,Ge))._compositionMode=St,ht._composing=!1,null==ht._compositionMode&&(ht._compositionMode=!function(){var ie=(0,I.q)()?(0,I.q)().getUserAgent():"";return/android (\d+)/.test(ie.toLowerCase())}()),ht}return(0,b.Z)(Ce,[{key:"writeValue",value:function(Ge){this.setProperty("value",null==Ge?"":Ge)}},{key:"_handleInput",value:function(Ge){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(Ge)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(Ge){this._composing=!1,this._compositionMode&&this.onChange(Ge)}}]),Ce}(_);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(v.Qsj),v.Y36(v.SBq),v.Y36(O,8))},ie.\u0275dir=v.lG2({type:ie,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(_e,Ce){1&_e&&v.NdJ("input",function(Ge){return Ce._handleInput(Ge.target.value)})("blur",function(){return Ce.onTouched()})("compositionstart",function(){return Ce._compositionStart()})("compositionend",function(Ge){return Ce._compositionEnd(Ge.target.value)})},features:[v._Bn([w]),v.qOj]}),ie}();function z(ie){return null==ie||0===ie.length}function K(ie){return null!=ie&&"number"==typeof ie.length}var j=new v.OlP("NgValidators"),J=new v.OlP("NgAsyncValidators"),ee=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,$=function(){function ie(){(0,R.Z)(this,ie)}return(0,b.Z)(ie,null,[{key:"min",value:function(_e){return function(ie){return function(fe){if(z(fe.value)||z(ie))return null;var _e=parseFloat(fe.value);return!isNaN(_e)&&_eie?{max:{max:ie,actual:fe.value}}:null}}(_e)}},{key:"required",value:function(_e){return ce(_e)}},{key:"requiredTrue",value:function(_e){return le(_e)}},{key:"email",value:function(_e){return function(ie){return z(ie.value)||ee.test(ie.value)?null:{email:!0}}(_e)}},{key:"minLength",value:function(_e){return function(ie){return function(fe){return z(fe.value)||!K(fe.value)?null:fe.value.lengthie?{maxlength:{requiredLength:ie,actualLength:fe.value.length}}:null}}(_e)}},{key:"pattern",value:function(_e){return function(ie){return ie?("string"==typeof ie?(_e="","^"!==ie.charAt(0)&&(_e+="^"),_e+=ie,"$"!==ie.charAt(ie.length-1)&&(_e+="$"),fe=new RegExp(_e)):(_e=ie.toString(),fe=ie),function(Ce){if(z(Ce.value))return null;var Re=Ce.value;return fe.test(Re)?null:{pattern:{requiredPattern:_e,actualValue:Re}}}):qe;var fe,_e}(_e)}},{key:"nullValidator",value:function(_e){return null}},{key:"compose",value:function(_e){return dt(_e)}},{key:"composeAsync",value:function(_e){return Bt(_e)}}]),ie}();function ce(ie){return z(ie.value)?{required:!0}:null}function le(ie){return!0===ie.value?null:{required:!0}}function qe(ie){return null}function _t(ie){return null!=ie}function yt(ie){var fe=(0,v.QGY)(ie)?(0,D.D)(ie):ie;return(0,v.CqO)(fe),fe}function Ft(ie){var fe={};return ie.forEach(function(_e){fe=null!=_e?Object.assign(Object.assign({},fe),_e):fe}),0===Object.keys(fe).length?null:fe}function xe(ie,fe){return fe.map(function(_e){return _e(ie)})}function je(ie){return ie.map(function(fe){return function(ie){return!ie.validate}(fe)?fe:function(_e){return fe.validate(_e)}})}function dt(ie){if(!ie)return null;var fe=ie.filter(_t);return 0==fe.length?null:function(_e){return Ft(xe(_e,fe))}}function Qe(ie){return null!=ie?dt(je(ie)):null}function Bt(ie){if(!ie)return null;var fe=ie.filter(_t);return 0==fe.length?null:function(_e){var Ce=xe(_e,fe).map(yt);return(0,k.D)(Ce).pipe((0,M.U)(Ft))}}function xt(ie){return null!=ie?Bt(je(ie)):null}function vt(ie,fe){return null===ie?[fe]:Array.isArray(ie)?[].concat((0,V.Z)(ie),[fe]):[ie,fe]}function Qt(ie){return ie._rawValidators}function Ht(ie){return ie._rawAsyncValidators}function Ct(ie){return ie?Array.isArray(ie)?ie:[ie]:[]}function qt(ie,fe){return Array.isArray(ie)?ie.includes(fe):ie===fe}function bt(ie,fe){var _e=Ct(fe);return Ct(ie).forEach(function(Re){qt(_e,Re)||_e.push(Re)}),_e}function en(ie,fe){return Ct(fe).filter(function(_e){return!qt(ie,_e)})}var Nt=function(){var ie=function(){function fe(){(0,R.Z)(this,fe),this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}return(0,b.Z)(fe,[{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}},{key:"_setValidators",value:function(Ce){this._rawValidators=Ce||[],this._composedValidatorFn=Qe(this._rawValidators)}},{key:"_setAsyncValidators",value:function(Ce){this._rawAsyncValidators=Ce||[],this._composedAsyncValidatorFn=xt(this._rawAsyncValidators)}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}},{key:"_registerOnDestroy",value:function(Ce){this._onDestroyCallbacks.push(Ce)}},{key:"_invokeOnDestroyCallbacks",value:function(){this._onDestroyCallbacks.forEach(function(Ce){return Ce()}),this._onDestroyCallbacks=[]}},{key:"reset",value:function(){var Ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.control&&this.control.reset(Ce)}},{key:"hasError",value:function(Ce,Re){return!!this.control&&this.control.hasError(Ce,Re)}},{key:"getError",value:function(Ce,Re){return this.control?this.control.getError(Ce,Re):null}}]),fe}();return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275dir=v.lG2({type:ie}),ie}(),rn=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(){return(0,R.Z)(this,Ce),_e.apply(this,arguments)}return(0,b.Z)(Ce,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),Ce}(Nt);return ie.\u0275fac=function(){var fe;return function(Ce){return(fe||(fe=v.n5z(ie)))(Ce||ie)}}(),ie.\u0275dir=v.lG2({type:ie,features:[v.qOj]}),ie}(),En=function(ie){(0,Z.Z)(_e,ie);var fe=(0,T.Z)(_e);function _e(){var Ce;return(0,R.Z)(this,_e),(Ce=fe.apply(this,arguments))._parent=null,Ce.name=null,Ce.valueAccessor=null,Ce}return _e}(Nt),Zn=function(){function ie(fe){(0,R.Z)(this,ie),this._cd=fe}return(0,b.Z)(ie,[{key:"is",value:function(_e){var Ce,Re,Ge;return"submitted"===_e?!!(null===(Ce=this._cd)||void 0===Ce?void 0:Ce.submitted):!!(null===(Ge=null===(Re=this._cd)||void 0===Re?void 0:Re.control)||void 0===Ge?void 0:Ge[_e])}}]),ie}(),Rn=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re){return(0,R.Z)(this,Ce),_e.call(this,Re)}return Ce}(Zn);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(En,2))},ie.\u0275dir=v.lG2({type:ie,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(_e,Ce){2&_e&&v.ekj("ng-untouched",Ce.is("untouched"))("ng-touched",Ce.is("touched"))("ng-pristine",Ce.is("pristine"))("ng-dirty",Ce.is("dirty"))("ng-valid",Ce.is("valid"))("ng-invalid",Ce.is("invalid"))("ng-pending",Ce.is("pending"))},features:[v.qOj]}),ie}(),wn=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re){return(0,R.Z)(this,Ce),_e.call(this,Re)}return Ce}(Zn);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(rn,10))},ie.\u0275dir=v.lG2({type:ie,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(_e,Ce){2&_e&&v.ekj("ng-untouched",Ce.is("untouched"))("ng-touched",Ce.is("touched"))("ng-pristine",Ce.is("pristine"))("ng-dirty",Ce.is("dirty"))("ng-valid",Ce.is("valid"))("ng-invalid",Ce.is("invalid"))("ng-pending",Ce.is("pending"))("ng-submitted",Ce.is("submitted"))},features:[v.qOj]}),ie}();function nn(ie,fe){return[].concat((0,V.Z)(fe.path),[ie])}function ln(ie,fe){Yn(ie,fe),fe.valueAccessor.writeValue(ie.value),function(ie,fe){fe.valueAccessor.registerOnChange(function(_e){ie._pendingValue=_e,ie._pendingChange=!0,ie._pendingDirty=!0,"change"===ie.updateOn&&cr(ie,fe)})}(ie,fe),function(ie,fe){var _e=function(Re,Ge){fe.valueAccessor.writeValue(Re),Ge&&fe.viewToModelUpdate(Re)};ie.registerOnChange(_e),fe._registerOnDestroy(function(){ie._unregisterOnChange(_e)})}(ie,fe),function(ie,fe){fe.valueAccessor.registerOnTouched(function(){ie._pendingTouched=!0,"blur"===ie.updateOn&&ie._pendingChange&&cr(ie,fe),"submit"!==ie.updateOn&&ie.markAsTouched()})}(ie,fe),function(ie,fe){if(fe.valueAccessor.setDisabledState){var _e=function(Re){fe.valueAccessor.setDisabledState(Re)};ie.registerOnDisabledChange(_e),fe._registerOnDestroy(function(){ie._unregisterOnDisabledChange(_e)})}}(ie,fe)}function yn(ie,fe){var Ce=function(){};fe.valueAccessor&&(fe.valueAccessor.registerOnChange(Ce),fe.valueAccessor.registerOnTouched(Ce)),Cn(ie,fe),ie&&(fe._invokeOnDestroyCallbacks(),ie._registerOnCollectionChange(function(){}))}function Tn(ie,fe){ie.forEach(function(_e){_e.registerOnValidatorChange&&_e.registerOnValidatorChange(fe)})}function Yn(ie,fe){var _e=Qt(ie);null!==fe.validator?ie.setValidators(vt(_e,fe.validator)):"function"==typeof _e&&ie.setValidators([_e]);var Ce=Ht(ie);null!==fe.asyncValidator?ie.setAsyncValidators(vt(Ce,fe.asyncValidator)):"function"==typeof Ce&&ie.setAsyncValidators([Ce]);var Re=function(){return ie.updateValueAndValidity()};Tn(fe._rawValidators,Re),Tn(fe._rawAsyncValidators,Re)}function Cn(ie,fe){var _e=!1;if(null!==ie){if(null!==fe.validator){var Ce=Qt(ie);if(Array.isArray(Ce)&&Ce.length>0){var Re=Ce.filter(function(gt){return gt!==fe.validator});Re.length!==Ce.length&&(_e=!0,ie.setValidators(Re))}}if(null!==fe.asyncValidator){var Ge=Ht(ie);if(Array.isArray(Ge)&&Ge.length>0){var St=Ge.filter(function(gt){return gt!==fe.asyncValidator});St.length!==Ge.length&&(_e=!0,ie.setAsyncValidators(St))}}}var ht=function(){};return Tn(fe._rawValidators,ht),Tn(fe._rawAsyncValidators,ht),_e}function cr(ie,fe){ie._pendingDirty&&ie.markAsDirty(),ie.setValue(ie._pendingValue,{emitModelToViewChange:!1}),fe.viewToModelUpdate(ie._pendingValue),ie._pendingChange=!1}function Rt(ie,fe){Yn(ie,fe)}function he(ie,fe){if(!ie.hasOwnProperty("model"))return!1;var _e=ie.model;return!!_e.isFirstChange()||!Object.is(fe,_e.currentValue)}function Ne(ie,fe){ie._syncPendingControls(),fe.forEach(function(_e){var Ce=_e.control;"submit"===Ce.updateOn&&Ce._pendingChange&&(_e.viewToModelUpdate(Ce._pendingValue),Ce._pendingChange=!1)})}function Le(ie,fe){if(!fe)return null;Array.isArray(fe);var _e=void 0,Ce=void 0,Re=void 0;return fe.forEach(function(Ge){Ge.constructor===F?_e=Ge:function(ie){return Object.getPrototypeOf(ie.constructor)===g}(Ge)?Ce=Ge:Re=Ge}),Re||Ce||_e||null}function ze(ie,fe){var _e=ie.indexOf(fe);_e>-1&&ie.splice(_e,1)}var an="VALID",qn="INVALID",Nr="PENDING",Vr="DISABLED";function Jr(ie){return(uo(ie)?ie.validators:ie)||null}function lo(ie){return Array.isArray(ie)?Qe(ie):ie||null}function Ri(ie,fe){return(uo(fe)?fe.asyncValidators:ie)||null}function _o(ie){return Array.isArray(ie)?xt(ie):ie||null}function uo(ie){return null!=ie&&!Array.isArray(ie)&&"object"==typeof ie}var Jo=function(){function ie(fe,_e){(0,R.Z)(this,ie),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=fe,this._rawAsyncValidators=_e,this._composedValidatorFn=lo(this._rawValidators),this._composedAsyncValidatorFn=_o(this._rawAsyncValidators)}return(0,b.Z)(ie,[{key:"validator",get:function(){return this._composedValidatorFn},set:function(_e){this._rawValidators=this._composedValidatorFn=_e}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(_e){this._rawAsyncValidators=this._composedAsyncValidatorFn=_e}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===an}},{key:"invalid",get:function(){return this.status===qn}},{key:"pending",get:function(){return this.status==Nr}},{key:"disabled",get:function(){return this.status===Vr}},{key:"enabled",get:function(){return this.status!==Vr}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"setValidators",value:function(_e){this._rawValidators=_e,this._composedValidatorFn=lo(_e)}},{key:"setAsyncValidators",value:function(_e){this._rawAsyncValidators=_e,this._composedAsyncValidatorFn=_o(_e)}},{key:"addValidators",value:function(_e){this.setValidators(bt(_e,this._rawValidators))}},{key:"addAsyncValidators",value:function(_e){this.setAsyncValidators(bt(_e,this._rawAsyncValidators))}},{key:"removeValidators",value:function(_e){this.setValidators(en(_e,this._rawValidators))}},{key:"removeAsyncValidators",value:function(_e){this.setAsyncValidators(en(_e,this._rawAsyncValidators))}},{key:"hasValidator",value:function(_e){return qt(this._rawValidators,_e)}},{key:"hasAsyncValidator",value:function(_e){return qt(this._rawAsyncValidators,_e)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!_e.onlySelf&&this._parent.markAsTouched(_e)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(_e){return _e.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(Ce){Ce.markAsUntouched({onlySelf:!0})}),this._parent&&!_e.onlySelf&&this._parent._updateTouched(_e)}},{key:"markAsDirty",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!_e.onlySelf&&this._parent.markAsDirty(_e)}},{key:"markAsPristine",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(Ce){Ce.markAsPristine({onlySelf:!0})}),this._parent&&!_e.onlySelf&&this._parent._updatePristine(_e)}},{key:"markAsPending",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status=Nr,!1!==_e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!_e.onlySelf&&this._parent.markAsPending(_e)}},{key:"disable",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},Ce=this._parentMarkedDirty(_e.onlySelf);this.status=Vr,this.errors=null,this._forEachChild(function(Re){Re.disable(Object.assign(Object.assign({},_e),{onlySelf:!0}))}),this._updateValue(),!1!==_e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},_e),{skipPristineCheck:Ce})),this._onDisabledChange.forEach(function(Re){return Re(!0)})}},{key:"enable",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},Ce=this._parentMarkedDirty(_e.onlySelf);this.status=an,this._forEachChild(function(Re){Re.enable(Object.assign(Object.assign({},_e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:_e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},_e),{skipPristineCheck:Ce})),this._onDisabledChange.forEach(function(Re){return Re(!1)})}},{key:"_updateAncestors",value:function(_e){this._parent&&!_e.onlySelf&&(this._parent.updateValueAndValidity(_e),_e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(_e){this._parent=_e}},{key:"updateValueAndValidity",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===an||this.status===Nr)&&this._runAsyncValidator(_e.emitEvent)),!1!==_e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!_e.onlySelf&&this._parent.updateValueAndValidity(_e)}},{key:"_updateTreeValidity",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(Ce){return Ce._updateTreeValidity(_e)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:_e.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?Vr:an}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(_e){var Ce=this;if(this.asyncValidator){this.status=Nr,this._hasOwnPendingAsyncValidator=!0;var Re=yt(this.asyncValidator(this));this._asyncValidationSubscription=Re.subscribe(function(Ge){Ce._hasOwnPendingAsyncValidator=!1,Ce.setErrors(Ge,{emitEvent:_e})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(_e){var Ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=_e,this._updateControlsErrors(!1!==Ce.emitEvent)}},{key:"get",value:function(_e){return function(ie,fe,_e){if(null==fe||(Array.isArray(fe)||(fe=fe.split(".")),Array.isArray(fe)&&0===fe.length))return null;var Ce=ie;return fe.forEach(function(Re){Ce=Ce instanceof to?Ce.controls.hasOwnProperty(Re)?Ce.controls[Re]:null:Ce instanceof bi&&Ce.at(Re)||null}),Ce}(this,_e)}},{key:"getError",value:function(_e,Ce){var Re=Ce?this.get(Ce):this;return Re&&Re.errors?Re.errors[_e]:null}},{key:"hasError",value:function(_e,Ce){return!!this.getError(_e,Ce)}},{key:"root",get:function(){for(var _e=this;_e._parent;)_e=_e._parent;return _e}},{key:"_updateControlsErrors",value:function(_e){this.status=this._calculateStatus(),_e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(_e)}},{key:"_initObservables",value:function(){this.valueChanges=new v.vpe,this.statusChanges=new v.vpe}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?Vr:this.errors?qn:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nr)?Nr:this._anyControlsHaveStatus(qn)?qn:an}},{key:"_anyControlsHaveStatus",value:function(_e){return this._anyControls(function(Ce){return Ce.status===_e})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(_e){return _e.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(_e){return _e.touched})}},{key:"_updatePristine",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!_e.onlySelf&&this._parent._updatePristine(_e)}},{key:"_updateTouched",value:function(){var _e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!_e.onlySelf&&this._parent._updateTouched(_e)}},{key:"_isBoxedValue",value:function(_e){return"object"==typeof _e&&null!==_e&&2===Object.keys(_e).length&&"value"in _e&&"disabled"in _e}},{key:"_registerOnCollectionChange",value:function(_e){this._onCollectionChange=_e}},{key:"_setUpdateStrategy",value:function(_e){uo(_e)&&null!=_e.updateOn&&(this._updateOn=_e.updateOn)}},{key:"_parentMarkedDirty",value:function(_e){return!_e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}]),ie}(),wi=function(ie){(0,Z.Z)(_e,ie);var fe=(0,T.Z)(_e);function _e(){var Ce,Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Ge=arguments.length>1?arguments[1]:void 0,St=arguments.length>2?arguments[2]:void 0;return(0,R.Z)(this,_e),(Ce=fe.call(this,Jr(Ge),Ri(St,Ge)))._onChange=[],Ce._applyFormState(Re),Ce._setUpdateStrategy(Ge),Ce._initObservables(),Ce.updateValueAndValidity({onlySelf:!0,emitEvent:!!Ce.asyncValidator}),Ce}return(0,b.Z)(_e,[{key:"setValue",value:function(Re){var Ge=this,St=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=Re,this._onChange.length&&!1!==St.emitModelToViewChange&&this._onChange.forEach(function(ht){return ht(Ge.value,!1!==St.emitViewToModelChange)}),this.updateValueAndValidity(St)}},{key:"patchValue",value:function(Re){var Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(Re,Ge)}},{key:"reset",value:function(){var Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(Re),this.markAsPristine(Ge),this.markAsUntouched(Ge),this.setValue(this.value,Ge),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(Re){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(Re){this._onChange.push(Re)}},{key:"_unregisterOnChange",value:function(Re){ze(this._onChange,Re)}},{key:"registerOnDisabledChange",value:function(Re){this._onDisabledChange.push(Re)}},{key:"_unregisterOnDisabledChange",value:function(Re){ze(this._onDisabledChange,Re)}},{key:"_forEachChild",value:function(Re){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(Re){this._isBoxedValue(Re)?(this.value=this._pendingValue=Re.value,Re.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=Re}}]),_e}(Jo),to=function(ie){(0,Z.Z)(_e,ie);var fe=(0,T.Z)(_e);function _e(Ce,Re,Ge){var St;return(0,R.Z)(this,_e),(St=fe.call(this,Jr(Re),Ri(Ge,Re))).controls=Ce,St._initObservables(),St._setUpdateStrategy(Re),St._setUpControls(),St.updateValueAndValidity({onlySelf:!0,emitEvent:!!St.asyncValidator}),St}return(0,b.Z)(_e,[{key:"registerControl",value:function(Re,Ge){return this.controls[Re]?this.controls[Re]:(this.controls[Re]=Ge,Ge.setParent(this),Ge._registerOnCollectionChange(this._onCollectionChange),Ge)}},{key:"addControl",value:function(Re,Ge){var St=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.registerControl(Re,Ge),this.updateValueAndValidity({emitEvent:St.emitEvent}),this._onCollectionChange()}},{key:"removeControl",value:function(Re){var Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.controls[Re]&&this.controls[Re]._registerOnCollectionChange(function(){}),delete this.controls[Re],this.updateValueAndValidity({emitEvent:Ge.emitEvent}),this._onCollectionChange()}},{key:"setControl",value:function(Re,Ge){var St=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.controls[Re]&&this.controls[Re]._registerOnCollectionChange(function(){}),delete this.controls[Re],Ge&&this.registerControl(Re,Ge),this.updateValueAndValidity({emitEvent:St.emitEvent}),this._onCollectionChange()}},{key:"contains",value:function(Re){return this.controls.hasOwnProperty(Re)&&this.controls[Re].enabled}},{key:"setValue",value:function(Re){var Ge=this,St=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(Re),Object.keys(Re).forEach(function(ht){Ge._throwIfControlMissing(ht),Ge.controls[ht].setValue(Re[ht],{onlySelf:!0,emitEvent:St.emitEvent})}),this.updateValueAndValidity(St)}},{key:"patchValue",value:function(Re){var Ge=this,St=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null!=Re&&(Object.keys(Re).forEach(function(ht){Ge.controls[ht]&&Ge.controls[ht].patchValue(Re[ht],{onlySelf:!0,emitEvent:St.emitEvent})}),this.updateValueAndValidity(St))}},{key:"reset",value:function(){var Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(St,ht){St.reset(Re[ht],{onlySelf:!0,emitEvent:Ge.emitEvent})}),this._updatePristine(Ge),this._updateTouched(Ge),this.updateValueAndValidity(Ge)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(Re,Ge,St){return Re[St]=Ge instanceof wi?Ge.value:Ge.getRawValue(),Re})}},{key:"_syncPendingControls",value:function(){var Re=this._reduceChildren(!1,function(Ge,St){return!!St._syncPendingControls()||Ge});return Re&&this.updateValueAndValidity({onlySelf:!0}),Re}},{key:"_throwIfControlMissing",value:function(Re){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[Re])throw new Error("Cannot find form control with name: ".concat(Re,"."))}},{key:"_forEachChild",value:function(Re){var Ge=this;Object.keys(this.controls).forEach(function(St){var ht=Ge.controls[St];ht&&Re(ht,St)})}},{key:"_setUpControls",value:function(){var Re=this;this._forEachChild(function(Ge){Ge.setParent(Re),Ge._registerOnCollectionChange(Re._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(Re){for(var Ge=0,St=Object.keys(this.controls);Ge0||this.disabled}},{key:"_checkAllValuesPresent",value:function(Re){this._forEachChild(function(Ge,St){if(void 0===Re[St])throw new Error("Must supply a value for form control with name: '".concat(St,"'."))})}}]),_e}(Jo),bi=function(ie){(0,Z.Z)(_e,ie);var fe=(0,T.Z)(_e);function _e(Ce,Re,Ge){var St;return(0,R.Z)(this,_e),(St=fe.call(this,Jr(Re),Ri(Ge,Re))).controls=Ce,St._initObservables(),St._setUpdateStrategy(Re),St._setUpControls(),St.updateValueAndValidity({onlySelf:!0,emitEvent:!!St.asyncValidator}),St}return(0,b.Z)(_e,[{key:"at",value:function(Re){return this.controls[Re]}},{key:"push",value:function(Re){var Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.controls.push(Re),this._registerControl(Re),this.updateValueAndValidity({emitEvent:Ge.emitEvent}),this._onCollectionChange()}},{key:"insert",value:function(Re,Ge){var St=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.controls.splice(Re,0,Ge),this._registerControl(Ge),this.updateValueAndValidity({emitEvent:St.emitEvent})}},{key:"removeAt",value:function(Re){var Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.controls[Re]&&this.controls[Re]._registerOnCollectionChange(function(){}),this.controls.splice(Re,1),this.updateValueAndValidity({emitEvent:Ge.emitEvent})}},{key:"setControl",value:function(Re,Ge){var St=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.controls[Re]&&this.controls[Re]._registerOnCollectionChange(function(){}),this.controls.splice(Re,1),Ge&&(this.controls.splice(Re,0,Ge),this._registerControl(Ge)),this.updateValueAndValidity({emitEvent:St.emitEvent}),this._onCollectionChange()}},{key:"length",get:function(){return this.controls.length}},{key:"setValue",value:function(Re){var Ge=this,St=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(Re),Re.forEach(function(ht,gt){Ge._throwIfControlMissing(gt),Ge.at(gt).setValue(ht,{onlySelf:!0,emitEvent:St.emitEvent})}),this.updateValueAndValidity(St)}},{key:"patchValue",value:function(Re){var Ge=this,St=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null!=Re&&(Re.forEach(function(ht,gt){Ge.at(gt)&&Ge.at(gt).patchValue(ht,{onlySelf:!0,emitEvent:St.emitEvent})}),this.updateValueAndValidity(St))}},{key:"reset",value:function(){var Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],Ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(St,ht){St.reset(Re[ht],{onlySelf:!0,emitEvent:Ge.emitEvent})}),this._updatePristine(Ge),this._updateTouched(Ge),this.updateValueAndValidity(Ge)}},{key:"getRawValue",value:function(){return this.controls.map(function(Re){return Re instanceof wi?Re.value:Re.getRawValue()})}},{key:"clear",value:function(){var Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.controls.length<1||(this._forEachChild(function(Ge){return Ge._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity({emitEvent:Re.emitEvent}))}},{key:"_syncPendingControls",value:function(){var Re=this.controls.reduce(function(Ge,St){return!!St._syncPendingControls()||Ge},!1);return Re&&this.updateValueAndValidity({onlySelf:!0}),Re}},{key:"_throwIfControlMissing",value:function(Re){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(Re))throw new Error("Cannot find form control at index ".concat(Re))}},{key:"_forEachChild",value:function(Re){this.controls.forEach(function(Ge,St){Re(Ge,St)})}},{key:"_updateValue",value:function(){var Re=this;this.value=this.controls.filter(function(Ge){return Ge.enabled||Re.disabled}).map(function(Ge){return Ge.value})}},{key:"_anyControls",value:function(Re){return this.controls.some(function(Ge){return Ge.enabled&&Re(Ge)})}},{key:"_setUpControls",value:function(){var Re=this;this._forEachChild(function(Ge){return Re._registerControl(Ge)})}},{key:"_checkAllValuesPresent",value:function(Re){this._forEachChild(function(Ge,St){if(void 0===Re[St])throw new Error("Must supply a value for form control at index: ".concat(St,"."))})}},{key:"_allControlsDisabled",value:function(){var Ge,Re=(0,B.Z)(this.controls);try{for(Re.s();!(Ge=Re.n()).done;)if(Ge.value.enabled)return!1}catch(ht){Re.e(ht)}finally{Re.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(Re){Re.setParent(this),Re._registerOnCollectionChange(this._onCollectionChange)}}]),_e}(Jo),Wi={provide:rn,useExisting:(0,v.Gpc)(function(){return Bo})},pi=function(){return Promise.resolve(null)}(),Bo=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re,Ge){var St;return(0,R.Z)(this,Ce),(St=_e.call(this)).submitted=!1,St._directives=[],St.ngSubmit=new v.vpe,St.form=new to({},Qe(Re),xt(Ge)),St}return(0,b.Z)(Ce,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}},{key:"addControl",value:function(Ge){var St=this;pi.then(function(){var ht=St._findContainer(Ge.path);Ge.control=ht.registerControl(Ge.name,Ge.control),ln(Ge.control,Ge),Ge.control.updateValueAndValidity({emitEvent:!1}),St._directives.push(Ge)})}},{key:"getControl",value:function(Ge){return this.form.get(Ge.path)}},{key:"removeControl",value:function(Ge){var St=this;pi.then(function(){var ht=St._findContainer(Ge.path);ht&&ht.removeControl(Ge.name),ze(St._directives,Ge)})}},{key:"addFormGroup",value:function(Ge){var St=this;pi.then(function(){var ht=St._findContainer(Ge.path),gt=new to({});Rt(gt,Ge),ht.registerControl(Ge.name,gt),gt.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(Ge){var St=this;pi.then(function(){var ht=St._findContainer(Ge.path);ht&&ht.removeControl(Ge.name)})}},{key:"getFormGroup",value:function(Ge){return this.form.get(Ge.path)}},{key:"updateModel",value:function(Ge,St){var ht=this;pi.then(function(){ht.form.get(Ge.path).setValue(St)})}},{key:"setValue",value:function(Ge){this.control.setValue(Ge)}},{key:"onSubmit",value:function(Ge){return this.submitted=!0,Ne(this.form,this._directives),this.ngSubmit.emit(Ge),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var Ge=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(Ge),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(Ge){return Ge.pop(),Ge.length?this.form.get(Ge):this.form}}]),Ce}(rn);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(j,10),v.Y36(J,10))},ie.\u0275dir=v.lG2({type:ie,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(_e,Ce){1&_e&&v.NdJ("submit",function(Ge){return Ce.onSubmit(Ge)})("reset",function(){return Ce.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[v._Bn([Wi]),v.qOj]}),ie}(),Xt={provide:En,useExisting:(0,v.Gpc)(function(){return jn})},Gn=function(){return Promise.resolve(null)}(),jn=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re,Ge,St,ht){var gt;return(0,R.Z)(this,Ce),(gt=_e.call(this)).control=new wi,gt._registered=!1,gt.update=new v.vpe,gt._parent=Re,gt._setValidators(Ge),gt._setAsyncValidators(St),gt.valueAccessor=Le((0,U.Z)(gt),ht),gt}return(0,b.Z)(Ce,[{key:"ngOnChanges",value:function(Ge){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in Ge&&this._updateDisabled(Ge),he(Ge,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"path",get:function(){return this._parent?nn(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"viewToModelUpdate",value:function(Ge){this.viewModel=Ge,this.update.emit(Ge)}},{key:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){ln(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(Ge){var St=this;Gn.then(function(){St.control.setValue(Ge,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(Ge){var St=this,ht=Ge.isDisabled.currentValue,gt=""===ht||ht&&"false"!==ht;Gn.then(function(){gt&&!St.control.disabled?St.control.disable():!gt&&St.control.disabled&&St.control.enable()})}}]),Ce}(En);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(rn,9),v.Y36(j,10),v.Y36(J,10),v.Y36(E,10))},ie.\u0275dir=v.lG2({type:ie,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[v._Bn([Xt]),v.qOj,v.TTD]}),ie}(),zn=function(){var ie=function fe(){(0,R.Z)(this,fe)};return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275dir=v.lG2({type:ie,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),ie}(),ai={provide:E,useExisting:(0,v.Gpc)(function(){return Ci}),multi:!0},Ci=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(){return(0,R.Z)(this,Ce),_e.apply(this,arguments)}return(0,b.Z)(Ce,[{key:"writeValue",value:function(Ge){this.setProperty("value",null==Ge?"":Ge)}},{key:"registerOnChange",value:function(Ge){this.onChange=function(St){Ge(""==St?null:parseFloat(St))}}}]),Ce}(g);return ie.\u0275fac=function(){var fe;return function(Ce){return(fe||(fe=v.n5z(ie)))(Ce||ie)}}(),ie.\u0275dir=v.lG2({type:ie,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(_e,Ce){1&_e&&v.NdJ("input",function(Ge){return Ce.onChange(Ge.target.value)})("blur",function(){return Ce.onTouched()})},features:[v._Bn([ai]),v.qOj]}),ie}(),Li=function(){var ie=function fe(){(0,R.Z)(this,fe)};return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275mod=v.oAB({type:ie}),ie.\u0275inj=v.cJS({}),ie}(),Uo=new v.OlP("NgModelWithFormControlWarning"),Gi={provide:rn,useExisting:(0,v.Gpc)(function(){return Ho})},Ho=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re,Ge){var St;return(0,R.Z)(this,Ce),(St=_e.call(this)).validators=Re,St.asyncValidators=Ge,St.submitted=!1,St._onCollectionChange=function(){return St._updateDomValue()},St.directives=[],St.form=null,St.ngSubmit=new v.vpe,St._setValidators(Re),St._setAsyncValidators(Ge),St}return(0,b.Z)(Ce,[{key:"ngOnChanges",value:function(Ge){this._checkFormPresent(),Ge.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"ngOnDestroy",value:function(){this.form&&(Cn(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(function(){}))}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"addControl",value:function(Ge){var St=this.form.get(Ge.path);return ln(St,Ge),St.updateValueAndValidity({emitEvent:!1}),this.directives.push(Ge),St}},{key:"getControl",value:function(Ge){return this.form.get(Ge.path)}},{key:"removeControl",value:function(Ge){yn(Ge.control||null,Ge),ze(this.directives,Ge)}},{key:"addFormGroup",value:function(Ge){this._setUpFormContainer(Ge)}},{key:"removeFormGroup",value:function(Ge){this._cleanUpFormContainer(Ge)}},{key:"getFormGroup",value:function(Ge){return this.form.get(Ge.path)}},{key:"addFormArray",value:function(Ge){this._setUpFormContainer(Ge)}},{key:"removeFormArray",value:function(Ge){this._cleanUpFormContainer(Ge)}},{key:"getFormArray",value:function(Ge){return this.form.get(Ge.path)}},{key:"updateModel",value:function(Ge,St){this.form.get(Ge.path).setValue(St)}},{key:"onSubmit",value:function(Ge){return this.submitted=!0,Ne(this.form,this.directives),this.ngSubmit.emit(Ge),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var Ge=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(Ge),this.submitted=!1}},{key:"_updateDomValue",value:function(){var Ge=this;this.directives.forEach(function(St){var ht=St.control,gt=Ge.form.get(St.path);ht!==gt&&(yn(ht||null,St),gt instanceof wi&&(ln(gt,St),St.control=gt))}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_setUpFormContainer",value:function(Ge){var St=this.form.get(Ge.path);Rt(St,Ge),St.updateValueAndValidity({emitEvent:!1})}},{key:"_cleanUpFormContainer",value:function(Ge){if(this.form){var St=this.form.get(Ge.path);St&&function(ie,fe){return Cn(ie,fe)}(St,Ge)&&St.updateValueAndValidity({emitEvent:!1})}}},{key:"_updateRegistrations",value:function(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){Yn(this.form,this),this._oldForm&&Cn(this._oldForm,this)}},{key:"_checkFormPresent",value:function(){}}]),Ce}(rn);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(j,10),v.Y36(J,10))},ie.\u0275dir=v.lG2({type:ie,selectors:[["","formGroup",""]],hostBindings:function(_e,Ce){1&_e&&v.NdJ("submit",function(Ge){return Ce.onSubmit(Ge)})("reset",function(){return Ce.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[v._Bn([Gi]),v.qOj,v.TTD]}),ie}(),po={provide:En,useExisting:(0,v.Gpc)(function(){return ha})},ha=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(Re,Ge,St,ht,gt){var Kr;return(0,R.Z)(this,Ce),(Kr=_e.call(this))._ngModelWarningConfig=gt,Kr._added=!1,Kr.update=new v.vpe,Kr._ngModelWarningSent=!1,Kr._parent=Re,Kr._setValidators(Ge),Kr._setAsyncValidators(St),Kr.valueAccessor=Le((0,U.Z)(Kr),ht),Kr}return(0,b.Z)(Ce,[{key:"isDisabled",set:function(Ge){}},{key:"ngOnChanges",value:function(Ge){this._added||this._setUpControl(),he(Ge,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(Ge){this.viewModel=Ge,this.update.emit(Ge)}},{key:"path",get:function(){return nn(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"_checkParentType",value:function(){}},{key:"_setUpControl",value:function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}]),Ce}(En);return ie.\u0275fac=function(_e){return new(_e||ie)(v.Y36(rn,13),v.Y36(j,10),v.Y36(J,10),v.Y36(E,10),v.Y36(Uo,8))},ie.\u0275dir=v.lG2({type:ie,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[v._Bn([po]),v.qOj,v.TTD]}),ie._ngModelWarningSentOnce=!1,ie}(),_r={provide:j,useExisting:(0,v.Gpc)(function(){return Da}),multi:!0},Fn={provide:j,useExisting:(0,v.Gpc)(function(){return Bi}),multi:!0},Da=function(){var ie=function(){function fe(){(0,R.Z)(this,fe),this._required=!1}return(0,b.Z)(fe,[{key:"required",get:function(){return this._required},set:function(Ce){this._required=null!=Ce&&!1!==Ce&&"false"!=="".concat(Ce),this._onChange&&this._onChange()}},{key:"validate",value:function(Ce){return this.required?ce(Ce):null}},{key:"registerOnValidatorChange",value:function(Ce){this._onChange=Ce}}]),fe}();return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275dir=v.lG2({type:ie,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(_e,Ce){2&_e&&v.uIk("required",Ce.required?"":null)},inputs:{required:"required"},features:[v._Bn([_r])]}),ie}(),Bi=function(){var ie=function(fe){(0,Z.Z)(Ce,fe);var _e=(0,T.Z)(Ce);function Ce(){return(0,R.Z)(this,Ce),_e.apply(this,arguments)}return(0,b.Z)(Ce,[{key:"validate",value:function(Ge){return this.required?le(Ge):null}}]),Ce}(Da);return ie.\u0275fac=function(){var fe;return function(Ce){return(fe||(fe=v.n5z(ie)))(Ce||ie)}}(),ie.\u0275dir=v.lG2({type:ie,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(_e,Ce){2&_e&&v.uIk("required",Ce.required?"":null)},features:[v._Bn([Fn]),v.qOj]}),ie}(),yl=function(){var ie=function fe(){(0,R.Z)(this,fe)};return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275mod=v.oAB({type:ie}),ie.\u0275inj=v.cJS({imports:[[Li]]}),ie}(),bl=function(){var ie=function fe(){(0,R.Z)(this,fe)};return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275mod=v.oAB({type:ie}),ie.\u0275inj=v.cJS({imports:[yl]}),ie}(),pe=function(){var ie=function(){function fe(){(0,R.Z)(this,fe)}return(0,b.Z)(fe,null,[{key:"withConfig",value:function(Ce){return{ngModule:fe,providers:[{provide:Uo,useValue:Ce.warnOnNgModelWithFormControl}]}}}]),fe}();return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275mod=v.oAB({type:ie}),ie.\u0275inj=v.cJS({imports:[yl]}),ie}();function Fe(ie){return void 0!==ie.asyncValidators||void 0!==ie.validators||void 0!==ie.updateOn}var $e=function(){var ie=function(){function fe(){(0,R.Z)(this,fe)}return(0,b.Z)(fe,[{key:"group",value:function(Ce){var Re=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,Ge=this._reduceControls(Ce),St=null,ht=null,gt=void 0;return null!=Re&&(Fe(Re)?(St=null!=Re.validators?Re.validators:null,ht=null!=Re.asyncValidators?Re.asyncValidators:null,gt=null!=Re.updateOn?Re.updateOn:void 0):(St=null!=Re.validator?Re.validator:null,ht=null!=Re.asyncValidator?Re.asyncValidator:null)),new to(Ge,{asyncValidators:ht,updateOn:gt,validators:St})}},{key:"control",value:function(Ce,Re,Ge){return new wi(Ce,Re,Ge)}},{key:"array",value:function(Ce,Re,Ge){var St=this,ht=Ce.map(function(gt){return St._createControl(gt)});return new bi(ht,Re,Ge)}},{key:"_reduceControls",value:function(Ce){var Re=this,Ge={};return Object.keys(Ce).forEach(function(St){Ge[St]=Re._createControl(Ce[St])}),Ge}},{key:"_createControl",value:function(Ce){return Ce instanceof wi||Ce instanceof to||Ce instanceof bi?Ce:Array.isArray(Ce)?this.control(Ce[0],Ce.length>1?Ce[1]:null,Ce.length>2?Ce[2]:null):this.control(Ce)}}]),fe}();return ie.\u0275fac=function(_e){return new(_e||ie)},ie.\u0275prov=(0,v.Yz7)({factory:function(){return new ie},token:ie,providedIn:pe}),ie}()},59412:function(ue,q,f){"use strict";f.d(q,{yN:function(){return ee},mZ:function(){return $},rD:function(){return rn},K7:function(){return Pn},HF:function(){return nn},Y2:function(){return ct},BQ:function(){return le},X2:function(){return En},uc:function(){return $n},Nv:function(){return Yn},ey:function(){return cr},Ng:function(){return Lt},nP:function(){return Kt},us:function(){return Jt},wG:function(){return ft},si:function(){return Yt},IR:function(){return ye},CB:function(){return Ut},jH:function(){return Rt},pj:function(){return Ae},Kr:function(){return be},Id:function(){return oe},FD:function(){return qe},dB:function(){return _t},sb:function(){return it},E0:function(){return Zn}}),f(88009),f(13920),f(89200);var Z=f(10509),T=f(97154),R=f(14105),b=f(18967),v=f(38999),I=f(6517),D=f(8392),k=new v.GfV("12.2.12"),M=f(40098),_=f(15427),g=f(78081),E=f(68707),N=f(89797),A=f(57682),w=f(38480),S=f(32819),O=["*",[["mat-option"],["ng-container"]]],F=["*","mat-option, ng-container"];function z(Pe,rt){if(1&Pe&&v._UZ(0,"mat-pseudo-checkbox",4),2&Pe){var he=v.oxw();v.Q6J("state",he.selected?"checked":"unchecked")("disabled",he.disabled)}}function K(Pe,rt){if(1&Pe&&(v.TgZ(0,"span",5),v._uU(1),v.qZA()),2&Pe){var he=v.oxw();v.xp6(1),v.hij("(",he.group.label,")")}}var j=["*"],ee=function(){var Pe=function rt(){(0,b.Z)(this,rt)};return Pe.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",Pe.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",Pe.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",Pe.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",Pe}(),$=function(){var Pe=function rt(){(0,b.Z)(this,rt)};return Pe.COMPLEX="375ms",Pe.ENTERING="225ms",Pe.EXITING="195ms",Pe}(),ae=new v.GfV("12.2.12"),ce=new v.OlP("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),le=function(){var Pe=function(){function rt(he,Ie,Ne){(0,b.Z)(this,rt),this._hasDoneGlobalChecks=!1,this._document=Ne,he._applyBodyHighContrastModeCssClasses(),this._sanityChecks=Ie,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return(0,R.Z)(rt,[{key:"_checkIsEnabled",value:function(Ie){return!(!(0,v.X6Q)()||(0,_.Oy)())&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[Ie])}},{key:"_checkDoctypeIsDefined",value:function(){this._checkIsEnabled("doctype")&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){if(this._checkIsEnabled("theme")&&this._document.body&&"function"==typeof getComputedStyle){var Ie=this._document.createElement("div");Ie.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(Ie);var Ne=getComputedStyle(Ie);Ne&&"none"!==Ne.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(Ie)}}},{key:"_checkCdkVersionMatch",value:function(){this._checkIsEnabled("version")&&ae.full!==k.full&&console.warn("The Angular Material version ("+ae.full+") does not match the Angular CDK version ("+k.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),rt}();return Pe.\u0275fac=function(he){return new(he||Pe)(v.LFG(I.qm),v.LFG(ce,8),v.LFG(M.K0))},Pe.\u0275mod=v.oAB({type:Pe}),Pe.\u0275inj=v.cJS({imports:[[D.vT],D.vT]}),Pe}();function oe(Pe){return function(rt){(0,Z.Z)(Ie,rt);var he=(0,T.Z)(Ie);function Ie(){var Ne;(0,b.Z)(this,Ie);for(var Le=arguments.length,ze=new Array(Le),At=0;At1&&void 0!==arguments[1]?arguments[1]:0;return function(he){(0,Z.Z)(Ne,he);var Ie=(0,T.Z)(Ne);function Ne(){var Le;(0,b.Z)(this,Ne);for(var ze=arguments.length,At=new Array(ze),an=0;an2&&void 0!==arguments[2]?arguments[2]:"mat";Pe.changes.pipe((0,A.O)(Pe)).subscribe(function(Ie){var Ne=Ie.length;In(rt,"".concat(he,"-2-line"),!1),In(rt,"".concat(he,"-3-line"),!1),In(rt,"".concat(he,"-multi-line"),!1),2===Ne||3===Ne?In(rt,"".concat(he,"-").concat(Ne,"-line"),!0):Ne>3&&In(rt,"".concat(he,"-multi-line"),!0)})}function In(Pe,rt,he){var Ie=Pe.nativeElement.classList;he?Ie.add(rt):Ie.remove(rt)}var $n=function(){var Pe=function rt(){(0,b.Z)(this,rt)};return Pe.\u0275fac=function(he){return new(he||Pe)},Pe.\u0275mod=v.oAB({type:Pe}),Pe.\u0275inj=v.cJS({imports:[[le],le]}),Pe}(),Rn=function(){function Pe(rt,he,Ie){(0,b.Z)(this,Pe),this._renderer=rt,this.element=he,this.config=Ie,this.state=3}return(0,R.Z)(Pe,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),Pe}(),wn={enterDuration:225,exitDuration:150},ut=(0,_.i$)({passive:!0}),He=["mousedown","touchstart"],ve=["mouseup","mouseleave","touchend","touchcancel"],ye=function(){function Pe(rt,he,Ie,Ne){(0,b.Z)(this,Pe),this._target=rt,this._ngZone=he,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,Ne.isBrowser&&(this._containerElement=(0,g.fI)(Ie))}return(0,R.Z)(Pe,[{key:"fadeInRipple",value:function(he,Ie){var Ne=this,Le=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ze=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),At=Object.assign(Object.assign({},wn),Le.animation);Le.centered&&(he=ze.left+ze.width/2,Ie=ze.top+ze.height/2);var an=Le.radius||we(he,Ie,ze),qn=he-ze.left,Nr=Ie-ze.top,Vr=At.enterDuration,br=document.createElement("div");br.classList.add("mat-ripple-element"),br.style.left="".concat(qn-an,"px"),br.style.top="".concat(Nr-an,"px"),br.style.height="".concat(2*an,"px"),br.style.width="".concat(2*an,"px"),null!=Le.color&&(br.style.backgroundColor=Le.color),br.style.transitionDuration="".concat(Vr,"ms"),this._containerElement.appendChild(br),Te(br),br.style.transform="scale(1)";var Jr=new Rn(this,br,Le);return Jr.state=0,this._activeRipples.add(Jr),Le.persistent||(this._mostRecentTransientRipple=Jr),this._runTimeoutOutsideZone(function(){var lo=Jr===Ne._mostRecentTransientRipple;Jr.state=1,!Le.persistent&&(!lo||!Ne._isPointerDown)&&Jr.fadeOut()},Vr),Jr}},{key:"fadeOutRipple",value:function(he){var Ie=this._activeRipples.delete(he);if(he===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),Ie){var Ne=he.element,Le=Object.assign(Object.assign({},wn),he.config.animation);Ne.style.transitionDuration="".concat(Le.exitDuration,"ms"),Ne.style.opacity="0",he.state=2,this._runTimeoutOutsideZone(function(){he.state=3,Ne.parentNode.removeChild(Ne)},Le.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(he){return he.fadeOut()})}},{key:"fadeOutAllNonPersistent",value:function(){this._activeRipples.forEach(function(he){he.config.persistent||he.fadeOut()})}},{key:"setupTriggerEvents",value:function(he){var Ie=(0,g.fI)(he);!Ie||Ie===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=Ie,this._registerEvents(He))}},{key:"handleEvent",value:function(he){"mousedown"===he.type?this._onMousedown(he):"touchstart"===he.type?this._onTouchStart(he):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(ve),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(he){var Ie=(0,I.X6)(he),Ne=this._lastTouchStartEvent&&Date.now()1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(he,Ie)})}},{key:"_registerEvents",value:function(he){var Ie=this;this._ngZone.runOutsideAngular(function(){he.forEach(function(Ne){Ie._triggerElement.addEventListener(Ne,Ie,ut)})})}},{key:"_removeTriggerEvents",value:function(){var he=this;this._triggerElement&&(He.forEach(function(Ie){he._triggerElement.removeEventListener(Ie,he,ut)}),this._pointerUpEventsRegistered&&ve.forEach(function(Ie){he._triggerElement.removeEventListener(Ie,he,ut)}))}}]),Pe}();function Te(Pe){window.getComputedStyle(Pe).getPropertyValue("opacity")}function we(Pe,rt,he){var Ie=Math.max(Math.abs(Pe-he.left),Math.abs(Pe-he.right)),Ne=Math.max(Math.abs(rt-he.top),Math.abs(rt-he.bottom));return Math.sqrt(Ie*Ie+Ne*Ne)}var ct=new v.OlP("mat-ripple-global-options"),ft=function(){var Pe=function(){function rt(he,Ie,Ne,Le,ze){(0,b.Z)(this,rt),this._elementRef=he,this._animationMode=ze,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=Le||{},this._rippleRenderer=new ye(this,Ie,he,Ne)}return(0,R.Z)(rt,[{key:"disabled",get:function(){return this._disabled},set:function(Ie){Ie&&this.fadeOutAllNonPersistent(),this._disabled=Ie,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(Ie){this._trigger=Ie,this._setupTriggerEventsIfEnabled()}},{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"fadeOutAllNonPersistent",value:function(){this._rippleRenderer.fadeOutAllNonPersistent()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(Ie){var Ne=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,Le=arguments.length>2?arguments[2]:void 0;return"number"==typeof Ie?this._rippleRenderer.fadeInRipple(Ie,Ne,Object.assign(Object.assign({},this.rippleConfig),Le)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),Ie))}}]),rt}();return Pe.\u0275fac=function(he){return new(he||Pe)(v.Y36(v.SBq),v.Y36(v.R0b),v.Y36(_.t4),v.Y36(ct,8),v.Y36(w.Qb,8))},Pe.\u0275dir=v.lG2({type:Pe,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(he,Ie){2&he&&v.ekj("mat-ripple-unbounded",Ie.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),Pe}(),Yt=function(){var Pe=function rt(){(0,b.Z)(this,rt)};return Pe.\u0275fac=function(he){return new(he||Pe)},Pe.\u0275mod=v.oAB({type:Pe}),Pe.\u0275inj=v.cJS({imports:[[le,_.ud],le]}),Pe}(),Kt=function(){var Pe=function rt(he){(0,b.Z)(this,rt),this._animationMode=he,this.state="unchecked",this.disabled=!1};return Pe.\u0275fac=function(he){return new(he||Pe)(v.Y36(w.Qb,8))},Pe.\u0275cmp=v.Xpm({type:Pe,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(he,Ie){2&he&&v.ekj("mat-pseudo-checkbox-indeterminate","indeterminate"===Ie.state)("mat-pseudo-checkbox-checked","checked"===Ie.state)("mat-pseudo-checkbox-disabled",Ie.disabled)("_mat-animation-noopable","NoopAnimations"===Ie._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(he,Ie){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),Pe}(),Jt=function(){var Pe=function rt(){(0,b.Z)(this,rt)};return Pe.\u0275fac=function(he){return new(he||Pe)},Pe.\u0275mod=v.oAB({type:Pe}),Pe.\u0275inj=v.cJS({imports:[[le]]}),Pe}(),nn=new v.OlP("MAT_OPTION_PARENT_COMPONENT"),ln=oe(function(){return function Pe(){(0,b.Z)(this,Pe)}}()),yn=0,Tn=function(){var Pe=function(rt){(0,Z.Z)(Ie,rt);var he=(0,T.Z)(Ie);function Ie(Ne){var Le,ze;return(0,b.Z)(this,Ie),(Le=he.call(this))._labelId="mat-optgroup-label-".concat(yn++),Le._inert=null!==(ze=null==Ne?void 0:Ne.inertGroups)&&void 0!==ze&&ze,Le}return Ie}(ln);return Pe.\u0275fac=function(he){return new(he||Pe)(v.Y36(nn,8))},Pe.\u0275dir=v.lG2({type:Pe,inputs:{label:"label"},features:[v.qOj]}),Pe}(),Pn=new v.OlP("MatOptgroup"),Yn=function(){var Pe=function(rt){(0,Z.Z)(Ie,rt);var he=(0,T.Z)(Ie);function Ie(){return(0,b.Z)(this,Ie),he.apply(this,arguments)}return Ie}(Tn);return Pe.\u0275fac=function(){var rt;return function(Ie){return(rt||(rt=v.n5z(Pe)))(Ie||Pe)}}(),Pe.\u0275cmp=v.Xpm({type:Pe,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-optgroup"],hostVars:5,hostBindings:function(he,Ie){2&he&&(v.uIk("role",Ie._inert?null:"group")("aria-disabled",Ie._inert?null:Ie.disabled.toString())("aria-labelledby",Ie._inert?null:Ie._labelId),v.ekj("mat-optgroup-disabled",Ie.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[v._Bn([{provide:Pn,useExisting:Pe}]),v.qOj],ngContentSelectors:F,decls:4,vars:2,consts:[["aria-hidden","true",1,"mat-optgroup-label",3,"id"]],template:function(he,Ie){1&he&&(v.F$t(O),v.TgZ(0,"span",0),v._uU(1),v.Hsn(2),v.qZA(),v.Hsn(3,1)),2&he&&(v.Q6J("id",Ie._labelId),v.xp6(1),v.hij("",Ie.label," "))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),Pe}(),Cn=0,Sn=function Pe(rt){var he=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,b.Z)(this,Pe),this.source=rt,this.isUserInput=he},tr=function(){var Pe=function(){function rt(he,Ie,Ne,Le){(0,b.Z)(this,rt),this._element=he,this._changeDetectorRef=Ie,this._parent=Ne,this.group=Le,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(Cn++),this.onSelectionChange=new v.vpe,this._stateChanges=new E.xQ}return(0,R.Z)(rt,[{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(Ie){this._disabled=(0,g.Ig)(Ie)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(Ie,Ne){var Le=this._getHostElement();"function"==typeof Le.focus&&Le.focus(Ne)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(Ie){(Ie.keyCode===S.K5||Ie.keyCode===S.L_)&&!(0,S.Vb)(Ie)&&(this._selectViaInteraction(),Ie.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var Ie=this.viewValue;Ie!==this._mostRecentViewValue&&(this._mostRecentViewValue=Ie,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var Ie=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new Sn(this,Ie))}}]),rt}();return Pe.\u0275fac=function(he){return new(he||Pe)(v.Y36(v.SBq),v.Y36(v.sBO),v.Y36(void 0),v.Y36(Tn))},Pe.\u0275dir=v.lG2({type:Pe,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),Pe}(),cr=function(){var Pe=function(rt){(0,Z.Z)(Ie,rt);var he=(0,T.Z)(Ie);function Ie(Ne,Le,ze,At){return(0,b.Z)(this,Ie),he.call(this,Ne,Le,ze,At)}return Ie}(tr);return Pe.\u0275fac=function(he){return new(he||Pe)(v.Y36(v.SBq),v.Y36(v.sBO),v.Y36(nn,8),v.Y36(Pn,8))},Pe.\u0275cmp=v.Xpm({type:Pe,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(he,Ie){1&he&&v.NdJ("click",function(){return Ie._selectViaInteraction()})("keydown",function(Le){return Ie._handleKeydown(Le)}),2&he&&(v.Ikx("id",Ie.id),v.uIk("tabindex",Ie._getTabIndex())("aria-selected",Ie._getAriaSelected())("aria-disabled",Ie.disabled.toString()),v.ekj("mat-selected",Ie.selected)("mat-option-multiple",Ie.multiple)("mat-active",Ie.active)("mat-option-disabled",Ie.disabled))},exportAs:["matOption"],features:[v.qOj],ngContentSelectors:j,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(he,Ie){1&he&&(v.F$t(),v.YNc(0,z,1,2,"mat-pseudo-checkbox",0),v.TgZ(1,"span",1),v.Hsn(2),v.qZA(),v.YNc(3,K,2,1,"span",2),v._UZ(4,"div",3)),2&he&&(v.Q6J("ngIf",Ie.multiple),v.xp6(3),v.Q6J("ngIf",Ie.group&&Ie.group._inert),v.xp6(1),v.Q6J("matRippleTrigger",Ie._getHostElement())("matRippleDisabled",Ie.disabled||Ie.disableRipple))},directives:[M.O5,ft,Kt],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),Pe}();function Ut(Pe,rt,he){if(he.length){for(var Ie=rt.toArray(),Ne=he.toArray(),Le=0,ze=0;zehe+Ie?Math.max(0,Pe-Ie+rt):he}var Lt=function(){var Pe=function rt(){(0,b.Z)(this,rt)};return Pe.\u0275fac=function(he){return new(he||Pe)},Pe.\u0275mod=v.oAB({type:Pe}),Pe.\u0275inj=v.cJS({imports:[[Yt,M.ez,le,Jt]]}),Pe}()},93386:function(ue,q,f){"use strict";f.d(q,{d:function(){return R},t:function(){return b}});var U=f(18967),B=f(14105),V=f(78081),Z=f(59412),T=f(38999),R=function(){var v=function(){function I(){(0,U.Z)(this,I),this._vertical=!1,this._inset=!1}return(0,B.Z)(I,[{key:"vertical",get:function(){return this._vertical},set:function(k){this._vertical=(0,V.Ig)(k)}},{key:"inset",get:function(){return this._inset},set:function(k){this._inset=(0,V.Ig)(k)}}]),I}();return v.\u0275fac=function(D){return new(D||v)},v.\u0275cmp=T.Xpm({type:v,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(D,k){2&D&&(T.uIk("aria-orientation",k.vertical?"vertical":"horizontal"),T.ekj("mat-divider-vertical",k.vertical)("mat-divider-horizontal",!k.vertical)("mat-divider-inset",k.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(D,k){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),v}(),b=function(){var v=function I(){(0,U.Z)(this,I)};return v.\u0275fac=function(D){return new(D||v)},v.\u0275mod=T.oAB({type:v}),v.\u0275inj=T.cJS({imports:[[Z.BQ],Z.BQ]}),v}()},36410:function(ue,q,f){"use strict";f.d(q,{G_:function(){return Rn},TO:function(){return xe},KE:function(){return wn},Eo:function(){return je},lN:function(){return yr},hX:function(){return Ht},R9:function(){return Nt}});var U=f(62467),B=f(14105),V=f(10509),Z=f(97154),T=f(18967),R=f(96798),b=f(40098),v=f(38999),I=f(59412),D=f(78081),k=f(68707),M=f(55371),_=f(33090),g=f(57682),E=f(44213),N=f(48359),A=f(739),w=f(38480),S=f(8392),O=f(15427),F=["underline"],z=["connectionContainer"],K=["inputContainer"],j=["label"];function J(ut,He){1&ut&&(v.ynx(0),v.TgZ(1,"div",14),v._UZ(2,"div",15),v._UZ(3,"div",16),v._UZ(4,"div",17),v.qZA(),v.TgZ(5,"div",18),v._UZ(6,"div",15),v._UZ(7,"div",16),v._UZ(8,"div",17),v.qZA(),v.BQk())}function ee(ut,He){1&ut&&(v.TgZ(0,"div",19),v.Hsn(1,1),v.qZA())}function $(ut,He){if(1&ut&&(v.ynx(0),v.Hsn(1,2),v.TgZ(2,"span"),v._uU(3),v.qZA(),v.BQk()),2&ut){var ve=v.oxw(2);v.xp6(3),v.Oqu(ve._control.placeholder)}}function ae(ut,He){1&ut&&v.Hsn(0,3,["*ngSwitchCase","true"])}function se(ut,He){1&ut&&(v.TgZ(0,"span",23),v._uU(1," *"),v.qZA())}function ce(ut,He){if(1&ut){var ve=v.EpF();v.TgZ(0,"label",20,21),v.NdJ("cdkObserveContent",function(){return v.CHM(ve),v.oxw().updateOutlineGap()}),v.YNc(2,$,4,1,"ng-container",12),v.YNc(3,ae,1,0,"ng-content",12),v.YNc(4,se,2,0,"span",22),v.qZA()}if(2&ut){var ye=v.oxw();v.ekj("mat-empty",ye._control.empty&&!ye._shouldAlwaysFloat())("mat-form-field-empty",ye._control.empty&&!ye._shouldAlwaysFloat())("mat-accent","accent"==ye.color)("mat-warn","warn"==ye.color),v.Q6J("cdkObserveContentDisabled","outline"!=ye.appearance)("id",ye._labelId)("ngSwitch",ye._hasLabel()),v.uIk("for",ye._control.id)("aria-owns",ye._control.id),v.xp6(2),v.Q6J("ngSwitchCase",!1),v.xp6(1),v.Q6J("ngSwitchCase",!0),v.xp6(1),v.Q6J("ngIf",!ye.hideRequiredMarker&&ye._control.required&&!ye._control.disabled)}}function le(ut,He){1&ut&&(v.TgZ(0,"div",24),v.Hsn(1,4),v.qZA())}function oe(ut,He){if(1&ut&&(v.TgZ(0,"div",25,26),v._UZ(2,"span",27),v.qZA()),2&ut){var ve=v.oxw();v.xp6(2),v.ekj("mat-accent","accent"==ve.color)("mat-warn","warn"==ve.color)}}function Ae(ut,He){if(1&ut&&(v.TgZ(0,"div"),v.Hsn(1,5),v.qZA()),2&ut){var ve=v.oxw();v.Q6J("@transitionMessages",ve._subscriptAnimationState)}}function be(ut,He){if(1&ut&&(v.TgZ(0,"div",31),v._uU(1),v.qZA()),2&ut){var ve=v.oxw(2);v.Q6J("id",ve._hintLabelId),v.xp6(1),v.Oqu(ve.hintLabel)}}function it(ut,He){if(1&ut&&(v.TgZ(0,"div",28),v.YNc(1,be,2,2,"div",29),v.Hsn(2,6),v._UZ(3,"div",30),v.Hsn(4,7),v.qZA()),2&ut){var ve=v.oxw();v.Q6J("@transitionMessages",ve._subscriptAnimationState),v.xp6(1),v.Q6J("ngIf",ve.hintLabel)}}var qe=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],_t=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],yt=0,Ft=new v.OlP("MatError"),xe=function(){var ut=function He(ve,ye){(0,T.Z)(this,He),this.id="mat-error-".concat(yt++),ve||ye.nativeElement.setAttribute("aria-live","polite")};return ut.\u0275fac=function(ve){return new(ve||ut)(v.$8M("aria-live"),v.Y36(v.SBq))},ut.\u0275dir=v.lG2({type:ut,selectors:[["mat-error"]],hostAttrs:["aria-atomic","true",1,"mat-error"],hostVars:1,hostBindings:function(ve,ye){2&ve&&v.uIk("id",ye.id)},inputs:{id:"id"},features:[v._Bn([{provide:Ft,useExisting:ut}])]}),ut}(),De={transitionMessages:(0,A.X$)("transitionMessages",[(0,A.SB)("enter",(0,A.oB)({opacity:1,transform:"translateY(0%)"})),(0,A.eR)("void => enter",[(0,A.oB)({opacity:0,transform:"translateY(-5px)"}),(0,A.jt)("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},je=function(){var ut=function He(){(0,T.Z)(this,He)};return ut.\u0275fac=function(ve){return new(ve||ut)},ut.\u0275dir=v.lG2({type:ut}),ut}(),vt=new v.OlP("MatHint"),Ht=function(){var ut=function He(){(0,T.Z)(this,He)};return ut.\u0275fac=function(ve){return new(ve||ut)},ut.\u0275dir=v.lG2({type:ut,selectors:[["mat-label"]]}),ut}(),Ct=function(){var ut=function He(){(0,T.Z)(this,He)};return ut.\u0275fac=function(ve){return new(ve||ut)},ut.\u0275dir=v.lG2({type:ut,selectors:[["mat-placeholder"]]}),ut}(),qt=new v.OlP("MatPrefix"),en=new v.OlP("MatSuffix"),Nt=function(){var ut=function He(){(0,T.Z)(this,He)};return ut.\u0275fac=function(ve){return new(ve||ut)},ut.\u0275dir=v.lG2({type:ut,selectors:[["","matSuffix",""]],features:[v._Bn([{provide:en,useExisting:ut}])]}),ut}(),rn=0,In=(0,I.pj)(function(){return function ut(He){(0,T.Z)(this,ut),this._elementRef=He}}(),"primary"),$n=new v.OlP("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Rn=new v.OlP("MatFormField"),wn=function(){var ut=function(He){(0,V.Z)(ye,He);var ve=(0,Z.Z)(ye);function ye(Te,we,ct,ft,Yt,Kt,Jt,nn){var ln;return(0,T.Z)(this,ye),(ln=ve.call(this,Te))._changeDetectorRef=we,ln._dir=ft,ln._defaults=Yt,ln._platform=Kt,ln._ngZone=Jt,ln._outlineGapCalculationNeededImmediately=!1,ln._outlineGapCalculationNeededOnStable=!1,ln._destroyed=new k.xQ,ln._showAlwaysAnimate=!1,ln._subscriptAnimationState="",ln._hintLabel="",ln._hintLabelId="mat-hint-".concat(rn++),ln._labelId="mat-form-field-label-".concat(rn++),ln.floatLabel=ln._getDefaultFloatLabelState(),ln._animationsEnabled="NoopAnimations"!==nn,ln.appearance=Yt&&Yt.appearance?Yt.appearance:"legacy",ln._hideRequiredMarker=!(!Yt||null==Yt.hideRequiredMarker)&&Yt.hideRequiredMarker,ln}return(0,B.Z)(ye,[{key:"appearance",get:function(){return this._appearance},set:function(we){var ct=this._appearance;this._appearance=we||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&ct!==we&&(this._outlineGapCalculationNeededOnStable=!0)}},{key:"hideRequiredMarker",get:function(){return this._hideRequiredMarker},set:function(we){this._hideRequiredMarker=(0,D.Ig)(we)}},{key:"_shouldAlwaysFloat",value:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",value:function(){return"never"!==this.floatLabel}},{key:"hintLabel",get:function(){return this._hintLabel},set:function(we){this._hintLabel=we,this._processHints()}},{key:"floatLabel",get:function(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel},set:function(we){we!==this._floatLabel&&(this._floatLabel=we||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}},{key:"_control",get:function(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic},set:function(we){this._explicitFormFieldControl=we}},{key:"getLabelId",value:function(){return this._hasFloatingLabel()?this._labelId:null}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var we=this;this._validateControlChild();var ct=this._control;ct.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(ct.controlType)),ct.stateChanges.pipe((0,g.O)(null)).subscribe(function(){we._validatePlaceholders(),we._syncDescribedByIds(),we._changeDetectorRef.markForCheck()}),ct.ngControl&&ct.ngControl.valueChanges&&ct.ngControl.valueChanges.pipe((0,E.R)(this._destroyed)).subscribe(function(){return we._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(function(){we._ngZone.onStable.pipe((0,E.R)(we._destroyed)).subscribe(function(){we._outlineGapCalculationNeededOnStable&&we.updateOutlineGap()})}),(0,M.T)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){we._outlineGapCalculationNeededOnStable=!0,we._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe((0,g.O)(null)).subscribe(function(){we._processHints(),we._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe((0,g.O)(null)).subscribe(function(){we._syncDescribedByIds(),we._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe((0,E.R)(this._destroyed)).subscribe(function(){"function"==typeof requestAnimationFrame?we._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return we.updateOutlineGap()})}):we.updateOutlineGap()})}},{key:"ngAfterContentChecked",value:function(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}},{key:"ngAfterViewInit",value:function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_shouldForward",value:function(we){var ct=this._control?this._control.ngControl:null;return ct&&ct[we]}},{key:"_hasPlaceholder",value:function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}},{key:"_hasLabel",value:function(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}},{key:"_hideControlPlaceholder",value:function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}},{key:"_hasFloatingLabel",value:function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}},{key:"_getDisplayedMessages",value:function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}},{key:"_animateAndLockLabel",value:function(){var we=this;this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,(0,_.R)(this._label.nativeElement,"transitionend").pipe((0,N.q)(1)).subscribe(function(){we._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){}},{key:"_getDefaultFloatLabelState",value:function(){return this._defaults&&this._defaults.floatLabel||"auto"}},{key:"_syncDescribedByIds",value:function(){if(this._control){var we=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&we.push.apply(we,(0,U.Z)(this._control.userAriaDescribedBy.split(" "))),"hint"===this._getDisplayedMessages()){var ct=this._hintChildren?this._hintChildren.find(function(Yt){return"start"===Yt.align}):null,ft=this._hintChildren?this._hintChildren.find(function(Yt){return"end"===Yt.align}):null;ct?we.push(ct.id):this._hintLabel&&we.push(this._hintLabelId),ft&&we.push(ft.id)}else this._errorChildren&&we.push.apply(we,(0,U.Z)(this._errorChildren.map(function(Yt){return Yt.id})));this._control.setDescribedByIds(we)}}},{key:"_validateControlChild",value:function(){}},{key:"updateOutlineGap",value:function(){var we=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&we&&we.children.length&&we.textContent.trim()&&this._platform.isBrowser){if(!this._isAttachedToDOM())return void(this._outlineGapCalculationNeededImmediately=!0);var ct=0,ft=0,Yt=this._connectionContainerRef.nativeElement,Kt=Yt.querySelectorAll(".mat-form-field-outline-start"),Jt=Yt.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var nn=Yt.getBoundingClientRect();if(0===nn.width&&0===nn.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var ln=this._getStartEnd(nn),yn=we.children,Tn=this._getStartEnd(yn[0].getBoundingClientRect()),Pn=0,Yn=0;Yn0?.75*Pn+10:0}for(var Cn=0;Cn void",(0,se.IO)("@transformPanel",[(0,se.pV)()],{optional:!0}))]),transformPanel:(0,se.X$)("transformPanel",[(0,se.SB)("void",(0,se.oB)({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),(0,se.SB)("showing",(0,se.oB)({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),(0,se.SB)("showing-multiple",(0,se.oB)({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),(0,se.eR)("void => *",(0,se.jt)("120ms cubic-bezier(0, 0, 0.2, 1)")),(0,se.eR)("* => void",(0,se.jt)("100ms 25ms linear",(0,se.oB)({opacity:0})))])},Bt=0,bt=new k.OlP("mat-select-scroll-strategy"),Nt=new k.OlP("MAT_SELECT_CONFIG"),rn={provide:bt,deps:[I.aV],useFactory:function(ut){return function(){return ut.scrollStrategies.reposition()}}},En=function ut(He,ve){(0,v.Z)(this,ut),this.source=He,this.value=ve},Zn=(0,M.Kr)((0,M.sb)((0,M.Id)((0,M.FD)(function(){return function ut(He,ve,ye,Te,we){(0,v.Z)(this,ut),this._elementRef=He,this._defaultErrorStateMatcher=ve,this._parentForm=ye,this._parentFormGroup=Te,this.ngControl=we}}())))),In=new k.OlP("MatSelectTrigger"),Rn=function(){var ut=function(He){(0,R.Z)(ye,He);var ve=(0,b.Z)(ye);function ye(Te,we,ct,ft,Yt,Kt,Jt,nn,ln,yn,Tn,Pn,Yn,Cn){var Sn,tr,cr,Ut;return(0,v.Z)(this,ye),(Sn=ve.call(this,Yt,ft,Jt,nn,yn))._viewportRuler=Te,Sn._changeDetectorRef=we,Sn._ngZone=ct,Sn._dir=Kt,Sn._parentFormField=ln,Sn._liveAnnouncer=Yn,Sn._defaultOptions=Cn,Sn._panelOpen=!1,Sn._compareWith=function(Rt,Lt){return Rt===Lt},Sn._uid="mat-select-".concat(Bt++),Sn._triggerAriaLabelledBy=null,Sn._destroy=new S.xQ,Sn._onChange=function(){},Sn._onTouched=function(){},Sn._valueId="mat-select-value-".concat(Bt++),Sn._panelDoneAnimatingStream=new S.xQ,Sn._overlayPanelClass=(null===(tr=Sn._defaultOptions)||void 0===tr?void 0:tr.overlayPanelClass)||"",Sn._focused=!1,Sn.controlType="mat-select",Sn._required=!1,Sn._multiple=!1,Sn._disableOptionCentering=null!==(Ut=null===(cr=Sn._defaultOptions)||void 0===cr?void 0:cr.disableOptionCentering)&&void 0!==Ut&&Ut,Sn.ariaLabel="",Sn.optionSelectionChanges=(0,O.P)(function(){var Rt=Sn.options;return Rt?Rt.changes.pipe((0,z.O)(Rt),(0,K.w)(function(){return F.T.apply(void 0,(0,V.Z)(Rt.map(function(Lt){return Lt.onSelectionChange})))})):Sn._ngZone.onStable.pipe((0,j.q)(1),(0,K.w)(function(){return Sn.optionSelectionChanges}))}),Sn.openedChange=new k.vpe,Sn._openedStream=Sn.openedChange.pipe((0,J.h)(function(Rt){return Rt}),(0,ee.U)(function(){})),Sn._closedStream=Sn.openedChange.pipe((0,J.h)(function(Rt){return!Rt}),(0,ee.U)(function(){})),Sn.selectionChange=new k.vpe,Sn.valueChange=new k.vpe,Sn.ngControl&&(Sn.ngControl.valueAccessor=(0,T.Z)(Sn)),null!=(null==Cn?void 0:Cn.typeaheadDebounceInterval)&&(Sn._typeaheadDebounceInterval=Cn.typeaheadDebounceInterval),Sn._scrollStrategyFactory=Pn,Sn._scrollStrategy=Sn._scrollStrategyFactory(),Sn.tabIndex=parseInt(Tn)||0,Sn.id=Sn.id,Sn}return(0,Z.Z)(ye,[{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(we){this._placeholder=we,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(we){this._required=(0,N.Ig)(we),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(we){this._multiple=(0,N.Ig)(we)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(we){this._disableOptionCentering=(0,N.Ig)(we)}},{key:"compareWith",get:function(){return this._compareWith},set:function(we){this._compareWith=we,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(we){(we!==this._value||this._multiple&&Array.isArray(we))&&(this.options&&this._setSelectionByValue(we),this._value=we)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(we){this._typeaheadDebounceInterval=(0,N.su)(we)}},{key:"id",get:function(){return this._id},set:function(we){this._id=we||this._uid,this.stateChanges.next()}},{key:"ngOnInit",value:function(){var we=this;this._selectionModel=new A.Ov(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe((0,$.x)(),(0,ae.R)(this._destroy)).subscribe(function(){return we._panelDoneAnimating(we.panelOpen)})}},{key:"ngAfterContentInit",value:function(){var we=this;this._initKeyManager(),this._selectionModel.changed.pipe((0,ae.R)(this._destroy)).subscribe(function(ct){ct.added.forEach(function(ft){return ft.select()}),ct.removed.forEach(function(ft){return ft.deselect()})}),this.options.changes.pipe((0,z.O)(null),(0,ae.R)(this._destroy)).subscribe(function(){we._resetOptions(),we._initializeSelection()})}},{key:"ngDoCheck",value:function(){var we=this._getTriggerAriaLabelledby();if(we!==this._triggerAriaLabelledBy){var ct=this._elementRef.nativeElement;this._triggerAriaLabelledBy=we,we?ct.setAttribute("aria-labelledby",we):ct.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(we){we.disabled&&this.stateChanges.next(),we.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(we){this.value=we}},{key:"registerOnChange",value:function(we){this._onChange=we}},{key:"registerOnTouched",value:function(we){this._onTouched=we}},{key:"setDisabledState",value:function(we){this.disabled=we,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){var we,ct;return this.multiple?(null===(we=this._selectionModel)||void 0===we?void 0:we.selected)||[]:null===(ct=this._selectionModel)||void 0===ct?void 0:ct.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var we=this._selectionModel.selected.map(function(ct){return ct.viewValue});return this._isRtl()&&we.reverse(),we.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(we){this.disabled||(this.panelOpen?this._handleOpenKeydown(we):this._handleClosedKeydown(we))}},{key:"_handleClosedKeydown",value:function(we){var ct=we.keyCode,ft=ct===w.JH||ct===w.LH||ct===w.oh||ct===w.SV,Yt=ct===w.K5||ct===w.L_,Kt=this._keyManager;if(!Kt.isTyping()&&Yt&&!(0,w.Vb)(we)||(this.multiple||we.altKey)&&ft)we.preventDefault(),this.open();else if(!this.multiple){var Jt=this.selected;Kt.onKeydown(we);var nn=this.selected;nn&&Jt!==nn&&this._liveAnnouncer.announce(nn.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(we){var ct=this._keyManager,ft=we.keyCode,Yt=ft===w.JH||ft===w.LH,Kt=ct.isTyping();if(Yt&&we.altKey)we.preventDefault(),this.close();else if(Kt||ft!==w.K5&&ft!==w.L_||!ct.activeItem||(0,w.Vb)(we))if(!Kt&&this._multiple&&ft===w.A&&we.ctrlKey){we.preventDefault();var Jt=this.options.some(function(ln){return!ln.disabled&&!ln.selected});this.options.forEach(function(ln){ln.disabled||(Jt?ln.select():ln.deselect())})}else{var nn=ct.activeItemIndex;ct.onKeydown(we),this._multiple&&Yt&&we.shiftKey&&ct.activeItem&&ct.activeItemIndex!==nn&&ct.activeItem._selectViaInteraction()}else we.preventDefault(),ct.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var we=this;this._overlayDir.positionChange.pipe((0,j.q)(1)).subscribe(function(){we._changeDetectorRef.detectChanges(),we._positioningSettled()})}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"_initializeSelection",value:function(){var we=this;Promise.resolve().then(function(){we._setSelectionByValue(we.ngControl?we.ngControl.value:we._value),we.stateChanges.next()})}},{key:"_setSelectionByValue",value:function(we){var ct=this;if(this._selectionModel.selected.forEach(function(Yt){return Yt.setInactiveStyles()}),this._selectionModel.clear(),this.multiple&&we)Array.isArray(we),we.forEach(function(Yt){return ct._selectValue(Yt)}),this._sortValues();else{var ft=this._selectValue(we);ft?this._keyManager.updateActiveItem(ft):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(we){var ct=this,ft=this.options.find(function(Yt){if(ct._selectionModel.isSelected(Yt))return!1;try{return null!=Yt.value&&ct._compareWith(Yt.value,we)}catch(Kt){return!1}});return ft&&this._selectionModel.select(ft),ft}},{key:"_initKeyManager",value:function(){var we=this;this._keyManager=new E.s1(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe((0,ae.R)(this._destroy)).subscribe(function(){we.panelOpen&&(!we.multiple&&we._keyManager.activeItem&&we._keyManager.activeItem._selectViaInteraction(),we.focus(),we.close())}),this._keyManager.change.pipe((0,ae.R)(this._destroy)).subscribe(function(){we._panelOpen&&we.panel?we._scrollOptionIntoView(we._keyManager.activeItemIndex||0):!we._panelOpen&&!we.multiple&&we._keyManager.activeItem&&we._keyManager.activeItem._selectViaInteraction()})}},{key:"_resetOptions",value:function(){var we=this,ct=(0,F.T)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe((0,ae.R)(ct)).subscribe(function(ft){we._onSelect(ft.source,ft.isUserInput),ft.isUserInput&&!we.multiple&&we._panelOpen&&(we.close(),we.focus())}),F.T.apply(void 0,(0,V.Z)(this.options.map(function(ft){return ft._stateChanges}))).pipe((0,ae.R)(ct)).subscribe(function(){we._changeDetectorRef.markForCheck(),we.stateChanges.next()})}},{key:"_onSelect",value:function(we,ct){var ft=this._selectionModel.isSelected(we);null!=we.value||this._multiple?(ft!==we.selected&&(we.selected?this._selectionModel.select(we):this._selectionModel.deselect(we)),ct&&this._keyManager.setActiveItem(we),this.multiple&&(this._sortValues(),ct&&this.focus())):(we.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(we.value)),ft!==this._selectionModel.isSelected(we)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var we=this;if(this.multiple){var ct=this.options.toArray();this._selectionModel.sort(function(ft,Yt){return we.sortComparator?we.sortComparator(ft,Yt,ct):ct.indexOf(ft)-ct.indexOf(Yt)}),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(we){var ct;ct=this.multiple?this.selected.map(function(ft){return ft.value}):this.selected?this.selected.value:we,this._value=ct,this.valueChange.emit(ct),this._onChange(ct),this.selectionChange.emit(this._getChangeEvent(ct)),this._changeDetectorRef.markForCheck()}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_canOpen",value:function(){var we;return!this._panelOpen&&!this.disabled&&(null===(we=this.options)||void 0===we?void 0:we.length)>0}},{key:"focus",value:function(we){this._elementRef.nativeElement.focus(we)}},{key:"_getPanelAriaLabelledby",value:function(){var we;if(this.ariaLabel)return null;var ct=null===(we=this._parentFormField)||void 0===we?void 0:we.getLabelId();return this.ariaLabelledby?(ct?ct+" ":"")+this.ariaLabelledby:ct}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getTriggerAriaLabelledby",value:function(){var we;if(this.ariaLabel)return null;var ct=null===(we=this._parentFormField)||void 0===we?void 0:we.getLabelId(),ft=(ct?ct+" ":"")+this._valueId;return this.ariaLabelledby&&(ft+=" "+this.ariaLabelledby),ft}},{key:"_panelDoneAnimating",value:function(we){this.openedChange.emit(we)}},{key:"setDescribedByIds",value:function(we){this._ariaDescribedby=we.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}]),ye}(Zn);return ut.\u0275fac=function(ve){return new(ve||ut)(k.Y36(g.rL),k.Y36(k.sBO),k.Y36(k.R0b),k.Y36(M.rD),k.Y36(k.SBq),k.Y36(ce.Is,8),k.Y36(le.F,8),k.Y36(le.sg,8),k.Y36(_.G_,8),k.Y36(le.a5,10),k.$8M("tabindex"),k.Y36(bt),k.Y36(E.Kd),k.Y36(Nt,8))},ut.\u0275dir=k.lG2({type:ut,viewQuery:function(ve,ye){var Te;1&ve&&(k.Gf(oe,5),k.Gf(Ae,5),k.Gf(I.pI,5)),2&ve&&(k.iGM(Te=k.CRH())&&(ye.trigger=Te.first),k.iGM(Te=k.CRH())&&(ye.panel=Te.first),k.iGM(Te=k.CRH())&&(ye._overlayDir=Te.first))},inputs:{ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",typeaheadDebounceInterval:"typeaheadDebounceInterval",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[k.qOj,k.TTD]}),ut}(),wn=function(){var ut=function(He){(0,R.Z)(ye,He);var ve=(0,b.Z)(ye);function ye(){var Te;return(0,v.Z)(this,ye),(Te=ve.apply(this,arguments))._scrollTop=0,Te._triggerFontSize=0,Te._transformOrigin="top",Te._offsetY=0,Te._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],Te}return(0,Z.Z)(ye,[{key:"_calculateOverlayScroll",value:function(we,ct,ft){var Yt=this._getItemHeight();return Math.min(Math.max(0,Yt*we-ct+Yt/2),ft)}},{key:"ngOnInit",value:function(){var we=this;(0,U.Z)((0,B.Z)(ye.prototype),"ngOnInit",this).call(this),this._viewportRuler.change().pipe((0,ae.R)(this._destroy)).subscribe(function(){we.panelOpen&&(we._triggerRect=we.trigger.nativeElement.getBoundingClientRect(),we._changeDetectorRef.markForCheck())})}},{key:"open",value:function(){var we=this;(0,U.Z)((0,B.Z)(ye.prototype),"_canOpen",this).call(this)&&((0,U.Z)((0,B.Z)(ye.prototype),"open",this).call(this),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe((0,j.q)(1)).subscribe(function(){we._triggerFontSize&&we._overlayDir.overlayRef&&we._overlayDir.overlayRef.overlayElement&&(we._overlayDir.overlayRef.overlayElement.style.fontSize="".concat(we._triggerFontSize,"px"))}))}},{key:"_scrollOptionIntoView",value:function(we){var ct=(0,M.CB)(we,this.options,this.optionGroups),ft=this._getItemHeight();this.panel.nativeElement.scrollTop=0===we&&1===ct?0:(0,M.jH)((we+ct)*ft,ft,this.panel.nativeElement.scrollTop,256)}},{key:"_positioningSettled",value:function(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}},{key:"_panelDoneAnimating",value:function(we){this.panelOpen?this._scrollTop=0:(this._overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),(0,U.Z)((0,B.Z)(ye.prototype),"_panelDoneAnimating",this).call(this,we)}},{key:"_getChangeEvent",value:function(we){return new En(this,we)}},{key:"_calculateOverlayOffsetX",value:function(){var Kt,we=this._overlayDir.overlayRef.overlayElement.getBoundingClientRect(),ct=this._viewportRuler.getViewportSize(),ft=this._isRtl(),Yt=this.multiple?56:32;if(this.multiple)Kt=40;else if(this.disableOptionCentering)Kt=16;else{var Jt=this._selectionModel.selected[0]||this.options.first;Kt=Jt&&Jt.group?32:16}ft||(Kt*=-1);var nn=0-(we.left+Kt-(ft?Yt:0)),ln=we.right+Kt-ct.width+(ft?0:Yt);nn>0?Kt+=nn+8:ln>0&&(Kt-=ln+8),this._overlayDir.offsetX=Math.round(Kt),this._overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(we,ct,ft){var nn,Yt=this._getItemHeight(),Kt=(Yt-this._triggerRect.height)/2,Jt=Math.floor(256/Yt);return this.disableOptionCentering?0:(nn=0===this._scrollTop?we*Yt:this._scrollTop===ft?(we-(this._getItemCount()-Jt))*Yt+(Yt-(this._getItemCount()*Yt-256)%Yt):ct-Yt/2,Math.round(-1*nn-Kt))}},{key:"_checkOverlayWithinViewport",value:function(we){var ct=this._getItemHeight(),ft=this._viewportRuler.getViewportSize(),Yt=this._triggerRect.top-8,Kt=ft.height-this._triggerRect.bottom-8,Jt=Math.abs(this._offsetY),ln=Math.min(this._getItemCount()*ct,256)-Jt-this._triggerRect.height;ln>Kt?this._adjustPanelUp(ln,Kt):Jt>Yt?this._adjustPanelDown(Jt,Yt,we):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(we,ct){var ft=Math.round(we-ct);this._scrollTop-=ft,this._offsetY-=ft,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(we,ct,ft){var Yt=Math.round(we-ct);if(this._scrollTop+=Yt,this._offsetY+=Yt,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=ft)return this._scrollTop=ft,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_calculateOverlayPosition",value:function(){var Jt,we=this._getItemHeight(),ct=this._getItemCount(),ft=Math.min(ct*we,256),Kt=ct*we-ft;Jt=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),Jt+=(0,M.CB)(Jt,this.options,this.optionGroups);var nn=ft/2;this._scrollTop=this._calculateOverlayScroll(Jt,nn,Kt),this._offsetY=this._calculateOverlayOffsetY(Jt,nn,Kt),this._checkOverlayWithinViewport(Kt)}},{key:"_getOriginBasedOnOption",value:function(){var we=this._getItemHeight(),ct=(we-this._triggerRect.height)/2,ft=Math.abs(this._offsetY)-ct+we/2;return"50% ".concat(ft,"px 0px")}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}}]),ye}(Rn);return ut.\u0275fac=function(){var He;return function(ye){return(He||(He=k.n5z(ut)))(ye||ut)}}(),ut.\u0275cmp=k.Xpm({type:ut,selectors:[["mat-select"]],contentQueries:function(ve,ye,Te){var we;1&ve&&(k.Suo(Te,In,5),k.Suo(Te,M.ey,5),k.Suo(Te,M.K7,5)),2&ve&&(k.iGM(we=k.CRH())&&(ye.customTrigger=we.first),k.iGM(we=k.CRH())&&(ye.options=we),k.iGM(we=k.CRH())&&(ye.optionGroups=we))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(ve,ye){1&ve&&k.NdJ("keydown",function(we){return ye._handleKeydown(we)})("focus",function(){return ye._onFocus()})("blur",function(){return ye._onBlur()}),2&ve&&(k.uIk("id",ye.id)("tabindex",ye.tabIndex)("aria-controls",ye.panelOpen?ye.id+"-panel":null)("aria-expanded",ye.panelOpen)("aria-label",ye.ariaLabel||null)("aria-required",ye.required.toString())("aria-disabled",ye.disabled.toString())("aria-invalid",ye.errorState)("aria-describedby",ye._ariaDescribedby||null)("aria-activedescendant",ye._getAriaActiveDescendant()),k.ekj("mat-select-disabled",ye.disabled)("mat-select-invalid",ye.errorState)("mat-select-required",ye.required)("mat-select-empty",ye.empty)("mat-select-multiple",ye.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[k._Bn([{provide:_.Eo,useExisting:ut},{provide:M.HF,useExisting:ut}]),k.qOj],ngContentSelectors:xe,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(ve,ye){if(1&ve&&(k.F$t(Ft),k.TgZ(0,"div",0,1),k.NdJ("click",function(){return ye.toggle()}),k.TgZ(3,"div",2),k.YNc(4,be,2,1,"span",3),k.YNc(5,_t,3,2,"span",4),k.qZA(),k.TgZ(6,"div",5),k._UZ(7,"div",6),k.qZA(),k.qZA(),k.YNc(8,yt,4,14,"ng-template",7),k.NdJ("backdropClick",function(){return ye.close()})("attach",function(){return ye._onAttached()})("detach",function(){return ye.close()})),2&ve){var Te=k.MAs(1);k.uIk("aria-owns",ye.panelOpen?ye.id+"-panel":null),k.xp6(3),k.Q6J("ngSwitch",ye.empty),k.uIk("id",ye._valueId),k.xp6(1),k.Q6J("ngSwitchCase",!0),k.xp6(1),k.Q6J("ngSwitchCase",!1),k.xp6(3),k.Q6J("cdkConnectedOverlayPanelClass",ye._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",ye._scrollStrategy)("cdkConnectedOverlayOrigin",Te)("cdkConnectedOverlayOpen",ye.panelOpen)("cdkConnectedOverlayPositions",ye._positions)("cdkConnectedOverlayMinWidth",null==ye._triggerRect?null:ye._triggerRect.width)("cdkConnectedOverlayOffsetY",ye._offsetY)}},directives:[I.xu,D.RF,D.n9,I.pI,D.ED,D.mk],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;opacity:0}\n'],encapsulation:2,data:{animation:[De.transformPanelWrap,De.transformPanel]},changeDetection:0}),ut}(),yr=function(){var ut=function He(){(0,v.Z)(this,He)};return ut.\u0275fac=function(ve){return new(ve||ut)},ut.\u0275mod=k.oAB({type:ut}),ut.\u0275inj=k.cJS({providers:[rn],imports:[[D.ez,I.U8,M.Ng,M.BQ],g.ZD,_.lN,M.Ng,M.BQ]}),ut}()},88802:function(ue,q,f){"use strict";f.d(q,{uX:function(){return In},SP:function(){return we},uD:function(){return rn},Nh:function(){return cr}}),f(88009);var B=f(62467),V=f(13920),Z=f(89200),T=f(10509),R=f(97154),b=f(18967),v=f(14105),I=f(6517),D=f(96798),k=f(80785),M=f(40098),_=f(38999),g=f(59412),E=f(38480),N=f(68707),A=f(5051),w=f(55371),S=f(33090),O=f(43161),F=f(5041),z=f(739),K=f(57682),j=f(76161),J=f(44213),ee=f(78081),$=f(15427),ae=f(32819),se=f(8392),ce=f(28722);function le(Ut,Rt){1&Ut&&_.Hsn(0)}var oe=["*"];function Ae(Ut,Rt){}var be=function(Rt){return{animationDuration:Rt}},it=function(Rt,Lt){return{value:Rt,params:Lt}},qe=["tabBodyWrapper"],_t=["tabHeader"];function yt(Ut,Rt){}function Ft(Ut,Rt){if(1&Ut&&_.YNc(0,yt,0,0,"ng-template",9),2&Ut){var Lt=_.oxw().$implicit;_.Q6J("cdkPortalOutlet",Lt.templateLabel)}}function xe(Ut,Rt){if(1&Ut&&_._uU(0),2&Ut){var Lt=_.oxw().$implicit;_.Oqu(Lt.textLabel)}}function De(Ut,Rt){if(1&Ut){var Lt=_.EpF();_.TgZ(0,"div",6),_.NdJ("click",function(){var Ne=_.CHM(Lt),Le=Ne.$implicit,ze=Ne.index,At=_.oxw(),an=_.MAs(1);return At._handleClick(Le,an,ze)})("cdkFocusChange",function(Ne){var ze=_.CHM(Lt).index;return _.oxw()._tabFocusChanged(Ne,ze)}),_.TgZ(1,"div",7),_.YNc(2,Ft,1,1,"ng-template",8),_.YNc(3,xe,1,1,"ng-template",8),_.qZA(),_.qZA()}if(2&Ut){var Pe=Rt.$implicit,rt=Rt.index,he=_.oxw();_.ekj("mat-tab-label-active",he.selectedIndex==rt),_.Q6J("id",he._getTabLabelId(rt))("disabled",Pe.disabled)("matRippleDisabled",Pe.disabled||he.disableRipple),_.uIk("tabIndex",he._getTabIndex(Pe,rt))("aria-posinset",rt+1)("aria-setsize",he._tabs.length)("aria-controls",he._getTabContentId(rt))("aria-selected",he.selectedIndex==rt)("aria-label",Pe.ariaLabel||null)("aria-labelledby",!Pe.ariaLabel&&Pe.ariaLabelledby?Pe.ariaLabelledby:null),_.xp6(2),_.Q6J("ngIf",Pe.templateLabel),_.xp6(1),_.Q6J("ngIf",!Pe.templateLabel)}}function je(Ut,Rt){if(1&Ut){var Lt=_.EpF();_.TgZ(0,"mat-tab-body",10),_.NdJ("_onCentered",function(){return _.CHM(Lt),_.oxw()._removeTabBodyWrapperHeight()})("_onCentering",function(Ne){return _.CHM(Lt),_.oxw()._setTabBodyWrapperHeight(Ne)}),_.qZA()}if(2&Ut){var Pe=Rt.$implicit,rt=Rt.index,he=_.oxw();_.ekj("mat-tab-body-active",he.selectedIndex===rt),_.Q6J("id",he._getTabContentId(rt))("content",Pe.content)("position",Pe.position)("origin",Pe.origin)("animationDuration",he.animationDuration),_.uIk("tabindex",null!=he.contentTabIndex&&he.selectedIndex===rt?he.contentTabIndex:null)("aria-labelledby",he._getTabLabelId(rt))}}var dt=["tabListContainer"],Qe=["tabList"],Bt=["nextPaginator"],xt=["previousPaginator"],Qt=new _.OlP("MatInkBarPositioner",{providedIn:"root",factory:function(){return function(Lt){return{left:Lt?(Lt.offsetLeft||0)+"px":"0",width:Lt?(Lt.offsetWidth||0)+"px":"0"}}}}),Ct=function(){var Ut=function(){function Rt(Lt,Pe,rt,he){(0,b.Z)(this,Rt),this._elementRef=Lt,this._ngZone=Pe,this._inkBarPositioner=rt,this._animationMode=he}return(0,v.Z)(Rt,[{key:"alignToElement",value:function(Pe){var rt=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return rt._setStyles(Pe)})}):this._setStyles(Pe)}},{key:"show",value:function(){this._elementRef.nativeElement.style.visibility="visible"}},{key:"hide",value:function(){this._elementRef.nativeElement.style.visibility="hidden"}},{key:"_setStyles",value:function(Pe){var rt=this._inkBarPositioner(Pe),he=this._elementRef.nativeElement;he.style.left=rt.left,he.style.width=rt.width}}]),Rt}();return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq),_.Y36(_.R0b),_.Y36(Qt),_.Y36(E.Qb,8))},Ut.\u0275dir=_.lG2({type:Ut,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(Lt,Pe){2&Lt&&_.ekj("_mat-animation-noopable","NoopAnimations"===Pe._animationMode)}}),Ut}(),qt=new _.OlP("MatTabContent"),en=new _.OlP("MatTabLabel"),Nt=new _.OlP("MAT_TAB"),rn=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he,Ie){var Ne;return(0,b.Z)(this,Pe),(Ne=Lt.call(this,rt,he))._closestTab=Ie,Ne}return Pe}(k.ig);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.Rgc),_.Y36(_.s_b),_.Y36(Nt,8))},Ut.\u0275dir=_.lG2({type:Ut,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[_._Bn([{provide:en,useExisting:Ut}]),_.qOj]}),Ut}(),En=(0,g.Id)(function(){return function Ut(){(0,b.Z)(this,Ut)}}()),Zn=new _.OlP("MAT_TAB_GROUP"),In=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he){var Ie;return(0,b.Z)(this,Pe),(Ie=Lt.call(this))._viewContainerRef=rt,Ie._closestTabGroup=he,Ie.textLabel="",Ie._contentPortal=null,Ie._stateChanges=new N.xQ,Ie.position=null,Ie.origin=null,Ie.isActive=!1,Ie}return(0,v.Z)(Pe,[{key:"templateLabel",get:function(){return this._templateLabel},set:function(he){this._setTemplateLabelInput(he)}},{key:"content",get:function(){return this._contentPortal}},{key:"ngOnChanges",value:function(he){(he.hasOwnProperty("textLabel")||he.hasOwnProperty("disabled"))&&this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"ngOnInit",value:function(){this._contentPortal=new k.UE(this._explicitContent||this._implicitContent,this._viewContainerRef)}},{key:"_setTemplateLabelInput",value:function(he){he&&he._closestTab===this&&(this._templateLabel=he)}}]),Pe}(En);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.s_b),_.Y36(Zn,8))},Ut.\u0275cmp=_.Xpm({type:Ut,selectors:[["mat-tab"]],contentQueries:function(Lt,Pe,rt){var he;1&Lt&&(_.Suo(rt,en,5),_.Suo(rt,qt,7,_.Rgc)),2&Lt&&(_.iGM(he=_.CRH())&&(Pe.templateLabel=he.first),_.iGM(he=_.CRH())&&(Pe._explicitContent=he.first))},viewQuery:function(Lt,Pe){var rt;1&Lt&&_.Gf(_.Rgc,7),2&Lt&&_.iGM(rt=_.CRH())&&(Pe._implicitContent=rt.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[_._Bn([{provide:Nt,useExisting:Ut}]),_.qOj,_.TTD],ngContentSelectors:oe,decls:1,vars:0,template:function(Lt,Pe){1&Lt&&(_.F$t(),_.YNc(0,le,1,0,"ng-template"))},encapsulation:2}),Ut}(),$n={translateTab:(0,z.X$)("translateTab",[(0,z.SB)("center, void, left-origin-center, right-origin-center",(0,z.oB)({transform:"none"})),(0,z.SB)("left",(0,z.oB)({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),(0,z.SB)("right",(0,z.oB)({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),(0,z.eR)("* => left, * => right, left => center, right => center",(0,z.jt)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),(0,z.eR)("void => left-origin-center",[(0,z.oB)({transform:"translate3d(-100%, 0, 0)"}),(0,z.jt)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),(0,z.eR)("void => right-origin-center",[(0,z.oB)({transform:"translate3d(100%, 0, 0)"}),(0,z.jt)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},Rn=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he,Ie,Ne){var Le;return(0,b.Z)(this,Pe),(Le=Lt.call(this,rt,he,Ne))._host=Ie,Le._centeringSub=A.w.EMPTY,Le._leavingSub=A.w.EMPTY,Le}return(0,v.Z)(Pe,[{key:"ngOnInit",value:function(){var he=this;(0,V.Z)((0,Z.Z)(Pe.prototype),"ngOnInit",this).call(this),this._centeringSub=this._host._beforeCentering.pipe((0,K.O)(this._host._isCenterPosition(this._host._position))).subscribe(function(Ie){Ie&&!he.hasAttached()&&he.attach(he._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(function(){he.detach()})}},{key:"ngOnDestroy",value:function(){(0,V.Z)((0,Z.Z)(Pe.prototype),"ngOnDestroy",this).call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}]),Pe}(k.Pl);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_._Vd),_.Y36(_.s_b),_.Y36((0,_.Gpc)(function(){return yr})),_.Y36(M.K0))},Ut.\u0275dir=_.lG2({type:Ut,selectors:[["","matTabBodyHost",""]],features:[_.qOj]}),Ut}(),wn=function(){var Ut=function(){function Rt(Lt,Pe,rt){var he=this;(0,b.Z)(this,Rt),this._elementRef=Lt,this._dir=Pe,this._dirChangeSubscription=A.w.EMPTY,this._translateTabComplete=new N.xQ,this._onCentering=new _.vpe,this._beforeCentering=new _.vpe,this._afterLeavingCenter=new _.vpe,this._onCentered=new _.vpe(!0),this.animationDuration="500ms",Pe&&(this._dirChangeSubscription=Pe.change.subscribe(function(Ie){he._computePositionAnimationState(Ie),rt.markForCheck()})),this._translateTabComplete.pipe((0,j.x)(function(Ie,Ne){return Ie.fromState===Ne.fromState&&Ie.toState===Ne.toState})).subscribe(function(Ie){he._isCenterPosition(Ie.toState)&&he._isCenterPosition(he._position)&&he._onCentered.emit(),he._isCenterPosition(Ie.fromState)&&!he._isCenterPosition(he._position)&&he._afterLeavingCenter.emit()})}return(0,v.Z)(Rt,[{key:"position",set:function(Pe){this._positionIndex=Pe,this._computePositionAnimationState()}},{key:"ngOnInit",value:function(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}},{key:"ngOnDestroy",value:function(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}},{key:"_onTranslateTabStarted",value:function(Pe){var rt=this._isCenterPosition(Pe.toState);this._beforeCentering.emit(rt),rt&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_isCenterPosition",value:function(Pe){return"center"==Pe||"left-origin-center"==Pe||"right-origin-center"==Pe}},{key:"_computePositionAnimationState",value:function(){var Pe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLayoutDirection();this._position=this._positionIndex<0?"ltr"==Pe?"left":"right":this._positionIndex>0?"ltr"==Pe?"right":"left":"center"}},{key:"_computePositionFromOrigin",value:function(Pe){var rt=this._getLayoutDirection();return"ltr"==rt&&Pe<=0||"rtl"==rt&&Pe>0?"left-origin-center":"right-origin-center"}}]),Rt}();return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq),_.Y36(se.Is,8),_.Y36(_.sBO))},Ut.\u0275dir=_.lG2({type:Ut,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),Ut}(),yr=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he,Ie){return(0,b.Z)(this,Pe),Lt.call(this,rt,he,Ie)}return Pe}(wn);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq),_.Y36(se.Is,8),_.Y36(_.sBO))},Ut.\u0275cmp=_.Xpm({type:Ut,selectors:[["mat-tab-body"]],viewQuery:function(Lt,Pe){var rt;1&Lt&&_.Gf(k.Pl,5),2&Lt&&_.iGM(rt=_.CRH())&&(Pe._portalHost=rt.first)},hostAttrs:[1,"mat-tab-body"],features:[_.qOj],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(Lt,Pe){1&Lt&&(_.TgZ(0,"div",0,1),_.NdJ("@translateTab.start",function(he){return Pe._onTranslateTabStarted(he)})("@translateTab.done",function(he){return Pe._translateTabComplete.next(he)}),_.YNc(2,Ae,0,0,"ng-template",2),_.qZA()),2&Lt&&_.Q6J("@translateTab",_.WLB(3,it,Pe._position,_.VKq(1,be,Pe.animationDuration)))},directives:[Rn],styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}\n"],encapsulation:2,data:{animation:[$n.translateTab]}}),Ut}(),ut=new _.OlP("MAT_TABS_CONFIG"),He=0,ve=function Ut(){(0,b.Z)(this,Ut)},ye=(0,g.pj)((0,g.Kr)(function(){return function Ut(Rt){(0,b.Z)(this,Ut),this._elementRef=Rt}}()),"primary"),Te=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he,Ie,Ne){var Le,ze;return(0,b.Z)(this,Pe),(Le=Lt.call(this,rt))._changeDetectorRef=he,Le._animationMode=Ne,Le._tabs=new _.n_E,Le._indexToSelect=0,Le._tabBodyWrapperHeight=0,Le._tabsSubscription=A.w.EMPTY,Le._tabLabelSubscription=A.w.EMPTY,Le._selectedIndex=null,Le.headerPosition="above",Le.selectedIndexChange=new _.vpe,Le.focusChange=new _.vpe,Le.animationDone=new _.vpe,Le.selectedTabChange=new _.vpe(!0),Le._groupId=He++,Le.animationDuration=Ie&&Ie.animationDuration?Ie.animationDuration:"500ms",Le.disablePagination=!(!Ie||null==Ie.disablePagination)&&Ie.disablePagination,Le.dynamicHeight=!(!Ie||null==Ie.dynamicHeight)&&Ie.dynamicHeight,Le.contentTabIndex=null!==(ze=null==Ie?void 0:Ie.contentTabIndex)&&void 0!==ze?ze:null,Le}return(0,v.Z)(Pe,[{key:"dynamicHeight",get:function(){return this._dynamicHeight},set:function(he){this._dynamicHeight=(0,ee.Ig)(he)}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(he){this._indexToSelect=(0,ee.su)(he,null)}},{key:"animationDuration",get:function(){return this._animationDuration},set:function(he){this._animationDuration=/^\d+$/.test(he)?he+"ms":he}},{key:"contentTabIndex",get:function(){return this._contentTabIndex},set:function(he){this._contentTabIndex=(0,ee.su)(he,null)}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(he){var Ie=this._elementRef.nativeElement;Ie.classList.remove("mat-background-".concat(this.backgroundColor)),he&&Ie.classList.add("mat-background-".concat(he)),this._backgroundColor=he}},{key:"ngAfterContentChecked",value:function(){var he=this,Ie=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=Ie){var Ne=null==this._selectedIndex;if(!Ne){this.selectedTabChange.emit(this._createChangeEvent(Ie));var Le=this._tabBodyWrapper.nativeElement;Le.style.minHeight=Le.clientHeight+"px"}Promise.resolve().then(function(){he._tabs.forEach(function(ze,At){return ze.isActive=At===Ie}),Ne||(he.selectedIndexChange.emit(Ie),he._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach(function(ze,At){ze.position=At-Ie,null!=he._selectedIndex&&0==ze.position&&!ze.origin&&(ze.origin=Ie-he._selectedIndex)}),this._selectedIndex!==Ie&&(this._selectedIndex=Ie,this._changeDetectorRef.markForCheck())}},{key:"ngAfterContentInit",value:function(){var he=this;this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(function(){if(he._clampTabIndex(he._indexToSelect)===he._selectedIndex)for(var Ne=he._tabs.toArray(),Le=0;Le.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\n"],encapsulation:2}),Ut}(),ct=(0,g.Id)(function(){return function Ut(){(0,b.Z)(this,Ut)}}()),ft=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt){var he;return(0,b.Z)(this,Pe),(he=Lt.call(this)).elementRef=rt,he}return(0,v.Z)(Pe,[{key:"focus",value:function(){this.elementRef.nativeElement.focus()}},{key:"getOffsetLeft",value:function(){return this.elementRef.nativeElement.offsetLeft}},{key:"getOffsetWidth",value:function(){return this.elementRef.nativeElement.offsetWidth}}]),Pe}(ct);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq))},Ut.\u0275dir=_.lG2({type:Ut,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(Lt,Pe){2&Lt&&(_.uIk("aria-disabled",!!Pe.disabled),_.ekj("mat-tab-disabled",Pe.disabled))},inputs:{disabled:"disabled"},features:[_.qOj]}),Ut}(),Yt=(0,$.i$)({passive:!0}),ln=function(){var Ut=function(){function Rt(Lt,Pe,rt,he,Ie,Ne,Le){var ze=this;(0,b.Z)(this,Rt),this._elementRef=Lt,this._changeDetectorRef=Pe,this._viewportRuler=rt,this._dir=he,this._ngZone=Ie,this._platform=Ne,this._animationMode=Le,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new N.xQ,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new N.xQ,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new _.vpe,this.indexFocused=new _.vpe,Ie.runOutsideAngular(function(){(0,S.R)(Lt.nativeElement,"mouseleave").pipe((0,J.R)(ze._destroyed)).subscribe(function(){ze._stopInterval()})})}return(0,v.Z)(Rt,[{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(Pe){Pe=(0,ee.su)(Pe),this._selectedIndex!=Pe&&(this._selectedIndexChanged=!0,this._selectedIndex=Pe,this._keyManager&&this._keyManager.updateActiveItem(Pe))}},{key:"ngAfterViewInit",value:function(){var Pe=this;(0,S.R)(this._previousPaginator.nativeElement,"touchstart",Yt).pipe((0,J.R)(this._destroyed)).subscribe(function(){Pe._handlePaginatorPress("before")}),(0,S.R)(this._nextPaginator.nativeElement,"touchstart",Yt).pipe((0,J.R)(this._destroyed)).subscribe(function(){Pe._handlePaginatorPress("after")})}},{key:"ngAfterContentInit",value:function(){var Pe=this,rt=this._dir?this._dir.change:(0,O.of)("ltr"),he=this._viewportRuler.change(150),Ie=function(){Pe.updatePagination(),Pe._alignInkBarToSelectedTab()};this._keyManager=new I.Em(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(Ie):Ie(),(0,w.T)(rt,he,this._items.changes).pipe((0,J.R)(this._destroyed)).subscribe(function(){Pe._ngZone.run(function(){return Promise.resolve().then(Ie)}),Pe._keyManager.withHorizontalOrientation(Pe._getLayoutDirection())}),this._keyManager.change.pipe((0,J.R)(this._destroyed)).subscribe(function(Ne){Pe.indexFocused.emit(Ne),Pe._setTabFocus(Ne)})}},{key:"ngAfterContentChecked",value:function(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}},{key:"_handleKeydown",value:function(Pe){if(!(0,ae.Vb)(Pe))switch(Pe.keyCode){case ae.K5:case ae.L_:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(Pe));break;default:this._keyManager.onKeydown(Pe)}}},{key:"_onContentChanges",value:function(){var Pe=this,rt=this._elementRef.nativeElement.textContent;rt!==this._currentTextContent&&(this._currentTextContent=rt||"",this._ngZone.run(function(){Pe.updatePagination(),Pe._alignInkBarToSelectedTab(),Pe._changeDetectorRef.markForCheck()}))}},{key:"updatePagination",value:function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}},{key:"focusIndex",get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(Pe){!this._isValidIndex(Pe)||this.focusIndex===Pe||!this._keyManager||this._keyManager.setActiveItem(Pe)}},{key:"_isValidIndex",value:function(Pe){if(!this._items)return!0;var rt=this._items?this._items.toArray()[Pe]:null;return!!rt&&!rt.disabled}},{key:"_setTabFocus",value:function(Pe){if(this._showPaginationControls&&this._scrollToLabel(Pe),this._items&&this._items.length){this._items.toArray()[Pe].focus();var rt=this._tabListContainer.nativeElement,he=this._getLayoutDirection();rt.scrollLeft="ltr"==he?0:rt.scrollWidth-rt.offsetWidth}}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_updateTabScrollPosition",value:function(){if(!this.disablePagination){var Pe=this.scrollDistance,rt="ltr"===this._getLayoutDirection()?-Pe:Pe;this._tabList.nativeElement.style.transform="translateX(".concat(Math.round(rt),"px)"),(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}}},{key:"scrollDistance",get:function(){return this._scrollDistance},set:function(Pe){this._scrollTo(Pe)}},{key:"_scrollHeader",value:function(Pe){return this._scrollTo(this._scrollDistance+("before"==Pe?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}},{key:"_handlePaginatorClick",value:function(Pe){this._stopInterval(),this._scrollHeader(Pe)}},{key:"_scrollToLabel",value:function(Pe){if(!this.disablePagination){var rt=this._items?this._items.toArray()[Pe]:null;if(rt){var ze,At,he=this._tabListContainer.nativeElement.offsetWidth,Ie=rt.elementRef.nativeElement,Ne=Ie.offsetLeft,Le=Ie.offsetWidth;"ltr"==this._getLayoutDirection()?At=(ze=Ne)+Le:ze=(At=this._tabList.nativeElement.offsetWidth-Ne)-Le;var an=this.scrollDistance,qn=this.scrollDistance+he;zeqn&&(this.scrollDistance+=At-qn+60)}}}},{key:"_checkPaginationEnabled",value:function(){if(this.disablePagination)this._showPaginationControls=!1;else{var Pe=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;Pe||(this.scrollDistance=0),Pe!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=Pe}}},{key:"_checkScrollingControls",value:function(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}},{key:"_getMaxScrollDistance",value:function(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}},{key:"_alignInkBarToSelectedTab",value:function(){var Pe=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,rt=Pe?Pe.elementRef.nativeElement:null;rt?this._inkBar.alignToElement(rt):this._inkBar.hide()}},{key:"_stopInterval",value:function(){this._stopScrolling.next()}},{key:"_handlePaginatorPress",value:function(Pe,rt){var he=this;rt&&null!=rt.button&&0!==rt.button||(this._stopInterval(),(0,F.H)(650,100).pipe((0,J.R)((0,w.T)(this._stopScrolling,this._destroyed))).subscribe(function(){var Ie=he._scrollHeader(Pe),Le=Ie.distance;(0===Le||Le>=Ie.maxScrollDistance)&&he._stopInterval()}))}},{key:"_scrollTo",value:function(Pe){if(this.disablePagination)return{maxScrollDistance:0,distance:0};var rt=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(rt,Pe)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:rt,distance:this._scrollDistance}}}]),Rt}();return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq),_.Y36(_.sBO),_.Y36(ce.rL),_.Y36(se.Is,8),_.Y36(_.R0b),_.Y36($.t4),_.Y36(E.Qb,8))},Ut.\u0275dir=_.lG2({type:Ut,inputs:{disablePagination:"disablePagination"}}),Ut}(),yn=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he,Ie,Ne,Le,ze,At){var an;return(0,b.Z)(this,Pe),(an=Lt.call(this,rt,he,Ie,Ne,Le,ze,At))._disableRipple=!1,an}return(0,v.Z)(Pe,[{key:"disableRipple",get:function(){return this._disableRipple},set:function(he){this._disableRipple=(0,ee.Ig)(he)}},{key:"_itemSelected",value:function(he){he.preventDefault()}}]),Pe}(ln);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq),_.Y36(_.sBO),_.Y36(ce.rL),_.Y36(se.Is,8),_.Y36(_.R0b),_.Y36($.t4),_.Y36(E.Qb,8))},Ut.\u0275dir=_.lG2({type:Ut,inputs:{disableRipple:"disableRipple"},features:[_.qOj]}),Ut}(),Tn=function(){var Ut=function(Rt){(0,T.Z)(Pe,Rt);var Lt=(0,R.Z)(Pe);function Pe(rt,he,Ie,Ne,Le,ze,At){return(0,b.Z)(this,Pe),Lt.call(this,rt,he,Ie,Ne,Le,ze,At)}return Pe}(yn);return Ut.\u0275fac=function(Lt){return new(Lt||Ut)(_.Y36(_.SBq),_.Y36(_.sBO),_.Y36(ce.rL),_.Y36(se.Is,8),_.Y36(_.R0b),_.Y36($.t4),_.Y36(E.Qb,8))},Ut.\u0275cmp=_.Xpm({type:Ut,selectors:[["mat-tab-header"]],contentQueries:function(Lt,Pe,rt){var he;1&Lt&&_.Suo(rt,ft,4),2&Lt&&_.iGM(he=_.CRH())&&(Pe._items=he)},viewQuery:function(Lt,Pe){var rt;1&Lt&&(_.Gf(Ct,7),_.Gf(dt,7),_.Gf(Qe,7),_.Gf(Bt,5),_.Gf(xt,5)),2&Lt&&(_.iGM(rt=_.CRH())&&(Pe._inkBar=rt.first),_.iGM(rt=_.CRH())&&(Pe._tabListContainer=rt.first),_.iGM(rt=_.CRH())&&(Pe._tabList=rt.first),_.iGM(rt=_.CRH())&&(Pe._nextPaginator=rt.first),_.iGM(rt=_.CRH())&&(Pe._previousPaginator=rt.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(Lt,Pe){2&Lt&&_.ekj("mat-tab-header-pagination-controls-enabled",Pe._showPaginationControls)("mat-tab-header-rtl","rtl"==Pe._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[_.qOj],ngContentSelectors:oe,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(Lt,Pe){1&Lt&&(_.F$t(),_.TgZ(0,"div",0,1),_.NdJ("click",function(){return Pe._handlePaginatorClick("before")})("mousedown",function(he){return Pe._handlePaginatorPress("before",he)})("touchend",function(){return Pe._stopInterval()}),_._UZ(2,"div",2),_.qZA(),_.TgZ(3,"div",3,4),_.NdJ("keydown",function(he){return Pe._handleKeydown(he)}),_.TgZ(5,"div",5,6),_.NdJ("cdkObserveContent",function(){return Pe._onContentChanges()}),_.TgZ(7,"div",7),_.Hsn(8),_.qZA(),_._UZ(9,"mat-ink-bar"),_.qZA(),_.qZA(),_.TgZ(10,"div",8,9),_.NdJ("mousedown",function(he){return Pe._handlePaginatorPress("after",he)})("click",function(){return Pe._handlePaginatorClick("after")})("touchend",function(){return Pe._stopInterval()}),_._UZ(12,"div",2),_.qZA()),2&Lt&&(_.ekj("mat-tab-header-pagination-disabled",Pe._disableScrollBefore),_.Q6J("matRippleDisabled",Pe._disableScrollBefore||Pe.disableRipple),_.xp6(5),_.ekj("_mat-animation-noopable","NoopAnimations"===Pe._animationMode),_.xp6(5),_.ekj("mat-tab-header-pagination-disabled",Pe._disableScrollAfter),_.Q6J("matRippleDisabled",Pe._disableScrollAfter||Pe.disableRipple))},directives:[g.wG,D.wD,Ct],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\n'],encapsulation:2}),Ut}(),cr=function(){var Ut=function Rt(){(0,b.Z)(this,Rt)};return Ut.\u0275fac=function(Lt){return new(Lt||Ut)},Ut.\u0275mod=_.oAB({type:Ut}),Ut.\u0275inj=_.cJS({imports:[[M.ez,g.BQ,k.eL,g.si,D.Q8,I.rt],g.BQ]}),Ut}()},38480:function(ue,q,f){"use strict";f.d(q,{Qb:function(){return vd},PW:function(){return tu}});var U=f(71955),B=f(18967),V=f(14105),Z=f(10509),T=f(97154),R=f(38999),b=f(29176),v=f(739),I=f(13920),D=f(89200),k=f(36683),M=f(62467);function _(){return"undefined"!=typeof window&&void 0!==window.document}function g(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function E(Se){switch(Se.length){case 0:return new v.ZN;case 1:return Se[0];default:return new v.ZE(Se)}}function N(Se,ge,Q,ne){var ke=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},Ve=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},lt=[],wt=[],Zt=-1,$t=null;if(ne.forEach(function(An){var Un=An.offset,Qn=Un==Zt,hr=Qn&&$t||{};Object.keys(An).forEach(function(Ir){var Cr=Ir,kr=An[Ir];if("offset"!==Ir)switch(Cr=ge.normalizePropertyName(Cr,lt),kr){case v.k1:kr=ke[Ir];break;case v.l3:kr=Ve[Ir];break;default:kr=ge.normalizeStyleValue(Ir,Cr,kr,lt)}hr[Cr]=kr}),Qn||wt.push(hr),$t=hr,Zt=Un}),lt.length){var cn="\n - ";throw new Error("Unable to animate due to the following errors:".concat(cn).concat(lt.join(cn)))}return wt}function A(Se,ge,Q,ne){switch(ge){case"start":Se.onStart(function(){return ne(Q&&w(Q,"start",Se))});break;case"done":Se.onDone(function(){return ne(Q&&w(Q,"done",Se))});break;case"destroy":Se.onDestroy(function(){return ne(Q&&w(Q,"destroy",Se))})}}function w(Se,ge,Q){var ne=Q.totalTime,Ve=S(Se.element,Se.triggerName,Se.fromState,Se.toState,ge||Se.phaseName,null==ne?Se.totalTime:ne,!!Q.disabled),lt=Se._data;return null!=lt&&(Ve._data=lt),Ve}function S(Se,ge,Q,ne){var ke=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",Ve=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,lt=arguments.length>6?arguments[6]:void 0;return{element:Se,triggerName:ge,fromState:Q,toState:ne,phaseName:ke,totalTime:Ve,disabled:!!lt}}function O(Se,ge,Q){var ne;return Se instanceof Map?(ne=Se.get(ge))||Se.set(ge,ne=Q):(ne=Se[ge])||(ne=Se[ge]=Q),ne}function F(Se){var ge=Se.indexOf(":");return[Se.substring(1,ge),Se.substr(ge+1)]}var z=function(ge,Q){return!1},j=function(ge,Q){return!1},ee=function(ge,Q,ne){return[]},ae=g();(ae||"undefined"!=typeof Element)&&(z=_()?function(ge,Q){for(;Q&&Q!==document.documentElement;){if(Q===ge)return!0;Q=Q.parentNode||Q.host}return!1}:function(ge,Q){return ge.contains(Q)},j=function(){if(ae||Element.prototype.matches)return function(Q,ne){return Q.matches(ne)};var Se=Element.prototype,ge=Se.matchesSelector||Se.mozMatchesSelector||Se.msMatchesSelector||Se.oMatchesSelector||Se.webkitMatchesSelector;return ge?function(Q,ne){return ge.apply(Q,[ne])}:j}(),ee=function(ge,Q,ne){var ke=[];if(ne)for(var Ve=ge.querySelectorAll(Q),lt=0;lt1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(Se).forEach(function(Q){ge[Q]=Se[Q]}),ge}function Zn(Se,ge){var Q=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(ge)for(var ne in Se)Q[ne]=Se[ne];else rn(Se,Q);return Q}function In(Se,ge,Q){return Q?ge+":"+Q+";":""}function $n(Se){for(var ge="",Q=0;Q *";case":leave":return"* => void";case":increment":return function(Q,ne){return parseFloat(ne)>parseFloat(Q)};case":decrement":return function(Q,ne){return parseFloat(ne) *"}}(Se,Q);if("function"==typeof ne)return void ge.push(ne);Se=ne}var ke=Se.match(/^(\*|[-\w]+)\s*([=-]>)\s*(\*|[-\w]+)$/);if(null==ke||ke.length<4)return Q.push('The provided transition expression "'.concat(Se,'" is not supported')),ge;var Ve=ke[1],lt=ke[2],wt=ke[3];ge.push(Sn(Ve,wt)),"<"==lt[0]&&!("*"==Ve&&"*"==wt)&&ge.push(Sn(wt,Ve))}(ne,Q,ge)}):Q.push(Se),Q}var Yn=new Set(["true","1"]),Cn=new Set(["false","0"]);function Sn(Se,ge){var Q=Yn.has(Se)||Cn.has(Se),ne=Yn.has(ge)||Cn.has(ge);return function(ke,Ve){var lt="*"==Se||Se==ke,wt="*"==ge||ge==Ve;return!lt&&Q&&"boolean"==typeof ke&&(lt=ke?Yn.has(Se):Cn.has(Se)),!wt&&ne&&"boolean"==typeof Ve&&(wt=Ve?Yn.has(ge):Cn.has(ge)),lt&&wt}}var cr=new RegExp("s*".concat(":self","s*,?"),"g");function Ut(Se,ge,Q){return new Lt(Se).build(ge,Q)}var Lt=function(){function Se(ge){(0,B.Z)(this,Se),this._driver=ge}return(0,V.Z)(Se,[{key:"build",value:function(Q,ne){var ke=new he(ne);return this._resetContextStyleTimingState(ke),Jt(this,yr(Q),ke)}},{key:"_resetContextStyleTimingState",value:function(Q){Q.currentQuerySelector="",Q.collectedStyles={},Q.collectedStyles[""]={},Q.currentTime=0}},{key:"visitTrigger",value:function(Q,ne){var ke=this,Ve=ne.queryCount=0,lt=ne.depCount=0,wt=[],Zt=[];return"@"==Q.name.charAt(0)&&ne.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),Q.definitions.forEach(function($t){if(ke._resetContextStyleTimingState(ne),0==$t.type){var cn=$t,An=cn.name;An.toString().split(/\s*,\s*/).forEach(function(Qn){cn.name=Qn,wt.push(ke.visitState(cn,ne))}),cn.name=An}else if(1==$t.type){var Un=ke.visitTransition($t,ne);Ve+=Un.queryCount,lt+=Un.depCount,Zt.push(Un)}else ne.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:Q.name,states:wt,transitions:Zt,queryCount:Ve,depCount:lt,options:null}}},{key:"visitState",value:function(Q,ne){var ke=this.visitStyle(Q.styles,ne),Ve=Q.options&&Q.options.params||null;if(ke.containsDynamicStyles){var lt=new Set,wt=Ve||{};if(ke.styles.forEach(function($t){if(Ne($t)){var cn=$t;Object.keys(cn).forEach(function(An){ve(cn[An]).forEach(function(Un){wt.hasOwnProperty(Un)||lt.add(Un)})})}}),lt.size){var Zt=Te(lt.values());ne.errors.push('state("'.concat(Q.name,'", ...) must define default values for all the following style substitutions: ').concat(Zt.join(", ")))}}return{type:0,name:Q.name,style:ke,options:Ve?{params:Ve}:null}}},{key:"visitTransition",value:function(Q,ne){ne.queryCount=0,ne.depCount=0;var ke=Jt(this,yr(Q.animation),ne);return{type:1,matchers:yn(Q.expr,ne.errors),animation:ke,queryCount:ne.queryCount,depCount:ne.depCount,options:ze(Q.options)}}},{key:"visitSequence",value:function(Q,ne){var ke=this;return{type:2,steps:Q.steps.map(function(Ve){return Jt(ke,Ve,ne)}),options:ze(Q.options)}}},{key:"visitGroup",value:function(Q,ne){var ke=this,Ve=ne.currentTime,lt=0,wt=Q.steps.map(function(Zt){ne.currentTime=Ve;var $t=Jt(ke,Zt,ne);return lt=Math.max(lt,ne.currentTime),$t});return ne.currentTime=lt,{type:3,steps:wt,options:ze(Q.options)}}},{key:"visitAnimate",value:function(Q,ne){var ke=function(Se,ge){var Q=null;if(Se.hasOwnProperty("duration"))Q=Se;else if("number"==typeof Se)return At(en(Se,ge).duration,0,"");var ke=Se;if(ke.split(/\s+/).some(function(wt){return"{"==wt.charAt(0)&&"{"==wt.charAt(1)})){var lt=At(0,0,"");return lt.dynamic=!0,lt.strValue=ke,lt}return At((Q=Q||en(ke,ge)).duration,Q.delay,Q.easing)}(Q.timings,ne.errors);ne.currentAnimateTimings=ke;var Ve,lt=Q.styles?Q.styles:(0,v.oB)({});if(5==lt.type)Ve=this.visitKeyframes(lt,ne);else{var wt=Q.styles,Zt=!1;if(!wt){Zt=!0;var $t={};ke.easing&&($t.easing=ke.easing),wt=(0,v.oB)($t)}ne.currentTime+=ke.duration+ke.delay;var cn=this.visitStyle(wt,ne);cn.isEmptyStep=Zt,Ve=cn}return ne.currentAnimateTimings=null,{type:4,timings:ke,style:Ve,options:null}}},{key:"visitStyle",value:function(Q,ne){var ke=this._makeStyleAst(Q,ne);return this._validateStyleAst(ke,ne),ke}},{key:"_makeStyleAst",value:function(Q,ne){var ke=[];Array.isArray(Q.styles)?Q.styles.forEach(function(wt){"string"==typeof wt?wt==v.l3?ke.push(wt):ne.errors.push("The provided style string value ".concat(wt," is not allowed.")):ke.push(wt)}):ke.push(Q.styles);var Ve=!1,lt=null;return ke.forEach(function(wt){if(Ne(wt)){var Zt=wt,$t=Zt.easing;if($t&&(lt=$t,delete Zt.easing),!Ve)for(var cn in Zt)if(Zt[cn].toString().indexOf("{{")>=0){Ve=!0;break}}}),{type:6,styles:ke,easing:lt,offset:Q.offset,containsDynamicStyles:Ve,options:null}}},{key:"_validateStyleAst",value:function(Q,ne){var ke=this,Ve=ne.currentAnimateTimings,lt=ne.currentTime,wt=ne.currentTime;Ve&&wt>0&&(wt-=Ve.duration+Ve.delay),Q.styles.forEach(function(Zt){"string"!=typeof Zt&&Object.keys(Zt).forEach(function($t){if(ke._driver.validateStyleProperty($t)){var cn=ne.collectedStyles[ne.currentQuerySelector],An=cn[$t],Un=!0;An&&(wt!=lt&&wt>=An.startTime&<<=An.endTime&&(ne.errors.push('The CSS property "'.concat($t,'" that exists between the times of "').concat(An.startTime,'ms" and "').concat(An.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(wt,'ms" and "').concat(lt,'ms"')),Un=!1),wt=An.startTime),Un&&(cn[$t]={startTime:wt,endTime:lt}),ne.options&&function(Se,ge,Q){var ne=ge.params||{},ke=ve(Se);ke.length&&ke.forEach(function(Ve){ne.hasOwnProperty(Ve)||Q.push("Unable to resolve the local animation param ".concat(Ve," in the given list of values"))})}(Zt[$t],ne.options,ne.errors)}else ne.errors.push('The provided animation property "'.concat($t,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(Q,ne){var ke=this,Ve={type:5,styles:[],options:null};if(!ne.currentAnimateTimings)return ne.errors.push("keyframes() must be placed inside of a call to animate()"),Ve;var wt=0,Zt=[],$t=!1,cn=!1,An=0,Un=Q.steps.map(function(fi){var ii=ke._makeStyleAst(fi,ne),ko=null!=ii.offset?ii.offset:function(Se){if("string"==typeof Se)return null;var ge=null;if(Array.isArray(Se))Se.forEach(function(ne){if(Ne(ne)&&ne.hasOwnProperty("offset")){var ke=ne;ge=parseFloat(ke.offset),delete ke.offset}});else if(Ne(Se)&&Se.hasOwnProperty("offset")){var Q=Se;ge=parseFloat(Q.offset),delete Q.offset}return ge}(ii.styles),Be=0;return null!=ko&&(wt++,Be=ii.offset=ko),cn=cn||Be<0||Be>1,$t=$t||Be0&&wt0?ii==Ir?1:hr*ii:Zt[ii],Be=ko*li;ne.currentTime=Cr+kr.delay+Be,kr.duration=Be,ke._validateStyleAst(fi,ne),fi.offset=ko,Ve.styles.push(fi)}),Ve}},{key:"visitReference",value:function(Q,ne){return{type:8,animation:Jt(this,yr(Q.animation),ne),options:ze(Q.options)}}},{key:"visitAnimateChild",value:function(Q,ne){return ne.depCount++,{type:9,options:ze(Q.options)}}},{key:"visitAnimateRef",value:function(Q,ne){return{type:10,animation:this.visitReference(Q.animation,ne),options:ze(Q.options)}}},{key:"visitQuery",value:function(Q,ne){var ke=ne.currentQuerySelector,Ve=Q.options||{};ne.queryCount++,ne.currentQuery=Q;var lt=function(Se){var ge=!!Se.split(/\s*,\s*/).find(function(Q){return":self"==Q});return ge&&(Se=Se.replace(cr,"")),[Se=Se.replace(/@\*/g,Qt).replace(/@\w+/g,function(Q){return Qt+"-"+Q.substr(1)}).replace(/:animating/g,Ct),ge]}(Q.selector),wt=(0,U.Z)(lt,2),Zt=wt[0],$t=wt[1];ne.currentQuerySelector=ke.length?ke+" "+Zt:Zt,O(ne.collectedStyles,ne.currentQuerySelector,{});var cn=Jt(this,yr(Q.animation),ne);return ne.currentQuery=null,ne.currentQuerySelector=ke,{type:11,selector:Zt,limit:Ve.limit||0,optional:!!Ve.optional,includeSelf:$t,animation:cn,originalSelector:Q.selector,options:ze(Q.options)}}},{key:"visitStagger",value:function(Q,ne){ne.currentQuery||ne.errors.push("stagger() can only be used inside of query()");var ke="full"===Q.timings?{duration:0,delay:0,easing:"full"}:en(Q.timings,ne.errors,!0);return{type:12,animation:Jt(this,yr(Q.animation),ne),timings:ke,options:null}}}]),Se}(),he=function Se(ge){(0,B.Z)(this,Se),this.errors=ge,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function Ne(Se){return!Array.isArray(Se)&&"object"==typeof Se}function ze(Se){return Se?(Se=rn(Se)).params&&(Se.params=function(Se){return Se?rn(Se):null}(Se.params)):Se={},Se}function At(Se,ge,Q){return{duration:Se,delay:ge,easing:Q}}function an(Se,ge,Q,ne,ke,Ve){var lt=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,wt=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:Se,keyframes:ge,preStyleProps:Q,postStyleProps:ne,duration:ke,delay:Ve,totalTime:ke+Ve,easing:lt,subTimeline:wt}}var qn=function(){function Se(){(0,B.Z)(this,Se),this._map=new Map}return(0,V.Z)(Se,[{key:"consume",value:function(Q){var ne=this._map.get(Q);return ne?this._map.delete(Q):ne=[],ne}},{key:"append",value:function(Q,ne){var ke,Ve=this._map.get(Q);Ve||this._map.set(Q,Ve=[]),(ke=Ve).push.apply(ke,(0,M.Z)(ne))}},{key:"has",value:function(Q){return this._map.has(Q)}},{key:"clear",value:function(){this._map.clear()}}]),Se}(),br=new RegExp(":enter","g"),lo=new RegExp(":leave","g");function Ri(Se,ge,Q,ne,ke){var Ve=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},lt=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},wt=arguments.length>7?arguments[7]:void 0,Zt=arguments.length>8?arguments[8]:void 0,$t=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new _o).buildKeyframes(Se,ge,Q,ne,ke,Ve,lt,wt,Zt,$t)}var _o=function(){function Se(){(0,B.Z)(this,Se)}return(0,V.Z)(Se,[{key:"buildKeyframes",value:function(Q,ne,ke,Ve,lt,wt,Zt,$t,cn){var An=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];cn=cn||new qn;var Un=new Jo(Q,ne,cn,Ve,lt,An,[]);Un.options=$t,Un.currentTimeline.setStyles([wt],null,Un.errors,$t),Jt(this,ke,Un);var Qn=Un.timelines.filter(function(Ir){return Ir.containsAnimation()});if(Qn.length&&Object.keys(Zt).length){var hr=Qn[Qn.length-1];hr.allowOnlyTimelineStyles()||hr.setStyles([Zt],null,Un.errors,$t)}return Qn.length?Qn.map(function(Ir){return Ir.buildKeyframes()}):[an(ne,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(Q,ne){}},{key:"visitState",value:function(Q,ne){}},{key:"visitTransition",value:function(Q,ne){}},{key:"visitAnimateChild",value:function(Q,ne){var ke=ne.subInstructions.consume(ne.element);if(ke){var Ve=ne.createSubContext(Q.options),lt=ne.currentTimeline.currentTime,wt=this._visitSubInstructions(ke,Ve,Ve.options);lt!=wt&&ne.transformIntoNewTimeline(wt)}ne.previousNode=Q}},{key:"visitAnimateRef",value:function(Q,ne){var ke=ne.createSubContext(Q.options);ke.transformIntoNewTimeline(),this.visitReference(Q.animation,ke),ne.transformIntoNewTimeline(ke.currentTimeline.currentTime),ne.previousNode=Q}},{key:"_visitSubInstructions",value:function(Q,ne,ke){var lt=ne.currentTimeline.currentTime,wt=null!=ke.duration?qt(ke.duration):null,Zt=null!=ke.delay?qt(ke.delay):null;return 0!==wt&&Q.forEach(function($t){var cn=ne.appendInstructionToTimeline($t,wt,Zt);lt=Math.max(lt,cn.duration+cn.delay)}),lt}},{key:"visitReference",value:function(Q,ne){ne.updateOptions(Q.options,!0),Jt(this,Q.animation,ne),ne.previousNode=Q}},{key:"visitSequence",value:function(Q,ne){var ke=this,Ve=ne.subContextCount,lt=ne,wt=Q.options;if(wt&&(wt.params||wt.delay)&&((lt=ne.createSubContext(wt)).transformIntoNewTimeline(),null!=wt.delay)){6==lt.previousNode.type&&(lt.currentTimeline.snapshotCurrentStyles(),lt.previousNode=uo);var Zt=qt(wt.delay);lt.delayNextStep(Zt)}Q.steps.length&&(Q.steps.forEach(function($t){return Jt(ke,$t,lt)}),lt.currentTimeline.applyStylesToKeyframe(),lt.subContextCount>Ve&<.transformIntoNewTimeline()),ne.previousNode=Q}},{key:"visitGroup",value:function(Q,ne){var ke=this,Ve=[],lt=ne.currentTimeline.currentTime,wt=Q.options&&Q.options.delay?qt(Q.options.delay):0;Q.steps.forEach(function(Zt){var $t=ne.createSubContext(Q.options);wt&&$t.delayNextStep(wt),Jt(ke,Zt,$t),lt=Math.max(lt,$t.currentTimeline.currentTime),Ve.push($t.currentTimeline)}),Ve.forEach(function(Zt){return ne.currentTimeline.mergeTimelineCollectedStyles(Zt)}),ne.transformIntoNewTimeline(lt),ne.previousNode=Q}},{key:"_visitTiming",value:function(Q,ne){if(Q.dynamic){var ke=Q.strValue;return en(ne.params?ye(ke,ne.params,ne.errors):ke,ne.errors)}return{duration:Q.duration,delay:Q.delay,easing:Q.easing}}},{key:"visitAnimate",value:function(Q,ne){var ke=ne.currentAnimateTimings=this._visitTiming(Q.timings,ne),Ve=ne.currentTimeline;ke.delay&&(ne.incrementTime(ke.delay),Ve.snapshotCurrentStyles());var lt=Q.style;5==lt.type?this.visitKeyframes(lt,ne):(ne.incrementTime(ke.duration),this.visitStyle(lt,ne),Ve.applyStylesToKeyframe()),ne.currentAnimateTimings=null,ne.previousNode=Q}},{key:"visitStyle",value:function(Q,ne){var ke=ne.currentTimeline,Ve=ne.currentAnimateTimings;!Ve&&ke.getCurrentStyleProperties().length&&ke.forwardFrame();var lt=Ve&&Ve.easing||Q.easing;Q.isEmptyStep?ke.applyEmptyStep(lt):ke.setStyles(Q.styles,lt,ne.errors,ne.options),ne.previousNode=Q}},{key:"visitKeyframes",value:function(Q,ne){var ke=ne.currentAnimateTimings,Ve=ne.currentTimeline.duration,lt=ke.duration,Zt=ne.createSubContext().currentTimeline;Zt.easing=ke.easing,Q.styles.forEach(function($t){Zt.forwardTime(($t.offset||0)*lt),Zt.setStyles($t.styles,$t.easing,ne.errors,ne.options),Zt.applyStylesToKeyframe()}),ne.currentTimeline.mergeTimelineCollectedStyles(Zt),ne.transformIntoNewTimeline(Ve+lt),ne.previousNode=Q}},{key:"visitQuery",value:function(Q,ne){var ke=this,Ve=ne.currentTimeline.currentTime,lt=Q.options||{},wt=lt.delay?qt(lt.delay):0;wt&&(6===ne.previousNode.type||0==Ve&&ne.currentTimeline.getCurrentStyleProperties().length)&&(ne.currentTimeline.snapshotCurrentStyles(),ne.previousNode=uo);var Zt=Ve,$t=ne.invokeQuery(Q.selector,Q.originalSelector,Q.limit,Q.includeSelf,!!lt.optional,ne.errors);ne.currentQueryTotal=$t.length;var cn=null;$t.forEach(function(An,Un){ne.currentQueryIndex=Un;var Qn=ne.createSubContext(Q.options,An);wt&&Qn.delayNextStep(wt),An===ne.element&&(cn=Qn.currentTimeline),Jt(ke,Q.animation,Qn),Qn.currentTimeline.applyStylesToKeyframe(),Zt=Math.max(Zt,Qn.currentTimeline.currentTime)}),ne.currentQueryIndex=0,ne.currentQueryTotal=0,ne.transformIntoNewTimeline(Zt),cn&&(ne.currentTimeline.mergeTimelineCollectedStyles(cn),ne.currentTimeline.snapshotCurrentStyles()),ne.previousNode=Q}},{key:"visitStagger",value:function(Q,ne){var ke=ne.parentContext,Ve=ne.currentTimeline,lt=Q.timings,wt=Math.abs(lt.duration),Zt=wt*(ne.currentQueryTotal-1),$t=wt*ne.currentQueryIndex;switch(lt.duration<0?"reverse":lt.easing){case"reverse":$t=Zt-$t;break;case"full":$t=ke.currentStaggerTime}var An=ne.currentTimeline;$t&&An.delayNextStep($t);var Un=An.currentTime;Jt(this,Q.animation,ne),ne.previousNode=Q,ke.currentStaggerTime=Ve.currentTime-Un+(Ve.startTime-ke.currentTimeline.startTime)}}]),Se}(),uo={},Jo=function(){function Se(ge,Q,ne,ke,Ve,lt,wt,Zt){(0,B.Z)(this,Se),this._driver=ge,this.element=Q,this.subInstructions=ne,this._enterClassName=ke,this._leaveClassName=Ve,this.errors=lt,this.timelines=wt,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=uo,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=Zt||new wi(this._driver,Q,0),wt.push(this.currentTimeline)}return(0,V.Z)(Se,[{key:"params",get:function(){return this.options.params}},{key:"updateOptions",value:function(Q,ne){var ke=this;if(Q){var Ve=Q,lt=this.options;null!=Ve.duration&&(lt.duration=qt(Ve.duration)),null!=Ve.delay&&(lt.delay=qt(Ve.delay));var wt=Ve.params;if(wt){var Zt=lt.params;Zt||(Zt=this.options.params={}),Object.keys(wt).forEach(function($t){(!ne||!Zt.hasOwnProperty($t))&&(Zt[$t]=ye(wt[$t],Zt,ke.errors))})}}}},{key:"_copyOptions",value:function(){var Q={};if(this.options){var ne=this.options.params;if(ne){var ke=Q.params={};Object.keys(ne).forEach(function(Ve){ke[Ve]=ne[Ve]})}}return Q}},{key:"createSubContext",value:function(){var Q=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,ne=arguments.length>1?arguments[1]:void 0,ke=arguments.length>2?arguments[2]:void 0,Ve=ne||this.element,lt=new Se(this._driver,Ve,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(Ve,ke||0));return lt.previousNode=this.previousNode,lt.currentAnimateTimings=this.currentAnimateTimings,lt.options=this._copyOptions(),lt.updateOptions(Q),lt.currentQueryIndex=this.currentQueryIndex,lt.currentQueryTotal=this.currentQueryTotal,lt.parentContext=this,this.subContextCount++,lt}},{key:"transformIntoNewTimeline",value:function(Q){return this.previousNode=uo,this.currentTimeline=this.currentTimeline.fork(this.element,Q),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(Q,ne,ke){var Ve={duration:null!=ne?ne:Q.duration,delay:this.currentTimeline.currentTime+(null!=ke?ke:0)+Q.delay,easing:""},lt=new to(this._driver,Q.element,Q.keyframes,Q.preStyleProps,Q.postStyleProps,Ve,Q.stretchStartingKeyframe);return this.timelines.push(lt),Ve}},{key:"incrementTime",value:function(Q){this.currentTimeline.forwardTime(this.currentTimeline.duration+Q)}},{key:"delayNextStep",value:function(Q){Q>0&&this.currentTimeline.delayNextStep(Q)}},{key:"invokeQuery",value:function(Q,ne,ke,Ve,lt,wt){var Zt=[];if(Ve&&Zt.push(this.element),Q.length>0){Q=(Q=Q.replace(br,"."+this._enterClassName)).replace(lo,"."+this._leaveClassName);var cn=this._driver.query(this.element,Q,1!=ke);0!==ke&&(cn=ke<0?cn.slice(cn.length+ke,cn.length):cn.slice(0,ke)),Zt.push.apply(Zt,(0,M.Z)(cn))}return!lt&&0==Zt.length&&wt.push('`query("'.concat(ne,'")` returned zero elements. (Use `query("').concat(ne,'", { optional: true })` if you wish to allow this.)')),Zt}}]),Se}(),wi=function(){function Se(ge,Q,ne,ke){(0,B.Z)(this,Se),this._driver=ge,this.element=Q,this.startTime=ne,this._elementTimelineStylesLookup=ke,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(Q),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(Q,this._localTimelineStyles)),this._loadKeyframe()}return(0,V.Z)(Se,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"delayNextStep",value:function(Q){var ne=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||ne?(this.forwardTime(this.currentTime+Q),ne&&this.snapshotCurrentStyles()):this.startTime+=Q}},{key:"fork",value:function(Q,ne){return this.applyStylesToKeyframe(),new Se(this._driver,Q,ne||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(Q){this.applyStylesToKeyframe(),this.duration=Q,this._loadKeyframe()}},{key:"_updateStyle",value:function(Q,ne){this._localTimelineStyles[Q]=ne,this._globalTimelineStyles[Q]=ne,this._styleSummary[Q]={time:this.currentTime,value:ne}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(Q){var ne=this;Q&&(this._previousKeyframe.easing=Q),Object.keys(this._globalTimelineStyles).forEach(function(ke){ne._backFill[ke]=ne._globalTimelineStyles[ke]||v.l3,ne._currentKeyframe[ke]=v.l3}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(Q,ne,ke,Ve){var lt=this;ne&&(this._previousKeyframe.easing=ne);var wt=Ve&&Ve.params||{},Zt=function(Se,ge){var ne,Q={};return Se.forEach(function(ke){"*"===ke?(ne=ne||Object.keys(ge)).forEach(function(Ve){Q[Ve]=v.l3}):Zn(ke,!1,Q)}),Q}(Q,this._globalTimelineStyles);Object.keys(Zt).forEach(function($t){var cn=ye(Zt[$t],wt,ke);lt._pendingStyles[$t]=cn,lt._localTimelineStyles.hasOwnProperty($t)||(lt._backFill[$t]=lt._globalTimelineStyles.hasOwnProperty($t)?lt._globalTimelineStyles[$t]:v.l3),lt._updateStyle($t,cn)})}},{key:"applyStylesToKeyframe",value:function(){var Q=this,ne=this._pendingStyles,ke=Object.keys(ne);0!=ke.length&&(this._pendingStyles={},ke.forEach(function(Ve){Q._currentKeyframe[Ve]=ne[Ve]}),Object.keys(this._localTimelineStyles).forEach(function(Ve){Q._currentKeyframe.hasOwnProperty(Ve)||(Q._currentKeyframe[Ve]=Q._localTimelineStyles[Ve])}))}},{key:"snapshotCurrentStyles",value:function(){var Q=this;Object.keys(this._localTimelineStyles).forEach(function(ne){var ke=Q._localTimelineStyles[ne];Q._pendingStyles[ne]=ke,Q._updateStyle(ne,ke)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"properties",get:function(){var Q=[];for(var ne in this._currentKeyframe)Q.push(ne);return Q}},{key:"mergeTimelineCollectedStyles",value:function(Q){var ne=this;Object.keys(Q._styleSummary).forEach(function(ke){var Ve=ne._styleSummary[ke],lt=Q._styleSummary[ke];(!Ve||lt.time>Ve.time)&&ne._updateStyle(ke,lt.value)})}},{key:"buildKeyframes",value:function(){var Q=this;this.applyStylesToKeyframe();var ne=new Set,ke=new Set,Ve=1===this._keyframes.size&&0===this.duration,lt=[];this._keyframes.forEach(function(An,Un){var Qn=Zn(An,!0);Object.keys(Qn).forEach(function(hr){var Ir=Qn[hr];Ir==v.k1?ne.add(hr):Ir==v.l3&&ke.add(hr)}),Ve||(Qn.offset=Un/Q.duration),lt.push(Qn)});var wt=ne.size?Te(ne.values()):[],Zt=ke.size?Te(ke.values()):[];if(Ve){var $t=lt[0],cn=rn($t);$t.offset=0,cn.offset=1,lt=[$t,cn]}return an(this.element,lt,wt,Zt,this.duration,this.startTime,this.easing,!1)}}]),Se}(),to=function(Se){(0,Z.Z)(Q,Se);var ge=(0,T.Z)(Q);function Q(ne,ke,Ve,lt,wt,Zt){var $t,cn=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return(0,B.Z)(this,Q),($t=ge.call(this,ne,ke,Zt.delay)).keyframes=Ve,$t.preStyleProps=lt,$t.postStyleProps=wt,$t._stretchStartingKeyframe=cn,$t.timings={duration:Zt.duration,delay:Zt.delay,easing:Zt.easing},$t}return(0,V.Z)(Q,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var ke=this.keyframes,Ve=this.timings,lt=Ve.delay,wt=Ve.duration,Zt=Ve.easing;if(this._stretchStartingKeyframe&<){var $t=[],cn=wt+lt,An=lt/cn,Un=Zn(ke[0],!1);Un.offset=0,$t.push(Un);var Qn=Zn(ke[0],!1);Qn.offset=bi(An),$t.push(Qn);for(var hr=ke.length-1,Ir=1;Ir<=hr;Ir++){var Cr=Zn(ke[Ir],!1);Cr.offset=bi((lt+Cr.offset*wt)/cn),$t.push(Cr)}wt=cn,lt=0,Zt="",ke=$t}return an(this.element,ke,this.preStyleProps,this.postStyleProps,wt,lt,Zt,!0)}}]),Q}(wi);function bi(Se){var ge=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,Q=Math.pow(10,ge-1);return Math.round(Se*Q)/Q}var pi=function Se(){(0,B.Z)(this,Se)},Ei=function(Se){(0,Z.Z)(Q,Se);var ge=(0,T.Z)(Q);function Q(){return(0,B.Z)(this,Q),ge.apply(this,arguments)}return(0,V.Z)(Q,[{key:"normalizePropertyName",value:function(ke,Ve){return ct(ke)}},{key:"normalizeStyleValue",value:function(ke,Ve,lt,wt){var Zt="",$t=lt.toString().trim();if(Ot[Ve]&&0!==lt&&"0"!==lt)if("number"==typeof lt)Zt="px";else{var cn=lt.match(/^[+-]?[\d\.]+([a-z]*)$/);cn&&0==cn[1].length&&wt.push("Please provide a CSS unit value for ".concat(ke,":").concat(lt))}return $t+Zt}}]),Q}(pi),Ot=function(){return Se="width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","),ge={},Se.forEach(function(Q){return ge[Q]=!0}),ge;var Se,ge}();function Pt(Se,ge,Q,ne,ke,Ve,lt,wt,Zt,$t,cn,An,Un){return{type:0,element:Se,triggerName:ge,isRemovalTransition:ke,fromState:Q,fromStyles:Ve,toState:ne,toStyles:lt,timelines:wt,queriedElements:Zt,preStyleProps:$t,postStyleProps:cn,totalTime:An,errors:Un}}var Vt={},Gt=function(){function Se(ge,Q,ne){(0,B.Z)(this,Se),this._triggerName=ge,this.ast=Q,this._stateStyles=ne}return(0,V.Z)(Se,[{key:"match",value:function(Q,ne,ke,Ve){return function(Se,ge,Q,ne,ke){return Se.some(function(Ve){return Ve(ge,Q,ne,ke)})}(this.ast.matchers,Q,ne,ke,Ve)}},{key:"buildStyles",value:function(Q,ne,ke){var Ve=this._stateStyles["*"],lt=this._stateStyles[Q],wt=Ve?Ve.buildStyles(ne,ke):{};return lt?lt.buildStyles(ne,ke):wt}},{key:"build",value:function(Q,ne,ke,Ve,lt,wt,Zt,$t,cn,An){var Un=[],Qn=this.ast.options&&this.ast.options.params||Vt,Ir=this.buildStyles(ke,Zt&&Zt.params||Vt,Un),Cr=$t&&$t.params||Vt,kr=this.buildStyles(Ve,Cr,Un),li=new Set,fi=new Map,ii=new Map,ko="void"===Ve,Be={params:Object.assign(Object.assign({},Qn),Cr)},Ye=An?[]:Ri(Q,ne,this.ast.animation,lt,wt,Ir,kr,Be,cn,Un),Ee=0;if(Ye.forEach(function(Ze){Ee=Math.max(Ze.duration+Ze.delay,Ee)}),Un.length)return Pt(ne,this._triggerName,ke,Ve,ko,Ir,kr,[],[],fi,ii,Ee,Un);Ye.forEach(function(Ze){var nt=Ze.element,Tt=O(fi,nt,{});Ze.preStyleProps.forEach(function(bn){return Tt[bn]=!0});var sn=O(ii,nt,{});Ze.postStyleProps.forEach(function(bn){return sn[bn]=!0}),nt!==ne&&li.add(nt)});var Ue=Te(li.values());return Pt(ne,this._triggerName,ke,Ve,ko,Ir,kr,Ye,Ue,fi,ii,Ee)}}]),Se}(),gn=function(){function Se(ge,Q,ne){(0,B.Z)(this,Se),this.styles=ge,this.defaultParams=Q,this.normalizer=ne}return(0,V.Z)(Se,[{key:"buildStyles",value:function(Q,ne){var ke=this,Ve={},lt=rn(this.defaultParams);return Object.keys(Q).forEach(function(wt){var Zt=Q[wt];null!=Zt&&(lt[wt]=Zt)}),this.styles.styles.forEach(function(wt){if("string"!=typeof wt){var Zt=wt;Object.keys(Zt).forEach(function($t){var cn=Zt[$t];cn.length>1&&(cn=ye(cn,lt,ne));var An=ke.normalizer.normalizePropertyName($t,ne);cn=ke.normalizer.normalizeStyleValue($t,An,cn,ne),Ve[An]=cn})}}),Ve}}]),Se}(),jn=function(){function Se(ge,Q,ne){var ke=this;(0,B.Z)(this,Se),this.name=ge,this.ast=Q,this._normalizer=ne,this.transitionFactories=[],this.states={},Q.states.forEach(function(Ve){ke.states[Ve.name]=new gn(Ve.style,Ve.options&&Ve.options.params||{},ne)}),ai(this.states,"true","1"),ai(this.states,"false","0"),Q.transitions.forEach(function(Ve){ke.transitionFactories.push(new Gt(ge,Ve,ke.states))}),this.fallbackTransition=function(Se,ge,Q){return new Gt(Se,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(lt,wt){return!0}],options:null,queryCount:0,depCount:0},ge)}(ge,this.states)}return(0,V.Z)(Se,[{key:"containsQueries",get:function(){return this.ast.queryCount>0}},{key:"matchTransition",value:function(Q,ne,ke,Ve){return this.transitionFactories.find(function(wt){return wt.match(Q,ne,ke,Ve)})||null}},{key:"matchStyles",value:function(Q,ne,ke){return this.fallbackTransition.buildStyles(Q,ne,ke)}}]),Se}();function ai(Se,ge,Q){Se.hasOwnProperty(ge)?Se.hasOwnProperty(Q)||(Se[Q]=Se[ge]):Se.hasOwnProperty(Q)&&(Se[ge]=Se[Q])}var Ci=new qn,no=function(){function Se(ge,Q,ne){(0,B.Z)(this,Se),this.bodyNode=ge,this._driver=Q,this._normalizer=ne,this._animations={},this._playersById={},this.players=[]}return(0,V.Z)(Se,[{key:"register",value:function(Q,ne){var ke=[],Ve=Ut(this._driver,ne,ke);if(ke.length)throw new Error("Unable to build the animation due to the following errors: ".concat(ke.join("\n")));this._animations[Q]=Ve}},{key:"_buildPlayer",value:function(Q,ne,ke){var Ve=Q.element,lt=N(this._driver,this._normalizer,Ve,Q.keyframes,ne,ke);return this._driver.animate(Ve,lt,Q.duration,Q.delay,Q.easing,[],!0)}},{key:"create",value:function(Q,ne){var Zt,ke=this,Ve=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},lt=[],wt=this._animations[Q],$t=new Map;if(wt?(Zt=Ri(this._driver,ne,wt,dt,Qe,{},{},Ve,Ci,lt)).forEach(function(Un){var Qn=O($t,Un.element,{});Un.postStyleProps.forEach(function(hr){return Qn[hr]=null})}):(lt.push("The requested animation doesn't exist or has already been destroyed"),Zt=[]),lt.length)throw new Error("Unable to create the animation due to the following errors: ".concat(lt.join("\n")));$t.forEach(function(Un,Qn){Object.keys(Un).forEach(function(hr){Un[hr]=ke._driver.computeStyle(Qn,hr,v.l3)})});var cn=Zt.map(function(Un){var Qn=$t.get(Un.element);return ke._buildPlayer(Un,{},Qn)}),An=E(cn);return this._playersById[Q]=An,An.onDestroy(function(){return ke.destroy(Q)}),this.players.push(An),An}},{key:"destroy",value:function(Q){var ne=this._getPlayer(Q);ne.destroy(),delete this._playersById[Q];var ke=this.players.indexOf(ne);ke>=0&&this.players.splice(ke,1)}},{key:"_getPlayer",value:function(Q){var ne=this._playersById[Q];if(!ne)throw new Error("Unable to find the timeline player referenced by ".concat(Q));return ne}},{key:"listen",value:function(Q,ne,ke,Ve){var lt=S(ne,"","","");return A(this._getPlayer(Q),ke,lt,Ve),function(){}}},{key:"command",value:function(Q,ne,ke,Ve){if("register"!=ke)if("create"!=ke){var wt=this._getPlayer(Q);switch(ke){case"play":wt.play();break;case"pause":wt.pause();break;case"reset":wt.reset();break;case"restart":wt.restart();break;case"finish":wt.finish();break;case"init":wt.init();break;case"setPosition":wt.setPosition(parseFloat(Ve[0]));break;case"destroy":this.destroy(Q)}}else this.create(Q,ne,Ve[0]||{});else this.register(Q,Ve[0])}}]),Se}(),yo="ng-animate-queued",Oo="ng-animate-disabled",Qo=".ng-animate-disabled",wo="ng-star-inserted",Uo=[],ro={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},qi={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Gi="__ng_removed",Ho=function(){function Se(ge){var Q=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,B.Z)(this,Se),this.namespaceId=Q;var ne=ge&&ge.hasOwnProperty("value"),ke=ne?ge.value:ge;if(this.value=ha(ke),ne){var Ve=rn(ge);delete Ve.value,this.options=Ve}else this.options={};this.options.params||(this.options.params={})}return(0,V.Z)(Se,[{key:"params",get:function(){return this.options.params}},{key:"absorbOptions",value:function(Q){var ne=Q.params;if(ne){var ke=this.options.params;Object.keys(ne).forEach(function(Ve){null==ke[Ve]&&(ke[Ve]=ne[Ve])})}}}]),Se}(),Si="void",Yi=new Ho(Si),fn=function(){function Se(ge,Q,ne){(0,B.Z)(this,Se),this.id=ge,this.hostElement=Q,this._engine=ne,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+ge,Co(Q,this._hostClassName)}return(0,V.Z)(Se,[{key:"listen",value:function(Q,ne,ke,Ve){var lt=this;if(!this._triggers.hasOwnProperty(ne))throw new Error('Unable to listen on the animation trigger event "'.concat(ke,'" because the animation trigger "').concat(ne,"\" doesn't exist!"));if(null==ke||0==ke.length)throw new Error('Unable to listen on the animation trigger "'.concat(ne,'" because the provided event is undefined!'));if(!function(Se){return"start"==Se||"done"==Se}(ke))throw new Error('The provided animation trigger event "'.concat(ke,'" for the animation trigger "').concat(ne,'" is not supported!'));var wt=O(this._elementListeners,Q,[]),Zt={name:ne,phase:ke,callback:Ve};wt.push(Zt);var $t=O(this._engine.statesByElement,Q,{});return $t.hasOwnProperty(ne)||(Co(Q,vt),Co(Q,vt+"-"+ne),$t[ne]=Yi),function(){lt._engine.afterFlush(function(){var cn=wt.indexOf(Zt);cn>=0&&wt.splice(cn,1),lt._triggers[ne]||delete $t[ne]})}}},{key:"register",value:function(Q,ne){return!this._triggers[Q]&&(this._triggers[Q]=ne,!0)}},{key:"_getTrigger",value:function(Q){var ne=this._triggers[Q];if(!ne)throw new Error('The provided animation trigger "'.concat(Q,'" has not been registered!'));return ne}},{key:"trigger",value:function(Q,ne,ke){var Ve=this,lt=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],wt=this._getTrigger(ne),Zt=new fr(this.id,ne,Q),$t=this._engine.statesByElement.get(Q);$t||(Co(Q,vt),Co(Q,vt+"-"+ne),this._engine.statesByElement.set(Q,$t={}));var cn=$t[ne],An=new Ho(ke,this.id),Un=ke&&ke.hasOwnProperty("value");!Un&&cn&&An.absorbOptions(cn.options),$t[ne]=An,cn||(cn=Yi);var Qn=An.value===Si;if(Qn||cn.value!==An.value){var kr=O(this._engine.playersByElement,Q,[]);kr.forEach(function(ii){ii.namespaceId==Ve.id&&ii.triggerName==ne&&ii.queued&&ii.destroy()});var li=wt.matchTransition(cn.value,An.value,Q,An.params),fi=!1;if(!li){if(!lt)return;li=wt.fallbackTransition,fi=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:Q,triggerName:ne,transition:li,fromState:cn,toState:An,player:Zt,isFallbackTransition:fi}),fi||(Co(Q,yo),Zt.onStart(function(){va(Q,yo)})),Zt.onDone(function(){var ii=Ve.players.indexOf(Zt);ii>=0&&Ve.players.splice(ii,1);var ko=Ve._engine.playersByElement.get(Q);if(ko){var Be=ko.indexOf(Zt);Be>=0&&ko.splice(Be,1)}}),this.players.push(Zt),kr.push(Zt),Zt}if(!Fi(cn.params,An.params)){var hr=[],Ir=wt.matchStyles(cn.value,cn.params,hr),Cr=wt.matchStyles(An.value,An.params,hr);hr.length?this._engine.reportError(hr):this._engine.afterFlush(function(){wn(Q,Ir),Rn(Q,Cr)})}}},{key:"deregister",value:function(Q){var ne=this;delete this._triggers[Q],this._engine.statesByElement.forEach(function(ke,Ve){delete ke[Q]}),this._elementListeners.forEach(function(ke,Ve){ne._elementListeners.set(Ve,ke.filter(function(lt){return lt.name!=Q}))})}},{key:"clearElementCache",value:function(Q){this._engine.statesByElement.delete(Q),this._elementListeners.delete(Q);var ne=this._engine.playersByElement.get(Q);ne&&(ne.forEach(function(ke){return ke.destroy()}),this._engine.playersByElement.delete(Q))}},{key:"_signalRemovalForInnerTriggers",value:function(Q,ne){var ke=this,Ve=this._engine.driver.query(Q,Qt,!0);Ve.forEach(function(lt){if(!lt[Gi]){var wt=ke._engine.fetchNamespacesByElement(lt);wt.size?wt.forEach(function(Zt){return Zt.triggerLeaveAnimation(lt,ne,!1,!0)}):ke.clearElementCache(lt)}}),this._engine.afterFlushAnimationsDone(function(){return Ve.forEach(function(lt){return ke.clearElementCache(lt)})})}},{key:"triggerLeaveAnimation",value:function(Q,ne,ke,Ve){var lt=this,wt=this._engine.statesByElement.get(Q);if(wt){var Zt=[];if(Object.keys(wt).forEach(function($t){if(lt._triggers[$t]){var cn=lt.trigger(Q,$t,Si,Ve);cn&&Zt.push(cn)}}),Zt.length)return this._engine.markElementAsRemoved(this.id,Q,!0,ne),ke&&E(Zt).onDone(function(){return lt._engine.processLeaveNode(Q)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(Q){var ne=this,ke=this._elementListeners.get(Q),Ve=this._engine.statesByElement.get(Q);if(ke&&Ve){var lt=new Set;ke.forEach(function(wt){var Zt=wt.name;if(!lt.has(Zt)){lt.add(Zt);var cn=ne._triggers[Zt].fallbackTransition,An=Ve[Zt]||Yi,Un=new Ho(Si),Qn=new fr(ne.id,Zt,Q);ne._engine.totalQueuedPlayers++,ne._queue.push({element:Q,triggerName:Zt,transition:cn,fromState:An,toState:Un,player:Qn,isFallbackTransition:!0})}})}}},{key:"removeNode",value:function(Q,ne){var ke=this,Ve=this._engine;if(Q.childElementCount&&this._signalRemovalForInnerTriggers(Q,ne),!this.triggerLeaveAnimation(Q,ne,!0)){var lt=!1;if(Ve.totalAnimations){var wt=Ve.players.length?Ve.playersByQueriedElement.get(Q):[];if(wt&&wt.length)lt=!0;else for(var Zt=Q;Zt=Zt.parentNode;)if(Ve.statesByElement.get(Zt)){lt=!0;break}}if(this.prepareLeaveAnimationListeners(Q),lt)Ve.markElementAsRemoved(this.id,Q,!1,ne);else{var cn=Q[Gi];(!cn||cn===ro)&&(Ve.afterFlush(function(){return ke.clearElementCache(Q)}),Ve.destroyInnerAnimations(Q),Ve._onRemovalComplete(Q,ne))}}}},{key:"insertNode",value:function(Q,ne){Co(Q,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(Q){var ne=this,ke=[];return this._queue.forEach(function(Ve){var lt=Ve.player;if(!lt.destroyed){var wt=Ve.element,Zt=ne._elementListeners.get(wt);Zt&&Zt.forEach(function($t){if($t.name==Ve.triggerName){var cn=S(wt,Ve.triggerName,Ve.fromState.value,Ve.toState.value);cn._data=Q,A(Ve.player,$t.phase,cn,$t.callback)}}),lt.markedForDestroy?ne._engine.afterFlush(function(){lt.destroy()}):ke.push(Ve)}}),this._queue=[],ke.sort(function(Ve,lt){var wt=Ve.transition.ast.depCount,Zt=lt.transition.ast.depCount;return 0==wt||0==Zt?wt-Zt:ne._engine.driver.containsElement(Ve.element,lt.element)?1:-1})}},{key:"destroy",value:function(Q){this.players.forEach(function(ne){return ne.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,Q)}},{key:"elementContainsData",value:function(Q){var ne=!1;return this._elementListeners.has(Q)&&(ne=!0),!!this._queue.find(function(ke){return ke.element===Q})||ne}}]),Se}(),vn=function(){function Se(ge,Q,ne){(0,B.Z)(this,Se),this.bodyNode=ge,this.driver=Q,this._normalizer=ne,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(ke,Ve){}}return(0,V.Z)(Se,[{key:"_onRemovalComplete",value:function(Q,ne){this.onRemovalComplete(Q,ne)}},{key:"queuedPlayers",get:function(){var Q=[];return this._namespaceList.forEach(function(ne){ne.players.forEach(function(ke){ke.queued&&Q.push(ke)})}),Q}},{key:"createNamespace",value:function(Q,ne){var ke=new fn(Q,ne,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,ne)?this._balanceNamespaceList(ke,ne):(this.newHostElements.set(ne,ke),this.collectEnterElement(ne)),this._namespaceLookup[Q]=ke}},{key:"_balanceNamespaceList",value:function(Q,ne){var ke=this._namespaceList.length-1;if(ke>=0){for(var Ve=!1,lt=ke;lt>=0;lt--)if(this.driver.containsElement(this._namespaceList[lt].hostElement,ne)){this._namespaceList.splice(lt+1,0,Q),Ve=!0;break}Ve||this._namespaceList.splice(0,0,Q)}else this._namespaceList.push(Q);return this.namespacesByHostElement.set(ne,Q),Q}},{key:"register",value:function(Q,ne){var ke=this._namespaceLookup[Q];return ke||(ke=this.createNamespace(Q,ne)),ke}},{key:"registerTrigger",value:function(Q,ne,ke){var Ve=this._namespaceLookup[Q];Ve&&Ve.register(ne,ke)&&this.totalAnimations++}},{key:"destroy",value:function(Q,ne){var ke=this;if(Q){var Ve=this._fetchNamespace(Q);this.afterFlush(function(){ke.namespacesByHostElement.delete(Ve.hostElement),delete ke._namespaceLookup[Q];var lt=ke._namespaceList.indexOf(Ve);lt>=0&&ke._namespaceList.splice(lt,1)}),this.afterFlushAnimationsDone(function(){return Ve.destroy(ne)})}}},{key:"_fetchNamespace",value:function(Q){return this._namespaceLookup[Q]}},{key:"fetchNamespacesByElement",value:function(Q){var ne=new Set,ke=this.statesByElement.get(Q);if(ke)for(var Ve=Object.keys(ke),lt=0;lt=0&&this.collectedLeaveElements.splice(wt,1)}if(Q){var Zt=this._fetchNamespace(Q);Zt&&Zt.insertNode(ne,ke)}Ve&&this.collectEnterElement(ne)}}},{key:"collectEnterElement",value:function(Q){this.collectedEnterElements.push(Q)}},{key:"markElementAsDisabled",value:function(Q,ne){ne?this.disabledNodes.has(Q)||(this.disabledNodes.add(Q),Co(Q,Oo)):this.disabledNodes.has(Q)&&(this.disabledNodes.delete(Q),va(Q,Oo))}},{key:"removeNode",value:function(Q,ne,ke,Ve){if(Ti(ne)){var lt=Q?this._fetchNamespace(Q):null;if(lt?lt.removeNode(ne,Ve):this.markElementAsRemoved(Q,ne,!1,Ve),ke){var wt=this.namespacesByHostElement.get(ne);wt&&wt.id!==Q&&wt.removeNode(ne,Ve)}}else this._onRemovalComplete(ne,Ve)}},{key:"markElementAsRemoved",value:function(Q,ne,ke,Ve){this.collectedLeaveElements.push(ne),ne[Gi]={namespaceId:Q,setForRemoval:Ve,hasAnimation:ke,removedBeforeQueried:!1}}},{key:"listen",value:function(Q,ne,ke,Ve,lt){return Ti(ne)?this._fetchNamespace(Q).listen(ne,ke,Ve,lt):function(){}}},{key:"_buildInstruction",value:function(Q,ne,ke,Ve,lt){return Q.transition.build(this.driver,Q.element,Q.fromState.value,Q.toState.value,ke,Ve,Q.fromState.options,Q.toState.options,ne,lt)}},{key:"destroyInnerAnimations",value:function(Q){var ne=this,ke=this.driver.query(Q,Qt,!0);ke.forEach(function(Ve){return ne.destroyActiveAnimationsForElement(Ve)}),0!=this.playersByQueriedElement.size&&(ke=this.driver.query(Q,Ct,!0)).forEach(function(Ve){return ne.finishActiveQueriedAnimationOnElement(Ve)})}},{key:"destroyActiveAnimationsForElement",value:function(Q){var ne=this.playersByElement.get(Q);ne&&ne.forEach(function(ke){ke.queued?ke.markedForDestroy=!0:ke.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(Q){var ne=this.playersByQueriedElement.get(Q);ne&&ne.forEach(function(ke){return ke.finish()})}},{key:"whenRenderingDone",value:function(){var Q=this;return new Promise(function(ne){if(Q.players.length)return E(Q.players).onDone(function(){return ne()});ne()})}},{key:"processLeaveNode",value:function(Q){var ne=this,ke=Q[Gi];if(ke&&ke.setForRemoval){if(Q[Gi]=ro,ke.namespaceId){this.destroyInnerAnimations(Q);var Ve=this._fetchNamespace(ke.namespaceId);Ve&&Ve.clearElementCache(Q)}this._onRemovalComplete(Q,ke.setForRemoval)}this.driver.matchesElement(Q,Qo)&&this.markElementAsDisabled(Q,!1),this.driver.query(Q,Qo,!0).forEach(function(lt){ne.markElementAsDisabled(lt,!1)})}},{key:"flush",value:function(){var Q=this,ne=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,ke=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(Un,Qn){return Q._balanceNamespaceList(Un,Qn)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var Ve=0;Ve=0;Tt--)this._namespaceList[Tt].drainQueuedTransitions(ne).forEach(function(nr){var Rr=nr.player,Mr=nr.element;if(Ze.push(Rr),ke.collectedEnterElements.length){var Ki=Mr[Gi];if(Ki&&Ki.setForMove)return void Rr.destroy()}var $a=!Qn||!ke.driver.containsElement(Qn,Mr),fc=Ee.get(Mr),nu=Cr.get(Mr),Xo=ke._buildInstruction(nr,Ve,nu,fc,$a);if(Xo.errors&&Xo.errors.length)nt.push(Xo);else{if($a)return Rr.onStart(function(){return wn(Mr,Xo.fromStyles)}),Rr.onDestroy(function(){return Rn(Mr,Xo.toStyles)}),void lt.push(Rr);if(nr.isFallbackTransition)return Rr.onStart(function(){return wn(Mr,Xo.fromStyles)}),Rr.onDestroy(function(){return Rn(Mr,Xo.toStyles)}),void lt.push(Rr);Xo.timelines.forEach(function(Ms){return Ms.stretchStartingKeyframe=!0}),Ve.append(Mr,Xo.timelines),Zt.push({instruction:Xo,player:Rr,element:Mr}),Xo.queriedElements.forEach(function(Ms){return O($t,Ms,[]).push(Rr)}),Xo.preStyleProps.forEach(function(Ms,yd){var Mv=Object.keys(Ms);if(Mv.length){var Ks=cn.get(yd);Ks||cn.set(yd,Ks=new Set),Mv.forEach(function(Dp){return Ks.add(Dp)})}}),Xo.postStyleProps.forEach(function(Ms,yd){var Mv=Object.keys(Ms),Ks=An.get(yd);Ks||An.set(yd,Ks=new Set),Mv.forEach(function(Dp){return Ks.add(Dp)})})}});if(nt.length){var bn=[];nt.forEach(function(nr){bn.push("@".concat(nr.triggerName," has failed due to:\n")),nr.errors.forEach(function(Rr){return bn.push("- ".concat(Rr,"\n"))})}),Ze.forEach(function(nr){return nr.destroy()}),this.reportError(bn)}var xr=new Map,Ii=new Map;Zt.forEach(function(nr){var Rr=nr.element;Ve.has(Rr)&&(Ii.set(Rr,Rr),ke._beforeAnimationBuild(nr.player.namespaceId,nr.instruction,xr))}),lt.forEach(function(nr){var Rr=nr.element;ke._getPreviousPlayers(Rr,!1,nr.namespaceId,nr.triggerName,null).forEach(function(Ki){O(xr,Rr,[]).push(Ki),Ki.destroy()})});var Ko=li.filter(function(nr){return ga(nr,cn,An)}),Pa=new Map;ma(Pa,this.driver,ii,An,v.l3).forEach(function(nr){ga(nr,cn,An)&&Ko.push(nr)});var Mo=new Map;Ir.forEach(function(nr,Rr){ma(Mo,ke.driver,new Set(nr),cn,v.k1)}),Ko.forEach(function(nr){var Rr=Pa.get(nr),Mr=Mo.get(nr);Pa.set(nr,Object.assign(Object.assign({},Rr),Mr))});var ms=[],fo=[],dh={};Zt.forEach(function(nr){var Rr=nr.element,Mr=nr.player,Ki=nr.instruction;if(Ve.has(Rr)){if(Un.has(Rr))return Mr.onDestroy(function(){return Rn(Rr,Ki.toStyles)}),Mr.disabled=!0,Mr.overrideTotalTime(Ki.totalTime),void lt.push(Mr);var $a=dh;if(Ii.size>1){for(var fc=Rr,nu=[];fc=fc.parentNode;){var Xo=Ii.get(fc);if(Xo){$a=Xo;break}nu.push(fc)}nu.forEach(function(yd){return Ii.set(yd,$a)})}var Ap=ke._buildAnimation(Mr.namespaceId,Ki,xr,wt,Mo,Pa);if(Mr.setRealPlayer(Ap),$a===dh)ms.push(Mr);else{var Ms=ke.playersByElement.get($a);Ms&&Ms.length&&(Mr.parentPlayer=E(Ms)),lt.push(Mr)}}else wn(Rr,Ki.fromStyles),Mr.onDestroy(function(){return Rn(Rr,Ki.toStyles)}),fo.push(Mr),Un.has(Rr)&<.push(Mr)}),fo.forEach(function(nr){var Rr=wt.get(nr.element);if(Rr&&Rr.length){var Mr=E(Rr);nr.setRealPlayer(Mr)}}),lt.forEach(function(nr){nr.parentPlayer?nr.syncPlayerEvents(nr.parentPlayer):nr.destroy()});for(var Mp=0;Mp0?this.driver.animate(Q.element,ne,Q.duration,Q.delay,Q.easing,ke):new v.ZN(Q.duration,Q.delay)}}]),Se}(),fr=function(){function Se(ge,Q,ne){(0,B.Z)(this,Se),this.namespaceId=ge,this.triggerName=Q,this.element=ne,this._player=new v.ZN,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return(0,V.Z)(Se,[{key:"setRealPlayer",value:function(Q){var ne=this;this._containsRealPlayer||(this._player=Q,Object.keys(this._queuedCallbacks).forEach(function(ke){ne._queuedCallbacks[ke].forEach(function(Ve){return A(Q,ke,void 0,Ve)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(Q.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(Q){this.totalTime=Q}},{key:"syncPlayerEvents",value:function(Q){var ne=this,ke=this._player;ke.triggerCallback&&Q.onStart(function(){return ke.triggerCallback("start")}),Q.onDone(function(){return ne.finish()}),Q.onDestroy(function(){return ne.destroy()})}},{key:"_queueEvent",value:function(Q,ne){O(this._queuedCallbacks,Q,[]).push(ne)}},{key:"onDone",value:function(Q){this.queued&&this._queueEvent("done",Q),this._player.onDone(Q)}},{key:"onStart",value:function(Q){this.queued&&this._queueEvent("start",Q),this._player.onStart(Q)}},{key:"onDestroy",value:function(Q){this.queued&&this._queueEvent("destroy",Q),this._player.onDestroy(Q)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(Q){this.queued||this._player.setPosition(Q)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(Q){var ne=this._player;ne.triggerCallback&&ne.triggerCallback(Q)}}]),Se}();function ha(Se){return null!=Se?Se:null}function Ti(Se){return Se&&1===Se.nodeType}function Ni(Se,ge){var Q=Se.style.display;return Se.style.display=null!=ge?ge:"none",Q}function ma(Se,ge,Q,ne,ke){var Ve=[];Q.forEach(function(Zt){return Ve.push(Ni(Zt))});var lt=[];ne.forEach(function(Zt,$t){var cn={};Zt.forEach(function(An){var Un=cn[An]=ge.computeStyle($t,An,ke);(!Un||0==Un.length)&&($t[Gi]=qi,lt.push($t))}),Se.set($t,cn)});var wt=0;return Q.forEach(function(Zt){return Ni(Zt,Ve[wt++])}),lt}function Eo(Se,ge){var Q=new Map;if(Se.forEach(function(wt){return Q.set(wt,[])}),0==ge.length)return Q;var ke=new Set(ge),Ve=new Map;function lt(wt){if(!wt)return 1;var Zt=Ve.get(wt);if(Zt)return Zt;var $t=wt.parentNode;return Zt=Q.has($t)?$t:ke.has($t)?1:lt($t),Ve.set(wt,Zt),Zt}return ge.forEach(function(wt){var Zt=lt(wt);1!==Zt&&Q.get(Zt).push(wt)}),Q}var Po="$$classes";function Co(Se,ge){if(Se.classList)Se.classList.add(ge);else{var Q=Se[Po];Q||(Q=Se[Po]={}),Q[ge]=!0}}function va(Se,ge){if(Se.classList)Se.classList.remove(ge);else{var Q=Se[Po];Q&&delete Q[ge]}}function Ma(Se,ge,Q){E(Q).onDone(function(){return Se.processLeaveNode(ge)})}function So(Se,ge){for(var Q=0;Q0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(Q)}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}}]),Se}();function _a(Se,ge){var Q=null,ne=null;return Array.isArray(ge)&&ge.length?(Q=_r(ge[0]),ge.length>1&&(ne=_r(ge[ge.length-1]))):ge&&(Q=_r(ge)),Q||ne?new Aa(Se,Q,ne):null}var Aa=function(){var Se=function(){function ge(Q,ne,ke){(0,B.Z)(this,ge),this._element=Q,this._startStyles=ne,this._endStyles=ke,this._state=0;var Ve=ge.initialStylesByElement.get(Q);Ve||ge.initialStylesByElement.set(Q,Ve={}),this._initialStyles=Ve}return(0,V.Z)(ge,[{key:"start",value:function(){this._state<1&&(this._startStyles&&Rn(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(Rn(this._element,this._initialStyles),this._endStyles&&(Rn(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(ge.initialStylesByElement.delete(this._element),this._startStyles&&(wn(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(wn(this._element,this._endStyles),this._endStyles=null),Rn(this._element,this._initialStyles),this._state=3)}}]),ge}();return Se.initialStylesByElement=new WeakMap,Se}();function _r(Se){for(var ge=null,Q=Object.keys(Se),ne=0;ne=this._delay&&ke>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),_l(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.finish(),function(Se,ge){var ne=eu(Se,"").split(","),ke=ja(ne,ge);ke>=0&&(ne.splice(ke,1),tn(Se,"",ne.join(",")))}(this._element,this._name))}}]),Se}();function qa(Se,ge,Q){tn(Se,"PlayState",Q,Qi(Se,ge))}function Qi(Se,ge){var Q=eu(Se,"");return Q.indexOf(",")>0?ja(Q.split(","),ge):ja([Q],ge)}function ja(Se,ge){for(var Q=0;Q=0)return Q;return-1}function _l(Se,ge,Q){Q?Se.removeEventListener(Va,ge):Se.addEventListener(Va,ge)}function tn(Se,ge,Q,ne){var ke=Bi+ge;if(null!=ne){var Ve=Se.style[ke];if(Ve.length){var lt=Ve.split(",");lt[ne]=Q,Q=lt.join(",")}}Se.style[ke]=Q}function eu(Se,ge){return Se.style[Bi+ge]||""}var Fe=function(){function Se(ge,Q,ne,ke,Ve,lt,wt,Zt){(0,B.Z)(this,Se),this.element=ge,this.keyframes=Q,this.animationName=ne,this._duration=ke,this._delay=Ve,this._finalStyles=wt,this._specialStyles=Zt,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=lt||"linear",this.totalTime=ke+Ve,this._buildStyler()}return(0,V.Z)(Se,[{key:"onStart",value:function(Q){this._onStartFns.push(Q)}},{key:"onDone",value:function(Q){this._onDoneFns.push(Q)}},{key:"onDestroy",value:function(Q){this._onDestroyFns.push(Q)}},{key:"destroy",value:function(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(Q){return Q()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(Q){return Q()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(Q){return Q()}),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(Q){this._styler.setPosition(Q)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var Q=this;this._styler=new ji(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return Q.finish()})}},{key:"triggerCallback",value:function(Q){var ne="start"==Q?this._onStartFns:this._onDoneFns;ne.forEach(function(ke){return ke()}),ne.length=0}},{key:"beforeDestroy",value:function(){var Q=this;this.init();var ne={};if(this.hasStarted()){var ke=this._state>=3;Object.keys(this._finalStyles).forEach(function(Ve){"offset"!=Ve&&(ne[Ve]=ke?Q._finalStyles[Ve]:nn(Q.element,Ve))})}this.currentSnapshot=ne}}]),Se}(),$e=function(Se){(0,Z.Z)(Q,Se);var ge=(0,T.Z)(Q);function Q(ne,ke){var Ve;return(0,B.Z)(this,Q),(Ve=ge.call(this)).element=ne,Ve._startingStyles={},Ve.__initialized=!1,Ve._styles=_t(ke),Ve}return(0,V.Z)(Q,[{key:"init",value:function(){var ke=this;this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEach(function(Ve){ke._startingStyles[Ve]=ke.element.style[Ve]}),(0,I.Z)((0,D.Z)(Q.prototype),"init",this).call(this))}},{key:"play",value:function(){var ke=this;!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(function(Ve){return ke.element.style.setProperty(Ve,ke._styles[Ve])}),(0,I.Z)((0,D.Z)(Q.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var ke=this;!this._startingStyles||(Object.keys(this._startingStyles).forEach(function(Ve){var lt=ke._startingStyles[Ve];lt?ke.element.style.setProperty(Ve,lt):ke.element.style.removeProperty(Ve)}),this._startingStyles=null,(0,I.Z)((0,D.Z)(Q.prototype),"destroy",this).call(this))}}]),Q}(v.ZN),We="gen_css_kf_",fe=function(){function Se(){(0,B.Z)(this,Se),this._count=0}return(0,V.Z)(Se,[{key:"validateStyleProperty",value:function(Q){return oe(Q)}},{key:"matchesElement",value:function(Q,ne){return be(Q,ne)}},{key:"containsElement",value:function(Q,ne){return it(Q,ne)}},{key:"query",value:function(Q,ne,ke){return qe(Q,ne,ke)}},{key:"computeStyle",value:function(Q,ne,ke){return window.getComputedStyle(Q)[ne]}},{key:"buildKeyframeElement",value:function(Q,ne,ke){ke=ke.map(function(Zt){return _t(Zt)});var Ve="@keyframes ".concat(ne," {\n"),lt="";ke.forEach(function(Zt){lt=" ";var $t=parseFloat(Zt.offset);Ve+="".concat(lt).concat(100*$t,"% {\n"),lt+=" ",Object.keys(Zt).forEach(function(cn){var An=Zt[cn];switch(cn){case"offset":return;case"easing":return void(An&&(Ve+="".concat(lt,"animation-timing-function: ").concat(An,";\n")));default:return void(Ve+="".concat(lt).concat(cn,": ").concat(An,";\n"))}}),Ve+="".concat(lt,"}\n")}),Ve+="}\n";var wt=document.createElement("style");return wt.textContent=Ve,wt}},{key:"animate",value:function(Q,ne,ke,Ve,lt){var wt=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],$t=wt.filter(function(kr){return kr instanceof Fe}),cn={};Yt(ke,Ve)&&$t.forEach(function(kr){var li=kr.currentSnapshot;Object.keys(li).forEach(function(fi){return cn[fi]=li[fi]})});var An=Ce(ne=Kt(Q,ne,cn));if(0==ke)return new $e(Q,An);var Un="".concat(We).concat(this._count++),Qn=this.buildKeyframeElement(Q,Un,ne),hr=_e(Q);hr.appendChild(Qn);var Ir=_a(Q,ne),Cr=new Fe(Q,ne,Un,ke,Ve,lt,An,Ir);return Cr.onDestroy(function(){return Re(Qn)}),Cr}}]),Se}();function _e(Se){var ge,Q=null===(ge=Se.getRootNode)||void 0===ge?void 0:ge.call(Se);return"undefined"!=typeof ShadowRoot&&Q instanceof ShadowRoot?Q:document.head}function Ce(Se){var ge={};return Se&&(Array.isArray(Se)?Se:[Se]).forEach(function(ne){Object.keys(ne).forEach(function(ke){"offset"==ke||"easing"==ke||(ge[ke]=ne[ke])})}),ge}function Re(Se){Se.parentNode.removeChild(Se)}var ht=function(){function Se(ge,Q,ne,ke){(0,B.Z)(this,Se),this.element=ge,this.keyframes=Q,this.options=ne,this._specialStyles=ke,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=ne.duration,this._delay=ne.delay||0,this.time=this._duration+this._delay}return(0,V.Z)(Se,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(Q){return Q()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var Q=this;if(!this._initialized){this._initialized=!0;var ne=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,ne,this.options),this._finalKeyframe=ne.length?ne[ne.length-1]:{},this.domPlayer.addEventListener("finish",function(){return Q._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(Q,ne,ke){return Q.animate(ne,ke)}},{key:"onStart",value:function(Q){this._onStartFns.push(Q)}},{key:"onDone",value:function(Q){this._onDoneFns.push(Q)}},{key:"onDestroy",value:function(Q){this._onDestroyFns.push(Q)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(Q){return Q()}),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(Q){return Q()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(Q){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=Q*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"totalTime",get:function(){return this._delay+this._duration}},{key:"beforeDestroy",value:function(){var Q=this,ne={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(ke){"offset"!=ke&&(ne[ke]=Q._finished?Q._finalKeyframe[ke]:nn(Q.element,ke))}),this.currentSnapshot=ne}},{key:"triggerCallback",value:function(Q){var ne="start"==Q?this._onStartFns:this._onDoneFns;ne.forEach(function(ke){return ke()}),ne.length=0}}]),Se}(),gt=function(){function Se(){(0,B.Z)(this,Se),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(qr().toString()),this._cssKeyframesDriver=new fe}return(0,V.Z)(Se,[{key:"validateStyleProperty",value:function(Q){return oe(Q)}},{key:"matchesElement",value:function(Q,ne){return be(Q,ne)}},{key:"containsElement",value:function(Q,ne){return it(Q,ne)}},{key:"query",value:function(Q,ne,ke){return qe(Q,ne,ke)}},{key:"computeStyle",value:function(Q,ne,ke){return window.getComputedStyle(Q)[ne]}},{key:"overrideWebAnimationsSupport",value:function(Q){this._isNativeImpl=Q}},{key:"animate",value:function(Q,ne,ke,Ve,lt){var wt=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],Zt=arguments.length>6?arguments[6]:void 0,$t=!Zt&&!this._isNativeImpl;if($t)return this._cssKeyframesDriver.animate(Q,ne,ke,Ve,lt,wt);var cn=0==Ve?"both":"forwards",An={duration:ke,delay:Ve,fill:cn};lt&&(An.easing=lt);var Un={},Qn=wt.filter(function(Ir){return Ir instanceof ht});Yt(ke,Ve)&&Qn.forEach(function(Ir){var Cr=Ir.currentSnapshot;Object.keys(Cr).forEach(function(kr){return Un[kr]=Cr[kr]})});var hr=_a(Q,ne=Kt(Q,ne=ne.map(function(Ir){return Zn(Ir,!1)}),Un));return new ht(Q,ne,An,hr)}}]),Se}();function qr(){return _()&&Element.prototype.animate||{}}var Oi=f(40098),ya=function(){var Se=function(ge){(0,Z.Z)(ne,ge);var Q=(0,T.Z)(ne);function ne(ke,Ve){var lt;return(0,B.Z)(this,ne),(lt=Q.call(this))._nextAnimationId=0,lt._renderer=ke.createRenderer(Ve.body,{id:"0",encapsulation:R.ifc.None,styles:[],data:{animation:[]}}),lt}return(0,V.Z)(ne,[{key:"build",value:function(Ve){var lt=this._nextAnimationId.toString();this._nextAnimationId++;var wt=Array.isArray(Ve)?(0,v.vP)(Ve):Ve;return Cl(this._renderer,null,lt,"register",[wt]),new si(lt,this._renderer)}}]),ne}(v._j);return Se.\u0275fac=function(Q){return new(Q||Se)(R.LFG(R.FYo),R.LFG(Oi.K0))},Se.\u0275prov=R.Yz7({token:Se,factory:Se.\u0275fac}),Se}(),si=function(Se){(0,Z.Z)(Q,Se);var ge=(0,T.Z)(Q);function Q(ne,ke){var Ve;return(0,B.Z)(this,Q),(Ve=ge.call(this))._id=ne,Ve._renderer=ke,Ve}return(0,V.Z)(Q,[{key:"create",value:function(ke,Ve){return new Pi(this._id,ke,Ve||{},this._renderer)}}]),Q}(v.LC),Pi=function(){function Se(ge,Q,ne,ke){(0,B.Z)(this,Se),this.id=ge,this.element=Q,this._renderer=ke,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",ne)}return(0,V.Z)(Se,[{key:"_listen",value:function(Q,ne){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(Q),ne)}},{key:"_command",value:function(Q){for(var ne=arguments.length,ke=new Array(ne>1?ne-1:0),Ve=1;Ve=0&&ne3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(Q,ne,ke),this.engine.onInsert(this.namespaceId,ne,Q,Ve)}},{key:"removeChild",value:function(Q,ne,ke){this.engine.onRemove(this.namespaceId,ne,this.delegate,ke)}},{key:"selectRootElement",value:function(Q,ne){return this.delegate.selectRootElement(Q,ne)}},{key:"parentNode",value:function(Q){return this.delegate.parentNode(Q)}},{key:"nextSibling",value:function(Q){return this.delegate.nextSibling(Q)}},{key:"setAttribute",value:function(Q,ne,ke,Ve){this.delegate.setAttribute(Q,ne,ke,Ve)}},{key:"removeAttribute",value:function(Q,ne,ke){this.delegate.removeAttribute(Q,ne,ke)}},{key:"addClass",value:function(Q,ne){this.delegate.addClass(Q,ne)}},{key:"removeClass",value:function(Q,ne){this.delegate.removeClass(Q,ne)}},{key:"setStyle",value:function(Q,ne,ke,Ve){this.delegate.setStyle(Q,ne,ke,Ve)}},{key:"removeStyle",value:function(Q,ne,ke){this.delegate.removeStyle(Q,ne,ke)}},{key:"setProperty",value:function(Q,ne,ke){"@"==ne.charAt(0)&&ne==Xa?this.disableAnimations(Q,!!ke):this.delegate.setProperty(Q,ne,ke)}},{key:"setValue",value:function(Q,ne){this.delegate.setValue(Q,ne)}},{key:"listen",value:function(Q,ne,ke){return this.delegate.listen(Q,ne,ke)}},{key:"disableAnimations",value:function(Q,ne){this.engine.disableAnimations(Q,ne)}}]),Se}(),Tp=function(Se){(0,Z.Z)(Q,Se);var ge=(0,T.Z)(Q);function Q(ne,ke,Ve,lt){var wt;return(0,B.Z)(this,Q),(wt=ge.call(this,ke,Ve,lt)).factory=ne,wt.namespaceId=ke,wt}return(0,V.Z)(Q,[{key:"setProperty",value:function(ke,Ve,lt){"@"==Ve.charAt(0)?"."==Ve.charAt(1)&&Ve==Xa?this.disableAnimations(ke,lt=void 0===lt||!!lt):this.engine.process(this.namespaceId,ke,Ve.substr(1),lt):this.delegate.setProperty(ke,Ve,lt)}},{key:"listen",value:function(ke,Ve,lt){var wt=this;if("@"==Ve.charAt(0)){var Zt=function(Se){switch(Se){case"body":return document.body;case"document":return document;case"window":return window;default:return Se}}(ke),$t=Ve.substr(1),cn="";if("@"!=$t.charAt(0)){var An=function(Se){var ge=Se.indexOf(".");return[Se.substring(0,ge),Se.substr(ge+1)]}($t),Un=(0,U.Z)(An,2);$t=Un[0],cn=Un[1]}return this.engine.listen(this.namespaceId,Zt,$t,cn,function(Qn){wt.factory.scheduleListenerCallback(Qn._data||-1,lt,Qn)})}return this.delegate.listen(ke,Ve,lt)}}]),Q}(ks),cc=function(){var Se=function(ge){(0,Z.Z)(ne,ge);var Q=(0,T.Z)(ne);function ne(ke,Ve,lt){return(0,B.Z)(this,ne),Q.call(this,ke.body,Ve,lt)}return(0,V.Z)(ne,[{key:"ngOnDestroy",value:function(){this.flush()}}]),ne}(Ji);return Se.\u0275fac=function(Q){return new(Q||Se)(R.LFG(Oi.K0),R.LFG(Ft),R.LFG(pi))},Se.\u0275prov=R.Yz7({token:Se,factory:Se.\u0275fac}),Se}(),vd=new R.OlP("AnimationModuleType"),Ep=[{provide:v._j,useClass:ya},{provide:pi,useFactory:function(){return new Ei}},{provide:Ji,useClass:cc},{provide:R.FYo,useFactory:function(Se,ge,Q){return new ba(Se,ge,Q)},deps:[b.se,Ji,R.R0b]}],kp=[{provide:Ft,useFactory:function(){return"function"==typeof qr()?new gt:new fe}},{provide:vd,useValue:"BrowserAnimations"}].concat(Ep),gd=[{provide:Ft,useClass:yt},{provide:vd,useValue:"NoopAnimations"}].concat(Ep),tu=function(){var Se=function(){function ge(){(0,B.Z)(this,ge)}return(0,V.Z)(ge,null,[{key:"withConfig",value:function(ne){return{ngModule:ge,providers:ne.disableAnimations?gd:kp}}}]),ge}();return Se.\u0275fac=function(Q){return new(Q||Se)},Se.\u0275mod=R.oAB({type:Se}),Se.\u0275inj=R.cJS({providers:kp,imports:[b.b2]}),Se}()},29176:function(ue,q,f){"use strict";f.d(q,{b2:function(){return ze},H7:function(){return Cn},Dx:function(){return Vr},HJ:function(){return uo},q6:function(){return Ne},se:function(){return bt}});var _,U=f(13920),B=f(89200),V=f(14105),Z=f(18967),T=f(10509),R=f(97154),b=f(40098),v=f(38999),D=function(Ot){(0,T.Z)(Pt,Ot);var jt=(0,R.Z)(Pt);function Pt(){return(0,Z.Z)(this,Pt),jt.apply(this,arguments)}return(0,V.Z)(Pt,[{key:"onAndCancel",value:function(Gt,Xt,gn){return Gt.addEventListener(Xt,gn,!1),function(){Gt.removeEventListener(Xt,gn,!1)}}},{key:"dispatchEvent",value:function(Gt,Xt){Gt.dispatchEvent(Xt)}},{key:"remove",value:function(Gt){Gt.parentNode&&Gt.parentNode.removeChild(Gt)}},{key:"createElement",value:function(Gt,Xt){return(Xt=Xt||this.getDefaultDocument()).createElement(Gt)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(Gt){return Gt.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(Gt){return Gt instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(Gt,Xt){return"window"===Xt?window:"document"===Xt?Gt:"body"===Xt?Gt.body:null}},{key:"getBaseHref",value:function(Gt){var Xt=(k=k||document.querySelector("base"))?k.getAttribute("href"):null;return null==Xt?null:function(Ot){(_=_||document.createElement("a")).setAttribute("href",Ot);var jt=_.pathname;return"/"===jt.charAt(0)?jt:"/".concat(jt)}(Xt)}},{key:"resetBaseElement",value:function(){k=null}},{key:"getUserAgent",value:function(){return window.navigator.userAgent}},{key:"getCookie",value:function(Gt){return(0,b.Mx)(document.cookie,Gt)}}],[{key:"makeCurrent",value:function(){(0,b.HT)(new Pt)}}]),Pt}(function(Ot){(0,T.Z)(Pt,Ot);var jt=(0,R.Z)(Pt);function Pt(){var Vt;return(0,Z.Z)(this,Pt),(Vt=jt.apply(this,arguments)).supportsDOMEvents=!0,Vt}return Pt}(b.w_)),k=null,E=new v.OlP("TRANSITION_ID"),A=[{provide:v.ip1,useFactory:function(Ot,jt,Pt){return function(){Pt.get(v.CZH).donePromise.then(function(){for(var Vt=(0,b.q)(),Gt=jt.querySelectorAll('style[ng-transition="'.concat(Ot,'"]')),Xt=0;Xt1&&void 0!==arguments[1])||arguments[1],gn=Pt.findTestabilityInTree(Gt,Xt);if(null==gn)throw new Error("Could not find testability for element.");return gn},v.dqk.getAllAngularTestabilities=function(){return Pt.getAllTestabilities()},v.dqk.getAllAngularRootElements=function(){return Pt.getAllRootElements()},v.dqk.frameworkStabilizers||(v.dqk.frameworkStabilizers=[]),v.dqk.frameworkStabilizers.push(function(Xt){var gn=v.dqk.getAllAngularTestabilities(),Gn=gn.length,jn=!1,zn=function(Ci){jn=jn||Ci,0==--Gn&&Xt(jn)};gn.forEach(function(ai){ai.whenStable(zn)})})}},{key:"findTestabilityInTree",value:function(Pt,Vt,Gt){if(null==Vt)return null;var Xt=Pt.getTestability(Vt);return null!=Xt?Xt:Gt?(0,b.q)().isShadowRoot(Vt)?this.findTestabilityInTree(Pt,Vt.host,!0):this.findTestabilityInTree(Pt,Vt.parentElement,!0):null}}],[{key:"init",value:function(){(0,v.VLi)(new Ot)}}]),Ot}(),S=function(){var Ot=function(){function jt(){(0,Z.Z)(this,jt)}return(0,V.Z)(jt,[{key:"build",value:function(){return new XMLHttpRequest}}]),jt}();return Ot.\u0275fac=function(Pt){return new(Pt||Ot)},Ot.\u0275prov=v.Yz7({token:Ot,factory:Ot.\u0275fac}),Ot}();var it=new v.OlP("EventManagerPlugins"),qe=function(){var Ot=function(){function jt(Pt,Vt){var Gt=this;(0,Z.Z)(this,jt),this._zone=Vt,this._eventNameToPlugin=new Map,Pt.forEach(function(Xt){return Xt.manager=Gt}),this._plugins=Pt.slice().reverse()}return(0,V.Z)(jt,[{key:"addEventListener",value:function(Vt,Gt,Xt){return this._findPluginFor(Gt).addEventListener(Vt,Gt,Xt)}},{key:"addGlobalEventListener",value:function(Vt,Gt,Xt){return this._findPluginFor(Gt).addGlobalEventListener(Vt,Gt,Xt)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(Vt){var Gt=this._eventNameToPlugin.get(Vt);if(Gt)return Gt;for(var Xt=this._plugins,gn=0;gn-1&&(gn.splice(no,1),zn+=Ci+".")}),zn+=jn,0!=gn.length||0===jn.length)return null;var ai={};return ai.domEventName=Gn,ai.fullKey=zn,ai}},{key:"getEventFullKey",value:function(Xt){var gn="",Gn=function(Ot){var jt=Ot.key;if(null==jt){if(null==(jt=Ot.keyIdentifier))return"Unidentified";jt.startsWith("U+")&&(jt=String.fromCharCode(parseInt(jt.substring(2),16)),3===Ot.location&&Kt.hasOwnProperty(jt)&&(jt=Kt[jt]))}return Yt[jt]||jt}(Xt);return" "===(Gn=Gn.toLowerCase())?Gn="space":"."===Gn&&(Gn="dot"),ct.forEach(function(jn){jn!=Gn&&(0,Tn[jn])(Xt)&&(gn+=jn+".")}),gn+=Gn}},{key:"eventCallback",value:function(Xt,gn,Gn){return function(jn){Vt.getEventFullKey(jn)===Xt&&Gn.runGuarded(function(){return gn(jn)})}}},{key:"_normalizeKey",value:function(Xt){switch(Xt){case"esc":return"escape";default:return Xt}}}]),Vt}(_t);return Ot.\u0275fac=function(Pt){return new(Pt||Ot)(v.LFG(b.K0))},Ot.\u0275prov=v.Yz7({token:Ot,factory:Ot.\u0275fac}),Ot}(),Cn=function(){var Ot=function jt(){(0,Z.Z)(this,jt)};return Ot.\u0275fac=function(Pt){return new(Pt||Ot)},Ot.\u0275prov=(0,v.Yz7)({factory:function(){return(0,v.LFG)(tr)},token:Ot,providedIn:"root"}),Ot}(),tr=function(){var Ot=function(jt){(0,T.Z)(Vt,jt);var Pt=(0,R.Z)(Vt);function Vt(Gt){var Xt;return(0,Z.Z)(this,Vt),(Xt=Pt.call(this))._doc=Gt,Xt}return(0,V.Z)(Vt,[{key:"sanitize",value:function(Xt,gn){if(null==gn)return null;switch(Xt){case v.q3G.NONE:return gn;case v.q3G.HTML:return(0,v.qzn)(gn,"HTML")?(0,v.z3N)(gn):(0,v.EiD)(this._doc,String(gn)).toString();case v.q3G.STYLE:return(0,v.qzn)(gn,"Style")?(0,v.z3N)(gn):gn;case v.q3G.SCRIPT:if((0,v.qzn)(gn,"Script"))return(0,v.z3N)(gn);throw new Error("unsafe value used in a script context");case v.q3G.URL:return(0,v.yhl)(gn),(0,v.qzn)(gn,"URL")?(0,v.z3N)(gn):(0,v.mCW)(String(gn));case v.q3G.RESOURCE_URL:if((0,v.qzn)(gn,"ResourceURL"))return(0,v.z3N)(gn);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(Xt," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(Xt){return(0,v.JVY)(Xt)}},{key:"bypassSecurityTrustStyle",value:function(Xt){return(0,v.L6k)(Xt)}},{key:"bypassSecurityTrustScript",value:function(Xt){return(0,v.eBb)(Xt)}},{key:"bypassSecurityTrustUrl",value:function(Xt){return(0,v.LAX)(Xt)}},{key:"bypassSecurityTrustResourceUrl",value:function(Xt){return(0,v.pB0)(Xt)}}]),Vt}(Cn);return Ot.\u0275fac=function(Pt){return new(Pt||Ot)(v.LFG(b.K0))},Ot.\u0275prov=(0,v.Yz7)({factory:function(){return function(Ot){return new tr(Ot.get(b.K0))}((0,v.LFG)(v.gxx))},token:Ot,providedIn:"root"}),Ot}(),Ne=(0,v.eFA)(v._c5,"browser",[{provide:v.Lbi,useValue:b.bD},{provide:v.g9A,useValue:function(){D.makeCurrent(),w.init()},multi:!0},{provide:b.K0,useFactory:function(){return(0,v.RDi)(document),document},deps:[]}]),Le=[[],{provide:v.zSh,useValue:"root"},{provide:v.qLn,useFactory:function(){return new v.qLn},deps:[]},{provide:it,useClass:$n,multi:!0,deps:[b.K0,v.R0b,v.Lbi]},{provide:it,useClass:Pn,multi:!0,deps:[b.K0]},[],{provide:bt,useClass:bt,deps:[qe,Ft,v.AFp]},{provide:v.FYo,useExisting:bt},{provide:yt,useExisting:Ft},{provide:Ft,useClass:Ft,deps:[b.K0]},{provide:v.dDg,useClass:v.dDg,deps:[v.R0b]},{provide:qe,useClass:qe,deps:[it,v.R0b]},{provide:b.JF,useClass:S,deps:[]},[]],ze=function(){var Ot=function(){function jt(Pt){if((0,Z.Z)(this,jt),Pt)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return(0,V.Z)(jt,null,[{key:"withServerTransition",value:function(Vt){return{ngModule:jt,providers:[{provide:v.AFp,useValue:Vt.appId},{provide:E,useExisting:v.AFp},A]}}}]),jt}();return Ot.\u0275fac=function(Pt){return new(Pt||Ot)(v.LFG(Ot,12))},Ot.\u0275mod=v.oAB({type:Ot}),Ot.\u0275inj=v.cJS({providers:Le,imports:[b.ez,v.hGG]}),Ot}();function Nr(){return new Vr((0,v.LFG)(b.K0))}var Vr=function(){var Ot=function(){function jt(Pt){(0,Z.Z)(this,jt),this._doc=Pt}return(0,V.Z)(jt,[{key:"getTitle",value:function(){return this._doc.title}},{key:"setTitle",value:function(Vt){this._doc.title=Vt||""}}]),jt}();return Ot.\u0275fac=function(Pt){return new(Pt||Ot)(v.LFG(b.K0))},Ot.\u0275prov=(0,v.Yz7)({factory:Nr,token:Ot,providedIn:"root"}),Ot}(),br="undefined"!=typeof window&&window||{},Jr=function Ot(jt,Pt){(0,Z.Z)(this,Ot),this.msPerTick=jt,this.numTicks=Pt},lo=function(){function Ot(jt){(0,Z.Z)(this,Ot),this.appRef=jt.injector.get(v.z2F)}return(0,V.Z)(Ot,[{key:"timeChangeDetection",value:function(Pt){var Vt=Pt&&Pt.record,Gt="Change Detection",Xt=null!=br.console.profile;Vt&&Xt&&br.console.profile(Gt);for(var gn=Ri(),Gn=0;Gn<5||Ri()-gn<500;)this.appRef.tick(),Gn++;var jn=Ri();Vt&&Xt&&br.console.profileEnd(Gt);var zn=(jn-gn)/Gn;return br.console.log("ran ".concat(Gn," change detection cycles")),br.console.log("".concat(zn.toFixed(2)," ms per check")),new Jr(zn,Gn)}}]),Ot}();function Ri(){return br.performance&&br.performance.now?br.performance.now():(new Date).getTime()}function uo(Ot){return function(Ot,jt){"undefined"!=typeof COMPILED&&COMPILED||((v.dqk.ng=v.dqk.ng||{})[Ot]=jt)}("profiler",new lo(Ot)),Ot}},95665:function(ue,q,f){"use strict";f.d(q,{R:function(){return V}});var U=f(4839),B={};function V(){return(0,U.KV)()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:B}},4839:function(ue,q,f){"use strict";function U(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function B(Z,T){return Z.require(T)}f.d(q,{KV:function(){return U},l$:function(){return B}}),ue=f.hmd(ue)},46354:function(ue,q,f){"use strict";f.d(q,{yW:function(){return v},ph:function(){return I}});var U=f(95665),B=f(4839);ue=f.hmd(ue);var V={nowSeconds:function(){return Date.now()/1e3}},R=(0,B.KV)()?function(){try{return(0,B.l$)(ue,"perf_hooks").performance}catch(E){return}}():function(){var g=(0,U.R)().performance;if(g&&g.now)return{now:function(){return g.now()},timeOrigin:Date.now()-g.now()}}(),b=void 0===R?V:{nowSeconds:function(){return(R.timeOrigin+R.now())/1e3}},v=V.nowSeconds.bind(V),I=b.nowSeconds.bind(b);!function(){var g=(0,U.R)().performance;if(g&&g.now){var E=36e5,N=g.now(),A=Date.now(),w=g.timeOrigin?Math.abs(g.timeOrigin+N-A):E,S=w0||navigator.msMaxTouchPoints>0);function K(dt,Qe){var Bt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,xt=Math.abs(dt-Qe);return xt=Bt.top&&Qe<=Bt.bottom}function $(dt){var Qe=dt.clientX,Bt=dt.rect;return Qe>=Bt.left&&Qe<=Bt.right}function ae(dt){var Qe=dt.clientX,Bt=dt.clientY,vt=dt.allowedEdges,Qt=dt.cursorPrecision,Ht=dt.elm.nativeElement.getBoundingClientRect(),Ct={};return vt.left&&K(Qe,Ht.left,Qt)&&ee({clientY:Bt,rect:Ht})&&(Ct.left=!0),vt.right&&K(Qe,Ht.right,Qt)&&ee({clientY:Bt,rect:Ht})&&(Ct.right=!0),vt.top&&K(Bt,Ht.top,Qt)&&$({clientX:Qe,rect:Ht})&&(Ct.top=!0),vt.bottom&&K(Bt,Ht.bottom,Qt)&&$({clientX:Qe,rect:Ht})&&(Ct.bottom=!0),Ct}var se=Object.freeze({topLeft:"nw-resize",topRight:"ne-resize",bottomLeft:"sw-resize",bottomRight:"se-resize",leftOrRight:"col-resize",topOrBottom:"row-resize"});function ce(dt,Qe){return dt.left&&dt.top?Qe.topLeft:dt.right&&dt.top?Qe.topRight:dt.left&&dt.bottom?Qe.bottomLeft:dt.right&&dt.bottom?Qe.bottomRight:dt.left||dt.right?Qe.leftOrRight:dt.top||dt.bottom?Qe.topOrBottom:""}function le(dt){var Bt=dt.initialRectangle,xt=dt.newRectangle,vt={};return Object.keys(dt.edges).forEach(function(Qt){vt[Qt]=(xt[Qt]||0)-(Bt[Qt]||0)}),vt}var oe="resize-active",Ft=function(){var dt=function(){function Qe(Bt,xt,vt,Qt){(0,B.Z)(this,Qe),this.platformId=Bt,this.renderer=xt,this.elm=vt,this.zone=Qt,this.resizeEdges={},this.enableGhostResize=!1,this.resizeSnapGrid={},this.resizeCursors=se,this.resizeCursorPrecision=3,this.ghostElementPositioning="fixed",this.allowNegativeResizes=!1,this.mouseMoveThrottleMS=50,this.resizeStart=new T.vpe,this.resizing=new T.vpe,this.resizeEnd=new T.vpe,this.mouseup=new R.xQ,this.mousedown=new R.xQ,this.mousemove=new R.xQ,this.destroy$=new R.xQ,this.resizeEdges$=new R.xQ,this.pointerEventListeners=xe.getInstance(xt,Qt)}return(0,V.Z)(Qe,[{key:"ngOnInit",value:function(){var Ct,xt=this,vt=(0,b.T)(this.pointerEventListeners.pointerDown,this.mousedown),Qt=(0,b.T)(this.pointerEventListeners.pointerMove,this.mousemove).pipe((0,k.b)(function(Nt){var rn=Nt.event;if(Ct)try{rn.preventDefault()}catch(En){}}),(0,M.B)()),Ht=(0,b.T)(this.pointerEventListeners.pointerUp,this.mouseup),qt=function(){Ct&&Ct.clonedNode&&(xt.elm.nativeElement.parentElement.removeChild(Ct.clonedNode),xt.renderer.setStyle(xt.elm.nativeElement,"visibility","inherit"))},bt=function(){return Object.assign({},se,xt.resizeCursors)};this.resizeEdges$.pipe((0,_.O)(this.resizeEdges),(0,g.U)(function(){return xt.resizeEdges&&Object.keys(xt.resizeEdges).some(function(Nt){return!!xt.resizeEdges[Nt]})}),(0,E.w)(function(Nt){return Nt?Qt:v.E}),(0,N.e)(this.mouseMoveThrottleMS),(0,A.R)(this.destroy$)).subscribe(function(Nt){var Zn=ae({clientX:Nt.clientX,clientY:Nt.clientY,elm:xt.elm,allowedEdges:xt.resizeEdges,cursorPrecision:xt.resizeCursorPrecision}),In=bt();if(!Ct){var $n=ce(Zn,In);xt.renderer.setStyle(xt.elm.nativeElement,"cursor",$n)}xt.setElementClass(xt.elm,"resize-left-hover",!0===Zn.left),xt.setElementClass(xt.elm,"resize-right-hover",!0===Zn.right),xt.setElementClass(xt.elm,"resize-top-hover",!0===Zn.top),xt.setElementClass(xt.elm,"resize-bottom-hover",!0===Zn.bottom)}),vt.pipe((0,w.zg)(function(Nt){function rn(In){return{clientX:In.clientX-Nt.clientX,clientY:In.clientY-Nt.clientY}}var En=function(){var $n={x:1,y:1};return Ct&&(xt.resizeSnapGrid.left&&Ct.edges.left?$n.x=+xt.resizeSnapGrid.left:xt.resizeSnapGrid.right&&Ct.edges.right&&($n.x=+xt.resizeSnapGrid.right),xt.resizeSnapGrid.top&&Ct.edges.top?$n.y=+xt.resizeSnapGrid.top:xt.resizeSnapGrid.bottom&&Ct.edges.bottom&&($n.y=+xt.resizeSnapGrid.bottom)),$n};function Zn(In,$n){return{x:Math.ceil(In.clientX/$n.x),y:Math.ceil(In.clientY/$n.y)}}return(0,b.T)(Qt.pipe((0,S.q)(1)).pipe((0,g.U)(function(In){return[,In]})),Qt.pipe((0,O.G)())).pipe((0,g.U)(function(In){var $n=(0,U.Z)(In,2),Rn=$n[0],wn=$n[1];return[Rn&&rn(Rn),rn(wn)]})).pipe((0,F.h)(function(In){var $n=(0,U.Z)(In,2),Rn=$n[0],wn=$n[1];if(!Rn)return!0;var yr=En(),ut=Zn(Rn,yr),He=Zn(wn,yr);return ut.x!==He.x||ut.y!==He.y})).pipe((0,g.U)(function(In){var Rn=(0,U.Z)(In,2)[1],wn=En();return{clientX:Math.round(Rn.clientX/wn.x)*wn.x,clientY:Math.round(Rn.clientY/wn.y)*wn.y}})).pipe((0,A.R)((0,b.T)(Ht,vt)))})).pipe((0,F.h)(function(){return!!Ct})).pipe((0,g.U)(function(Nt){return j(Ct.startingRect,Ct.edges,Nt.clientX,Nt.clientY)})).pipe((0,F.h)(function(Nt){return xt.allowNegativeResizes||!!(Nt.height&&Nt.width&&Nt.height>0&&Nt.width>0)})).pipe((0,F.h)(function(Nt){return!xt.validateResize||xt.validateResize({rectangle:Nt,edges:le({edges:Ct.edges,initialRectangle:Ct.startingRect,newRectangle:Nt})})}),(0,A.R)(this.destroy$)).subscribe(function(Nt){Ct&&Ct.clonedNode&&(xt.renderer.setStyle(Ct.clonedNode,"height","".concat(Nt.height,"px")),xt.renderer.setStyle(Ct.clonedNode,"width","".concat(Nt.width,"px")),xt.renderer.setStyle(Ct.clonedNode,"top","".concat(Nt.top,"px")),xt.renderer.setStyle(Ct.clonedNode,"left","".concat(Nt.left,"px"))),xt.resizing.observers.length>0&&xt.zone.run(function(){xt.resizing.emit({edges:le({edges:Ct.edges,initialRectangle:Ct.startingRect,newRectangle:Nt}),rectangle:Nt})}),Ct.currentRect=Nt}),vt.pipe((0,g.U)(function(Nt){return Nt.edges||ae({clientX:Nt.clientX,clientY:Nt.clientY,elm:xt.elm,allowedEdges:xt.resizeEdges,cursorPrecision:xt.resizeCursorPrecision})})).pipe((0,F.h)(function(Nt){return Object.keys(Nt).length>0}),(0,A.R)(this.destroy$)).subscribe(function(Nt){Ct&&qt();var rn=function(dt,Qe){var Bt=0,xt=0,vt=dt.nativeElement.style,Ht=["transform","-ms-transform","-moz-transform","-o-transform"].map(function(qt){return vt[qt]}).find(function(qt){return!!qt});if(Ht&&Ht.includes("translate")&&(Bt=Ht.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$1"),xt=Ht.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$2")),"absolute"===Qe)return{height:dt.nativeElement.offsetHeight,width:dt.nativeElement.offsetWidth,top:dt.nativeElement.offsetTop-xt,bottom:dt.nativeElement.offsetHeight+dt.nativeElement.offsetTop-xt,left:dt.nativeElement.offsetLeft-Bt,right:dt.nativeElement.offsetWidth+dt.nativeElement.offsetLeft-Bt};var Ct=dt.nativeElement.getBoundingClientRect();return{height:Ct.height,width:Ct.width,top:Ct.top-xt,bottom:Ct.bottom-xt,left:Ct.left-Bt,right:Ct.right-Bt,scrollTop:dt.nativeElement.scrollTop,scrollLeft:dt.nativeElement.scrollLeft}}(xt.elm,xt.ghostElementPositioning);Ct={edges:Nt,startingRect:rn,currentRect:rn};var En=bt(),Zn=ce(Ct.edges,En);xt.renderer.setStyle(document.body,"cursor",Zn),xt.setElementClass(xt.elm,oe,!0),xt.enableGhostResize&&(Ct.clonedNode=xt.elm.nativeElement.cloneNode(!0),xt.elm.nativeElement.parentElement.appendChild(Ct.clonedNode),xt.renderer.setStyle(xt.elm.nativeElement,"visibility","hidden"),xt.renderer.setStyle(Ct.clonedNode,"position",xt.ghostElementPositioning),xt.renderer.setStyle(Ct.clonedNode,"left","".concat(Ct.startingRect.left,"px")),xt.renderer.setStyle(Ct.clonedNode,"top","".concat(Ct.startingRect.top,"px")),xt.renderer.setStyle(Ct.clonedNode,"height","".concat(Ct.startingRect.height,"px")),xt.renderer.setStyle(Ct.clonedNode,"width","".concat(Ct.startingRect.width,"px")),xt.renderer.setStyle(Ct.clonedNode,"cursor",ce(Ct.edges,En)),xt.renderer.addClass(Ct.clonedNode,"resize-ghost-element"),Ct.clonedNode.scrollTop=Ct.startingRect.scrollTop,Ct.clonedNode.scrollLeft=Ct.startingRect.scrollLeft),xt.resizeStart.observers.length>0&&xt.zone.run(function(){xt.resizeStart.emit({edges:le({edges:Nt,initialRectangle:rn,newRectangle:rn}),rectangle:j(rn,{},0,0)})})}),Ht.pipe((0,A.R)(this.destroy$)).subscribe(function(){Ct&&(xt.renderer.removeClass(xt.elm.nativeElement,oe),xt.renderer.setStyle(document.body,"cursor",""),xt.renderer.setStyle(xt.elm.nativeElement,"cursor",""),xt.resizeEnd.observers.length>0&&xt.zone.run(function(){xt.resizeEnd.emit({edges:le({edges:Ct.edges,initialRectangle:Ct.startingRect,newRectangle:Ct.currentRect}),rectangle:Ct.currentRect})}),qt(),Ct=null)})}},{key:"ngOnChanges",value:function(xt){xt.resizeEdges&&this.resizeEdges$.next(this.resizeEdges)}},{key:"ngOnDestroy",value:function(){(0,Z.NF)(this.platformId)&&this.renderer.setStyle(document.body,"cursor",""),this.mousedown.complete(),this.mouseup.complete(),this.mousemove.complete(),this.resizeEdges$.complete(),this.destroy$.next()}},{key:"setElementClass",value:function(xt,vt,Qt){Qt?this.renderer.addClass(xt.nativeElement,vt):this.renderer.removeClass(xt.nativeElement,vt)}}]),Qe}();return dt.\u0275fac=function(Bt){return new(Bt||dt)(T.Y36(T.Lbi),T.Y36(T.Qsj),T.Y36(T.SBq),T.Y36(T.R0b))},dt.\u0275dir=T.lG2({type:dt,selectors:[["","mwlResizable",""]],inputs:{resizeEdges:"resizeEdges",enableGhostResize:"enableGhostResize",resizeSnapGrid:"resizeSnapGrid",resizeCursors:"resizeCursors",resizeCursorPrecision:"resizeCursorPrecision",ghostElementPositioning:"ghostElementPositioning",allowNegativeResizes:"allowNegativeResizes",mouseMoveThrottleMS:"mouseMoveThrottleMS",validateResize:"validateResize"},outputs:{resizeStart:"resizeStart",resizing:"resizing",resizeEnd:"resizeEnd"},exportAs:["mwlResizable"],features:[T.TTD]}),dt}(),xe=function(){function dt(Qe,Bt){(0,B.Z)(this,dt),this.pointerDown=new I.y(function(xt){var vt,Qt;return Bt.runOutsideAngular(function(){vt=Qe.listen("document","mousedown",function(Ht){xt.next({clientX:Ht.clientX,clientY:Ht.clientY,event:Ht})}),z&&(Qt=Qe.listen("document","touchstart",function(Ht){xt.next({clientX:Ht.touches[0].clientX,clientY:Ht.touches[0].clientY,event:Ht})}))}),function(){vt(),z&&Qt()}}).pipe((0,M.B)()),this.pointerMove=new I.y(function(xt){var vt,Qt;return Bt.runOutsideAngular(function(){vt=Qe.listen("document","mousemove",function(Ht){xt.next({clientX:Ht.clientX,clientY:Ht.clientY,event:Ht})}),z&&(Qt=Qe.listen("document","touchmove",function(Ht){xt.next({clientX:Ht.targetTouches[0].clientX,clientY:Ht.targetTouches[0].clientY,event:Ht})}))}),function(){vt(),z&&Qt()}}).pipe((0,M.B)()),this.pointerUp=new I.y(function(xt){var vt,Qt,Ht;return Bt.runOutsideAngular(function(){vt=Qe.listen("document","mouseup",function(Ct){xt.next({clientX:Ct.clientX,clientY:Ct.clientY,event:Ct})}),z&&(Qt=Qe.listen("document","touchend",function(Ct){xt.next({clientX:Ct.changedTouches[0].clientX,clientY:Ct.changedTouches[0].clientY,event:Ct})}),Ht=Qe.listen("document","touchcancel",function(Ct){xt.next({clientX:Ct.changedTouches[0].clientX,clientY:Ct.changedTouches[0].clientY,event:Ct})}))}),function(){vt(),z&&(Qt(),Ht())}}).pipe((0,M.B)())}return(0,V.Z)(dt,null,[{key:"getInstance",value:function(Bt,xt){return dt.instance||(dt.instance=new dt(Bt,xt)),dt.instance}}]),dt}(),je=function(){var dt=function Qe(){(0,B.Z)(this,Qe)};return dt.\u0275fac=function(Bt){return new(Bt||dt)},dt.\u0275mod=T.oAB({type:dt}),dt.\u0275inj=T.cJS({}),dt}()},57695:function(ue,q,f){var U=f(94518),B=f(23050),V=f(99262),Z=f(44900),T=/^\s*\|\s*/;function b(D,k){var M={};for(var _ in D)M[_]=D[_].syntax||D[_];for(var g in k)g in D?k[g].syntax?M[g]=T.test(k[g].syntax)?M[g]+" "+k[g].syntax.trim():k[g].syntax:delete M[g]:k[g].syntax&&(M[g]=k[g].syntax.replace(T,""));return M}function v(D){var k={};for(var M in D)k[M]=D[M].syntax;return k}ue.exports={types:b(V,Z.syntaxes),atrules:function(D,k){var M={};for(var _ in D){var g=k[_]&&k[_].descriptors||null;M[_]={prelude:_ in k&&"prelude"in k[_]?k[_].prelude:D[_].prelude||null,descriptors:D[_].descriptors?b(D[_].descriptors,g||{}):g&&v(g)}}for(var E in k)hasOwnProperty.call(D,E)||(M[E]={prelude:k[E].prelude||null,descriptors:k[E].descriptors&&v(k[E].descriptors)});return M}(function(D){var k=Object.create(null);for(var M in D){var _=D[M],g=null;if(_.descriptors)for(var E in g=Object.create(null),_.descriptors)g[E]=_.descriptors[E].syntax;k[M.substr(1)]={prelude:_.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim()||null,descriptors:g}}return k}(U),Z.atrules),properties:b(B,Z.properties)}},63335:function(ue){function q(Z){return{prev:null,next:null,data:Z}}function f(Z,T,R){var b;return null!==B?(b=B,B=B.cursor,b.prev=T,b.next=R,b.cursor=Z.cursor):b={prev:T,next:R,cursor:Z.cursor},Z.cursor=b,b}function U(Z){var T=Z.cursor;Z.cursor=T.cursor,T.prev=null,T.next=null,T.cursor=B,B=T}var B=null,V=function(){this.cursor=null,this.head=null,this.tail=null};V.createItem=q,V.prototype.createItem=q,V.prototype.updateCursors=function(Z,T,R,b){for(var v=this.cursor;null!==v;)v.prev===Z&&(v.prev=T),v.next===R&&(v.next=b),v=v.cursor},V.prototype.getSize=function(){for(var Z=0,T=this.head;T;)Z++,T=T.next;return Z},V.prototype.fromArray=function(Z){var T=null;this.head=null;for(var R=0;R0?B(I.charCodeAt(0)):0;N100&&(N=M-60+3,M=58);for(var A=_;A<=g;A++)A>=0&&A0&&D[A].length>N?"\u2026":"")+D[A].substr(N,98)+(D[A].length>N+100-1?"\u2026":""));return[I(_,k),new Array(M+E+2).join("-")+"^",I(k,g)].filter(Boolean).join("\n")}ue.exports=function(v,I,D,k,M){var _=U("SyntaxError",v);return _.source=I,_.offset=D,_.line=k,_.column=M,_.sourceFragment=function(g){return T(_,isNaN(g)?0:g)},Object.defineProperty(_,"formattedMessage",{get:function(){return"Parse error: "+_.message+"\n"+T(_,2)}}),_.parseError={offset:D,line:k,column:M},_}},13146:function(ue,q,f){var U=f(97077),B=U.TYPE,V=U.NAME,T=f(74586).cmpStr,R=B.EOF,b=B.WhiteSpace,v=B.Comment,I=16777215,D=24,k=function(){this.offsetAndType=null,this.balance=null,this.reset()};k.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset},lookupType:function(_){return(_+=this.tokenIndex)>D:R},lookupOffset:function(_){return(_+=this.tokenIndex)0?_>D,this.source,A)){case 1:break e;case 2:E++;break e;default:this.balance[N]===E&&(E=N),A=this.offsetAndType[E]&I}return E-this.tokenIndex},isBalanceEdge:function(_){return this.balance[this.tokenIndex]<_},isDelim:function(_,g){return g?this.lookupType(g)===B.Delim&&this.source.charCodeAt(this.lookupOffset(g))===_:this.tokenType===B.Delim&&this.source.charCodeAt(this.tokenStart)===_},getTokenValue:function(){return this.source.substring(this.tokenStart,this.tokenEnd)},getTokenLength:function(){return this.tokenEnd-this.tokenStart},substrToCursor:function(_){return this.source.substring(_,this.tokenStart)},skipWS:function(){for(var _=this.tokenIndex,g=0;_>D===b;_++,g++);g>0&&this.skip(g)},skipSC:function(){for(;this.tokenType===b||this.tokenType===v;)this.next()},skip:function(_){var g=this.tokenIndex+_;g>D,this.tokenEnd=g&I):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var _=this.tokenIndex+1;_>D,this.tokenEnd=_&I):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=R,this.tokenStart=this.tokenEnd=this.source.length)},forEachToken:function(_){for(var g=0,E=this.firstCharOffset;g>D,N,w,g)}},dump:function(){var _=this,g=new Array(this.tokenCount);return this.forEachToken(function(E,N,A,w){g[w]={idx:w,type:V[E],chunk:_.source.substring(N,A),balance:_.balance[w]}}),g}},ue.exports=k},62146:function(ue){var f="undefined"!=typeof Uint32Array?Uint32Array:Array;ue.exports=function(B,V){return null===B||B.length";break;case"Property":v="<'"+Z.name+"'>";break;case"Keyword":v=Z.name;break;case"AtKeyword":v="@"+Z.name;break;case"Function":v=Z.name+"(";break;case"String":case"Token":v=Z.value;break;case"Comma":v=",";break;default:throw new Error("Unknown node type `"+Z.type+"`")}return T(v,Z)}ue.exports=function(Z,T){var R=q,b=!1,v=!1;return"function"==typeof T?R=T:T&&(b=Boolean(T.forceBraces),v=Boolean(T.compact),"function"==typeof T.decorate&&(R=T.decorate)),V(Z,R,b,v)}},37149:function(ue,q,f){ue.exports={SyntaxError:f(6063),parse:f(11261),generate:f(58298),walk:f(37363)}},11261:function(ue,q,f){var U=f(57674),K=123,$=function(vt){for(var Qt="function"==typeof Uint32Array?new Uint32Array(128):new Array(128),Ht=0;Ht<128;Ht++)Qt[Ht]=vt(String.fromCharCode(Ht))?1:0;return Qt}(function(vt){return/[a-zA-Z0-9\-]/.test(vt)}),ae={" ":1,"&&":2,"||":3,"|":4};function ce(vt){return vt.substringToPos(vt.findWsEnd(vt.pos))}function le(vt){for(var Qt=vt.pos;Qt=128||0===$[Ht])break}return vt.pos===Qt&&vt.error("Expect a keyword"),vt.substringToPos(Qt)}function oe(vt){for(var Qt=vt.pos;Qt57)break}return vt.pos===Qt&&vt.error("Expect a number"),vt.substringToPos(Qt)}function Ae(vt){var Qt=vt.str.indexOf("'",vt.pos+1);return-1===Qt&&(vt.pos=vt.str.length,vt.error("Expect an apostrophe")),vt.substringToPos(Qt+1)}function be(vt){var Qt,Ht=null;return vt.eat(K),Qt=oe(vt),44===vt.charCode()?(vt.pos++,125!==vt.charCode()&&(Ht=oe(vt))):Ht=Qt,vt.eat(125),{min:Number(Qt),max:Ht?Number(Ht):0}}function qe(vt,Qt){var Ht=function(vt){var Qt=null,Ht=!1;switch(vt.charCode()){case 42:vt.pos++,Qt={min:0,max:0};break;case 43:vt.pos++,Qt={min:1,max:0};break;case 63:vt.pos++,Qt={min:0,max:1};break;case 35:vt.pos++,Ht=!0,Qt=vt.charCode()===K?be(vt):{min:1,max:0};break;case K:Qt=be(vt);break;default:return null}return{type:"Multiplier",comma:Ht,min:Qt.min,max:Qt.max,term:null}}(vt);return null!==Ht?(Ht.term=Qt,Ht):Qt}function _t(vt){var Qt=vt.peek();return""===Qt?null:{type:"Token",value:Qt}}function je(vt,Qt){function Ht(Nt,rn){return{type:"Group",terms:Nt,combinator:rn,disallowEmpty:!1,explicit:!1}}for(Qt=Object.keys(Qt).sort(function(Nt,rn){return ae[Nt]-ae[rn]});Qt.length>0;){for(var Ct=Qt.shift(),qt=0,bt=0;qt1&&(vt.splice(bt,qt-bt,Ht(vt.slice(bt,qt),Ct)),qt=bt+1),bt=-1))}-1!==bt&&Qt.length&&vt.splice(bt,qt-bt,Ht(vt.slice(bt,qt),Ct))}return Ct}function dt(vt){for(var Ct,Qt=[],Ht={},qt=null,bt=vt.pos;Ct=Bt(vt);)"Spaces"!==Ct.type&&("Combinator"===Ct.type?((null===qt||"Combinator"===qt.type)&&(vt.pos=bt,vt.error("Unexpected combinator")),Ht[Ct.value]=!0):null!==qt&&"Combinator"!==qt.type&&(Ht[" "]=!0,Qt.push({type:"Combinator",value:" "})),Qt.push(Ct),qt=Ct,bt=vt.pos);return null!==qt&&"Combinator"===qt.type&&(vt.pos-=bt,vt.error("Unexpected combinator")),{type:"Group",terms:Qt,combinator:je(Qt,Ht)||" ",disallowEmpty:!1,explicit:!1}}function Bt(vt){var Qt=vt.charCode();if(Qt<128&&1===$[Qt])return function(vt){var Qt;return Qt=le(vt),40===vt.charCode()?(vt.pos++,{type:"Function",name:Qt}):qe(vt,{type:"Keyword",name:Qt})}(vt);switch(Qt){case 93:break;case 91:return qe(vt,function(vt){var Qt;return vt.eat(91),Qt=dt(vt),vt.eat(93),Qt.explicit=!0,33===vt.charCode()&&(vt.pos++,Qt.disallowEmpty=!0),Qt}(vt));case 60:return 39===vt.nextCharCode()?function(vt){var Qt;return vt.eat(60),vt.eat(39),Qt=le(vt),vt.eat(39),vt.eat(62),qe(vt,{type:"Property",name:Qt})}(vt):function(vt){var Qt,Ht=null;return vt.eat(60),Qt=le(vt),40===vt.charCode()&&41===vt.nextCharCode()&&(vt.pos+=2,Qt+="()"),91===vt.charCodeAt(vt.findWsEnd(vt.pos))&&(ce(vt),Ht=function(vt){var Qt=null,Ht=null,Ct=1;return vt.eat(91),45===vt.charCode()&&(vt.peek(),Ct=-1),-1==Ct&&8734===vt.charCode()?vt.peek():Qt=Ct*Number(oe(vt)),ce(vt),vt.eat(44),ce(vt),8734===vt.charCode()?vt.peek():(Ct=1,45===vt.charCode()&&(vt.peek(),Ct=-1),Ht=Ct*Number(oe(vt))),vt.eat(93),null===Qt&&null===Ht?null:{type:"Range",min:Qt,max:Ht}}(vt)),vt.eat(62),qe(vt,{type:"Type",name:Qt,opts:Ht})}(vt);case 124:return{type:"Combinator",value:vt.substringToPos(124===vt.nextCharCode()?vt.pos+2:vt.pos+1)};case 38:return vt.pos++,vt.eat(38),{type:"Combinator",value:"&&"};case 44:return vt.pos++,{type:"Comma"};case 39:return qe(vt,{type:"String",value:Ae(vt)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:ce(vt)};case 64:return(Qt=vt.nextCharCode())<128&&1===$[Qt]?(vt.pos++,{type:"AtKeyword",name:le(vt)}):_t(vt);case 42:case 43:case 63:case 35:case 33:break;case K:if((Qt=vt.nextCharCode())<48||Qt>57)return _t(vt);break;default:return _t(vt)}}function xt(vt){var Qt=new U(vt),Ht=dt(Qt);return Qt.pos!==vt.length&&Qt.error("Unexpected input"),1===Ht.terms.length&&"Group"===Ht.terms[0].type&&(Ht=Ht.terms[0]),Ht}xt("[a&&#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!"),ue.exports=xt},57674:function(ue,q,f){var U=f(6063),b=function(I){this.str=I,this.pos=0};b.prototype={charCodeAt:function(I){return I");function A(K,j,J){var ee={};for(var $ in K)K[$].syntax&&(ee[$]=J?K[$].syntax:b(K[$].syntax,{compact:j}));return ee}function w(K,j,J){for(var ee={},$=0,ae=Object.entries(K);$3&&void 0!==arguments[3]?arguments[3]:null,ae={type:J,name:ee},se={type:J,name:ee,parent:$,syntax:null,match:null};return"function"==typeof j?se.match=D(j,ae):("string"==typeof j?Object.defineProperty(se,"syntax",{get:function(){return Object.defineProperty(se,"syntax",{value:R(j)}),se.syntax}}):se.syntax=j,Object.defineProperty(se,"match",{get:function(){return Object.defineProperty(se,"match",{value:D(se.syntax,ae)}),se.match}})),se},addAtrule_:function(j,J){var ee=this;!J||(this.atrules[j]={type:"Atrule",name:j,prelude:J.prelude?this.createDescriptor(J.prelude,"AtrulePrelude",j):null,descriptors:J.descriptors?Object.keys(J.descriptors).reduce(function($,ae){return $[ae]=ee.createDescriptor(J.descriptors[ae],"AtruleDescriptor",ae,j),$},{}):null})},addProperty_:function(j,J){!J||(this.properties[j]=this.createDescriptor(J,"Property",j))},addType_:function(j,J){!J||(this.types[j]=this.createDescriptor(J,"Type",j),J===T["-ms-legacy-expression"]&&(this.valueCommonSyntax=N))},checkAtruleName:function(j){if(!this.getAtrule(j))return new B("Unknown at-rule","@"+j)},checkAtrulePrelude:function(j,J){var ee=this.checkAtruleName(j);if(ee)return ee;var $=this.getAtrule(j);return!$.prelude&&J?new SyntaxError("At-rule `@"+j+"` should not contain a prelude"):$.prelude&&!J?new SyntaxError("At-rule `@"+j+"` should contain a prelude"):void 0},checkAtruleDescriptorName:function(j,J){var ee=this.checkAtruleName(j);if(ee)return ee;var $=this.getAtrule(j),ae=Z.keyword(J);return $.descriptors?$.descriptors[ae.name]||$.descriptors[ae.basename]?void 0:new B("Unknown at-rule descriptor",J):new SyntaxError("At-rule `@"+j+"` has no known descriptors")},checkPropertyName:function(j){return Z.property(j).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(j)?void 0:new B("Unknown property",j)},matchAtrulePrelude:function(j,J){var ee=this.checkAtrulePrelude(j,J);return ee?O(null,ee):J?F(this,this.getAtrule(j).prelude,J,!1):O(null,null)},matchAtruleDescriptor:function(j,J,ee){var $=this.checkAtruleDescriptorName(j,J);if($)return O(null,$);var ae=this.getAtrule(j),se=Z.keyword(J);return F(this,ae.descriptors[se.name]||ae.descriptors[se.basename],ee,!1)},matchDeclaration:function(j){return"Declaration"!==j.type?O(null,new Error("Not a Declaration node")):this.matchProperty(j.property,j.value)},matchProperty:function(j,J){var ee=this.checkPropertyName(j);return ee?O(null,ee):F(this,this.getProperty(j),J,!0)},matchType:function(j,J){var ee=this.getType(j);return ee?F(this,ee,J,!1):O(null,new B("Unknown type",j))},match:function(j,J){return"string"==typeof j||j&&j.type?(("string"==typeof j||!j.match)&&(j=this.createDescriptor(j,"Type","anonymous")),F(this,j,J,!1)):O(null,new B("Bad syntax"))},findValueFragments:function(j,J,ee,$){return _.matchFragments(this,J,this.matchProperty(j,J),ee,$)},findDeclarationValueFragments:function(j,J,ee){return _.matchFragments(this,j.value,this.matchDeclaration(j),J,ee)},findAllFragments:function(j,J,ee){var $=[];return this.syntax.walk(j,{visit:"Declaration",enter:function(ae){$.push.apply($,this.findDeclarationValueFragments(ae,J,ee))}.bind(this)}),$},getAtrule:function(j){var J=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ee=Z.keyword(j),$=ee.vendor&&J?this.atrules[ee.name]||this.atrules[ee.basename]:this.atrules[ee.name];return $||null},getAtrulePrelude:function(j){var J=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ee=this.getAtrule(j,J);return ee&&ee.prelude||null},getAtruleDescriptor:function(j,J){return this.atrules.hasOwnProperty(j)&&this.atrules.declarators&&this.atrules[j].declarators[J]||null},getProperty:function(j){var J=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ee=Z.property(j),$=ee.vendor&&J?this.properties[ee.name]||this.properties[ee.basename]:this.properties[ee.name];return $||null},getType:function(j){return this.types.hasOwnProperty(j)?this.types[j]:null},validate:function(){function j(ae,se,ce,le){if(ce.hasOwnProperty(se))return ce[se];ce[se]=!1,null!==le.syntax&&v(le.syntax,function(oe){if("Type"===oe.type||"Property"===oe.type){var Ae="Type"===oe.type?ae.types:ae.properties,be="Type"===oe.type?J:ee;(!Ae.hasOwnProperty(oe.name)||j(ae,oe.name,be,Ae[oe.name]))&&(ce[se]=!0)}},this)}var J={},ee={};for(var $ in this.types)j(this,$,J,this.types[$]);for(var $ in this.properties)j(this,$,ee,this.properties[$]);return J=Object.keys(J).filter(function(ae){return J[ae]}),ee=Object.keys(ee).filter(function(ae){return ee[ae]}),J.length||ee.length?{types:J,properties:ee}:null},dump:function(j,J){return{generic:this.generic,types:A(this.types,!J,j),properties:A(this.properties,!J,j),atrules:w(this.atrules,!J,j)}},toString:function(){return JSON.stringify(this.dump())}},ue.exports=z},40533:function(ue,q,f){var U=f(92455),B=f(58298),V={offset:0,line:1,column:1};function T(I,D){var k=I&&I.loc&&I.loc[D];return k?"line"in k?R(k):k:null}function R(I,D){var g={offset:I.offset,line:I.line,column:I.column};if(D){var E=D.split(/\n|\r\n?|\f/);g.offset+=D.length,g.line+=E.length-1,g.column=1===E.length?g.column+D.length:E.pop().length+1}return g}ue.exports={SyntaxReferenceError:function(D,k){var M=U("SyntaxReferenceError",D+(k?" `"+k+"`":""));return M.reference=k,M},SyntaxMatchError:function(D,k,M,_){var g=U("SyntaxMatchError",D),E=function(I,D){for(var S,O,k=I.tokens,M=I.longestMatch,_=M1?(S=T(g||D,"end")||R(V,w),O=R(S)):(S=T(g,"start")||R(T(D,"start")||V,w.slice(0,E)),O=T(g,"end")||R(S,w.substr(E,N))),{css:w,mismatchOffset:E,mismatchLength:N,start:S,end:O}}(_,M),N=E.css,A=E.mismatchOffset,w=E.mismatchLength,S=E.start,O=E.end;return g.rawMessage=D,g.syntax=k?B(k):"",g.css=N,g.mismatchOffset=A,g.mismatchLength=w,g.message=D+"\n syntax: "+g.syntax+"\n value: "+(N||"")+"\n --------"+new Array(g.mismatchOffset+1).join("-")+"^",Object.assign(g,S),g.loc={source:M&&M.loc&&M.loc.source||"",start:S,end:O},g}}},25533:function(ue,q,f){var U=f(97555).isDigit,B=f(97555).cmpChar,V=f(97555).TYPE,Z=V.Delim,T=V.WhiteSpace,R=V.Comment,b=V.Ident,v=V.Number,I=V.Dimension,k=45,_=!0;function E(S,O){return null!==S&&S.type===Z&&S.value.charCodeAt(0)===O}function N(S,O,F){for(;null!==S&&(S.type===T||S.type===R);)S=F(++O);return O}function A(S,O,F,z){if(!S)return 0;var K=S.value.charCodeAt(O);if(43===K||K===k){if(F)return 0;O++}for(;O0?6:0;if(!U(F)||++O>6)return 0}return O}function E(N,A,w){if(!N)return 0;for(;M(w(A),63);){if(++N>6)return 0;A++}return A}ue.exports=function(A,w){var S=0;if(null===A||A.type!==Z||!B(A.value,0,117)||null===(A=w(++S)))return 0;if(M(A,43))return null===(A=w(++S))?0:A.type===Z?E(g(A,0,!0),++S,w):M(A,63)?E(1,++S,w):0;if(A.type===R){if(!_(A,43))return 0;var O=g(A,1,!0);return 0===O?0:null===(A=w(++S))?S:A.type===b||A.type===R?_(A,45)&&g(A,1,!1)?S+1:0:E(O,S,w)}return A.type===b&&_(A,43)?E(g(A,1,!0),++S,w):0}},71473:function(ue,q,f){var U=f(97555),B=U.isIdentifierStart,V=U.isHexDigit,Z=U.isDigit,T=U.cmpStr,R=U.consumeNumber,b=U.TYPE,v=f(25533),I=f(70156),D=["unset","initial","inherit"],k=["calc(","-moz-calc(","-webkit-calc("];function O(xe,De){return Dexe.max)return!0}return!1}function J(xe,De){var je=xe.index,dt=0;do{if(dt++,xe.balance<=je)break}while(xe=De(dt));return dt}function ee(xe){return function(De,je,dt){return null===De?0:De.type===b.Function&&z(De.value,k)?J(De,je):xe(De,je,dt)}}function $(xe){return function(De){return null===De||De.type!==xe?0:1}}function it(xe){return function(De,je,dt){if(null===De||De.type!==b.Dimension)return 0;var Qe=R(De.value,0);if(null!==xe){var Bt=De.value.indexOf("\\",Qe),xt=-1!==Bt&&K(De.value,Bt)?De.value.substring(Qe,Bt):De.value.substr(Qe);if(!1===xe.hasOwnProperty(xt.toLowerCase()))return 0}return j(dt,De.value,Qe)?0:1}}function _t(xe){return"function"!=typeof xe&&(xe=function(){return 0}),function(De,je,dt){return null!==De&&De.type===b.Number&&0===Number(De.value)?1:xe(De,je,dt)}}ue.exports={"ident-token":$(b.Ident),"function-token":$(b.Function),"at-keyword-token":$(b.AtKeyword),"hash-token":$(b.Hash),"string-token":$(b.String),"bad-string-token":$(b.BadString),"url-token":$(b.Url),"bad-url-token":$(b.BadUrl),"delim-token":$(b.Delim),"number-token":$(b.Number),"percentage-token":$(b.Percentage),"dimension-token":$(b.Dimension),"whitespace-token":$(b.WhiteSpace),"CDO-token":$(b.CDO),"CDC-token":$(b.CDC),"colon-token":$(b.Colon),"semicolon-token":$(b.Semicolon),"comma-token":$(b.Comma),"[-token":$(b.LeftSquareBracket),"]-token":$(b.RightSquareBracket),"(-token":$(b.LeftParenthesis),")-token":$(b.RightParenthesis),"{-token":$(b.LeftCurlyBracket),"}-token":$(b.RightCurlyBracket),string:$(b.String),ident:$(b.Ident),"custom-ident":function(xe){if(null===xe||xe.type!==b.Ident)return 0;var De=xe.value.toLowerCase();return z(De,D)||F(De,"default")?0:1},"custom-property-name":function(xe){return null===xe||xe.type!==b.Ident||45!==O(xe.value,0)||45!==O(xe.value,1)?0:1},"hex-color":function(xe){if(null===xe||xe.type!==b.Hash)return 0;var De=xe.value.length;if(4!==De&&5!==De&&7!==De&&9!==De)return 0;for(var je=1;jexe.index||xe.balancexe.index||xe.balance2&&40===_.charCodeAt(_.length-2)&&41===_.charCodeAt(_.length-1)}function I(_){return"Keyword"===_.type||"AtKeyword"===_.type||"Function"===_.type||"Type"===_.type&&v(_.name)}function D(_,g,E){switch(_){case" ":for(var N=B,A=g.length-1;A>=0;A--)N=b(w=g[A],N,V);return N;case"|":N=V;var S=null;for(A=g.length-1;A>=0;A--){if(I(w=g[A])&&(null===S&&A>0&&I(g[A-1])&&(N=b({type:"Enum",map:S=Object.create(null)},B,N)),null!==S)){var O=(v(w.name)?w.name.slice(0,-1):w.name).toLowerCase();if(!(O in S)){S[O]=w;continue}}S=null,N=b(w,B,N)}return N;case"&&":if(g.length>5)return{type:"MatchOnce",terms:g,all:!0};for(N=V,A=g.length-1;A>=0;A--){var w=g[A];F=g.length>1?D(_,g.filter(function(j){return j!==w}),!1):B,N=b(w,F,N)}return N;case"||":if(g.length>5)return{type:"MatchOnce",terms:g,all:!1};for(N=E?B:V,A=g.length-1;A>=0;A--){var F;w=g[A],F=g.length>1?D(_,g.filter(function(J){return J!==w}),!0):B,N=b(w,F,N)}return N}}function M(_){if("function"==typeof _)return{type:"Generic",fn:_};switch(_.type){case"Group":var g=D(_.combinator,_.terms.map(M),!1);return _.disallowEmpty&&(g=b(g,Z,V)),g;case"Multiplier":return function(_){var g=B,E=M(_.term);if(0===_.max)E=b(E,Z,V),(g=b(E,null,V)).then=b(B,B,g),_.comma&&(g.then.else=b({type:"Comma",syntax:_},g,V));else for(var N=_.min||1;N<=_.max;N++)_.comma&&g!==B&&(g=b({type:"Comma",syntax:_},g,V)),g=b(E,b(B,B,g),V);if(0===_.min)g=b(B,B,g);else for(N=0;N<_.min-1;N++)_.comma&&g!==B&&(g=b({type:"Comma",syntax:_},g,V)),g=b(E,g,V);return g}(_);case"Type":case"Property":return{type:_.type,name:_.name,syntax:_};case"Keyword":return{type:_.type,name:_.name.toLowerCase(),syntax:_};case"AtKeyword":return{type:_.type,name:"@"+_.name.toLowerCase(),syntax:_};case"Function":return{type:_.type,name:_.name.toLowerCase()+"(",syntax:_};case"String":return 3===_.value.length?{type:"Token",value:_.value.charAt(1),syntax:_}:{type:_.type,value:_.value.substr(1,_.value.length-2).replace(/\\'/g,"'"),syntax:_};case"Token":return{type:_.type,value:_.value,syntax:_};case"Comma":return{type:_.type,syntax:_};default:throw new Error("Unknown node type:",_.type)}}ue.exports={MATCH:B,MISMATCH:V,DISALLOW_EMPTY:Z,buildMatchGraph:function(g,E){return"string"==typeof g&&(g=U(g)),{type:"MatchGraph",match:M(g),syntax:E||null,source:g}}}},77569:function(ue,q,f){var U=Object.prototype.hasOwnProperty,B=f(60997),V=B.MATCH,Z=B.MISMATCH,T=B.DISALLOW_EMPTY,R=f(97077).TYPE,k="Match",E=0;function N(j){for(var J=null,ee=null,$=j;null!==$;)ee=$.prev,$.prev=J,J=$,$=ee;return J}function A(j,J){if(j.length!==J.length)return!1;for(var ee=0;ee=65&&$<=90&&($|=32),$!==J.charCodeAt(ee))return!1}return!0}function S(j){return null===j||j.type===R.Comma||j.type===R.Function||j.type===R.LeftParenthesis||j.type===R.LeftSquareBracket||j.type===R.LeftCurlyBracket||function(j){return j.type===R.Delim&&"?"!==j.value}(j)}function O(j){return null===j||j.type===R.RightParenthesis||j.type===R.RightSquareBracket||j.type===R.RightCurlyBracket||j.type===R.Delim}function F(j,J,ee){function $(){do{je++,De=jedt&&(dt=je)}function be(){Qe=2===Qe.type?Qe.prev:{type:3,syntax:it.syntax,token:Qe.token,prev:Qe},it=it.prev}var it=null,qe=null,_t=null,yt=null,Ft=0,xe=null,De=null,je=-1,dt=0,Qe={type:0,syntax:null,token:null,prev:null};for($();null===xe&&++Ft<15e3;)switch(J.type){case"Match":if(null===qe){if(null!==De&&(je!==j.length-1||"\\0"!==De.value&&"\\9"!==De.value)){J=Z;break}xe=k;break}if((J=qe.nextState)===T){if(qe.matchStack===Qe){J=Z;break}J=V}for(;qe.syntaxStack!==it;)be();qe=qe.prev;break;case"Mismatch":if(null!==yt&&!1!==yt)(null===_t||je>_t.tokenIndex)&&(_t=yt,yt=!1);else if(null===_t){xe="Mismatch";break}J=_t.nextState,qe=_t.thenStack,it=_t.syntaxStack,Qe=_t.matchStack,De=(je=_t.tokenIndex)je){for(;je":"<'"+J.name+"'>"));if(!1!==yt&&null!==De&&"Type"===J.type&&("custom-ident"===J.name&&De.type===R.Ident||"length"===J.name&&"0"===De.value)){null===yt&&(yt=se(J,_t)),J=Z;break}it={syntax:J.syntax,opts:J.syntax.opts||null!==it&&it.opts||null,prev:it},Qe={type:2,syntax:J.syntax,token:Qe.token,prev:Qe},J=Ct.match;break;case"Keyword":var bt=J.name;if(null!==De){var en=De.value;if(-1!==en.indexOf("\\")&&(en=en.replace(/\\[09].*$/,"")),A(en,bt)){oe(),J=V;break}}J=Z;break;case"AtKeyword":case"Function":if(null!==De&&A(De.value,J.name)){oe(),J=V;break}J=Z;break;case"Token":if(null!==De&&De.value===J.value){oe(),J=V;break}J=Z;break;case"Comma":null!==De&&De.type===R.Comma?S(Qe.token)?J=Z:(oe(),J=O(De)?Z:V):J=S(Qe.token)||O(De)?V:Z;break;case"String":var Nt="";for(Qt=je;Qt=0}function Z(b){return Boolean(b)&&V(b.offset)&&V(b.line)&&V(b.column)}function T(b,v){return function(D,k){if(!D||D.constructor!==Object)return k(D,"Type of node should be an Object");for(var M in D){var _=!0;if(!1!==B.call(D,M)){if("type"===M)D.type!==b&&k(D,"Wrong node type `"+D.type+"`, expected `"+b+"`");else if("loc"===M){if(null===D.loc)continue;if(D.loc&&D.loc.constructor===Object)if("string"!=typeof D.loc.source)M+=".source";else if(Z(D.loc.start)){if(Z(D.loc.end))continue;M+=".end"}else M+=".start";_=!1}else if(v.hasOwnProperty(M)){var g=0;for(_=!1;!_&&g");else{if(!Array.isArray(N))throw new Error("Wrong value `"+N+"` in `"+b+"."+M+"` structure definition");_.push("List")}}k[M]=_.join(" | ")}return{docs:k,check:T(b,D)}}ue.exports={getStructureFromConfig:function(v){var I={};if(v.node)for(var D in v.node)if(B.call(v.node,D)){var k=v.node[D];if(!k.structure)throw new Error("Missed `structure` field in `"+D+"` node type definition");I[D]=R(D,k)}return I}}},24988:function(ue){function q(Z){function T(v){return null!==v&&("Type"===v.type||"Property"===v.type||"Keyword"===v.type)}var b=null;return null!==this.matched&&function R(v){if(Array.isArray(v.match)){for(var I=0;I",needPositions:!1,onParseError:k,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:D,createList:function(){return new Z},createSingleNodeList:function(le){return(new Z).appendData(le)},getFirstListNode:function(le){return le&&le.first()},getLastListNode:function(le){return le.last()},parseWithFallback:function(le,oe){var Ae=this.scanner.tokenIndex;try{return le.call(this)}catch(it){if(this.onParseErrorThrow)throw it;var be=oe.call(this,Ae);return this.onParseErrorThrow=!0,this.onParseError(it,be),this.onParseErrorThrow=!1,be}},lookupNonWSType:function(le){do{var oe=this.scanner.lookupType(le++);if(oe!==g)return oe}while(0!==oe);return 0},eat:function(le){if(this.scanner.tokenType!==le){var oe=this.scanner.tokenStart,Ae=_[le]+" is expected";switch(le){case N:this.scanner.tokenType===A||this.scanner.tokenType===w?(oe=this.scanner.tokenEnd-1,Ae="Identifier is expected but function found"):Ae="Identifier is expected";break;case S:this.scanner.isDelim(35)&&(this.scanner.next(),oe++,Ae="Name is expected");break;case O:this.scanner.tokenType===F&&(oe=this.scanner.tokenEnd,Ae="Percent sign is expected");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===le&&(oe+=1)}this.error(Ae,oe)}this.scanner.next()},consume:function(le){var oe=this.scanner.getTokenValue();return this.eat(le),oe},consumeFunctionName:function(){var le=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(A),le},getLocation:function(le,oe){return this.needPositions?this.locationMap.getLocationRange(le,oe,this.filename):null},getLocationFromList:function(le){if(this.needPositions){var oe=this.getFirstListNode(le),Ae=this.getLastListNode(le);return this.locationMap.getLocationRange(null!==oe?oe.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==Ae?Ae.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(le,oe){var Ae=this.locationMap.getLocation(void 0!==oe&&oe",ae.needPositions=Boolean(le.positions),ae.onParseError="function"==typeof le.onParseError?le.onParseError:k,ae.onParseErrorThrow=!1,ae.parseAtrulePrelude=!("parseAtrulePrelude"in le)||Boolean(le.parseAtrulePrelude),ae.parseRulePrelude=!("parseRulePrelude"in le)||Boolean(le.parseRulePrelude),ae.parseValue=!("parseValue"in le)||Boolean(le.parseValue),ae.parseCustomProperty="parseCustomProperty"in le&&Boolean(le.parseCustomProperty),!ae.context.hasOwnProperty(oe))throw new Error("Unknown context `"+oe+"`");return"function"==typeof Ae&&ae.scanner.forEachToken(function(it,qe,_t){if(it===E){var yt=ae.getLocation(qe,_t),Ft=I(ce,_t-2,_t,"*/")?ce.slice(qe+2,_t-2):ce.slice(qe+2,_t);Ae(Ft,yt)}}),be=ae.context[oe].call(ae,le),ae.scanner.eof||ae.error(),be}}},15785:function(ue,q,f){var U=f(97555).TYPE,B=U.WhiteSpace,V=U.Comment;ue.exports=function(T){var R=this.createList(),b=null,v={recognizer:T,space:null,ignoreWS:!1,ignoreWSAfter:!1};for(this.scanner.skipSC();!this.scanner.eof;){switch(this.scanner.tokenType){case V:this.scanner.next();continue;case B:v.ignoreWS?this.scanner.next():v.space=this.WhiteSpace();continue}if(void 0===(b=T.getNode.call(this,v)))break;null!==v.space&&(R.push(v.space),v.space=null),R.push(b),v.ignoreWSAfter?(v.ignoreWSAfter=!1,v.ignoreWS=!0):v.ignoreWS=!1}return R}},71713:function(ue){ue.exports={parse:{prelude:null,block:function(){return this.Block(!0)}}}},88208:function(ue,q,f){var U=f(97555).TYPE,B=U.String,V=U.Ident,Z=U.Url,T=U.Function,R=U.LeftParenthesis;ue.exports={parse:{prelude:function(){var v=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case B:v.push(this.String());break;case Z:case T:v.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===V||this.lookupNonWSType(0)===R)&&(v.push(this.WhiteSpace()),v.push(this.MediaQueryList())),v},block:null}}},55682:function(ue,q,f){ue.exports={"font-face":f(71713),import:f(88208),media:f(81706),page:f(93949),supports:f(46928)}},81706:function(ue){ue.exports={parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}}},93949:function(ue){ue.exports={parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}}},46928:function(ue,q,f){var U=f(97555).TYPE,B=U.WhiteSpace,V=U.Comment,Z=U.Ident,T=U.Function,R=U.Colon,b=U.LeftParenthesis;function v(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function I(){return this.scanner.skipSC(),this.scanner.tokenType===Z&&this.lookupNonWSType(1)===R?this.createSingleNodeList(this.Declaration()):D.call(this)}function D(){var _,k=this.createList(),M=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case B:M=this.WhiteSpace();continue;case V:this.scanner.next();continue;case T:_=this.Function(v,this.scope.AtrulePrelude);break;case Z:_=this.Identifier();break;case b:_=this.Parentheses(I,this.scope.AtrulePrelude);break;default:break e}null!==M&&(k.push(M),M=null),k.push(_)}return k}ue.exports={parse:{prelude:function(){var M=D.call(this);return null===this.getFirstListNode(M)&&this.error("Condition is expected"),M},block:function(){return this.Block(!1)}}}},53901:function(ue,q,f){var U=f(57695);ue.exports={generic:!0,types:U.types,atrules:U.atrules,properties:U.properties,node:f(5678)}},15249:function(ue,q,f){var U=f(6326).default,B=Object.prototype.hasOwnProperty,V={generic:!0,types:I,atrules:{prelude:D,descriptors:D},properties:I,parseContext:function(M,_){return Object.assign(M,_)},scope:function b(M,_){for(var g in _)B.call(_,g)&&(Z(M[g])?b(M[g],T(_[g])):M[g]=T(_[g]));return M},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function Z(M){return M&&M.constructor===Object}function T(M){return Z(M)?Object.assign({},M):M}function v(M,_){return"string"==typeof _&&/^\s*\|/.test(_)?"string"==typeof M?M+_:_.replace(/^\s*\|\s*/,""):_||null}function I(M,_){if("string"==typeof _)return v(M,_);var g=Object.assign({},M);for(var E in _)B.call(_,E)&&(g[E]=v(B.call(M,E)?M[E]:void 0,_[E]));return g}function D(M,_){var g=I(M,_);return!Z(g)||Object.keys(g).length?g:null}function k(M,_,g){for(var E in g)if(!1!==B.call(g,E))if(!0===g[E])E in _&&B.call(_,E)&&(M[E]=T(_[E]));else if(g[E])if("function"==typeof g[E]){var N=g[E];M[E]=N({},M[E]),M[E]=N(M[E]||{},_[E])}else if(Z(g[E])){var A={};for(var w in M[E])A[w]=k({},M[E][w],g[E]);for(var S in _[E])A[S]=k(A[S]||{},_[E][S],g[E]);M[E]=A}else if(Array.isArray(g[E])){for(var O={},F=g[E].reduce(function(ae,se){return ae[se]=!0,ae},{}),z=0,K=Object.entries(M[E]||{});z0&&this.scanner.skip(w),0===S&&(O=this.scanner.source.charCodeAt(this.scanner.tokenStart))!==I&&O!==D&&this.error("Number sign is expected"),E.call(this,0!==S),S===D?"-"+this.consume(b):this.consume(b)}ue.exports={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var S=this.scanner.tokenStart,O=null,F=null;if(this.scanner.tokenType===b)E.call(this,!1),F=this.consume(b);else if(this.scanner.tokenType===R&&U(this.scanner.source,this.scanner.tokenStart,D))switch(O="-1",N.call(this,1,k),this.scanner.getTokenLength()){case 2:this.scanner.next(),F=A.call(this);break;case 3:N.call(this,2,D),this.scanner.next(),this.scanner.skipSC(),E.call(this,M),F="-"+this.consume(b);break;default:N.call(this,2,D),g.call(this,3,M),this.scanner.next(),F=this.scanner.substrToCursor(S+2)}else if(this.scanner.tokenType===R||this.scanner.isDelim(I)&&this.scanner.lookupType(1)===R){var z=0;switch(O="1",this.scanner.isDelim(I)&&(z=1,this.scanner.next()),N.call(this,0,k),this.scanner.getTokenLength()){case 1:this.scanner.next(),F=A.call(this);break;case 2:N.call(this,1,D),this.scanner.next(),this.scanner.skipSC(),E.call(this,M),F="-"+this.consume(b);break;default:N.call(this,1,D),g.call(this,2,M),this.scanner.next(),F=this.scanner.substrToCursor(S+z+1)}}else if(this.scanner.tokenType===v){for(var K=this.scanner.source.charCodeAt(this.scanner.tokenStart),j=this.scanner.tokenStart+(z=K===I||K===D);j=2&&42===this.scanner.source.charCodeAt(b-2)&&47===this.scanner.source.charCodeAt(b-1)&&(b-=2),{type:"Comment",loc:this.getLocation(R,this.scanner.tokenStart),value:this.scanner.source.substring(R+2,b)}},generate:function(R){this.chunk("/*"),this.chunk(R.value),this.chunk("*/")}}},7217:function(ue,q,f){var U=f(50643).isCustomProperty,B=f(97555).TYPE,V=f(89604).mode,Z=B.Ident,T=B.Hash,R=B.Colon,b=B.Semicolon,v=B.Delim,I=B.WhiteSpace;function A(z){return this.Raw(z,V.exclamationMarkOrSemicolon,!0)}function w(z){return this.Raw(z,V.exclamationMarkOrSemicolon,!1)}function S(){var z=this.scanner.tokenIndex,K=this.Value();return"Raw"!==K.type&&!1===this.scanner.eof&&this.scanner.tokenType!==b&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(z)&&this.error(),K}function O(){var z=this.scanner.tokenStart;if(this.scanner.tokenType===v)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next()}return this.eat(this.scanner.tokenType===T?T:Z),this.scanner.substrToCursor(z)}function F(){this.eat(v),this.scanner.skipSC();var z=this.consume(Z);return"important"===z||z}ue.exports={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var ce,K=this.scanner.tokenStart,j=this.scanner.tokenIndex,J=O.call(this),ee=U(J),$=ee?this.parseCustomProperty:this.parseValue,ae=ee?w:A,se=!1;this.scanner.skipSC(),this.eat(R);var le=this.scanner.tokenIndex;if(ee||this.scanner.skipSC(),ce=$?this.parseWithFallback(S,ae):ae.call(this,this.scanner.tokenIndex),ee&&"Value"===ce.type&&ce.children.isEmpty())for(var oe=le-this.scanner.tokenIndex;oe<=0;oe++)if(this.scanner.lookupType(oe)===I){ce.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.scanner.isDelim(33)&&(se=F.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==b&&!1===this.scanner.isBalanceEdge(j)&&this.error(),{type:"Declaration",loc:this.getLocation(K,this.scanner.tokenStart),important:se,property:J,value:ce}},generate:function(K){this.chunk(K.property),this.chunk(":"),this.node(K.value),K.important&&this.chunk(!0===K.important?"!important":"!"+K.important)},walkContext:"declaration"}},69013:function(ue,q,f){var U=f(97555).TYPE,B=f(89604).mode,V=U.WhiteSpace,Z=U.Comment,T=U.Semicolon;function R(b){return this.Raw(b,B.semicolonIncluded,!0)}ue.exports={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var v=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case V:case Z:case T:this.scanner.next();break;default:v.push(this.parseWithFallback(this.Declaration,R))}return{type:"DeclarationList",loc:this.getLocationFromList(v),children:v}},generate:function(v){this.children(v,function(I){"Declaration"===I.type&&this.chunk(";")})}}},68241:function(ue,q,f){var U=f(74586).consumeNumber,V=f(97555).TYPE.Dimension;ue.exports={name:"Dimension",structure:{value:String,unit:String},parse:function(){var T=this.scanner.tokenStart,R=U(this.scanner.source,T);return this.eat(V),{type:"Dimension",loc:this.getLocation(T,this.scanner.tokenStart),value:this.scanner.source.substring(T,R),unit:this.scanner.source.substring(R,this.scanner.tokenStart)}},generate:function(T){this.chunk(T.value),this.chunk(T.unit)}}},60298:function(ue,q,f){var B=f(97555).TYPE.RightParenthesis;ue.exports={name:"Function",structure:{name:String,children:[[]]},parse:function(Z,T){var I,R=this.scanner.tokenStart,b=this.consumeFunctionName(),v=b.toLowerCase();return I=T.hasOwnProperty(v)?T[v].call(this,T):Z.call(this,T),this.scanner.eof||this.eat(B),{type:"Function",loc:this.getLocation(R,this.scanner.tokenStart),name:b,children:I}},generate:function(Z){this.chunk(Z.name),this.chunk("("),this.children(Z),this.chunk(")")},walkContext:"function"}},50759:function(ue,q,f){var B=f(97555).TYPE.Hash;ue.exports={name:"Hash",structure:{value:String},parse:function(){var Z=this.scanner.tokenStart;return this.eat(B),{type:"Hash",loc:this.getLocation(Z,this.scanner.tokenStart),value:this.scanner.substrToCursor(Z+1)}},generate:function(Z){this.chunk("#"),this.chunk(Z.value)}}},37701:function(ue,q,f){var B=f(97555).TYPE.Hash;ue.exports={name:"IdSelector",structure:{name:String},parse:function(){var Z=this.scanner.tokenStart;return this.eat(B),{type:"IdSelector",loc:this.getLocation(Z,this.scanner.tokenStart),name:this.scanner.substrToCursor(Z+1)}},generate:function(Z){this.chunk("#"),this.chunk(Z.name)}}},71392:function(ue,q,f){var B=f(97555).TYPE.Ident;ue.exports={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(B)}},generate:function(Z){this.chunk(Z.name)}}},94179:function(ue,q,f){var U=f(97555).TYPE,B=U.Ident,V=U.Number,Z=U.Dimension,T=U.LeftParenthesis,R=U.RightParenthesis,b=U.Colon,v=U.Delim;ue.exports={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var k,D=this.scanner.tokenStart,M=null;if(this.eat(T),this.scanner.skipSC(),k=this.consume(B),this.scanner.skipSC(),this.scanner.tokenType!==R){switch(this.eat(b),this.scanner.skipSC(),this.scanner.tokenType){case V:M=this.lookupNonWSType(1)===v?this.Ratio():this.Number();break;case Z:M=this.Dimension();break;case B:M=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat(R),{type:"MediaFeature",loc:this.getLocation(D,this.scanner.tokenStart),name:k,value:M}},generate:function(D){this.chunk("("),this.chunk(D.name),null!==D.value&&(this.chunk(":"),this.node(D.value)),this.chunk(")")}}},32107:function(ue,q,f){var U=f(97555).TYPE,B=U.WhiteSpace,V=U.Comment,Z=U.Ident,T=U.LeftParenthesis;ue.exports={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var b=this.createList(),v=null,I=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case V:this.scanner.next();continue;case B:I=this.WhiteSpace();continue;case Z:v=this.Identifier();break;case T:v=this.MediaFeature();break;default:break e}null!==I&&(b.push(I),I=null),b.push(v)}return null===v&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(b),children:b}},generate:function(b){this.children(b)}}},54459:function(ue,q,f){var U=f(97555).TYPE.Comma;ue.exports={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(V){var Z=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(Z.push(this.MediaQuery(V)),this.scanner.tokenType===U);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(Z),children:Z}},generate:function(V){this.children(V,function(){this.chunk(",")})}}},61123:function(ue){ue.exports={name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(f){this.scanner.skipSC();var Z,U=this.scanner.tokenStart,B=U,V=null;return Z=this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),this.scanner.skipSC(),f&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),V=this.SelectorList(),this.needPositions&&(B=this.getLastListNode(V.children).loc.end.offset)):this.needPositions&&(B=Z.loc.end.offset),{type:"Nth",loc:this.getLocation(U,B),nth:Z,selector:V}},generate:function(f){this.node(f.nth),null!==f.selector&&(this.chunk(" of "),this.node(f.selector))}}},63902:function(ue,q,f){var U=f(97555).TYPE.Number;ue.exports={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(U)}},generate:function(V){this.chunk(V.value)}}},7249:function(ue){ue.exports={name:"Operator",structure:{value:String},parse:function(){var f=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(f,this.scanner.tokenStart),value:this.scanner.substrToCursor(f)}},generate:function(f){this.chunk(f.value)}}},34875:function(ue,q,f){var U=f(97555).TYPE,B=U.LeftParenthesis,V=U.RightParenthesis;ue.exports={name:"Parentheses",structure:{children:[[]]},parse:function(T,R){var v,b=this.scanner.tokenStart;return this.eat(B),v=T.call(this,R),this.scanner.eof||this.eat(V),{type:"Parentheses",loc:this.getLocation(b,this.scanner.tokenStart),children:v}},generate:function(T){this.chunk("("),this.children(T),this.chunk(")")}}},62173:function(ue,q,f){var U=f(74586).consumeNumber,V=f(97555).TYPE.Percentage;ue.exports={name:"Percentage",structure:{value:String},parse:function(){var T=this.scanner.tokenStart,R=U(this.scanner.source,T);return this.eat(V),{type:"Percentage",loc:this.getLocation(T,this.scanner.tokenStart),value:this.scanner.source.substring(T,R)}},generate:function(T){this.chunk(T.value),this.chunk("%")}}},38887:function(ue,q,f){var U=f(97555).TYPE,B=U.Ident,V=U.Function,Z=U.Colon,T=U.RightParenthesis;ue.exports={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var I,D,b=this.scanner.tokenStart,v=null;return this.eat(Z),this.scanner.tokenType===V?(D=(I=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(D)?(this.scanner.skipSC(),v=this.pseudo[D].call(this),this.scanner.skipSC()):(v=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(T)):I=this.consume(B),{type:"PseudoClassSelector",loc:this.getLocation(b,this.scanner.tokenStart),name:I,children:v}},generate:function(b){this.chunk(":"),this.chunk(b.name),null!==b.children&&(this.chunk("("),this.children(b),this.chunk(")"))},walkContext:"function"}},78076:function(ue,q,f){var U=f(97555).TYPE,B=U.Ident,V=U.Function,Z=U.Colon,T=U.RightParenthesis;ue.exports={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var I,D,b=this.scanner.tokenStart,v=null;return this.eat(Z),this.eat(Z),this.scanner.tokenType===V?(D=(I=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(D)?(this.scanner.skipSC(),v=this.pseudo[D].call(this),this.scanner.skipSC()):(v=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(T)):I=this.consume(B),{type:"PseudoElementSelector",loc:this.getLocation(b,this.scanner.tokenStart),name:I,children:v}},generate:function(b){this.chunk("::"),this.chunk(b.name),null!==b.children&&(this.chunk("("),this.children(b),this.chunk(")"))},walkContext:"function"}},15482:function(ue,q,f){var U=f(97555).isDigit,B=f(97555).TYPE,V=B.Number,Z=B.Delim;function b(){this.scanner.skipWS();for(var v=this.consume(V),I=0;I0&&this.scanner.lookupType(-1)===V?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function I(){return 0}ue.exports={name:"Raw",structure:{value:String},parse:function(E,N,A){var S,w=this.scanner.getTokenStart(E);return this.scanner.skip(this.scanner.getRawLength(E,N||I)),S=A&&this.scanner.tokenStart>w?v.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(w,S),value:this.scanner.source.substring(w,S)}},generate:function(E){this.chunk(E.value)},mode:{default:I,leftCurlyBracket:function(g){return g===T?1:0},leftCurlyBracketOrSemicolon:function(g){return g===T||g===Z?1:0},exclamationMarkOrSemicolon:function(g,E,N){return g===R&&33===E.charCodeAt(N)||g===Z?1:0},semicolonIncluded:function(g){return g===Z?2:0}}}},56064:function(ue,q,f){var U=f(97555).TYPE,B=f(89604).mode,V=U.LeftCurlyBracket;function Z(R){return this.Raw(R,B.leftCurlyBracket,!0)}function T(){var R=this.SelectorList();return"Raw"!==R.type&&!1===this.scanner.eof&&this.scanner.tokenType!==V&&this.error(),R}ue.exports={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var I,D,b=this.scanner.tokenIndex,v=this.scanner.tokenStart;return I=this.parseRulePrelude?this.parseWithFallback(T,Z):Z.call(this,b),D=this.Block(!0),{type:"Rule",loc:this.getLocation(v,this.scanner.tokenStart),prelude:I,block:D}},generate:function(b){this.node(b.prelude),this.node(b.block)},walkContext:"rule"}},43042:function(ue){ue.exports={name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var f=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(f)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(f),children:f}},generate:function(f){this.children(f)}}},38444:function(ue,q,f){var B=f(97555).TYPE.Comma;ue.exports={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var Z=this.createList();!this.scanner.eof&&(Z.push(this.Selector()),this.scanner.tokenType===B);)this.scanner.next();return{type:"SelectorList",loc:this.getLocationFromList(Z),children:Z}},generate:function(Z){this.children(Z,function(){this.chunk(",")})},walkContext:"selector"}},12565:function(ue,q,f){var U=f(97555).TYPE.String;ue.exports={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(U)}},generate:function(V){this.chunk(V.value)}}},91348:function(ue,q,f){var U=f(97555).TYPE,B=U.WhiteSpace,V=U.Comment,Z=U.AtKeyword,T=U.CDO,R=U.CDC;function v(I){return this.Raw(I,null,!1)}ue.exports={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var M,D=this.scanner.tokenStart,k=this.createList();!this.scanner.eof;){switch(this.scanner.tokenType){case B:this.scanner.next();continue;case V:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}M=this.Comment();break;case T:M=this.CDO();break;case R:M=this.CDC();break;case Z:M=this.parseWithFallback(this.Atrule,v);break;default:M=this.parseWithFallback(this.Rule,v)}k.push(M)}return{type:"StyleSheet",loc:this.getLocation(D,this.scanner.tokenStart),children:k}},generate:function(D){this.children(D)},walkContext:"stylesheet"}},16983:function(ue,q,f){var B=f(97555).TYPE.Ident;function T(){this.scanner.tokenType!==B&&!1===this.scanner.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.scanner.next()}ue.exports={name:"TypeSelector",structure:{name:String},parse:function(){var b=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),T.call(this)):(T.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),T.call(this))),{type:"TypeSelector",loc:this.getLocation(b,this.scanner.tokenStart),name:this.scanner.substrToCursor(b)}},generate:function(b){this.chunk(b.name)}}},95616:function(ue,q,f){var U=f(97555).isHexDigit,B=f(97555).cmpChar,V=f(97555).TYPE,Z=f(97555).NAME,T=V.Ident,R=V.Number,b=V.Dimension;function M(N,A){for(var w=this.scanner.tokenStart+N,S=0;w6&&this.error("Too many hex digits",w)}return this.scanner.next(),S}function _(N){for(var A=0;this.scanner.isDelim(63);)++A>N&&this.error("Too many question marks"),this.scanner.next()}function g(N){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==N&&this.error(Z[N]+" is expected")}function E(){var N=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===T?void((N=M.call(this,0,!0))>0&&_.call(this,6-N)):this.scanner.isDelim(63)?(this.scanner.next(),void _.call(this,5)):void this.error("Hex digit or question mark is expected")):this.scanner.tokenType===R?(g.call(this,43),N=M.call(this,1,!0),this.scanner.isDelim(63)?void _.call(this,6-N):this.scanner.tokenType===b||this.scanner.tokenType===R?(g.call(this,45),void M.call(this,1,!1)):void 0):this.scanner.tokenType===b?(g.call(this,43),void((N=M.call(this,1,!0))>0&&_.call(this,6-N))):void this.error()}ue.exports={name:"UnicodeRange",structure:{value:String},parse:function(){var A=this.scanner.tokenStart;return B(this.scanner.source,A,117)||this.error("U is expected"),B(this.scanner.source,A+1,43)||this.error("Plus sign is expected"),this.scanner.next(),E.call(this),{type:"UnicodeRange",loc:this.getLocation(A,this.scanner.tokenStart),value:this.scanner.substrToCursor(A)}},generate:function(A){this.chunk(A.value)}}},72796:function(ue,q,f){var U=f(97555).isWhiteSpace,B=f(97555).cmpStr,V=f(97555).TYPE,Z=V.Function,T=V.Url,R=V.RightParenthesis;ue.exports={name:"Url",structure:{value:["String","Raw"]},parse:function(){var I,v=this.scanner.tokenStart;switch(this.scanner.tokenType){case T:for(var D=v+4,k=this.scanner.tokenEnd-1;D=48&&w<=57}function B(w){return w>=65&&w<=90}function V(w){return w>=97&&w<=122}function Z(w){return B(w)||V(w)}function T(w){return w>=128}function R(w){return Z(w)||T(w)||95===w}function v(w){return w>=0&&w<=8||11===w||w>=14&&w<=31||127===w}function I(w){return 10===w||13===w||12===w}function D(w){return I(w)||32===w||9===w}function k(w,S){return!(92!==w||I(S)||0===S)}var E=new Array(128);A.Eof=128,A.WhiteSpace=130,A.Digit=131,A.NameStart=132,A.NonPrintable=133;for(var N=0;N=65&&w<=70||w>=97&&w<=102},isUppercaseLetter:B,isLowercaseLetter:V,isLetter:Z,isNonAscii:T,isNameStart:R,isName:function(w){return R(w)||f(w)||45===w},isNonPrintable:v,isNewline:I,isWhiteSpace:D,isValidEscape:k,isIdentifierStart:function(w,S,O){return 45===w?R(S)||45===S||k(S,O):!!R(w)||92===w&&k(w,S)},isNumberStart:function(w,S,O){return 43===w||45===w?f(S)?2:46===S&&f(O)?3:0:46===w?f(S)?2:0:f(w)?1:0},isBOM:function(w){return 65279===w||65534===w?1:0},charCodeCategory:A}},97077:function(ue){var q={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},f=Object.keys(q).reduce(function(U,B){return U[q[B]]=B,U},{});ue.exports={TYPE:q,NAME:f}},97555:function(ue,q,f){var U=f(13146),B=f(62146),V=f(97077),Z=V.TYPE,T=f(88312),R=T.isNewline,b=T.isName,v=T.isValidEscape,I=T.isNumberStart,D=T.isIdentifierStart,k=T.charCodeCategory,M=T.isBOM,_=f(74586),g=_.cmpStr,E=_.getNewlineLength,N=_.findWhiteSpaceEnd,A=_.consumeEscaped,w=_.consumeName,S=_.consumeNumber,O=_.consumeBadUrlRemnants,F=16777215,z=24;function K(j,J){function ee(je){return je=j.length?void(qe>z,Ae[be]=Ft,Ae[Ft++]=be;FtS.length)return!1;for(var K=O;K=0&&R(S.charCodeAt(O));O--);return O+1},findWhiteSpaceEnd:function(S,O){for(;O=2&&45===b.charCodeAt(v)&&45===b.charCodeAt(v+1)}function Z(b,v){if(b.length-(v=v||0)>=3&&45===b.charCodeAt(v)&&45!==b.charCodeAt(v+1)){var I=b.indexOf("-",v+2);if(-1!==I)return b.substring(v,I+1)}return""}ue.exports={keyword:function(b){if(q.call(f,b))return f[b];var v=b.toLowerCase();if(q.call(f,v))return f[b]=f[v];var I=V(v,0),D=I?"":Z(v,0);return f[b]=Object.freeze({basename:v.substr(D.length),name:v,vendor:D,prefix:D,custom:I})},property:function(b){if(q.call(U,b))return U[b];var v=b,I=b[0];"/"===I?I="/"===b[1]?"//":"/":"_"!==I&&"*"!==I&&"$"!==I&&"#"!==I&&"+"!==I&&"&"!==I&&(I="");var D=V(v,I.length);if(!D&&(v=v.toLowerCase(),q.call(U,v)))return U[b]=U[v];var k=D?"":Z(v,I.length),M=v.substr(0,I.length+k.length);return U[b]=Object.freeze({basename:v.substr(M.length),name:v.substr(I.length),hack:I,vendor:k,prefix:M,custom:D})},isCustomProperty:V,vendorPrefix:Z}},24523:function(ue){var q=Object.prototype.hasOwnProperty,f=function(){};function U(b){return"function"==typeof b?b:f}function B(b,v){return function(I,D,k){I.type===v&&b.call(this,I,D,k)}}function V(b,v){var I=v.structure,D=[];for(var k in I)if(!1!==q.call(I,k)){var M=I[k],_={name:k,type:!1,nullable:!1};Array.isArray(I[k])||(M=[I[k]]);for(var g=0;g":".","?":"/","|":"\\"},v={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},D=1;D<20;++D)T[111+D]="f"+D;for(D=0;D<=9;++D)T[D+96]=D.toString();K.prototype.bind=function(j,J,ee){var $=this;return $._bindMultiple.call($,j=j instanceof Array?j:[j],J,ee),$},K.prototype.unbind=function(j,J){return this.bind.call(this,j,function(){},J)},K.prototype.trigger=function(j,J){return this._directMap[j+":"+J]&&this._directMap[j+":"+J]({},j),this},K.prototype.reset=function(){var j=this;return j._callbacks={},j._directMap={},j},K.prototype.stopCallback=function(j,J){if((" "+J.className+" ").indexOf(" mousetrap ")>-1||z(J,this.target))return!1;if("composedPath"in j&&"function"==typeof j.composedPath){var $=j.composedPath()[0];$!==j.target&&(J=$)}return"INPUT"==J.tagName||"SELECT"==J.tagName||"TEXTAREA"==J.tagName||J.isContentEditable},K.prototype.handleKey=function(){var j=this;return j._handleKey.apply(j,arguments)},K.addKeycodes=function(j){for(var J in j)j.hasOwnProperty(J)&&(T[J]=j[J]);I=null},K.init=function(){var j=K(V);for(var J in j)"_"!==J.charAt(0)&&(K[J]=function(ee){return function(){return j[ee].apply(j,arguments)}}(J))},K.init(),B.Mousetrap=K,ue.exports&&(ue.exports=K),void 0!==(U=function(){return K}.call(q,f,q,ue))&&(ue.exports=U)}function k(j,J,ee){j.addEventListener?j.addEventListener(J,ee,!1):j.attachEvent("on"+J,ee)}function M(j){if("keypress"==j.type){var J=String.fromCharCode(j.which);return j.shiftKey||(J=J.toLowerCase()),J}return T[j.which]?T[j.which]:R[j.which]?R[j.which]:String.fromCharCode(j.which).toLowerCase()}function _(j,J){return j.sort().join(",")===J.sort().join(",")}function A(j){return"shift"==j||"ctrl"==j||"alt"==j||"meta"==j}function S(j,J,ee){return ee||(ee=function(){if(!I)for(var j in I={},T)j>95&&j<112||T.hasOwnProperty(j)&&(I[T[j]]=j);return I}()[j]?"keydown":"keypress"),"keypress"==ee&&J.length&&(ee="keydown"),ee}function F(j,J){var ee,$,ae,se=[];for(ee=function(j){return"+"===j?["+"]:(j=j.replace(/\+{2}/g,"+plus")).split("+")}(j),ae=0;ae1?function(yt,Ft,xe,De){function je(vt){return function(){ce=vt,++ee[yt],clearTimeout($),$=setTimeout(le,1e3)}}function dt(vt){Ae(xe,vt,yt),"keyup"!==De&&(ae=M(vt)),setTimeout(le,10)}ee[yt]=0;for(var Qe=0;Qe=0;--qe){var _t=this.tryEntries[qe],yt=_t.completion;if("root"===_t.tryLoc)return it("end");if(_t.tryLoc<=this.prev){var Ft=B.call(_t,"catchLoc"),xe=B.call(_t,"finallyLoc");if(Ft&&xe){if(this.prev<_t.catchLoc)return it(_t.catchLoc,!0);if(this.prev<_t.finallyLoc)return it(_t.finallyLoc)}else if(Ft){if(this.prev<_t.catchLoc)return it(_t.catchLoc,!0)}else{if(!xe)throw new Error("try statement without catch or finally");if(this.prev<_t.finallyLoc)return it(_t.finallyLoc)}}}},abrupt:function(Ae,be){for(var it=this.tryEntries.length-1;it>=0;--it){var qe=this.tryEntries[it];if(qe.tryLoc<=this.prev&&B.call(qe,"finallyLoc")&&this.prev=0;--be){var it=this.tryEntries[be];if(it.finallyLoc===Ae)return this.complete(it.completion,it.afterLoc),ae(it),E}},catch:function(Ae){for(var be=this.tryEntries.length-1;be>=0;--be){var it=this.tryEntries[be];if(it.tryLoc===Ae){var qe=it.completion;if("throw"===qe.type){var _t=qe.arg;ae(it)}return _t}}throw new Error("illegal catch attempt")},delegateYield:function(Ae,be,it){return this.delegate={iterator:ce(Ae),resultName:be,nextLoc:it},"next"===this.method&&(this.arg=V),E}},f}(ue.exports);try{regeneratorRuntime=q}catch(f){"object"==typeof globalThis?globalThis.regeneratorRuntime=q:Function("r","regeneratorRuntime = r")(q)}},56938:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);q.Observable=U.Observable,q.Subject=U.Subject;var B=f(37294);q.AnonymousSubject=B.AnonymousSubject;var V=f(37294);q.config=V.config,f(26598),f(87663),f(95351),f(66981),f(31881),f(36800),f(52413),f(86376),f(41029),f(30918),f(79817),f(29023),f(48668),f(61975),f(92442),f(42697),f(63990),f(86230),f(61201),f(32171),f(40439),f(69079),f(9222),f(52357),f(36294),f(12782),f(94618),f(93231),f(96547),f(62374),f(35595),f(57540),f(97010),f(56518),f(59982),f(70198),f(3943),f(95297),f(53842),f(46085),f(46753),f(12452),f(51341),f(41575),f(42657),f(17109),f(89716),f(71255),f(75197),f(70992),f(3106),f(54506),f(16161),f(11405),f(37132),f(45396),f(41154),f(96986),f(67259),f(89015),f(57301),f(4993),f(77490),f(4533),f(42215),f(95564),f(61431),f(68663),f(63566),f(62729),f(48483),f(32979),f(78104),f(64259),f(30336),f(46315),f(60771),f(92700),f(43545),f(89242),f(70177),f(43800),f(33434),f(37179),f(97810),f(27430),f(44633),f(37953),f(58435),f(14234),f(98741),f(43263),f(57180),f(87700),f(34860),f(67751),f(63733),f(38596),f(20038),f(58186),f(77538),f(33866),f(1676),f(3018),f(58003),f(77394),f(92947),f(27971),f(33934),f(43126),f(6320),f(96813),f(20425),f(70140),f(32035),f(49421),f(9693),f(87276),f(63934),f(17360),f(37222),f(55214),f(22854),f(65259),f(84715),f(27798),f(98441),f(56238),f(42145);var Z=f(94117);q.Subscription=Z.Subscription,q.ReplaySubject=Z.ReplaySubject,q.BehaviorSubject=Z.BehaviorSubject,q.Notification=Z.Notification,q.EmptyError=Z.EmptyError,q.ArgumentOutOfRangeError=Z.ArgumentOutOfRangeError,q.ObjectUnsubscribedError=Z.ObjectUnsubscribedError,q.UnsubscriptionError=Z.UnsubscriptionError,q.pipe=Z.pipe;var T=f(53520);q.TestScheduler=T.TestScheduler;var R=f(94117);q.Subscriber=R.Subscriber,q.AsyncSubject=R.AsyncSubject,q.ConnectableObservable=R.ConnectableObservable,q.TimeoutError=R.TimeoutError,q.VirtualTimeScheduler=R.VirtualTimeScheduler;var b=f(55905);q.AjaxResponse=b.AjaxResponse,q.AjaxError=b.AjaxError,q.AjaxTimeoutError=b.AjaxTimeoutError;var v=f(94117),I=f(37294),D=f(37294);q.TimeInterval=D.TimeInterval,q.Timestamp=D.Timestamp;var k=f(73033);q.operators=k,q.Scheduler={asap:v.asapScheduler,queue:v.queueScheduler,animationFrame:v.animationFrameScheduler,async:v.asyncScheduler},q.Symbol={rxSubscriber:I.rxSubscriber,observable:I.observable,iterator:I.iterator}},26598:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.bindCallback=U.bindCallback},87663:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.bindNodeCallback=U.bindNodeCallback},95351:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.combineLatest=U.combineLatest},66981:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.concat=U.concat},31881:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.defer=U.defer},12782:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(55905);U.Observable.ajax=B.ajax},94618:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(4194);U.Observable.webSocket=B.webSocket},36800:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.empty=U.empty},52413:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.forkJoin=U.forkJoin},86376:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.from=U.from},41029:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.fromEvent=U.fromEvent},30918:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.fromEventPattern=U.fromEventPattern},79817:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.fromPromise=U.from},29023:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.generate=U.generate},48668:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.if=U.iif},61975:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.interval=U.interval},92442:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.merge=U.merge},63990:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);function B(){return U.NEVER}q.staticNever=B,U.Observable.never=B},86230:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.of=U.of},61201:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.onErrorResumeNext=U.onErrorResumeNext},32171:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.pairs=U.pairs},42697:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.race=U.race},40439:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.range=U.range},9222:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.throw=U.throwError,U.Observable.throwError=U.throwError},52357:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.timer=U.timer},69079:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.using=U.using},36294:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117);U.Observable.zip=U.zip},77490:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(20325);U.Observable.prototype.audit=B.audit},4533:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(55702);U.Observable.prototype.auditTime=B.auditTime},93231:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(19931);U.Observable.prototype.buffer=B.buffer},96547:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(38173);U.Observable.prototype.bufferCount=B.bufferCount},62374:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(93690);U.Observable.prototype.bufferTime=B.bufferTime},35595:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(79681);U.Observable.prototype.bufferToggle=B.bufferToggle},57540:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(75311);U.Observable.prototype.bufferWhen=B.bufferWhen},97010:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(26306);U.Observable.prototype.catch=B._catch,U.Observable.prototype._catch=B._catch},56518:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(15869);U.Observable.prototype.combineAll=B.combineAll},59982:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(23265);U.Observable.prototype.combineLatest=B.combineLatest},70198:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(31179);U.Observable.prototype.concat=B.concat},3943:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(16148);U.Observable.prototype.concatAll=B.concatAll},95297:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(28552);U.Observable.prototype.concatMap=B.concatMap},53842:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(91798);U.Observable.prototype.concatMapTo=B.concatMapTo},46085:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(93653);U.Observable.prototype.count=B.count},12452:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(36477);U.Observable.prototype.debounce=B.debounce},51341:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(61529);U.Observable.prototype.debounceTime=B.debounceTime},41575:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(64502);U.Observable.prototype.defaultIfEmpty=B.defaultIfEmpty},42657:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(33674);U.Observable.prototype.delay=B.delay},17109:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(49477);U.Observable.prototype.delayWhen=B.delayWhen},46753:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(21941);U.Observable.prototype.dematerialize=B.dematerialize},89716:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(18053);U.Observable.prototype.distinct=B.distinct},71255:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(13598);U.Observable.prototype.distinctUntilChanged=B.distinctUntilChanged},75197:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(94936);U.Observable.prototype.distinctUntilKeyChanged=B.distinctUntilKeyChanged},70992:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(21790);U.Observable.prototype.do=B._do,U.Observable.prototype._do=B._do},11405:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(2538);U.Observable.prototype.elementAt=B.elementAt},61431:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(58136);U.Observable.prototype.every=B.every},3106:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(26734);U.Observable.prototype.exhaust=B.exhaust},54506:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(2084);U.Observable.prototype.exhaustMap=B.exhaustMap},16161:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(2945);U.Observable.prototype.expand=B.expand},37132:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(3704);U.Observable.prototype.filter=B.filter},45396:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(58870);U.Observable.prototype.finally=B._finally,U.Observable.prototype._finally=B._finally},41154:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(16201);U.Observable.prototype.find=B.find},96986:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(95148);U.Observable.prototype.findIndex=B.findIndex},67259:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(96050);U.Observable.prototype.first=B.first},89015:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(16309);U.Observable.prototype.groupBy=B.groupBy},57301:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(3640);U.Observable.prototype.ignoreElements=B.ignoreElements},4993:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(87486);U.Observable.prototype.isEmpty=B.isEmpty},42215:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(30274);U.Observable.prototype.last=B.last},95564:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(11668);U.Observable.prototype.let=B.letProto,U.Observable.prototype.letBind=B.letProto},68663:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(23307);U.Observable.prototype.map=B.map},63566:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(3498);U.Observable.prototype.mapTo=B.mapTo},62729:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(70845);U.Observable.prototype.materialize=B.materialize},48483:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(96415);U.Observable.prototype.max=B.max},32979:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(33836);U.Observable.prototype.merge=B.merge},78104:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(58610);U.Observable.prototype.mergeAll=B.mergeAll},64259:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(36098);U.Observable.prototype.mergeMap=B.mergeMap,U.Observable.prototype.flatMap=B.mergeMap},30336:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(53033);U.Observable.prototype.flatMapTo=B.mergeMapTo,U.Observable.prototype.mergeMapTo=B.mergeMapTo},46315:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(11444);U.Observable.prototype.mergeScan=B.mergeScan},60771:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(6626);U.Observable.prototype.min=B.min},92700:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(4291);U.Observable.prototype.multicast=B.multicast},43545:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(37675);U.Observable.prototype.observeOn=B.observeOn},89242:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(92878);U.Observable.prototype.onErrorResumeNext=B.onErrorResumeNext},70177:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(94401);U.Observable.prototype.pairwise=B.pairwise},43800:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(93110);U.Observable.prototype.partition=B.partition},33434:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(53937);U.Observable.prototype.pluck=B.pluck},37179:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(81e3);U.Observable.prototype.publish=B.publish},97810:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(78665);U.Observable.prototype.publishBehavior=B.publishBehavior},44633:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(34696);U.Observable.prototype.publishLast=B.publishLast},27430:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(35543);U.Observable.prototype.publishReplay=B.publishReplay},37953:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(33963);U.Observable.prototype.race=B.race},58435:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(99216);U.Observable.prototype.reduce=B.reduce},14234:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(19613);U.Observable.prototype.repeat=B.repeat},98741:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(72798);U.Observable.prototype.repeatWhen=B.repeatWhen},43263:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(59813);U.Observable.prototype.retry=B.retry},57180:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(5419);U.Observable.prototype.retryWhen=B.retryWhen},87700:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(58693);U.Observable.prototype.sample=B.sample},34860:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(86803);U.Observable.prototype.sampleTime=B.sampleTime},67751:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(65036);U.Observable.prototype.scan=B.scan},63733:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(12201);U.Observable.prototype.sequenceEqual=B.sequenceEqual},38596:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(86892);U.Observable.prototype.share=B.share},20038:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(9050);U.Observable.prototype.shareReplay=B.shareReplay},58186:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(13533);U.Observable.prototype.single=B.single},77538:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(65846);U.Observable.prototype.skip=B.skip},33866:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(90955);U.Observable.prototype.skipLast=B.skipLast},1676:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(75479);U.Observable.prototype.skipUntil=B.skipUntil},3018:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(76841);U.Observable.prototype.skipWhile=B.skipWhile},58003:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(66560);U.Observable.prototype.startWith=B.startWith},77394:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(92265);U.Observable.prototype.subscribeOn=B.subscribeOn},92947:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(41428);U.Observable.prototype.switch=B._switch,U.Observable.prototype._switch=B._switch},27971:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(5193);U.Observable.prototype.switchMap=B.switchMap},33934:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(34022);U.Observable.prototype.switchMapTo=B.switchMapTo},43126:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(204);U.Observable.prototype.take=B.take},6320:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(62299);U.Observable.prototype.takeLast=B.takeLast},96813:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(93542);U.Observable.prototype.takeUntil=B.takeUntil},20425:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(79214);U.Observable.prototype.takeWhile=B.takeWhile},70140:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(35922);U.Observable.prototype.throttle=B.throttle},32035:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(41941);U.Observable.prototype.throttleTime=B.throttleTime},49421:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(99194);U.Observable.prototype.timeInterval=B.timeInterval},9693:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(53358);U.Observable.prototype.timeout=B.timeout},87276:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(41237);U.Observable.prototype.timeoutWith=B.timeoutWith},63934:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(84485);U.Observable.prototype.timestamp=B.timestamp},17360:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(23552);U.Observable.prototype.toArray=B.toArray},37222:function(){},55214:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(13977);U.Observable.prototype.window=B.window},22854:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(54052);U.Observable.prototype.windowCount=B.windowCount},65259:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(17884);U.Observable.prototype.windowTime=B.windowTime},84715:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(18835);U.Observable.prototype.windowToggle=B.windowToggle},27798:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(84220);U.Observable.prototype.windowWhen=B.windowWhen},98441:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(41603);U.Observable.prototype.withLatestFrom=B.withLatestFrom},56238:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(83313);U.Observable.prototype.zip=B.zipProto},42145:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(80396);U.Observable.prototype.zipAll=B.zipAll},20325:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.audit=function(V){return U.audit(V)(this)}},55702:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(73033);q.auditTime=function(Z,T){return void 0===T&&(T=U.asyncScheduler),B.auditTime(Z,T)(this)}},19931:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.buffer=function(V){return U.buffer(V)(this)}},38173:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.bufferCount=function(V,Z){return void 0===Z&&(Z=null),U.bufferCount(V,Z)(this)}},93690:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(37294),V=f(73033);q.bufferTime=function(T){var R=arguments.length,b=U.asyncScheduler;B.isScheduler(arguments[arguments.length-1])&&(b=arguments[arguments.length-1],R--);var v=null;R>=2&&(v=arguments[1]);var I=Number.POSITIVE_INFINITY;return R>=3&&(I=arguments[2]),V.bufferTime(T,v,I,b)(this)}},79681:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.bufferToggle=function(V,Z){return U.bufferToggle(V,Z)(this)}},75311:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.bufferWhen=function(V){return U.bufferWhen(V)(this)}},26306:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q._catch=function(V){return U.catchError(V)(this)}},15869:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.combineAll=function(V){return U.combineAll(V)(this)}},23265:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(37294);q.combineLatest=function(){for(var Z=[],T=0;T=2?U.reduce(V,Z)(this):U.reduce(V)(this)}},19613:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.repeat=function(V){return void 0===V&&(V=-1),U.repeat(V)(this)}},72798:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.repeatWhen=function(V){return U.repeatWhen(V)(this)}},59813:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.retry=function(V){return void 0===V&&(V=-1),U.retry(V)(this)}},5419:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.retryWhen=function(V){return U.retryWhen(V)(this)}},58693:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.sample=function(V){return U.sample(V)(this)}},86803:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(94117),B=f(73033);q.sampleTime=function(Z,T){return void 0===T&&(T=U.asyncScheduler),B.sampleTime(Z,T)(this)}},65036:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.scan=function(V,Z){return arguments.length>=2?U.scan(V,Z)(this):U.scan(V)(this)}},12201:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.sequenceEqual=function(V,Z){return U.sequenceEqual(V,Z)(this)}},86892:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.share=function(){return U.share()(this)}},9050:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.shareReplay=function(V,Z,T){return V&&"object"==typeof V?U.shareReplay(V)(this):U.shareReplay(V,Z,T)(this)}},13533:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.single=function(V){return U.single(V)(this)}},65846:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.skip=function(V){return U.skip(V)(this)}},90955:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.skipLast=function(V){return U.skipLast(V)(this)}},75479:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.skipUntil=function(V){return U.skipUntil(V)(this)}},76841:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.skipWhile=function(V){return U.skipWhile(V)(this)}},66560:function(ue,q,f){"use strict";Object.defineProperty(q,"__esModule",{value:!0});var U=f(73033);q.startWith=function(){for(var V=[],Z=0;Z1&&void 0!==arguments[1]?arguments[1]:dt.E,nn=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.E;return(0,je.P)(function(){return Kt()?Jt:nn})}var bt=f(57434),en=f(55371),Nt=new U.y(S.Z);function rn(){return Nt}var En=f(43161);function Zn(){for(var Kt=arguments.length,Jt=new Array(Kt),nn=0;nn0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,O=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,F=arguments.length>2?arguments[2]:void 0;return(0,U.Z)(this,A),(w=N.call(this)).scheduler=F,w._events=[],w._infiniteTimeWindow=!1,w._bufferSize=S<1?1:S,w._windowTime=O<1?1:O,O===Number.POSITIVE_INFINITY?(w._infiniteTimeWindow=!0,w.next=w.nextInfiniteTimeWindow):w.next=w.nextTimeWindow,w}return(0,B.Z)(A,[{key:"nextInfiniteTimeWindow",value:function(S){if(!this.isStopped){var O=this._events;O.push(S),O.length>this._bufferSize&&O.shift()}(0,V.Z)((0,Z.Z)(A.prototype),"next",this).call(this,S)}},{key:"nextTimeWindow",value:function(S){this.isStopped||(this._events.push(new g(this._getNow(),S)),this._trimBufferThenGetEvents()),(0,V.Z)((0,Z.Z)(A.prototype),"next",this).call(this,S)}},{key:"_subscribe",value:function(S){var j,O=this._infiniteTimeWindow,F=O?this._events:this._trimBufferThenGetEvents(),z=this.scheduler,K=F.length;if(this.closed)throw new k.N;if(this.isStopped||this.hasError?j=I.w.EMPTY:(this.observers.push(S),j=new M.W(this,S)),z&&S.add(S=new D.ht(S,z)),O)for(var J=0;JO&&(j=Math.max(j,K-O)),j>0&&z.splice(0,j),z}}]),A}(b.xQ),g=function E(N,A){(0,U.Z)(this,E),this.time=N,this.value=A}},67801:function(ue,q,f){"use strict";f.d(q,{b:function(){return V}});var U=f(18967),B=f(14105),V=function(){var Z=function(){function T(R){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.now;(0,U.Z)(this,T),this.SchedulerAction=R,this.now=b}return(0,B.Z)(T,[{key:"schedule",value:function(b){var v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,I=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,b).schedule(I,v)}}]),T}();return Z.now=function(){return Date.now()},Z}()},68707:function(ue,q,f){"use strict";f.d(q,{Yc:function(){return _},xQ:function(){return g},ug:function(){return E}});var U=f(14105),B=f(13920),V=f(89200),Z=f(18967),T=f(10509),R=f(97154),b=f(89797),v=f(39874),I=f(5051),D=f(1696),k=f(18480),M=f(79542),_=function(N){(0,T.Z)(w,N);var A=(0,R.Z)(w);function w(S){var O;return(0,Z.Z)(this,w),(O=A.call(this,S)).destination=S,O}return w}(v.L),g=function(){var N=function(A){(0,T.Z)(S,A);var w=(0,R.Z)(S);function S(){var O;return(0,Z.Z)(this,S),(O=w.call(this)).observers=[],O.closed=!1,O.isStopped=!1,O.hasError=!1,O.thrownError=null,O}return(0,U.Z)(S,[{key:M.b,value:function(){return new _(this)}},{key:"lift",value:function(F){var z=new E(this,this);return z.operator=F,z}},{key:"next",value:function(F){if(this.closed)throw new D.N;if(!this.isStopped)for(var z=this.observers,K=z.length,j=z.slice(),J=0;J1&&void 0!==arguments[1]?arguments[1]:0,E=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R.e;return(0,U.Z)(this,k),(_=D.call(this)).source=M,_.delayTime=g,_.scheduler=E,(!(0,b.k)(g)||g<0)&&(_.delayTime=0),(!E||"function"!=typeof E.schedule)&&(_.scheduler=R.e),_}return(0,B.Z)(k,[{key:"_subscribe",value:function(_){return this.scheduler.schedule(k.dispatch,this.delayTime,{source:this.source,subscriber:_})}}],[{key:"create",value:function(_){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,E=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R.e;return new k(_,g,E)}},{key:"dispatch",value:function(_){return this.add(_.source.subscribe(_.subscriber))}}]),k}(T.y)},81370:function(ue,q,f){"use strict";f.d(q,{aj:function(){return k},Ms:function(){return M}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(91299),R=f(78985),b=f(7283),v=f(61454),I=f(80503),D={};function k(){for(var g=arguments.length,E=new Array(g),N=0;N1&&void 0!==arguments[1]?arguments[1]:null;return new O({method:"GET",url:se,headers:ce})}function g(se,ce,le){return new O({method:"POST",url:se,body:ce,headers:le})}function E(se,ce){return new O({method:"DELETE",url:se,headers:ce})}function N(se,ce,le){return new O({method:"PUT",url:se,body:ce,headers:le})}function A(se,ce,le){return new O({method:"PATCH",url:se,body:ce,headers:le})}var w=(0,f(85639).U)(function(se,ce){return se.response});function S(se,ce){return w(new O({method:"GET",url:se,responseType:"json",headers:ce}))}var O=function(){var se=function(ce){(0,T.Z)(oe,ce);var le=(0,R.Z)(oe);function oe(Ae){var be;(0,V.Z)(this,oe),be=le.call(this);var it={async:!0,createXHR:function(){return this.crossDomain?function(){if(b.J.XMLHttpRequest)return new b.J.XMLHttpRequest;if(b.J.XDomainRequest)return new b.J.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(b.J.XMLHttpRequest)return new b.J.XMLHttpRequest;var se;try{for(var ce=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],le=0;le<3;le++)try{if(new b.J.ActiveXObject(se=ce[le]))break}catch(oe){}return new b.J.ActiveXObject(se)}catch(oe){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof Ae)it.url=Ae;else for(var qe in Ae)Ae.hasOwnProperty(qe)&&(it[qe]=Ae[qe]);return be.request=it,be}return(0,Z.Z)(oe,[{key:"_subscribe",value:function(be){return new F(be,this.request)}}]),oe}(v.y);return se.create=function(){var ce=function(oe){return new se(oe)};return ce.get=_,ce.post=g,ce.delete=E,ce.put=N,ce.patch=A,ce.getJSON=S,ce}(),se}(),F=function(se){(0,T.Z)(le,se);var ce=(0,R.Z)(le);function le(oe,Ae){var be;(0,V.Z)(this,le),(be=ce.call(this,oe)).request=Ae,be.done=!1;var it=Ae.headers=Ae.headers||{};return!Ae.crossDomain&&!be.getHeader(it,"X-Requested-With")&&(it["X-Requested-With"]="XMLHttpRequest"),!be.getHeader(it,"Content-Type")&&!(b.J.FormData&&Ae.body instanceof b.J.FormData)&&void 0!==Ae.body&&(it["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),Ae.body=be.serializeBody(Ae.body,be.getHeader(Ae.headers,"Content-Type")),be.send(),be}return(0,Z.Z)(le,[{key:"next",value:function(Ae){this.done=!0;var _t,be=this.xhr,it=this.request,qe=this.destination;try{_t=new z(Ae,be,it)}catch(yt){return qe.error(yt)}qe.next(_t)}},{key:"send",value:function(){var Ae=this.request,be=this.request,it=be.user,qe=be.method,_t=be.url,yt=be.async,Ft=be.password,xe=be.headers,De=be.body;try{var je=this.xhr=Ae.createXHR();this.setupEvents(je,Ae),it?je.open(qe,_t,yt,it,Ft):je.open(qe,_t,yt),yt&&(je.timeout=Ae.timeout,je.responseType=Ae.responseType),"withCredentials"in je&&(je.withCredentials=!!Ae.withCredentials),this.setHeaders(je,xe),De?je.send(De):je.send()}catch(dt){this.error(dt)}}},{key:"serializeBody",value:function(Ae,be){if(!Ae||"string"==typeof Ae)return Ae;if(b.J.FormData&&Ae instanceof b.J.FormData)return Ae;if(be){var it=be.indexOf(";");-1!==it&&(be=be.substring(0,it))}switch(be){case"application/x-www-form-urlencoded":return Object.keys(Ae).map(function(qe){return"".concat(encodeURIComponent(qe),"=").concat(encodeURIComponent(Ae[qe]))}).join("&");case"application/json":return JSON.stringify(Ae);default:return Ae}}},{key:"setHeaders",value:function(Ae,be){for(var it in be)be.hasOwnProperty(it)&&Ae.setRequestHeader(it,be[it])}},{key:"getHeader",value:function(Ae,be){for(var it in Ae)if(it.toLowerCase()===be.toLowerCase())return Ae[it]}},{key:"setupEvents",value:function(Ae,be){var _t,yt,it=be.progressSubscriber;function qe(De){var Bt,je=qe.subscriber,dt=qe.progressSubscriber,Qe=qe.request;dt&&dt.error(De);try{Bt=new ae(this,Qe)}catch(xt){Bt=xt}je.error(Bt)}(Ae.ontimeout=qe,qe.request=be,qe.subscriber=this,qe.progressSubscriber=it,Ae.upload&&"withCredentials"in Ae)&&(it&&(_t=function(je){_t.progressSubscriber.next(je)},b.J.XDomainRequest?Ae.onprogress=_t:Ae.upload.onprogress=_t,_t.progressSubscriber=it),Ae.onerror=yt=function(je){var vt,Qe=yt.progressSubscriber,Bt=yt.subscriber,xt=yt.request;Qe&&Qe.error(je);try{vt=new j("ajax error",this,xt)}catch(Qt){vt=Qt}Bt.error(vt)},yt.request=be,yt.subscriber=this,yt.progressSubscriber=it);function Ft(De){}function xe(De){var je=xe.subscriber,dt=xe.progressSubscriber,Qe=xe.request;if(4===this.readyState){var Bt=1223===this.status?204:this.status;if(0===Bt&&(Bt=("text"===this.responseType?this.response||this.responseText:this.response)?200:0),Bt<400)dt&&dt.complete(),je.next(De),je.complete();else{var vt;dt&&dt.error(De);try{vt=new j("ajax error "+Bt,this,Qe)}catch(Qt){vt=Qt}je.error(vt)}}}Ae.onreadystatechange=Ft,Ft.subscriber=this,Ft.progressSubscriber=it,Ft.request=be,Ae.onload=xe,xe.subscriber=this,xe.progressSubscriber=it,xe.request=be}},{key:"unsubscribe",value:function(){var be=this.xhr;!this.done&&be&&4!==be.readyState&&"function"==typeof be.abort&&be.abort(),(0,U.Z)((0,B.Z)(le.prototype),"unsubscribe",this).call(this)}}]),le}(I.L),z=function se(ce,le,oe){(0,V.Z)(this,se),this.originalEvent=ce,this.xhr=le,this.request=oe,this.status=le.status,this.responseType=le.responseType||oe.responseType,this.response=ee(this.responseType,le)},j=function(){function se(ce,le,oe){return Error.call(this),this.message=ce,this.name="AjaxError",this.xhr=le,this.request=oe,this.status=le.status,this.responseType=le.responseType||oe.responseType,this.response=ee(this.responseType,le),this}return se.prototype=Object.create(Error.prototype),se}();function ee(se,ce){switch(se){case"json":return function(se){return"response"in se?se.responseType?se.response:JSON.parse(se.response||se.responseText||"null"):JSON.parse(se.responseText||"null")}(ce);case"xml":return ce.responseXML;case"text":default:return"response"in ce?ce.response:ce.responseText}}var ae=function(se,ce){return j.call(this,"ajax timeout",se,ce),this.name="AjaxTimeoutError",this}},46095:function(ue,q,f){"use strict";f.d(q,{p:function(){return g}});var U=f(18967),B=f(14105),V=f(13920),Z=f(89200),T=f(10509),R=f(97154),b=f(68707),v=f(39874),I=f(89797),D=f(5051),k=f(82667),M={url:"",deserializer:function(N){return JSON.parse(N.data)},serializer:function(N){return JSON.stringify(N)}},g=function(E){(0,T.Z)(A,E);var N=(0,R.Z)(A);function A(w,S){var O;if((0,U.Z)(this,A),O=N.call(this),w instanceof I.y)O.destination=S,O.source=w;else{var F=O._config=Object.assign({},M);if(O._output=new b.xQ,"string"==typeof w)F.url=w;else for(var z in w)w.hasOwnProperty(z)&&(F[z]=w[z]);if(!F.WebSocketCtor&&WebSocket)F.WebSocketCtor=WebSocket;else if(!F.WebSocketCtor)throw new Error("no WebSocket constructor can be found");O.destination=new k.t}return O}return(0,B.Z)(A,[{key:"lift",value:function(S){var O=new A(this._config,this.destination);return O.operator=S,O.source=this,O}},{key:"_resetState",value:function(){this._socket=null,this.source||(this.destination=new k.t),this._output=new b.xQ}},{key:"multiplex",value:function(S,O,F){var z=this;return new I.y(function(K){try{z.next(S())}catch(J){K.error(J)}var j=z.subscribe(function(J){try{F(J)&&K.next(J)}catch(ee){K.error(ee)}},function(J){return K.error(J)},function(){return K.complete()});return function(){try{z.next(O())}catch(J){K.error(J)}j.unsubscribe()}})}},{key:"_connectSocket",value:function(){var S=this,O=this._config,F=O.WebSocketCtor,z=O.protocol,K=O.url,j=O.binaryType,J=this._output,ee=null;try{ee=z?new F(K,z):new F(K),this._socket=ee,j&&(this._socket.binaryType=j)}catch(ae){return void J.error(ae)}var $=new D.w(function(){S._socket=null,ee&&1===ee.readyState&&ee.close()});ee.onopen=function(ae){if(!S._socket)return ee.close(),void S._resetState();var ce=S._config.openObserver;ce&&ce.next(ae);var le=S.destination;S.destination=v.L.create(function(oe){if(1===ee.readyState)try{ee.send((0,S._config.serializer)(oe))}catch(be){S.destination.error(be)}},function(oe){var Ae=S._config.closingObserver;Ae&&Ae.next(void 0),oe&&oe.code?ee.close(oe.code,oe.reason):J.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),S._resetState()},function(){var oe=S._config.closingObserver;oe&&oe.next(void 0),ee.close(),S._resetState()}),le&&le instanceof k.t&&$.add(le.subscribe(S.destination))},ee.onerror=function(ae){S._resetState(),J.error(ae)},ee.onclose=function(ae){S._resetState();var se=S._config.closeObserver;se&&se.next(ae),ae.wasClean?J.complete():J.error(ae)},ee.onmessage=function(ae){try{J.next((0,S._config.deserializer)(ae))}catch(ce){J.error(ce)}}}},{key:"_subscribe",value:function(S){var O=this,F=this.source;return F?F.subscribe(S):(this._socket||this._connectSocket(),this._output.subscribe(S),S.add(function(){var z=O._socket;0===O._output.observers.length&&(z&&1===z.readyState&&z.close(),O._resetState())}),S)}},{key:"unsubscribe",value:function(){var S=this._socket;S&&1===S.readyState&&S.close(),this._resetState(),(0,V.Z)((0,Z.Z)(A.prototype),"unsubscribe",this).call(this)}}]),A}(b.ug)},30437:function(ue,q,f){"use strict";f.d(q,{h:function(){return B}});var U=f(51361),B=function(){return U.i6.create}()},99298:function(ue,q,f){"use strict";f.d(q,{j:function(){return B}});var U=f(46095);function B(V){return new U.p(V)}},93487:function(ue,q,f){"use strict";f.d(q,{E:function(){return B},c:function(){return V}});var U=f(89797),B=new U.y(function(T){return T.complete()});function V(T){return T?function(T){return new U.y(function(R){return T.schedule(function(){return R.complete()})})}(T):B}},91925:function(ue,q,f){"use strict";f.d(q,{D:function(){return b}});var U=f(62467),B=f(89797),V=f(78985),Z=f(85639),T=f(64902),R=f(61493);function b(){for(var I=arguments.length,D=new Array(I),k=0;k1?Array.prototype.slice.call(arguments):w)},N,g)})}function v(M,_,g,E,N){var A;if(function(M){return M&&"function"==typeof M.addEventListener&&"function"==typeof M.removeEventListener}(M)){var w=M;M.addEventListener(_,g,N),A=function(){return w.removeEventListener(_,g,N)}}else if(function(M){return M&&"function"==typeof M.on&&"function"==typeof M.off}(M)){var S=M;M.on(_,g),A=function(){return S.off(_,g)}}else if(function(M){return M&&"function"==typeof M.addListener&&"function"==typeof M.removeListener}(M)){var O=M;M.addListener(_,g),A=function(){return O.removeListener(_,g)}}else{if(!M||!M.length)throw new TypeError("Invalid event target");for(var F=0,z=M.length;F0&&void 0!==arguments[0]?arguments[0]:0,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B.P;return(!(0,V.k)(R)||R<0)&&(R=0),(!b||"function"!=typeof b.schedule)&&(b=B.P),new U.y(function(v){return v.add(b.schedule(T,R,{subscriber:v,counter:0,period:R})),v})}function T(R){var b=R.subscriber,v=R.counter,I=R.period;b.next(v),this.schedule({subscriber:b,counter:v+1,period:I},I)}},55371:function(ue,q,f){"use strict";f.d(q,{T:function(){return T}});var U=f(89797),B=f(91299),V=f(65890),Z=f(80503);function T(){for(var R=Number.POSITIVE_INFINITY,b=null,v=arguments.length,I=new Array(v),D=0;D1&&"number"==typeof I[I.length-1]&&(R=I.pop())):"number"==typeof k&&(R=I.pop()),null===b&&1===I.length&&I[0]instanceof U.y?I[0]:(0,V.J)(R)((0,Z.n)(I,b))}},43161:function(ue,q,f){"use strict";f.d(q,{of:function(){return Z}});var U=f(91299),B=f(80503),V=f(55835);function Z(){for(var T=arguments.length,R=new Array(T),b=0;b0&&void 0!==arguments[0]?arguments[0]:0,T=arguments.length>1?arguments[1]:void 0,R=arguments.length>2?arguments[2]:void 0;return new U.y(function(b){void 0===T&&(T=Z,Z=0);var v=0,I=Z;if(R)return R.schedule(V,0,{index:v,count:T,start:Z,subscriber:b});for(;;){if(v++>=T){b.complete();break}if(b.next(I++),b.closed)break}})}function V(Z){var T=Z.start,R=Z.index,v=Z.subscriber;R>=Z.count?v.complete():(v.next(T),!v.closed&&(Z.index=R+1,Z.start=T+1,this.schedule(Z)))}},11363:function(ue,q,f){"use strict";f.d(q,{_:function(){return B}});var U=f(89797);function B(Z,T){return new U.y(T?function(R){return T.schedule(V,0,{error:Z,subscriber:R})}:function(R){return R.error(Z)})}function V(Z){Z.subscriber.error(Z.error)}},5041:function(ue,q,f){"use strict";f.d(q,{H:function(){return T}});var U=f(89797),B=f(46813),V=f(11705),Z=f(91299);function T(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,v=arguments.length>1?arguments[1]:void 0,I=arguments.length>2?arguments[2]:void 0,D=-1;return(0,V.k)(v)?D=Number(v)<1?1:Number(v):(0,Z.K)(v)&&(I=v),(0,Z.K)(I)||(I=B.P),new U.y(function(k){var M=(0,V.k)(b)?b:+b-I.now();return I.schedule(R,M,{index:0,period:D,subscriber:k})})}function R(b){var v=b.index,I=b.period,D=b.subscriber;if(D.next(v),!D.closed){if(-1===I)return D.complete();b.index=v+1,this.schedule(b,I)}}},43008:function(ue,q,f){"use strict";f.d(q,{$R:function(){return D},mx:function(){return k}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(80503),R=f(78985),b=f(39874),v=f(81695),I=f(32124);function D(){for(var N=arguments.length,A=new Array(N),w=0;w2&&void 0!==arguments[2]||Object.create(null),(0,V.Z)(this,w),(F=A.call(this,S)).resultSelector=O,F.iterators=[],F.active=0,F.resultSelector="function"==typeof O?O:void 0,F}return(0,Z.Z)(w,[{key:"_next",value:function(O){var F=this.iterators;(0,R.k)(O)?F.push(new g(O)):F.push("function"==typeof O[v.hZ]?new _(O[v.hZ]()):new E(this.destination,this,O))}},{key:"_complete",value:function(){var O=this.iterators,F=O.length;if(this.unsubscribe(),0!==F){this.active=F;for(var z=0;zthis.index}},{key:"hasCompleted",value:function(){return this.array.length===this.index}}]),N}(),E=function(N){(0,U.Z)(w,N);var A=(0,B.Z)(w);function w(S,O,F){var z;return(0,V.Z)(this,w),(z=A.call(this,S)).parent=O,z.observable=F,z.stillUnsubscribed=!0,z.buffer=[],z.isComplete=!1,z}return(0,Z.Z)(w,[{key:v.hZ,value:function(){return this}},{key:"next",value:function(){var O=this.buffer;return 0===O.length&&this.isComplete?{value:null,done:!0}:{value:O.shift(),done:!1}}},{key:"hasValue",value:function(){return this.buffer.length>0}},{key:"hasCompleted",value:function(){return 0===this.buffer.length&&this.isComplete}},{key:"notifyComplete",value:function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}},{key:"notifyNext",value:function(O){this.buffer.push(O),this.parent.checkIterators()}},{key:"subscribe",value:function(){return(0,I.ft)(this.observable,new I.IY(this))}}]),w}(I.Ds)},67494:function(ue,q,f){"use strict";f.d(q,{U:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(32124);function R(I){return function(k){return k.lift(new b(I))}}var b=function(){function I(D){(0,V.Z)(this,I),this.durationSelector=D}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.durationSelector))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_){var g;return(0,V.Z)(this,k),(g=D.call(this,M)).durationSelector=_,g.hasValue=!1,g}return(0,Z.Z)(k,[{key:"_next",value:function(_){if(this.value=_,this.hasValue=!0,!this.throttled){var g;try{g=(0,this.durationSelector)(_)}catch(A){return this.destination.error(A)}var N=(0,T.ft)(g,new T.IY(this));!N||N.closed?this.clearThrottle():this.add(this.throttled=N)}}},{key:"clearThrottle",value:function(){var _=this.value,g=this.hasValue,E=this.throttled;E&&(this.remove(E),this.throttled=void 0,E.unsubscribe()),g&&(this.value=void 0,this.hasValue=!1,this.destination.next(_))}},{key:"notifyNext",value:function(){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),k}(T.Ds)},54562:function(ue,q,f){"use strict";f.d(q,{e:function(){return Z}});var U=f(46813),B=f(67494),V=f(5041);function Z(T){var R=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U.P;return(0,B.U)(function(){return(0,V.H)(T,R)})}},13426:function(ue,q,f){"use strict";f.d(q,{K:function(){return v}});var U=f(13920),B=f(89200),V=f(10509),Z=f(97154),T=f(18967),R=f(14105),b=f(32124);function v(k){return function(_){var g=new I(k),E=_.lift(g);return g.caught=E}}var I=function(){function k(M){(0,T.Z)(this,k),this.selector=M}return(0,R.Z)(k,[{key:"call",value:function(_,g){return g.subscribe(new D(_,this.selector,this.caught))}}]),k}(),D=function(k){(0,V.Z)(_,k);var M=(0,Z.Z)(_);function _(g,E,N){var A;return(0,T.Z)(this,_),(A=M.call(this,g)).selector=E,A.caught=N,A}return(0,R.Z)(_,[{key:"error",value:function(E){if(!this.isStopped){var N;try{N=this.selector(E,this.caught)}catch(S){return void(0,U.Z)((0,B.Z)(_.prototype),"error",this).call(this,S)}this._unsubscribeAndRecycle();var A=new b.IY(this);this.add(A);var w=(0,b.ft)(N,A);w!==A&&this.add(w)}}}]),_}(b.Ds)},95416:function(ue,q,f){"use strict";f.d(q,{u:function(){return B}});var U=f(65890);function B(){return(0,U.J)(1)}},38575:function(ue,q,f){"use strict";f.d(q,{b:function(){return B}});var U=f(35135);function B(V,Z){return(0,U.zg)(V,Z,1)}},75398:function(ue,q,f){"use strict";f.d(q,{Q:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(I){return function(D){return D.lift(new b(I,D))}}var b=function(){function I(D,k){(0,V.Z)(this,I),this.predicate=D,this.source=k}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.predicate,this.source))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_,g){var E;return(0,V.Z)(this,k),(E=D.call(this,M)).predicate=_,E.source=g,E.count=0,E.index=0,E}return(0,Z.Z)(k,[{key:"_next",value:function(_){this.predicate?this._tryPredicate(_):this.count++}},{key:"_tryPredicate",value:function(_){var g;try{g=this.predicate(_,this.index++,this.source)}catch(E){return void this.destination.error(E)}g&&this.count++}},{key:"_complete",value:function(){this.destination.next(this.count),this.destination.complete()}}]),k}(T.L)},57263:function(ue,q,f){"use strict";f.d(q,{b:function(){return b}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874),R=f(46813);function b(k){var M=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R.P;return function(_){return _.lift(new v(k,M))}}var v=function(){function k(M,_){(0,V.Z)(this,k),this.dueTime=M,this.scheduler=_}return(0,Z.Z)(k,[{key:"call",value:function(_,g){return g.subscribe(new I(_,this.dueTime,this.scheduler))}}]),k}(),I=function(k){(0,U.Z)(_,k);var M=(0,B.Z)(_);function _(g,E,N){var A;return(0,V.Z)(this,_),(A=M.call(this,g)).dueTime=E,A.scheduler=N,A.debouncedSubscription=null,A.lastValue=null,A.hasValue=!1,A}return(0,Z.Z)(_,[{key:"_next",value:function(E){this.clearDebounce(),this.lastValue=E,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(D,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var E=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(E)}}},{key:"clearDebounce",value:function(){var E=this.debouncedSubscription;null!==E&&(this.remove(E),E.unsubscribe(),this.debouncedSubscription=null)}}]),_}(T.L);function D(k){k.debouncedNext()}},34235:function(ue,q,f){"use strict";f.d(q,{d:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(D){return D.lift(new b(I))}}var b=function(){function I(D){(0,V.Z)(this,I),this.defaultValue=D}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.defaultValue))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_){var g;return(0,V.Z)(this,k),(g=D.call(this,M)).defaultValue=_,g.isEmpty=!0,g}return(0,Z.Z)(k,[{key:"_next",value:function(_){this.isEmpty=!1,this.destination.next(_)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),k}(T.L)},86004:function(ue,q,f){"use strict";f.d(q,{g:function(){return I}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(46813),R=f(88972),b=f(39874),v=f(80286);function I(_){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.P,E=(0,R.J)(_),N=E?+_-g.now():Math.abs(_);return function(A){return A.lift(new D(N,g))}}var D=function(){function _(g,E){(0,V.Z)(this,_),this.delay=g,this.scheduler=E}return(0,Z.Z)(_,[{key:"call",value:function(E,N){return N.subscribe(new k(E,this.delay,this.scheduler))}}]),_}(),k=function(_){(0,U.Z)(E,_);var g=(0,B.Z)(E);function E(N,A,w){var S;return(0,V.Z)(this,E),(S=g.call(this,N)).delay=A,S.scheduler=w,S.queue=[],S.active=!1,S.errored=!1,S}return(0,Z.Z)(E,[{key:"_schedule",value:function(A){this.active=!0,this.destination.add(A.schedule(E.dispatch,this.delay,{source:this,destination:this.destination,scheduler:A}))}},{key:"scheduleNotification",value:function(A){if(!0!==this.errored){var w=this.scheduler,S=new M(w.now()+this.delay,A);this.queue.push(S),!1===this.active&&this._schedule(w)}}},{key:"_next",value:function(A){this.scheduleNotification(v.P.createNext(A))}},{key:"_error",value:function(A){this.errored=!0,this.queue=[],this.destination.error(A),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(v.P.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(A){for(var w=A.source,S=w.queue,O=A.scheduler,F=A.destination;S.length>0&&S[0].time-O.now()<=0;)S.shift().notification.observe(F);if(S.length>0){var z=Math.max(0,S[0].time-O.now());this.schedule(A,z)}else this.unsubscribe(),w.active=!1}}]),E}(b.L),M=function _(g,E){(0,V.Z)(this,_),this.time=g,this.notification=E}},76161:function(ue,q,f){"use strict";f.d(q,{x:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(I,D){return function(k){return k.lift(new b(I,D))}}var b=function(){function I(D,k){(0,V.Z)(this,I),this.compare=D,this.keySelector=k}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.compare,this.keySelector))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_,g){var E;return(0,V.Z)(this,k),(E=D.call(this,M)).keySelector=g,E.hasKey=!1,"function"==typeof _&&(E.compare=_),E}return(0,Z.Z)(k,[{key:"compare",value:function(_,g){return _===g}},{key:"_next",value:function(_){var g;try{var E=this.keySelector;g=E?E(_):_}catch(w){return this.destination.error(w)}var N=!1;if(this.hasKey)try{N=(0,this.compare)(this.key,g)}catch(w){return this.destination.error(w)}else this.hasKey=!0;N||(this.key=g,this.destination.next(_))}}]),k}(T.L)},58780:function(ue,q,f){"use strict";f.d(q,{h:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(I,D){return function(M){return M.lift(new b(I,D))}}var b=function(){function I(D,k){(0,V.Z)(this,I),this.predicate=D,this.thisArg=k}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.predicate,this.thisArg))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_,g){var E;return(0,V.Z)(this,k),(E=D.call(this,M)).predicate=_,E.thisArg=g,E.count=0,E}return(0,Z.Z)(k,[{key:"_next",value:function(_){var g;try{g=this.predicate.call(this.thisArg,_,this.count++)}catch(E){return void this.destination.error(E)}g&&this.destination.next(_)}}]),k}(T.L)},59803:function(ue,q,f){"use strict";f.d(q,{x:function(){return b}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874),R=f(5051);function b(D){return function(k){return k.lift(new v(D))}}var v=function(){function D(k){(0,V.Z)(this,D),this.callback=k}return(0,Z.Z)(D,[{key:"call",value:function(M,_){return _.subscribe(new I(M,this.callback))}}]),D}(),I=function(D){(0,U.Z)(M,D);var k=(0,B.Z)(M);function M(_,g){var E;return(0,V.Z)(this,M),(E=k.call(this,_)).add(new R.w(g)),E}return M}(T.L)},64233:function(ue,q,f){"use strict";f.d(q,{P:function(){return b}});var U=f(64646),B=f(58780),V=f(48359),Z=f(34235),T=f(88942),R=f(57070);function b(v,I){var D=arguments.length>=2;return function(k){return k.pipe(v?(0,B.h)(function(M,_){return v(M,_,k)}):R.y,(0,V.q)(1),D?(0,Z.d)(I):(0,T.T)(function(){return new U.K}))}}},86072:function(ue,q,f){"use strict";f.d(q,{v:function(){return k},T:function(){return E}});var U=f(13920),B=f(89200),V=f(10509),Z=f(97154),T=f(18967),R=f(14105),b=f(39874),v=f(5051),I=f(89797),D=f(68707);function k(A,w,S,O){return function(F){return F.lift(new M(A,w,S,O))}}var M=function(){function A(w,S,O,F){(0,T.Z)(this,A),this.keySelector=w,this.elementSelector=S,this.durationSelector=O,this.subjectSelector=F}return(0,R.Z)(A,[{key:"call",value:function(S,O){return O.subscribe(new _(S,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))}}]),A}(),_=function(A){(0,V.Z)(S,A);var w=(0,Z.Z)(S);function S(O,F,z,K,j){var J;return(0,T.Z)(this,S),(J=w.call(this,O)).keySelector=F,J.elementSelector=z,J.durationSelector=K,J.subjectSelector=j,J.groups=null,J.attemptedToUnsubscribe=!1,J.count=0,J}return(0,R.Z)(S,[{key:"_next",value:function(F){var z;try{z=this.keySelector(F)}catch(K){return void this.error(K)}this._group(F,z)}},{key:"_group",value:function(F,z){var K=this.groups;K||(K=this.groups=new Map);var J,j=K.get(z);if(this.elementSelector)try{J=this.elementSelector(F)}catch(ae){this.error(ae)}else J=F;if(!j){j=this.subjectSelector?this.subjectSelector():new D.xQ,K.set(z,j);var ee=new E(z,j,this);if(this.destination.next(ee),this.durationSelector){var $;try{$=this.durationSelector(new E(z,j))}catch(ae){return void this.error(ae)}this.add($.subscribe(new g(z,j,this)))}}j.closed||j.next(J)}},{key:"_error",value:function(F){var z=this.groups;z&&(z.forEach(function(K,j){K.error(F)}),z.clear()),this.destination.error(F)}},{key:"_complete",value:function(){var F=this.groups;F&&(F.forEach(function(z,K){z.complete()}),F.clear()),this.destination.complete()}},{key:"removeGroup",value:function(F){this.groups.delete(F)}},{key:"unsubscribe",value:function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&(0,U.Z)((0,B.Z)(S.prototype),"unsubscribe",this).call(this))}}]),S}(b.L),g=function(A){(0,V.Z)(S,A);var w=(0,Z.Z)(S);function S(O,F,z){var K;return(0,T.Z)(this,S),(K=w.call(this,F)).key=O,K.group=F,K.parent=z,K}return(0,R.Z)(S,[{key:"_next",value:function(F){this.complete()}},{key:"_unsubscribe",value:function(){var F=this.parent,z=this.key;this.key=this.parent=null,F&&F.removeGroup(z)}}]),S}(b.L),E=function(A){(0,V.Z)(S,A);var w=(0,Z.Z)(S);function S(O,F,z){var K;return(0,T.Z)(this,S),(K=w.call(this)).key=O,K.groupSubject=F,K.refCountSubscription=z,K}return(0,R.Z)(S,[{key:"_subscribe",value:function(F){var z=new v.w,K=this.refCountSubscription,j=this.groupSubject;return K&&!K.closed&&z.add(new N(K)),z.add(j.subscribe(F)),z}}]),S}(I.y),N=function(A){(0,V.Z)(S,A);var w=(0,Z.Z)(S);function S(O){var F;return(0,T.Z)(this,S),(F=w.call(this)).parent=O,O.count++,F}return(0,R.Z)(S,[{key:"unsubscribe",value:function(){var F=this.parent;!F.closed&&!this.closed&&((0,U.Z)((0,B.Z)(S.prototype),"unsubscribe",this).call(this),F.count-=1,0===F.count&&F.attemptedToUnsubscribe&&F.unsubscribe())}}]),S}(v.w)},99583:function(ue,q,f){"use strict";f.d(q,{Z:function(){return b}});var U=f(64646),B=f(58780),V=f(64397),Z=f(88942),T=f(34235),R=f(57070);function b(v,I){var D=arguments.length>=2;return function(k){return k.pipe(v?(0,B.h)(function(M,_){return v(M,_,k)}):R.y,(0,V.h)(1),D?(0,T.d)(I):(0,Z.T)(function(){return new U.K}))}}},85639:function(ue,q,f){"use strict";f.d(q,{U:function(){return b}});var U=f(88009),B=f(10509),V=f(97154),Z=f(18967),T=f(14105),R=f(39874);function b(D,k){return function(_){if("function"!=typeof D)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return _.lift(new v(D,k))}}var v=function(){function D(k,M){(0,Z.Z)(this,D),this.project=k,this.thisArg=M}return(0,T.Z)(D,[{key:"call",value:function(M,_){return _.subscribe(new I(M,this.project,this.thisArg))}}]),D}(),I=function(D){(0,B.Z)(M,D);var k=(0,V.Z)(M);function M(_,g,E){var N;return(0,Z.Z)(this,M),(N=k.call(this,_)).project=g,N.count=0,N.thisArg=E||(0,U.Z)(N),N}return(0,T.Z)(M,[{key:"_next",value:function(g){var E;try{E=this.project.call(this.thisArg,g,this.count++)}catch(N){return void this.destination.error(N)}this.destination.next(E)}}]),M}(R.L)},12698:function(ue,q,f){"use strict";f.d(q,{h:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(I){return function(D){return D.lift(new b(I))}}var b=function(){function I(D){(0,V.Z)(this,I),this.value=D}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.value))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_){var g;return(0,V.Z)(this,k),(g=D.call(this,M)).value=_,g}return(0,Z.Z)(k,[{key:"_next",value:function(_){this.destination.next(this.value)}}]),k}(T.L)},65890:function(ue,q,f){"use strict";f.d(q,{J:function(){return V}});var U=f(35135),B=f(57070);function V(){var Z=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return(0,U.zg)(B.y,Z)}},35135:function(ue,q,f){"use strict";f.d(q,{zg:function(){return v},VS:function(){return k}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(85639),R=f(61493),b=f(32124);function v(M,_){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof _?function(E){return E.pipe(v(function(N,A){return(0,R.D)(M(N,A)).pipe((0,T.U)(function(w,S){return _(N,w,A,S)}))},g))}:("number"==typeof _&&(g=_),function(E){return E.lift(new I(M,g))})}var I=function(){function M(_){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;(0,V.Z)(this,M),this.project=_,this.concurrent=g}return(0,Z.Z)(M,[{key:"call",value:function(g,E){return E.subscribe(new D(g,this.project,this.concurrent))}}]),M}(),D=function(M){(0,U.Z)(g,M);var _=(0,B.Z)(g);function g(E,N){var A,w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return(0,V.Z)(this,g),(A=_.call(this,E)).project=N,A.concurrent=w,A.hasCompleted=!1,A.buffer=[],A.active=0,A.index=0,A}return(0,Z.Z)(g,[{key:"_next",value:function(N){this.active0?this._next(N.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),g}(b.Ds),k=v},4981:function(ue,q,f){"use strict";f.d(q,{O:function(){return Z}});var U=f(18967),B=f(14105),V=f(39887);function Z(R,b){return function(I){var D;if(D="function"==typeof R?R:function(){return R},"function"==typeof b)return I.lift(new T(D,b));var k=Object.create(I,V.N);return k.source=I,k.subjectFactory=D,k}}var T=function(){function R(b,v){(0,U.Z)(this,R),this.subjectFactory=b,this.selector=v}return(0,B.Z)(R,[{key:"call",value:function(v,I){var D=this.selector,k=this.subjectFactory(),M=D(k).subscribe(v);return M.add(I.subscribe(k)),M}}]),R}()},25110:function(ue,q,f){"use strict";f.d(q,{QV:function(){return b},ht:function(){return I}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874),R=f(80286);function b(k){var M=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(g){return g.lift(new v(k,M))}}var v=function(){function k(M){var _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,V.Z)(this,k),this.scheduler=M,this.delay=_}return(0,Z.Z)(k,[{key:"call",value:function(_,g){return g.subscribe(new I(_,this.scheduler,this.delay))}}]),k}(),I=function(k){(0,U.Z)(_,k);var M=(0,B.Z)(_);function _(g,E){var N,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,V.Z)(this,_),(N=M.call(this,g)).scheduler=E,N.delay=A,N}return(0,Z.Z)(_,[{key:"scheduleMessage",value:function(E){this.destination.add(this.scheduler.schedule(_.dispatch,this.delay,new D(E,this.destination)))}},{key:"_next",value:function(E){this.scheduleMessage(R.P.createNext(E))}},{key:"_error",value:function(E){this.scheduleMessage(R.P.createError(E)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(R.P.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(E){E.notification.observe(E.destination),this.unsubscribe()}}]),_}(T.L),D=function k(M,_){(0,V.Z)(this,k),this.notification=M,this.destination=_}},4363:function(ue,q,f){"use strict";f.d(q,{G:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(){return function(I){return I.lift(new b)}}var b=function(){function I(){(0,V.Z)(this,I)}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M){var _;return(0,V.Z)(this,k),(_=D.call(this,M)).hasPrev=!1,_}return(0,Z.Z)(k,[{key:"_next",value:function(_){var g;this.hasPrev?g=[this.prev,_]:this.hasPrev=!0,this.prev=_,g&&this.destination.next(g)}}]),k}(T.L)},26575:function(ue,q,f){"use strict";f.d(q,{x:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(){return function(D){return D.lift(new b(D))}}var b=function(){function I(D){(0,V.Z)(this,I),this.connectable=D}return(0,Z.Z)(I,[{key:"call",value:function(k,M){var _=this.connectable;_._refCount++;var g=new v(k,_),E=M.subscribe(g);return g.closed||(g.connection=_.connect()),E}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_){var g;return(0,V.Z)(this,k),(g=D.call(this,M)).connectable=_,g}return(0,Z.Z)(k,[{key:"_unsubscribe",value:function(){var _=this.connectable;if(_){this.connectable=null;var g=_._refCount;if(g<=0)this.connection=null;else if(_._refCount=g-1,g>1)this.connection=null;else{var E=this.connection,N=_._connection;this.connection=null,N&&(!E||N===E)&&N.unsubscribe()}}else this.connection=null}}]),k}(T.L)},31927:function(ue,q,f){"use strict";f.d(q,{R:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(I,D){var k=!1;return arguments.length>=2&&(k=!0),function(_){return _.lift(new b(I,D,k))}}var b=function(){function I(D,k){var M=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,V.Z)(this,I),this.accumulator=D,this.seed=k,this.hasSeed=M}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.accumulator,this.seed,this.hasSeed))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_,g,E){var N;return(0,V.Z)(this,k),(N=D.call(this,M)).accumulator=_,N._seed=g,N.hasSeed=E,N.index=0,N}return(0,Z.Z)(k,[{key:"seed",get:function(){return this._seed},set:function(_){this.hasSeed=!0,this._seed=_}},{key:"_next",value:function(_){if(this.hasSeed)return this._tryNext(_);this.seed=_,this.destination.next(_)}},{key:"_tryNext",value:function(_){var E,g=this.index++;try{E=this.accumulator(this.seed,_,g)}catch(N){this.destination.error(N)}this.seed=E,this.destination.next(E)}}]),k}(T.L)},16338:function(ue,q,f){"use strict";f.d(q,{B:function(){return T}});var U=f(4981),B=f(26575),V=f(68707);function Z(){return new V.xQ}function T(){return function(R){return(0,B.x)()((0,U.O)(Z)(R))}}},61106:function(ue,q,f){"use strict";f.d(q,{d:function(){return B}});var U=f(82667);function B(Z,T,R){var b;return b=Z&&"object"==typeof Z?Z:{bufferSize:Z,windowTime:T,refCount:!1,scheduler:R},function(v){return v.lift(function(Z){var k,_,T=Z.bufferSize,R=void 0===T?Number.POSITIVE_INFINITY:T,b=Z.windowTime,v=void 0===b?Number.POSITIVE_INFINITY:b,I=Z.refCount,D=Z.scheduler,M=0,g=!1,E=!1;return function(A){var w;M++,!k||g?(g=!1,k=new U.t(R,v,D),w=k.subscribe(this),_=A.subscribe({next:function(O){k.next(O)},error:function(O){g=!0,k.error(O)},complete:function(){E=!0,_=void 0,k.complete()}}),E&&(_=void 0)):w=k.subscribe(this),this.add(function(){M--,w.unsubscribe(),w=void 0,_&&!E&&I&&0===M&&(_.unsubscribe(),_=void 0,k=void 0)})}}(b))}}},18756:function(ue,q,f){"use strict";f.d(q,{T:function(){return R}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(39874);function R(I){return function(D){return D.lift(new b(I))}}var b=function(){function I(D){(0,V.Z)(this,I),this.total=D}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.total))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_){var g;return(0,V.Z)(this,k),(g=D.call(this,M)).total=_,g.count=0,g}return(0,Z.Z)(k,[{key:"_next",value:function(_){++this.count>this.total&&this.destination.next(_)}}]),k}(T.L)},57682:function(ue,q,f){"use strict";f.d(q,{O:function(){return V}});var U=f(60131),B=f(91299);function V(){for(var Z=arguments.length,T=new Array(Z),R=0;R0)for(var A=this.count>=this.total?this.total:this.count,w=this.ring,S=0;S1&&void 0!==arguments[1]&&arguments[1];return function(k){return k.lift(new b(I,D))}}var b=function(){function I(D,k){(0,V.Z)(this,I),this.predicate=D,this.inclusive=k}return(0,Z.Z)(I,[{key:"call",value:function(k,M){return M.subscribe(new v(k,this.predicate,this.inclusive))}}]),I}(),v=function(I){(0,U.Z)(k,I);var D=(0,B.Z)(k);function k(M,_,g){var E;return(0,V.Z)(this,k),(E=D.call(this,M)).predicate=_,E.inclusive=g,E.index=0,E}return(0,Z.Z)(k,[{key:"_next",value:function(_){var E,g=this.destination;try{E=this.predicate(_,this.index++)}catch(N){return void g.error(N)}this.nextOrComplete(_,E)}},{key:"nextOrComplete",value:function(_,g){var E=this.destination;Boolean(g)?E.next(_):(this.inclusive&&E.next(_),E.complete())}}]),k}(T.L)},59371:function(ue,q,f){"use strict";f.d(q,{b:function(){return I}});var U=f(88009),B=f(10509),V=f(97154),Z=f(18967),T=f(14105),R=f(39874),b=f(66029),v=f(20684);function I(M,_,g){return function(N){return N.lift(new D(M,_,g))}}var D=function(){function M(_,g,E){(0,Z.Z)(this,M),this.nextOrObserver=_,this.error=g,this.complete=E}return(0,T.Z)(M,[{key:"call",value:function(g,E){return E.subscribe(new k(g,this.nextOrObserver,this.error,this.complete))}}]),M}(),k=function(M){(0,B.Z)(g,M);var _=(0,V.Z)(g);function g(E,N,A,w){var S;return(0,Z.Z)(this,g),(S=_.call(this,E))._tapNext=b.Z,S._tapError=b.Z,S._tapComplete=b.Z,S._tapError=A||b.Z,S._tapComplete=w||b.Z,(0,v.m)(N)?(S._context=(0,U.Z)(S),S._tapNext=N):N&&(S._context=N,S._tapNext=N.next||b.Z,S._tapError=N.error||b.Z,S._tapComplete=N.complete||b.Z),S}return(0,T.Z)(g,[{key:"_next",value:function(N){try{this._tapNext.call(this._context,N)}catch(A){return void this.destination.error(A)}this.destination.next(N)}},{key:"_error",value:function(N){try{this._tapError.call(this._context,N)}catch(A){return void this.destination.error(A)}this.destination.error(N)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(N){return void this.destination.error(N)}return this.destination.complete()}}]),g}(R.L)},243:function(ue,q,f){"use strict";f.d(q,{d:function(){return R},P:function(){return b}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(32124),R={leading:!0,trailing:!1};function b(D){var k=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;return function(M){return M.lift(new v(D,!!k.leading,!!k.trailing))}}var v=function(){function D(k,M,_){(0,V.Z)(this,D),this.durationSelector=k,this.leading=M,this.trailing=_}return(0,Z.Z)(D,[{key:"call",value:function(M,_){return _.subscribe(new I(M,this.durationSelector,this.leading,this.trailing))}}]),D}(),I=function(D){(0,U.Z)(M,D);var k=(0,B.Z)(M);function M(_,g,E,N){var A;return(0,V.Z)(this,M),(A=k.call(this,_)).destination=_,A.durationSelector=g,A._leading=E,A._trailing=N,A._hasValue=!1,A}return(0,Z.Z)(M,[{key:"_next",value:function(g){this._hasValue=!0,this._sendValue=g,this._throttled||(this._leading?this.send():this.throttle(g))}},{key:"send",value:function(){var E=this._sendValue;this._hasValue&&(this.destination.next(E),this.throttle(E)),this._hasValue=!1,this._sendValue=void 0}},{key:"throttle",value:function(g){var E=this.tryDurationSelector(g);E&&this.add(this._throttled=(0,T.ft)(E,new T.IY(this)))}},{key:"tryDurationSelector",value:function(g){try{return this.durationSelector(g)}catch(E){return this.destination.error(E),null}}},{key:"throttlingDone",value:function(){var g=this._throttled,E=this._trailing;g&&g.unsubscribe(),this._throttled=void 0,E&&this.send()}},{key:"notifyNext",value:function(){this.throttlingDone()}},{key:"notifyComplete",value:function(){this.throttlingDone()}}]),M}(T.Ds)},88942:function(ue,q,f){"use strict";f.d(q,{T:function(){return b}});var U=f(10509),B=f(97154),V=f(18967),Z=f(14105),T=f(64646),R=f(39874);function b(){var k=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;return function(M){return M.lift(new v(k))}}var v=function(){function k(M){(0,V.Z)(this,k),this.errorFactory=M}return(0,Z.Z)(k,[{key:"call",value:function(_,g){return g.subscribe(new I(_,this.errorFactory))}}]),k}(),I=function(k){(0,U.Z)(_,k);var M=(0,B.Z)(_);function _(g,E){var N;return(0,V.Z)(this,_),(N=M.call(this,g)).errorFactory=E,N.hasValue=!1,N}return(0,Z.Z)(_,[{key:"_next",value:function(E){this.hasValue=!0,this.destination.next(E)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var E;try{E=this.errorFactory()}catch(N){E=N}this.destination.error(E)}}]),_}(R.L);function D(){return new T.K}},73445:function(ue,q,f){"use strict";f.d(q,{J:function(){return R},R:function(){return b}});var U=f(18967),B=f(46813),V=f(31927),Z=f(4499),T=f(85639);function R(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.P;return function(I){return(0,Z.P)(function(){return I.pipe((0,V.R)(function(D,k){var M=D.current;return{value:k,current:v.now(),last:M}},{current:v.now(),value:void 0,last:void 0}),(0,T.U)(function(D){return new b(D.value,D.current-D.last)}))})}}var b=function v(I,D){(0,U.Z)(this,v),this.value=I,this.interval=D}},63706:function(ue,q,f){"use strict";f.d(q,{A:function(){return Z},E:function(){return T}});var U=f(18967),B=f(46813),V=f(85639);function Z(){var R=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.P;return(0,V.U)(function(b){return new T(b,R.now())})}var T=function R(b,v){(0,U.Z)(this,R),this.value=b,this.timestamp=v}},55835:function(ue,q,f){"use strict";f.d(q,{r:function(){return V}});var U=f(89797),B=f(5051);function V(Z,T){return new U.y(function(R){var b=new B.w,v=0;return b.add(T.schedule(function(){v!==Z.length?(R.next(Z[v++]),R.closed||b.add(this.schedule())):R.complete()})),b})}},60612:function(ue,q,f){"use strict";f.d(q,{Q:function(){return Z}});var U=f(89797),B=f(5051),V=f(81695);function Z(T,R){if(!T)throw new Error("Iterable cannot be null");return new U.y(function(b){var I,v=new B.w;return v.add(function(){I&&"function"==typeof I.return&&I.return()}),v.add(R.schedule(function(){I=T[V.hZ](),v.add(R.schedule(function(){if(!b.closed){var D,k;try{var M=I.next();D=M.value,k=M.done}catch(_){return void b.error(_)}k?b.complete():(b.next(D),this.schedule())}}))})),v})}},10498:function(ue,q,f){"use strict";f.d(q,{c:function(){return V}});var U=f(89797),B=f(5051);function V(Z,T){return new U.y(function(R){var b=new B.w;return b.add(T.schedule(function(){return Z.then(function(v){b.add(T.schedule(function(){R.next(v),b.add(T.schedule(function(){return R.complete()}))}))},function(v){b.add(T.schedule(function(){return R.error(v)}))})})),b})}},77493:function(ue,q,f){"use strict";f.d(q,{x:function(){return M}});var U=f(89797),B=f(5051),V=f(57694),T=f(10498),R=f(55835),b=f(60612),v=f(19104),I=f(36514),D=f(30621),k=f(2762);function M(_,g){if(null!=_){if((0,v.c)(_))return function(_,g){return new U.y(function(E){var N=new B.w;return N.add(g.schedule(function(){var A=_[V.L]();N.add(A.subscribe({next:function(S){N.add(g.schedule(function(){return E.next(S)}))},error:function(S){N.add(g.schedule(function(){return E.error(S)}))},complete:function(){N.add(g.schedule(function(){return E.complete()}))}}))})),N})}(_,g);if((0,I.t)(_))return(0,T.c)(_,g);if((0,D.z)(_))return(0,R.r)(_,g);if((0,k.T)(_)||"string"==typeof _)return(0,b.Q)(_,g)}throw new TypeError((null!==_&&typeof _||_)+" is not observable")}},4065:function(ue,q,f){"use strict";f.d(q,{o:function(){return b}});var U=f(18967),B=f(14105),V=f(10509),Z=f(97154),b=function(v){(0,V.Z)(D,v);var I=(0,Z.Z)(D);function D(k,M){var _;return(0,U.Z)(this,D),(_=I.call(this,k,M)).scheduler=k,_.work=M,_.pending=!1,_}return(0,B.Z)(D,[{key:"schedule",value:function(M){var _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=M;var g=this.id,E=this.scheduler;return null!=g&&(this.id=this.recycleAsyncId(E,g,_)),this.pending=!0,this.delay=_,this.id=this.id||this.requestAsyncId(E,this.id,_),this}},{key:"requestAsyncId",value:function(M,_){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(M.flush.bind(M,this),g)}},{key:"recycleAsyncId",value:function(M,_){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==g&&this.delay===g&&!1===this.pending)return _;clearInterval(_)}},{key:"execute",value:function(M,_){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var g=this._execute(M,_);if(g)return g;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(M,_){var g=!1,E=void 0;try{this.work(M)}catch(N){g=!0,E=!!N&&N||new Error(N)}if(g)return this.unsubscribe(),E}},{key:"_unsubscribe",value:function(){var M=this.id,_=this.scheduler,g=_.actions,E=g.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==E&&g.splice(E,1),null!=M&&(this.id=this.recycleAsyncId(_,M,null)),this.delay=null}}]),D}(function(v){(0,V.Z)(D,v);var I=(0,Z.Z)(D);function D(k,M){return(0,U.Z)(this,D),I.call(this)}return(0,B.Z)(D,[{key:"schedule",value:function(M){return this}}]),D}(f(5051).w))},81572:function(ue,q,f){"use strict";f.d(q,{v:function(){return I}});var U=f(18967),B=f(14105),V=f(88009),Z=f(13920),T=f(89200),R=f(10509),b=f(97154),v=f(67801),I=function(D){(0,R.Z)(M,D);var k=(0,b.Z)(M);function M(_){var g,E=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.b.now;return(0,U.Z)(this,M),(g=k.call(this,_,function(){return M.delegate&&M.delegate!==(0,V.Z)(g)?M.delegate.now():E()})).actions=[],g.active=!1,g.scheduled=void 0,g}return(0,B.Z)(M,[{key:"schedule",value:function(g){var E=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,N=arguments.length>2?arguments[2]:void 0;return M.delegate&&M.delegate!==this?M.delegate.schedule(g,E,N):(0,Z.Z)((0,T.Z)(M.prototype),"schedule",this).call(this,g,E,N)}},{key:"flush",value:function(g){var E=this.actions;if(this.active)E.push(g);else{var N;this.active=!0;do{if(N=g.execute(g.state,g.delay))break}while(g=E.shift());if(this.active=!1,N){for(;g=E.shift();)g.unsubscribe();throw N}}}}]),M}(v.b)},2296:function(ue,q,f){"use strict";f.d(q,{y:function(){return I},h:function(){return D}});var U=f(13920),B=f(89200),V=f(18967),Z=f(14105),T=f(10509),R=f(97154),b=f(4065),v=f(81572),I=function(){var k=function(M){(0,T.Z)(g,M);var _=(0,R.Z)(g);function g(){var E,N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;return(0,V.Z)(this,g),(E=_.call(this,N,function(){return E.frame})).maxFrames=A,E.frame=0,E.index=-1,E}return(0,Z.Z)(g,[{key:"flush",value:function(){for(var w,S,N=this.actions,A=this.maxFrames;(S=N[0])&&S.delay<=A&&(N.shift(),this.frame=S.delay,!(w=S.execute(S.state,S.delay))););if(w){for(;S=N.shift();)S.unsubscribe();throw w}}}]),g}(v.v);return k.frameTimeFactor=10,k}(),D=function(k){(0,T.Z)(_,k);var M=(0,R.Z)(_);function _(g,E){var N,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.index+=1;return(0,V.Z)(this,_),(N=M.call(this,g,E)).scheduler=g,N.work=E,N.index=A,N.active=!0,N.index=g.index=A,N}return(0,Z.Z)(_,[{key:"schedule",value:function(E){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!this.id)return(0,U.Z)((0,B.Z)(_.prototype),"schedule",this).call(this,E,N);this.active=!1;var A=new _(this.scheduler,this.work);return this.add(A),A.schedule(E,N)}},{key:"requestAsyncId",value:function(E,N){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.delay=E.frame+A;var w=E.actions;return w.push(this),w.sort(_.sortActions),!0}},{key:"recycleAsyncId",value:function(E,N){}},{key:"_execute",value:function(E,N){if(!0===this.active)return(0,U.Z)((0,B.Z)(_.prototype),"_execute",this).call(this,E,N)}}],[{key:"sortActions",value:function(E,N){return E.delay===N.delay?E.index===N.index?0:E.index>N.index?1:-1:E.delay>N.delay?1:-1}}]),_}(b.o)},58172:function(ue,q,f){"use strict";f.d(q,{r:function(){return M},Z:function(){return k}});var U=f(18967),B=f(14105),V=f(13920),Z=f(89200),T=f(10509),R=f(97154),v=function(_){(0,T.Z)(E,_);var g=(0,R.Z)(E);function E(N,A){var w;return(0,U.Z)(this,E),(w=g.call(this,N,A)).scheduler=N,w.work=A,w}return(0,B.Z)(E,[{key:"requestAsyncId",value:function(A,w){var S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==S&&S>0?(0,V.Z)((0,Z.Z)(E.prototype),"requestAsyncId",this).call(this,A,w,S):(A.actions.push(this),A.scheduled||(A.scheduled=requestAnimationFrame(function(){return A.flush(null)})))}},{key:"recycleAsyncId",value:function(A,w){var S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==S&&S>0||null===S&&this.delay>0)return(0,V.Z)((0,Z.Z)(E.prototype),"recycleAsyncId",this).call(this,A,w,S);0===A.actions.length&&(cancelAnimationFrame(w),A.scheduled=void 0)}}]),E}(f(4065).o),k=new(function(_){(0,T.Z)(E,_);var g=(0,R.Z)(E);function E(){return(0,U.Z)(this,E),g.apply(this,arguments)}return(0,B.Z)(E,[{key:"flush",value:function(A){this.active=!0,this.scheduled=void 0;var S,w=this.actions,O=-1,F=w.length;A=A||w.shift();do{if(S=A.execute(A.state,A.delay))break}while(++O2&&void 0!==arguments[2]?arguments[2]:0;return null!==O&&O>0?(0,V.Z)((0,Z.Z)(N.prototype),"requestAsyncId",this).call(this,w,S,O):(w.actions.push(this),w.scheduled||(w.scheduled=b.H.setImmediate(w.flush.bind(w,null))))}},{key:"recycleAsyncId",value:function(w,S){var O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==O&&O>0||null===O&&this.delay>0)return(0,V.Z)((0,Z.Z)(N.prototype),"recycleAsyncId",this).call(this,w,S,O);0===w.actions.length&&(b.H.clearImmediate(S),w.scheduled=void 0)}}]),N}(f(4065).o),M=new(function(g){(0,T.Z)(N,g);var E=(0,R.Z)(N);function N(){return(0,U.Z)(this,N),E.apply(this,arguments)}return(0,B.Z)(N,[{key:"flush",value:function(w){this.active=!0,this.scheduled=void 0;var O,S=this.actions,F=-1,z=S.length;w=w||S.shift();do{if(O=w.execute(w.state,w.delay))break}while(++F1&&void 0!==arguments[1]?arguments[1]:0;return w>0?(0,V.Z)((0,Z.Z)(E.prototype),"schedule",this).call(this,A,w):(this.delay=w,this.state=A,this.scheduler.flush(this),this)}},{key:"execute",value:function(A,w){return w>0||this.closed?(0,V.Z)((0,Z.Z)(E.prototype),"execute",this).call(this,A,w):this._execute(A,w)}},{key:"requestAsyncId",value:function(A,w){var S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==S&&S>0||null===S&&this.delay>0?(0,V.Z)((0,Z.Z)(E.prototype),"requestAsyncId",this).call(this,A,w,S):A.flush(this)}}]),E}(f(4065).o),k=new(function(_){(0,T.Z)(E,_);var g=(0,R.Z)(E);function E(){return(0,U.Z)(this,E),g.apply(this,arguments)}return E}(f(81572).v))(v),M=k},81695:function(ue,q,f){"use strict";function U(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}f.d(q,{hZ:function(){return B}});var B=U()},57694:function(ue,q,f){"use strict";f.d(q,{L:function(){return U}});var U=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},79542:function(ue,q,f){"use strict";f.d(q,{b:function(){return U}});var U=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},9855:function(ue,q,f){"use strict";f.d(q,{W:function(){return B}});var B=function(){function V(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return V.prototype=Object.create(Error.prototype),V}()},64646:function(ue,q,f){"use strict";f.d(q,{K:function(){return B}});var B=function(){function V(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return V.prototype=Object.create(Error.prototype),V}()},96421:function(ue,q,f){"use strict";f.d(q,{H:function(){return T}});var U=1,B=function(){return Promise.resolve()}(),V={};function Z(b){return b in V&&(delete V[b],!0)}var T={setImmediate:function(v){var I=U++;return V[I]=!0,B.then(function(){return Z(I)&&v()}),I},clearImmediate:function(v){Z(v)}}},1696:function(ue,q,f){"use strict";f.d(q,{N:function(){return B}});var B=function(){function V(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return V.prototype=Object.create(Error.prototype),V}()},98691:function(ue,q,f){"use strict";f.d(q,{W:function(){return B}});var B=function(){function V(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return V.prototype=Object.create(Error.prototype),V}()},66351:function(ue,q,f){"use strict";f.d(q,{B:function(){return B}});var B=function(){function V(Z){return Error.call(this),this.message=Z?"".concat(Z.length," errors occurred during unsubscription:\n").concat(Z.map(function(T,R){return"".concat(R+1,") ").concat(T.toString())}).join("\n ")):"",this.name="UnsubscriptionError",this.errors=Z,this}return V.prototype=Object.create(Error.prototype),V}()},2808:function(ue,q,f){"use strict";function U(B,V){for(var Z=0,T=V.length;Z=0}},64902:function(ue,q,f){"use strict";function U(B){return null!==B&&"object"==typeof B}f.d(q,{K:function(){return U}})},17504:function(ue,q,f){"use strict";f.d(q,{b:function(){return B}});var U=f(89797);function B(V){return!!V&&(V instanceof U.y||"function"==typeof V.lift&&"function"==typeof V.subscribe)}},36514:function(ue,q,f){"use strict";function U(B){return!!B&&"function"!=typeof B.subscribe&&"function"==typeof B.then}f.d(q,{t:function(){return U}})},91299:function(ue,q,f){"use strict";function U(B){return B&&"function"==typeof B.schedule}f.d(q,{K:function(){return U}})},66029:function(ue,q,f){"use strict";function U(){}f.d(q,{Z:function(){return U}})},59849:function(ue,q,f){"use strict";function U(B,V){function Z(){return!Z.pred.apply(Z.thisArg,arguments)}return Z.pred=B,Z.thisArg=V,Z}f.d(q,{f:function(){return U}})},96194:function(ue,q,f){"use strict";f.d(q,{z:function(){return B},U:function(){return V}});var U=f(57070);function B(){for(var Z=arguments.length,T=new Array(Z),R=0;R4&&void 0!==arguments[4]?arguments[4]:new U.d(T,b,v);if(!I.closed)return R instanceof V.y?R.subscribe(I):(0,B.s)(R)(I)}},3410:function(ue,q,f){"use strict";f.d(q,{Y:function(){return Z}});var U=f(39874),B=f(79542),V=f(88944);function Z(T,R,b){if(T){if(T instanceof U.L)return T;if(T[B.b])return T[B.b]()}return T||R||b?new U.L(T,R,b):new U.L(V.c)}},73033:function(ue,q,f){"use strict";f.r(q),f.d(q,{audit:function(){return U.U},auditTime:function(){return B.e},buffer:function(){return I},bufferCount:function(){return E},bufferTime:function(){return F},bufferToggle:function(){return le},bufferWhen:function(){return be},catchError:function(){return _t.K},combineAll:function(){return Ft},combineLatest:function(){return Qe},concat:function(){return xt},concatAll:function(){return vt.u},concatMap:function(){return Qt.b},concatMapTo:function(){return Ht},count:function(){return Ct.Q},debounce:function(){return qt},debounceTime:function(){return Nt.b},defaultIfEmpty:function(){return rn.d},delay:function(){return En.g},delayWhen:function(){return In},dematerialize:function(){return ut},distinct:function(){return ye},distinctUntilChanged:function(){return ct.x},distinctUntilKeyChanged:function(){return ft},elementAt:function(){return ln},endWith:function(){return Tn},every:function(){return Pn},exhaust:function(){return Sn},exhaustMap:function(){return Rt},expand:function(){return rt},filter:function(){return Kt.h},finalize:function(){return Ne.x},find:function(){return Le},findIndex:function(){return an},first:function(){return qn.P},flatMap:function(){return Vt.VS},groupBy:function(){return Nr.v},ignoreElements:function(){return Vr},isEmpty:function(){return lo},last:function(){return uo.Z},map:function(){return Ut.U},mapTo:function(){return Jo.h},materialize:function(){return to},max:function(){return Wn},merge:function(){return jt},mergeAll:function(){return Pt.J},mergeMap:function(){return Vt.zg},mergeMapTo:function(){return Gt},mergeScan:function(){return Xt},min:function(){return jn},multicast:function(){return zn.O},observeOn:function(){return ai.QV},onErrorResumeNext:function(){return Ci},pairwise:function(){return Oo.G},partition:function(){return wo},pluck:function(){return ri},publish:function(){return qi},publishBehavior:function(){return Ho},publishLast:function(){return Yi},publishReplay:function(){return vn},race:function(){return po},reduce:function(){return Ei},refCount:function(){return Fi.x},repeat:function(){return Ti},repeatWhen:function(){return ma},retry:function(){return hs},retryWhen:function(){return Ma},sample:function(){return ga},sampleTime:function(){return Aa},scan:function(){return co.R},sequenceEqual:function(){return Bi},share:function(){return qa.B},shareReplay:function(){return Mu.d},single:function(){return Qi},skip:function(){return tn.T},skipLast:function(){return eu},skipUntil:function(){return pe},skipWhile:function(){return We},startWith:function(){return _e.O},subscribeOn:function(){return Re},switchAll:function(){return gt},switchMap:function(){return St.w},switchMapTo:function(){return Kr},take:function(){return nn.q},takeLast:function(){return pi.h},takeUntil:function(){return qr.R},takeWhile:function(){return Oi.o},tap:function(){return ya.b},throttle:function(){return si.P},throttleTime:function(){return Pi},throwIfEmpty:function(){return Jt.T},timeInterval:function(){return ba.J},timeout:function(){return Ar},timeoutWith:function(){return xp},timestamp:function(){return wp.A},toArray:function(){return Ep},window:function(){return kp},windowCount:function(){return kv},windowTime:function(){return ne},windowToggle:function(){return cn},windowWhen:function(){return Qn},withLatestFrom:function(){return Cr},zip:function(){return ii},zipAll:function(){return ko}});var U=f(67494),B=f(54562),V=f(88009),Z=f(10509),T=f(97154),R=f(18967),b=f(14105),v=f(32124);function I(Be){return function(Ee){return Ee.lift(new D(Be))}}var D=function(){function Be(Ye){(0,R.Z)(this,Be),this.closingNotifier=Ye}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new k(Ee,this.closingNotifier))}}]),Be}(),k=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze){var nt;return(0,R.Z)(this,Ee),(nt=Ye.call(this,Ue)).buffer=[],nt.add((0,v.ft)(Ze,new v.IY((0,V.Z)(nt)))),nt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.buffer.push(Ze)}},{key:"notifyNext",value:function(){var Ze=this.buffer;this.buffer=[],this.destination.next(Ze)}}]),Ee}(v.Ds),M=f(13920),_=f(89200),g=f(39874);function E(Be){var Ye=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(Ue){return Ue.lift(new N(Be,Ye))}}var N=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.bufferSize=Ye,this.startBufferEvery=Ee,this.subscriberClass=Ee&&Ye!==Ee?w:A}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new this.subscriberClass(Ee,this.bufferSize,this.startBufferEvery))}}]),Be}(),A=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze){var nt;return(0,R.Z)(this,Ee),(nt=Ye.call(this,Ue)).bufferSize=Ze,nt.buffer=[],nt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){var nt=this.buffer;nt.push(Ze),nt.length==this.bufferSize&&(this.destination.next(nt),this.buffer=[])}},{key:"_complete",value:function(){var Ze=this.buffer;Ze.length>0&&this.destination.next(Ze),(0,M.Z)((0,_.Z)(Ee.prototype),"_complete",this).call(this)}}]),Ee}(g.L),w=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).bufferSize=Ze,Tt.startBufferEvery=nt,Tt.buffers=[],Tt.count=0,Tt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){var nt=this.bufferSize,Tt=this.startBufferEvery,sn=this.buffers,bn=this.count;this.count++,bn%Tt==0&&sn.push([]);for(var xr=sn.length;xr--;){var Ii=sn[xr];Ii.push(Ze),Ii.length===nt&&(sn.splice(xr,1),this.destination.next(Ii))}}},{key:"_complete",value:function(){for(var Ze=this.buffers,nt=this.destination;Ze.length>0;){var Tt=Ze.shift();Tt.length>0&&nt.next(Tt)}(0,M.Z)((0,_.Z)(Ee.prototype),"_complete",this).call(this)}}]),Ee}(g.L),S=f(46813),O=f(91299);function F(Be){var Ye=arguments.length,Ee=S.P;(0,O.K)(arguments[arguments.length-1])&&(Ee=arguments[arguments.length-1],Ye--);var Ue=null;Ye>=2&&(Ue=arguments[1]);var Ze=Number.POSITIVE_INFINITY;return Ye>=3&&(Ze=arguments[2]),function(Tt){return Tt.lift(new z(Be,Ue,Ze,Ee))}}var z=function(){function Be(Ye,Ee,Ue,Ze){(0,R.Z)(this,Be),this.bufferTimeSpan=Ye,this.bufferCreationInterval=Ee,this.maxBufferSize=Ue,this.scheduler=Ze}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new j(Ee,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}]),Be}(),K=function Be(){(0,R.Z)(this,Be),this.buffer=[]},j=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt,sn){var bn;(0,R.Z)(this,Ee),(bn=Ye.call(this,Ue)).bufferTimeSpan=Ze,bn.bufferCreationInterval=nt,bn.maxBufferSize=Tt,bn.scheduler=sn,bn.contexts=[];var xr=bn.openContext();if(bn.timespanOnly=null==nt||nt<0,bn.timespanOnly){var Ii={subscriber:(0,V.Z)(bn),context:xr,bufferTimeSpan:Ze};bn.add(xr.closeAction=sn.schedule(J,Ze,Ii))}else{var Ko={subscriber:(0,V.Z)(bn),context:xr},Pa={bufferTimeSpan:Ze,bufferCreationInterval:nt,subscriber:(0,V.Z)(bn),scheduler:sn};bn.add(xr.closeAction=sn.schedule($,Ze,Ko)),bn.add(sn.schedule(ee,nt,Pa))}return bn}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){for(var sn,nt=this.contexts,Tt=nt.length,bn=0;bn0;){var Tt=Ze.shift();nt.next(Tt.buffer)}(0,M.Z)((0,_.Z)(Ee.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){this.contexts=null}},{key:"onBufferFull",value:function(Ze){this.closeContext(Ze);var nt=Ze.closeAction;if(nt.unsubscribe(),this.remove(nt),!this.closed&&this.timespanOnly){Ze=this.openContext();var Tt=this.bufferTimeSpan;this.add(Ze.closeAction=this.scheduler.schedule(J,Tt,{subscriber:this,context:Ze,bufferTimeSpan:Tt}))}}},{key:"openContext",value:function(){var Ze=new K;return this.contexts.push(Ze),Ze}},{key:"closeContext",value:function(Ze){this.destination.next(Ze.buffer);var nt=this.contexts;(nt?nt.indexOf(Ze):-1)>=0&&nt.splice(nt.indexOf(Ze),1)}}]),Ee}(g.L);function J(Be){var Ye=Be.subscriber,Ee=Be.context;Ee&&Ye.closeContext(Ee),Ye.closed||(Be.context=Ye.openContext(),Be.context.closeAction=this.schedule(Be,Be.bufferTimeSpan))}function ee(Be){var Ye=Be.bufferCreationInterval,Ee=Be.bufferTimeSpan,Ue=Be.subscriber,Ze=Be.scheduler,nt=Ue.openContext();Ue.closed||(Ue.add(nt.closeAction=Ze.schedule($,Ee,{subscriber:Ue,context:nt})),this.schedule(Be,Ye))}function $(Be){Be.subscriber.closeContext(Be.context)}var ae=f(5051),se=f(61454),ce=f(7283);function le(Be,Ye){return function(Ue){return Ue.lift(new oe(Be,Ye))}}var oe=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.openings=Ye,this.closingSelector=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Ae(Ee,this.openings,this.closingSelector))}}]),Be}(),Ae=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).closingSelector=nt,Tt.contexts=[],Tt.add((0,se.D)((0,V.Z)(Tt),Ze)),Tt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){for(var nt=this.contexts,Tt=nt.length,sn=0;sn0;){var Tt=nt.shift();Tt.subscription.unsubscribe(),Tt.buffer=null,Tt.subscription=null}this.contexts=null,(0,M.Z)((0,_.Z)(Ee.prototype),"_error",this).call(this,Ze)}},{key:"_complete",value:function(){for(var Ze=this.contexts;Ze.length>0;){var nt=Ze.shift();this.destination.next(nt.buffer),nt.subscription.unsubscribe(),nt.buffer=null,nt.subscription=null}this.contexts=null,(0,M.Z)((0,_.Z)(Ee.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(Ze,nt){Ze?this.closeBuffer(Ze):this.openBuffer(nt)}},{key:"notifyComplete",value:function(Ze){this.closeBuffer(Ze.context)}},{key:"openBuffer",value:function(Ze){try{var Tt=this.closingSelector.call(this,Ze);Tt&&this.trySubscribe(Tt)}catch(sn){this._error(sn)}}},{key:"closeBuffer",value:function(Ze){var nt=this.contexts;if(nt&&Ze){var sn=Ze.subscription;this.destination.next(Ze.buffer),nt.splice(nt.indexOf(Ze),1),this.remove(sn),sn.unsubscribe()}}},{key:"trySubscribe",value:function(Ze){var nt=this.contexts,sn=new ae.w,bn={buffer:[],subscription:sn};nt.push(bn);var xr=(0,se.D)(this,Ze,bn);!xr||xr.closed?this.closeBuffer(bn):(xr.context=bn,this.add(xr),sn.add(xr))}}]),Ee}(ce.L);function be(Be){return function(Ye){return Ye.lift(new it(Be))}}var it=function(){function Be(Ye){(0,R.Z)(this,Be),this.closingSelector=Ye}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new qe(Ee,this.closingSelector))}}]),Be}(),qe=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze){var nt;return(0,R.Z)(this,Ee),(nt=Ye.call(this,Ue)).closingSelector=Ze,nt.subscribing=!1,nt.openBuffer(),nt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.buffer.push(Ze)}},{key:"_complete",value:function(){var Ze=this.buffer;Ze&&this.destination.next(Ze),(0,M.Z)((0,_.Z)(Ee.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){this.buffer=void 0,this.subscribing=!1}},{key:"notifyNext",value:function(){this.openBuffer()}},{key:"notifyComplete",value:function(){this.subscribing?this.complete():this.openBuffer()}},{key:"openBuffer",value:function(){var Tt,Ze=this.closingSubscription;Ze&&(this.remove(Ze),Ze.unsubscribe()),this.buffer&&this.destination.next(this.buffer),this.buffer=[];try{Tt=(0,this.closingSelector)()}catch(bn){return this.error(bn)}Ze=new ae.w,this.closingSubscription=Ze,this.add(Ze),this.subscribing=!0,Ze.add((0,v.ft)(Tt,new v.IY(this))),this.subscribing=!1}}]),Ee}(v.Ds),_t=f(13426),yt=f(81370);function Ft(Be){return function(Ye){return Ye.lift(new yt.Ms(Be))}}var xe=f(62467),De=f(78985),je=f(61493);function Qe(){for(var Be=arguments.length,Ye=new Array(Be),Ee=0;Ee=2;return function(Ue){return Ue.pipe((0,Kt.h)(function(Ze,nt){return nt===Be}),(0,nn.q)(1),Ee?(0,rn.d)(Ye):(0,Jt.T)(function(){return new Yt.W}))}}var yn=f(43161);function Tn(){for(var Be=arguments.length,Ye=new Array(Be),Ee=0;Ee1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,Ee=arguments.length>2?arguments[2]:void 0;return Ye=(Ye||0)<1?Number.POSITIVE_INFINITY:Ye,function(Ue){return Ue.lift(new he(Be,Ye,Ee))}}var he=function(){function Be(Ye,Ee,Ue){(0,R.Z)(this,Be),this.project=Ye,this.concurrent=Ee,this.scheduler=Ue}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Ie(Ee,this.project,this.concurrent,this.scheduler))}}]),Be}(),Ie=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt){var sn;return(0,R.Z)(this,Ee),(sn=Ye.call(this,Ue)).project=Ze,sn.concurrent=nt,sn.scheduler=Tt,sn.index=0,sn.active=0,sn.hasCompleted=!1,nt0&&this._next(Ze.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}],[{key:"dispatch",value:function(Ze){Ze.subscriber.subscribeToProjection(Ze.result,Ze.value,Ze.index)}}]),Ee}(v.Ds),Ne=f(59803);function Le(Be,Ye){if("function"!=typeof Be)throw new TypeError("predicate is not a function");return function(Ee){return Ee.lift(new ze(Be,Ee,!1,Ye))}}var ze=function(){function Be(Ye,Ee,Ue,Ze){(0,R.Z)(this,Be),this.predicate=Ye,this.source=Ee,this.yieldIndex=Ue,this.thisArg=Ze}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new At(Ee,this.predicate,this.source,this.yieldIndex,this.thisArg))}}]),Be}(),At=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt,sn){var bn;return(0,R.Z)(this,Ee),(bn=Ye.call(this,Ue)).predicate=Ze,bn.source=nt,bn.yieldIndex=Tt,bn.thisArg=sn,bn.index=0,bn}return(0,b.Z)(Ee,[{key:"notifyComplete",value:function(Ze){var nt=this.destination;nt.next(Ze),nt.complete(),this.unsubscribe()}},{key:"_next",value:function(Ze){var nt=this.predicate,Tt=this.thisArg,sn=this.index++;try{nt.call(Tt||this,Ze,sn,this.source)&&this.notifyComplete(this.yieldIndex?sn:Ze)}catch(xr){this.destination.error(xr)}}},{key:"_complete",value:function(){this.notifyComplete(this.yieldIndex?-1:void 0)}}]),Ee}(g.L);function an(Be,Ye){return function(Ee){return Ee.lift(new ze(Be,Ee,!0,Ye))}}var qn=f(64233),Nr=f(86072);function Vr(){return function(Ye){return Ye.lift(new br)}}var br=function(){function Be(){(0,R.Z)(this,Be)}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Jr(Ee))}}]),Be}(),Jr=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(){return(0,R.Z)(this,Ee),Ye.apply(this,arguments)}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){}}]),Ee}(g.L);function lo(){return function(Be){return Be.lift(new Ri)}}var Ri=function(){function Be(){(0,R.Z)(this,Be)}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new _o(Ee))}}]),Be}(),_o=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue){return(0,R.Z)(this,Ee),Ye.call(this,Ue)}return(0,b.Z)(Ee,[{key:"notifyComplete",value:function(Ze){var nt=this.destination;nt.next(Ze),nt.complete()}},{key:"_next",value:function(Ze){this.notifyComplete(!1)}},{key:"_complete",value:function(){this.notifyComplete(!0)}}]),Ee}(g.L),uo=f(99583),Jo=f(12698),wi=f(80286);function to(){return function(Ye){return Ye.lift(new bi)}}var bi=function(){function Be(){(0,R.Z)(this,Be)}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Wi(Ee))}}]),Be}(),Wi=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue){return(0,R.Z)(this,Ee),Ye.call(this,Ue)}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.destination.next(wi.P.createNext(Ze))}},{key:"_error",value:function(Ze){var nt=this.destination;nt.next(wi.P.createError(Ze)),nt.complete()}},{key:"_complete",value:function(){var Ze=this.destination;Ze.next(wi.P.createComplete()),Ze.complete()}}]),Ee}(g.L),co=f(31927),pi=f(64397),Bo=f(96194);function Ei(Be,Ye){return arguments.length>=2?function(Ue){return(0,Bo.z)((0,co.R)(Be,Ye),(0,pi.h)(1),(0,rn.d)(Ye))(Ue)}:function(Ue){return(0,Bo.z)((0,co.R)(function(Ze,nt,Tt){return Be(Ze,nt,Tt+1)}),(0,pi.h)(1))(Ue)}}function Wn(Be){return Ei("function"==typeof Be?function(Ee,Ue){return Be(Ee,Ue)>0?Ee:Ue}:function(Ee,Ue){return Ee>Ue?Ee:Ue})}var Ot=f(55371);function jt(){for(var Be=arguments.length,Ye=new Array(Be),Ee=0;Ee2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof Ye?(0,Vt.zg)(function(){return Be},Ye,Ee):("number"==typeof Ye&&(Ee=Ye),(0,Vt.zg)(function(){return Be},Ee))}function Xt(Be,Ye){var Ee=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return function(Ue){return Ue.lift(new gn(Be,Ye,Ee))}}var gn=function(){function Be(Ye,Ee,Ue){(0,R.Z)(this,Be),this.accumulator=Ye,this.seed=Ee,this.concurrent=Ue}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Gn(Ee,this.accumulator,this.seed,this.concurrent))}}]),Be}(),Gn=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt){var sn;return(0,R.Z)(this,Ee),(sn=Ye.call(this,Ue)).accumulator=Ze,sn.acc=nt,sn.concurrent=Tt,sn.hasValue=!1,sn.hasCompleted=!1,sn.buffer=[],sn.active=0,sn.index=0,sn}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){if(this.active0?this._next(Ze.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())}}]),Ee}(v.Ds);function jn(Be){return Ei("function"==typeof Be?function(Ee,Ue){return Be(Ee,Ue)<0?Ee:Ue}:function(Ee,Ue){return Ee0&&void 0!==arguments[0]?arguments[0]:-1;return function(Ye){return 0===Be?(0,ha.c)():Ye.lift(new bo(Be<0?-1:Be-1,Ye))}}var bo=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.count=Ye,this.source=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Ni(Ee,this.count,this.source))}}]),Be}(),Ni=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).count=Ze,Tt.source=nt,Tt}return(0,b.Z)(Ee,[{key:"complete",value:function(){if(!this.isStopped){var Ze=this.source,nt=this.count;if(0===nt)return(0,M.Z)((0,_.Z)(Ee.prototype),"complete",this).call(this);nt>-1&&(this.count=nt-1),Ze.subscribe(this._unsubscribeAndRecycle())}}}]),Ee}(g.L);function ma(Be){return function(Ye){return Ye.lift(new Eo(Be))}}var Eo=function(){function Be(Ye){(0,R.Z)(this,Be),this.notifier=Ye}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Po(Ee,this.notifier,Ue))}}]),Be}(),Po=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).notifier=Ze,Tt.source=nt,Tt.sourceIsBeingSubscribedTo=!0,Tt}return(0,b.Z)(Ee,[{key:"notifyNext",value:function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)}},{key:"notifyComplete",value:function(){if(!1===this.sourceIsBeingSubscribedTo)return(0,M.Z)((0,_.Z)(Ee.prototype),"complete",this).call(this)}},{key:"complete",value:function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return(0,M.Z)((0,_.Z)(Ee.prototype),"complete",this).call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}}},{key:"_unsubscribe",value:function(){var Ze=this.notifications,nt=this.retriesSubscription;Ze&&(Ze.unsubscribe(),this.notifications=void 0),nt&&(nt.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0}},{key:"_unsubscribeAndRecycle",value:function(){var Ze=this._unsubscribe;return this._unsubscribe=null,(0,M.Z)((0,_.Z)(Ee.prototype),"_unsubscribeAndRecycle",this).call(this),this._unsubscribe=Ze,this}},{key:"subscribeToRetries",value:function(){var Ze;this.notifications=new ro.xQ;try{Ze=(0,this.notifier)(this.notifications)}catch(Tt){return(0,M.Z)((0,_.Z)(Ee.prototype),"complete",this).call(this)}this.retries=Ze,this.retriesSubscription=(0,v.ft)(Ze,new v.IY(this))}}]),Ee}(v.Ds);function hs(){var Be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return function(Ye){return Ye.lift(new Co(Be,Ye))}}var Co=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.count=Ye,this.source=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new va(Ee,this.count,this.source))}}]),Be}(),va=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).count=Ze,Tt.source=nt,Tt}return(0,b.Z)(Ee,[{key:"error",value:function(Ze){if(!this.isStopped){var nt=this.source,Tt=this.count;if(0===Tt)return(0,M.Z)((0,_.Z)(Ee.prototype),"error",this).call(this,Ze);Tt>-1&&(this.count=Tt-1),nt.subscribe(this._unsubscribeAndRecycle())}}}]),Ee}(g.L);function Ma(Be){return function(Ye){return Ye.lift(new Vo(Be,Ye))}}var Vo=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.notifier=Ye,this.source=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new So(Ee,this.notifier,this.source))}}]),Be}(),So=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).notifier=Ze,Tt.source=nt,Tt}return(0,b.Z)(Ee,[{key:"error",value:function(Ze){if(!this.isStopped){var nt=this.errors,Tt=this.retries,sn=this.retriesSubscription;if(Tt)this.errors=void 0,this.retriesSubscription=void 0;else{nt=new ro.xQ;try{Tt=(0,this.notifier)(nt)}catch(xr){return(0,M.Z)((0,_.Z)(Ee.prototype),"error",this).call(this,xr)}sn=(0,v.ft)(Tt,new v.IY(this))}this._unsubscribeAndRecycle(),this.errors=nt,this.retries=Tt,this.retriesSubscription=sn,nt.next(Ze)}}},{key:"_unsubscribe",value:function(){var Ze=this.errors,nt=this.retriesSubscription;Ze&&(Ze.unsubscribe(),this.errors=void 0),nt&&(nt.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0}},{key:"notifyNext",value:function(){var Ze=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=Ze,this.source.subscribe(this)}}]),Ee}(v.Ds),Fi=f(26575);function ga(Be){return function(Ye){return Ye.lift(new Ji(Be))}}var Ji=function(){function Be(Ye){(0,R.Z)(this,Be),this.notifier=Ye}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){var Ze=new _a(Ee),nt=Ue.subscribe(Ze);return nt.add((0,v.ft)(this.notifier,new v.IY(Ze))),nt}}]),Be}(),_a=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(){var Ue;return(0,R.Z)(this,Ee),(Ue=Ye.apply(this,arguments)).hasValue=!1,Ue}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.value=Ze,this.hasValue=!0}},{key:"notifyNext",value:function(){this.emitValue()}},{key:"notifyComplete",value:function(){this.emitValue()}},{key:"emitValue",value:function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))}}]),Ee}(v.Ds);function Aa(Be){var Ye=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S.P;return function(Ee){return Ee.lift(new _r(Be,Ye))}}var _r=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.period=Ye,this.scheduler=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Fn(Ee,this.period,this.scheduler))}}]),Be}(),Fn=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).period=Ze,Tt.scheduler=nt,Tt.hasValue=!1,Tt.add(nt.schedule(Da,Ze,{subscriber:(0,V.Z)(Tt),period:Ze})),Tt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.lastValue=Ze,this.hasValue=!0}},{key:"notifyNext",value:function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))}}]),Ee}(g.L);function Da(Be){var Ee=Be.period;Be.subscriber.notifyNext(),this.schedule(Be,Ee)}function Bi(Be,Ye){return function(Ee){return Ee.lift(new Va(Be,Ye))}}var Va=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.compareTo=Ye,this.comparator=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new ar(Ee,this.compareTo,this.comparator))}}]),Be}(),ar=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).compareTo=Ze,Tt.comparator=nt,Tt._a=[],Tt._b=[],Tt._oneComplete=!1,Tt.destination.add(Ze.subscribe(new ji(Ue,(0,V.Z)(Tt)))),Tt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(Ze),this.checkValues())}},{key:"_complete",value:function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()}},{key:"checkValues",value:function(){for(var Ze=this._a,nt=this._b,Tt=this.comparator;Ze.length>0&&nt.length>0;){var sn=Ze.shift(),bn=nt.shift(),xr=!1;try{xr=Tt?Tt(sn,bn):sn===bn}catch(Ii){this.destination.error(Ii)}xr||this.emit(!1)}}},{key:"emit",value:function(Ze){var nt=this.destination;nt.next(Ze),nt.complete()}},{key:"nextB",value:function(Ze){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(Ze),this.checkValues())}},{key:"completeB",value:function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0}}]),Ee}(g.L),ji=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze){var nt;return(0,R.Z)(this,Ee),(nt=Ye.call(this,Ue)).parent=Ze,nt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.parent.nextB(Ze)}},{key:"_error",value:function(Ze){this.parent.error(Ze),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.completeB(),this.unsubscribe()}}]),Ee}(g.L),qa=f(16338),Mu=f(61106),Ka=f(64646);function Qi(Be){return function(Ye){return Ye.lift(new ja(Be,Ye))}}var ja=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.predicate=Ye,this.source=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new _l(Ee,this.predicate,this.source))}}]),Be}(),_l=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).predicate=Ze,Tt.source=nt,Tt.seenValue=!1,Tt.index=0,Tt}return(0,b.Z)(Ee,[{key:"applySingleValue",value:function(Ze){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=Ze)}},{key:"_next",value:function(Ze){var nt=this.index++;this.predicate?this.tryNext(Ze,nt):this.applySingleValue(Ze)}},{key:"tryNext",value:function(Ze,nt){try{this.predicate(Ze,nt,this.source)&&this.applySingleValue(Ze)}catch(Tt){this.destination.error(Tt)}}},{key:"_complete",value:function(){var Ze=this.destination;this.index>0?(Ze.next(this.seenValue?this.singleValue:void 0),Ze.complete()):Ze.error(new Ka.K)}}]),Ee}(g.L),tn=f(18756);function eu(Be){return function(Ye){return Ye.lift(new yl(Be))}}var yl=function(){function Be(Ye){if((0,R.Z)(this,Be),this._skipCount=Ye,this._skipCount<0)throw new Yt.W}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(0===this._skipCount?new g.L(Ee):new bl(Ee,this._skipCount))}}]),Be}(),bl=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze){var nt;return(0,R.Z)(this,Ee),(nt=Ye.call(this,Ue))._skipCount=Ze,nt._count=0,nt._ring=new Array(Ze),nt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){var nt=this._skipCount,Tt=this._count++;if(Tt1&&void 0!==arguments[1]?arguments[1]:0;return function(Ue){return Ue.lift(new Ge(Be,Ye))}}var Ge=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.scheduler=Ye,this.delay=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return new Ce.e(Ue,this.delay,this.scheduler).subscribe(Ee)}}]),Be}(),St=f(34487),ht=f(57070);function gt(){return(0,St.w)(ht.y)}function Kr(Be,Ye){return Ye?(0,St.w)(function(){return Be},Ye):(0,St.w)(function(){return Be})}var qr=f(44213),Oi=f(49196),ya=f(59371),si=f(243);function Pi(Be){var Ye=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S.P,Ee=arguments.length>2&&void 0!==arguments[2]?arguments[2]:si.d;return function(Ue){return Ue.lift(new Cl(Be,Ye,Ee.leading,Ee.trailing))}}var Cl=function(){function Be(Ye,Ee,Ue,Ze){(0,R.Z)(this,Be),this.duration=Ye,this.scheduler=Ee,this.leading=Ue,this.trailing=Ze}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Oa(Ee,this.duration,this.scheduler,this.leading,this.trailing))}}]),Be}(),Oa=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt,sn){var bn;return(0,R.Z)(this,Ee),(bn=Ye.call(this,Ue)).duration=Ze,bn.scheduler=nt,bn.leading=Tt,bn.trailing=sn,bn._hasTrailingValue=!1,bn._trailingValue=null,bn}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){this.throttled?this.trailing&&(this._trailingValue=Ze,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Xa,this.duration,{subscriber:this})),this.leading?this.destination.next(Ze):this.trailing&&(this._trailingValue=Ze,this._hasTrailingValue=!0))}},{key:"_complete",value:function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}},{key:"clearThrottle",value:function(){var Ze=this.throttled;Ze&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),Ze.unsubscribe(),this.remove(Ze),this.throttled=null)}}]),Ee}(g.L);function Xa(Be){Be.subscriber.clearThrottle()}var ba=f(73445),ks=f(98691),Tp=f(88972);function xp(Be,Ye){var Ee=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S.P;return function(Ue){var Ze=(0,Tp.J)(Be),nt=Ze?+Be-Ee.now():Math.abs(Be);return Ue.lift(new Js(nt,Ze,Ye,Ee))}}var Js=function(){function Be(Ye,Ee,Ue,Ze){(0,R.Z)(this,Be),this.waitFor=Ye,this.absoluteTimeout=Ee,this.withObservable=Ue,this.scheduler=Ze}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new cc(Ee,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))}}]),Be}(),cc=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt,sn){var bn;return(0,R.Z)(this,Ee),(bn=Ye.call(this,Ue)).absoluteTimeout=Ze,bn.waitFor=nt,bn.withObservable=Tt,bn.scheduler=sn,bn.scheduleTimeout(),bn}return(0,b.Z)(Ee,[{key:"scheduleTimeout",value:function(){var Ze=this.action;Ze?this.action=Ze.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(Ee.dispatchTimeout,this.waitFor,this))}},{key:"_next",value:function(Ze){this.absoluteTimeout||this.scheduleTimeout(),(0,M.Z)((0,_.Z)(Ee.prototype),"_next",this).call(this,Ze)}},{key:"_unsubscribe",value:function(){this.action=void 0,this.scheduler=null,this.withObservable=null}}],[{key:"dispatchTimeout",value:function(Ze){var nt=Ze.withObservable;Ze._unsubscribeAndRecycle(),Ze.add((0,v.ft)(nt,new v.IY(Ze)))}}]),Ee}(v.Ds),Sl=f(11363);function Ar(Be){var Ye=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S.P;return xp(Be,(0,Sl._)(new ks.W),Ye)}var wp=f(63706);function vd(Be,Ye,Ee){return 0===Ee?[Ye]:(Be.push(Ye),Be)}function Ep(){return Ei(vd,[])}function kp(Be){return function(Ee){return Ee.lift(new gd(Be))}}var gd=function(){function Be(Ye){(0,R.Z)(this,Be),this.windowBoundaries=Ye}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){var Ze=new tu(Ee),nt=Ue.subscribe(Ze);return nt.closed||Ze.add((0,v.ft)(this.windowBoundaries,new v.IY(Ze))),nt}}]),Be}(),tu=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue){var Ze;return(0,R.Z)(this,Ee),(Ze=Ye.call(this,Ue)).window=new ro.xQ,Ue.next(Ze.window),Ze}return(0,b.Z)(Ee,[{key:"notifyNext",value:function(){this.openWindow()}},{key:"notifyError",value:function(Ze){this._error(Ze)}},{key:"notifyComplete",value:function(){this._complete()}},{key:"_next",value:function(Ze){this.window.next(Ze)}},{key:"_error",value:function(Ze){this.window.error(Ze),this.destination.error(Ze)}},{key:"_complete",value:function(){this.window.complete(),this.destination.complete()}},{key:"_unsubscribe",value:function(){this.window=null}},{key:"openWindow",value:function(){var Ze=this.window;Ze&&Ze.complete();var nt=this.destination,Tt=this.window=new ro.xQ;nt.next(Tt)}}]),Ee}(v.Ds);function kv(Be){var Ye=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(Ue){return Ue.lift(new Se(Be,Ye))}}var Se=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.windowSize=Ye,this.startWindowEvery=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new ge(Ee,this.windowSize,this.startWindowEvery))}}]),Be}(),ge=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).destination=Ue,Tt.windowSize=Ze,Tt.startWindowEvery=nt,Tt.windows=[new ro.xQ],Tt.count=0,Ue.next(Tt.windows[0]),Tt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){for(var nt=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,Tt=this.destination,sn=this.windowSize,bn=this.windows,xr=bn.length,Ii=0;Ii=0&&Ko%nt==0&&!this.closed&&bn.shift().complete(),++this.count%nt==0&&!this.closed){var Pa=new ro.xQ;bn.push(Pa),Tt.next(Pa)}}},{key:"_error",value:function(Ze){var nt=this.windows;if(nt)for(;nt.length>0&&!this.closed;)nt.shift().error(Ze);this.destination.error(Ze)}},{key:"_complete",value:function(){var Ze=this.windows;if(Ze)for(;Ze.length>0&&!this.closed;)Ze.shift().complete();this.destination.complete()}},{key:"_unsubscribe",value:function(){this.count=0,this.windows=null}}]),Ee}(g.L),Q=f(11705);function ne(Be){var Ye=S.P,Ee=null,Ue=Number.POSITIVE_INFINITY;return(0,O.K)(arguments[3])&&(Ye=arguments[3]),(0,O.K)(arguments[2])?Ye=arguments[2]:(0,Q.k)(arguments[2])&&(Ue=Number(arguments[2])),(0,O.K)(arguments[1])?Ye=arguments[1]:(0,Q.k)(arguments[1])&&(Ee=Number(arguments[1])),function(nt){return nt.lift(new ke(Be,Ee,Ue,Ye))}}var ke=function(){function Be(Ye,Ee,Ue,Ze){(0,R.Z)(this,Be),this.windowTimeSpan=Ye,this.windowCreationInterval=Ee,this.maxWindowSize=Ue,this.scheduler=Ze}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new lt(Ee,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))}}]),Be}(),Ve=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(){var Ue;return(0,R.Z)(this,Ee),(Ue=Ye.apply(this,arguments))._numberOfNextedValues=0,Ue}return(0,b.Z)(Ee,[{key:"next",value:function(Ze){this._numberOfNextedValues++,(0,M.Z)((0,_.Z)(Ee.prototype),"next",this).call(this,Ze)}},{key:"numberOfNextedValues",get:function(){return this._numberOfNextedValues}}]),Ee}(ro.xQ),lt=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt,Tt,sn){var bn;(0,R.Z)(this,Ee),(bn=Ye.call(this,Ue)).destination=Ue,bn.windowTimeSpan=Ze,bn.windowCreationInterval=nt,bn.maxWindowSize=Tt,bn.scheduler=sn,bn.windows=[];var xr=bn.openWindow();if(null!==nt&&nt>=0){var Ii={subscriber:(0,V.Z)(bn),window:xr,context:null},Ko={windowTimeSpan:Ze,windowCreationInterval:nt,subscriber:(0,V.Z)(bn),scheduler:sn};bn.add(sn.schedule($t,Ze,Ii)),bn.add(sn.schedule(Zt,nt,Ko))}else{var Pa={subscriber:(0,V.Z)(bn),window:xr,windowTimeSpan:Ze};bn.add(sn.schedule(wt,Ze,Pa))}return bn}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){for(var nt=this.windows,Tt=nt.length,sn=0;sn=this.maxWindowSize&&this.closeWindow(bn))}}},{key:"_error",value:function(Ze){for(var nt=this.windows;nt.length>0;)nt.shift().error(Ze);this.destination.error(Ze)}},{key:"_complete",value:function(){for(var Ze=this.windows;Ze.length>0;){var nt=Ze.shift();nt.closed||nt.complete()}this.destination.complete()}},{key:"openWindow",value:function(){var Ze=new Ve;return this.windows.push(Ze),this.destination.next(Ze),Ze}},{key:"closeWindow",value:function(Ze){Ze.complete();var nt=this.windows;nt.splice(nt.indexOf(Ze),1)}}]),Ee}(g.L);function wt(Be){var Ye=Be.subscriber,Ee=Be.windowTimeSpan,Ue=Be.window;Ue&&Ye.closeWindow(Ue),Be.window=Ye.openWindow(),this.schedule(Be,Ee)}function Zt(Be){var Ye=Be.windowTimeSpan,Ee=Be.subscriber,Ue=Be.scheduler,Ze=Be.windowCreationInterval,nt=Ee.openWindow(),sn={action:this,subscription:null};sn.subscription=Ue.schedule($t,Ye,{subscriber:Ee,window:nt,context:sn}),this.add(sn.subscription),this.schedule(Be,Ze)}function $t(Be){var Ye=Be.subscriber,Ee=Be.window,Ue=Be.context;Ue&&Ue.action&&Ue.subscription&&Ue.action.remove(Ue.subscription),Ye.closeWindow(Ee)}function cn(Be,Ye){return function(Ee){return Ee.lift(new An(Be,Ye))}}var An=function(){function Be(Ye,Ee){(0,R.Z)(this,Be),this.openings=Ye,this.closingSelector=Ee}return(0,b.Z)(Be,[{key:"call",value:function(Ee,Ue){return Ue.subscribe(new Un(Ee,this.openings,this.closingSelector))}}]),Be}(),Un=function(Be){(0,Z.Z)(Ee,Be);var Ye=(0,T.Z)(Ee);function Ee(Ue,Ze,nt){var Tt;return(0,R.Z)(this,Ee),(Tt=Ye.call(this,Ue)).openings=Ze,Tt.closingSelector=nt,Tt.contexts=[],Tt.add(Tt.openSubscription=(0,se.D)((0,V.Z)(Tt),Ze,Ze)),Tt}return(0,b.Z)(Ee,[{key:"_next",value:function(Ze){var nt=this.contexts;if(nt)for(var Tt=nt.length,sn=0;sn0&&void 0!==arguments[0]?arguments[0]:null;Ze&&(this.remove(Ze),Ze.unsubscribe());var nt=this.window;nt&&nt.complete();var sn,Tt=this.window=new ro.xQ;this.destination.next(Tt);try{var bn=this.closingSelector;sn=bn()}catch(xr){return this.destination.error(xr),void this.window.error(xr)}this.add(this.closingNotification=(0,se.D)(this,sn))}}]),Ee}(ce.L);function Cr(){for(var Be=arguments.length,Ye=new Array(Be),Ee=0;Ee0){var bn=sn.indexOf(Tt);-1!==bn&&sn.splice(bn,1)}}},{key:"notifyComplete",value:function(){}},{key:"_next",value:function(Ze){if(0===this.toRespond.length){var nt=[Ze].concat((0,xe.Z)(this.values));this.project?this._tryProject(nt):this.destination.next(nt)}}},{key:"_tryProject",value:function(Ze){var nt;try{nt=this.project.apply(this,Ze)}catch(Tt){return void this.destination.error(Tt)}this.destination.next(nt)}}]),Ee}(ce.L),fi=f(43008);function ii(){for(var Be=arguments.length,Ye=new Array(Be),Ee=0;Ee1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;(0,U.Z)(this,O),this.subscribedFrame=F,this.unsubscribedFrame=z},_=(f(2808),function(O){(0,T.Z)(z,O);var F=(0,R.Z)(z);function z(K,j){var J;return(0,U.Z)(this,z),(J=F.call(this,function(ee){var $=this,ae=$.logSubscribedFrame(),se=new I.w;return se.add(new I.w(function(){$.logUnsubscribedFrame(ae)})),$.scheduleMessages(ee),se})).messages=K,J.subscriptions=[],J.scheduler=j,J}return(0,B.Z)(z,[{key:"scheduleMessages",value:function(j){for(var J=this.messages.length,ee=0;ee1&&void 0!==arguments[1]?arguments[1]:null,$=[],ae={actual:$,ready:!1},se=z.parseMarblesAsSubscriptions(ee,this.runMode),ce=se.subscribedFrame===Number.POSITIVE_INFINITY?0:se.subscribedFrame,le=se.unsubscribedFrame;this.schedule(function(){oe=j.subscribe(function(be){var it=be;be instanceof b.y&&(it=J.materializeInnerObservable(it,J.frame)),$.push({frame:J.frame,notification:v.P.createNext(it)})},function(be){$.push({frame:J.frame,notification:v.P.createError(be)})},function(){$.push({frame:J.frame,notification:v.P.createComplete()})})},ce),le!==Number.POSITIVE_INFINITY&&this.schedule(function(){return oe.unsubscribe()},le),this.flushTests.push(ae);var Ae=this.runMode;return{toBe:function(it,qe,_t){ae.ready=!0,ae.expected=z.parseMarbles(it,qe,_t,!0,Ae)}}}},{key:"expectSubscriptions",value:function(j){var J={actual:j,ready:!1};this.flushTests.push(J);var ee=this.runMode;return{toBe:function(ae){var se="string"==typeof ae?[ae]:ae;J.ready=!0,J.expected=se.map(function(ce){return z.parseMarblesAsSubscriptions(ce,ee)})}}}},{key:"flush",value:function(){for(var j=this,J=this.hotObservables;J.length>0;)J.shift().setup();(0,V.Z)((0,Z.Z)(z.prototype),"flush",this).call(this),this.flushTests=this.flushTests.filter(function(ee){return!ee.ready||(j.assertDeepEqual(ee.actual,ee.expected),!1)})}},{key:"run",value:function(j){var J=z.frameTimeFactor,ee=this.maxFrames;z.frameTimeFactor=1,this.maxFrames=Number.POSITIVE_INFINITY,this.runMode=!0,A.v.delegate=this;var $={cold:this.createColdObservable.bind(this),hot:this.createHotObservable.bind(this),flush:this.flush.bind(this),expectObservable:this.expectObservable.bind(this),expectSubscriptions:this.expectSubscriptions.bind(this)};try{var ae=j($);return this.flush(),ae}finally{z.frameTimeFactor=J,this.maxFrames=ee,this.runMode=!1,A.v.delegate=void 0}}}],[{key:"parseMarblesAsSubscriptions",value:function(j){var J=this,ee=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof j)return new D(Number.POSITIVE_INFINITY);for(var $=j.length,ae=-1,se=Number.POSITIVE_INFINITY,ce=Number.POSITIVE_INFINITY,le=0,oe=0;oe<$;oe++){var Ae=le,be=function(je){Ae+=je*J.frameTimeFactor},it=j[oe];switch(it){case" ":ee||be(1);break;case"-":be(1);break;case"(":ae=le,be(1);break;case")":ae=-1,be(1);break;case"^":if(se!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");se=ae>-1?ae:le,be(1);break;case"!":if(ce!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");ce=ae>-1?ae:le;break;default:if(ee&&it.match(/^[0-9]$/)&&(0===oe||" "===j[oe-1])){var qe=j.slice(oe),_t=qe.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(_t){oe+=_t[0].length-1;var yt=parseFloat(_t[1]),Ft=_t[2],xe=void 0;switch(Ft){case"ms":xe=yt;break;case"s":xe=1e3*yt;break;case"m":xe=1e3*yt*60}be(xe/this.frameTimeFactor);break}}throw new Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+it+"'.")}le=Ae}return ce<0?new D(se):new D(se,ce)}},{key:"parseMarbles",value:function(j,J,ee){var $=this,ae=arguments.length>3&&void 0!==arguments[3]&&arguments[3],se=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(-1!==j.indexOf("!"))throw new Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var ce=j.length,le=[],oe=se?j.replace(/^[ ]+/,"").indexOf("^"):j.indexOf("^"),Ae=-1===oe?0:oe*-this.frameTimeFactor,be="object"!=typeof J?function(xt){return xt}:function(xt){return ae&&J[xt]instanceof _?J[xt].messages:J[xt]},it=-1,qe=0;qe-1?it:Ae,notification:Ft}),Ae=_t}return le}}]),z}(N.y)},4194:function(ue,q,f){"use strict";f.r(q),f.d(q,{webSocket:function(){return U.j},WebSocketSubject:function(){return B.p}});var U=f(99298),B=f(46095)},26918:function(ue,q,f){"use strict";f(68663)},56205:function(ue,q){"use strict";var U;!function(){var B=q||{};void 0!==(U=function(){return B}.apply(q,[]))&&(ue.exports=U),B.default=B;var V="http://www.w3.org/2000/xmlns/",T="http://www.w3.org/2000/svg",b=/url\(["']?(.+?)["']?\)/,v={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},I=function(se){return se instanceof HTMLElement||se instanceof SVGElement},D=function(se){if(!I(se))throw new Error("an HTMLElement or SVGElement is required; got "+se)},k=function(se){return new Promise(function(ce,le){I(se)?ce(se):le(new Error("an HTMLElement or SVGElement is required; got "+se))})},_=function(se){var ce=Object.keys(v).filter(function(le){return se.indexOf("."+le)>0}).map(function(le){return v[le]});return ce?ce[0]:(console.error("Unknown font format for "+se+". Fonts may not be working correctly."),"application/octet-stream")},E=function(se,ce,le){var oe=se.viewBox&&se.viewBox.baseVal&&se.viewBox.baseVal[le]||null!==ce.getAttribute(le)&&!ce.getAttribute(le).match(/%$/)&&parseInt(ce.getAttribute(le))||se.getBoundingClientRect()[le]||parseInt(ce.style[le])||parseInt(window.getComputedStyle(se).getPropertyValue(le));return null==oe||isNaN(parseFloat(oe))?0:oe},w=function(se){for(var ce=window.atob(se.split(",")[1]),le=se.split(",")[0].split(":")[1].split(";")[0],oe=new ArrayBuffer(ce.length),Ae=new Uint8Array(oe),be=0;be *")).forEach(function(qt){qt.setAttributeNS(V,"xmlns","svg"===qt.tagName?T:"http://www.w3.org/1999/xhtml")}),!dt)return ee(ae,se).then(function(qt){var bt=document.createElement("style");bt.setAttribute("type","text/css"),bt.innerHTML="";var en=document.createElement("defs");en.appendChild(bt),Qe.insertBefore(en,Qe.firstChild);var Nt=document.createElement("div");Nt.appendChild(Qe);var rn=Nt.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if("function"!=typeof ce)return{src:rn,width:xt,height:vt};ce(rn,xt,vt)});var Ht=document.createElement("div");Ht.appendChild(Qe);var Ct=Ht.innerHTML;if("function"!=typeof ce)return{src:Ct,width:xt,height:vt};ce(Ct,xt,vt)})},B.svgAsDataUri=function(ae,se,ce){return D(ae),B.prepareSvg(ae,se).then(function(le){var Ae=le.width,be=le.height,it="data:image/svg+xml;base64,"+window.btoa(function(se){return decodeURIComponent(encodeURIComponent(se).replace(/%([0-9A-F]{2})/g,function(ce,le){var oe=String.fromCharCode("0x"+le);return"%"===oe?"%25":oe}))}(']>'+le.src));return"function"==typeof ce&&ce(it,Ae,be),it})},B.svgAsPngUri=function(ae,se,ce){D(ae);var le=se||{},oe=le.encoderType,Ae=void 0===oe?"image/png":oe,be=le.encoderOptions,it=void 0===be?.8:be,qe=le.canvg,_t=function(Ft){var xe=Ft.src,De=Ft.width,je=Ft.height,dt=document.createElement("canvas"),Qe=dt.getContext("2d"),Bt=window.devicePixelRatio||1;dt.width=De*Bt,dt.height=je*Bt,dt.style.width=dt.width+"px",dt.style.height=dt.height+"px",Qe.setTransform(Bt,0,0,Bt,0,0),qe?qe(dt,xe):Qe.drawImage(xe,0,0);var xt=void 0;try{xt=dt.toDataURL(Ae,it)}catch(vt){if("undefined"!=typeof SecurityError&&vt instanceof SecurityError||"SecurityError"===vt.name)return void console.error("Rendered SVG images cannot be downloaded in this browser.");throw vt}return"function"==typeof ce&&ce(xt,dt.width,dt.height),Promise.resolve(xt)};return qe?B.prepareSvg(ae,se).then(_t):B.svgAsDataUri(ae,se).then(function(yt){return new Promise(function(Ft,xe){var De=new Image;De.onload=function(){return Ft(_t({src:De,width:De.width,height:De.height}))},De.onerror=function(){xe("There was an error loading the data URI as an image on the following SVG\n"+window.atob(yt.slice(26))+"Open the following link to see browser's diagnosis\n"+yt)},De.src=yt})})},B.download=function(ae,se,ce){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(w(se),ae);else{var le=document.createElement("a");if("download"in le){le.download=ae,le.style.display="none",document.body.appendChild(le);try{var oe=w(se),Ae=URL.createObjectURL(oe);le.href=Ae,le.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(Ae)})}}catch(be){console.error(be),console.warn("Error while getting object URL. Falling back to string URL."),le.href=se}le.click(),document.body.removeChild(le)}else ce&&ce.popup&&(ce.popup.document.title=ae,ce.popup.location.replace(se))}},B.saveSvg=function(ae,se,ce){var le=$();return k(ae).then(function(oe){return B.svgAsDataUri(oe,ce||{})}).then(function(oe){return B.download(se,oe,le)})},B.saveSvgAsPng=function(ae,se,ce){var le=$();return k(ae).then(function(oe){return B.svgAsPngUri(oe,ce||{})}).then(function(oe){return B.download(se,oe,le)})}}()},5042:function(ue,q,f){var U=f(25523),B=Object.prototype.hasOwnProperty,V="undefined"!=typeof Map;function Z(){this._array=[],this._set=V?new Map:Object.create(null)}Z.fromArray=function(R,b){for(var v=new Z,I=0,D=R.length;I=0)return b}else{var v=U.toSetString(R);if(B.call(this._set,v))return this._set[v]}throw new Error('"'+R+'" is not in the set.')},Z.prototype.at=function(R){if(R>=0&&R>>=5)>0&&(k|=32),D+=U.encode(k)}while(M>0);return D},q.decode=function(I,D,k){var E,N,M=I.length,_=0,g=0;do{if(D>=M)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(N=U.decode(I.charCodeAt(D++))))throw new Error("Invalid base64 digit: "+I.charAt(D-1));E=!!(32&N),_+=(N&=31)<>1;return 1==(1&v)?-D:D}(_),k.rest=D}},7698:function(ue,q){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");q.encode=function(U){if(0<=U&&UR||b==R&&T.generatedColumn>=Z.generatedColumn||U.compareByGeneratedPositionsInflated(Z,T)<=0}(this._last,T)?(this._sorted=!1,this._array.push(T)):(this._last=T,this._array.push(T))},V.prototype.toArray=function(){return this._sorted||(this._array.sort(U.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},q.H=V},30673:function(ue,q,f){var U=f(78619),B=f(25523),V=f(5042).I,Z=f(66306).H;function T(R){R||(R={}),this._file=B.getArg(R,"file",null),this._sourceRoot=B.getArg(R,"sourceRoot",null),this._skipValidation=B.getArg(R,"skipValidation",!1),this._sources=new V,this._names=new V,this._mappings=new Z,this._sourcesContents=null}T.prototype._version=3,T.fromSourceMap=function(b){var v=b.sourceRoot,I=new T({file:b.file,sourceRoot:v});return b.eachMapping(function(D){var k={generated:{line:D.generatedLine,column:D.generatedColumn}};null!=D.source&&(k.source=D.source,null!=v&&(k.source=B.relative(v,k.source)),k.original={line:D.originalLine,column:D.originalColumn},null!=D.name&&(k.name=D.name)),I.addMapping(k)}),b.sources.forEach(function(D){var k=D;null!==v&&(k=B.relative(v,D)),I._sources.has(k)||I._sources.add(k);var M=b.sourceContentFor(D);null!=M&&I.setSourceContent(D,M)}),I},T.prototype.addMapping=function(b){var v=B.getArg(b,"generated"),I=B.getArg(b,"original",null),D=B.getArg(b,"source",null),k=B.getArg(b,"name",null);this._skipValidation||this._validateMapping(v,I,D,k),null!=D&&(D=String(D),this._sources.has(D)||this._sources.add(D)),null!=k&&(k=String(k),this._names.has(k)||this._names.add(k)),this._mappings.add({generatedLine:v.line,generatedColumn:v.column,originalLine:null!=I&&I.line,originalColumn:null!=I&&I.column,source:D,name:k})},T.prototype.setSourceContent=function(b,v){var I=b;null!=this._sourceRoot&&(I=B.relative(this._sourceRoot,I)),null!=v?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[B.toSetString(I)]=v):this._sourcesContents&&(delete this._sourcesContents[B.toSetString(I)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},T.prototype.applySourceMap=function(b,v,I){var D=v;if(null==v){if(null==b.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');D=b.file}var k=this._sourceRoot;null!=k&&(D=B.relative(k,D));var M=new V,_=new V;this._mappings.unsortedForEach(function(g){if(g.source===D&&null!=g.originalLine){var E=b.originalPositionFor({line:g.originalLine,column:g.originalColumn});null!=E.source&&(g.source=E.source,null!=I&&(g.source=B.join(I,g.source)),null!=k&&(g.source=B.relative(k,g.source)),g.originalLine=E.line,g.originalColumn=E.column,null!=E.name&&(g.name=E.name))}var N=g.source;null!=N&&!M.has(N)&&M.add(N);var A=g.name;null!=A&&!_.has(A)&&_.add(A)},this),this._sources=M,this._names=_,b.sources.forEach(function(g){var E=b.sourceContentFor(g);null!=E&&(null!=I&&(g=B.join(I,g)),null!=k&&(g=B.relative(k,g)),this.setSourceContent(g,E))},this)},T.prototype._validateMapping=function(b,v,I,D){if(v&&"number"!=typeof v.line&&"number"!=typeof v.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(b&&"line"in b&&"column"in b&&b.line>0&&b.column>=0)||v||I||D){if(b&&"line"in b&&"column"in b&&v&&"line"in v&&"column"in v&&b.line>0&&b.column>=0&&v.line>0&&v.column>=0&&I)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:b,source:I,original:v,name:D}))}},T.prototype._serializeMappings=function(){for(var g,E,N,A,b=0,v=1,I=0,D=0,k=0,M=0,_="",w=this._mappings.toArray(),S=0,O=w.length;S0){if(!B.compareByGeneratedPositionsInflated(E,w[S-1]))continue;g+=","}g+=U.encode(E.generatedColumn-b),b=E.generatedColumn,null!=E.source&&(A=this._sources.indexOf(E.source),g+=U.encode(A-M),M=A,g+=U.encode(E.originalLine-1-D),D=E.originalLine-1,g+=U.encode(E.originalColumn-I),I=E.originalColumn,null!=E.name&&(N=this._names.indexOf(E.name),g+=U.encode(N-k),k=N)),_+=g}return _},T.prototype._generateSourcesContent=function(b,v){return b.map(function(I){if(!this._sourcesContents)return null;null!=v&&(I=B.relative(v,I));var D=B.toSetString(I);return Object.prototype.hasOwnProperty.call(this._sourcesContents,D)?this._sourcesContents[D]:null},this)},T.prototype.toJSON=function(){var b={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(b.file=this._file),null!=this._sourceRoot&&(b.sourceRoot=this._sourceRoot),this._sourcesContents&&(b.sourcesContent=this._generateSourcesContent(b.sources,b.sourceRoot)),b},T.prototype.toString=function(){return JSON.stringify(this.toJSON())},q.h=T},25523:function(ue,q){q.getArg=function(S,O,F){if(O in S)return S[O];if(3===arguments.length)return F;throw new Error('"'+O+'" is a required argument.')};var U=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,B=/^data:.+\,.+$/;function V(S){var O=S.match(U);return O?{scheme:O[1],auth:O[2],host:O[3],port:O[4],path:O[5]}:null}function Z(S){var O="";return S.scheme&&(O+=S.scheme+":"),O+="//",S.auth&&(O+=S.auth+"@"),S.host&&(O+=S.host),S.port&&(O+=":"+S.port),S.path&&(O+=S.path),O}function T(S){var O=S,F=V(S);if(F){if(!F.path)return S;O=F.path}for(var j,z=q.isAbsolute(O),K=O.split(/\/+/),J=0,ee=K.length-1;ee>=0;ee--)"."===(j=K[ee])?K.splice(ee,1):".."===j?J++:J>0&&(""===j?(K.splice(ee+1,J),J=0):(K.splice(ee,2),J--));return""===(O=K.join("/"))&&(O=z?"/":"."),F?(F.path=O,Z(F)):O}function R(S,O){""===S&&(S="."),""===O&&(O=".");var F=V(O),z=V(S);if(z&&(S=z.path||"/"),F&&!F.scheme)return z&&(F.scheme=z.scheme),Z(F);if(F||O.match(B))return O;if(z&&!z.host&&!z.path)return z.host=O,Z(z);var K="/"===O.charAt(0)?O:T(S.replace(/\/+$/,"")+"/"+O);return z?(z.path=K,Z(z)):K}q.urlParse=V,q.urlGenerate=Z,q.normalize=T,q.join=R,q.isAbsolute=function(S){return"/"===S.charAt(0)||U.test(S)},q.relative=function(S,O){""===S&&(S="."),S=S.replace(/\/$/,"");for(var F=0;0!==O.indexOf(S+"/");){var z=S.lastIndexOf("/");if(z<0||(S=S.slice(0,z)).match(/^([^\/]+:\/)?\/*$/))return O;++F}return Array(F+1).join("../")+O.substr(S.length+1)};var v=!("__proto__"in Object.create(null));function I(S){return S}function M(S){if(!S)return!1;var O=S.length;if(O<9||95!==S.charCodeAt(O-1)||95!==S.charCodeAt(O-2)||111!==S.charCodeAt(O-3)||116!==S.charCodeAt(O-4)||111!==S.charCodeAt(O-5)||114!==S.charCodeAt(O-6)||112!==S.charCodeAt(O-7)||95!==S.charCodeAt(O-8)||95!==S.charCodeAt(O-9))return!1;for(var F=O-10;F>=0;F--)if(36!==S.charCodeAt(F))return!1;return!0}function E(S,O){return S===O?0:null===S?1:null===O?-1:S>O?1:-1}q.toSetString=v?I:function(S){return M(S)?"$"+S:S},q.fromSetString=v?I:function(S){return M(S)?S.slice(1):S},q.compareByOriginalPositions=function(S,O,F){var z=E(S.source,O.source);return 0!==z||0!=(z=S.originalLine-O.originalLine)||0!=(z=S.originalColumn-O.originalColumn)||F||0!=(z=S.generatedColumn-O.generatedColumn)||0!=(z=S.generatedLine-O.generatedLine)?z:E(S.name,O.name)},q.compareByGeneratedPositionsDeflated=function(S,O,F){var z=S.generatedLine-O.generatedLine;return 0!==z||0!=(z=S.generatedColumn-O.generatedColumn)||F||0!==(z=E(S.source,O.source))||0!=(z=S.originalLine-O.originalLine)||0!=(z=S.originalColumn-O.originalColumn)?z:E(S.name,O.name)},q.compareByGeneratedPositionsInflated=function(S,O){var F=S.generatedLine-O.generatedLine;return 0!==F||0!=(F=S.generatedColumn-O.generatedColumn)||0!==(F=E(S.source,O.source))||0!=(F=S.originalLine-O.originalLine)||0!=(F=S.originalColumn-O.originalColumn)?F:E(S.name,O.name)},q.parseSourceMapInput=function(S){return JSON.parse(S.replace(/^\)]}'[^\n]*\n/,""))},q.computeSourceURL=function(S,O,F){if(O=O||"",S&&("/"!==S[S.length-1]&&"/"!==O[0]&&(S+="/"),O=S+O),F){var z=V(F);if(!z)throw new Error("sourceMapURL could not be parsed");if(z.path){var K=z.path.lastIndexOf("/");K>=0&&(z.path=z.path.substring(0,K+1))}O=R(Z(z),O)}return T(O)}},52402:function(ue){ue.exports=function(q){"use strict";var U=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function V(N,A){var w=N[0],S=N[1],O=N[2],F=N[3];S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&O|~S&F)+A[0]-680876936|0)<<7|w>>>25)+S|0)&S|~w&O)+A[1]-389564586|0)<<12|F>>>20)+w|0)&w|~F&S)+A[2]+606105819|0)<<17|O>>>15)+F|0)&F|~O&w)+A[3]-1044525330|0)<<22|S>>>10)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&O|~S&F)+A[4]-176418897|0)<<7|w>>>25)+S|0)&S|~w&O)+A[5]+1200080426|0)<<12|F>>>20)+w|0)&w|~F&S)+A[6]-1473231341|0)<<17|O>>>15)+F|0)&F|~O&w)+A[7]-45705983|0)<<22|S>>>10)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&O|~S&F)+A[8]+1770035416|0)<<7|w>>>25)+S|0)&S|~w&O)+A[9]-1958414417|0)<<12|F>>>20)+w|0)&w|~F&S)+A[10]-42063|0)<<17|O>>>15)+F|0)&F|~O&w)+A[11]-1990404162|0)<<22|S>>>10)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&O|~S&F)+A[12]+1804603682|0)<<7|w>>>25)+S|0)&S|~w&O)+A[13]-40341101|0)<<12|F>>>20)+w|0)&w|~F&S)+A[14]-1502002290|0)<<17|O>>>15)+F|0)&F|~O&w)+A[15]+1236535329|0)<<22|S>>>10)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&F|O&~F)+A[1]-165796510|0)<<5|w>>>27)+S|0)&O|S&~O)+A[6]-1069501632|0)<<9|F>>>23)+w|0)&S|w&~S)+A[11]+643717713|0)<<14|O>>>18)+F|0)&w|F&~w)+A[0]-373897302|0)<<20|S>>>12)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&F|O&~F)+A[5]-701558691|0)<<5|w>>>27)+S|0)&O|S&~O)+A[10]+38016083|0)<<9|F>>>23)+w|0)&S|w&~S)+A[15]-660478335|0)<<14|O>>>18)+F|0)&w|F&~w)+A[4]-405537848|0)<<20|S>>>12)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&F|O&~F)+A[9]+568446438|0)<<5|w>>>27)+S|0)&O|S&~O)+A[14]-1019803690|0)<<9|F>>>23)+w|0)&S|w&~S)+A[3]-187363961|0)<<14|O>>>18)+F|0)&w|F&~w)+A[8]+1163531501|0)<<20|S>>>12)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S&F|O&~F)+A[13]-1444681467|0)<<5|w>>>27)+S|0)&O|S&~O)+A[2]-51403784|0)<<9|F>>>23)+w|0)&S|w&~S)+A[7]+1735328473|0)<<14|O>>>18)+F|0)&w|F&~w)+A[12]-1926607734|0)<<20|S>>>12)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S^O^F)+A[5]-378558|0)<<4|w>>>28)+S|0)^S^O)+A[8]-2022574463|0)<<11|F>>>21)+w|0)^w^S)+A[11]+1839030562|0)<<16|O>>>16)+F|0)^F^w)+A[14]-35309556|0)<<23|S>>>9)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S^O^F)+A[1]-1530992060|0)<<4|w>>>28)+S|0)^S^O)+A[4]+1272893353|0)<<11|F>>>21)+w|0)^w^S)+A[7]-155497632|0)<<16|O>>>16)+F|0)^F^w)+A[10]-1094730640|0)<<23|S>>>9)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S^O^F)+A[13]+681279174|0)<<4|w>>>28)+S|0)^S^O)+A[0]-358537222|0)<<11|F>>>21)+w|0)^w^S)+A[3]-722521979|0)<<16|O>>>16)+F|0)^F^w)+A[6]+76029189|0)<<23|S>>>9)+O|0,S=((S+=((O=((O+=((F=((F+=((w=((w+=(S^O^F)+A[9]-640364487|0)<<4|w>>>28)+S|0)^S^O)+A[12]-421815835|0)<<11|F>>>21)+w|0)^w^S)+A[15]+530742520|0)<<16|O>>>16)+F|0)^F^w)+A[2]-995338651|0)<<23|S>>>9)+O|0,S=((S+=((F=((F+=(S^((w=((w+=(O^(S|~F))+A[0]-198630844|0)<<6|w>>>26)+S|0)|~O))+A[7]+1126891415|0)<<10|F>>>22)+w|0)^((O=((O+=(w^(F|~S))+A[14]-1416354905|0)<<15|O>>>17)+F|0)|~w))+A[5]-57434055|0)<<21|S>>>11)+O|0,S=((S+=((F=((F+=(S^((w=((w+=(O^(S|~F))+A[12]+1700485571|0)<<6|w>>>26)+S|0)|~O))+A[3]-1894986606|0)<<10|F>>>22)+w|0)^((O=((O+=(w^(F|~S))+A[10]-1051523|0)<<15|O>>>17)+F|0)|~w))+A[1]-2054922799|0)<<21|S>>>11)+O|0,S=((S+=((F=((F+=(S^((w=((w+=(O^(S|~F))+A[8]+1873313359|0)<<6|w>>>26)+S|0)|~O))+A[15]-30611744|0)<<10|F>>>22)+w|0)^((O=((O+=(w^(F|~S))+A[6]-1560198380|0)<<15|O>>>17)+F|0)|~w))+A[13]+1309151649|0)<<21|S>>>11)+O|0,S=((S+=((F=((F+=(S^((w=((w+=(O^(S|~F))+A[4]-145523070|0)<<6|w>>>26)+S|0)|~O))+A[11]-1120210379|0)<<10|F>>>22)+w|0)^((O=((O+=(w^(F|~S))+A[2]+718787259|0)<<15|O>>>17)+F|0)|~w))+A[9]-343485551|0)<<21|S>>>11)+O|0,N[0]=w+N[0]|0,N[1]=S+N[1]|0,N[2]=O+N[2]|0,N[3]=F+N[3]|0}function Z(N){var w,A=[];for(w=0;w<64;w+=4)A[w>>2]=N.charCodeAt(w)+(N.charCodeAt(w+1)<<8)+(N.charCodeAt(w+2)<<16)+(N.charCodeAt(w+3)<<24);return A}function T(N){var w,A=[];for(w=0;w<64;w+=4)A[w>>2]=N[w]+(N[w+1]<<8)+(N[w+2]<<16)+(N[w+3]<<24);return A}function R(N){var S,O,F,z,K,j,A=N.length,w=[1732584193,-271733879,-1732584194,271733878];for(S=64;S<=A;S+=64)V(w,Z(N.substring(S-64,S)));for(O=(N=N.substring(S-64)).length,F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S=0;S>2]|=N.charCodeAt(S)<<(S%4<<3);if(F[S>>2]|=128<<(S%4<<3),S>55)for(V(w,F),S=0;S<16;S+=1)F[S]=0;return z=(z=8*A).toString(16).match(/(.*?)(.{0,8})$/),K=parseInt(z[2],16),j=parseInt(z[1],16)||0,F[14]=K,F[15]=j,V(w,F),w}function v(N){var w,A="";for(w=0;w<4;w+=1)A+=U[N>>8*w+4&15]+U[N>>8*w&15];return A}function I(N){var A;for(A=0;AF?new ArrayBuffer(0):(z=F-O,K=new ArrayBuffer(z),j=new Uint8Array(K),J=new Uint8Array(this,O,z),j.set(J),K)}}(),E.prototype.append=function(N){return this.appendBinary(D(N)),this},E.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var w,A=this._buff.length;for(w=64;w<=A;w+=64)V(this._hash,Z(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},E.prototype.end=function(N){var S,F,A=this._buff,w=A.length,O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(S=0;S>2]|=A.charCodeAt(S)<<(S%4<<3);return this._finish(O,w),F=I(this._hash),N&&(F=g(F)),this.reset(),F},E.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},E.prototype.setState=function(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},E.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},E.prototype._finish=function(N,A){var S,O,F,w=A;if(N[w>>2]|=128<<(w%4<<3),w>55)for(V(this._hash,N),w=0;w<16;w+=1)N[w]=0;S=(S=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(S[2],16),F=parseInt(S[1],16)||0,N[14]=O,N[15]=F,V(this._hash,N)},E.hash=function(N,A){return E.hashBinary(D(N),A)},E.hashBinary=function(N,A){var S=I(R(N));return A?g(S):S},(E.ArrayBuffer=function(){this.reset()}).prototype.append=function(N){var S,A=function(N,A,w){var S=new Uint8Array(N.byteLength+A.byteLength);return S.set(new Uint8Array(N)),S.set(new Uint8Array(A),N.byteLength),w?S:S.buffer}(this._buff.buffer,N,!0),w=A.length;for(this._length+=N.byteLength,S=64;S<=w;S+=64)V(this._hash,T(A.subarray(S-64,S)));return this._buff=S-64>2]|=A[O]<<(O%4<<3);return this._finish(S,w),F=I(this._hash),N&&(F=g(F)),this.reset(),F},E.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.ArrayBuffer.prototype.getState=function(){var N=E.prototype.getState.call(this);return N.buff=function(N){return String.fromCharCode.apply(null,new Uint8Array(N))}(N.buff),N},E.ArrayBuffer.prototype.setState=function(N){return N.buff=function(N,A){var F,w=N.length,S=new ArrayBuffer(w),O=new Uint8Array(S);for(F=0;F>2]|=N[S]<<(S%4<<3);if(F[S>>2]|=128<<(S%4<<3),S>55)for(V(w,F),S=0;S<16;S+=1)F[S]=0;return z=(z=8*A).toString(16).match(/(.*?)(.{0,8})$/),K=parseInt(z[2],16),j=parseInt(z[1],16)||0,F[14]=K,F[15]=j,V(w,F),w}(new Uint8Array(N)));return A?g(S):S},E}()},49940:function(ue,q,f){var U=f(33499),B=f(54968),V=B;V.v1=U,V.v4=B,ue.exports=V},83702:function(ue){for(var q=[],f=0;f<256;++f)q[f]=(f+256).toString(16).substr(1);ue.exports=function(B,V){var Z=V||0;return[q[B[Z++]],q[B[Z++]],q[B[Z++]],q[B[Z++]],"-",q[B[Z++]],q[B[Z++]],"-",q[B[Z++]],q[B[Z++]],"-",q[B[Z++]],q[B[Z++]],"-",q[B[Z++]],q[B[Z++]],q[B[Z++]],q[B[Z++]],q[B[Z++]],q[B[Z++]]].join("")}},1942:function(ue){var q="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(q){var f=new Uint8Array(16);ue.exports=function(){return q(f),f}}else{var U=new Array(16);ue.exports=function(){for(var Z,V=0;V<16;V++)0==(3&V)&&(Z=4294967296*Math.random()),U[V]=Z>>>((3&V)<<3)&255;return U}}},33499:function(ue,q,f){var V,Z,U=f(1942),B=f(83702),T=0,R=0;ue.exports=function(v,I,D){var k=I&&D||0,M=I||[],_=(v=v||{}).node||V,g=void 0!==v.clockseq?v.clockseq:Z;if(null==_||null==g){var E=U();null==_&&(_=V=[1|E[0],E[1],E[2],E[3],E[4],E[5]]),null==g&&(g=Z=16383&(E[6]<<8|E[7]))}var N=void 0!==v.msecs?v.msecs:(new Date).getTime(),A=void 0!==v.nsecs?v.nsecs:R+1,w=N-T+(A-R)/1e4;if(w<0&&void 0===v.clockseq&&(g=g+1&16383),(w<0||N>T)&&void 0===v.nsecs&&(A=0),A>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");T=N,R=A,Z=g;var S=(1e4*(268435455&(N+=122192928e5))+A)%4294967296;M[k++]=S>>>24&255,M[k++]=S>>>16&255,M[k++]=S>>>8&255,M[k++]=255&S;var O=N/4294967296*1e4&268435455;M[k++]=O>>>8&255,M[k++]=255&O,M[k++]=O>>>24&15|16,M[k++]=O>>>16&255,M[k++]=g>>>8|128,M[k++]=255&g;for(var F=0;F<6;++F)M[k+F]=_[F];return I||B(M)}},54968:function(ue,q,f){var U=f(1942),B=f(83702);ue.exports=function(Z,T,R){var b=T&&R||0;"string"==typeof Z&&(T="binary"===Z?new Array(16):null,Z=null);var v=(Z=Z||{}).random||(Z.rng||U)();if(v[6]=15&v[6]|64,v[8]=63&v[8]|128,T)for(var I=0;I<16;++I)T[b+I]=v[I];return T||B(v)}},3397:function(ue){window,ue.exports=function(q){var f={};function U(B){if(f[B])return f[B].exports;var V=f[B]={i:B,l:!1,exports:{}};return q[B].call(V.exports,V,V.exports,U),V.l=!0,V.exports}return U.m=q,U.c=f,U.d=function(B,V,Z){U.o(B,V)||Object.defineProperty(B,V,{enumerable:!0,get:Z})},U.r=function(B){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},U.t=function(B,V){if(1&V&&(B=U(B)),8&V||4&V&&"object"==typeof B&&B&&B.__esModule)return B;var Z=Object.create(null);if(U.r(Z),Object.defineProperty(Z,"default",{enumerable:!0,value:B}),2&V&&"string"!=typeof B)for(var T in B)U.d(Z,T,function(R){return B[R]}.bind(null,T));return Z},U.n=function(B){var V=B&&B.__esModule?function(){return B.default}:function(){return B};return U.d(V,"a",V),V},U.o=function(B,V){return Object.prototype.hasOwnProperty.call(B,V)},U.p="",U(U.s=0)}([function(q,f,U){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.AttachAddon=void 0;var B=function(){function Z(T,R){this._disposables=[],this._socket=T,this._socket.binaryType="arraybuffer",this._bidirectional=!R||!1!==R.bidirectional}return Z.prototype.activate=function(T){var R=this;this._disposables.push(V(this._socket,"message",function(b){var v=b.data;T.write("string"==typeof v?v:new Uint8Array(v))})),this._bidirectional&&(this._disposables.push(T.onData(function(b){return R._sendData(b)})),this._disposables.push(T.onBinary(function(b){return R._sendBinary(b)}))),this._disposables.push(V(this._socket,"close",function(){return R.dispose()})),this._disposables.push(V(this._socket,"error",function(){return R.dispose()}))},Z.prototype.dispose=function(){this._disposables.forEach(function(T){return T.dispose()})},Z.prototype._sendData=function(T){1===this._socket.readyState&&this._socket.send(T)},Z.prototype._sendBinary=function(T){if(1===this._socket.readyState){for(var R=new Uint8Array(T.length),b=0;bS;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},w.prototype._createAccessibilityTreeNode=function(){var S=document.createElement("div");return S.setAttribute("role","listitem"),S.tabIndex=-1,this._refreshRowDimensions(S),S},w.prototype._onTab=function(S){for(var O=0;O0?this._charsToConsume.shift()!==S&&(this._charsToAnnounce+=S):this._charsToAnnounce+=S,"\n"===S&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=I.tooMuchOutput)),D.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){O._accessibilityTreeRoot.appendChild(O._liveRegion)},0))},w.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,D.isMac&&(0,E.removeElementFromParent)(this._liveRegion)},w.prototype._onKey=function(S){this._clearLiveRegion(),this._charsToConsume.push(S)},w.prototype._refreshRows=function(S,O){this._renderRowsDebouncer.refresh(S,O,this._terminal.rows)},w.prototype._renderRows=function(S,O){for(var F=this._terminal.buffer,z=F.lines.length.toString(),K=S;K<=O;K++){var j=F.translateBufferLineToString(F.ydisp+K,!0),J=(F.ydisp+K+1).toString(),ee=this._rowElements[K];ee&&(0===j.length?ee.innerText="\xa0":ee.textContent=j,ee.setAttribute("aria-posinset",J),ee.setAttribute("aria-setsize",z))}this._announceCharacters()},w.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var S=0;S>>0},(b=T.color||(T.color={})).blend=function(M,_){var g=(255&_.rgba)/255;if(1===g)return{css:_.css,rgba:_.rgba};var N=_.rgba>>16&255,A=_.rgba>>8&255,w=M.rgba>>24&255,S=M.rgba>>16&255,O=M.rgba>>8&255,F=w+Math.round(((_.rgba>>24&255)-w)*g),z=S+Math.round((N-S)*g),K=O+Math.round((A-O)*g);return{css:R.toCss(F,z,K),rgba:R.toRgba(F,z,K)}},b.isOpaque=function(M){return 255==(255&M.rgba)},b.ensureContrastRatio=function(M,_,g){var E=I.ensureContrastRatio(M.rgba,_.rgba,g);if(E)return I.toColor(E>>24&255,E>>16&255,E>>8&255)},b.opaque=function(M){var _=(255|M.rgba)>>>0,g=I.toChannels(_);return{css:R.toCss(g[0],g[1],g[2]),rgba:_}},b.opacity=function(M,_){var g=Math.round(255*_),E=I.toChannels(M.rgba),N=E[0],A=E[1],w=E[2];return{css:R.toCss(N,A,w,g),rgba:R.toRgba(N,A,w,g)}},(T.css||(T.css={})).toColor=function(M){switch(M.length){case 7:return{css:M,rgba:(parseInt(M.slice(1),16)<<8|255)>>>0};case 9:return{css:M,rgba:parseInt(M.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(M){function _(g,E,N){var A=g/255,w=E/255,S=N/255;return.2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))+.0722*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))}M.relativeLuminance=function(g){return _(g>>16&255,g>>8&255,255&g)},M.relativeLuminance2=_}(v=T.rgb||(T.rgb={})),function(M){function _(E,N,A){for(var w=E>>24&255,S=E>>16&255,O=E>>8&255,F=N>>24&255,z=N>>16&255,K=N>>8&255,j=k(v.relativeLuminance2(F,K,z),v.relativeLuminance2(w,S,O));j0||z>0||K>0);)F-=Math.max(0,Math.ceil(.1*F)),z-=Math.max(0,Math.ceil(.1*z)),K-=Math.max(0,Math.ceil(.1*K)),j=k(v.relativeLuminance2(F,K,z),v.relativeLuminance2(w,S,O));return(F<<24|z<<16|K<<8|255)>>>0}function g(E,N,A){for(var w=E>>24&255,S=E>>16&255,O=E>>8&255,F=N>>24&255,z=N>>16&255,K=N>>8&255,j=k(v.relativeLuminance2(F,K,z),v.relativeLuminance2(w,S,O));j>>0}M.ensureContrastRatio=function(E,N,A){var w=v.relativeLuminance(E>>8),S=v.relativeLuminance(N>>8);if(k(w,S)>24&255,E>>16&255,E>>8&255,255&E]},M.toColor=function(E,N,A){return{css:R.toCss(E,N,A),rgba:R.toRgba(E,N,A)}}}(I=T.rgba||(T.rgba={})),T.toPaddedHex=D,T.contrastRatio=k},7239:function(Z,T){Object.defineProperty(T,"__esModule",{value:!0}),T.ColorContrastCache=void 0;var R=function(){function b(){this._color={},this._rgba={}}return b.prototype.clear=function(){this._color={},this._rgba={}},b.prototype.setCss=function(v,I,D){this._rgba[v]||(this._rgba[v]={}),this._rgba[v][I]=D},b.prototype.getCss=function(v,I){return this._rgba[v]?this._rgba[v][I]:void 0},b.prototype.setColor=function(v,I,D){this._color[v]||(this._color[v]={}),this._color[v][I]=D},b.prototype.getColor=function(v,I){return this._color[v]?this._color[v][I]:void 0},b}();T.ColorContrastCache=R},5680:function(Z,T,R){Object.defineProperty(T,"__esModule",{value:!0}),T.ColorManager=T.DEFAULT_ANSI_COLORS=void 0;var b=R(4774),v=R(7239),I=b.css.toColor("#ffffff"),D=b.css.toColor("#000000"),k=b.css.toColor("#ffffff"),M=b.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};T.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var E=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],N=[0,95,135,175,215,255],A=0;A<216;A++){var w=N[A/36%6|0],S=N[A/6%6|0],O=N[A%6];E.push({css:b.channels.toCss(w,S,O),rgba:b.channels.toRgba(w,S,O)})}for(A=0;A<24;A++){var F=8+10*A;E.push({css:b.channels.toCss(F,F,F),rgba:b.channels.toRgba(F,F,F)})}return E}());var g=function(){function E(N,A){this.allowTransparency=A;var w=N.createElement("canvas");w.width=1,w.height=1;var S=w.getContext("2d");if(!S)throw new Error("Could not get rendering context");this._ctx=S,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new v.ColorContrastCache,this.colors={foreground:I,background:D,cursor:k,cursorAccent:M,selectionTransparent:_,selectionOpaque:b.color.blend(D,_),ansi:T.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return E.prototype.onOptionsChange=function(N){"minimumContrastRatio"===N&&this._contrastCache.clear()},E.prototype.setTheme=function(N){void 0===N&&(N={}),this.colors.foreground=this._parseColor(N.foreground,I),this.colors.background=this._parseColor(N.background,D),this.colors.cursor=this._parseColor(N.cursor,k,!0),this.colors.cursorAccent=this._parseColor(N.cursorAccent,M,!0),this.colors.selectionTransparent=this._parseColor(N.selection,_,!0),this.colors.selectionOpaque=b.color.blend(this.colors.background,this.colors.selectionTransparent),b.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=b.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(N.black,T.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(N.red,T.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(N.green,T.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(N.yellow,T.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(N.blue,T.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(N.magenta,T.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(N.cyan,T.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(N.white,T.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(N.brightBlack,T.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(N.brightRed,T.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(N.brightGreen,T.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(N.brightYellow,T.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(N.brightBlue,T.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(N.brightMagenta,T.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(N.brightCyan,T.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(N.brightWhite,T.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},E.prototype._parseColor=function(N,A,w){if(void 0===w&&(w=this.allowTransparency),void 0===N)return A;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=N,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+N+" is invalid using fallback "+A.css),A;this._ctx.fillRect(0,0,1,1);var S=this._ctx.getImageData(0,0,1,1).data;if(255!==S[3]){if(!w)return console.warn("Color: "+N+" is using transparency, but allowTransparency is false. Using fallback "+A.css+"."),A;var O=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(ee){return Number(ee)}),F=O[0],z=O[1],K=O[2],J=Math.round(255*O[3]);return{rgba:b.channels.toRgba(F,z,K,J),css:N}}return{css:this._ctx.fillStyle,rgba:b.channels.toRgba(S[0],S[1],S[2],S[3])}},E}();T.ColorManager=g},9631:function(Z,T){Object.defineProperty(T,"__esModule",{value:!0}),T.removeElementFromParent=void 0,T.removeElementFromParent=function(){for(var R,b=[],v=0;v=0;O--)(A=_[O])&&(S=(w<3?A(S):w>3?A(g,E,S):A(g,E))||S);return w>3&&S&&Object.defineProperty(g,E,S),S},v=this&&this.__param||function(_,g){return function(E,N){g(E,N,_)}};Object.defineProperty(T,"__esModule",{value:!0}),T.MouseZone=T.Linkifier=void 0;var I=R(8460),D=R(2585),k=function(){function _(g,E,N){this._bufferService=g,this._logService=E,this._unicodeService=N,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new I.EventEmitter,this._onHideLinkUnderline=new I.EventEmitter,this._onLinkTooltip=new I.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(_.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),_.prototype.attachToDom=function(g,E){this._element=g,this._mouseZoneManager=E},_.prototype.linkifyRows=function(g,E){var N=this;this._mouseZoneManager&&(void 0===this._rowsToLinkify.start||void 0===this._rowsToLinkify.end?(this._rowsToLinkify.start=g,this._rowsToLinkify.end=E):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,g),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,E)),this._mouseZoneManager.clearAll(g,E),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return N._linkifyRows()},_._timeBeforeLatency))},_.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var g=this._bufferService.buffer;if(void 0!==this._rowsToLinkify.start&&void 0!==this._rowsToLinkify.end){var E=g.ydisp+this._rowsToLinkify.start;if(!(E>=g.lines.length)){for(var N=g.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,A=Math.ceil(2e3/this._bufferService.cols),w=this._bufferService.buffer.iterator(!1,E,N,A,A);w.hasNext();)for(var S=w.next(),O=0;O=0;E--)if(g.priority<=this._linkMatchers[E].priority)return void this._linkMatchers.splice(E+1,0,g);this._linkMatchers.splice(0,0,g)}else this._linkMatchers.push(g)},_.prototype.deregisterLinkMatcher=function(g){for(var E=0;E>9&511:void 0;N.validationCallback?N.validationCallback(j,function(se){w._rowsTimeoutId||se&&w._addLink(J[1],J[0]-w._bufferService.buffer.ydisp,j,N,ae)}):z._addLink(J[1],J[0]-z._bufferService.buffer.ydisp,j,N,ae)},z=this;null!==(A=S.exec(E))&&"break"!==F(););},_.prototype._addLink=function(g,E,N,A,w){var S=this;if(this._mouseZoneManager&&this._element){var O=this._unicodeService.getStringCellWidth(N),F=g%this._bufferService.cols,z=E+Math.floor(g/this._bufferService.cols),K=(F+O)%this._bufferService.cols,j=z+Math.floor((F+O)/this._bufferService.cols);0===K&&(K=this._bufferService.cols,j--),this._mouseZoneManager.add(new M(F+1,z+1,K+1,j+1,function(J){if(A.handler)return A.handler(J,N);var ee=window.open();ee?(ee.opener=null,ee.location.href=N):console.warn("Opening link blocked as opener could not be cleared")},function(){S._onShowLinkUnderline.fire(S._createLinkHoverEvent(F,z,K,j,w)),S._element.classList.add("xterm-cursor-pointer")},function(J){S._onLinkTooltip.fire(S._createLinkHoverEvent(F,z,K,j,w)),A.hoverTooltipCallback&&A.hoverTooltipCallback(J,N,{start:{x:F,y:z},end:{x:K,y:j}})},function(){S._onHideLinkUnderline.fire(S._createLinkHoverEvent(F,z,K,j,w)),S._element.classList.remove("xterm-cursor-pointer"),A.hoverLeaveCallback&&A.hoverLeaveCallback()},function(J){return!A.willLinkActivate||A.willLinkActivate(J,N)}))}},_.prototype._createLinkHoverEvent=function(g,E,N,A,w){return{x1:g,y1:E,x2:N,y2:A,cols:this._bufferService.cols,fg:w}},_._timeBeforeLatency=200,_=b([v(0,D.IBufferService),v(1,D.ILogService),v(2,D.IUnicodeService)],_)}();T.Linkifier=k;var M=function(g,E,N,A,w,S,O,F,z){this.x1=g,this.y1=E,this.x2=N,this.y2=A,this.clickCallback=w,this.hoverCallback=S,this.tooltipCallback=O,this.leaveCallback=F,this.willLinkActivate=z};T.MouseZone=M},6465:function(Z,T,R){var b,v=this&&this.__extends||(b=function(A,w){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,O){S.__proto__=O}||function(S,O){for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&(S[F]=O[F])})(A,w)},function(N,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function w(){this.constructor=N}b(N,A),N.prototype=null===A?Object.create(A):(w.prototype=A.prototype,new w)}),I=this&&this.__decorate||function(N,A,w,S){var O,F=arguments.length,z=F<3?A:null===S?S=Object.getOwnPropertyDescriptor(A,w):S;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)z=Reflect.decorate(N,A,w,S);else for(var K=N.length-1;K>=0;K--)(O=N[K])&&(z=(F<3?O(z):F>3?O(A,w,z):O(A,w))||z);return F>3&&z&&Object.defineProperty(A,w,z),z},D=this&&this.__param||function(N,A){return function(w,S){A(w,S,N)}};Object.defineProperty(T,"__esModule",{value:!0}),T.Linkifier2=void 0;var k=R(2585),M=R(8460),_=R(844),g=R(3656),E=function(N){function A(w){var S=N.call(this)||this;return S._bufferService=w,S._linkProviders=[],S._linkCacheDisposables=[],S._isMouseOut=!0,S._activeLine=-1,S._onShowLinkUnderline=S.register(new M.EventEmitter),S._onHideLinkUnderline=S.register(new M.EventEmitter),S.register((0,_.getDisposeArrayDisposable)(S._linkCacheDisposables)),S}return v(A,N),Object.defineProperty(A.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),A.prototype.registerLinkProvider=function(w){var S=this;return this._linkProviders.push(w),{dispose:function(){var F=S._linkProviders.indexOf(w);-1!==F&&S._linkProviders.splice(F,1)}}},A.prototype.attachToDom=function(w,S,O){var F=this;this._element=w,this._mouseService=S,this._renderService=O,this.register((0,g.addDisposableDomListener)(this._element,"mouseleave",function(){F._isMouseOut=!0,F._clearCurrentLink()})),this.register((0,g.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,g.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},A.prototype._onMouseMove=function(w){if(this._lastMouseEvent=w,this._element&&this._mouseService){var S=this._positionFromMouseEvent(w,this._element,this._mouseService);if(S){this._isMouseOut=!1;for(var O=w.composedPath(),F=0;Fw?this._bufferService.cols:j.link.range.end.x,$=j.link.range.start.y=w&&this._currentLink.link.range.end.y<=S)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))},A.prototype._handleNewLink=function(w){var S=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var O=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);O&&this._linkAtPosition(w.link,O)&&(this._currentLink=w,this._currentLink.state={decorations:{underline:void 0===w.link.decorations||w.link.decorations.underline,pointerCursor:void 0===w.link.decorations||w.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,w.link,this._lastMouseEvent),w.link.decorations={},Object.defineProperties(w.link.decorations,{pointerCursor:{get:function(){var z,K;return null===(K=null===(z=S._currentLink)||void 0===z?void 0:z.state)||void 0===K?void 0:K.decorations.pointerCursor},set:function(z){var K,j;(null===(K=S._currentLink)||void 0===K?void 0:K.state)&&S._currentLink.state.decorations.pointerCursor!==z&&(S._currentLink.state.decorations.pointerCursor=z,S._currentLink.state.isHovered&&(null===(j=S._element)||void 0===j||j.classList.toggle("xterm-cursor-pointer",z)))}},underline:{get:function(){var z,K;return null===(K=null===(z=S._currentLink)||void 0===z?void 0:z.state)||void 0===K?void 0:K.decorations.underline},set:function(z){var K,j,J;(null===(K=S._currentLink)||void 0===K?void 0:K.state)&&(null===(J=null===(j=S._currentLink)||void 0===j?void 0:j.state)||void 0===J?void 0:J.decorations.underline)!==z&&(S._currentLink.state.decorations.underline=z,S._currentLink.state.isHovered&&S._fireUnderlineEvent(w.link,z))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(F){S._clearCurrentLink(0===F.start?0:F.start+1+S._bufferService.buffer.ydisp,F.end+1+S._bufferService.buffer.ydisp)})))}},A.prototype._linkHover=function(w,S,O){var F;(null===(F=this._currentLink)||void 0===F?void 0:F.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(S,!0),this._currentLink.state.decorations.pointerCursor&&w.classList.add("xterm-cursor-pointer")),S.hover&&S.hover(O,S.text)},A.prototype._fireUnderlineEvent=function(w,S){var O=w.range,F=this._bufferService.buffer.ydisp,z=this._createLinkUnderlineEvent(O.start.x-1,O.start.y-F-1,O.end.x,O.end.y-F-1,void 0);(S?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(z)},A.prototype._linkLeave=function(w,S,O){var F;(null===(F=this._currentLink)||void 0===F?void 0:F.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(S,!1),this._currentLink.state.decorations.pointerCursor&&w.classList.remove("xterm-cursor-pointer")),S.leave&&S.leave(O,S.text)},A.prototype._linkAtPosition=function(w,S){var F=w.range.start.yS.y;return(w.range.start.y===w.range.end.y&&w.range.start.x<=S.x&&w.range.end.x>=S.x||F&&w.range.end.x>=S.x||z&&w.range.start.x<=S.x||F&&z)&&w.range.start.y<=S.y&&w.range.end.y>=S.y},A.prototype._positionFromMouseEvent=function(w,S,O){var F=O.getCoords(w,S,this._bufferService.cols,this._bufferService.rows);if(F)return{x:F[0],y:F[1]+this._bufferService.buffer.ydisp}},A.prototype._createLinkUnderlineEvent=function(w,S,O,F,z){return{x1:w,y1:S,x2:O,y2:F,cols:this._bufferService.cols,fg:z}},I([D(0,k.IBufferService)],A)}(_.Disposable);T.Linkifier2=E},9042:function(Z,T){Object.defineProperty(T,"__esModule",{value:!0}),T.tooMuchOutput=T.promptLabel=void 0,T.promptLabel="Terminal input",T.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(Z,T,R){var b,v=this&&this.__extends||(b=function(A,w){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,O){S.__proto__=O}||function(S,O){for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&(S[F]=O[F])})(A,w)},function(N,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function w(){this.constructor=N}b(N,A),N.prototype=null===A?Object.create(A):(w.prototype=A.prototype,new w)}),I=this&&this.__decorate||function(N,A,w,S){var O,F=arguments.length,z=F<3?A:null===S?S=Object.getOwnPropertyDescriptor(A,w):S;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)z=Reflect.decorate(N,A,w,S);else for(var K=N.length-1;K>=0;K--)(O=N[K])&&(z=(F<3?O(z):F>3?O(A,w,z):O(A,w))||z);return F>3&&z&&Object.defineProperty(A,w,z),z},D=this&&this.__param||function(N,A){return function(w,S){A(w,S,N)}};Object.defineProperty(T,"__esModule",{value:!0}),T.MouseZoneManager=void 0;var k=R(844),M=R(3656),_=R(4725),g=R(2585),E=function(N){function A(w,S,O,F,z,K){var j=N.call(this)||this;return j._element=w,j._screenElement=S,j._bufferService=O,j._mouseService=F,j._selectionService=z,j._optionsService=K,j._zones=[],j._areZonesActive=!1,j._lastHoverCoords=[void 0,void 0],j._initialSelectionLength=0,j.register((0,M.addDisposableDomListener)(j._element,"mousedown",function(J){return j._onMouseDown(J)})),j._mouseMoveListener=function(J){return j._onMouseMove(J)},j._mouseLeaveListener=function(J){return j._onMouseLeave(J)},j._clickListener=function(J){return j._onClick(J)},j}return v(A,N),A.prototype.dispose=function(){N.prototype.dispose.call(this),this._deactivate()},A.prototype.add=function(w){this._zones.push(w),1===this._zones.length&&this._activate()},A.prototype.clearAll=function(w,S){if(0!==this._zones.length){w&&S||(w=0,S=this._bufferService.rows-1);for(var O=0;Ow&&F.y1<=S+1||F.y2>w&&F.y2<=S+1||F.y1S+1)&&(this._currentZone&&this._currentZone===F&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(O--,1))}0===this._zones.length&&this._deactivate()}},A.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},A.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},A.prototype._onMouseMove=function(w){this._lastHoverCoords[0]===w.pageX&&this._lastHoverCoords[1]===w.pageY||(this._onHover(w),this._lastHoverCoords=[w.pageX,w.pageY])},A.prototype._onHover=function(w){var S=this,O=this._findZoneEventAt(w);O!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),O&&(this._currentZone=O,O.hoverCallback&&O.hoverCallback(w),this._tooltipTimeout=window.setTimeout(function(){return S._onTooltip(w)},this._optionsService.options.linkTooltipHoverDuration)))},A.prototype._onTooltip=function(w){this._tooltipTimeout=void 0;var S=this._findZoneEventAt(w);null==S||S.tooltipCallback(w)},A.prototype._onMouseDown=function(w){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var S=this._findZoneEventAt(w);(null==S?void 0:S.willLinkActivate(w))&&(w.preventDefault(),w.stopImmediatePropagation())}},A.prototype._onMouseLeave=function(w){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},A.prototype._onClick=function(w){var S=this._findZoneEventAt(w),O=this._getSelectionLength();S&&O===this._initialSelectionLength&&(S.clickCallback(w),w.preventDefault(),w.stopImmediatePropagation())},A.prototype._getSelectionLength=function(){var w=this._selectionService.selectionText;return w?w.length:0},A.prototype._findZoneEventAt=function(w){var S=this._mouseService.getCoords(w,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(S)for(var O=S[0],F=S[1],z=0;z=K.x1&&O=K.x1||F===K.y2&&OK.y1&&F4)&&je.coreMouseService.triggerMouseEvent({col:en.x-33,row:en.y-33,button:qt,action:bt,ctrl:Ct.ctrlKey,alt:Ct.altKey,shift:Ct.shiftKey})}var Bt={mouseup:null,wheel:null,mousedrag:null,mousemove:null},xt=function(qt){return Qe(qt),qt.buttons||(De._document.removeEventListener("mouseup",Bt.mouseup),Bt.mousedrag&&De._document.removeEventListener("mousemove",Bt.mousedrag)),De.cancel(qt)},vt=function(qt){return Qe(qt),De.cancel(qt,!0)},Qt=function(qt){qt.buttons&&Qe(qt)},Ht=function(qt){qt.buttons||Qe(qt)};this.register(this.coreMouseService.onProtocolChange(function(Ct){Ct?("debug"===De.optionsService.options.logLevel&&De._logService.debug("Binding to mouse events:",De.coreMouseService.explainEvents(Ct)),De.element.classList.add("enable-mouse-events"),De._selectionService.disable()):(De._logService.debug("Unbinding from mouse events."),De.element.classList.remove("enable-mouse-events"),De._selectionService.enable()),8&Ct?Bt.mousemove||(dt.addEventListener("mousemove",Ht),Bt.mousemove=Ht):(dt.removeEventListener("mousemove",Bt.mousemove),Bt.mousemove=null),16&Ct?Bt.wheel||(dt.addEventListener("wheel",vt,{passive:!1}),Bt.wheel=vt):(dt.removeEventListener("wheel",Bt.wheel),Bt.wheel=null),2&Ct?Bt.mouseup||(Bt.mouseup=xt):(De._document.removeEventListener("mouseup",Bt.mouseup),Bt.mouseup=null),4&Ct?Bt.mousedrag||(Bt.mousedrag=Qt):(De._document.removeEventListener("mousemove",Bt.mousedrag),Bt.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,w.addDisposableDomListener)(dt,"mousedown",function(Ct){if(Ct.preventDefault(),De.focus(),De.coreMouseService.areMouseEventsActive&&!De._selectionService.shouldForceSelection(Ct))return Qe(Ct),Bt.mouseup&&De._document.addEventListener("mouseup",Bt.mouseup),Bt.mousedrag&&De._document.addEventListener("mousemove",Bt.mousedrag),De.cancel(Ct)})),this.register((0,w.addDisposableDomListener)(dt,"wheel",function(Ct){if(!Bt.wheel){if(!De.buffer.hasScrollback){var qt=De.viewport.getLinesScrolled(Ct);if(0===qt)return;for(var bt=M.C0.ESC+(De.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ct.deltaY<0?"A":"B"),en="",Nt=0;Nt47)},xe.prototype._keyUp=function(De){var je;this._customKeyEventHandler&&!1===this._customKeyEventHandler(De)||(16===(je=De).keyCode||17===je.keyCode||18===je.keyCode||this.focus(),this.updateCursorStyle(De),this._keyPressHandled=!1)},xe.prototype._keyPress=function(De){var je;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&!1===this._customKeyEventHandler(De))return!1;if(this.cancel(De),De.charCode)je=De.charCode;else if(null==De.which)je=De.keyCode;else{if(0===De.which||0===De.charCode)return!1;je=De.which}return!(!je||(De.altKey||De.ctrlKey||De.metaKey)&&!this._isThirdLevelShift(this.browser,De)||(je=String.fromCharCode(je),this._onKey.fire({key:je,domEvent:De}),this._showCursor(),this.coreService.triggerDataEvent(je,!0),this._keyPressHandled=!0,0))},xe.prototype._inputEvent=function(De){return!(!De.data||"insertText"!==De.inputType||this.optionsService.options.screenReaderMode||this._keyPressHandled||(this.coreService.triggerDataEvent(De.data,!0),this.cancel(De),0))},xe.prototype.bell=function(){var De;this._soundBell()&&(null===(De=this._soundService)||void 0===De||De.playBellSound()),this._onBell.fire()},xe.prototype.resize=function(De,je){De!==this.cols||je!==this.rows?Ft.prototype.resize.call(this,De,je):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},xe.prototype._afterResize=function(De,je){var dt,Qe;null===(dt=this._charSizeService)||void 0===dt||dt.measure(),null===(Qe=this.viewport)||void 0===Qe||Qe.syncScrollArea(!0)},xe.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var De=1;De=this._debounceThresholdMS)this._lastRefreshMs=M,this._innerRefresh();else if(!this._additionalRefreshRequested){var g=this._debounceThresholdMS-(M-this._lastRefreshMs);this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){k._lastRefreshMs=Date.now(),k._innerRefresh(),k._additionalRefreshRequested=!1,k._refreshTimeoutID=void 0},g)}},b.prototype._innerRefresh=function(){if(void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount){var v=Math.max(this._rowStart,0),I=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(v,I)}},b}();T.TimeBasedDebouncer=R},1680:function(Z,T,R){var b,v=this&&this.__extends||(b=function(A,w){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,O){S.__proto__=O}||function(S,O){for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&(S[F]=O[F])})(A,w)},function(N,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function w(){this.constructor=N}b(N,A),N.prototype=null===A?Object.create(A):(w.prototype=A.prototype,new w)}),I=this&&this.__decorate||function(N,A,w,S){var O,F=arguments.length,z=F<3?A:null===S?S=Object.getOwnPropertyDescriptor(A,w):S;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)z=Reflect.decorate(N,A,w,S);else for(var K=N.length-1;K>=0;K--)(O=N[K])&&(z=(F<3?O(z):F>3?O(A,w,z):O(A,w))||z);return F>3&&z&&Object.defineProperty(A,w,z),z},D=this&&this.__param||function(N,A){return function(w,S){A(w,S,N)}};Object.defineProperty(T,"__esModule",{value:!0}),T.Viewport=void 0;var k=R(844),M=R(3656),_=R(4725),g=R(2585),E=function(N){function A(w,S,O,F,z,K,j,J){var ee=N.call(this)||this;return ee._scrollLines=w,ee._viewportElement=S,ee._scrollArea=O,ee._element=F,ee._bufferService=z,ee._optionsService=K,ee._charSizeService=j,ee._renderService=J,ee.scrollBarWidth=0,ee._currentRowHeight=0,ee._currentScaledCellHeight=0,ee._lastRecordedBufferLength=0,ee._lastRecordedViewportHeight=0,ee._lastRecordedBufferHeight=0,ee._lastTouchY=0,ee._lastScrollTop=0,ee._lastHadScrollBar=!1,ee._wheelPartialScroll=0,ee._refreshAnimationFrame=null,ee._ignoreNextScrollEvent=!1,ee.scrollBarWidth=ee._viewportElement.offsetWidth-ee._scrollArea.offsetWidth||15,ee._lastHadScrollBar=!0,ee.register((0,M.addDisposableDomListener)(ee._viewportElement,"scroll",ee._onScroll.bind(ee))),ee._activeBuffer=ee._bufferService.buffer,ee.register(ee._bufferService.buffers.onBufferActivate(function($){return ee._activeBuffer=$.activeBuffer})),ee._renderDimensions=ee._renderService.dimensions,ee.register(ee._renderService.onDimensionsChange(function($){return ee._renderDimensions=$})),setTimeout(function(){return ee.syncScrollArea()},0),ee}return v(A,N),A.prototype.onThemeChange=function(w){this._viewportElement.style.backgroundColor=w.background.css},A.prototype._refresh=function(w){var S=this;if(w)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return S._innerRefresh()}))},A.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var S=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==S&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=S),this.scrollBarWidth=0===this._optionsService.options.scrollback?0:this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var O=window.getComputedStyle(this._element),F=parseInt(O.paddingLeft)+parseInt(O.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?F:0)).toString()+"px",this._refreshAnimationFrame=null},A.prototype.syncScrollArea=function(w){if(void 0===w&&(w=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(w);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight?this._lastHadScrollBar!==this._optionsService.options.scrollback>0&&this._refresh(w):this._refresh(w)},A.prototype._onScroll=function(w){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var S=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(S)}},A.prototype._bubbleScroll=function(w,S){return!(S<0&&0!==this._viewportElement.scrollTop||S>0&&this._viewportElement.scrollTop+this._lastRecordedViewportHeight0?1:-1),this._wheelPartialScroll%=1):w.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(S*=this._bufferService.rows),S},A.prototype._applyScrollModifier=function(w,S){var O=this._optionsService.options.fastScrollModifier;return"alt"===O&&S.altKey||"ctrl"===O&&S.ctrlKey||"shift"===O&&S.shiftKey?w*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:w*this._optionsService.options.scrollSensitivity},A.prototype.onTouchStart=function(w){this._lastTouchY=w.touches[0].pageY},A.prototype.onTouchMove=function(w){var S=this._lastTouchY-w.touches[0].pageY;return this._lastTouchY=w.touches[0].pageY,0!==S&&(this._viewportElement.scrollTop+=S,this._bubbleScroll(w,S))},I([D(4,g.IBufferService),D(5,g.IOptionsService),D(6,_.ICharSizeService),D(7,_.IRenderService)],A)}(k.Disposable);T.Viewport=E},2950:function(Z,T,R){var b=this&&this.__decorate||function(M,_,g,E){var N,A=arguments.length,w=A<3?_:null===E?E=Object.getOwnPropertyDescriptor(_,g):E;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)w=Reflect.decorate(M,_,g,E);else for(var S=M.length-1;S>=0;S--)(N=M[S])&&(w=(A<3?N(w):A>3?N(_,g,w):N(_,g))||w);return A>3&&w&&Object.defineProperty(_,g,w),w},v=this&&this.__param||function(M,_){return function(g,E){_(g,E,M)}};Object.defineProperty(T,"__esModule",{value:!0}),T.CompositionHelper=void 0;var I=R(4725),D=R(2585),k=function(){function M(_,g,E,N,A,w){this._textarea=_,this._compositionView=g,this._bufferService=E,this._optionsService=N,this._coreService=A,this._renderService=w,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(M.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),M.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},M.prototype.compositionupdate=function(_){var g=this;this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout(function(){g._compositionPosition.end=g._textarea.value.length},0)},M.prototype.compositionend=function(){this._finalizeComposition(!0)},M.prototype.keydown=function(_){if(this._isComposing||this._isSendingComposition){if(229===_.keyCode||16===_.keyCode||17===_.keyCode||18===_.keyCode)return!1;this._finalizeComposition(!1)}return 229!==_.keyCode||(this._handleAnyTextareaChanges(),!1)},M.prototype._finalizeComposition=function(_){var g=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){var E={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){var A;g._isSendingComposition&&(g._isSendingComposition=!1,E.start+=g._dataAlreadySent.length,(A=g._isComposing?g._textarea.value.substring(E.start,E.end):g._textarea.value.substring(E.start)).length>0&&g._coreService.triggerDataEvent(A,!0))},0)}else{this._isSendingComposition=!1;var N=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(N,!0)}},M.prototype._handleAnyTextareaChanges=function(){var _=this,g=this._textarea.value;setTimeout(function(){if(!_._isComposing){var E=_._textarea.value.replace(g,"");E.length>0&&(_._dataAlreadySent=E,_._coreService.triggerDataEvent(E,!0))}},0)},M.prototype.updateCompositionElements=function(_){var g=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var E=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),N=this._renderService.dimensions.actualCellHeight,A=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,w=E*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=w+"px",this._compositionView.style.top=A+"px",this._compositionView.style.height=N+"px",this._compositionView.style.lineHeight=N+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var S=this._compositionView.getBoundingClientRect();this._textarea.style.left=w+"px",this._textarea.style.top=A+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}_||setTimeout(function(){return g.updateCompositionElements(!0)},0)}},b([v(2,D.IBufferService),v(3,D.IOptionsService),v(4,D.ICoreService),v(5,I.IRenderService)],M)}();T.CompositionHelper=k},9806:function(Z,T){function R(b,v){var I=v.getBoundingClientRect();return[b.clientX-I.left,b.clientY-I.top]}Object.defineProperty(T,"__esModule",{value:!0}),T.getRawByteCoords=T.getCoords=T.getCoordsRelativeToElement=void 0,T.getCoordsRelativeToElement=R,T.getCoords=function(b,v,I,D,k,M,_,g){if(k){var E=R(b,v);if(E)return E[0]=Math.ceil((E[0]+(g?M/2:0))/M),E[1]=Math.ceil(E[1]/_),E[0]=Math.min(Math.max(E[0],1),I+(g?1:0)),E[1]=Math.min(Math.max(E[1],1),D),E}},T.getRawByteCoords=function(b){if(b)return{x:b[0]+32,y:b[1]+32}}},9504:function(Z,T,R){Object.defineProperty(T,"__esModule",{value:!0}),T.moveToCellSequence=void 0;var b=R(2584);function v(g,E,N,A){var w=g-I(N,g),S=E-I(N,E);return _(Math.abs(w-S)-function(F,z,K){for(var j=0,J=F-I(K,F),ee=z-I(K,z),$=0;$=0&&EE?"A":"B"}function k(g,E,N,A,w,S){for(var O=g,F=E,z="";O!==N||F!==A;)O+=w?1:-1,w&&O>S.cols-1?(z+=S.buffer.translateBufferLineToString(F,!1,g,O),O=0,g=0,F++):!w&&O<0&&(z+=S.buffer.translateBufferLineToString(F,!1,0,g+1),g=O=S.cols-1,F--);return z+S.buffer.translateBufferLineToString(F,!1,g,O)}function M(g,E){return b.C0.ESC+(E?"O":"[")+g}function _(g,E){g=Math.floor(g);for(var N="",A=0;A0?J-I(ee,J):K;var le,oe,Ae,be,it,_t,se=J,ce=(le=z,oe=K,_t=v(Ae=j,be=J,it=ee,$).length>0?be-I(it,be):oe,le=Ae&&_tg?"D":"C",_(Math.abs(S-g),M(w,A));w=O>E?"D":"C";var F=Math.abs(O-E);return _(function(z,K){return K.cols-z}(O>E?g:S,N)+(F-1)*N.cols+1+((O>E?S:g)-1),M(w,A))}},1546:function(Z,T,R){Object.defineProperty(T,"__esModule",{value:!0}),T.BaseRenderLayer=void 0;var b=R(643),v=R(8803),I=R(1420),D=R(3734),k=R(1752),M=R(4774),_=R(9631),g=R(8978),E=function(){function N(A,w,S,O,F,z,K,j){this._container=A,this._alpha=O,this._colors=F,this._rendererId=z,this._bufferService=K,this._optionsService=j,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+w+"-layer"),this._canvas.style.zIndex=S.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return N.prototype.dispose=function(){var A;(0,_.removeElementFromParent)(this._canvas),null===(A=this._charAtlas)||void 0===A||A.dispose()},N.prototype._initCanvas=function(){this._ctx=(0,k.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},N.prototype.onOptionsChanged=function(){},N.prototype.onBlur=function(){},N.prototype.onFocus=function(){},N.prototype.onCursorMove=function(){},N.prototype.onGridChanged=function(A,w){},N.prototype.onSelectionChanged=function(A,w,S){void 0===S&&(S=!1)},N.prototype.setColors=function(A){this._refreshCharAtlas(A)},N.prototype._setTransparency=function(A){if(A!==this._alpha){var w=this._canvas;this._alpha=A,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,w),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},N.prototype._refreshCharAtlas=function(A){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,I.acquireCharAtlas)(this._optionsService.options,this._rendererId,A,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},N.prototype.resize=function(A){this._scaledCellWidth=A.scaledCellWidth,this._scaledCellHeight=A.scaledCellHeight,this._scaledCharWidth=A.scaledCharWidth,this._scaledCharHeight=A.scaledCharHeight,this._scaledCharLeft=A.scaledCharLeft,this._scaledCharTop=A.scaledCharTop,this._canvas.width=A.scaledCanvasWidth,this._canvas.height=A.scaledCanvasHeight,this._canvas.style.width=A.canvasWidth+"px",this._canvas.style.height=A.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},N.prototype.clearTextureAtlas=function(){var A;null===(A=this._charAtlas)||void 0===A||A.clear()},N.prototype._fillCells=function(A,w,S,O){this._ctx.fillRect(A*this._scaledCellWidth,w*this._scaledCellHeight,S*this._scaledCellWidth,O*this._scaledCellHeight)},N.prototype._fillMiddleLineAtCells=function(A,w,S){void 0===S&&(S=1);var O=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(A*this._scaledCellWidth,(w+1)*this._scaledCellHeight-O-window.devicePixelRatio,S*this._scaledCellWidth,window.devicePixelRatio)},N.prototype._fillBottomLineAtCells=function(A,w,S){void 0===S&&(S=1),this._ctx.fillRect(A*this._scaledCellWidth,(w+1)*this._scaledCellHeight-window.devicePixelRatio-1,S*this._scaledCellWidth,window.devicePixelRatio)},N.prototype._fillLeftLineAtCell=function(A,w,S){this._ctx.fillRect(A*this._scaledCellWidth,w*this._scaledCellHeight,window.devicePixelRatio*S,this._scaledCellHeight)},N.prototype._strokeRectAtCell=function(A,w,S,O){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(A*this._scaledCellWidth+window.devicePixelRatio/2,w*this._scaledCellHeight+window.devicePixelRatio/2,S*this._scaledCellWidth-window.devicePixelRatio,O*this._scaledCellHeight-window.devicePixelRatio)},N.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},N.prototype._clearCells=function(A,w,S,O){this._alpha?this._ctx.clearRect(A*this._scaledCellWidth,w*this._scaledCellHeight,S*this._scaledCellWidth,O*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(A*this._scaledCellWidth,w*this._scaledCellHeight,S*this._scaledCellWidth,O*this._scaledCellHeight))},N.prototype._fillCharTrueColor=function(A,w,S){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipRow(S);var O=!1;!1!==this._optionsService.options.customGlyphs&&(O=(0,g.tryDrawCustomChar)(this._ctx,A.getChars(),w*this._scaledCellWidth,S*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),O||this._ctx.fillText(A.getChars(),w*this._scaledCellWidth+this._scaledCharLeft,S*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},N.prototype._drawChars=function(A,w,S){var O,F,z=this._getContrastColor(A);z||A.isFgRGB()||A.isBgRGB()?this._drawUncachedChars(A,w,S,z):(A.isInverse()?(O=A.isBgDefault()?v.INVERTED_DEFAULT_COLOR:A.getBgColor(),F=A.isFgDefault()?v.INVERTED_DEFAULT_COLOR:A.getFgColor()):(F=A.isBgDefault()?b.DEFAULT_COLOR:A.getBgColor(),O=A.isFgDefault()?b.DEFAULT_COLOR:A.getFgColor()),O+=this._optionsService.options.drawBoldTextInBrightColors&&A.isBold()&&O<8?8:0,this._currentGlyphIdentifier.chars=A.getChars()||b.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=A.getCode()||b.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=F,this._currentGlyphIdentifier.fg=O,this._currentGlyphIdentifier.bold=!!A.isBold(),this._currentGlyphIdentifier.dim=!!A.isDim(),this._currentGlyphIdentifier.italic=!!A.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,w*this._scaledCellWidth+this._scaledCharLeft,S*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(A,w,S))},N.prototype._drawUncachedChars=function(A,w,S,O){if(this._ctx.save(),this._ctx.font=this._getFont(!!A.isBold(),!!A.isItalic()),this._ctx.textBaseline=v.TEXT_BASELINE,A.isInverse())if(O)this._ctx.fillStyle=O.css;else if(A.isBgDefault())this._ctx.fillStyle=M.color.opaque(this._colors.background).css;else if(A.isBgRGB())this._ctx.fillStyle="rgb("+D.AttributeData.toColorRGB(A.getBgColor()).join(",")+")";else{var F=A.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&A.isBold()&&F<8&&(F+=8),this._ctx.fillStyle=this._colors.ansi[F].css}else if(O)this._ctx.fillStyle=O.css;else if(A.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(A.isFgRGB())this._ctx.fillStyle="rgb("+D.AttributeData.toColorRGB(A.getFgColor()).join(",")+")";else{var z=A.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&A.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}this._clipRow(S),A.isDim()&&(this._ctx.globalAlpha=v.DIM_OPACITY);var K=!1;!1!==this._optionsService.options.customGlyphs&&(K=(0,g.tryDrawCustomChar)(this._ctx,A.getChars(),w*this._scaledCellWidth,S*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),K||this._ctx.fillText(A.getChars(),w*this._scaledCellWidth+this._scaledCharLeft,S*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},N.prototype._clipRow=function(A){this._ctx.beginPath(),this._ctx.rect(0,A*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},N.prototype._getFont=function(A,w){return(w?"italic":"")+" "+(A?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},N.prototype._getContrastColor=function(A){if(1!==this._optionsService.options.minimumContrastRatio){var w=this._colors.contrastCache.getColor(A.bg,A.fg);if(void 0!==w)return w||void 0;var S=A.getFgColor(),O=A.getFgColorMode(),F=A.getBgColor(),z=A.getBgColorMode(),K=!!A.isInverse(),j=!!A.isInverse();if(K){var J=S;S=F,F=J;var ee=O;O=z,z=ee}var $=this._resolveBackgroundRgba(z,F,K),ae=this._resolveForegroundRgba(O,S,K,j),se=M.rgba.ensureContrastRatio($,ae,this._optionsService.options.minimumContrastRatio);if(se){var ce={css:M.channels.toCss(se>>24&255,se>>16&255,se>>8&255),rgba:se};return this._colors.contrastCache.setColor(A.bg,A.fg,ce),ce}this._colors.contrastCache.setColor(A.bg,A.fg,null)}},N.prototype._resolveBackgroundRgba=function(A,w,S){switch(A){case 16777216:case 33554432:return this._colors.ansi[w].rgba;case 50331648:return w<<8;default:return S?this._colors.foreground.rgba:this._colors.background.rgba}},N.prototype._resolveForegroundRgba=function(A,w,S,O){switch(A){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&O&&w<8&&(w+=8),this._colors.ansi[w].rgba;case 50331648:return w<<8;default:return S?this._colors.background.rgba:this._colors.foreground.rgba}},N}();T.BaseRenderLayer=E},2512:function(Z,T,R){var b,v=this&&this.__extends||(b=function(S,O){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(F,z){F.__proto__=z}||function(F,z){for(var K in z)Object.prototype.hasOwnProperty.call(z,K)&&(F[K]=z[K])})(S,O)},function(w,S){if("function"!=typeof S&&null!==S)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function O(){this.constructor=w}b(w,S),w.prototype=null===S?Object.create(S):(O.prototype=S.prototype,new O)}),I=this&&this.__decorate||function(w,S,O,F){var z,K=arguments.length,j=K<3?S:null===F?F=Object.getOwnPropertyDescriptor(S,O):F;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)j=Reflect.decorate(w,S,O,F);else for(var J=w.length-1;J>=0;J--)(z=w[J])&&(j=(K<3?z(j):K>3?z(S,O,j):z(S,O))||j);return K>3&&j&&Object.defineProperty(S,O,j),j},D=this&&this.__param||function(w,S){return function(O,F){S(O,F,w)}};Object.defineProperty(T,"__esModule",{value:!0}),T.CursorRenderLayer=void 0;var k=R(1546),M=R(511),_=R(2585),g=R(4725),E=600,N=function(w){function S(O,F,z,K,j,J,ee,$,ae){var se=w.call(this,O,"cursor",F,!0,z,K,J,ee)||this;return se._onRequestRedraw=j,se._coreService=$,se._coreBrowserService=ae,se._cell=new M.CellData,se._state={x:0,y:0,isFocused:!1,style:"",width:0},se._cursorRenderers={bar:se._renderBarCursor.bind(se),block:se._renderBlockCursor.bind(se),underline:se._renderUnderlineCursor.bind(se)},se}return v(S,w),S.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),w.prototype.dispose.call(this)},S.prototype.resize=function(O){w.prototype.resize.call(this,O),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},S.prototype.reset=function(){var O;this._clearCursor(),null===(O=this._cursorBlinkStateManager)||void 0===O||O.restartBlinkAnimation(),this.onOptionsChanged()},S.prototype.onBlur=function(){var O;null===(O=this._cursorBlinkStateManager)||void 0===O||O.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},S.prototype.onFocus=function(){var O;null===(O=this._cursorBlinkStateManager)||void 0===O||O.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},S.prototype.onOptionsChanged=function(){var O,F=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new A(this._coreBrowserService.isFocused,function(){F._render(!0)})):(null===(O=this._cursorBlinkStateManager)||void 0===O||O.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},S.prototype.onCursorMove=function(){var O;null===(O=this._cursorBlinkStateManager)||void 0===O||O.restartBlinkAnimation()},S.prototype.onGridChanged=function(O,F){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},S.prototype._render=function(O){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var F=this._bufferService.buffer.ybase+this._bufferService.buffer.y,z=F-this._bufferService.buffer.ydisp;if(z<0||z>=this._bufferService.rows)this._clearCursor();else{var K=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(F).loadCell(K,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var j=this._optionsService.options.cursorStyle;return j&&"block"!==j?this._cursorRenderers[j](K,z,this._cell):this._renderBlurCursor(K,z,this._cell),this._ctx.restore(),this._state.x=K,this._state.y=z,this._state.isFocused=!1,this._state.style=j,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===K&&this._state.y===z&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](K,z,this._cell),this._ctx.restore(),this._state.x=K,this._state.y=z,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},S.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},S.prototype._renderBarCursor=function(O,F,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(O,F,this._optionsService.options.cursorWidth),this._ctx.restore()},S.prototype._renderBlockCursor=function(O,F,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(O,F,z.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(z,O,F),this._ctx.restore()},S.prototype._renderUnderlineCursor=function(O,F,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(O,F),this._ctx.restore()},S.prototype._renderBlurCursor=function(O,F,z){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(O,F,z.getWidth(),1),this._ctx.restore()},I([D(5,_.IBufferService),D(6,_.IOptionsService),D(7,_.ICoreService),D(8,g.ICoreBrowserService)],S)}(k.BaseRenderLayer);T.CursorRenderLayer=N;var A=function(){function w(S,O){this._renderCallback=O,this.isCursorVisible=!0,S&&this._restartInterval()}return Object.defineProperty(w.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),w.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},w.prototype.restartBlinkAnimation=function(){var S=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){S._renderCallback(),S._animationFrame=void 0})))},w.prototype._restartInterval=function(S){var O=this;void 0===S&&(S=E),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(O._animationTimeRestarted){var F=E-(Date.now()-O._animationTimeRestarted);if(O._animationTimeRestarted=void 0,F>0)return void O._restartInterval(F)}O.isCursorVisible=!1,O._animationFrame=window.requestAnimationFrame(function(){O._renderCallback(),O._animationFrame=void 0}),O._blinkInterval=window.setInterval(function(){if(O._animationTimeRestarted){var z=E-(Date.now()-O._animationTimeRestarted);return O._animationTimeRestarted=void 0,void O._restartInterval(z)}O.isCursorVisible=!O.isCursorVisible,O._animationFrame=window.requestAnimationFrame(function(){O._renderCallback(),O._animationFrame=void 0})},E)},S)},w.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},w.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},w}()},8978:function(Z,T,R){var b,v,I,D,k,M,_,g,E,N,A,w,S,O,F,z,K,j,J,ee,$,ae,se,ce,le,oe,Ae,be,it,qe,_t,yt,Ft,xe,De,je,dt,Qe,Bt,xt,vt,Qt,Ht,Ct,qt,bt,en,Nt,rn,En,Zn,In,$n,Rn,wn,yr,ut,He,ve,ye,Te,we,ct,ft,Yt,Kt,Jt,nn,ln,yn,Tn,Pn,Yn,Cn,Sn,tr,cr,Ut,Rt,Lt,Pe,rt,he,Ie,Ne,Le,ze,At,an,qn,Nr,Vr,br,Jr,lo,Ri,_o,uo,Jo,wi,to,bi,Wi,co,pi,Bo,Ei,Wn,Ot,jt,Pt,Vt,Gt,Xt,gn,Gn,jn,zn,ai,Ci,no,yo,Li,Oo,Qo,wo,ri,Uo;Object.defineProperty(T,"__esModule",{value:!0}),T.tryDrawCustomChar=T.boxDrawingDefinitions=T.blockElementDefinitions=void 0;var ro=R(1752);T.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258a":[{x:0,y:0,w:6,h:8}],"\u258b":[{x:0,y:0,w:5,h:8}],"\u258c":[{x:0,y:0,w:4,h:8}],"\u258d":[{x:0,y:0,w:3,h:8}],"\u258e":[{x:0,y:0,w:2,h:8}],"\u258f":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:9,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259a":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259b":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"\u259c":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259d":[{x:4,y:0,w:4,h:4}],"\u259e":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259f":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\ud83e\udf70":[{x:1,y:0,w:1,h:8}],"\ud83e\udf71":[{x:2,y:0,w:1,h:8}],"\ud83e\udf72":[{x:3,y:0,w:1,h:8}],"\ud83e\udf73":[{x:4,y:0,w:1,h:8}],"\ud83e\udf74":[{x:5,y:0,w:1,h:8}],"\ud83e\udf75":[{x:6,y:0,w:1,h:8}],"\ud83e\udf76":[{x:0,y:1,w:8,h:1}],"\ud83e\udf77":[{x:0,y:2,w:8,h:1}],"\ud83e\udf78":[{x:0,y:3,w:8,h:1}],"\ud83e\udf79":[{x:0,y:4,w:8,h:1}],"\ud83e\udf7a":[{x:0,y:5,w:8,h:1}],"\ud83e\udf7b":[{x:0,y:6,w:8,h:1}],"\ud83e\udf7c":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\ud83e\udf7d":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\ud83e\udf7e":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\ud83e\udf7f":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\ud83e\udf80":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\ud83e\udf81":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\ud83e\udf82":[{x:0,y:0,w:8,h:2}],"\ud83e\udf83":[{x:0,y:0,w:8,h:3}],"\ud83e\udf84":[{x:0,y:0,w:8,h:5}],"\ud83e\udf85":[{x:0,y:0,w:8,h:6}],"\ud83e\udf86":[{x:0,y:0,w:8,h:7}],"\ud83e\udf87":[{x:6,y:0,w:2,h:8}],"\ud83e\udf88":[{x:5,y:0,w:3,h:8}],"\ud83e\udf89":[{x:3,y:0,w:5,h:8}],"\ud83e\udf8a":[{x:2,y:0,w:6,h:8}],"\ud83e\udf8b":[{x:1,y:0,w:7,h:8}],"\ud83e\udf95":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\ud83e\udf96":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\ud83e\udf97":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var qi={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};T.boxDrawingDefinitions={"\u2500":(b={},b[1]="M0,.5 L1,.5",b),"\u2501":(v={},v[3]="M0,.5 L1,.5",v),"\u2502":(I={},I[1]="M.5,0 L.5,1",I),"\u2503":(D={},D[3]="M.5,0 L.5,1",D),"\u250c":(k={},k[1]="M0.5,1 L.5,.5 L1,.5",k),"\u250f":(M={},M[3]="M0.5,1 L.5,.5 L1,.5",M),"\u2510":(_={},_[1]="M0,.5 L.5,.5 L.5,1",_),"\u2513":(g={},g[3]="M0,.5 L.5,.5 L.5,1",g),"\u2514":(E={},E[1]="M.5,0 L.5,.5 L1,.5",E),"\u2517":(N={},N[3]="M.5,0 L.5,.5 L1,.5",N),"\u2518":(A={},A[1]="M.5,0 L.5,.5 L0,.5",A),"\u251b":(w={},w[3]="M.5,0 L.5,.5 L0,.5",w),"\u251c":(S={},S[1]="M.5,0 L.5,1 M.5,.5 L1,.5",S),"\u2523":(O={},O[3]="M.5,0 L.5,1 M.5,.5 L1,.5",O),"\u2524":(F={},F[1]="M.5,0 L.5,1 M.5,.5 L0,.5",F),"\u252b":(z={},z[3]="M.5,0 L.5,1 M.5,.5 L0,.5",z),"\u252c":(K={},K[1]="M0,.5 L1,.5 M.5,.5 L.5,1",K),"\u2533":(j={},j[3]="M0,.5 L1,.5 M.5,.5 L.5,1",j),"\u2534":(J={},J[1]="M0,.5 L1,.5 M.5,.5 L.5,0",J),"\u253b":(ee={},ee[3]="M0,.5 L1,.5 M.5,.5 L.5,0",ee),"\u253c":($={},$[1]="M0,.5 L1,.5 M.5,0 L.5,1",$),"\u254b":(ae={},ae[3]="M0,.5 L1,.5 M.5,0 L.5,1",ae),"\u2574":(se={},se[1]="M.5,.5 L0,.5",se),"\u2578":(ce={},ce[3]="M.5,.5 L0,.5",ce),"\u2575":(le={},le[1]="M.5,.5 L.5,0",le),"\u2579":(oe={},oe[3]="M.5,.5 L.5,0",oe),"\u2576":(Ae={},Ae[1]="M.5,.5 L1,.5",Ae),"\u257a":(be={},be[3]="M.5,.5 L1,.5",be),"\u2577":(it={},it[1]="M.5,.5 L.5,1",it),"\u257b":(qe={},qe[3]="M.5,.5 L.5,1",qe),"\u2550":(_t={},_t[1]=function(fn,vn){return"M0,"+(.5-vn)+" L1,"+(.5-vn)+" M0,"+(.5+vn)+" L1,"+(.5+vn)},_t),"\u2551":(yt={},yt[1]=function(fn,vn){return"M"+(.5-fn)+",0 L"+(.5-fn)+",1 M"+(.5+fn)+",0 L"+(.5+fn)+",1"},yt),"\u2552":(Ft={},Ft[1]=function(fn,vn){return"M.5,1 L.5,"+(.5-vn)+" L1,"+(.5-vn)+" M.5,"+(.5+vn)+" L1,"+(.5+vn)},Ft),"\u2553":(xe={},xe[1]=function(fn,vn){return"M"+(.5-fn)+",1 L"+(.5-fn)+",.5 L1,.5 M"+(.5+fn)+",.5 L"+(.5+fn)+",1"},xe),"\u2554":(De={},De[1]=function(fn,vn){return"M1,"+(.5-vn)+" L"+(.5-fn)+","+(.5-vn)+" L"+(.5-fn)+",1 M1,"+(.5+vn)+" L"+(.5+fn)+","+(.5+vn)+" L"+(.5+fn)+",1"},De),"\u2555":(je={},je[1]=function(fn,vn){return"M0,"+(.5-vn)+" L.5,"+(.5-vn)+" L.5,1 M0,"+(.5+vn)+" L.5,"+(.5+vn)},je),"\u2556":(dt={},dt[1]=function(fn,vn){return"M"+(.5+fn)+",1 L"+(.5+fn)+",.5 L0,.5 M"+(.5-fn)+",.5 L"+(.5-fn)+",1"},dt),"\u2557":(Qe={},Qe[1]=function(fn,vn){return"M0,"+(.5+vn)+" L"+(.5-fn)+","+(.5+vn)+" L"+(.5-fn)+",1 M0,"+(.5-vn)+" L"+(.5+fn)+","+(.5-vn)+" L"+(.5+fn)+",1"},Qe),"\u2558":(Bt={},Bt[1]=function(fn,vn){return"M.5,0 L.5,"+(.5+vn)+" L1,"+(.5+vn)+" M.5,"+(.5-vn)+" L1,"+(.5-vn)},Bt),"\u2559":(xt={},xt[1]=function(fn,vn){return"M1,.5 L"+(.5-fn)+",.5 L"+(.5-fn)+",0 M"+(.5+fn)+",.5 L"+(.5+fn)+",0"},xt),"\u255a":(vt={},vt[1]=function(fn,vn){return"M1,"+(.5-vn)+" L"+(.5+fn)+","+(.5-vn)+" L"+(.5+fn)+",0 M1,"+(.5+vn)+" L"+(.5-fn)+","+(.5+vn)+" L"+(.5-fn)+",0"},vt),"\u255b":(Qt={},Qt[1]=function(fn,vn){return"M0,"+(.5+vn)+" L.5,"+(.5+vn)+" L.5,0 M0,"+(.5-vn)+" L.5,"+(.5-vn)},Qt),"\u255c":(Ht={},Ht[1]=function(fn,vn){return"M0,.5 L"+(.5+fn)+",.5 L"+(.5+fn)+",0 M"+(.5-fn)+",.5 L"+(.5-fn)+",0"},Ht),"\u255d":(Ct={},Ct[1]=function(fn,vn){return"M0,"+(.5-vn)+" L"+(.5-fn)+","+(.5-vn)+" L"+(.5-fn)+",0 M0,"+(.5+vn)+" L"+(.5+fn)+","+(.5+vn)+" L"+(.5+fn)+",0"},Ct),"\u255e":(qt={},qt[1]=function(fn,vn){return"M.5,0 L.5,1 M.5,"+(.5-vn)+" L1,"+(.5-vn)+" M.5,"+(.5+vn)+" L1,"+(.5+vn)},qt),"\u255f":(bt={},bt[1]=function(fn,vn){return"M"+(.5-fn)+",0 L"+(.5-fn)+",1 M"+(.5+fn)+",0 L"+(.5+fn)+",1 M"+(.5+fn)+",.5 L1,.5"},bt),"\u2560":(en={},en[1]=function(fn,vn){return"M"+(.5-fn)+",0 L"+(.5-fn)+",1 M1,"+(.5+vn)+" L"+(.5+fn)+","+(.5+vn)+" L"+(.5+fn)+",1 M1,"+(.5-vn)+" L"+(.5+fn)+","+(.5-vn)+" L"+(.5+fn)+",0"},en),"\u2561":(Nt={},Nt[1]=function(fn,vn){return"M.5,0 L.5,1 M0,"+(.5-vn)+" L.5,"+(.5-vn)+" M0,"+(.5+vn)+" L.5,"+(.5+vn)},Nt),"\u2562":(rn={},rn[1]=function(fn,vn){return"M0,.5 L"+(.5-fn)+",.5 M"+(.5-fn)+",0 L"+(.5-fn)+",1 M"+(.5+fn)+",0 L"+(.5+fn)+",1"},rn),"\u2563":(En={},En[1]=function(fn,vn){return"M"+(.5+fn)+",0 L"+(.5+fn)+",1 M0,"+(.5+vn)+" L"+(.5-fn)+","+(.5+vn)+" L"+(.5-fn)+",1 M0,"+(.5-vn)+" L"+(.5-fn)+","+(.5-vn)+" L"+(.5-fn)+",0"},En),"\u2564":(Zn={},Zn[1]=function(fn,vn){return"M0,"+(.5-vn)+" L1,"+(.5-vn)+" M0,"+(.5+vn)+" L1,"+(.5+vn)+" M.5,"+(.5+vn)+" L.5,1"},Zn),"\u2565":(In={},In[1]=function(fn,vn){return"M0,.5 L1,.5 M"+(.5-fn)+",.5 L"+(.5-fn)+",1 M"+(.5+fn)+",.5 L"+(.5+fn)+",1"},In),"\u2566":($n={},$n[1]=function(fn,vn){return"M0,"+(.5-vn)+" L1,"+(.5-vn)+" M0,"+(.5+vn)+" L"+(.5-fn)+","+(.5+vn)+" L"+(.5-fn)+",1 M1,"+(.5+vn)+" L"+(.5+fn)+","+(.5+vn)+" L"+(.5+fn)+",1"},$n),"\u2567":(Rn={},Rn[1]=function(fn,vn){return"M.5,0 L.5,"+(.5-vn)+" M0,"+(.5-vn)+" L1,"+(.5-vn)+" M0,"+(.5+vn)+" L1,"+(.5+vn)},Rn),"\u2568":(wn={},wn[1]=function(fn,vn){return"M0,.5 L1,.5 M"+(.5-fn)+",.5 L"+(.5-fn)+",0 M"+(.5+fn)+",.5 L"+(.5+fn)+",0"},wn),"\u2569":(yr={},yr[1]=function(fn,vn){return"M0,"+(.5+vn)+" L1,"+(.5+vn)+" M0,"+(.5-vn)+" L"+(.5-fn)+","+(.5-vn)+" L"+(.5-fn)+",0 M1,"+(.5-vn)+" L"+(.5+fn)+","+(.5-vn)+" L"+(.5+fn)+",0"},yr),"\u256a":(ut={},ut[1]=function(fn,vn){return"M.5,0 L.5,1 M0,"+(.5-vn)+" L1,"+(.5-vn)+" M0,"+(.5+vn)+" L1,"+(.5+vn)},ut),"\u256b":(He={},He[1]=function(fn,vn){return"M0,.5 L1,.5 M"+(.5-fn)+",0 L"+(.5-fn)+",1 M"+(.5+fn)+",0 L"+(.5+fn)+",1"},He),"\u256c":(ve={},ve[1]=function(fn,vn){return"M0,"+(.5+vn)+" L"+(.5-fn)+","+(.5+vn)+" L"+(.5-fn)+",1 M1,"+(.5+vn)+" L"+(.5+fn)+","+(.5+vn)+" L"+(.5+fn)+",1 M0,"+(.5-vn)+" L"+(.5-fn)+","+(.5-vn)+" L"+(.5-fn)+",0 M1,"+(.5-vn)+" L"+(.5+fn)+","+(.5-vn)+" L"+(.5+fn)+",0"},ve),"\u2571":(ye={},ye[1]="M1,0 L0,1",ye),"\u2572":(Te={},Te[1]="M0,0 L1,1",Te),"\u2573":(we={},we[1]="M1,0 L0,1 M0,0 L1,1",we),"\u257c":(ct={},ct[1]="M.5,.5 L0,.5",ct[3]="M.5,.5 L1,.5",ct),"\u257d":(ft={},ft[1]="M.5,.5 L.5,0",ft[3]="M.5,.5 L.5,1",ft),"\u257e":(Yt={},Yt[1]="M.5,.5 L1,.5",Yt[3]="M.5,.5 L0,.5",Yt),"\u257f":(Kt={},Kt[1]="M.5,.5 L.5,1",Kt[3]="M.5,.5 L.5,0",Kt),"\u250d":(Jt={},Jt[1]="M.5,.5 L.5,1",Jt[3]="M.5,.5 L1,.5",Jt),"\u250e":(nn={},nn[1]="M.5,.5 L1,.5",nn[3]="M.5,.5 L.5,1",nn),"\u2511":(ln={},ln[1]="M.5,.5 L.5,1",ln[3]="M.5,.5 L0,.5",ln),"\u2512":(yn={},yn[1]="M.5,.5 L0,.5",yn[3]="M.5,.5 L.5,1",yn),"\u2515":(Tn={},Tn[1]="M.5,.5 L.5,0",Tn[3]="M.5,.5 L1,.5",Tn),"\u2516":(Pn={},Pn[1]="M.5,.5 L1,.5",Pn[3]="M.5,.5 L.5,0",Pn),"\u2519":(Yn={},Yn[1]="M.5,.5 L.5,0",Yn[3]="M.5,.5 L0,.5",Yn),"\u251a":(Cn={},Cn[1]="M.5,.5 L0,.5",Cn[3]="M.5,.5 L.5,0",Cn),"\u251d":(Sn={},Sn[1]="M.5,0 L.5,1",Sn[3]="M.5,.5 L1,.5",Sn),"\u251e":(tr={},tr[1]="M0.5,1 L.5,.5 L1,.5",tr[3]="M.5,.5 L.5,0",tr),"\u251f":(cr={},cr[1]="M.5,0 L.5,.5 L1,.5",cr[3]="M.5,.5 L.5,1",cr),"\u2520":(Ut={},Ut[1]="M.5,.5 L1,.5",Ut[3]="M.5,0 L.5,1",Ut),"\u2521":(Rt={},Rt[1]="M.5,.5 L.5,1",Rt[3]="M.5,0 L.5,.5 L1,.5",Rt),"\u2522":(Lt={},Lt[1]="M.5,.5 L.5,0",Lt[3]="M0.5,1 L.5,.5 L1,.5",Lt),"\u2525":(Pe={},Pe[1]="M.5,0 L.5,1",Pe[3]="M.5,.5 L0,.5",Pe),"\u2526":(rt={},rt[1]="M0,.5 L.5,.5 L.5,1",rt[3]="M.5,.5 L.5,0",rt),"\u2527":(he={},he[1]="M.5,0 L.5,.5 L0,.5",he[3]="M.5,.5 L.5,1",he),"\u2528":(Ie={},Ie[1]="M.5,.5 L0,.5",Ie[3]="M.5,0 L.5,1",Ie),"\u2529":(Ne={},Ne[1]="M.5,.5 L.5,1",Ne[3]="M.5,0 L.5,.5 L0,.5",Ne),"\u252a":(Le={},Le[1]="M.5,.5 L.5,0",Le[3]="M0,.5 L.5,.5 L.5,1",Le),"\u252d":(ze={},ze[1]="M0.5,1 L.5,.5 L1,.5",ze[3]="M.5,.5 L0,.5",ze),"\u252e":(At={},At[1]="M0,.5 L.5,.5 L.5,1",At[3]="M.5,.5 L1,.5",At),"\u252f":(an={},an[1]="M.5,.5 L.5,1",an[3]="M0,.5 L1,.5",an),"\u2530":(qn={},qn[1]="M0,.5 L1,.5",qn[3]="M.5,.5 L.5,1",qn),"\u2531":(Nr={},Nr[1]="M.5,.5 L1,.5",Nr[3]="M0,.5 L.5,.5 L.5,1",Nr),"\u2532":(Vr={},Vr[1]="M.5,.5 L0,.5",Vr[3]="M0.5,1 L.5,.5 L1,.5",Vr),"\u2535":(br={},br[1]="M.5,0 L.5,.5 L1,.5",br[3]="M.5,.5 L0,.5",br),"\u2536":(Jr={},Jr[1]="M.5,0 L.5,.5 L0,.5",Jr[3]="M.5,.5 L1,.5",Jr),"\u2537":(lo={},lo[1]="M.5,.5 L.5,0",lo[3]="M0,.5 L1,.5",lo),"\u2538":(Ri={},Ri[1]="M0,.5 L1,.5",Ri[3]="M.5,.5 L.5,0",Ri),"\u2539":(_o={},_o[1]="M.5,.5 L1,.5",_o[3]="M.5,0 L.5,.5 L0,.5",_o),"\u253a":(uo={},uo[1]="M.5,.5 L0,.5",uo[3]="M.5,0 L.5,.5 L1,.5",uo),"\u253d":(Jo={},Jo[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Jo[3]="M.5,.5 L0,.5",Jo),"\u253e":(wi={},wi[1]="M.5,0 L.5,1 M.5,.5 L0,.5",wi[3]="M.5,.5 L1,.5",wi),"\u253f":(to={},to[1]="M.5,0 L.5,1",to[3]="M0,.5 L1,.5",to),"\u2540":(bi={},bi[1]="M0,.5 L1,.5 M.5,.5 L.5,1",bi[3]="M.5,.5 L.5,0",bi),"\u2541":(Wi={},Wi[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Wi[3]="M.5,.5 L.5,1",Wi),"\u2542":(co={},co[1]="M0,.5 L1,.5",co[3]="M.5,0 L.5,1",co),"\u2543":(pi={},pi[1]="M0.5,1 L.5,.5 L1,.5",pi[3]="M.5,0 L.5,.5 L0,.5",pi),"\u2544":(Bo={},Bo[1]="M0,.5 L.5,.5 L.5,1",Bo[3]="M.5,0 L.5,.5 L1,.5",Bo),"\u2545":(Ei={},Ei[1]="M.5,0 L.5,.5 L1,.5",Ei[3]="M0,.5 L.5,.5 L.5,1",Ei),"\u2546":(Wn={},Wn[1]="M.5,0 L.5,.5 L0,.5",Wn[3]="M0.5,1 L.5,.5 L1,.5",Wn),"\u2547":(Ot={},Ot[1]="M.5,.5 L.5,1",Ot[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Ot),"\u2548":(jt={},jt[1]="M.5,.5 L.5,0",jt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",jt),"\u2549":(Pt={},Pt[1]="M.5,.5 L1,.5",Pt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Pt),"\u254a":(Vt={},Vt[1]="M.5,.5 L0,.5",Vt[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Vt),"\u254c":(Gt={},Gt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Gt),"\u254d":(Xt={},Xt[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Xt),"\u2504":(gn={},gn[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",gn),"\u2505":(Gn={},Gn[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Gn),"\u2508":(jn={},jn[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",jn),"\u2509":(zn={},zn[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",zn),"\u254e":(ai={},ai[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",ai),"\u254f":(Ci={},Ci[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Ci),"\u2506":(no={},no[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",no),"\u2507":(yo={},yo[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",yo),"\u250a":(Li={},Li[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Li),"\u250b":(Oo={},Oo[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Oo),"\u256d":(Qo={},Qo[1]="C.5,1,.5,.5,1,.5",Qo),"\u256e":(wo={},wo[1]="C.5,1,.5,.5,0,.5",wo),"\u256f":(ri={},ri[1]="C.5,0,.5,.5,0,.5",ri),"\u2570":(Uo={},Uo[1]="C.5,0,.5,.5,1,.5",Uo)},T.tryDrawCustomChar=function(fn,vn,fr,po,ha,Ti){var bo=T.blockElementDefinitions[vn];if(bo)return function(Eo,Po,hs,Co,va,Ma){for(var Vo=0;Vo7&&parseInt(Fi.substr(7,2),16)||1;else{if(!Fi.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+Fi+'" when drawing pattern glyph');Da=(Vo=Fi.substring(5,Fi.length-1).split(",").map(function(Mu){return parseFloat(Mu)}))[0],Bi=Vo[1],Va=Vo[2],ar=Vo[3]}for(var ji=0;ji<_a;ji++)for(var qa=0;qa=0;K--)(O=N[K])&&(z=(F<3?O(z):F>3?O(A,w,z):O(A,w))||z);return F>3&&z&&Object.defineProperty(A,w,z),z},D=this&&this.__param||function(N,A){return function(w,S){A(w,S,N)}};Object.defineProperty(T,"__esModule",{value:!0}),T.LinkRenderLayer=void 0;var k=R(1546),M=R(8803),_=R(2040),g=R(2585),E=function(N){function A(w,S,O,F,z,K,j,J){var ee=N.call(this,w,"link",S,!0,O,F,j,J)||this;return z.onShowLinkUnderline(function($){return ee._onShowLinkUnderline($)}),z.onHideLinkUnderline(function($){return ee._onHideLinkUnderline($)}),K.onShowLinkUnderline(function($){return ee._onShowLinkUnderline($)}),K.onHideLinkUnderline(function($){return ee._onHideLinkUnderline($)}),ee}return v(A,N),A.prototype.resize=function(w){N.prototype.resize.call(this,w),this._state=void 0},A.prototype.reset=function(){this._clearCurrentLink()},A.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var w=this._state.y2-this._state.y1-1;w>0&&this._clearCells(0,this._state.y1+1,this._state.cols,w),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},A.prototype._onShowLinkUnderline=function(w){if(this._ctx.fillStyle=w.fg===M.INVERTED_DEFAULT_COLOR?this._colors.background.css:w.fg&&(0,_.is256Color)(w.fg)?this._colors.ansi[w.fg].css:this._colors.foreground.css,w.y1===w.y2)this._fillBottomLineAtCells(w.x1,w.y1,w.x2-w.x1);else{this._fillBottomLineAtCells(w.x1,w.y1,w.cols-w.x1);for(var S=w.y1+1;S=0;se--)(ee=z[se])&&(ae=($<3?ee(ae):$>3?ee(K,j,ae):ee(K,j))||ae);return $>3&&ae&&Object.defineProperty(K,j,ae),ae},D=this&&this.__param||function(z,K){return function(j,J){K(j,J,z)}};Object.defineProperty(T,"__esModule",{value:!0}),T.Renderer=void 0;var k=R(9596),M=R(4149),_=R(2512),g=R(5098),E=R(844),N=R(4725),A=R(2585),w=R(1420),S=R(8460),O=1,F=function(z){function K(j,J,ee,$,ae,se,ce,le){var oe=z.call(this)||this;return oe._colors=j,oe._screenElement=J,oe._bufferService=se,oe._charSizeService=ce,oe._optionsService=le,oe._id=O++,oe._onRequestRedraw=new S.EventEmitter,oe._renderLayers=[ae.createInstance(k.TextRenderLayer,oe._screenElement,0,oe._colors,oe._optionsService.options.allowTransparency,oe._id),ae.createInstance(M.SelectionRenderLayer,oe._screenElement,1,oe._colors,oe._id),ae.createInstance(g.LinkRenderLayer,oe._screenElement,2,oe._colors,oe._id,ee,$),ae.createInstance(_.CursorRenderLayer,oe._screenElement,3,oe._colors,oe._id,oe._onRequestRedraw)],oe.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},oe._devicePixelRatio=window.devicePixelRatio,oe._updateDimensions(),oe.onOptionsChanged(),oe}return v(K,z),Object.defineProperty(K.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),K.prototype.dispose=function(){for(var j=0,J=this._renderLayers;j=0;F--)(w=g[F])&&(O=(S<3?w(O):S>3?w(E,N,O):w(E,N))||O);return S>3&&O&&Object.defineProperty(E,N,O),O},D=this&&this.__param||function(g,E){return function(N,A){E(N,A,g)}};Object.defineProperty(T,"__esModule",{value:!0}),T.SelectionRenderLayer=void 0;var k=R(1546),M=R(2585),_=function(g){function E(N,A,w,S,O,F){var z=g.call(this,N,"selection",A,!0,w,S,O,F)||this;return z._clearState(),z}return v(E,g),E.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},E.prototype.resize=function(N){g.prototype.resize.call(this,N),this._clearState()},E.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},E.prototype.onSelectionChanged=function(N,A,w){if(this._didStateChange(N,A,w,this._bufferService.buffer.ydisp))if(this._clearAll(),N&&A){var S=N[1]-this._bufferService.buffer.ydisp,O=A[1]-this._bufferService.buffer.ydisp,F=Math.max(S,0),z=Math.min(O,this._bufferService.rows-1);if(F>=this._bufferService.rows||z<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,w){var K=N[0];this._fillCells(K,F,A[0]-K,z-F+1)}else{this._fillCells(K=S===F?N[0]:0,F,(F===O?A[0]:this._bufferService.cols)-K,1);var $=Math.max(z-F-1,0);this._fillCells(0,F+1,this._bufferService.cols,$),F!==z&&this._fillCells(0,z,O===z?A[0]:this._bufferService.cols,1)}this._state.start=[N[0],N[1]],this._state.end=[A[0],A[1]],this._state.columnSelectMode=w,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},E.prototype._didStateChange=function(N,A,w,S){return!this._areCoordinatesEqual(N,this._state.start)||!this._areCoordinatesEqual(A,this._state.end)||w!==this._state.columnSelectMode||S!==this._state.ydisp},E.prototype._areCoordinatesEqual=function(N,A){return!(!N||!A)&&N[0]===A[0]&&N[1]===A[1]},I([D(4,M.IBufferService),D(5,M.IOptionsService)],E)}(k.BaseRenderLayer);T.SelectionRenderLayer=_},9596:function(Z,T,R){var b,v=this&&this.__extends||(b=function(F,z){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,j){K.__proto__=j}||function(K,j){for(var J in j)Object.prototype.hasOwnProperty.call(j,J)&&(K[J]=j[J])})(F,z)},function(O,F){if("function"!=typeof F&&null!==F)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");function z(){this.constructor=O}b(O,F),O.prototype=null===F?Object.create(F):(z.prototype=F.prototype,new z)}),I=this&&this.__decorate||function(O,F,z,K){var j,J=arguments.length,ee=J<3?F:null===K?K=Object.getOwnPropertyDescriptor(F,z):K;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)ee=Reflect.decorate(O,F,z,K);else for(var $=O.length-1;$>=0;$--)(j=O[$])&&(ee=(J<3?j(ee):J>3?j(F,z,ee):j(F,z))||ee);return J>3&&ee&&Object.defineProperty(F,z,ee),ee},D=this&&this.__param||function(O,F){return function(z,K){F(z,K,O)}};Object.defineProperty(T,"__esModule",{value:!0}),T.TextRenderLayer=void 0;var k=R(3700),M=R(1546),_=R(3734),g=R(643),E=R(511),N=R(2585),A=R(4725),w=R(4269),S=function(O){function F(z,K,j,J,ee,$,ae,se){var ce=O.call(this,z,"text",K,J,j,ee,$,ae)||this;return ce._characterJoinerService=se,ce._characterWidth=0,ce._characterFont="",ce._characterOverlapCache={},ce._workCell=new E.CellData,ce._state=new k.GridCache,ce}return v(F,O),F.prototype.resize=function(z){O.prototype.resize.call(this,z);var K=this._getFont(!1,!1);this._characterWidth===z.scaledCharWidth&&this._characterFont===K||(this._characterWidth=z.scaledCharWidth,this._characterFont=K,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},F.prototype.reset=function(){this._state.clear(),this._clearAll()},F.prototype._forEachCell=function(z,K,j){for(var J=z;J<=K;J++)for(var ee=J+this._bufferService.buffer.ydisp,$=this._bufferService.buffer.lines.get(ee),ae=this._characterJoinerService.getJoinedCharacters(ee),se=0;se0&&se===ae[0][0]){le=!0;var Ae=ae.shift();ce=new w.JoinedCellData(this._workCell,$.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),oe=Ae[1]-1}!le&&this._isOverlapping(ce)&&oe<$.length-1&&$.getCodePoint(oe+1)===g.NULL_CELL_CODE&&(ce.content&=-12582913,ce.content|=2<<22),j(ce,se,J),se=oe}}},F.prototype._drawBackground=function(z,K){var j=this,J=this._ctx,ee=this._bufferService.cols,$=0,ae=0,se=null;J.save(),this._forEachCell(z,K,function(ce,le,oe){var Ae=null;ce.isInverse()?Ae=ce.isFgDefault()?j._colors.foreground.css:ce.isFgRGB()?"rgb("+_.AttributeData.toColorRGB(ce.getFgColor()).join(",")+")":j._colors.ansi[ce.getFgColor()].css:ce.isBgRGB()?Ae="rgb("+_.AttributeData.toColorRGB(ce.getBgColor()).join(",")+")":ce.isBgPalette()&&(Ae=j._colors.ansi[ce.getBgColor()].css),null===se&&($=le,ae=oe),oe!==ae?(J.fillStyle=se||"",j._fillCells($,ae,ee-$,1),$=le,ae=oe):se!==Ae&&(J.fillStyle=se||"",j._fillCells($,ae,le-$,1),$=le,ae=oe),se=Ae}),null!==se&&(J.fillStyle=se,this._fillCells($,ae,ee-$,1)),J.restore()},F.prototype._drawForeground=function(z,K){var j=this;this._forEachCell(z,K,function(J,ee,$){if(!J.isInvisible()&&(j._drawChars(J,ee,$),J.isUnderline()||J.isStrikethrough())){if(j._ctx.save(),J.isInverse())if(J.isBgDefault())j._ctx.fillStyle=j._colors.background.css;else if(J.isBgRGB())j._ctx.fillStyle="rgb("+_.AttributeData.toColorRGB(J.getBgColor()).join(",")+")";else{var ae=J.getBgColor();j._optionsService.options.drawBoldTextInBrightColors&&J.isBold()&&ae<8&&(ae+=8),j._ctx.fillStyle=j._colors.ansi[ae].css}else if(J.isFgDefault())j._ctx.fillStyle=j._colors.foreground.css;else if(J.isFgRGB())j._ctx.fillStyle="rgb("+_.AttributeData.toColorRGB(J.getFgColor()).join(",")+")";else{var se=J.getFgColor();j._optionsService.options.drawBoldTextInBrightColors&&J.isBold()&&se<8&&(se+=8),j._ctx.fillStyle=j._colors.ansi[se].css}J.isStrikethrough()&&j._fillMiddleLineAtCells(ee,$,J.getWidth()),J.isUnderline()&&j._fillBottomLineAtCells(ee,$,J.getWidth()),j._ctx.restore()}})},F.prototype.onGridChanged=function(z,K){0!==this._state.cache.length&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,z,this._bufferService.cols,K-z+1),this._drawBackground(z,K),this._drawForeground(z,K))},F.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},F.prototype._isOverlapping=function(z){if(1!==z.getWidth()||z.getCode()<256)return!1;var K=z.getChars();if(this._characterOverlapCache.hasOwnProperty(K))return this._characterOverlapCache[K];this._ctx.save(),this._ctx.font=this._characterFont;var j=Math.floor(this._ctx.measureText(K).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[K]=j,j},I([D(5,N.IBufferService),D(6,N.IOptionsService),D(7,A.ICharacterJoinerService)],F)}(M.BaseRenderLayer);T.TextRenderLayer=S},9616:function(Z,T){Object.defineProperty(T,"__esModule",{value:!0}),T.BaseCharAtlas=void 0;var R=function(){function b(){this._didWarmUp=!1}return b.prototype.dispose=function(){},b.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},b.prototype._doWarmUp=function(){},b.prototype.clear=function(){},b.prototype.beginFrame=function(){},b}();T.BaseCharAtlas=R},1420:function(Z,T,R){Object.defineProperty(T,"__esModule",{value:!0}),T.removeTerminalFromCache=T.acquireCharAtlas=void 0;var b=R(2040),v=R(1906),I=[];T.acquireCharAtlas=function(D,k,M,_,g){for(var E=(0,b.generateConfig)(_,g,D,M),N=0;N=0){if((0,b.configEquals)(w.config,E))return w.atlas;1===w.ownedBy.length?(w.atlas.dispose(),I.splice(N,1)):w.ownedBy.splice(A,1);break}}for(N=0;N0){var J=this._width*this._height;this._cacheMap=new M.LRUMap(J),this._cacheMap.prealloc(J)}this._cacheCtx.clearRect(0,0,N,A),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},j.prototype.draw=function(J,ee,$,ae){if(32===ee.code)return!0;if(!this._canCache(ee))return!1;var se=S(ee),ce=this._cacheMap.get(se);if(null!=ce)return this._drawFromCache(J,ce,$,ae),!0;if(this._drawToCacheCount<100){var le;le=this._cacheMap.size>>24,$=j.rgba>>>16&255,ae=j.rgba>>>8&255,se=0;se=this.capacity)this._unlinkNode(D=this._head),delete this._map[D.key],D.key=v,D.value=I,this._map[v]=D;else{var k=this._nodePool;k.length>0?((D=k.pop()).key=v,D.value=I):D={prev:null,next:null,key:v,value:I},this._map[v]=D,this.size++}this._appendNode(D)},b}();T.LRUMap=R},1296:function(Z,T,R){var b,v=this&&this.__extends||(b=function(ee,$){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,se){ae.__proto__=se}||function(ae,se){for(var ce in se)Object.prototype.hasOwnProperty.call(se,ce)&&(ae[ce]=se[ce])})(ee,$)},function(J,ee){if("function"!=typeof ee&&null!==ee)throw new TypeError("Class extends value "+String(ee)+" is not a constructor or null");function $(){this.constructor=J}b(J,ee),J.prototype=null===ee?Object.create(ee):($.prototype=ee.prototype,new $)}),I=this&&this.__decorate||function(J,ee,$,ae){var se,ce=arguments.length,le=ce<3?ee:null===ae?ae=Object.getOwnPropertyDescriptor(ee,$):ae;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)le=Reflect.decorate(J,ee,$,ae);else for(var oe=J.length-1;oe>=0;oe--)(se=J[oe])&&(le=(ce<3?se(le):ce>3?se(ee,$,le):se(ee,$))||le);return ce>3&&le&&Object.defineProperty(ee,$,le),le},D=this&&this.__param||function(J,ee){return function($,ae){ee($,ae,J)}};Object.defineProperty(T,"__esModule",{value:!0}),T.DomRenderer=void 0;var k=R(3787),M=R(8803),_=R(844),g=R(4725),E=R(2585),N=R(8460),A=R(4774),w=R(9631),S="xterm-dom-renderer-owner-",O="xterm-fg-",F="xterm-bg-",z="xterm-focus",K=1,j=function(J){function ee($,ae,se,ce,le,oe,Ae,be,it,qe){var _t=J.call(this)||this;return _t._colors=$,_t._element=ae,_t._screenElement=se,_t._viewportElement=ce,_t._linkifier=le,_t._linkifier2=oe,_t._charSizeService=be,_t._optionsService=it,_t._bufferService=qe,_t._terminalClass=K++,_t._rowElements=[],_t._rowContainer=document.createElement("div"),_t._rowContainer.classList.add("xterm-rows"),_t._rowContainer.style.lineHeight="normal",_t._rowContainer.setAttribute("aria-hidden","true"),_t._refreshRowElements(_t._bufferService.cols,_t._bufferService.rows),_t._selectionContainer=document.createElement("div"),_t._selectionContainer.classList.add("xterm-selection"),_t._selectionContainer.setAttribute("aria-hidden","true"),_t.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},_t._updateDimensions(),_t._injectCss(),_t._rowFactory=Ae.createInstance(k.DomRendererRowFactory,document,_t._colors),_t._element.classList.add(S+_t._terminalClass),_t._screenElement.appendChild(_t._rowContainer),_t._screenElement.appendChild(_t._selectionContainer),_t._linkifier.onShowLinkUnderline(function(yt){return _t._onLinkHover(yt)}),_t._linkifier.onHideLinkUnderline(function(yt){return _t._onLinkLeave(yt)}),_t._linkifier2.onShowLinkUnderline(function(yt){return _t._onLinkHover(yt)}),_t._linkifier2.onHideLinkUnderline(function(yt){return _t._onLinkLeave(yt)}),_t}return v(ee,J),Object.defineProperty(ee.prototype,"onRequestRedraw",{get:function(){return(new N.EventEmitter).event},enumerable:!1,configurable:!0}),ee.prototype.dispose=function(){this._element.classList.remove(S+this._terminalClass),(0,w.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),J.prototype.dispose.call(this)},ee.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var $=0,ae=this._rowElements;$ae;)this._rowContainer.removeChild(this._rowElements.pop())},ee.prototype.onResize=function($,ae){this._refreshRowElements($,ae),this._updateDimensions()},ee.prototype.onCharSizeChanged=function(){this._updateDimensions()},ee.prototype.onBlur=function(){this._rowContainer.classList.remove(z)},ee.prototype.onFocus=function(){this._rowContainer.classList.add(z)},ee.prototype.onSelectionChanged=function($,ae,se){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if($&&ae){var ce=$[1]-this._bufferService.buffer.ydisp,le=ae[1]-this._bufferService.buffer.ydisp,oe=Math.max(ce,0),Ae=Math.min(le,this._bufferService.rows-1);if(!(oe>=this._bufferService.rows||Ae<0)){var be=document.createDocumentFragment();se?be.appendChild(this._createSelectionElement(oe,$[0],ae[0],Ae-oe+1)):(be.appendChild(this._createSelectionElement(oe,ce===oe?$[0]:0,oe===le?ae[0]:this._bufferService.cols)),be.appendChild(this._createSelectionElement(oe+1,0,this._bufferService.cols,Ae-oe-1)),oe!==Ae&&be.appendChild(this._createSelectionElement(Ae,0,le===Ae?ae[0]:this._bufferService.cols))),this._selectionContainer.appendChild(be)}}},ee.prototype._createSelectionElement=function($,ae,se,ce){void 0===ce&&(ce=1);var le=document.createElement("div");return le.style.height=ce*this.dimensions.actualCellHeight+"px",le.style.top=$*this.dimensions.actualCellHeight+"px",le.style.left=ae*this.dimensions.actualCellWidth+"px",le.style.width=this.dimensions.actualCellWidth*(se-ae)+"px",le},ee.prototype.onCursorMove=function(){},ee.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},ee.prototype.clear=function(){for(var $=0,ae=this._rowElements;$=le&&($=0,se++)}},I([D(6,E.IInstantiationService),D(7,g.ICharSizeService),D(8,E.IOptionsService),D(9,E.IBufferService)],ee)}(_.Disposable);T.DomRenderer=j},3787:function(Z,T,R){var b=this&&this.__decorate||function(w,S,O,F){var z,K=arguments.length,j=K<3?S:null===F?F=Object.getOwnPropertyDescriptor(S,O):F;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)j=Reflect.decorate(w,S,O,F);else for(var J=w.length-1;J>=0;J--)(z=w[J])&&(j=(K<3?z(j):K>3?z(S,O,j):z(S,O))||j);return K>3&&j&&Object.defineProperty(S,O,j),j},v=this&&this.__param||function(w,S){return function(O,F){S(O,F,w)}};Object.defineProperty(T,"__esModule",{value:!0}),T.DomRendererRowFactory=T.CURSOR_STYLE_UNDERLINE_CLASS=T.CURSOR_STYLE_BAR_CLASS=T.CURSOR_STYLE_BLOCK_CLASS=T.CURSOR_BLINK_CLASS=T.CURSOR_CLASS=T.STRIKETHROUGH_CLASS=T.UNDERLINE_CLASS=T.ITALIC_CLASS=T.DIM_CLASS=T.BOLD_CLASS=void 0;var I=R(8803),D=R(643),k=R(511),M=R(2585),_=R(4774),g=R(4725),E=R(4269);T.BOLD_CLASS="xterm-bold",T.DIM_CLASS="xterm-dim",T.ITALIC_CLASS="xterm-italic",T.UNDERLINE_CLASS="xterm-underline",T.STRIKETHROUGH_CLASS="xterm-strikethrough",T.CURSOR_CLASS="xterm-cursor",T.CURSOR_BLINK_CLASS="xterm-cursor-blink",T.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",T.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",T.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var N=function(){function w(S,O,F,z,K){this._document=S,this._colors=O,this._characterJoinerService=F,this._optionsService=z,this._coreService=K,this._workCell=new k.CellData}return w.prototype.setColors=function(S){this._colors=S},w.prototype.createRow=function(S,O,F,z,K,j,J,ee){for(var $=this._document.createDocumentFragment(),ae=this._characterJoinerService.getJoinedCharacters(O),se=0,ce=Math.min(S.length,ee)-1;ce>=0;ce--)if(S.loadCell(ce,this._workCell).getCode()!==D.NULL_CELL_CODE||F&&ce===K){se=ce+1;break}for(ce=0;ce0&&ce===ae[0][0]){oe=!0;var it=ae.shift();be=new E.JoinedCellData(this._workCell,S.translateToString(!0,it[0],it[1]),it[1]-it[0]),Ae=it[1]-1,le=be.getWidth()}var qe=this._document.createElement("span");if(le>1&&(qe.style.width=J*le+"px"),oe&&(qe.style.display="inline",K>=ce&&K<=Ae&&(K=ce)),!this._coreService.isCursorHidden&&F&&ce===K)switch(qe.classList.add(T.CURSOR_CLASS),j&&qe.classList.add(T.CURSOR_BLINK_CLASS),z){case"bar":qe.classList.add(T.CURSOR_STYLE_BAR_CLASS);break;case"underline":qe.classList.add(T.CURSOR_STYLE_UNDERLINE_CLASS);break;default:qe.classList.add(T.CURSOR_STYLE_BLOCK_CLASS)}be.isBold()&&qe.classList.add(T.BOLD_CLASS),be.isItalic()&&qe.classList.add(T.ITALIC_CLASS),be.isDim()&&qe.classList.add(T.DIM_CLASS),be.isUnderline()&&qe.classList.add(T.UNDERLINE_CLASS),qe.textContent=be.isInvisible()?D.WHITESPACE_CELL_CHAR:be.getChars()||D.WHITESPACE_CELL_CHAR,be.isStrikethrough()&&qe.classList.add(T.STRIKETHROUGH_CLASS);var _t=be.getFgColor(),yt=be.getFgColorMode(),Ft=be.getBgColor(),xe=be.getBgColorMode(),De=!!be.isInverse();if(De){var je=_t;_t=Ft,Ft=je;var dt=yt;yt=xe,xe=dt}switch(yt){case 16777216:case 33554432:be.isBold()&&_t<8&&this._optionsService.options.drawBoldTextInBrightColors&&(_t+=8),this._applyMinimumContrast(qe,this._colors.background,this._colors.ansi[_t])||qe.classList.add("xterm-fg-"+_t);break;case 50331648:var Qe=_.rgba.toColor(_t>>16&255,_t>>8&255,255&_t);this._applyMinimumContrast(qe,this._colors.background,Qe)||this._addStyle(qe,"color:#"+A(_t.toString(16),"0",6));break;default:this._applyMinimumContrast(qe,this._colors.background,this._colors.foreground)||De&&qe.classList.add("xterm-fg-"+I.INVERTED_DEFAULT_COLOR)}switch(xe){case 16777216:case 33554432:qe.classList.add("xterm-bg-"+Ft);break;case 50331648:this._addStyle(qe,"background-color:#"+A(Ft.toString(16),"0",6));break;default:De&&qe.classList.add("xterm-bg-"+I.INVERTED_DEFAULT_COLOR)}$.appendChild(qe),ce=Ae}}return $},w.prototype._applyMinimumContrast=function(S,O,F){if(1===this._optionsService.options.minimumContrastRatio)return!1;var z=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===z&&(z=_.color.ensureContrastRatio(O,F,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=z?z:null)),!!z&&(this._addStyle(S,"color:"+z.css),!0)},w.prototype._addStyle=function(S,O){S.setAttribute("style",""+(S.getAttribute("style")||"")+O+";")},b([v(2,g.ICharacterJoinerService),v(3,M.IOptionsService),v(4,M.ICoreService)],w)}();function A(w,S,O){for(;w.lengththis._bufferService.cols?[I%this._bufferService.cols,this.selectionStart[1]+Math.floor(I/this._bufferService.cols)]:[I,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),b.prototype.areSelectionValuesReversed=function(){var v=this.selectionStart,I=this.selectionEnd;return!(!v||!I)&&(v[1]>I[1]||v[1]===I[1]&&v[0]>I[0])},b.prototype.onTrim=function(v){return this.selectionStart&&(this.selectionStart[1]-=v),this.selectionEnd&&(this.selectionEnd[1]-=v),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},b}();T.SelectionModel=R},428:function(Z,T,R){var b=this&&this.__decorate||function(_,g,E,N){var A,w=arguments.length,S=w<3?g:null===N?N=Object.getOwnPropertyDescriptor(g,E):N;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)S=Reflect.decorate(_,g,E,N);else for(var O=_.length-1;O>=0;O--)(A=_[O])&&(S=(w<3?A(S):w>3?A(g,E,S):A(g,E))||S);return w>3&&S&&Object.defineProperty(g,E,S),S},v=this&&this.__param||function(_,g){return function(E,N){g(E,N,_)}};Object.defineProperty(T,"__esModule",{value:!0}),T.CharSizeService=void 0;var I=R(2585),D=R(8460),k=function(){function _(g,E,N){this._optionsService=N,this.width=0,this.height=0,this._onCharSizeChange=new D.EventEmitter,this._measureStrategy=new M(g,E,this._optionsService)}return Object.defineProperty(_.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),_.prototype.measure=function(){var g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())},b([v(2,I.IOptionsService)],_)}();T.CharSizeService=k;var M=function(){function _(g,E,N){this._document=g,this._parentElement=E,this._optionsService=N,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return _.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var g=this._measureElement.getBoundingClientRect();return 0!==g.width&&0!==g.height&&(this._result.width=g.width,this._result.height=Math.ceil(g.height)),this._result},_}()},4269:function(Z,T,R){var b,v=this&&this.__extends||(b=function(w,S){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,F){O.__proto__=F}||function(O,F){for(var z in F)Object.prototype.hasOwnProperty.call(F,z)&&(O[z]=F[z])})(w,S)},function(A,w){if("function"!=typeof w&&null!==w)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function S(){this.constructor=A}b(A,w),A.prototype=null===w?Object.create(w):(S.prototype=w.prototype,new S)}),I=this&&this.__decorate||function(A,w,S,O){var F,z=arguments.length,K=z<3?w:null===O?O=Object.getOwnPropertyDescriptor(w,S):O;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)K=Reflect.decorate(A,w,S,O);else for(var j=A.length-1;j>=0;j--)(F=A[j])&&(K=(z<3?F(K):z>3?F(w,S,K):F(w,S))||K);return z>3&&K&&Object.defineProperty(w,S,K),K},D=this&&this.__param||function(A,w){return function(S,O){w(S,O,A)}};Object.defineProperty(T,"__esModule",{value:!0}),T.CharacterJoinerService=T.JoinedCellData=void 0;var k=R(3734),M=R(643),_=R(511),g=R(2585),E=function(A){function w(S,O,F){var z=A.call(this)||this;return z.content=0,z.combinedData="",z.fg=S.fg,z.bg=S.bg,z.combinedData=O,z._width=F,z}return v(w,A),w.prototype.isCombined=function(){return 2097152},w.prototype.getWidth=function(){return this._width},w.prototype.getChars=function(){return this.combinedData},w.prototype.getCode=function(){return 2097151},w.prototype.setFromCharData=function(S){throw new Error("not implemented")},w.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},w}(k.AttributeData);T.JoinedCellData=E;var N=function(){function A(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _.CellData}return A.prototype.register=function(w){var S={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(S),S.id},A.prototype.deregister=function(w){for(var S=0;S1)for(var ae=this._getJoinedRanges(F,j,K,S,z),se=0;se1)for(ae=this._getJoinedRanges(F,j,K,S,z),se=0;se=0;S--)(N=M[S])&&(w=(A<3?N(w):A>3?N(_,g,w):N(_,g))||w);return A>3&&w&&Object.defineProperty(_,g,w),w},v=this&&this.__param||function(M,_){return function(g,E){_(g,E,M)}};Object.defineProperty(T,"__esModule",{value:!0}),T.MouseService=void 0;var I=R(4725),D=R(9806),k=function(){function M(_,g){this._renderService=_,this._charSizeService=g}return M.prototype.getCoords=function(_,g,E,N,A){return(0,D.getCoords)(_,g,E,N,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,A)},M.prototype.getRawByteCoords=function(_,g,E,N){var A=this.getCoords(_,g,E,N);return(0,D.getRawByteCoords)(A)},b([v(0,I.IRenderService),v(1,I.ICharSizeService)],M)}();T.MouseService=k},3230:function(Z,T,R){var b,v=this&&this.__extends||(b=function(O,F){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,K){z.__proto__=K}||function(z,K){for(var j in K)Object.prototype.hasOwnProperty.call(K,j)&&(z[j]=K[j])})(O,F)},function(S,O){if("function"!=typeof O&&null!==O)throw new TypeError("Class extends value "+String(O)+" is not a constructor or null");function F(){this.constructor=S}b(S,O),S.prototype=null===O?Object.create(O):(F.prototype=O.prototype,new F)}),I=this&&this.__decorate||function(S,O,F,z){var K,j=arguments.length,J=j<3?O:null===z?z=Object.getOwnPropertyDescriptor(O,F):z;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)J=Reflect.decorate(S,O,F,z);else for(var ee=S.length-1;ee>=0;ee--)(K=S[ee])&&(J=(j<3?K(J):j>3?K(O,F,J):K(O,F))||J);return j>3&&J&&Object.defineProperty(O,F,J),J},D=this&&this.__param||function(S,O){return function(F,z){O(F,z,S)}};Object.defineProperty(T,"__esModule",{value:!0}),T.RenderService=void 0;var k=R(6193),M=R(8460),_=R(844),g=R(5596),E=R(3656),N=R(2585),A=R(4725),w=function(S){function O(F,z,K,j,J,ee){var $=S.call(this)||this;if($._renderer=F,$._rowCount=z,$._charSizeService=J,$._isPaused=!1,$._needsFullRefresh=!1,$._isNextRenderRedrawOnly=!0,$._needsSelectionRefresh=!1,$._canvasWidth=0,$._canvasHeight=0,$._selectionState={start:void 0,end:void 0,columnSelectMode:!1},$._onDimensionsChange=new M.EventEmitter,$._onRender=new M.EventEmitter,$._onRefreshRequest=new M.EventEmitter,$.register({dispose:function(){return $._renderer.dispose()}}),$._renderDebouncer=new k.RenderDebouncer(function(se,ce){return $._renderRows(se,ce)}),$.register($._renderDebouncer),$._screenDprMonitor=new g.ScreenDprMonitor,$._screenDprMonitor.setListener(function(){return $.onDevicePixelRatioChange()}),$.register($._screenDprMonitor),$.register(ee.onResize(function(se){return $._fullRefresh()})),$.register(j.onOptionChange(function(){return $._renderer.onOptionsChanged()})),$.register($._charSizeService.onCharSizeChange(function(){return $.onCharSizeChanged()})),$._renderer.onRequestRedraw(function(se){return $.refreshRows(se.start,se.end,!0)}),$.register((0,E.addDisposableDomListener)(window,"resize",function(){return $.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var ae=new IntersectionObserver(function(se){return $._onIntersectionChange(se[se.length-1])},{threshold:0});ae.observe(K),$.register({dispose:function(){return ae.disconnect()}})}return $}return v(O,S),Object.defineProperty(O.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),O.prototype._onIntersectionChange=function(F){this._isPaused=void 0===F.isIntersecting?0===F.intersectionRatio:!F.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},O.prototype.refreshRows=function(F,z,K){void 0===K&&(K=!1),this._isPaused?this._needsFullRefresh=!0:(K||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(F,z,this._rowCount))},O.prototype._renderRows=function(F,z){this._renderer.renderRows(F,z),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:F,end:z}),this._isNextRenderRedrawOnly=!0},O.prototype.resize=function(F,z){this._rowCount=z,this._fireOnCanvasResize()},O.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},O.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},O.prototype.dispose=function(){S.prototype.dispose.call(this)},O.prototype.setRenderer=function(F){var z=this;this._renderer.dispose(),this._renderer=F,this._renderer.onRequestRedraw(function(K){return z.refreshRows(K.start,K.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},O.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},O.prototype.clearTextureAtlas=function(){var F,z;null===(z=null===(F=this._renderer)||void 0===F?void 0:F.clearTextureAtlas)||void 0===z||z.call(F),this._fullRefresh()},O.prototype.setColors=function(F){this._renderer.setColors(F),this._fullRefresh()},O.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},O.prototype.onResize=function(F,z){this._renderer.onResize(F,z),this._fullRefresh()},O.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},O.prototype.onBlur=function(){this._renderer.onBlur()},O.prototype.onFocus=function(){this._renderer.onFocus()},O.prototype.onSelectionChanged=function(F,z,K){this._selectionState.start=F,this._selectionState.end=z,this._selectionState.columnSelectMode=K,this._renderer.onSelectionChanged(F,z,K)},O.prototype.onCursorMove=function(){this._renderer.onCursorMove()},O.prototype.clear=function(){this._renderer.clear()},I([D(3,N.IOptionsService),D(4,A.ICharSizeService),D(5,N.IBufferService)],O)}(_.Disposable);T.RenderService=w},9312:function(Z,T,R){var b,v=this&&this.__extends||(b=function(J,ee){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ae){$.__proto__=ae}||function($,ae){for(var se in ae)Object.prototype.hasOwnProperty.call(ae,se)&&($[se]=ae[se])})(J,ee)},function(j,J){if("function"!=typeof J&&null!==J)throw new TypeError("Class extends value "+String(J)+" is not a constructor or null");function ee(){this.constructor=j}b(j,J),j.prototype=null===J?Object.create(J):(ee.prototype=J.prototype,new ee)}),I=this&&this.__decorate||function(j,J,ee,$){var ae,se=arguments.length,ce=se<3?J:null===$?$=Object.getOwnPropertyDescriptor(J,ee):$;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)ce=Reflect.decorate(j,J,ee,$);else for(var le=j.length-1;le>=0;le--)(ae=j[le])&&(ce=(se<3?ae(ce):se>3?ae(J,ee,ce):ae(J,ee))||ce);return se>3&&ce&&Object.defineProperty(J,ee,ce),ce},D=this&&this.__param||function(j,J){return function(ee,$){J(ee,$,j)}};Object.defineProperty(T,"__esModule",{value:!0}),T.SelectionService=void 0;var k=R(6114),M=R(456),_=R(511),g=R(8460),E=R(4725),N=R(2585),A=R(9806),w=R(9504),S=R(844),O=R(4841),F=String.fromCharCode(160),z=new RegExp(F,"g"),K=function(j){function J(ee,$,ae,se,ce,le,oe,Ae){var be=j.call(this)||this;return be._element=ee,be._screenElement=$,be._linkifier=ae,be._bufferService=se,be._coreService=ce,be._mouseService=le,be._optionsService=oe,be._renderService=Ae,be._dragScrollAmount=0,be._enabled=!0,be._workCell=new _.CellData,be._mouseDownTimeStamp=0,be._oldHasSelection=!1,be._oldSelectionStart=void 0,be._oldSelectionEnd=void 0,be._onLinuxMouseSelection=be.register(new g.EventEmitter),be._onRedrawRequest=be.register(new g.EventEmitter),be._onSelectionChange=be.register(new g.EventEmitter),be._onRequestScrollLines=be.register(new g.EventEmitter),be._mouseMoveListener=function(it){return be._onMouseMove(it)},be._mouseUpListener=function(it){return be._onMouseUp(it)},be._coreService.onUserInput(function(){be.hasSelection&&be.clearSelection()}),be._trimListener=be._bufferService.buffer.lines.onTrim(function(it){return be._onTrim(it)}),be.register(be._bufferService.buffers.onBufferActivate(function(it){return be._onBufferActivate(it)})),be.enable(),be._model=new M.SelectionModel(be._bufferService),be._activeSelectionMode=0,be}return v(J,j),Object.defineProperty(J.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),J.prototype.dispose=function(){this._removeMouseDownListeners()},J.prototype.reset=function(){this.clearSelection()},J.prototype.disable=function(){this.clearSelection(),this._enabled=!1},J.prototype.enable=function(){this._enabled=!0},Object.defineProperty(J.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"hasSelection",{get:function(){var $=this._model.finalSelectionStart,ae=this._model.finalSelectionEnd;return!(!$||!ae||$[0]===ae[0]&&$[1]===ae[1])},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"selectionText",{get:function(){var $=this._model.finalSelectionStart,ae=this._model.finalSelectionEnd;if(!$||!ae)return"";var se=this._bufferService.buffer,ce=[];if(3===this._activeSelectionMode){if($[0]===ae[0])return"";for(var le=$[1];le<=ae[1];le++){var oe=se.translateBufferLineToString(le,!0,$[0],ae[0]);ce.push(oe)}}else{for(ce.push(se.translateBufferLineToString($[1],!0,$[0],$[1]===ae[1]?ae[0]:void 0)),le=$[1]+1;le<=ae[1]-1;le++){var be=se.lines.get(le);oe=se.translateBufferLineToString(le,!0),be&&be.isWrapped?ce[ce.length-1]+=oe:ce.push(oe)}$[1]!==ae[1]&&(be=se.lines.get(ae[1]),oe=se.translateBufferLineToString(ae[1],!0,0,ae[0]),be&&be.isWrapped?ce[ce.length-1]+=oe:ce.push(oe))}return ce.map(function(it){return it.replace(z," ")}).join(k.isWindows?"\r\n":"\n")},enumerable:!1,configurable:!0}),J.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},J.prototype.refresh=function(ee){var $=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return $._refresh()})),k.isLinux&&ee&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},J.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})},J.prototype._isClickInSelection=function(ee){var $=this._getMouseBufferCoords(ee),ae=this._model.finalSelectionStart,se=this._model.finalSelectionEnd;return!!(ae&&se&&$)&&this._areCoordsInSelection($,ae,se)},J.prototype._areCoordsInSelection=function(ee,$,ae){return ee[1]>$[1]&&ee[1]=$[0]&&ee[0]=$[0]},J.prototype._selectWordAtCursor=function(ee,$){var ae,se,ce=null===(se=null===(ae=this._linkifier.currentLink)||void 0===ae?void 0:ae.link)||void 0===se?void 0:se.range;if(ce)return this._model.selectionStart=[ce.start.x-1,ce.start.y-1],this._model.selectionStartLength=(0,O.getRangeLength)(ce,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var le=this._getMouseBufferCoords(ee);return!!le&&(this._selectWordAt(le,$),this._model.selectionEnd=void 0,!0)},J.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},J.prototype.selectLines=function(ee,$){this._model.clearSelection(),ee=Math.max(ee,0),$=Math.min($,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,ee],this._model.selectionEnd=[this._bufferService.cols,$],this.refresh(),this._onSelectionChange.fire()},J.prototype._onTrim=function(ee){this._model.onTrim(ee)&&this.refresh()},J.prototype._getMouseBufferCoords=function(ee){var $=this._mouseService.getCoords(ee,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if($)return $[0]--,$[1]--,$[1]+=this._bufferService.buffer.ydisp,$},J.prototype._getMouseEventScrollAmount=function(ee){var $=(0,A.getCoordsRelativeToElement)(ee,this._screenElement)[1],ae=this._renderService.dimensions.canvasHeight;return $>=0&&$<=ae?0:($>ae&&($-=ae),$=Math.min(Math.max($,-50),50),($/=50)/Math.abs($)+Math.round(14*$))},J.prototype.shouldForceSelection=function(ee){return k.isMac?ee.altKey&&this._optionsService.options.macOptionClickForcesSelection:ee.shiftKey},J.prototype.onMouseDown=function(ee){if(this._mouseDownTimeStamp=ee.timeStamp,(2!==ee.button||!this.hasSelection)&&0===ee.button){if(!this._enabled){if(!this.shouldForceSelection(ee))return;ee.stopPropagation()}ee.preventDefault(),this._dragScrollAmount=0,this._enabled&&ee.shiftKey?this._onIncrementalClick(ee):1===ee.detail?this._onSingleClick(ee):2===ee.detail?this._onDoubleClick(ee):3===ee.detail&&this._onTripleClick(ee),this._addMouseDownListeners(),this.refresh(!0)}},J.prototype._addMouseDownListeners=function(){var ee=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return ee._dragScroll()},50)},J.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},J.prototype._onIncrementalClick=function(ee){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(ee))},J.prototype._onSingleClick=function(ee){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(ee)?3:0,this._model.selectionStart=this._getMouseBufferCoords(ee),this._model.selectionStart){this._model.selectionEnd=void 0;var $=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);$&&$.length!==this._model.selectionStart[0]&&0===$.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}},J.prototype._onDoubleClick=function(ee){this._selectWordAtCursor(ee,!0)&&(this._activeSelectionMode=1)},J.prototype._onTripleClick=function(ee){var $=this._getMouseBufferCoords(ee);$&&(this._activeSelectionMode=2,this._selectLineAt($[1]))},J.prototype.shouldColumnSelect=function(ee){return ee.altKey&&!(k.isMac&&this._optionsService.options.macOptionClickForcesSelection)},J.prototype._onMouseMove=function(ee){if(ee.stopImmediatePropagation(),this._model.selectionStart){var $=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(ee),this._model.selectionEnd){2===this._activeSelectionMode?this._model.selectionEnd[0]=this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var ae=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(ee.ydisp+this._bufferService.rows,ee.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=ee.ydisp),this.refresh()}},J.prototype._onMouseUp=function(ee){var $=ee.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&$<500&&ee.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var ae=this._mouseService.getCoords(ee,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(ae&&void 0!==ae[0]&&void 0!==ae[1]){var se=(0,w.moveToCellSequence)(ae[0]-1,ae[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(se,!0)}}}else this._fireEventIfSelectionChanged()},J.prototype._fireEventIfSelectionChanged=function(){var ee=this._model.finalSelectionStart,$=this._model.finalSelectionEnd,ae=!(!ee||!$||ee[0]===$[0]&&ee[1]===$[1]);ae?ee&&$&&(this._oldSelectionStart&&this._oldSelectionEnd&&ee[0]===this._oldSelectionStart[0]&&ee[1]===this._oldSelectionStart[1]&&$[0]===this._oldSelectionEnd[0]&&$[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(ee,$,ae)):this._oldHasSelection&&this._fireOnSelectionChange(ee,$,ae)},J.prototype._fireOnSelectionChange=function(ee,$,ae){this._oldSelectionStart=ee,this._oldSelectionEnd=$,this._oldHasSelection=ae,this._onSelectionChange.fire()},J.prototype._onBufferActivate=function(ee){var $=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=ee.activeBuffer.lines.onTrim(function(ae){return $._onTrim(ae)})},J.prototype._convertViewportColToCharacterIndex=function(ee,$){for(var ae=$[0],se=0;$[0]>=se;se++){var ce=ee.loadCell(se,this._workCell).getChars().length;0===this._workCell.getWidth()?ae--:ce>1&&$[0]!==se&&(ae+=ce-1)}return ae},J.prototype.setSelection=function(ee,$,ae){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[ee,$],this._model.selectionStartLength=ae,this.refresh()},J.prototype.rightClickSelect=function(ee){this._isClickInSelection(ee)||(this._selectWordAtCursor(ee,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},J.prototype._getWordAt=function(ee,$,ae,se){if(void 0===ae&&(ae=!0),void 0===se&&(se=!0),!(ee[0]>=this._bufferService.cols)){var ce=this._bufferService.buffer,le=ce.lines.get(ee[1]);if(le){var oe=ce.translateBufferLineToString(ee[1],!1),Ae=this._convertViewportColToCharacterIndex(le,ee),be=Ae,it=ee[0]-Ae,qe=0,_t=0,yt=0,Ft=0;if(" "===oe.charAt(Ae)){for(;Ae>0&&" "===oe.charAt(Ae-1);)Ae--;for(;be1&&(Ft+=je-1,be+=je-1);xe>0&&Ae>0&&!this._isCharWordSeparator(le.loadCell(xe-1,this._workCell));){le.loadCell(xe-1,this._workCell);var dt=this._workCell.getChars().length;0===this._workCell.getWidth()?(qe++,xe--):dt>1&&(yt+=dt-1,Ae-=dt-1),Ae--,xe--}for(;De1&&(Ft+=Qe-1,be+=Qe-1),be++,De++}}be++;var Bt=Ae+it-qe+yt,xt=Math.min(this._bufferService.cols,be-Ae+qe+_t-yt-Ft);if($||""!==oe.slice(Ae,be).trim()){if(ae&&0===Bt&&32!==le.getCodePoint(0)){var vt=ce.lines.get(ee[1]-1);if(vt&&le.isWrapped&&32!==vt.getCodePoint(this._bufferService.cols-1)){var Qt=this._getWordAt([this._bufferService.cols-1,ee[1]-1],!1,!0,!1);if(Qt){var Ht=this._bufferService.cols-Qt.start;Bt-=Ht,xt+=Ht}}}if(se&&Bt+xt===this._bufferService.cols&&32!==le.getCodePoint(this._bufferService.cols-1)){var Ct=ce.lines.get(ee[1]+1);if(Ct&&Ct.isWrapped&&32!==Ct.getCodePoint(0)){var qt=this._getWordAt([0,ee[1]+1],!1,!1,!0);qt&&(xt+=qt.length)}}return{start:Bt,length:xt}}}}},J.prototype._selectWordAt=function(ee,$){var ae=this._getWordAt(ee,$);if(ae){for(;ae.start<0;)ae.start+=this._bufferService.cols,ee[1]--;this._model.selectionStart=[ae.start,ee[1]],this._model.selectionStartLength=ae.length}},J.prototype._selectToWordAt=function(ee){var $=this._getWordAt(ee,!0);if($){for(var ae=ee[1];$.start<0;)$.start+=this._bufferService.cols,ae--;if(!this._model.areSelectionValuesReversed())for(;$.start+$.length>this._bufferService.cols;)$.length-=this._bufferService.cols,ae++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?$.start:$.start+$.length,ae]}},J.prototype._isCharWordSeparator=function(ee){return 0!==ee.getWidth()&&this._optionsService.options.wordSeparator.indexOf(ee.getChars())>=0},J.prototype._selectLineAt=function(ee){var $=this._bufferService.buffer.getWrappedRangeForLine(ee);this._model.selectionStart=[0,$.first],this._model.selectionEnd=[this._bufferService.cols,$.last],this._model.selectionStartLength=0},I([D(3,N.IBufferService),D(4,N.ICoreService),D(5,E.IMouseService),D(6,N.IOptionsService),D(7,E.IRenderService)],J)}(S.Disposable);T.SelectionService=K},4725:function(Z,T,R){Object.defineProperty(T,"__esModule",{value:!0}),T.ICharacterJoinerService=T.ISoundService=T.ISelectionService=T.IRenderService=T.IMouseService=T.ICoreBrowserService=T.ICharSizeService=void 0;var b=R(8343);T.ICharSizeService=(0,b.createDecorator)("CharSizeService"),T.ICoreBrowserService=(0,b.createDecorator)("CoreBrowserService"),T.IMouseService=(0,b.createDecorator)("MouseService"),T.IRenderService=(0,b.createDecorator)("RenderService"),T.ISelectionService=(0,b.createDecorator)("SelectionService"),T.ISoundService=(0,b.createDecorator)("SoundService"),T.ICharacterJoinerService=(0,b.createDecorator)("CharacterJoinerService")},357:function(Z,T,R){var b=this&&this.__decorate||function(k,M,_,g){var E,N=arguments.length,A=N<3?M:null===g?g=Object.getOwnPropertyDescriptor(M,_):g;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)A=Reflect.decorate(k,M,_,g);else for(var w=k.length-1;w>=0;w--)(E=k[w])&&(A=(N<3?E(A):N>3?E(M,_,A):E(M,_))||A);return N>3&&A&&Object.defineProperty(M,_,A),A},v=this&&this.__param||function(k,M){return function(_,g){M(_,g,k)}};Object.defineProperty(T,"__esModule",{value:!0}),T.SoundService=void 0;var I=R(2585),D=function(){function k(M){this._optionsService=M}return Object.defineProperty(k,"audioContext",{get:function(){if(!k._audioContext){var _=window.AudioContext||window.webkitAudioContext;if(!_)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;k._audioContext=new _}return k._audioContext},enumerable:!1,configurable:!0}),k.prototype.playBellSound=function(){var M=k.audioContext;if(M){var _=M.createBufferSource();M.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(g){_.buffer=g,_.connect(M.destination),_.start(0)})}},k.prototype._base64ToArrayBuffer=function(M){for(var _=window.atob(M),g=_.length,E=new Uint8Array(g),N=0;Nthis._length)for(var M=this._length;M=D;g--)this._array[this._getCyclicIndex(g+M.length)]=this._array[this._getCyclicIndex(g)];for(g=0;gthis._maxLength){var E=this._length+M.length-this._maxLength;this._startIndex+=E,this._length=this._maxLength,this.onTrimEmitter.fire(E)}else this._length+=M.length},I.prototype.trimStart=function(D){D>this._length&&(D=this._length),this._startIndex+=D,this._length-=D,this.onTrimEmitter.fire(D)},I.prototype.shiftElements=function(D,k,M){if(!(k<=0)){if(D<0||D>=this._length)throw new Error("start argument out of range");if(D+M<0)throw new Error("Cannot shift elements in list beyond index 0");if(M>0){for(var _=k-1;_>=0;_--)this.set(D+_+M,this.get(D+_));var g=D+k+M-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(_=0;_24)return ce.setWinLines||!1;switch(se){case 1:return!!ce.restoreWin;case 2:return!!ce.minimizeWin;case 3:return!!ce.setWinPosition;case 4:return!!ce.setWinSizePixels;case 5:return!!ce.raiseWin;case 6:return!!ce.lowerWin;case 7:return!!ce.refreshWin;case 8:return!!ce.setWinSizeChars;case 9:return!!ce.maximizeWin;case 10:return!!ce.fullscreenWin;case 11:return!!ce.getWinState;case 13:return!!ce.getWinPosition;case 14:return!!ce.getWinSizePixels;case 15:return!!ce.getScreenSizePixels;case 16:return!!ce.getCellSizePixels;case 18:return!!ce.getWinSizeChars;case 19:return!!ce.getScreenSizeChars;case 20:return!!ce.getIconTitle;case 21:return!!ce.getWinTitle;case 22:return!!ce.pushTitle;case 23:return!!ce.popTitle;case 24:return!!ce.setWinLines}return!1}(se=I=T.WindowsOptionsReportType||(T.WindowsOptionsReportType={}))[se.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",se[se.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS";var $=function(){function se(ce,le,oe,Ae){this._bufferService=ce,this._coreService=le,this._logService=oe,this._optionsService=Ae,this._data=new Uint32Array(0)}return se.prototype.hook=function(ce){this._data=new Uint32Array(0)},se.prototype.put=function(ce,le,oe){this._data=(0,g.concat)(this._data,ce.subarray(le,oe))},se.prototype.unhook=function(ce){if(!ce)return this._data=new Uint32Array(0),!0;var le=(0,E.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),le){case'"q':this._coreService.triggerDataEvent(D.C0.ESC+'P1$r0"q'+D.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(D.C0.ESC+'P1$r61;1"p'+D.C0.ESC+"\\");break;case"r":this._coreService.triggerDataEvent(D.C0.ESC+"P1$r"+(this._bufferService.buffer.scrollTop+1)+";"+(this._bufferService.buffer.scrollBottom+1)+"r"+D.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(D.C0.ESC+"P1$r0m"+D.C0.ESC+"\\");break;case" q":var Ae={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];this._coreService.triggerDataEvent(D.C0.ESC+"P1$r"+(Ae-=this._optionsService.options.cursorBlink?1:0)+" q"+D.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",le),this._coreService.triggerDataEvent(D.C0.ESC+"P0$r"+D.C0.ESC+"\\")}return!0},se}(),ae=function(se){function ce(le,oe,Ae,be,it,qe,_t,yt,Ft){void 0===Ft&&(Ft=new M.EscapeSequenceParser);var xe=se.call(this)||this;xe._bufferService=le,xe._charsetService=oe,xe._coreService=Ae,xe._dirtyRowService=be,xe._logService=it,xe._optionsService=qe,xe._coreMouseService=_t,xe._unicodeService=yt,xe._parser=Ft,xe._parseBuffer=new Uint32Array(4096),xe._stringDecoder=new E.StringToUtf32,xe._utf8Decoder=new E.Utf8ToUtf32,xe._workCell=new S.CellData,xe._windowTitle="",xe._iconName="",xe._windowTitleStack=[],xe._iconNameStack=[],xe._curAttrData=N.DEFAULT_ATTR_DATA.clone(),xe._eraseAttrDataInternal=N.DEFAULT_ATTR_DATA.clone(),xe._onRequestBell=new A.EventEmitter,xe._onRequestRefreshRows=new A.EventEmitter,xe._onRequestReset=new A.EventEmitter,xe._onRequestSendFocus=new A.EventEmitter,xe._onRequestSyncScrollBar=new A.EventEmitter,xe._onRequestWindowsOptionsReport=new A.EventEmitter,xe._onA11yChar=new A.EventEmitter,xe._onA11yTab=new A.EventEmitter,xe._onCursorMove=new A.EventEmitter,xe._onLineFeed=new A.EventEmitter,xe._onScroll=new A.EventEmitter,xe._onTitleChange=new A.EventEmitter,xe._onAnsiColorChange=new A.EventEmitter,xe._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},xe.register(xe._parser),xe._activeBuffer=xe._bufferService.buffer,xe.register(xe._bufferService.buffers.onBufferActivate(function(Qe){return xe._activeBuffer=Qe.activeBuffer})),xe._parser.setCsiHandlerFallback(function(Qe,Bt){xe._logService.debug("Unknown CSI code: ",{identifier:xe._parser.identToString(Qe),params:Bt.toArray()})}),xe._parser.setEscHandlerFallback(function(Qe){xe._logService.debug("Unknown ESC code: ",{identifier:xe._parser.identToString(Qe)})}),xe._parser.setExecuteHandlerFallback(function(Qe){xe._logService.debug("Unknown EXECUTE code: ",{code:Qe})}),xe._parser.setOscHandlerFallback(function(Qe,Bt,xt){xe._logService.debug("Unknown OSC code: ",{identifier:Qe,action:Bt,data:xt})}),xe._parser.setDcsHandlerFallback(function(Qe,Bt,xt){"HOOK"===Bt&&(xt=xt.toArray()),xe._logService.debug("Unknown DCS code: ",{identifier:xe._parser.identToString(Qe),action:Bt,payload:xt})}),xe._parser.setPrintHandler(function(Qe,Bt,xt){return xe.print(Qe,Bt,xt)}),xe._parser.registerCsiHandler({final:"@"},function(Qe){return xe.insertChars(Qe)}),xe._parser.registerCsiHandler({intermediates:" ",final:"@"},function(Qe){return xe.scrollLeft(Qe)}),xe._parser.registerCsiHandler({final:"A"},function(Qe){return xe.cursorUp(Qe)}),xe._parser.registerCsiHandler({intermediates:" ",final:"A"},function(Qe){return xe.scrollRight(Qe)}),xe._parser.registerCsiHandler({final:"B"},function(Qe){return xe.cursorDown(Qe)}),xe._parser.registerCsiHandler({final:"C"},function(Qe){return xe.cursorForward(Qe)}),xe._parser.registerCsiHandler({final:"D"},function(Qe){return xe.cursorBackward(Qe)}),xe._parser.registerCsiHandler({final:"E"},function(Qe){return xe.cursorNextLine(Qe)}),xe._parser.registerCsiHandler({final:"F"},function(Qe){return xe.cursorPrecedingLine(Qe)}),xe._parser.registerCsiHandler({final:"G"},function(Qe){return xe.cursorCharAbsolute(Qe)}),xe._parser.registerCsiHandler({final:"H"},function(Qe){return xe.cursorPosition(Qe)}),xe._parser.registerCsiHandler({final:"I"},function(Qe){return xe.cursorForwardTab(Qe)}),xe._parser.registerCsiHandler({final:"J"},function(Qe){return xe.eraseInDisplay(Qe)}),xe._parser.registerCsiHandler({prefix:"?",final:"J"},function(Qe){return xe.eraseInDisplay(Qe)}),xe._parser.registerCsiHandler({final:"K"},function(Qe){return xe.eraseInLine(Qe)}),xe._parser.registerCsiHandler({prefix:"?",final:"K"},function(Qe){return xe.eraseInLine(Qe)}),xe._parser.registerCsiHandler({final:"L"},function(Qe){return xe.insertLines(Qe)}),xe._parser.registerCsiHandler({final:"M"},function(Qe){return xe.deleteLines(Qe)}),xe._parser.registerCsiHandler({final:"P"},function(Qe){return xe.deleteChars(Qe)}),xe._parser.registerCsiHandler({final:"S"},function(Qe){return xe.scrollUp(Qe)}),xe._parser.registerCsiHandler({final:"T"},function(Qe){return xe.scrollDown(Qe)}),xe._parser.registerCsiHandler({final:"X"},function(Qe){return xe.eraseChars(Qe)}),xe._parser.registerCsiHandler({final:"Z"},function(Qe){return xe.cursorBackwardTab(Qe)}),xe._parser.registerCsiHandler({final:"`"},function(Qe){return xe.charPosAbsolute(Qe)}),xe._parser.registerCsiHandler({final:"a"},function(Qe){return xe.hPositionRelative(Qe)}),xe._parser.registerCsiHandler({final:"b"},function(Qe){return xe.repeatPrecedingCharacter(Qe)}),xe._parser.registerCsiHandler({final:"c"},function(Qe){return xe.sendDeviceAttributesPrimary(Qe)}),xe._parser.registerCsiHandler({prefix:">",final:"c"},function(Qe){return xe.sendDeviceAttributesSecondary(Qe)}),xe._parser.registerCsiHandler({final:"d"},function(Qe){return xe.linePosAbsolute(Qe)}),xe._parser.registerCsiHandler({final:"e"},function(Qe){return xe.vPositionRelative(Qe)}),xe._parser.registerCsiHandler({final:"f"},function(Qe){return xe.hVPosition(Qe)}),xe._parser.registerCsiHandler({final:"g"},function(Qe){return xe.tabClear(Qe)}),xe._parser.registerCsiHandler({final:"h"},function(Qe){return xe.setMode(Qe)}),xe._parser.registerCsiHandler({prefix:"?",final:"h"},function(Qe){return xe.setModePrivate(Qe)}),xe._parser.registerCsiHandler({final:"l"},function(Qe){return xe.resetMode(Qe)}),xe._parser.registerCsiHandler({prefix:"?",final:"l"},function(Qe){return xe.resetModePrivate(Qe)}),xe._parser.registerCsiHandler({final:"m"},function(Qe){return xe.charAttributes(Qe)}),xe._parser.registerCsiHandler({final:"n"},function(Qe){return xe.deviceStatus(Qe)}),xe._parser.registerCsiHandler({prefix:"?",final:"n"},function(Qe){return xe.deviceStatusPrivate(Qe)}),xe._parser.registerCsiHandler({intermediates:"!",final:"p"},function(Qe){return xe.softReset(Qe)}),xe._parser.registerCsiHandler({intermediates:" ",final:"q"},function(Qe){return xe.setCursorStyle(Qe)}),xe._parser.registerCsiHandler({final:"r"},function(Qe){return xe.setScrollRegion(Qe)}),xe._parser.registerCsiHandler({final:"s"},function(Qe){return xe.saveCursor(Qe)}),xe._parser.registerCsiHandler({final:"t"},function(Qe){return xe.windowOptions(Qe)}),xe._parser.registerCsiHandler({final:"u"},function(Qe){return xe.restoreCursor(Qe)}),xe._parser.registerCsiHandler({intermediates:"'",final:"}"},function(Qe){return xe.insertColumns(Qe)}),xe._parser.registerCsiHandler({intermediates:"'",final:"~"},function(Qe){return xe.deleteColumns(Qe)}),xe._parser.setExecuteHandler(D.C0.BEL,function(){return xe.bell()}),xe._parser.setExecuteHandler(D.C0.LF,function(){return xe.lineFeed()}),xe._parser.setExecuteHandler(D.C0.VT,function(){return xe.lineFeed()}),xe._parser.setExecuteHandler(D.C0.FF,function(){return xe.lineFeed()}),xe._parser.setExecuteHandler(D.C0.CR,function(){return xe.carriageReturn()}),xe._parser.setExecuteHandler(D.C0.BS,function(){return xe.backspace()}),xe._parser.setExecuteHandler(D.C0.HT,function(){return xe.tab()}),xe._parser.setExecuteHandler(D.C0.SO,function(){return xe.shiftOut()}),xe._parser.setExecuteHandler(D.C0.SI,function(){return xe.shiftIn()}),xe._parser.setExecuteHandler(D.C1.IND,function(){return xe.index()}),xe._parser.setExecuteHandler(D.C1.NEL,function(){return xe.nextLine()}),xe._parser.setExecuteHandler(D.C1.HTS,function(){return xe.tabSet()}),xe._parser.registerOscHandler(0,new z.OscHandler(function(Qe){return xe.setTitle(Qe),xe.setIconName(Qe),!0})),xe._parser.registerOscHandler(1,new z.OscHandler(function(Qe){return xe.setIconName(Qe)})),xe._parser.registerOscHandler(2,new z.OscHandler(function(Qe){return xe.setTitle(Qe)})),xe._parser.registerOscHandler(4,new z.OscHandler(function(Qe){return xe.setAnsiColor(Qe)})),xe._parser.registerEscHandler({final:"7"},function(){return xe.saveCursor()}),xe._parser.registerEscHandler({final:"8"},function(){return xe.restoreCursor()}),xe._parser.registerEscHandler({final:"D"},function(){return xe.index()}),xe._parser.registerEscHandler({final:"E"},function(){return xe.nextLine()}),xe._parser.registerEscHandler({final:"H"},function(){return xe.tabSet()}),xe._parser.registerEscHandler({final:"M"},function(){return xe.reverseIndex()}),xe._parser.registerEscHandler({final:"="},function(){return xe.keypadApplicationMode()}),xe._parser.registerEscHandler({final:">"},function(){return xe.keypadNumericMode()}),xe._parser.registerEscHandler({final:"c"},function(){return xe.fullReset()}),xe._parser.registerEscHandler({final:"n"},function(){return xe.setgLevel(2)}),xe._parser.registerEscHandler({final:"o"},function(){return xe.setgLevel(3)}),xe._parser.registerEscHandler({final:"|"},function(){return xe.setgLevel(3)}),xe._parser.registerEscHandler({final:"}"},function(){return xe.setgLevel(2)}),xe._parser.registerEscHandler({final:"~"},function(){return xe.setgLevel(1)}),xe._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return xe.selectDefaultCharset()}),xe._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return xe.selectDefaultCharset()});var De=function(Bt){je._parser.registerEscHandler({intermediates:"(",final:Bt},function(){return xe.selectCharset("("+Bt)}),je._parser.registerEscHandler({intermediates:")",final:Bt},function(){return xe.selectCharset(")"+Bt)}),je._parser.registerEscHandler({intermediates:"*",final:Bt},function(){return xe.selectCharset("*"+Bt)}),je._parser.registerEscHandler({intermediates:"+",final:Bt},function(){return xe.selectCharset("+"+Bt)}),je._parser.registerEscHandler({intermediates:"-",final:Bt},function(){return xe.selectCharset("-"+Bt)}),je._parser.registerEscHandler({intermediates:".",final:Bt},function(){return xe.selectCharset("."+Bt)}),je._parser.registerEscHandler({intermediates:"/",final:Bt},function(){return xe.selectCharset("/"+Bt)})},je=this;for(var dt in k.CHARSETS)De(dt);return xe._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return xe.screenAlignmentPattern()}),xe._parser.setErrorHandler(function(Qe){return xe._logService.error("Parsing error: ",Qe),Qe}),xe._parser.registerDcsHandler({intermediates:"$",final:"q"},new $(xe._bufferService,xe._coreService,xe._logService,xe._optionsService)),xe}return v(ce,se),Object.defineProperty(ce.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onAnsiColorChange",{get:function(){return this._onAnsiColorChange.event},enumerable:!1,configurable:!0}),ce.prototype.dispose=function(){se.prototype.dispose.call(this)},ce.prototype._preserveStack=function(le,oe,Ae,be){this._parseStack.paused=!0,this._parseStack.cursorStartX=le,this._parseStack.cursorStartY=oe,this._parseStack.decodedLength=Ae,this._parseStack.position=be},ce.prototype._logSlowResolvingAsync=function(le){this._logService.logLevel<=F.LogLevelEnum.WARN&&Promise.race([le,new Promise(function(oe,Ae){return setTimeout(function(){return Ae("#SLOW_TIMEOUT")},5e3)})]).catch(function(oe){if("#SLOW_TIMEOUT"!==oe)throw oe;console.warn("async parser handler taking longer than 5000 ms")})},ce.prototype.parse=function(le,oe){var Ae,be=this._activeBuffer.x,it=this._activeBuffer.y,qe=0,_t=this._parseStack.paused;if(_t){if(Ae=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,oe))return this._logSlowResolvingAsync(Ae),Ae;be=this._parseStack.cursorStartX,it=this._parseStack.cursorStartY,this._parseStack.paused=!1,le.length>J&&(qe=this._parseStack.position+J)}if(this._logService.debug("parsing data",le),this._parseBuffer.lengthJ)for(var yt=qe;yt0&&2===je.getWidth(this._activeBuffer.x-1)&&je.setCellFromCodePoint(this._activeBuffer.x-1,0,1,De.fg,De.bg,De.extended);for(var dt=oe;dt=yt)if(Ft){for(;this._activeBuffer.x=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),je=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=yt-1,2===it)continue;if(xe&&(je.insertCells(this._activeBuffer.x,it,this._activeBuffer.getNullCell(De),De),2===je.getWidth(yt-1)&&je.setCellFromCodePoint(yt-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,De.fg,De.bg,De.extended)),je.setCellFromCodePoint(this._activeBuffer.x++,be,it,De.fg,De.bg,De.extended),it>0)for(;--it;)je.setCellFromCodePoint(this._activeBuffer.x++,0,0,De.fg,De.bg,De.extended)}else je.getWidth(this._activeBuffer.x-1)?je.addCodepointToCell(this._activeBuffer.x-1,be):je.addCodepointToCell(this._activeBuffer.x-2,be)}Ae-oe>0&&(je.loadCell(this._activeBuffer.x-1,this._workCell),this._parser.precedingCodepoint=2===this._workCell.getWidth()||this._workCell.getCode()>65535?0:this._workCell.isCombined()?this._workCell.getChars().charCodeAt(0):this._workCell.content),this._activeBuffer.x0&&0===je.getWidth(this._activeBuffer.x)&&!je.hasContent(this._activeBuffer.x)&&je.setCellFromCodePoint(this._activeBuffer.x,0,1,De.fg,De.bg,De.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},ce.prototype.registerCsiHandler=function(le,oe){var Ae=this;return this._parser.registerCsiHandler(le,"t"!==le.final||le.prefix||le.intermediates?oe:function(be){return!ee(be.params[0],Ae._optionsService.options.windowOptions)||oe(be)})},ce.prototype.registerDcsHandler=function(le,oe){return this._parser.registerDcsHandler(le,new K.DcsHandler(oe))},ce.prototype.registerEscHandler=function(le,oe){return this._parser.registerEscHandler(le,oe)},ce.prototype.registerOscHandler=function(le,oe){return this._parser.registerOscHandler(le,new z.OscHandler(oe))},ce.prototype.bell=function(){return this._onRequestBell.fire(),!0},ce.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.options.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},ce.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},ce.prototype.backspace=function(){var le;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(null===(le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))||void 0===le?void 0:le.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);oe.hasWidth(this._activeBuffer.x)&&!oe.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},ce.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var le=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-le),!0},ce.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},ce.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},ce.prototype._restrictCursor=function(le){void 0===le&&(le=this._bufferService.cols-1),this._activeBuffer.x=Math.min(le,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},ce.prototype._setCursor=function(le,oe){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=le,this._activeBuffer.y=this._activeBuffer.scrollTop+oe):(this._activeBuffer.x=le,this._activeBuffer.y=oe),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},ce.prototype._moveCursor=function(le,oe){this._restrictCursor(),this._setCursor(this._activeBuffer.x+le,this._activeBuffer.y+oe)},ce.prototype.cursorUp=function(le){var oe=this._activeBuffer.y-this._activeBuffer.scrollTop;return this._moveCursor(0,oe>=0?-Math.min(oe,le.params[0]||1):-(le.params[0]||1)),!0},ce.prototype.cursorDown=function(le){var oe=this._activeBuffer.scrollBottom-this._activeBuffer.y;return this._moveCursor(0,oe>=0?Math.min(oe,le.params[0]||1):le.params[0]||1),!0},ce.prototype.cursorForward=function(le){return this._moveCursor(le.params[0]||1,0),!0},ce.prototype.cursorBackward=function(le){return this._moveCursor(-(le.params[0]||1),0),!0},ce.prototype.cursorNextLine=function(le){return this.cursorDown(le),this._activeBuffer.x=0,!0},ce.prototype.cursorPrecedingLine=function(le){return this.cursorUp(le),this._activeBuffer.x=0,!0},ce.prototype.cursorCharAbsolute=function(le){return this._setCursor((le.params[0]||1)-1,this._activeBuffer.y),!0},ce.prototype.cursorPosition=function(le){return this._setCursor(le.length>=2?(le.params[1]||1)-1:0,(le.params[0]||1)-1),!0},ce.prototype.charPosAbsolute=function(le){return this._setCursor((le.params[0]||1)-1,this._activeBuffer.y),!0},ce.prototype.hPositionRelative=function(le){return this._moveCursor(le.params[0]||1,0),!0},ce.prototype.linePosAbsolute=function(le){return this._setCursor(this._activeBuffer.x,(le.params[0]||1)-1),!0},ce.prototype.vPositionRelative=function(le){return this._moveCursor(0,le.params[0]||1),!0},ce.prototype.hVPosition=function(le){return this.cursorPosition(le),!0},ce.prototype.tabClear=function(le){var oe=le.params[0];return 0===oe?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===oe&&(this._activeBuffer.tabs={}),!0},ce.prototype.cursorForwardTab=function(le){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var oe=le.params[0]||1;oe--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},ce.prototype.cursorBackwardTab=function(le){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var oe=le.params[0]||1;oe--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},ce.prototype._eraseInBufferLine=function(le,oe,Ae,be){void 0===be&&(be=!1);var it=this._activeBuffer.lines.get(this._activeBuffer.ybase+le);it.replaceCells(oe,Ae,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),be&&(it.isWrapped=!1)},ce.prototype._resetBufferLine=function(le){var oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+le);oe.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),oe.isWrapped=!1},ce.prototype.eraseInDisplay=function(le){var oe;switch(this._restrictCursor(this._bufferService.cols),le.params[0]){case 0:for(this._dirtyRowService.markDirty(oe=this._activeBuffer.y),this._eraseInBufferLine(oe++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x);oe=this._bufferService.cols&&(this._activeBuffer.lines.get(oe+1).isWrapped=!1);oe--;)this._resetBufferLine(oe);this._dirtyRowService.markDirty(0);break;case 2:for(this._dirtyRowService.markDirty((oe=this._bufferService.rows)-1);oe--;)this._resetBufferLine(oe);this._dirtyRowService.markDirty(0);break;case 3:var Ae=this._activeBuffer.lines.length-this._bufferService.rows;Ae>0&&(this._activeBuffer.lines.trimStart(Ae),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Ae,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Ae,0),this._onScroll.fire(0))}return!0},ce.prototype.eraseInLine=function(le){switch(this._restrictCursor(this._bufferService.cols),le.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},ce.prototype.insertLines=function(le){this._restrictCursor();var oe=le.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y