diff --git a/client-py3/full/src/uds/tunnel.py b/client-py3/full/src/uds/tunnel.py index 086679bc..ff0cc36b 100644 --- a/client-py3/full/src/uds/tunnel.py +++ b/client-py3/full/src/uds/tunnel.py @@ -57,6 +57,7 @@ class ForwardServer(socketserver.ThreadingTCPServer): remote: typing.Tuple[str, int] ticket: str stop_flag: threading.Event + can_stop: bool timeout: int timer: typing.Optional[threading.Timer] check_certificate: bool @@ -79,20 +80,22 @@ class ForwardServer(socketserver.ThreadingTCPServer): ) self.remote = remote self.ticket = ticket - self.timeout = int(time.time()) + timeout if timeout else 0 + # Negative values for timeout, means "accept always connections" + # "but if no connection is stablished on timeout (positive)" + # "stop the listener" + self.timeout = int(time.time()) + timeout if timeout > 0 else 0 self.check_certificate = check_certificate self.stop_flag = threading.Event() # False initial self.current_connections = 0 self.status = TUNNEL_LISTENING + self.can_stop = False - if timeout: - self.timer = threading.Timer( - timeout, ForwardServer.__checkStarted, args=(self,) - ) - self.timer.start() - else: - self.timer = None + timeout = abs(timeout) or 60 + self.timer = threading.Timer( + abs(timeout), ForwardServer.__checkStarted, args=(self,) + ) + self.timer.start() def stop(self) -> None: if not self.stop_flag.is_set(): @@ -120,6 +123,9 @@ class ForwardServer(socketserver.ThreadingTCPServer): return context.wrap_socket(rsocket, server_hostname=self.remote[0]) def check(self) -> bool: + if self.status == TUNNEL_ERROR: + return False + try: with self.connect() as ssl_socket: ssl_socket.sendall(HANDSHAKE_V1 + b'TEST') @@ -135,11 +141,14 @@ class ForwardServer(socketserver.ThreadingTCPServer): @property def stoppable(self) -> bool: - return self.timeout != 0 and int(time.time()) > self.timeout + logger.debug('Is stoppable: %s', self.can_stop) + return self.can_stop or (self.timeout != 0 and int(time.time()) > self.timeout) @staticmethod def __checkStarted(fs: 'ForwardServer') -> None: + logger.debug('New connection limit reached') fs.timer = None + fs.can_stop = True if fs.current_connections <= 0: fs.stop() @@ -150,15 +159,17 @@ class Handler(socketserver.BaseRequestHandler): # server: ForwardServer def handle(self) -> None: - self.server.current_connections += 1 self.server.status = TUNNEL_OPENING # If server processing is over time if self.server.stoppable: - logger.info('Rejected timedout connection try') + self.server.status = TUNNEL_ERROR + logger.info('Rejected timedout connection') self.request.close() # End connection without processing it return + self.server.current_connections += 1 + # Open remote connection try: logger.debug('Ticket %s', self.server.ticket) @@ -169,7 +180,9 @@ class Handler(socketserver.BaseRequestHandler): data = ssl_socket.recv(2) if data != b'OK': data += ssl_socket.recv(128) - raise Exception(f'Error received: {data.decode(errors="ignore")}') # Notify error + raise Exception( + f'Error received: {data.decode(errors="ignore")}' + ) # Notify error # All is fine, now we can tunnel data self.process(remote=ssl_socket) diff --git a/server/src/uds/REST/methods/actor_v3.py b/server/src/uds/REST/methods/actor_v3.py index 6c7b1d09..dc18f2b0 100644 --- a/server/src/uds/REST/methods/actor_v3.py +++ b/server/src/uds/REST/methods/actor_v3.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2014-2019 Virtual Cable S.L. +# Copyright (c) 2014-2021 Virtual Cable S.L. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -423,6 +422,13 @@ class Login(LoginLogout): """ name = 'login' + @staticmethod + def process_login(userService: UserService, username: str) -> typing.Optional[osmanagers.OSManager]: + osManager: typing.Optional[osmanagers.OSManager] = userService.getOsManagerInstance() + if not userService.in_use: # If already logged in, do not add a second login (windows does this i.e.) + osmanagers.OSManager.loggedIn(userService, username) + return osManager + def action(self) -> typing.MutableMapping[str, typing.Any]: isManaged = self._params.get('type') != UNMANAGED ip = hostname = '' @@ -432,9 +438,7 @@ class Login(LoginLogout): try: userService: UserService = self.getUserService() - osManager: typing.Optional[osmanagers.OSManager] = userService.getOsManagerInstance() - if not userService.in_use: # If already logged in, do not add a second login (windows does this i.e.) - osmanagers.OSManager.loggedIn(userService, self._params.get('username') or '') + osManager = Login.process_login(userService, self._params.get('username') or '') maxIdle = osManager.maxIdle() if osManager else None @@ -462,21 +466,29 @@ class Logout(LoginLogout): """ name = 'logout' + @staticmethod + def process_logout(userService: UserService, username: str) -> None: + """ + This method is static so can be invoked from elsewhere + """ + osManager: typing.Optional[osmanagers.OSManager] = userService.getOsManagerInstance() + if userService.in_use: # If already logged out, do not add a second logout (windows does this i.e.) + osmanagers.OSManager.loggedOut(userService, username) + if osManager: + if osManager.isRemovableOnLogout(userService): + logger.debug('Removable on logout: %s', osManager) + userService.remove() + else: + userService.remove() + + def action(self) -> typing.MutableMapping[str, typing.Any]: isManaged = self._params.get('type') != UNMANAGED logger.debug('Args: %s, Params: %s', self._args, self._params) try: userService: UserService = self.getUserService() - osManager: typing.Optional[osmanagers.OSManager] = userService.getOsManagerInstance() - if userService.in_use: # If already logged out, do not add a second logout (windows does this i.e.) - osmanagers.OSManager.loggedOut(userService, self._params.get('username') or '') - if osManager: - if osManager.isRemovableOnLogout(userService): - logger.debug('Removable on logout: %s', osManager) - userService.remove() - else: - userService.remove() + Logout.process_logout(userService, self._params.get('username') or '') except Exception: # If unamanaged host, lest do a bit more work looking for a service with the provided parameters... if isManaged: raise diff --git a/server/src/uds/core/osmanagers/osmanager.py b/server/src/uds/core/osmanagers/osmanager.py index 3863a11a..f991c0fe 100644 --- a/server/src/uds/core/osmanagers/osmanager.py +++ b/server/src/uds/core/osmanagers/osmanager.py @@ -177,7 +177,7 @@ class OSManager(Module): Helper method that informs if the os manager transforms the username and/or the password. This is used from ServicePool """ - return cls.processUserPassword != OSManager.processUserPassword + return hash(cls.processUserPassword) != hash(OSManager.processUserPassword) def processUserPassword(self, userService: 'UserService', username: str, password: str) -> typing.Tuple[str, str]: """ @@ -299,5 +299,5 @@ class OSManager(Module): """ return False - def __str__(self): + def __str__(self) -> str: return "Base OS Manager" diff --git a/server/src/uds/dispatchers/opengnsys/__init__.py b/server/src/uds/dispatchers/opengnsys/__init__.py new file mode 100644 index 00000000..0dfe5937 --- /dev/null +++ b/server/src/uds/dispatchers/opengnsys/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2021 Virtual Cable S.L.U. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# * Neither the name of Virtual Cable S.L. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +''' +@author: Adolfo Gómez, dkmaster at dkmon dot com +''' diff --git a/server/src/uds/dispatchers/opengnsys/urls.py b/server/src/uds/dispatchers/opengnsys/urls.py new file mode 100644 index 00000000..dc140239 --- /dev/null +++ b/server/src/uds/dispatchers/opengnsys/urls.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2021 Virtual Cable S.L.U. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# * Neither the name of Virtual Cable S.L. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +''' +@author: Adolfo Gómez, dkmaster at dkmon dot com +''' +from django.conf.urls import url + +from . import views + +urlpatterns = [ + url(r'^uds/ognotify/(?P[a-z]+)/(?P[a-zA-Z0-9-_]+)/(?P[a-zA-Z0-9-_]+)$', views.opengnsys, name='dispatcher.opengnsys'), +] diff --git a/server/src/uds/dispatchers/opengnsys/views.py b/server/src/uds/dispatchers/opengnsys/views.py new file mode 100644 index 00000000..7087d26f --- /dev/null +++ b/server/src/uds/dispatchers/opengnsys/views.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2021 Virtual Cable S.L.U. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# * Neither the name of Virtual Cable S.L. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +''' +@author: Adolfo Gómez, dkmaster at dkmon dot com +''' +import typing +import logging + +from django.http import HttpResponse, HttpRequest + +from uds.REST.methods import actor_v3 +from uds.core.auths import auth +from uds.models import UserService +from uds.core.util.model import processUuid +from uds.core.util import states + +logger = logging.getLogger(__name__) + +OK = 'OK' +CONTENT_TYPE = 'text/plain' + + +@auth.trustedSourceRequired +def opengnsys(request: HttpRequest, msg: str, token: str, uuid: str) -> HttpResponse: + logger.debug('Received opengnsys message %s, token %s, uuid %s', msg, token, uuid) + + def getUserService() -> typing.Optional[UserService]: + try: + userService = UserService.objects.get(uuid=processUuid(uuid), state=states.userService.USABLE) + if userService.getProperty('token') == token: + return userService + logger.warning( + 'OpenGnsys: invalid token %s for userService %s. (Ignored)', + token, + uuid, + ) + # Sleep a while in case of error? + except Exception as e: + # Any exception will stop process + logger.warning('OpenGnsys: invalid userService %s:%s. (Ignored)', token, uuid) + + return None + + def release() -> None: + userService = getUserService() + if userService: + logger.info('Released from OpenGnsys %s', userService.friendly_name) + userService.setProperty('from_release', '1') + userService.release() + + def login() -> None: + userService = getUserService() + if userService: + # Ignore login to cached machines... + if userService.cache_level != 0: + logger.info('Ignored OpenGnsys login to %s to cached machine', userService.friendly_name) + return + logger.debug('Processing login from OpenGnsys %s', userService.friendly_name) + actor_v3.Login.process_login(userService, 'OpenGnsys') + + def logout() -> None: + userService = getUserService() + if userService: + # Ignore logout to cached machines... + if userService.cache_level != 0: + logger.info('Ignored OpenGnsys logout to %s to cached machine', userService.friendly_name) + return + logger.debug('Processing logout from OpenGnsys %s', userService.friendly_name) + actor_v3.Logout.process_logout(userService, 'OpenGnsys') + + fnc: typing.Optional[typing.Callable[[], None]] = { + 'login': login, + 'logout': logout, + 'release': release, + }.get(msg) + + if fnc: + fnc() + + # Silently fail errors, do not notify anything (not needed anyway) + return HttpResponse(OK, content_type=CONTENT_TYPE) diff --git a/server/src/uds/osmanagers/LinuxOsManager/linux_osmanager.py b/server/src/uds/osmanagers/LinuxOsManager/linux_osmanager.py index ccb10cdd..9ff37358 100644 --- a/server/src/uds/osmanagers/LinuxOsManager/linux_osmanager.py +++ b/server/src/uds/osmanagers/LinuxOsManager/linux_osmanager.py @@ -197,12 +197,12 @@ class LinuxOsManager(osmanagers.OSManager): elif message == "log": self.doLog(userService, data, log.ACTOR) elif message == "login": - osmanagers.OSManager.loggedIn(userService, data) + osmanagers.OSManager.loggedIn(userService, typing.cast(str, data)) ip, hostname = userService.getConnectionSource() deadLine = userService.deployed_service.getDeadline() ret = "{}\t{}\t{}".format(ip, hostname, 0 if deadLine is None else deadLine) elif message == "logout": - osmanagers.OSManager.loggedOut(userService, data) + osmanagers.OSManager.loggedOut(userService, typing.cast(str, data)) doRemove = self.isRemovableOnLogout(userService) elif message == "ip": # This ocurss on main loop inside machine, so userService is usable diff --git a/server/src/uds/services/OpenGnsys/__init__.py b/server/src/uds/services/OpenGnsys/__init__.py index d1d01c08..a5543de0 100644 --- a/server/src/uds/services/OpenGnsys/__init__.py +++ b/server/src/uds/services/OpenGnsys/__init__.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2017-2019 Virtual Cable S.L. +# Copyright (c) 2017-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, diff --git a/server/src/uds/services/OpenGnsys/deployment.py b/server/src/uds/services/OpenGnsys/deployment.py index 0c92596b..1560a12f 100644 --- a/server/src/uds/services/OpenGnsys/deployment.py +++ b/server/src/uds/services/OpenGnsys/deployment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (c) 2012 Virtual Cable S.L. +# Copyright (c) 2015-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -34,6 +34,7 @@ import logging import typing from uds.core.services import UserDeployment +from uds.core.managers import cryptoManager from uds.core.util.state import State from uds.core.util import log from uds.models.util import getSqlDatetimeAsUnix @@ -47,7 +48,7 @@ if typing.TYPE_CHECKING: logger = logging.getLogger(__name__) -opCreate, opError, opFinish, opRemove, opRetry = range(5) +opCreate, opError, opFinish, opRemove, opRetry, opStart = range(6) class OGDeployment(UserDeployment): @@ -71,7 +72,9 @@ class OGDeployment(UserDeployment): _stamp: int = 0 _reason: str = '' - _queue: typing.List[int] # Do not initialize mutable, just declare and it is initialized on "initialize" + _queue: typing.List[ + int + ] # Do not initialize mutable, just declare and it is initialized on "initialize" _uuid: str def initialize(self) -> None: @@ -93,16 +96,18 @@ class OGDeployment(UserDeployment): """ Does nothing right here, we will use environment storage in this sample """ - return b'\1'.join([ - b'v1', - self._name.encode('utf8'), - self._ip.encode('utf8'), - self._mac.encode('utf8'), - self._machineId.encode('utf8'), - self._reason.encode('utf8'), - str(self._stamp).encode('utf8'), - pickle.dumps(self._queue, protocol=0) - ]) + return b'\1'.join( + [ + b'v1', + self._name.encode('utf8'), + self._ip.encode('utf8'), + self._mac.encode('utf8'), + self._machineId.encode('utf8'), + self._reason.encode('utf8'), + str(self._stamp).encode('utf8'), + pickle.dumps(self._queue, protocol=0), + ] + ) def unmarshal(self, data: bytes) -> None: """ @@ -135,10 +140,33 @@ class OGDeployment(UserDeployment): OpenGnsys will try it best by sending an WOL """ dbs = self.dbservice() - deadline = dbs.deployed_service.getDeadline() if dbs else 0 - self.service().notifyDeadline(self._machineId, deadline) + if not dbs: + return State.FINISHED - return State.FINISHED + try: + # First, check Machine is alive.. + status = self.__checkMachineReady() + if status == State.FINISHED: + self.service().notifyDeadline( + self._machineId, dbs.deployed_service.getDeadline() + ) + return State.FINISHED + + if status == State.ERROR: + return State.ERROR + + # Machine powered off, check what to do... + if self.service().isRemovableIfUnavailable(): + return self.__error( + 'Machine is unavailable and service has "Remove if unavailable" flag active.' + ) + + # Try to start it, and let's see + self._queue = [opStart, opFinish] + return self.__executeQueue() + + except Exception as e: + return self.__error('Error setting ready state: {}'.format(e)) def deployForUser(self, user: 'models.User') -> str: """ @@ -159,7 +187,11 @@ class OGDeployment(UserDeployment): self._queue = [opCreate, opFinish] def __checkMachineReady(self) -> str: - logger.debug('Checking that state of machine %s (%s) is ready', self._machineId, self._name) + logger.debug( + 'Checking that state of machine %s (%s) is ready', + self._machineId, + self._name, + ) try: status = self.service().status(self._machineId) @@ -202,7 +234,11 @@ class OGDeployment(UserDeployment): logger.debug('Setting error state, reason: %s', reason) self.doLog(log.ERROR, reason) - # TODO: Unreserve machine?? Maybe it just better to keep it assigned so UDS don't get it again in a while... + if self._machineId: + try: + self.service().unreserve(self._machineId) + except Exception: + pass self._queue = [opError] self._reason = str(reason) @@ -222,13 +258,16 @@ class OGDeployment(UserDeployment): opCreate: self.__create, opRetry: self.__retry, opRemove: self.__remove, + opStart: self.__start, } try: - execFnc: typing.Optional[typing.Callable[[], str]] = fncs.get(op, None) + execFnc: typing.Optional[typing.Callable[[], str]] = fncs.get(op) if execFnc is None: - return self.__error('Unknown operation found at execution queue ({0})'.format(op)) + return self.__error( + 'Unknown operation found at execution queue ({0})'.format(op) + ) execFnc() @@ -252,10 +291,11 @@ class OGDeployment(UserDeployment): """ Deploys a machine from template for user/cache """ + r: typing.Any = None + token = cryptoManager().randomString(32) try: - r: typing.Any = None r = self.service().reserve() - self.service().notifyEvents(r['id'], self._uuid) + self.service().notifyEvents(r['id'], token, self._uuid) except Exception as e: # logger.exception('Creating machine') if r: # Reservation was done, unreserve it!!! @@ -265,7 +305,7 @@ class OGDeployment(UserDeployment): except Exception as ei: # Error unreserving reserved machine on creation logger.error('Error unreserving errored machine: %s', ei) - + raise Exception('Error creating reservation: {}'.format(e)) self._machineId = r['id'] @@ -274,19 +314,36 @@ class OGDeployment(UserDeployment): self._ip = r['ip'] self._stamp = getSqlDatetimeAsUnix() + self.doLog( + log.INFO, + f'Reserved machine {self._name}: id: {self._machineId}, mac: {self._mac}, ip: {self._ip}', + ) + # Store actor version & Known ip dbs = self.dbservice() if dbs: - dbs.setProperty('actor_version', '1.0-OpenGnsys') + dbs.setProperty('actor_version', '1.1-OpenGnsys') + dbs.setProperty('token', token) dbs.logIP(self._ip) return State.RUNNING + def __start(self) -> str: + if self._machineId: + self.service().powerOn(self._machineId) + return State.RUNNING + def __remove(self) -> str: """ Removes a machine from system + Avoids "double unreserve" in case the reservation was made from release """ - self.service().unreserve(self._machineId) + dbs = self.dbservice() + if dbs: + # On release callback, we will set a property on DB called "from_release" + # so we can avoid double unreserve + if dbs.getProperty('from_release') is None: + self.service().unreserve(self._machineId) return State.RUNNING # Check methods @@ -296,6 +353,9 @@ class OGDeployment(UserDeployment): """ return self.__checkMachineReady() + # Alias for poweron check + __checkStart = __checkCreate + def __checkRemoved(self) -> str: """ Checks if a machine has been removed @@ -319,13 +379,18 @@ class OGDeployment(UserDeployment): opCreate: self.__checkCreate, opRetry: self.__retry, opRemove: self.__checkRemoved, + opStart: self.__checkStart, } try: - chkFnc: typing.Optional[typing.Optional[typing.Callable[[], str]]] = fncs.get(op, None) + chkFnc: typing.Optional[ + typing.Optional[typing.Callable[[], str]] + ] = fncs.get(op) if chkFnc is None: - return self.__error('Unknown operation found at check queue ({0})'.format(op)) + return self.__error( + 'Unknown operation found at check queue ({0})'.format(op) + ) state = chkFnc() if state == State.FINISHED: @@ -379,4 +444,12 @@ class OGDeployment(UserDeployment): }.get(op, '????') def __debug(self, txt) -> None: - logger.debug('State at %s: name: %s, ip: %s, mac: %s, machine:%s, queue: %s', txt, self._name, self._ip, self._mac, self._machineId, [OGDeployment.__op2str(op) for op in self._queue]) + logger.debug( + 'State at %s: name: %s, ip: %s, mac: %s, machine:%s, queue: %s', + txt, + self._name, + self._ip, + self._mac, + self._machineId, + [OGDeployment.__op2str(op) for op in self._queue], + ) diff --git a/server/src/uds/services/OpenGnsys/helpers.py b/server/src/uds/services/OpenGnsys/helpers.py index 0c4e1ca2..718895d3 100644 --- a/server/src/uds/services/OpenGnsys/helpers.py +++ b/server/src/uds/services/OpenGnsys/helpers.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (c) 2012 Virtual Cable S.L. +# Copyright (c) 2015-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -53,8 +53,12 @@ def getResources(parameters: typing.Any) -> typing.List[typing.Dict[str, typing. api = provider.api - labs = [gui.choiceItem('0', _('All Labs'))] + [gui.choiceItem(l['id'], l['name']) for l in api.getLabs(ou=parameters['ou'])] - images = [gui.choiceItem(z['id'], z['name']) for z in api.getImages(ou=parameters['ou'])] + labs = [gui.choiceItem('0', _('All Labs'))] + [ + gui.choiceItem(l['id'], l['name']) for l in api.getLabs(ou=parameters['ou']) + ] + images = [ + gui.choiceItem(z['id'], z['name']) for z in api.getImages(ou=parameters['ou']) + ] data = [ {'name': 'lab', 'values': labs}, diff --git a/server/src/uds/services/OpenGnsys/og/__init__.py b/server/src/uds/services/OpenGnsys/og/__init__.py index 5238c2c4..75091291 100644 --- a/server/src/uds/services/OpenGnsys/og/__init__.py +++ b/server/src/uds/services/OpenGnsys/og/__init__.py @@ -56,17 +56,22 @@ def ensureConnected(fnc: typing.Callable[..., RT]) -> typing.Callable[..., RT]: def inner(*args, **kwargs) -> RT: args[0].connect() return fnc(*args, **kwargs) + return inner # Result checker -def ensureResponseIsValid(response: requests.Response, errMsg: typing.Optional[str] = None) -> typing.Any: +def ensureResponseIsValid( + response: requests.Response, errMsg: typing.Optional[str] = None +) -> typing.Any: if not response.ok: if not errMsg: errMsg = 'Invalid response' try: - err = response.json()['message'] # Extract any key, in case of error is expected to have only one top key so this will work + err = response.json()[ + 'message' + ] # Extract any key, in case of error is expected to have only one top key so this will work except Exception: err = response.content errMsg = '{}: {}, ({})'.format(errMsg, err, response.status_code) @@ -76,7 +81,11 @@ def ensureResponseIsValid(response: requests.Response, errMsg: typing.Optional[s try: return json.loads(response.content) except Exception: - raise Exception('Error communicating with OpenGnsys: {}'.format(response.content[:128].decode())) + raise Exception( + 'Error communicating with OpenGnsys: {}'.format( + response.content[:128].decode() + ) + ) class OpenGnsysClient: @@ -88,7 +97,14 @@ class OpenGnsysClient: verifyCert: bool cachedVersion: typing.Optional[str] - def __init__(self, username: str, password: str, endpoint: str, cache: 'Cache', verifyCert: bool = False): + def __init__( + self, + username: str, + password: str, + endpoint: str, + cache: 'Cache', + verifyCert: bool = False, + ): self.username = username self.password = password self.endpoint = endpoint @@ -108,11 +124,18 @@ class OpenGnsysClient: def _ogUrl(self, path: str) -> str: return self.endpoint + '/' + path - def _post(self, path: str, data: typing.Any, errMsg: typing.Optional[str] = None) -> typing.Any: + def _post( + self, path: str, data: typing.Any, errMsg: typing.Optional[str] = None + ) -> typing.Any: if not FAKE: return ensureResponseIsValid( - requests.post(self._ogUrl(path), data=json.dumps(data), headers=self.headers, verify=self.verifyCert), - errMsg=errMsg + requests.post( + self._ogUrl(path), + data=json.dumps(data), + headers=self.headers, + verify=self.verifyCert, + ), + errMsg=errMsg, ) # FAKE Connection :) return fake.post(path, data, errMsg) @@ -120,8 +143,10 @@ class OpenGnsysClient: def _get(self, path: str, errMsg: typing.Optional[str] = None) -> typing.Any: if not FAKE: return ensureResponseIsValid( - requests.get(self._ogUrl(path), headers=self.headers, verify=self.verifyCert), - errMsg=errMsg + requests.get( + self._ogUrl(path), headers=self.headers, verify=self.verifyCert + ), + errMsg=errMsg, ) # FAKE Connection :) return fake.get(path, errMsg) @@ -129,8 +154,10 @@ class OpenGnsysClient: def _delete(self, path: str, errMsg: typing.Optional[str] = None) -> typing.Any: if not FAKE: return ensureResponseIsValid( - requests.delete(self._ogUrl(path), headers=self.headers, verify=self.verifyCert), - errMsg=errMsg + requests.delete( + self._ogUrl(path), headers=self.headers, verify=self.verifyCert + ), + errMsg=errMsg, ) return fake.delete(path, errMsg) @@ -145,11 +172,8 @@ class OpenGnsysClient: auth = self._post( urls.LOGIN, - data={ - 'username': self.username, - 'password': self.password - }, - errMsg='Loggin in' + data={'username': self.username, 'password': self.password}, + errMsg='Loggin in', ) self.auth = auth['apikey'] @@ -179,7 +203,11 @@ class OpenGnsysClient: # /ous/{ouid}/labs # Take into accout that we must exclude the ones with "inremotepc" set to false. errMsg = 'Getting list of labs from ou {}'.format(ou) - return [{'id': l['id'], 'name': l['name']} for l in self._get(urls.LABS.format(ou=ou), errMsg=errMsg) if l.get('inremotepc', False) is True] + return [ + {'id': l['id'], 'name': l['name']} + for l in self._get(urls.LABS.format(ou=ou), errMsg=errMsg) + if l.get('inremotepc', False) is True + ] @ensureConnected def getImages(self, ou: str) -> typing.List[typing.MutableMapping[str, str]]: @@ -187,20 +215,23 @@ class OpenGnsysClient: # /ous/{ouid}/images # Take into accout that we must exclude the ones with "inremotepc" set to false. errMsg = 'Getting list of images from ou {}'.format(ou) - return [{'id': l['id'], 'name': l['name']} for l in self._get(urls.IMAGES.format(ou=ou), errMsg=errMsg) if l.get('inremotepc', False) is True] + return [ + {'id': l['id'], 'name': l['name']} + for l in self._get(urls.IMAGES.format(ou=ou), errMsg=errMsg) + if l.get('inremotepc', False) is True + ] @ensureConnected - def reserve(self, ou: str, image: str, lab: int = 0, maxtime: int = 24) -> typing.MutableMapping[str, typing.Union[str, int]]: + def reserve( + self, ou: str, image: str, lab: int = 0, maxtime: int = 24 + ) -> typing.MutableMapping[str, typing.Union[str, int]]: # This method is inteded to "get" a machine from OpenGnsys # The method used is POST # invokes /ous/{ouid}}/images/{imageid}/reserve # also remember to store "labid" # Labid can be "0" that means "all laboratories" errMsg = 'Reserving image {} in ou {}'.format(image, ou) - data = { - 'labid': lab, - 'maxtime': maxtime - } + data = {'labid': lab, 'maxtime': maxtime} res = self._post(urls.RESERVE.format(ou=ou, image=image), data, errMsg=errMsg) return { 'ou': ou, @@ -210,7 +241,7 @@ class OpenGnsysClient: 'id': '.'.join((str(ou), str(res['lab']['id']), str(res['id']))), 'name': res['name'], 'ip': res['ip'], - 'mac': ':'.join(re.findall('..', res['mac'])) + 'mac': ':'.join(re.findall('..', res['mac'])), } @ensureConnected @@ -219,29 +250,48 @@ class OpenGnsysClient: # Invoked every time we need to release a reservation (i mean, if a reservation is done, this will be called with the obtained id from that reservation) ou, lab, client = machineId.split('.') errMsg = 'Unreserving client {} in lab {} in ou {}'.format(client, lab, ou) - return self._delete(urls.UNRESERVE.format(ou=ou, lab=lab, client=client), errMsg=errMsg) + return self._delete( + urls.UNRESERVE.format(ou=ou, lab=lab, client=client), errMsg=errMsg + ) + + def powerOn(self, machineId, image): + # This method ask to poweron a machine to openGnsys + ou, lab, client = machineId.split('.') + errMsg = 'Powering on client {} in lab {} in ou {}'.format(client, lab, ou) + try: + data = { + 'image': image, + } + return self._post( + urls.START.format(ou=ou, lab=lab, client=client), data, errMsg=errMsg + ) + except Exception: # For now, if this fails, ignore it to keep backwards compat + return 'OK' @ensureConnected - def notifyURLs(self, machineId: str, loginURL: str, logoutURL: str) -> typing.Any: + def notifyURLs( + self, machineId: str, loginURL: str, logoutURL: str, releaseURL: str + ) -> typing.Any: ou, lab, client = machineId.split('.') errMsg = 'Notifying login/logout urls' - data = { - 'urlLogin': loginURL, - 'urlLogout': logoutURL - } + data = {'urlLogin': loginURL, 'urlLogout': logoutURL, 'urlRelease': releaseURL} - return self._post(urls.EVENTS.format(ou=ou, lab=lab, client=client), data, errMsg=errMsg) + return self._post( + urls.EVENTS.format(ou=ou, lab=lab, client=client), data, errMsg=errMsg + ) @ensureConnected - def notifyDeadline(self, machineId: str, deadLine: typing.Optional[int]) -> typing.Any: + def notifyDeadline( + self, machineId: str, deadLine: typing.Optional[int] + ) -> typing.Any: ou, lab, client = machineId.split('.') deadLine = deadLine or 0 errMsg = 'Notifying deadline' - data = { - 'deadLine': deadLine - } + data = {'deadLine': deadLine} - return self._post(urls.SESSIONS.format(ou=ou, lab=lab, client=client), data, errMsg=errMsg) + return self._post( + urls.SESSIONS.format(ou=ou, lab=lab, client=client), data, errMsg=errMsg + ) @ensureConnected def status(self, id_: str) -> typing.Any: diff --git a/server/src/uds/services/OpenGnsys/og/fake.py b/server/src/uds/services/OpenGnsys/og/fake.py index fa89264b..8c40d6b4 100644 --- a/server/src/uds/services/OpenGnsys/og/fake.py +++ b/server/src/uds/services/OpenGnsys/og/fake.py @@ -40,20 +40,13 @@ from . import urls logger = logging.getLogger(__name__) -AUTH = { - "userid": 1001, - "apikey": "fakeAPIKeyJustForDeveloping" -} +AUTH = {"userid": 1001, "apikey": "fakeAPIKeyJustForDeveloping"} INFO = { "project": "OpenGnsys", "version": "1.1.0pre", "release": "r5299", - "services": [ - "server", - "repository", - "tracker" - ], + "services": ["server", "repository", "tracker"], "oglive": [ { "distribution": "xenial", @@ -61,7 +54,7 @@ INFO = { "architecture": "amd64", "revision": "r5225", "directory": "ogLive-xenial-4.8.0-amd64-r5225", - "iso": "ogLive-xenial-4.8.0-39-generic-amd64-r5225.iso" + "iso": "ogLive-xenial-4.8.0-39-generic-amd64-r5225.iso", }, { "iso": "ogLive-precise-3.2.0-23-generic-r4820.iso", @@ -69,19 +62,14 @@ INFO = { "revision": "r4820", "architecture": "i386", "kernel": "3.2.0-23-generic", - "distribution": "precise" - }] + "distribution": "precise", + }, + ], } OUS = [ - { - "id": "1", - "name": "Unidad Organizativa (Default)" - }, - { - "id": "2", - "name": "Unidad Organizatva VACIA" - }, + {"id": "1", "name": "Unidad Organizativa (Default)"}, + {"id": "2", "name": "Unidad Organizatva VACIA"}, ] LABS = [ @@ -89,58 +77,32 @@ LABS = [ "id": "1", "name": "Sala de control", "inremotepc": True, - "group": { - "id": "0" - }, - "ou": { - "id": "1" - } + "group": {"id": "0"}, + "ou": {"id": "1"}, }, { "id": "2", "name": "Sala de computación cuántica", "inremotepc": True, - "group": { - "id": "0" - }, - "ou": { - "id": "1" - } - } + "group": {"id": "0"}, + "ou": {"id": "1"}, + }, ] IMAGES = [ - { - "id": "1", - "name": "Basica1604", - "inremotepc": True, - "ou": { - "id": "1" - } - }, - { - "id": "2", - "name": "Ubuntu16", - "inremotepc": True, - "ou": { - "id": "1" - } - }, + {"id": "1", "name": "Basica1604", "inremotepc": True, "ou": {"id": "1"}}, + {"id": "2", "name": "Ubuntu16", "inremotepc": True, "ou": {"id": "1"}}, { "id": "3", "name": "Ubuntu64 Not in Remote", "inremotepc": False, - "ou": { - "id": "1" - } + "ou": {"id": "1"}, }, { "id": "4", "name": "Ubuntu96 Not In Remote", "inremotepc": False, - "ou": { - "id": "1" - } + "ou": {"id": "1"}, }, ] @@ -149,58 +111,50 @@ RESERVE: typing.Dict[str, typing.Any] = { "name": "pcpruebas", "mac": "4061860521FE", "ip": "10.1.14.31", - "lab": { - "id": 1 - }, - "ou": { - "id": 1 - } + "lab": {"id": 1}, + "ou": {"id": 1}, } UNRESERVE = '' -STATUS_OFF = { - "id": 4, - "ip": "10.1.14.31", - "status": "off", - "loggedin": False -} +STATUS_OFF = {"id": 4, "ip": "10.1.14.31", "status": "off", "loggedin": False} # A couple of status for testing -STATUS_READY_LINUX = { - "id": 4, - "ip": "10.1.14.31", - "status": "linux", - "loggedin": False -} +STATUS_READY_LINUX = {"id": 4, "ip": "10.1.14.31", "status": "linux", "loggedin": False} STATUS_READY_WINDOWS = { "id": 4, "ip": "10.1.14.31", "status": "windows", - "loggedin": False + "loggedin": False, } # FAKE post -def post(path: str, data: typing.Any, errMsg: typing.Optional[str] = None) -> typing.Any: +def post( + path: str, data: typing.Any, errMsg: typing.Optional[str] = None +) -> typing.Any: logger.info('FAKE POST request to %s with %s data. (%s)', path, data, errMsg) if path == urls.LOGIN: return AUTH - if path == urls.RESERVE.format(ou=1, image=1) or path == urls.RESERVE.format(ou=1, image=2): + if path == urls.RESERVE.format(ou=1, image=1) or path == urls.RESERVE.format( + ou=1, image=2 + ): res = copy.deepcopy(RESERVE) res['name'] += str(random.randint(5000, 100000)) res['mac'] = ''.join(random.choice('0123456789ABCDEF') for _ in range(12)) res['ip'] = '1.2.3.4' return res - # raise Exception('Unknown FAKE URL on POST: {}'.format(path)) - return '' + # Ignore rest of responses + return {'status': 'ok'} # FAKE get -def get(path, errMsg: typing.Optional[str]) -> typing.Any: # pylint: disable=too-many-return-statements +def get( + path, errMsg: typing.Optional[str] +) -> typing.Any: # pylint: disable=too-many-return-statements logger.info('FAKE GET request to %s. (%s)', path, errMsg) if path == urls.INFO: return INFO diff --git a/server/src/uds/services/OpenGnsys/og/urls.py b/server/src/uds/services/OpenGnsys/og/urls.py index 332ae593..16b5d9d1 100644 --- a/server/src/uds/services/OpenGnsys/og/urls.py +++ b/server/src/uds/services/OpenGnsys/og/urls.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2017-2019 Virtual Cable S.L. +# Copyright (c) 2017-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -43,3 +42,5 @@ UNRESERVE = '/ous/{ou}/labs/{lab}/clients/{client}/unreserve' STATUS = '/ous/{ou}/labs/{lab}/clients/{client}/status' EVENTS = '/ous/{ou}/labs/{lab}/clients/{client}/events' SESSIONS = '/ous/{ou}/labs/{lab}/clients/{client}/session' +# TODO: fix this +START = '/ous/{ou}/labs/{lab}/clients/{client}/init' diff --git a/server/src/uds/services/OpenGnsys/provider.py b/server/src/uds/services/OpenGnsys/provider.py index 3ec5882e..ccfb307b 100644 --- a/server/src/uds/services/OpenGnsys/provider.py +++ b/server/src/uds/services/OpenGnsys/provider.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2012-2019 Virtual Cable S.L. +# Copyright (c) 2012-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -51,6 +50,7 @@ if typing.TYPE_CHECKING: logger = logging.getLogger(__name__) + class OGProvider(ServiceProvider): """ This class represents the sample services provider @@ -68,6 +68,7 @@ class OGProvider(ServiceProvider): we MUST register it at package __init__. """ + # : What kind of services we offer, this are classes inherited from Service offers = [OGService] # : Name to show the administrator. This string will be translated BEFORE @@ -92,17 +93,81 @@ class OGProvider(ServiceProvider): # but used for sample purposes # If we don't indicate an order, the output order of fields will be # "random" - host = gui.TextField(length=64, label=_('Host'), order=1, tooltip=_('OpenGnsys Host'), required=True) - port = gui.NumericField(length=5, label=_('Port'), defvalue='443', order=2, tooltip=_('OpenGnsys Port (default is 443, and only ssl connection is allowed)'), required=True) - checkCert = gui.CheckBoxField(label=_('Check Cert.'), order=3, tooltip=_('If checked, ssl certificate of OpenGnsys server must be valid (not self signed)')) - username = gui.TextField(length=32, label=_('Username'), order=4, tooltip=_('User with valid privileges on OpenGnsys'), required=True) - password = gui.PasswordField(lenth=32, label=_('Password'), order=5, tooltip=_('Password of the user of OpenGnsys'), required=True) - udsServerAccessUrl = gui.TextField(length=32, label=_('UDS Server URL'), order=6, tooltip=_('URL used by OpenGnsys to access UDS. If empty, UDS will guess it.'), required=False, tab=gui.PARAMETERS_TAB) + host = gui.TextField( + length=64, label=_('Host'), order=1, tooltip=_('OpenGnsys Host'), required=True + ) + port = gui.NumericField( + length=5, + label=_('Port'), + defvalue='443', + order=2, + tooltip=_( + 'OpenGnsys Port (default is 443, and only ssl connection is allowed)' + ), + required=True, + ) + checkCert = gui.CheckBoxField( + label=_('Check Cert.'), + order=3, + tooltip=_( + 'If checked, ssl certificate of OpenGnsys server must be valid (not self signed)' + ), + ) + username = gui.TextField( + length=32, + label=_('Username'), + order=4, + tooltip=_('User with valid privileges on OpenGnsys'), + required=True, + ) + password = gui.PasswordField( + lenth=32, + label=_('Password'), + order=5, + tooltip=_('Password of the user of OpenGnsys'), + required=True, + ) + udsServerAccessUrl = gui.TextField( + length=32, + label=_('UDS Server URL'), + order=6, + tooltip=_('URL used by OpenGnsys to access UDS. If empty, UDS will guess it.'), + required=False, + tab=gui.PARAMETERS_TAB, + ) - maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently creating VMs'), required=True, tab=gui.ADVANCED_TAB) - maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='8', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) + maxPreparingServices = gui.NumericField( + length=3, + label=_('Creation concurrency'), + defvalue='10', + minValue=1, + maxValue=65536, + order=50, + tooltip=_('Maximum number of concurrently creating VMs'), + required=True, + tab=gui.ADVANCED_TAB, + ) + maxRemovingServices = gui.NumericField( + length=3, + label=_('Removal concurrency'), + defvalue='8', + minValue=1, + maxValue=65536, + order=51, + tooltip=_('Maximum number of concurrently removing VMs'), + required=True, + tab=gui.ADVANCED_TAB, + ) - timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=90, tooltip=_('Timeout in seconds of connection to OpenGnsys'), required=True, tab=gui.ADVANCED_TAB) + timeout = gui.NumericField( + length=3, + label=_('Timeout'), + defvalue='10', + order=90, + tooltip=_('Timeout in seconds of connection to OpenGnsys'), + required=True, + tab=gui.ADVANCED_TAB, + ) # Own variables _api: typing.Optional[og.OpenGnsysClient] = None @@ -137,7 +202,13 @@ class OGProvider(ServiceProvider): @property def api(self) -> og.OpenGnsysClient: if not self._api: - self._api = og.OpenGnsysClient(self.username.value, self.password.value, self.endpoint, self.cache, self.checkCert.isTrue()) + self._api = og.OpenGnsysClient( + self.username.value, + self.password.value, + self.endpoint, + self.cache, + self.checkCert.isTrue(), + ) logger.debug('Api: %s', self._api) return self._api @@ -155,7 +226,12 @@ class OGProvider(ServiceProvider): """ try: if self.api.version[0:5] < '1.1.0': - return [False, 'OpenGnsys version is not supported (required version 1.1.0 or newer and found {})'.format(self.api.version)] + return [ + False, + 'OpenGnsys version is not supported (required version 1.1.0 or newer and found {})'.format( + self.api.version + ), + ] except Exception as e: logger.exception('Error') return [False, '{}'.format(e)] @@ -184,16 +260,25 @@ class OGProvider(ServiceProvider): def getUDSServerAccessUrl(self) -> str: return self.udsServerAccessUrl.value - def reserve(self, ou: str, image: str, lab: int = 0, maxtime: int = 0) -> typing.Any: + def reserve( + self, ou: str, image: str, lab: int = 0, maxtime: int = 0 + ) -> typing.Any: return self.api.reserve(ou, image, lab, maxtime) def unreserve(self, machineId: str) -> typing.Any: return self.api.unreserve(machineId) - def notifyEvents(self, machineId: str, loginURL: str, logoutURL: str) -> typing.Any: - return self.api.notifyURLs(machineId, loginURL, logoutURL) + def powerOn(self, machineId: str, image: str) -> typing.Any: + return self.api.powerOn(machineId, image) - def notifyDeadline(self, machineId: str, deadLine: typing.Optional[int]) -> typing.Any: + def notifyEvents( + self, machineId: str, loginURL: str, logoutURL: str, releaseURL: str + ) -> typing.Any: + return self.api.notifyURLs(machineId, loginURL, logoutURL, releaseURL) + + def notifyDeadline( + self, machineId: str, deadLine: typing.Optional[int] + ) -> typing.Any: return self.api.notifyDeadline(machineId, deadLine) def status(self, machineId: str) -> typing.Any: diff --git a/server/src/uds/services/OpenGnsys/publication.py b/server/src/uds/services/OpenGnsys/publication.py index 4d156a9e..c38ea459 100644 --- a/server/src/uds/services/OpenGnsys/publication.py +++ b/server/src/uds/services/OpenGnsys/publication.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2017-2019 Virtual Cable S.L. +# Copyright (c) 2017-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -48,9 +47,12 @@ class OGPublication(Publication): """ This class provides the publication of a oVirtLinkedService """ + _name: str = '' - suggestedTime = 5 # : Suggested recheck time if publication is unfinished in seconds + suggestedTime = ( + 5 # : Suggested recheck time if publication is unfinished in seconds + ) def service(self) -> 'OGService': return typing.cast('OGService', super().service()) diff --git a/server/src/uds/services/OpenGnsys/service.py b/server/src/uds/services/OpenGnsys/service.py index 12b6528c..9de48b89 100644 --- a/server/src/uds/services/OpenGnsys/service.py +++ b/server/src/uds/services/OpenGnsys/service.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2017-2019 Virtual Cable S.L. +# Copyright (c) 2017-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -55,6 +54,7 @@ class OGService(Service): """ OpenGnsys Service """ + # : Name to show the administrator. This string will be translated BEFORE # : sending it to administration interface, so don't forget to # : mark it as _ (using ugettext_noop) @@ -102,20 +102,17 @@ class OGService(Service): label=_("OU"), order=100, fills={ - 'callbackName' : 'osFillData', - 'function' : helpers.getResources, - 'parameters' : ['ov', 'ev', 'ou'] - }, + 'callbackName': 'osFillData', + 'function': helpers.getResources, + 'parameters': ['ov', 'ev', 'ou'], + }, tooltip=_('Organizational Unit'), - required=True + required=True, ) # Lab is not required, but maybe used as filter lab = gui.ChoiceField( - label=_("lab"), - order=101, - tooltip=_('Laboratory'), - required=False + label=_("lab"), order=101, tooltip=_('Laboratory'), required=False ) # Required, this is the base image @@ -123,22 +120,33 @@ class OGService(Service): label=_("OS Image"), order=102, tooltip=_('OpenGnsys Operating System Image'), - required=True + required=True, ) maxReservationTime = gui.NumericField( length=3, label=_("Max. reservation time"), order=110, - tooltip=_('Security parameter for OpenGnsys to keep reservations at most this hours. Handle with care!'), + tooltip=_( + 'Security parameter for OpenGnsys to keep reservations at most this hours. Handle with care!' + ), defvalue='2400', # 1 hundred days minValue='24', tab=_('Advanced'), - required=False + required=False, + ) + + startIfUnavailable = gui.CheckBoxField( + label=_('Start if unavailable'), + defvalue=gui.TRUE, + order=111, + tooltip=_('If active, machines that are not available on user connect (on some OS) will try to power on through OpenGnsys.'), ) ov = gui.HiddenField(value=None) - ev = gui.HiddenField(value=None) # We need to keep the env so we can instantiate the Provider + ev = gui.HiddenField( + value=None + ) # We need to keep the env so we can instantiate the Provider def initGui(self) -> None: """ @@ -157,27 +165,49 @@ class OGService(Service): return self.parent().status(machineId) def reserve(self) -> typing.Any: - return self.parent().reserve(self.ou.value, self.image.value, self.lab.value, self.maxReservationTime.num()) + return self.parent().reserve( + self.ou.value, + self.image.value, + self.lab.value, + self.maxReservationTime.num(), + ) def unreserve(self, machineId: str) -> typing.Any: return self.parent().unreserve(machineId) - def notifyEvents(self, machineId: str, serviceUUID: str) -> typing.Any: - return self.parent().notifyEvents(machineId, self.getLoginNotifyURL(serviceUUID), self.getLogoutNotifyURL(serviceUUID)) + def notifyEvents(self, machineId: str, token: str, uuid: str) -> typing.Any: + return self.parent().notifyEvents( + machineId, + self.getLoginNotifyURL(uuid, token), + self.getLogoutNotifyURL(uuid, token), + self.getReleaseURL(uuid, token) + ) - def notifyDeadline(self, machineId: str, deadLine: typing.Optional[int]) -> typing.Any: + def notifyDeadline( + self, machineId: str, deadLine: typing.Optional[int] + ) -> typing.Any: return self.parent().notifyDeadline(machineId, deadLine) - def _notifyURL(self, uuid: str, message: str) -> str: + def powerOn(self, machineId: str) -> typing.Any: + return self.parent().powerOn(machineId, self.image.value) + + def _notifyURL(self, uuid: str, token:str, message: str) -> str: # The URL is "GET messages URL". - return '{accessURL}rest/actor/PostThoughGet/{uuid}/{message}'.format( + return '{accessURL}uds/ognotify/{message}/{token}/{uuid}'.format( accessURL=self.parent().getUDSServerAccessUrl(), uuid=uuid, + token=token, message=message ) - def getLoginNotifyURL(self, serviceUUID: str) -> str: - return self._notifyURL(serviceUUID, 'login') + def getLoginNotifyURL(self, uuid: str, token: str) -> str: + return self._notifyURL(uuid, token, 'login') - def getLogoutNotifyURL(self, serviceUUID: str) -> str: - return self._notifyURL(serviceUUID, 'logout') + def getLogoutNotifyURL(self, uuid: str, token: str) -> str: + return self._notifyURL(uuid, token, 'logout') + + def getReleaseURL(self, uuid: str, token: str) -> str: + return self._notifyURL(uuid, token, 'release') + + def isRemovableIfUnavailable(self): + return self.startIfUnavailable.isTrue() diff --git a/server/src/uds/static/admin/3rdpartylicenses.txt b/server/src/uds/static/admin/3rdpartylicenses.txt index ee351209..3ee7c1c8 100644 --- a/server/src/uds/static/admin/3rdpartylicenses.txt +++ b/server/src/uds/static/admin/3rdpartylicenses.txt @@ -30,7 +30,7 @@ MIT MIT The MIT License -Copyright (c) 2020 Google LLC. +Copyright (c) 2021 Google LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -64,7 +64,7 @@ MIT MIT The MIT License -Copyright (c) 2020 Google LLC. +Copyright (c) 2021 Google LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/server/src/uds/static/admin/main.js b/server/src/uds/static/admin/main.js index 9747cce0..c66edd8b 100644 --- a/server/src/uds/static/admin/main.js +++ b/server/src/uds/static/admin/main.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},"1gqn":function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},KKCa:function(t,e){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},MCLT:function(t,e,n){var i=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],n=0;n=a)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}})),u=r[n];n=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),f(n)?i.showHidden=n:n&&e._extend(i,n),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=s),l(i,t,i.depth)}function s(t,e){var n=o.styles[e];return n?"\x1b["+o.colors[n][0]+"m"+t+"\x1b["+o.colors[n][1]+"m":t}function u(t,e){return t}function l(t,n,i){if(t.customInspect&&n&&w(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var r=n.inspect(i,t);return v(r)||(r=l(t,r,i)),r}var a=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(v(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return m(e)?t.stylize(""+e,"number"):f(e)?t.stylize(""+e,"boolean"):p(e)?t.stylize("null","null"):void 0}(t,n);if(a)return a;var o=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),k(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(n);if(0===o.length){if(w(n))return t.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(y(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(b(n))return t.stylize(Date.prototype.toString.call(n),"date");if(k(n))return c(n)}var u,_="",C=!1,x=["{","}"];return d(n)&&(C=!0,x=["[","]"]),w(n)&&(_=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(_=" "+RegExp.prototype.toString.call(n)),b(n)&&(_=" "+Date.prototype.toUTCString.call(n)),k(n)&&(_=" "+c(n)),0!==o.length||C&&0!=n.length?i<0?y(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=C?function(t,e,n,i,r){for(var a=[],o=0,s=e.length;o60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(u,_,x)):x[0]+_+x[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,i,r,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]}).get?s=t.stylize(u.set?"[Getter/Setter]":"[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),E(i,r)||(o="["+r+"]"),s||(t.seen.indexOf(u.value)<0?(s=p(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),g(o)){if(a&&r.match(/^\d+$/))return s;(o=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t){return Array.isArray(t)}function f(t){return"boolean"==typeof t}function p(t){return null===t}function m(t){return"number"==typeof t}function v(t){return"string"==typeof t}function g(t){return void 0===t}function y(t){return _(t)&&"[object RegExp]"===C(t)}function _(t){return"object"==typeof t&&null!==t}function b(t){return _(t)&&"[object Date]"===C(t)}function k(t){return _(t)&&("[object Error]"===C(t)||t instanceof Error)}function w(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(g(r)&&(r=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(r)){var n=process.pid;a[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,i)}}else a[t]=function(){};return a[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=f,e.isNull=p,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=y,e.isObject=_,e.isDate=b,e.isError=k,e.isFunction=w,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n("1gqn");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",D(),e.format.apply(e,arguments))},e.inherits=n("KKCa"),e._extend=function(t,e){if(!e||!_(e))return t;for(var n=Object.keys(e),i=n.length;i--;)t[n[i]]=e[n[i]];return t}},crnd:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="crnd"},dunZ:function(t,e,n){var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:this;function r(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){s(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function a(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(n){}return e.status>=200&&e.status<=299}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var s=i.URL||i.webkitURL,u=document.createElement("a");u.download=e=e||t.name||"download",u.rel="noopener","string"==typeof t?(u.href=t,u.origin!==location.origin?a(u.href)?r(t,e,n):o(u,u.target="_blank"):o(u)):(u.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){o(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(a(t))r(t,e,n);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout((function(){o(i)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var o="application/octet-stream"===t.type,s=/constructor/i.test(i.HTMLElement)||i.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&s)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},l.readAsDataURL(t)}else{var c=i.URL||i.webkitURL,h=c.createObjectURL(t);a?a.location=h:location.href=h,a=null,setTimeout((function(){c.revokeObjectURL(h)}),4e4)}});i.saveAs=s.saveAs=s,t.exports=s},zUnb:function(t,e,n){"use strict";function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(n):a.value}})(t,e,n||t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?a(t):e}function g(t){var e=p();return function(){var n,r=i(t);if(e){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return v(this,n)}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(i){return i.pipe(ot((function(n,i){return nt(t(n,i)).pipe(Y((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new st(t,n))})}var st=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;y(this,t),this.project=e,this.concurrent=n}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new ut(t,this.project,this.concurrent))}}]),t}(),ut=function(t){f(n,t);var e=g(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return y(this,n),(r=e.call(this,t)).project=i,r.concurrent=a,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return b(n,[{key:"_next",value:function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(rt);function lt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return ot(L,t)}function ct(t,e){return e?et(t,e):new V(Z(t))}function ht(){for(var t=Number.POSITIVE_INFINITY,e=null,n=arguments.length,i=new Array(n),r=0;r1&&"number"==typeof i[i.length-1]&&(t=i.pop())):"number"==typeof a&&(t=i.pop()),null===e&&1===i.length&&i[0]instanceof V?i[0]:lt(t)(ct(i,e))}function dt(){return function(t){return t.lift(new ft(t))}}var ft=function(){function t(e){y(this,t),this.connectable=e}return b(t,[{key:"call",value:function(t,e){var n=this.connectable;n._refCount++;var i=new pt(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),t}(),pt=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).connectable=i,r}return b(n,[{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(P),mt=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this)).source=t,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return b(n,[{key:"_subscribe",value:function(t){return this.getSubject().subscribe(t)}},{key:"getSubject",value:function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new D).add(this.source.subscribe(new gt(this.getSubject(),this))),t.closed&&(this._connection=null,t=D.EMPTY)),t}},{key:"refCount",value:function(){return dt()(this)}}]),n}(V),vt=function(){var t=mt.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),gt=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).connectable=i,r}return b(n,[{key:"_error",value:function(t){this._unsubscribe(),r(i(n.prototype),"_error",this).call(this,t)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),r(i(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}]),n}(H);function yt(){return new U}function _t(t){return{toString:t}.toString()}var bt="__parameters__";function kt(t,e,n){return _t((function(){var i=function(t){return function(){if(t){var e=t.apply(void 0,arguments);for(var n in e)this[n]=e[n]}}}(e);function r(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:Dt.Default;if(void 0===ce)throw new Error("inject() must be called from an injection context");return null===ce?ve(t,void 0,e):ce.get(t,e&Dt.Optional?null:void 0,e)}function pe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dt.Default;return(ie||fe)(Ut(t),e)}var me=pe;function ve(t,e,n){var i=Tt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&Dt.Optional)return null;if(void 0!==e)return e;throw new Error("Injector: NOT_FOUND [".concat(Bt(t),"]"))}function ge(t){for(var e=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:oe;if(e===oe){var n=new Error("NullInjectorError: No provider for ".concat(Bt(t),"!"));throw n.name="NullInjectorError",n}return e}}]),t}();function _e(t,e,n,i){var r=t.ngTempTokenPath;throw e[ue]&&r.unshift(e[ue]),t.message=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;var r=Bt(e);if(Array.isArray(e))r=e.map(Bt).join(" -> ");else if("object"==typeof e){var a=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];a.push(o+":"+("string"==typeof s?JSON.stringify(s):Bt(s)))}r="{".concat(a.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(t.replace(se,"\n "))}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}var be=function t(){y(this,t)},ke=function t(){y(this,t)};function we(t,e){void 0===e&&(e=t);for(var n=0;n=t.length?t.push(n):t.splice(e,0,n)}function Se(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function De(t,e){for(var n=[],i=0;i=0?t[1|i]=n:function(t,e,n,i){var r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i=~i,e,n),i}function Ae(t,e){var n=Ie(t,e);if(n>=0)return t[1|n]}function Ie(t,e){return function(t,e,n){for(var i=0,r=t.length>>1;r!==i;){var a=i+(r-i>>1),o=t[a<<1];if(e===o)return a<<1;o>e?r=a:i=a+1}return~(r<<1)}(t,e)}var Oe=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),Te=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),Re={},Pe=[],Me=0;function Fe(t){return _t((function(){var e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Oe.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Pe,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Te.Emulated,id:"c",styles:t.styles||Pe,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,a=t.pipes;return n.id+=Me++,n.inputs=je(t.inputs,e),n.outputs=je(t.outputs),r&&r.forEach((function(t){return t(n)})),n.directiveDefs=i?function(){return("function"==typeof i?i():i).map(Le)}:null,n.pipeDefs=a?function(){return("function"==typeof a?a():a).map(Ne)}:null,n}))}function Le(t){return Ue(t)||function(t){return t[Xt]||null}(t)}function Ne(t){return function(t){return t[Qt]||null}(t)}var Ve={};function Be(t){var e={type:t.type,bootstrap:t.bootstrap||Pe,declarations:t.declarations||Pe,imports:t.imports||Pe,exports:t.exports||Pe,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&_t((function(){Ve[t.id]=t.type})),e}function je(t,e){if(null==t)return Re;var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],a=r;Array.isArray(r)&&(a=r[1],r=r[0]),n[r]=i,e&&(e[r]=a)}return n}var ze=Fe;function He(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Ue(t){return t[$t]||null}function We(t,e){return t.hasOwnProperty(ee)?t[ee]:null}function qe(t,e){var n=t[Jt]||null;if(!n&&!0===e)throw new Error("Type ".concat(Bt(t)," does not have '\u0275mod' property."));return n}var Ye=20,Ge=10;function Ke(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ze(t){return Array.isArray(t)&&!0===t[1]}function $e(t){return 0!=(8&t.flags)}function Xe(t){return 2==(2&t.flags)}function Qe(t){return 1==(1&t.flags)}function Je(t){return null!==t.template}function tn(t){return 0!=(512&t[2])}var en=function(){function t(e,n,i){y(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i}return b(t,[{key:"isFirstChange",value:function(){return this.firstChange}}]),t}();function nn(){return rn}function rn(t){return t.type.prototype.ngOnChanges&&(t.setInput=on),an}function an(){var t=sn(this),e=null==t?void 0:t.current;if(e){var n=t.previous;if(n===Re)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}}function on(t,e,n,i){var r=sn(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:Re,current:null}),a=r.current||(r.current={}),o=r.previous,s=this.declaredInputs[n],u=o[s];a[s]=new en(u&&u.currentValue,e,o===Re),t[i]=e}function sn(t){return t.__ngSimpleChanges__||null}nn.ngInherit=!0;var un="http://www.w3.org/2000/svg",ln=void 0;function cn(){return void 0!==ln?ln:"undefined"!=typeof document?document:void 0}function hn(t){return!!t.listen}var dn={createRenderer:function(t,e){return cn()}};function fn(t){for(;Array.isArray(t);)t=t[0];return t}function pn(t,e){return fn(e[t+Ye])}function mn(t,e){return fn(e[t.index])}function vn(t,e){return t.data[e+Ye]}function gn(t,e){return t[e+Ye]}function yn(t,e){var n=e[t];return Ke(n)?n:n[0]}function _n(t){var e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function bn(t){return 4==(4&t[2])}function kn(t){return 128==(128&t[2])}function wn(t,e){return null===t||null==e?null:t[e]}function Cn(t){t[18]=0}function xn(t,e){t[5]+=e;for(var n=t,i=t[3];null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}var Sn={lFrame:Kn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function Dn(){return Sn.bindingsEnabled}function En(){return Sn.lFrame.lView}function An(){return Sn.lFrame.tView}function In(t){Sn.lFrame.contextLView=t}function On(){return Sn.lFrame.currentTNode}function Tn(t,e){Sn.lFrame.currentTNode=t,Sn.lFrame.isParent=e}function Rn(){return Sn.lFrame.isParent}function Pn(){Sn.lFrame.isParent=!1}function Mn(){return Sn.checkNoChangesMode}function Fn(t){Sn.checkNoChangesMode=t}function Ln(){var t=Sn.lFrame,e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Nn(){return Sn.lFrame.bindingIndex}function Vn(){return Sn.lFrame.bindingIndex++}function Bn(t){var e=Sn.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function jn(t,e){var n=Sn.lFrame;n.bindingIndex=n.bindingRootIndex=t,zn(e)}function zn(t){Sn.lFrame.currentDirectiveIndex=t}function Hn(t){var e=Sn.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Un(){return Sn.lFrame.currentQueryIndex}function Wn(t){Sn.lFrame.currentQueryIndex=t}function qn(t,e){var n=Gn();Sn.lFrame=n,n.currentTNode=e,n.lView=t}function Yn(t){var e=Gn(),n=t[1];Sn.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex}function Gn(){var t=Sn.lFrame,e=null===t?null:t.child;return null===e?Kn(t):e}function Kn(t){var e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function Zn(){var t=Sn.lFrame;return Sn.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var $n=Zn;function Xn(){var t=Zn();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Qn(t){return(Sn.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Sn.lFrame.contextLView))[8]}function Jn(){return Sn.lFrame.selectedIndex}function ti(t){Sn.lFrame.selectedIndex=t}function ei(){var t=Sn.lFrame;return vn(t.tView,t.selectedIndex)}function ni(){Sn.lFrame.currentNamespace=un}function ii(){Sn.lFrame.currentNamespace=null}function ri(t,e){for(var n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[o]<0&&(t[18]+=65536),(a>11>16&&(3&t[2])===e&&(t[2]+=2048,a.call(o)):a.call(o)}var ci=-1,hi=function t(e,n,i){y(this,t),this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function di(t,e,n){for(var i=hn(t),r=0;re){o=a-1;break}}}for(;a>16,i=e;n>0;)i=i[15],n--;return i}function bi(t){return"string"==typeof t?t:null==t?"":""+t}function ki(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():bi(t)}var wi=function(){return("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Zt)}();function Ci(t){return{name:"body",target:t.ownerDocument.body}}function xi(t){return t instanceof Function?t():t}var Si=!0;function Di(t){var e=Si;return Si=t,e}var Ei=0;function Ai(t,e){var n=Oi(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,Ii(i.data,t),Ii(e,null),Ii(i.blueprint,null));var r=Ti(t,e),a=t.injectorIndex;if(gi(r))for(var o=yi(r),s=_i(r,e),u=s[1].data,l=0;l<8;l++)e[a+l]=s[o+l]|u[o+l];return e[a+8]=r,a}function Ii(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Oi(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Ti(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=0,i=null,r=e;null!==r;){var a=r[1],o=a.type;if(null===(i=2===o?a.declTNode:1===o?r[6]:null))return ci;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return ci}function Ri(t,e,n){!function(t,e,n){var i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(ne)&&(i=n[ne]),null==i&&(i=n[ne]=Ei++);var r=255&i,a=1<3&&void 0!==arguments[3]?arguments[3]:Dt.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==t){var a=Vi(n);if("function"==typeof a){qn(e,t);try{var o=a();if(null!=o||i&Dt.Optional)return o;throw new Error("No provider for ".concat(ki(n),"!"))}finally{$n()}}else if("number"==typeof a){if(-1===a)return new zi(t,e);var s=null,u=Oi(t,e),l=ci,c=i&Dt.Host?e[16][6]:null;for((-1===u||i&Dt.SkipSelf)&&((l=-1===u?Ti(t,e):e[u+8])!==ci&&ji(i,!1)?(s=e[1],u=yi(l),e=_i(l,e)):u=-1);-1!==u;){var h=e[1];if(Bi(a,u,h.data)){var d=Fi(u,e,n,s,i,c);if(d!==Mi)return d}(l=e[u+8])!==ci&&ji(i,e[1].data[u+8]===c)&&Bi(a,u,e)?(s=h,u=yi(l),e=_i(l,e)):u=-1}}}if(i&Dt.Optional&&void 0===r&&(r=null),0==(i&(Dt.Self|Dt.Host))){var f=e[9],p=de(void 0);try{return f?f.get(n,r,i&Dt.Optional):ve(n,r,i&Dt.Optional)}finally{de(p)}}if(i&Dt.Optional)return r;throw new Error("NodeInjector: NOT_FOUND [".concat(ki(n),"]"))}var Mi={};function Fi(t,e,n,i,r,a){var o=e[1],s=o.data[t+8],u=Li(s,o,n,null==i?Xe(s)&&Si:i!=o&&2===s.type,r&Dt.Host&&a===s);return null!==u?Ni(e,o,u,s):Mi}function Li(t,e,n,i,r){for(var a=t.providerIndexes,o=e.data,s=1048575&a,u=t.directiveStart,l=a>>20,c=r?s+l:t.directiveEnd,h=i?s:s+l;h=u&&d.type===n)return h}if(r){var f=o[u];if(f&&Je(f)&&f.type===n)return u}return null}function Ni(t,e,n,i){var r=t[n],a=e.data;if(r instanceof hi){var o=r;if(o.resolving)throw new Error("Circular dep for ".concat(ki(a[n])));var s=Di(o.canSeeViewProviders);o.resolving=!0;var u=o.injectImpl?de(o.injectImpl):null;qn(t,i);try{r=t[n]=o.factory(void 0,a,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){var i=e.type.prototype,r=i.ngOnInit,a=i.ngDoCheck;if(i.ngOnChanges){var o=rn(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,a))}(n,a[n],e)}finally{null!==u&&de(u),Di(s),o.resolving=!1,$n()}}return r}function Vi(t){if("string"==typeof t)return t.charCodeAt(0)||0;var e=t.hasOwnProperty(ne)?t[ne]:void 0;return"number"==typeof e&&e>0?255&e:e}function Bi(t,e,n){var i=64&t,r=32&t;return!!((128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e])&1<1?e-1:0),i=1;i"),!0}},{key:"endElement",value:function(t){var e=t.nodeName.toLowerCase();yr.hasOwnProperty(e)&&!pr.hasOwnProperty(e)&&(this.buf.push(""))}},{key:"chars",value:function(t){this.buf.push(Dr(t))}},{key:"checkClobberedElement",value:function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(t.outerHTML));return e}}]),t}(),xr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Sr=/([^\#-~ |!])/g;function Dr(t){return t.replace(/&/g,"&").replace(xr,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(Sr,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(//g,">")}function Er(t,e){var n=null;try{fr=fr||function(t){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(t){return!1}}()?new or:new sr(t)}(t);var i=e?String(e):"";n=fr.getInertBodyElement(i);var r=5,a=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=a,a=n.innerHTML,n=fr.getInertBodyElement(i)}while(i!==a);var o=new Cr,s=o.sanitizeChildren(Ar(n)||n);return ar()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var u=Ar(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}function Ar(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Ir=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Or(t){var e=Rr();return e?e.sanitize(Ir.HTML,t)||"":er(t,"HTML")?tr(t):Er(cn(),bi(t))}function Tr(t){var e=Rr();return e?e.sanitize(Ir.URL,t)||"":er(t,"URL")?tr(t):cr(bi(t))}function Rr(){var t=En();return t&&t[12]}function Pr(t,e){t.__ngContext__=e}function Mr(t,e,n){for(var i=t.length;;){var r=t.indexOf(e,n);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){var a=e.length;if(r+a===i||t.charCodeAt(r+a)<=32)return r}n=r+1}}var Fr="ng-template";function Lr(t,e,n){for(var i=0;ia?"":r[c+1].toLowerCase();var d=8&i?h:null;if(d&&-1!==Mr(d,l,0)||2&i&&l!==h){if(jr(i))return!1;o=!0}}}}else{if(!o&&!jr(i)&&!jr(u))return!1;if(o&&jr(u))continue;o=!1,i=u|1&i}}return jr(i)||o}function jr(t){return 0==(1&t)}function zr(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var a=!1;r-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],i=0;i0?'="'+s+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||jr(o)||(e+=Wr(a,r),r=""),i=o,a=a||!jr(i);n++}return""!==r&&(e+=Wr(a,r)),e}var Yr={};function Gr(t){var e=t[3];return Ze(e)?e[3]:e}function Kr(t){return $r(t[13])}function Zr(t){return $r(t[4])}function $r(t){for(;null!==t&&!Ze(t);)t=t[4];return t}function Xr(t){Qr(An(),En(),Jn()+t,Mn())}function Qr(t,e,n,i){if(!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&ai(e,r,n)}else{var a=t.preOrderHooks;null!==a&&oi(e,a,0,n)}ti(n)}function Jr(t,e){return t<<17|e<<2}function ta(t){return t>>17&32767}function ea(t){return 2|t}function na(t){return(131068&t)>>2}function ia(t,e){return-131069&t|e<<2}function ra(t){return 1|t}function aa(t,e){var n=t.contentQueries;if(null!==n)for(var i=0;iYe&&Qr(t,e,0,Mn()),n(i,r)}finally{ti(a)}}function fa(t,e,n){if($e(e))for(var i=e.directiveEnd,r=e.directiveStart;r2&&void 0!==arguments[2]?arguments[2]:mn,i=e.localNames;if(null!==i)for(var r=e.index+1,a=0;a0&&Fa(n)}}function Fa(t){for(var e=Kr(t);null!==e;e=Zr(e))for(var n=Ge;n0&&Fa(i)}var a=t[1].components;if(null!==a)for(var o=0;o0&&Fa(s)}}function La(t,e){var n=yn(e,t),i=n[1];!function(t,e){for(var n=e.length;n0&&(t[i-1][4]=r[4]);var o=Se(t,Ge+e);co(r[1],n=r,n[11],2,null,null),n[0]=null,n[6]=null;var s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}}function Qa(t,e){if(!(256&e[2])){var n=e[11];hn(n)&&n.destroyNode&&co(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return Ja(t[1],t);for(;e;){var n=null;if(Ke(e))n=e[13];else{var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)Ke(e)&&Ja(e[1],e),e=e[3];null===e&&(e=t),Ke(e)&&Ja(e[1],e),n=e&&e[4]}e=n}}(e)}}function Ja(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){var n;if(null!=t&&null!=(n=t.destroyHooks))for(var i=0;i=0?i[s]():i[-s].unsubscribe(),r+=2}else n[r].call(i[n[r+1]]);e[7]=null}}(t,e),1===e[1].type&&hn(e[11])&&e[11].destroy();var n=e[17];if(null!==n&&Ze(e[3])){n!==e[3]&&$a(n,e);var i=e[19];null!==i&&i.detachView(t)}}}function to(t,e,n){for(var i=e.parent;null!=i&&(3===i.type||4===i.type);)i=(e=i).parent;if(null===i)return n[0];if(e&&4===e.type&&4&e.flags)return mn(e,n).parentNode;if(2&i.flags){var r=t.data,a=r[r[i.index].directiveStart].encapsulation;if(a!==Te.ShadowDom&&a!==Te.Native)return null}return mn(i,n)}function eo(t,e,n,i){hn(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function no(t,e,n){hn(t)?t.appendChild(e,n):e.appendChild(n)}function io(t,e,n,i){null!==i?eo(t,e,n,i):no(t,e,n)}function ro(t,e){return hn(t)?t.parentNode(e):e.parentNode}function ao(t,e){return 3===t.type||4===t.type?mn(t,e):null}function oo(t,e,n,i){var r=to(t,i,e);if(null!=r){var a=e[11],o=ao(i.parent||e[6],e);if(Array.isArray(n))for(var s=0;s-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}Qa(this._lView[1],this._lView)}},{key:"onDestroy",value:function(t){ya(this._lView[1],this._lView,null,t)}},{key:"markForCheck",value:function(){Va(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){Ba(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(t,e,n){Fn(!0);try{Ba(t,e,n)}finally{Fn(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}},{key:"detachFromAppRef",value:function(){var t;this._appRef=null,co(this._lView[1],t=this._lView,t[11],2,null,null)}},{key:"attachToAppRef",value:function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}},{key:"rootNodes",get:function(){var t=this._lView,e=t[1];return ko(e,t,e.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),t}(),bo=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this,t))._view=t,i}return b(n,[{key:"detectChanges",value:function(){ja(this._view)}},{key:"checkNoChanges",value:function(){!function(t){Fn(!0);try{ja(t)}finally{Fn(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(_o);function ko(t,e,n,i){for(var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null!==n;){var a=e[n.index];if(null!==a&&i.push(fn(a)),Ze(a))for(var o=Ge;o0;)this.remove(this.length-1)}},{key:"get",value:function(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}},{key:"createEmbeddedView",value:function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i}},{key:"createComponent",value:function(t,e,n,i,r){var a=n||this.parentInjector;if(!r&&null==t.ngModule&&a){var o=a.get(be,null);o&&(r=o)}var s=t.create(a,i,void 0,r);return this.insert(s.hostView,e),s}},{key:"insert",value:function(t,e){var n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ze(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var a=n[3],o=new yo(a,a[6],a[3]);o.detach(o.indexOf(t))}}var s=this._adjustIndex(e),u=this._lContainer;!function(t,e,n,i){var r=Ge+i,a=n.length;i>0&&(n[r-1][4]=e),i1&&void 0!==arguments[1]?arguments[1]:0;return null==t?this.length+e:t}},{key:"allocateContainerIfNeeded",value:function(){null===this._lContainer[8]&&(this._lContainer[8]=[])}},{key:"element",get:function(){return wo(e,this._hostTNode,this._hostView)}},{key:"injector",get:function(){return new zi(this._hostTNode,this._hostView)}},{key:"parentInjector",get:function(){var t=Ti(this._hostTNode,this._hostView);if(gi(t)){var e=_i(t,this._hostView),n=yi(t);return new zi(e[1].data[n+8],e)}return new zi(null,this._hostView)}},{key:"length",get:function(){return this._lContainer.length-Ge}}]),i}(t));var a=i[n.index];if(Ze(a))r=a;else{var o;if(3===n.type)o=fn(a);else if(o=i[11].createComment(""),tn(i)){var s=i[11],u=mn(n,i);eo(s,ro(s,u),o,function(t,e){return hn(t)?t.nextSibling(e):e.nextSibling}(s,u))}else oo(i[1],i,o,n);i[n.index]=r=Pa(a,i,o,n),Na(i,r)}return new yo(r,n,i)}function So(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Do(On(),En(),t)}function Do(t,e,n){if(!n&&Xe(t)){var i=yn(t.index,e);return new _o(i,i)}return 2===t.type||0===t.type||3===t.type||4===t.type?new _o(e[16],e):null}var Eo=function(){var t=function t(){y(this,t)};return t.__NG_ELEMENT_ID__=function(){return Ao()},t}(),Ao=So,Io=Function,Oo=new re("Set Injector scope."),To={},Ro={},Po=[],Mo=void 0;function Fo(){return void 0===Mo&&(Mo=new ye),Mo}function Lo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new No(t,n,e||Fo(),i)}var No=function(){function t(e,n,i){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;y(this,t),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var o=[];n&&Ce(n,(function(t){return r.processProvider(t,e,n)})),Ce([e],(function(t){return r.processInjectorType(t,[],o)})),this.records.set(ae,jo(void 0,this));var s=this.records.get(Oo);this.scope=null!=s?s.value:null,this.source=a||("object"==typeof e?null:Bt(e))}return b(t,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach((function(t){return t.ngOnDestroy()}))}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dt.Default;this.assertNotDestroyed();var i=he(this);try{if(!(n&Dt.SkipSelf)){var r=this.records.get(t);if(void 0===r){var a=Uo(t)&&Tt(t);r=a&&this.injectableDefInScope(a)?jo(Vo(t),To):null,this.records.set(t,r)}if(null!=r)return this.hydrate(t,r)}var o=n&Dt.Self?Fo():this.parent;return o.get(t,e=n&Dt.Optional&&e===oe?null:e)}catch(u){if("NullInjectorError"===u.name){var s=u.ngTempTokenPath=u.ngTempTokenPath||[];if(s.unshift(Bt(t)),i)throw u;return _e(u,t,"R3InjectorError",this.source)}throw u}finally{he(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var t=this;this.injectorDefTypes.forEach((function(e){return t.get(e)}))}},{key:"toString",value:function(){var t=[];return this.records.forEach((function(e,n){return t.push(Bt(n))})),"R3Injector[".concat(t.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(t,e,n){var i=this;if(!(t=Ut(t)))return!1;var r=Pt(t),a=null==r&&t.ngModule||void 0,o=void 0===a?t:a,s=-1!==n.indexOf(o);if(void 0!==a&&(r=Pt(a)),null==r)return!1;if(null!=r.imports&&!s){var u;n.push(o);try{Ce(r.imports,(function(t){i.processInjectorType(t,e,n)&&(void 0===u&&(u=[]),u.push(t))}))}finally{}if(void 0!==u)for(var l=function(t){var e=u[t],n=e.ngModule,r=e.providers;Ce(r,(function(t){return i.processProvider(t,n,r||Po)}))},c=0;c0){var n=De(e,"?");throw new Error("Can't resolve all parameters for ".concat(Bt(t),": (").concat(n.join(", "),")."))}var i=function(t){var e=t&&(t[Mt]||t[Nt]||t[Lt]&&t[Lt]());if(e){var n=function(t){if(t.hasOwnProperty("name"))return t.name;var e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" 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(n,'" class.')),e}return null}(t);return null!==i?function(){return i.factory(t)}:function(){return new t}}(t);throw new Error("unreachable")}function Bo(t,e,n){var i,r=void 0;if(Ho(t)){var a=Ut(t);return We(a)||Vo(a)}if(zo(t))r=function(){return Ut(t.useValue)};else if((i=t)&&i.useFactory)r=function(){return t.useFactory.apply(t,l(ge(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))r=function(){return pe(Ut(t.useExisting))};else{var o=Ut(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return We(o)||Vo(o);r=function(){return k(o,l(ge(t.deps)))}}return r}function jo(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:t,value:e,multi:n?[]:void 0}}function zo(t){return null!==t&&"object"==typeof t&&le in t}function Ho(t){return"function"==typeof t}function Uo(t){return"function"==typeof t||"object"==typeof t&&t instanceof re}var Wo=function(t,e,n){return function(t){var e=Lo(t,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 e._resolveInjectorDefTypes(),e}({name:n},e,t,n)},qo=function(){var t=function(){function t(){y(this,t)}return b(t,null,[{key:"create",value:function(t,e){return Array.isArray(t)?Wo(t,e,""):Wo(t.providers,t.parent,t.name||"")}}]),t}();return t.THROW_IF_NOT_FOUND=oe,t.NULL=new ye,t.\u0275prov=It({token:t,providedIn:"any",factory:function(){return pe(ae)}}),t.__NG_ELEMENT_ID__=-1,t}(),Yo=new re("AnalyzeForEntryComponents");function Go(t,e,n){var i=n?t.styles:null,r=n?t.classes:null,a=0;if(null!==e)for(var o=0;o=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=mi(r.hostAttrs,n=mi(n,r.hostAttrs))}}(i)}function $o(t){return t===Re?{}:t===Pe?[]:t}function Xo(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function Qo(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function Jo(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e}var ts=null;function es(){if(!ts){var t=Zt.Symbol;if(t&&t.iterator)ts=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:Dt.Default,n=En();if(null===n)return pe(t,e);var i=On();return Pi(i,n,Ut(t),e)}function fs(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;var n=t.attrs;if(n)for(var i=n.length,r=0;r2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=En(),a=An(),o=On();return As(a,r,r[11],o,t,e,n,i),Ss}function Ds(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=On(),a=En(),o=An(),s=Hn(o.data),u=Wa(s,r,a);return As(o,a,u,r,t,e,n,i),Ds}function Es(t,e,n,i){var r=t.cleanup;if(null!=r)for(var a=0;au?s[u]:null}"string"==typeof o&&(a+=2)}return null}function As(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,u=Qe(i),l=t.firstCreatePass,c=l&&(t.cleanup||(t.cleanup=[])),h=Ua(e),d=!0;if(2===i.type){var f=mn(i,e),p=s?s(f):Re,m=p.target||f,v=h.length,g=s?function(t){return s(fn(t[i.index])).target}:i.index;if(hn(n)){var y=null;if(!s&&u&&(y=Es(t,e,r,i.index)),null!==y){var _=y.__ngLastListenerFn__||y;_.__ngNextListenerFn__=a,y.__ngLastListenerFn__=a,d=!1}else{a=Os(i,e,a,!1);var b=n.listen(p.name||m,r,a);h.push(a,b),c&&c.push(r,g,v,v+1)}}else a=Os(i,e,a,!0),m.addEventListener(r,a,o),h.push(a),c&&c.push(r,g,v,o)}var k,w=i.outputs;if(d&&null!==w&&(k=w[r])){var C=k.length;if(C)for(var x=0;x0&&void 0!==arguments[0]?arguments[0]:1;return Qn(t)}function Rs(t,e){for(var n=null,i=function(t){var e=t.attrs;if(null!=e){var n=e.indexOf(5);if(0==(1&n))return e[n+1]}return null}(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=En(),r=An(),a=ua(r,t,1,null,n||null);null===a.projection&&(a.projection=e),Pn(),ho(r,i,a)}function Fs(t,e,n){return Ls(t,"",e,"",n),Fs}function Ls(t,e,n,i,r){var a=En(),o=ls(a,e,n,i);return o!==Yr&&ba(An(),ei(),a,t,o,a[11],r,!1),Ls}var Ns=[];function Vs(t,e,n,i,r){for(var a=t[n+1],o=null===e,s=i?ta(a):na(a),u=!1;0!==s&&(!1===u||o);){var l=t[s+1];Bs(t[s],e)&&(u=!0,t[s+1]=i?ra(l):ea(l)),s=i?ta(l):na(l)}u&&(t[n+1]=i?ea(a):ra(a))}function Bs(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Ie(t,e)>=0}var js={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function zs(t){return t.substring(js.key,js.keyEnd)}function Hs(t,e){var n=js.textEnd;return n===e?-1:(e=js.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,js.key=e,n),Us(t,e,n))}function Us(t,e,n){for(;e=0;n=Hs(e,n))Ee(t,zs(e),!0)}function Gs(t,e,n,i){var r=En(),a=An(),o=Bn(2);a.firstUpdatePass&&Zs(a,t,o,i),e!==Yr&&os(r,o,e)&&Qs(a,a.data[Jn()+Ye],r,r[11],t,r[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=Bt(tr(t)))),t}(e,n),i,o)}function Ks(t,e){return e>=t.expandoStartIndex}function Zs(t,e,n,i){var r=t.data;if(null===r[n+1]){var a=r[Jn()+Ye],o=Ks(t,n);eu(a,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){var r=Hn(t),a=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=Xs(n=$s(null,t,e,n,i),e.attrs,i),a=null);else{var o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(n=$s(r,t,e,n,i),null===a){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==na(i))return t[ta(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){t[ta(n?e.classBindings:e.styleBindings)]=i}(t,e,i,s=Xs(s=$s(null,t,e,s[1],i),e.attrs,i))}else a=function(t,e,n){for(var i=void 0,r=e.directiveEnd,a=1+e.directiveStylingLast;a0)&&(c=!0):l=n,r)if(0!==u){var h=ta(t[s+1]);t[i+1]=Jr(h,s),0!==h&&(t[h+1]=ia(t[h+1],i)),t[s+1]=131071&t[s+1]|i<<17}else t[i+1]=Jr(s,0),0!==s&&(t[s+1]=ia(t[s+1],i)),s=i;else t[i+1]=Jr(u,0),0===s?s=i:t[u+1]=ia(t[u+1],i),u=i;c&&(t[i+1]=ea(t[i+1])),Vs(t,l,i,!0),Vs(t,l,i,!1),function(t,e,n,i,r){var a=r?t.residualClasses:t.residualStyles;null!=a&&"string"==typeof e&&Ie(a,e)>=0&&(n[i+1]=ra(n[i+1]))}(e,l,t,i,a),o=Jr(s,u),a?e.classBindings=o:e.styleBindings=o}(r,a,e,n,o,i)}}function $s(t,e,n,i,r){var a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var u=t[r],l=Array.isArray(u),c=l?u[1]:u,h=null===c,d=n[r+1];d===Yr&&(d=h?Ns:void 0);var f=h?Ae(d,i):c===i?d:void 0;if(l&&!tu(f)&&(f=Ae(u,i)),tu(f)&&(s=f,o))return s;var p=t[r+1];r=o?ta(p):na(p)}if(null!==e){var m=a?e.residualClasses:e.residualStyles;null!=m&&(s=Ae(m,i))}return s}function tu(t){return void 0!==t}function eu(t,e){return 0!=(t.flags&(e?16:32))}function nu(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=En(),i=An(),r=t+Ye,a=i.firstCreatePass?ua(i,t,2,null,null):i.data[r],o=n[r]=Za(e,n[11]);oo(i,n,o,a),Tn(a,!1)}function iu(t){return ru("",t,""),iu}function ru(t,e,n){var i=En(),r=ls(i,t,e,n);return r!==Yr&&Ga(i,Jn(),r),ru}function au(t,e,n,i,r){var a=En(),o=function(t,e,n,i,r,a){var o=ss(t,Nn(),n,r);return Bn(2),o?e+bi(n)+i+bi(r)+a:Yr}(a,t,e,n,i,r);return o!==Yr&&Ga(a,Jn(),o),au}function ou(t,e,n){var i=En();return os(i,Vn(),e)&&ba(An(),ei(),i,t,e,i[11],n,!0),ou}function su(t,e,n){var i=En();if(os(i,Vn(),e)){var r=An(),a=ei();ba(r,a,i,t,e,Wa(Hn(r.data),a,i),n,!0)}return su}function uu(t,e,n){var i=An();if(i.firstCreatePass){var r=Je(t);lu(n,i.data,i.blueprint,r,!0),lu(e,i.data,i.blueprint,r,!1)}}function lu(t,e,n,i,r){if(t=Ut(t),Array.isArray(t))for(var a=0;a>20;if(Ho(t)||!t.multi){var p=new hi(l,r,ds),m=du(u,e,r?h:h+f,d);-1===m?(Ri(Ai(c,s),o,u),cu(o,t,e.length),e.push(u),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(p),s.push(p)):(n[m]=p,s[m]=p)}else{var v=du(u,e,h+f,d),g=du(u,e,h,h+f),y=g>=0&&n[g];if(r&&!y||!r&&!(v>=0&&n[v])){Ri(Ai(c,s),o,u);var _=function(t,e,n,i,r){var a=new hi(t,n,ds);return a.multi=[],a.index=e,a.componentProviders=0,hu(a,r,i&&!n),a}(r?pu:fu,n.length,r,i,l);!r&&y&&(n[g].providerFactory=_),cu(o,t,e.length,0),e.push(u),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else cu(o,t,v>-1?v:g,hu(n[r?g:v],l,!r&&i));!r&&i&&y&&n[g].componentProviders++}}}function cu(t,e,n,i){var r=Ho(e);if(r||e.useClass){var a=(e.useClass||e).prototype.ngOnDestroy;if(a){var o=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){var s=o.indexOf(n);-1===s?o.push(n,[i,a]):o[s+1].push(i,a)}else o.push(n,a)}}}function hu(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function du(t,e,n,i){for(var r=n;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return uu(n,i?i(t):t,e)}}}var gu=function t(){y(this,t)},yu=function t(){y(this,t)},_u=function(){function t(){y(this,t)}return b(t,[{key:"resolveComponentFactory",value:function(t){throw function(t){var e=Error("No component factory found for ".concat(Bt(t),". Did you add it to @NgModule.entryComponents?"));return e.ngComponent=t,e}(t)}}]),t}(),bu=function(){var t=function t(){y(this,t)};return t.NULL=new _u,t}(),ku=function(){var t=function t(e){y(this,t),this.nativeElement=e};return t.__NG_ELEMENT_ID__=function(){return wu(t)},t}(),wu=function(t){return wo(t,On(),En())},Cu=function t(){y(this,t)},xu=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({}),Su=function(){var t=function t(){y(this,t)};return t.__NG_ELEMENT_ID__=function(){return Du()},t}(),Du=function(){var t=En(),e=yn(On().index,t);return function(t){var e=t[11];if(hn(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Ke(e)?e:t)},Eu=function(){var t=function t(){y(this,t)};return t.\u0275prov=It({token:t,providedIn:"root",factory:function(){return null}}),t}(),Au=function t(e){y(this,t),this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},Iu=new Au("10.1.6"),Ou=function(){function t(){y(this,t)}return b(t,[{key:"supports",value:function(t){return is(t)}},{key:"create",value:function(t){return new Ru(t)}}]),t}(),Tu=function(t,e){return e},Ru=function(){function t(e){y(this,t),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=e||Tu}return b(t,[{key:"forEachItem",value:function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)}},{key:"forEachOperation",value:function(t){for(var e=this._itHead,n=this._removalsHead,i=0,r=null;e||n;){var a=!n||e&&e.currentIndex0&&mo(l,h,_.join(" "))}if(a=vn(p,0),void 0!==e)for(var b=a.projection=[],k=0;k ".concat(null," ").concat("!="," ").concat(e," <=Actual]"))}(n,e),"string"==typeof t&&t.toLowerCase().replace(/_/g,"-")}var ll=new Map;function cl(t){if(null!==t.\u0275mod.id){var e=t.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error("Duplicate module registered for ".concat(t," - ").concat(Bt(e)," vs ").concat(Bt(e.name)))})(e,ll.get(e),t),ll.set(e,t)}var n=t.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach((function(t){return cl(t)}))}var hl=function(t){f(n,t);var e=g(n);function n(t,i){var r;y(this,n),(r=e.call(this))._parent=i,r._bootstrapComponents=[],r.injector=a(r),r.destroyCbs=[],r.componentFactoryResolver=new $u(a(r));var o=qe(t),s=t[te]||null;return s&&ul(s),r._bootstrapComponents=xi(o.bootstrap),r._r3Injector=Lo(t,i,[{provide:be,useValue:a(r)},{provide:bu,useValue:r.componentFactoryResolver}],Bt(t)),r._r3Injector._resolveInjectorDefTypes(),r.instance=r.get(t),r}return b(n,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qo.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dt.Default;return t===qo||t===be||t===ae?this:this._r3Injector.get(t,e,n)}},{key:"destroy",value:function(){var t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach((function(t){return t()})),this.destroyCbs=null}},{key:"onDestroy",value:function(t){this.destroyCbs.push(t)}}]),n}(be),dl=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this)).moduleType=t,null!==qe(t)&&cl(t),i}return b(n,[{key:"create",value:function(t){return new hl(this.moduleType,t)}}]),n}(ke);function fl(t,e,n){var i=Ln()+t,r=En();return r[i]===Yr?as(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function pl(t,e,n,i){return gl(En(),Ln(),t,e,n,i)}function ml(t,e,n,i,r){return yl(En(),Ln(),t,e,n,i,r)}function vl(t,e){var n=t[e];return n===Yr?void 0:n}function gl(t,e,n,i,r,a){var o=e+n;return os(t,o,r)?as(t,o+1,a?i.call(a,r):i(r)):vl(t,o+1)}function yl(t,e,n,i,r,a,o){var s=e+n;return ss(t,s,r,a)?as(t,s+2,o?i.call(o,r,a):i(r,a)):vl(t,s+2)}function _l(t,e){var n,i=An(),r=t+Ye;i.firstCreatePass?(n=function(t,e){if(e)for(var n=e.length-1;n>=0;n--){var i=e[n];if(t===i.name)return i}throw new Error("The pipe '".concat(t,"' could not be found!"))}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var a=n.factory||(n.factory=We(n.type)),o=de(ds);try{var s=Di(!1),u=a();return Di(s),function(t,e,n,i){var r=n+Ye;r>=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=i}(i,En(),t,u),u}finally{de(o)}}function bl(t,e,n){var i=En(),r=gn(i,t);return Cl(i,wl(i,t)?gl(i,Ln(),e,r.transform,n,r):r.transform(n))}function kl(t,e,n,i){var r=En(),a=gn(r,t);return Cl(r,wl(r,t)?yl(r,Ln(),e,a.transform,n,i,a):a.transform(n,i))}function wl(t,e){return t[1].data[e+Ye].pure}function Cl(t,e){return ns.isWrapped(e)&&(e=ns.unwrap(e),t[Nn()]=Yr),e}var xl=function(t){f(n,t);var e=g(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return y(this,n),(t=e.call(this)).__isAsync=i,t}return b(n,[{key:"emit",value:function(t){r(i(n.prototype),"next",this).call(this,t)}},{key:"subscribe",value:function(t,e,a){var o,s=function(t){return null},u=function(){return null};t&&"object"==typeof t?(o=this.__isAsync?function(e){setTimeout((function(){return t.next(e)}))}:function(e){t.next(e)},t.error&&(s=this.__isAsync?function(e){setTimeout((function(){return t.error(e)}))}:function(e){t.error(e)}),t.complete&&(u=this.__isAsync?function(){setTimeout((function(){return t.complete()}))}:function(){t.complete()})):(o=this.__isAsync?function(e){setTimeout((function(){return t(e)}))}:function(e){t(e)},e&&(s=this.__isAsync?function(t){setTimeout((function(){return e(t)}))}:function(t){e(t)}),a&&(u=this.__isAsync?function(){setTimeout((function(){return a()}))}:function(){a()}));var l=r(i(n.prototype),"subscribe",this).call(this,o,s,u);return t instanceof D&&t.add(l),l}}]),n}(U);function Sl(){return this._results[es()]()}var Dl=function(){function t(){y(this,t),this.dirty=!0,this._results=[],this.changes=new xl,this.length=0;var e=es(),n=t.prototype;n[e]||(n[e]=Sl)}return b(t,[{key:"map",value:function(t){return this._results.map(t)}},{key:"filter",value:function(t){return this._results.filter(t)}},{key:"find",value:function(t){return this._results.find(t)}},{key:"reduce",value:function(t,e){return this._results.reduce(t,e)}},{key:"forEach",value:function(t){this._results.forEach(t)}},{key:"some",value:function(t){return this._results.some(t)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(t){this._results=we(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}},{key:"notifyOnChanges",value:function(){this.changes.emit(this)}},{key:"setDirty",value:function(){this.dirty=!0}},{key:"destroy",value:function(){this.changes.complete(),this.changes.unsubscribe()}}]),t}(),El=function(){function t(e){y(this,t),this.queryList=e,this.matches=null}return b(t,[{key:"clone",value:function(){return new t(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),t}(),Al=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];y(this,t),this.queries=e}return b(t,[{key:"createEmbeddedView",value:function(e){var n=e.queries;if(null!==n){for(var i=null!==e.contentQueries?e.contentQueries[0]:n.length,r=[],a=0;a3&&void 0!==arguments[3]?arguments[3]:null;y(this,t),this.predicate=e,this.descendants=n,this.isStatic=i,this.read=r},Ol=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];y(this,t),this.queries=e}return b(t,[{key:"elementStart",value:function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;y(this,t),this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return b(t,[{key:"elementStart",value:function(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}},{key:"elementEnd",value:function(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(t,e){this.elementStart(t,e)}},{key:"embeddedTView",value:function(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}},{key:"isApplyingToNode",value:function(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var e=this._declarationNodeIndex,n=t.parent;null!==n&&3===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(t,e){var n=this.metadata.predicate;if(Array.isArray(n))for(var i=0;i0)i.push(o[s/2]);else{for(var l=a[s+1],c=e[-u],h=Ge;h0&&(r=setTimeout((function(){i._callbacks=i._callbacks.filter((function(t){return t.timeoutId!==r})),t(i._didWork,i.getPendingTasks())}),e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(t,e,n){return[]}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(mc))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),Sc=function(){var t=function(){function t(){y(this,t),this._applications=new Map,Dc.addToWindow(this)}return b(t,[{key:"registerApplication",value:function(t,e){this._applications.set(t,e)}},{key:"unregisterApplication",value:function(t){this._applications.delete(t)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(t){return this._applications.get(t)||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(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Dc.findTestabilityInTree(this,t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),Dc=new(function(){function t(){y(this,t)}return b(t,[{key:"addToWindow",value:function(t){}},{key:"findTestabilityInTree",value:function(t,e,n){return null}}]),t}()),Ec=function(t,e,n){var i=new dl(n);return Promise.resolve(i)},Ac=new re("AllowMultipleToken"),Ic=function t(e,n){y(this,t),this.name=e,this.token=n};function Oc(t){if(wc&&!wc.destroyed&&!wc.injector.get(Ac,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");wc=t.get(Mc);var e=t.get(Jl,null);return e&&e.forEach((function(t){return t()})),wc}function Tc(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: ".concat(e),r=new re(i);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=Pc();if(!a||a.injector.get(Ac,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var o=n.concat(e).concat({provide:r,useValue:!0},{provide:Oo,useValue:"platform"});Oc(qo.create({providers:o,name:i}))}return Rc(r)}}function Rc(t){var e=Pc();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}function Pc(){return wc&&!wc.destroyed?wc:null}var Mc=function(){var t=function(){function t(e){y(this,t),this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return b(t,[{key:"bootstrapModuleFactory",value:function(t,e){var n,i,r=this,a=(i=e&&e.ngZoneEventCoalescing||!1,"noop"===(n=e?e.ngZone:void 0)?new Cc:("zone.js"===n?void 0:n)||new mc({enableLongStackTrace:ar(),shouldCoalesceEventChangeDetection:i})),o=[{provide:mc,useValue:a}];return a.run((function(){var e=qo.create({providers:o,parent:r.injector,name:t.moduleType.name}),n=t.create(e),i=n.injector.get(Gi,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy((function(){return Nc(r._modules,n)})),a.runOutsideAngular((function(){return a.onError.subscribe({next:function(t){i.handleError(t)}})})),function(t,e,i){try{var a=((o=n.injector.get(Zl)).runInitializers(),o.donePromise.then((function(){return ul(n.injector.get(ic,sl)||sl),r._moduleDoBootstrap(n),n})));return Cs(a)?a.catch((function(n){throw e.runOutsideAngular((function(){return t.handleError(n)})),n})):a}catch(s){throw e.runOutsideAngular((function(){return t.handleError(s)})),s}var o}(i,a)}))}},{key:"bootstrapModule",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=Fc({},n);return Ec(0,0,t).then((function(t){return e.bootstrapModuleFactory(t,i)}))}},{key:"_moduleDoBootstrap",value:function(t){var e=t.injector.get(Lc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach((function(t){return e.bootstrap(t)}));else{if(!t.instance.ngDoBootstrap)throw new Error("The module ".concat(Bt(t.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ')+"Please define one of these.");t.instance.ngDoBootstrap(e)}this._modules.push(t)}},{key:"onDestroy",value:function(t){this._destroyListeners.push(t)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach((function(t){return t.destroy()})),this._destroyListeners.forEach((function(t){return t()})),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(qo))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}();function Fc(t,e){return Array.isArray(e)?e.reduce(Fc,t):Object.assign(Object.assign({},t),e)}var Lc=function(){var t=function(){function t(e,n,i,r,a,o){var s=this;y(this,t),this._zone=e,this._console=n,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=ar(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run((function(){s.tick()}))}});var u=new V((function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular((function(){t.next(s._stable),t.complete()}))})),l=new V((function(t){var e;s._zone.runOutsideAngular((function(){e=s._zone.onStable.subscribe((function(){mc.assertNotInAngularZone(),pc((function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))}))}))}));var n=s._zone.onUnstable.subscribe((function(){mc.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular((function(){t.next(!1)})))}));return function(){e.unsubscribe(),n.unsubscribe()}}));this.isStable=ht(u,l.pipe((function(t){return dt()((e=yt,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,vt);return i.source=t,i.subjectFactory=n,i})(t));var e})))}return b(t,[{key:"bootstrap",value:function(t,e){var n,i=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.");n=t instanceof yu?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(be),a=n.create(qo.NULL,[],e||n.selector,r);a.onDestroy((function(){i._unloadComponent(a)}));var o=a.injector.get(xc,null);return o&&a.injector.get(Sc).registerApplication(a.location.nativeElement,o),this._loadComponent(a),ar()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),a}},{key:"tick",value:function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var e,n=h(this._views);try{for(n.s();!(e=n.n()).done;)e.value.detectChanges()}catch(a){n.e(a)}finally{n.f()}if(this._enforceNoNewChanges){var i,r=h(this._views);try{for(r.s();!(i=r.n()).done;)i.value.checkNoChanges()}catch(a){r.e(a)}finally{r.f()}}}catch(o){this._zone.runOutsideAngular((function(){return t._exceptionHandler.handleError(o)}))}finally{this._runningTick=!1}}},{key:"attachView",value:function(t){var e=t;this._views.push(e),e.attachToAppRef(this)}},{key:"detachView",value:function(t){var e=t;Nc(this._views,e),e.detachFromAppRef()}},{key:"_loadComponent",value:function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(ec,[]).concat(this._bootstrapListeners).forEach((function(e){return e(t)}))}},{key:"_unloadComponent",value:function(t){this.detachView(t.hostView),Nc(this.components,t)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach((function(t){return t.destroy()}))}},{key:"viewCount",get:function(){return this._views.length}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(mc),pe(nc),pe(qo),pe(Gi),pe(bu),pe(Zl))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}();function Nc(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Vc=function t(){y(this,t)},Bc=function t(){y(this,t)},jc={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},zc=function(){var t=function(){function t(e,n){y(this,t),this._compiler=e,this._config=n||jc}return b(t,[{key:"load",value:function(t){return this.loadAndCompile(t)}},{key:"loadAndCompile",value:function(t){var e=this,i=u(t.split("#"),2),r=i[0],a=i[1];return void 0===a&&(a="default"),n("crnd")(r).then((function(t){return t[a]})).then((function(t){return Hc(t,r,a)})).then((function(t){return e._compiler.compileModuleAsync(t)}))}},{key:"loadFactory",value:function(t){var e=u(t.split("#"),2),i=e[0],r=e[1],a="NgFactory";return void 0===r&&(r="default",a=""),n("crnd")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then((function(t){return t[r+a]})).then((function(t){return Hc(t,i,r)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(dc),pe(Bc,8))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}();function Hc(t,e,n){if(!t)throw new Error("Cannot find '".concat(n,"' in '").concat(e,"'"));return t}var Uc=Tc(null,"core",[{provide:tc,useValue:"unknown"},{provide:Mc,deps:[qo]},{provide:Sc,deps:[]},{provide:nc,deps:[]}]),Wc=[{provide:Lc,useClass:Lc,deps:[mc,nc,qo,Gi,bu,Zl]},{provide:Qu,deps:[mc],useFactory:function(t){var e=[];return t.onStable.subscribe((function(){for(;e.length;)e.pop()()})),function(t){e.push(t)}}},{provide:Zl,useClass:Zl,deps:[[new Ct,Kl]]},{provide:dc,useClass:dc,deps:[]},Xl,{provide:ju,useFactory:function(){return Uu},deps:[]},{provide:zu,useFactory:function(){return Wu},deps:[]},{provide:ic,useFactory:function(t){return ul(t=t||"undefined"!=typeof $localize&&$localize.locale||sl),t},deps:[[new wt(ic),new Ct,new St]]},{provide:rc,useValue:"USD"}],qc=function(){var t=function t(e){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(pe(Lc))},providers:Wc}),t}(),Yc=null;function Gc(){return Yc}var Kc=function t(){y(this,t)},Zc=new re("DocumentToken"),$c=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:Xc,token:t,providedIn:"platform"}),t}();function Xc(){return pe(Jc)}var Qc=new re("Location Initialized"),Jc=function(){var t=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this))._doc=t,i._init(),i}return b(n,[{key:"_init",value:function(){this.location=Gc().getLocation(),this._history=Gc().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return Gc().getBaseHref(this._doc)}},{key:"onPopState",value:function(t){Gc().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}},{key:"onHashChange",value:function(t){Gc().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}},{key:"pushState",value:function(t,e,n){th()?this._history.pushState(t,e,n):this.location.hash=n}},{key:"replaceState",value:function(t,e,n){th()?this._history.replaceState(t,e,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{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(t){this.location.pathname=t}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}($c);return t.\u0275fac=function(e){return new(e||t)(pe(Zc))},t.\u0275prov=It({factory:eh,token:t,providedIn:"platform"}),t}();function th(){return!!window.history.pushState}function eh(){return new Jc(pe(Zc))}function nh(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function ih(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function rh(t){return t&&"?"!==t[0]?"?"+t:t}var ah=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:oh,token:t,providedIn:"root"}),t}();function oh(t){var e=pe(Zc).location;return new uh(pe($c),e&&e.origin||"")}var sh=new re("appBaseHref"),uh=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;if(y(this,n),(r=e.call(this))._platformLocation=t,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)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 r._baseHref=i,r}return b(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(t){return nh(this._baseHref,t)}},{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._platformLocation.pathname+rh(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?"".concat(e).concat(n):e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+rh(i));this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+rh(i));this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(ah);return t.\u0275fac=function(e){return new(e||t)(pe($c),pe(sh,8))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),lh=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this))._platformLocation=t,r._baseHref="",null!=i&&(r._baseHref=i),r}return b(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}},{key:"prepareExternalUrl",value:function(t){var e=nh(this._baseHref,t);return e.length>0?"#"+e:e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+rh(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+rh(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(ah);return t.\u0275fac=function(e){return new(e||t)(pe($c),pe(sh,8))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),ch=function(){var t=function(){function t(e,n){var i=this;y(this,t),this._subject=new xl,this._urlChangeListeners=[],this._platformStrategy=e;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=ih(dh(r)),this._platformStrategy.onPopState((function(t){i._subject.emit({url:i.path(!0),pop:!0,state:t.state,type:t.type})}))}return b(t,[{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(t))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(t+rh(e))}},{key:"normalize",value:function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,dh(e)))}},{key:"prepareExternalUrl",value:function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}},{key:"go",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+rh(e)),n)}},{key:"replaceState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+rh(e)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(t){var e=this;this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe((function(t){e._notifyUrlChangeListeners(t.url,t.state)})))}},{key:"_notifyUrlChangeListeners",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach((function(n){return n(t,e)}))}},{key:"subscribe",value:function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(ah),pe($c))},t.normalizeQueryParams=rh,t.joinWithSlash=nh,t.stripTrailingSlash=ih,t.\u0275prov=It({factory:hh,token:t,providedIn:"root"}),t}();function hh(){return new ch(pe(ah),pe($c))}function dh(t){return t.replace(/\/index.html$/,"")}var fh={ADP:[void 0,void 0,0],AFN:[void 0,void 0,0],ALL:[void 0,void 0,0],AMD:[void 0,void 0,2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,"\u0440.",2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:[void 0,"\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RUR:[void 0,"\u0440."],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},ph=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}({}),mh=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),vh=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),gh=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),yh=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),_h=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function bh(t,e){return Eh(rl(t)[ol.DateFormat],e)}function kh(t,e){return Eh(rl(t)[ol.TimeFormat],e)}function wh(t,e){return Eh(rl(t)[ol.DateTimeFormat],e)}function Ch(t,e){var n=rl(t),i=n[ol.NumberSymbols][e];if(void 0===i){if(e===_h.CurrencyDecimal)return n[ol.NumberSymbols][_h.Decimal];if(e===_h.CurrencyGroup)return n[ol.NumberSymbols][_h.Group]}return i}function xh(t,e){return rl(t)[ol.NumberFormats][e]}function Sh(t){return rl(t)[ol.Currencies]}function Dh(t){if(!t[ol.ExtraData])throw new Error('Missing extra locale data for the locale "'.concat(t[ol.LocaleId],'". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.'))}function Eh(t,e){for(var n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function Ah(t){var e=u(t.split(":"),2);return{hours:+e[0],minutes:+e[1]}}function Ih(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",i=Sh(n)[t]||fh[t]||[],r=i[1];return"narrow"===e&&"string"==typeof r?r:i[0]||t}var Oh=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Th={},Rh=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Ph=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),Mh=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),Fh=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function Lh(t,e,n,i){var r=function(t){if(Xh(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();var e,n=parseFloat(t);if(!isNaN(t-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){var i=u(t.split("-").map((function(t){return+t})),3);return new Date(i[0],i[1]-1,i[2])}if(e=t.match(Oh))return function(t){var e=new Date(0),n=0,i=0,r=t[8]?e.setUTCFullYear:e.setFullYear,a=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));var o=Number(t[4]||0)-n,s=Number(t[5]||0)-i,u=Number(t[6]||0),l=Math.round(1e3*parseFloat("0."+(t[7]||0)));return a.call(e,o,s,u,l),e}(e)}var r=new Date(t);if(!Xh(r))throw new Error('Unable to convert "'.concat(t,'" into a date'));return r}(t);e=Nh(n,e)||e;for(var a,o=[];e;){if(!(a=Rh.exec(e))){o.push(e);break}var s=(o=o.concat(a.slice(1))).pop();if(!s)break;e=s}var l=r.getTimezoneOffset();i&&(l=$h(i,l),r=function(t,e,n){var i=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*($h(e,i)-i))}(r,i));var c="";return o.forEach((function(t){var e=function(t){if(Zh[t])return Zh[t];var e;switch(t){case"G":case"GG":case"GGG":e=Uh(Fh.Eras,gh.Abbreviated);break;case"GGGG":e=Uh(Fh.Eras,gh.Wide);break;case"GGGGG":e=Uh(Fh.Eras,gh.Narrow);break;case"y":e=zh(Mh.FullYear,1,0,!1,!0);break;case"yy":e=zh(Mh.FullYear,2,0,!0,!0);break;case"yyy":e=zh(Mh.FullYear,3,0,!1,!0);break;case"yyyy":e=zh(Mh.FullYear,4,0,!1,!0);break;case"M":case"L":e=zh(Mh.Month,1,1);break;case"MM":case"LL":e=zh(Mh.Month,2,1);break;case"MMM":e=Uh(Fh.Months,gh.Abbreviated);break;case"MMMM":e=Uh(Fh.Months,gh.Wide);break;case"MMMMM":e=Uh(Fh.Months,gh.Narrow);break;case"LLL":e=Uh(Fh.Months,gh.Abbreviated,vh.Standalone);break;case"LLLL":e=Uh(Fh.Months,gh.Wide,vh.Standalone);break;case"LLLLL":e=Uh(Fh.Months,gh.Narrow,vh.Standalone);break;case"w":e=Kh(1);break;case"ww":e=Kh(2);break;case"W":e=Kh(1,!0);break;case"d":e=zh(Mh.Date,1);break;case"dd":e=zh(Mh.Date,2);break;case"E":case"EE":case"EEE":e=Uh(Fh.Days,gh.Abbreviated);break;case"EEEE":e=Uh(Fh.Days,gh.Wide);break;case"EEEEE":e=Uh(Fh.Days,gh.Narrow);break;case"EEEEEE":e=Uh(Fh.Days,gh.Short);break;case"a":case"aa":case"aaa":e=Uh(Fh.DayPeriods,gh.Abbreviated);break;case"aaaa":e=Uh(Fh.DayPeriods,gh.Wide);break;case"aaaaa":e=Uh(Fh.DayPeriods,gh.Narrow);break;case"b":case"bb":case"bbb":e=Uh(Fh.DayPeriods,gh.Abbreviated,vh.Standalone,!0);break;case"bbbb":e=Uh(Fh.DayPeriods,gh.Wide,vh.Standalone,!0);break;case"bbbbb":e=Uh(Fh.DayPeriods,gh.Narrow,vh.Standalone,!0);break;case"B":case"BB":case"BBB":e=Uh(Fh.DayPeriods,gh.Abbreviated,vh.Format,!0);break;case"BBBB":e=Uh(Fh.DayPeriods,gh.Wide,vh.Format,!0);break;case"BBBBB":e=Uh(Fh.DayPeriods,gh.Narrow,vh.Format,!0);break;case"h":e=zh(Mh.Hours,1,-12);break;case"hh":e=zh(Mh.Hours,2,-12);break;case"H":e=zh(Mh.Hours,1);break;case"HH":e=zh(Mh.Hours,2);break;case"m":e=zh(Mh.Minutes,1);break;case"mm":e=zh(Mh.Minutes,2);break;case"s":e=zh(Mh.Seconds,1);break;case"ss":e=zh(Mh.Seconds,2);break;case"S":e=zh(Mh.FractionalSeconds,1);break;case"SS":e=zh(Mh.FractionalSeconds,2);break;case"SSS":e=zh(Mh.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=qh(Ph.Short);break;case"ZZZZZ":e=qh(Ph.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=qh(Ph.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=qh(Ph.Long);break;default:return null}return Zh[t]=e,e}(t);c+=e?e(r,n,l):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")})),c}function Nh(t,e){var n=function(t){return rl(t)[ol.LocaleId]}(t);if(Th[n]=Th[n]||{},Th[n][e])return Th[n][e];var i="";switch(e){case"shortDate":i=bh(t,yh.Short);break;case"mediumDate":i=bh(t,yh.Medium);break;case"longDate":i=bh(t,yh.Long);break;case"fullDate":i=bh(t,yh.Full);break;case"shortTime":i=kh(t,yh.Short);break;case"mediumTime":i=kh(t,yh.Medium);break;case"longTime":i=kh(t,yh.Long);break;case"fullTime":i=kh(t,yh.Full);break;case"short":var r=Nh(t,"shortTime"),a=Nh(t,"shortDate");i=Vh(wh(t,yh.Short),[r,a]);break;case"medium":var o=Nh(t,"mediumTime"),s=Nh(t,"mediumDate");i=Vh(wh(t,yh.Medium),[o,s]);break;case"long":var u=Nh(t,"longTime"),l=Nh(t,"longDate");i=Vh(wh(t,yh.Long),[u,l]);break;case"full":var c=Nh(t,"fullTime"),h=Nh(t,"fullDate");i=Vh(wh(t,yh.Full),[c,h])}return i&&(Th[n][e]=i),i}function Vh(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,(function(t,n){return null!=e&&n in e?e[n]:t}))),t}function Bh(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,a="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,a=n));for(var o=String(t);o.length2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return function(a,o){var s=Hh(t,a);if((n>0||s>-n)&&(s+=n),t===Mh.Hours)0===s&&-12===n&&(s=12);else if(t===Mh.FractionalSeconds)return jh(s,e);var u=Ch(o,_h.MinusSign);return Bh(s,e,u,i,r)}}function Hh(t,e){switch(t){case Mh.FullYear:return e.getFullYear();case Mh.Month:return e.getMonth();case Mh.Date:return e.getDate();case Mh.Hours:return e.getHours();case Mh.Minutes:return e.getMinutes();case Mh.Seconds:return e.getSeconds();case Mh.FractionalSeconds:return e.getMilliseconds();case Mh.Day:return e.getDay();default:throw new Error('Unknown DateType value "'.concat(t,'".'))}}function Uh(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vh.Format,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,a){return Wh(r,a,t,e,n,i)}}function Wh(t,e,n,i,r,a){switch(n){case Fh.Months:return function(t,e,n){var i=rl(t),r=Eh([i[ol.MonthsFormat],i[ol.MonthsStandalone]],e);return Eh(r,n)}(e,r,i)[t.getMonth()];case Fh.Days:return function(t,e,n){var i=rl(t),r=Eh([i[ol.DaysFormat],i[ol.DaysStandalone]],e);return Eh(r,n)}(e,r,i)[t.getDay()];case Fh.DayPeriods:var o=t.getHours(),s=t.getMinutes();if(a){var l=function(t){var e=rl(t);return Dh(e),(e[ol.ExtraData][2]||[]).map((function(t){return"string"==typeof t?Ah(t):[Ah(t[0]),Ah(t[1])]}))}(e),c=function(t,e,n){var i=rl(t);Dh(i);var r=Eh([i[ol.ExtraData][0],i[ol.ExtraData][1]],e)||[];return Eh(r,n)||[]}(e,r,i),h=l.findIndex((function(t){if(Array.isArray(t)){var e=u(t,2),n=e[0],i=e[1],r=o>=n.hours&&s>=n.minutes,a=o0?Math.floor(r/60):Math.ceil(r/60);switch(t){case Ph.Short:return(r>=0?"+":"")+Bh(o,2,a)+Bh(Math.abs(r%60),2,a);case Ph.ShortGMT:return"GMT"+(r>=0?"+":"")+Bh(o,1,a);case Ph.Long:return"GMT"+(r>=0?"+":"")+Bh(o,2,a)+":"+Bh(Math.abs(r%60),2,a);case Ph.Extended:return 0===i?"Z":(r>=0?"+":"")+Bh(o,2,a)+":"+Bh(Math.abs(r%60),2,a);default:throw new Error('Unknown zone width "'.concat(t,'"'))}}}function Yh(t){var e=new Date(t,0,1).getDay();return new Date(t,0,1+(e<=4?4:11)-e)}function Gh(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function Kh(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,i){var r;if(e){var a=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,o=n.getDate();r=1+Math.floor((o+a)/7)}else{var s=Gh(n),u=Yh(s.getFullYear()),l=s.getTime()-u.getTime();r=1+Math.round(l/6048e5)}return Bh(r,t,Ch(i,_h.MinusSign))}}var Zh={};function $h(t,e){t=t.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function Xh(t){return t instanceof Date&&!isNaN(t.valueOf())}var Qh=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Jh=".",td="0",ed="#";function nd(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s="",u=!1;if(isFinite(t)){var l=od(t);o&&(l=ad(l));var c=e.minInt,h=e.minFrac,d=e.maxFrac;if(a){var f=a.match(Qh);if(null===f)throw new Error("".concat(a," is not a valid digit info"));var p=f[1],m=f[3],v=f[5];null!=p&&(c=ud(p)),null!=m&&(h=ud(m)),null!=v?d=ud(v):null!=m&&h>d&&(d=h)}sd(l,h,d);var g=l.digits,y=l.integerLen,_=l.exponent,b=[];for(u=g.every((function(t){return!t}));y0?b=g.splice(y,g.length):(b=g,g=[0]);var k=[];for(g.length>=e.lgSize&&k.unshift(g.splice(-e.lgSize,g.length).join(""));g.length>e.gSize;)k.unshift(g.splice(-e.gSize,g.length).join(""));g.length&&k.unshift(g.join("")),s=k.join(Ch(n,i)),b.length&&(s+=Ch(n,r)+b.join("")),_&&(s+=Ch(n,_h.Exponential)+"+"+_)}else s=Ch(n,_h.Infinity);return t<0&&!u?e.negPre+s+e.negSuf:e.posPre+s+e.posSuf}function id(t,e,n,i,r){var a=rd(xh(e,ph.Currency),Ch(e,_h.MinusSign));return a.minFrac=function(t){var e,n=fh[t];return n&&(e=n[2]),"number"==typeof e?e:2}(i),a.maxFrac=a.minFrac,nd(t,a,e,_h.CurrencyGroup,_h.CurrencyDecimal,r).replace("\xa4",n).replace("\xa4","").trim()}function rd(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(";"),r=i[0],a=i[1],o=-1!==r.indexOf(Jh)?r.split(Jh):[r.substring(0,r.lastIndexOf(td)+1),r.substring(r.lastIndexOf(td)+1)],s=o[0],u=o[1]||"";n.posPre=s.substr(0,s.indexOf(ed));for(var l=0;l-1&&(o=o.replace(Jh,"")),(i=o.search(/e/i))>0?(n<0&&(n=i),n+=+o.slice(i+1),o=o.substring(0,i)):n<0&&(n=o.length),i=0;o.charAt(i)===td;i++);if(i===(a=o.length))e=[0],n=1;else{for(a--;o.charAt(a)===td;)a--;for(n-=i,e=[],r=0;i<=a;i++,r++)e[r]=Number(o.charAt(i))}return n>22&&(e=e.splice(0,21),s=n-1,n=1),{digits:e,exponent:s,integerLen:n}}function sd(t,e,n){if(e>n)throw new Error("The minimum number of digits after fraction (".concat(e,") is higher than the maximum (").concat(n,")."));var i=t.digits,r=i.length-t.integerLen,a=Math.min(Math.max(e,r),n),o=a+t.integerLen,s=i[o];if(o>0){i.splice(Math.max(t.integerLen,o));for(var u=o;u=5)if(o-1<0){for(var c=0;c>o;c--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[o-1]++;for(;r=d?i.pop():h=!1),e>=10?1:0}),0);f&&(i.unshift(f),t.integerLen++)}function ud(t){var e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}var ld=function t(){y(this,t)};function cd(t,e,n,i){var r="=".concat(t);if(e.indexOf(r)>-1)return r;if(r=n.getPluralCategory(t,i),e.indexOf(r)>-1)return r;if(e.indexOf("other")>-1)return"other";throw new Error('No plural message found for value "'.concat(t,'"'))}var hd=function(){var t=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this)).locale=t,i}return b(n,[{key:"getPluralCategory",value:function(t,e){switch(function(t){return rl(t)[ol.PluralCase]}(e||this.locale)(t)){case mh.Zero:return"zero";case mh.One:return"one";case mh.Two:return"two";case mh.Few:return"few";case mh.Many:return"many";default:return"other"}}}]),n}(ld);return t.\u0275fac=function(e){return new(e||t)(pe(ic))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}();function dd(t,e){e=encodeURIComponent(e);var n,i=h(t.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=r.indexOf("="),o=u(-1==a?[r,""]:[r.slice(0,a),r.slice(a+1)],2),s=o[1];if(o[0].trim()===e)return decodeURIComponent(s)}}catch(l){i.e(l)}finally{i.f()}return null}var fd=function(){var t=function(){function t(e,n,i,r){y(this,t),this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return b(t,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}},{key:"_applyKeyValueChanges",value:function(t){var e=this;t.forEachAddedItem((function(t){return e._toggleClass(t.key,t.currentValue)})),t.forEachChangedItem((function(t){return e._toggleClass(t.key,t.currentValue)})),t.forEachRemovedItem((function(t){t.previousValue&&e._toggleClass(t.key,!1)}))}},{key:"_applyIterableChanges",value:function(t){var e=this;t.forEachAddedItem((function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat(Bt(t.item)));e._toggleClass(t.item,!0)})),t.forEachRemovedItem((function(t){return e._toggleClass(t.item,!1)}))}},{key:"_applyClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach((function(t){return e._toggleClass(t,!0)})):Object.keys(t).forEach((function(n){return e._toggleClass(n,!!t[n])})))}},{key:"_removeClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach((function(t){return e._toggleClass(t,!1)})):Object.keys(t).forEach((function(t){return e._toggleClass(t,!1)})))}},{key:"_toggleClass",value:function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach((function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)}))}},{key:"klass",set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(is(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ju),ds(zu),ds(ku),ds(Su))},t.\u0275dir=ze({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t}(),pd=function(){var t=function(){function t(e){y(this,t),this._viewContainerRef=e,this._componentRef=null,this._moduleRef=null}return b(t,[{key:"ngOnChanges",value:function(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){var e=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){var n=e.get(be);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(n.injector)}else this._moduleRef=null;var i=(this._moduleRef?this._moduleRef.componentFactoryResolver:e.get(bu)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(i,this._viewContainerRef.length,e,this.ngComponentOutletContent)}}},{key:"ngOnDestroy",value:function(){this._moduleRef&&this._moduleRef.destroy()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Gu))},t.\u0275dir=ze({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},features:[nn]}),t}(),md=function(){function t(e,n,i,r){y(this,t),this.$implicit=e,this.ngForOf=n,this.index=i,this.count=r}return b(t,[{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}}]),t}(),vd=function(){var t=function(){function t(e,n,i){y(this,t),this._viewContainer=e,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return b(t,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(t,"' of type '").concat((e=t).name||typeof e,"'. NgFor only supports binding to Iterables such as Arrays."))}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(t){var e=this,n=[];t.forEachOperation((function(t,i,r){if(null==t.previousIndex){var a=e._viewContainer.createEmbeddedView(e._template,new md(null,e._ngForOf,-1,-1),null===r?void 0:r),o=new gd(t,a);n.push(o)}else if(null==r)e._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=e._viewContainer.get(i);e._viewContainer.move(s,r);var u=new gd(t,s);n.push(u)}}));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:Dt.Default,e=So(!0);if(null!=e||t&Dt.Optional)return e;throw new Error("No provider for ChangeDetectorRef!")}())},t.\u0275pipe=He({name:"async",type:t,pure:!1}),t}(),Md=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"transform",value:function(e){if(!e)return e;if("string"!=typeof e)throw Id(t,e);return e.toLowerCase()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"lowercase",type:t,pure:!0}),t}(),Fd=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g,Ld=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"transform",value:function(e){if(!e)return e;if("string"!=typeof e)throw Id(t,e);return e.replace(Fd,(function(t){return t[0].toUpperCase()+t.substr(1).toLowerCase()}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"titlecase",type:t,pure:!0}),t}(),Nd=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"transform",value:function(e){if(!e)return e;if("string"!=typeof e)throw Id(t,e);return e.toUpperCase()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"uppercase",type:t,pure:!0}),t}(),Vd=function(){var t=function(){function t(e){y(this,t),this.locale=e}return b(t,[{key:"transform",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mediumDate",i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(null==e||""===e||e!=e)return null;try{return Lh(e,n,r||this.locale,i)}catch(a){throw Id(t,a.message)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ic))},t.\u0275pipe=He({name:"date",type:t,pure:!0}),t}(),Bd=/#/g,jd=function(){var t=function(){function t(e){y(this,t),this._localization=e}return b(t,[{key:"transform",value:function(e,n,i){if(null==e)return"";if("object"!=typeof n||null===n)throw Id(t,n);return n[cd(e,Object.keys(n),this._localization,i)].replace(Bd,e.toString())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ld))},t.\u0275pipe=He({name:"i18nPlural",type:t,pure:!0}),t}(),zd=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"transform",value:function(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw Id(t,n);return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"i18nSelect",type:t,pure:!0}),t}(),Hd=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"transform",value:function(t){return JSON.stringify(t,null,2)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"json",type:t,pure:!1}),t}();function Ud(t,e){return{key:t,value:e}}var Wd=function(){var t=function(){function t(e){y(this,t),this.differs=e,this.keyValues=[]}return b(t,[{key:"transform",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qd;if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());var i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem((function(t){e.keyValues.push(Ud(t.key,t.currentValue))})),this.keyValues.sort(n)),this.keyValues}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(zu))},t.\u0275pipe=He({name:"keyvalue",type:t,pure:!1}),t}();function qd(t,e){var n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n1&&void 0!==arguments[1]?arguments[1]:"USD";y(this,t),this._locale=e,this._defaultCurrencyCode=n}return b(t,[{key:"transform",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"symbol",r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;if(Zd(e))return null;a=a||this._locale,"boolean"==typeof i&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),i=i?"symbol":"code");var o=n||this._defaultCurrencyCode;"code"!==i&&(o="symbol"===i||"symbol-narrow"===i?Ih(o,"symbol"===i?"wide":"narrow",a):i);try{var s=$d(e);return id(s,a,o,n,r)}catch(u){throw Id(t,u.message)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ic),ds(rc))},t.\u0275pipe=He({name:"currency",type:t,pure:!0}),t}();function Zd(t){return null==t||""===t||t!=t}function $d(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error("".concat(t," is not a number"));return t}var Xd=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"transform",value:function(e,n,i){if(null==e)return e;if(!this.supports(e))throw Id(t,e);return e.slice(n,i)}},{key:"supports",value:function(t){return"string"==typeof t||Array.isArray(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"slice",type:t,pure:!1}),t}(),Qd=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:ld,useClass:hd}]}),t}(),Jd=function(){var t=function t(){y(this,t)};return t.\u0275prov=It({token:t,providedIn:"root",factory:function(){return new tf(pe(Zc),window,pe(Gi))}}),t}(),tf=function(){function t(e,n,i){y(this,t),this.document=e,this.window=n,this.errorHandler=i,this.offset=function(){return[0,0]}}return b(t,[{key:"setOffset",value:function(t){this.offset=Array.isArray(t)?function(){return t}:t}},{key:"getScrollPosition",value:function(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}},{key:"scrollToPosition",value:function(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}},{key:"scrollToAnchor",value:function(t){if(this.supportsScrolling()){var e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}},{key:"setHistoryScrollRestoration",value:function(t){if(this.supportScrollRestoration()){var e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}},{key:"scrollToElement",value:function(t){var e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}},{key:"supportScrollRestoration",value:function(){try{if(!this.window||!this.window.scrollTo)return!1;var t=ef(this.window.history)||ef(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(e){return!1}}},{key:"supportsScrolling",value:function(){try{return!!this.window.scrollTo}catch(t){return!1}}}]),t}();function ef(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}var nf,rf=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"getProperty",value:function(t,e){return t[e]}},{key:"log",value:function(t){window.console&&window.console.log&&window.console.log(t)}},{key:"logGroup",value:function(t){window.console&&window.console.group&&window.console.group(t)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}}},{key:"dispatchEvent",value:function(t,e){t.dispatchEvent(e)}},{key:"remove",value:function(t){return t.parentNode&&t.parentNode.removeChild(t),t}},{key:"getValue",value:function(t){return t.value}},{key:"createElement",value:function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(t){return t.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(t){return t instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(t){var e,n=af||(af=document.querySelector("base"))?af.getAttribute("href"):null;return null==n?null:(e=n,nf||(nf=document.createElement("a")),nf.setAttribute("href",e),"/"===nf.pathname.charAt(0)?nf.pathname:"/"+nf.pathname)}},{key:"resetBaseElement",value:function(){af=null}},{key:"getUserAgent",value:function(){return window.navigator.userAgent}},{key:"performanceNow",value:function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}},{key:"supportsCookies",value:function(){return!0}},{key:"getCookie",value:function(t){return dd(document.cookie,t)}}],[{key:"makeCurrent",value:function(){var t;t=new n,Yc||(Yc=t)}}]),n}(function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.call(this)}return b(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(Kc)),af=null,of=new re("TRANSITION_ID"),sf=[{provide:Kl,useFactory:function(t,e,n){return function(){n.get(Zl).donePromise.then((function(){var n=Gc();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter((function(e){return e.getAttribute("ng-transition")===t})).forEach((function(t){return n.remove(t)}))}))}},deps:[of,Zc,qo],multi:!0}],uf=function(){function t(){y(this,t)}return b(t,[{key:"addToWindow",value:function(t){Zt.getAngularTestability=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Zt.getAllAngularTestabilities=function(){return t.getAllTestabilities()},Zt.getAllAngularRootElements=function(){return t.getAllRootElements()},Zt.frameworkStabilizers||(Zt.frameworkStabilizers=[]),Zt.frameworkStabilizers.push((function(t){var e=Zt.getAllAngularTestabilities(),n=e.length,i=!1,r=function(e){i=i||e,0==--n&&t(i)};e.forEach((function(t){t.whenStable(r)}))}))}},{key:"findTestabilityInTree",value:function(t,e,n){if(null==e)return null;var i=t.getTestability(e);return null!=i?i:n?Gc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}],[{key:"init",value:function(){var e;e=new t,Dc=e}}]),t}(),lf=new re("EventManagerPlugins"),cf=function(){var t=function(){function t(e,n){var i=this;y(this,t),this._zone=n,this._eventNameToPlugin=new Map,e.forEach((function(t){return t.manager=i})),this._plugins=e.slice().reverse()}return b(t,[{key:"addEventListener",value:function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}},{key:"addGlobalEventListener",value:function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,i=0;i-1&&(e.splice(n,1),a+=t+".")})),a+=r,0!=e.length||0===r.length)return null;var o={};return o.domEventName=i,o.fullKey=a,o}},{key:"getEventFullKey",value:function(t){var e="",n=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Af.hasOwnProperty(e)&&(e=Af[e]))}return Ef[e]||e}(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Df.forEach((function(i){i!=n&&(0,If[i])(t)&&(e+=i+".")})),e+=n}},{key:"eventCallback",value:function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded((function(){return e(r)}))}}},{key:"_normalizeKey",value:function(t){switch(t){case"esc":return"escape";default:return t}}}]),n}(hf);return t.\u0275fac=function(e){return new(e||t)(pe(Zc))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),Tf=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:function(){return pe(Rf)},token:t,providedIn:"root"}),t}(),Rf=function(){var t=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this))._doc=t,i}return b(n,[{key:"sanitize",value:function(t,e){if(null==e)return null;switch(t){case Ir.NONE:return e;case Ir.HTML:return er(e,"HTML")?tr(e):Er(this._doc,String(e));case Ir.STYLE:return er(e,"Style")?tr(e):e;case Ir.SCRIPT:if(er(e,"Script"))return tr(e);throw new Error("unsafe value used in a script context");case Ir.URL:return nr(e),er(e,"URL")?tr(e):cr(String(e));case Ir.RESOURCE_URL:if(er(e,"ResourceURL"))return tr(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(t," (see http://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(t){return new Zi(t)}},{key:"bypassSecurityTrustStyle",value:function(t){return new $i(t)}},{key:"bypassSecurityTrustScript",value:function(t){return new Xi(t)}},{key:"bypassSecurityTrustUrl",value:function(t){return new Qi(t)}},{key:"bypassSecurityTrustResourceUrl",value:function(t){return new Ji(t)}}]),n}(Tf);return t.\u0275fac=function(e){return new(e||t)(pe(Zc))},t.\u0275prov=It({factory:function(){return t=pe(ae),new Rf(t.get(Zc));var t},token:t,providedIn:"root"}),t}(),Pf=Tc(Uc,"browser",[{provide:tc,useValue:"browser"},{provide:Jl,useValue:function(){rf.makeCurrent(),uf.init()},multi:!0},{provide:Zc,useFactory:function(){return function(t){ln=t}(document),document},deps:[]}]),Mf=[[],{provide:Oo,useValue:"root"},{provide:Gi,useFactory:function(){return new Gi},deps:[]},{provide:lf,useClass:Sf,multi:!0,deps:[Zc,mc,tc]},{provide:lf,useClass:Of,multi:!0,deps:[Zc]},[],{provide:kf,useClass:kf,deps:[cf,ff,$l]},{provide:Cu,useExisting:kf},{provide:df,useExisting:ff},{provide:ff,useClass:ff,deps:[Zc]},{provide:xc,useClass:xc,deps:[mc]},{provide:cf,useClass:cf,deps:[lf,mc]},[]],Ff=function(){var t=function(){function t(e){if(y(this,t),e)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 b(t,null,[{key:"withServerTransition",value:function(e){return{ngModule:t,providers:[{provide:$l,useValue:e.appId},{provide:of,useExisting:$l},sf]}}}]),t}();return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(pe(t,12))},providers:Mf,imports:[Qd,qc]}),t}();function Lf(){for(var t=arguments.length,e=new Array(t),n=0;n0){var i=t.slice(0,e),r=i.toLowerCase(),a=t.slice(e+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(a):n.headers.set(r,[a])}}))}:function(){n.headers=new Map,Object.keys(e).forEach((function(t){var i=e[t],r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(t,r))}))}:this.headers=new Map}return b(t,[{key:"has",value:function(t){return this.init(),this.headers.has(t.toLowerCase())}},{key:"get",value:function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(t){return this.init(),this.headers.get(t.toLowerCase())||null}},{key:"append",value:function(t,e){return this.clone({name:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({name:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({name:t,value:e,op:"d"})}},{key:"maybeSetNormalizedName",value:function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}},{key:"init",value:function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((function(t){return e.applyUpdate(t)})),this.lazyUpdate=null))}},{key:"copyFrom",value:function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach((function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))}))}},{key:"clone",value:function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}},{key:"applyUpdate",value:function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,l(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var a=this.headers.get(e);if(!a)return;0===(a=a.filter((function(t){return-1===r.indexOf(t)}))).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}else this.headers.delete(e),this.normalizedNames.delete(e)}}},{key:"forEach",value:function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach((function(n){return t(e.normalizedNames.get(n),e.headers.get(n))}))}}]),t}(),Wf=function(){function t(){y(this,t)}return b(t,[{key:"encodeKey",value:function(t){return Yf(t)}},{key:"encodeValue",value:function(t){return Yf(t)}},{key:"decodeKey",value:function(t){return decodeURIComponent(t)}},{key:"decodeValue",value:function(t){return decodeURIComponent(t)}}]),t}();function qf(t,e){var n=new Map;return t.length>0&&t.split("&").forEach((function(t){var i=t.indexOf("="),r=u(-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],2),a=r[0],o=r[1],s=n.get(a)||[];s.push(o),n.set(a,s)})),n}function Yf(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Gf=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(y(this,t),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new Wf,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=qf(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach((function(t){var i=n.fromObject[t];e.map.set(t,Array.isArray(i)?i:[i])}))):this.map=null}return b(t,[{key:"has",value:function(t){return this.init(),this.map.has(t)}},{key:"get",value:function(t){this.init();var e=this.map.get(t);return e?e[0]:null}},{key:"getAll",value:function(t){return this.init(),this.map.get(t)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(t,e){return this.clone({param:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({param:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({param:t,value:e,op:"d"})}},{key:"toString",value:function(){var t=this;return this.init(),this.keys().map((function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map((function(e){return n+"="+t.encoder.encodeValue(e)})).join("&")})).filter((function(t){return""!==t})).join("&")}},{key:"clone",value:function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n}},{key:"init",value:function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((function(e){return t.map.set(e,t.cloneFrom.map.get(e))})),this.updates.forEach((function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}})),this.cloneFrom=this.updates=null)}}]),t}();function Kf(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Zf(t){return"undefined"!=typeof Blob&&t instanceof Blob}function $f(t){return"undefined"!=typeof FormData&&t instanceof FormData}var Xf=function(){function t(e,n,i,r){var a;if(y(this,t),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,a=r):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new Uf),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s0&&void 0!==arguments[0]?arguments[0]:{},n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,a=void 0!==e.body?e.body:this.body,o=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,s=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,u=e.headers||this.headers,l=e.params||this.params;return void 0!==e.setHeaders&&(u=Object.keys(e.setHeaders).reduce((function(t,n){return t.set(n,e.setHeaders[n])}),u)),e.setParams&&(l=Object.keys(e.setParams).reduce((function(t,n){return t.set(n,e.setParams[n])}),l)),new t(n,i,a,{params:l,headers:u,reportProgress:s,responseType:r,withCredentials:o})}}]),t}(),Qf=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({}),Jf=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";y(this,t),this.headers=e.headers||new Uf,this.status=void 0!==e.status?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300},tp=function(t){f(n,t);var e=g(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return y(this,n),(t=e.call(this,i)).type=Qf.ResponseHeader,t}return b(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Jf),ep=function(t){f(n,t);var e=g(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return y(this,n),(t=e.call(this,i)).type=Qf.Response,t.body=void 0!==i.body?i.body:null,t}return b(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Jf),np=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this,t,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for ".concat(t.url||"(unknown url)"):"Http failure response for ".concat(t.url||"(unknown url)",": ").concat(t.status," ").concat(t.statusText),i.error=t.error||null,i}return n}(Jf);function ip(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var rp=function(){var t=function(){function t(e){y(this,t),this.handler=e}return b(t,[{key:"request",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof Xf)n=t;else{var a=void 0;a=r.headers instanceof Uf?r.headers:new Uf(r.headers);var o=void 0;r.params&&(o=r.params instanceof Gf?r.params:new Gf({fromObject:r.params})),n=new Xf(t,e,void 0!==r.body?r.body:null,{headers:a,params:o,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=Lf(n).pipe(Nf((function(t){return i.handler.handle(t)})));if(t instanceof Xf||"events"===r.observe)return s;var u=s.pipe(Vf((function(t){return t instanceof ep})));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(Y((function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body})));case"blob":return u.pipe(Y((function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body})));case"text":return u.pipe(Y((function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body})));case"json":default:return u.pipe(Y((function(t){return t.body})))}case"response":return u;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}},{key:"delete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",t,e)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",t,e)}},{key:"head",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",t,e)}},{key:"jsonp",value:function(t,e){return this.request("JSONP",t,{params:(new Gf).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",t,e)}},{key:"patch",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",t,ip(n,e))}},{key:"post",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",t,ip(n,e))}},{key:"put",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",t,ip(n,e))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(zf))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),ap=function(){function t(e,n){y(this,t),this.next=e,this.interceptor=n}return b(t,[{key:"handle",value:function(t){return this.interceptor.intercept(t,this.next)}}]),t}(),op=new re("HTTP_INTERCEPTORS"),sp=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"intercept",value:function(t,e){return e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),up=/^\)\]\}',?\n/,lp=function t(){y(this,t)},cp=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"build",value:function(){return new XMLHttpRequest}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),hp=function(){var t=function(){function t(e){y(this,t),this.xhrFactory=e}return b(t,[{key:"handle",value:function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new V((function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((function(t,e){return i.setRequestHeader(t,e.join(","))})),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var a=t.responseType.toLowerCase();i.responseType="json"!==a?a:"text"}var o=t.serializeBody(),s=null,u=function(){if(null!==s)return s;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new Uf(i.getAllResponseHeaders()),a=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new tp({headers:r,status:e,statusText:n,url:a})},l=function(){var e=u(),r=e.headers,a=e.status,o=e.statusText,s=e.url,l=null;204!==a&&(l=void 0===i.response?i.responseText:i.response),0===a&&(a=l?200:0);var c=a>=200&&a<300;if("json"===t.responseType&&"string"==typeof l){var h=l;l=l.replace(up,"");try{l=""!==l?JSON.parse(l):null}catch(d){l=h,c&&(c=!1,l={error:d,text:l})}}c?(n.next(new ep({body:l,headers:r,status:a,statusText:o,url:s||void 0})),n.complete()):n.error(new np({error:l,headers:r,status:a,statusText:o,url:s||void 0}))},c=function(t){var e=u(),r=new np({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e.url||void 0});n.error(r)},h=!1,d=function(e){h||(n.next(u()),h=!0);var r={type:Qf.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},f=function(t){var e={type:Qf.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",l),i.addEventListener("error",c),t.reportProgress&&(i.addEventListener("progress",d),null!==o&&i.upload&&i.upload.addEventListener("progress",f)),i.send(o),n.next({type:Qf.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("load",l),t.reportProgress&&(i.removeEventListener("progress",d),null!==o&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(lp))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),dp=new re("XSRF_COOKIE_NAME"),fp=new re("XSRF_HEADER_NAME"),pp=function t(){y(this,t)},mp=function(){var t=function(){function t(e,n,i){y(this,t),this.doc=e,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return b(t,[{key:"getToken",value:function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=dd(t,this.cookieName),this.lastCookieString=t),this.lastToken}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Zc),pe(tc),pe(dp))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),vp=function(){var t=function(){function t(e,n){y(this,t),this.tokenService=e,this.headerName=n}return b(t,[{key:"intercept",value:function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(pp),pe(fp))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),gp=function(){var t=function(){function t(e,n){y(this,t),this.backend=e,this.injector=n,this.chain=null}return b(t,[{key:"handle",value:function(t){if(null===this.chain){var e=this.injector.get(op,[]);this.chain=e.reduceRight((function(t,e){return new ap(t,e)}),this.backend)}return this.chain.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Hf),pe(qo))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),yp=function(){var t=function(){function t(){y(this,t)}return b(t,null,[{key:"disable",value:function(){return{ngModule:t,providers:[{provide:vp,useClass:sp}]}}},{key:"withOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.cookieName?{provide:dp,useValue:e.cookieName}:[],e.headerName?{provide:fp,useValue:e.headerName}:[]]}}}]),t}();return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[vp,{provide:op,useExisting:vp,multi:!0},{provide:pp,useClass:mp},{provide:dp,useValue:"XSRF-TOKEN"},{provide:fp,useValue:"X-XSRF-TOKEN"}]}),t}(),_p=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[rp,{provide:zf,useClass:gp},hp,{provide:Hf,useExisting:hp},cp,{provide:lp,useExisting:cp}],imports:[[yp.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t}(),bp=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this))._value=t,i}return b(n,[{key:"_subscribe",value:function(t){var e=r(i(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new j;return this._value}},{key:"next",value:function(t){r(i(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(U),kp=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyError",value:function(t,e){this.destination.error(t)}},{key:"notifyComplete",value:function(t){this.destination.complete()}}]),n}(P),wp=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this)).parent=t,a.outerValue=i,a.outerIndex=r,a.index=0,a}return b(n,[{key:"_next",value:function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}},{key:"_error",value:function(t){this.parent.notifyError(t,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(P);function Cp(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new wp(t,n,i);if(!r.closed)return e instanceof V?e.subscribe(r):tt(e)(r)}var xp={};function Sp(){for(var t=arguments.length,e=new Array(t),n=0;n0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r0&&void 0!==arguments[0]?arguments[0]:jp;return function(e){return e.lift(new Vp(t))}}var Vp=function(){function t(e){y(this,t),this.errorFactory=e}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new Bp(t,this.errorFactory))}}]),t}(),Bp=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).errorFactory=i,r.hasValue=!1,r}return b(n,[{key:"_next",value:function(t){this.hasValue=!0,this.destination.next(t)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}]),n}(P);function jp(){return new Ap}function zp(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e){return e.lift(new Hp(t))}}var Hp=function(){function t(e){y(this,t),this.defaultValue=e}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new Up(t,this.defaultValue))}}]),t}(),Up=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).defaultValue=i,r.isEmpty=!0,r}return b(n,[{key:"_next",value:function(t){this.isEmpty=!1,this.destination.next(t)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(P);function Wp(t,e){return"function"==typeof e?function(n){return n.pipe(Wp((function(n,i){return nt(t(n,i)).pipe(Y((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new qp(t))}}var qp=function(){function t(e){y(this,t),this.project=e}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new Yp(t,this.project))}}]),t}(),Yp=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).project=i,r.index=0,r}return b(n,[{key:"_next",value:function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e)}},{key:"_innerSub",value:function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new it(this),i=this.destination;i.add(n),this.innerSubscription=at(t,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}},{key:"_complete",value:function(){var t=this.innerSubscription;t&&!t.closed||r(i(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=void 0}},{key:"notifyComplete",value:function(){this.innerSubscription=void 0,this.isStopped&&r(i(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(t){this.destination.next(t)}}]),n}(rt);function Gp(t){return function(e){return 0===t?Op():e.lift(new Kp(t))}}var Kp=function(){function t(e){if(y(this,t),this.total=e,this.total<0)throw new Pp}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new Zp(t,this.total))}}]),t}(),Zp=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return b(n,[{key:"_next",value:function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}]),n}(P);function $p(){return Rp()(Lf.apply(void 0,arguments))}function Xp(){for(var t=arguments.length,e=new Array(t),n=0;n2&&void 0!==arguments[2]&&arguments[2];y(this,t),this.accumulator=e,this.seed=n,this.hasSeed=i}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new Jp(t,this.accumulator,this.seed,this.hasSeed))}}]),t}(),Jp=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t)).accumulator=i,o._seed=r,o.hasSeed=a,o.index=0,o}return b(n,[{key:"_next",value:function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(i){this.destination.error(i)}this.seed=e,this.destination.next(e)}},{key:"seed",get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t}}]),n}(P);function tm(t){return function(e){var n=new em(t),i=e.lift(n);return n.caught=i}}var em=function(){function t(e){y(this,t),this.selector=e}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new nm(t,this.selector,this.caught))}}]),t}(),nm=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t)).selector=i,a.caught=r,a}return b(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(s){return void r(i(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var a=new it(this);this.add(a);var o=at(e,a);o!==a&&this.add(o)}}}]),n}(rt);function im(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Vf((function(e,n){return t(e,n,i)})):L,Gp(1),n?zp(e):Np((function(){return new Ap})))}}function rm(){}function am(t,e,n){return function(i){return i.lift(new om(t,e,n))}}var om=function(){function t(e,n,i){y(this,t),this.nextOrObserver=e,this.error=n,this.complete=i}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new sm(t,this.nextOrObserver,this.error,this.complete))}}]),t}(),sm=function(t){f(n,t);var e=g(n);function n(t,i,r,o){var s;return y(this,n),(s=e.call(this,t))._tapNext=rm,s._tapError=rm,s._tapComplete=rm,s._tapError=r||rm,s._tapComplete=o||rm,x(i)?(s._context=a(s),s._tapNext=i):i&&(s._context=i,s._tapNext=i.next||rm,s._tapError=i.error||rm,s._tapComplete=i.complete||rm),s}return b(n,[{key:"_next",value:function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}},{key:"_error",value:function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}]),n}(P),um=function(){function t(e){y(this,t),this.callback=e}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new lm(t,this.callback))}}]),t}(),lm=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).add(new D(i)),r}return n}(P),cm=function t(e,n){y(this,t),this.id=e,this.url=n},hm=function(t){f(n,t);var e=g(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return y(this,n),(r=e.call(this,t,i)).navigationTrigger=a,r.restoredState=o,r}return b(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(cm),dm=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a}return b(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(cm),fm=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t,i)).reason=r,a}return b(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(cm),pm=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t,i)).error=r,a}return b(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(cm),mm=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return b(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(cm),vm=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return b(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(cm),gm=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o){var s;return y(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s.shouldActivate=o,s}return b(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(cm),ym=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return b(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(cm),_m=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return b(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(cm),bm=function(){function t(e){y(this,t),this.route=e}return b(t,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),t}(),km=function(){function t(e){y(this,t),this.route=e}return b(t,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),t}(),wm=function(){function t(e){y(this,t),this.snapshot=e}return b(t,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Cm=function(){function t(e){y(this,t),this.snapshot=e}return b(t,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),xm=function(){function t(e){y(this,t),this.snapshot=e}return b(t,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Sm=function(){function t(e){y(this,t),this.snapshot=e}return b(t,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Dm=function(){function t(e,n,i){y(this,t),this.routerEvent=e,this.position=n,this.anchor=i}return b(t,[{key:"toString",value:function(){var t=this.position?"".concat(this.position[0],", ").concat(this.position[1]):null;return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(t,"')")}}]),t}(),Em="primary",Am=function(){function t(e){y(this,t),this.params=e||{}}return b(t,[{key:"has",value:function(t){return Object.prototype.hasOwnProperty.call(this.params,t)}},{key:"get",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null}},{key:"getAll",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),t}();function Im(t){return new Am(t)}function Om(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function Tm(t,e,n){var i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length0?t[t.length-1]:null}function Lm(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Nm(t){return xs(t)?t:Cs(t)?nt(Promise.resolve(t)):Lf(t)}function Vm(t,e,n){return n?function(t,e){return Rm(t,e)}(t.queryParams,e.queryParams)&&Bm(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(n){return Pm(t[n],e[n])}))}(t.queryParams,e.queryParams)&&jm(t.root,e.root)}function Bm(t,e){if(!qm(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(var n in e.children){if(!t.children[n])return!1;if(!Bm(t.children[n],e.children[n]))return!1}return!0}function jm(t,e){return zm(t,e,e.segments)}function zm(t,e,n){if(t.segments.length>n.length)return!!qm(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!qm(t.segments,n))return!1;for(var i in e.children){if(!t.children[i])return!1;if(!jm(t.children[i],e.children[i]))return!1}return!0}var r=n.slice(0,t.segments.length),a=n.slice(t.segments.length);return!!qm(t.segments,r)&&!!t.children.primary&&zm(t.children.primary,e,a)}var Hm=function(){function t(e,n,i){y(this,t),this.root=e,this.queryParams=n,this.fragment=i}return b(t,[{key:"toString",value:function(){return Zm.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Im(this.queryParams)),this._queryParamMap}}]),t}(),Um=function(){function t(e,n){var i=this;y(this,t),this.segments=e,this.children=n,this.parent=null,Lm(n,(function(t,e){return t.parent=i}))}return b(t,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return $m(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),t}(),Wm=function(){function t(e,n){y(this,t),this.path=e,this.parameters=n}return b(t,[{key:"toString",value:function(){return iv(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=Im(this.parameters)),this._parameterMap}}]),t}();function qm(t,e){return t.length===e.length&&t.every((function(t,n){return t.path===e[n].path}))}function Ym(t,e){var n=[];return Lm(t.children,(function(t,i){i===Em&&(n=n.concat(e(t,i)))})),Lm(t.children,(function(t,i){i!==Em&&(n=n.concat(e(t,i)))})),n}var Gm=function t(){y(this,t)},Km=function(){function t(){y(this,t)}return b(t,[{key:"parse",value:function(t){var e=new uv(t);return new Hm(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}},{key:"serialize",value:function(t){var e,n,i="/".concat(Xm(t.root,!0)),r=(e=t.queryParams,(n=Object.keys(e).map((function(t){var n=e[t];return Array.isArray(n)?n.map((function(e){return"".concat(Jm(t),"=").concat(Jm(e))})).join("&"):"".concat(Jm(t),"=").concat(Jm(n))}))).length?"?".concat(n.join("&")):""),a="string"==typeof t.fragment?"#".concat(encodeURI(t.fragment)):"";return"".concat(i).concat(r).concat(a)}}]),t}(),Zm=new Km;function $m(t){return t.segments.map((function(t){return iv(t)})).join("/")}function Xm(t,e){if(!t.hasChildren())return $m(t);if(e){var n=t.children.primary?Xm(t.children.primary,!1):"",i=[];return Lm(t.children,(function(t,e){e!==Em&&i.push("".concat(e,":").concat(Xm(t,!1)))})),i.length>0?"".concat(n,"(").concat(i.join("//"),")"):n}var r=Ym(t,(function(e,n){return n===Em?[Xm(t.children.primary,!1)]:["".concat(n,":").concat(Xm(e,!1))]}));return 1===Object.keys(t.children).length&&null!=t.children.primary?"".concat($m(t),"/").concat(r[0]):"".concat($m(t),"/(").concat(r.join("//"),")")}function Qm(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Jm(t){return Qm(t).replace(/%3B/gi,";")}function tv(t){return Qm(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ev(t){return decodeURIComponent(t)}function nv(t){return ev(t.replace(/\+/g,"%20"))}function iv(t){return"".concat(tv(t.path)).concat((e=t.parameters,Object.keys(e).map((function(t){return";".concat(tv(t),"=").concat(tv(e[t]))})).join("")));var e}var rv=/^[^\/()?;=#]+/;function av(t){var e=t.match(rv);return e?e[0]:""}var ov=/^[^=?&#]+/,sv=/^[^?&#]+/,uv=function(){function t(e){y(this,t),this.url=e,this.remaining=e}return b(t,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Um([],{}):new Um([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Um(t,e)),n}},{key:"parseSegment",value:function(){var t=av(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(t),new Wm(ev(t),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t}},{key:"parseParam",value:function(t){var e=av(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=av(this.remaining);i&&this.capture(n=i)}t[ev(e)]=ev(n)}}},{key:"parseQueryParam",value:function(t){var e,n=(e=this.remaining.match(ov))?e[0]:"";if(n){this.capture(n);var i="";if(this.consumeOptional("=")){var r=function(t){var e=t.match(sv);return e?e[0]:""}(this.remaining);r&&this.capture(i=r)}var a=nv(n),o=nv(i);if(t.hasOwnProperty(a)){var s=t[a];Array.isArray(s)||(t[a]=s=[s]),s.push(o)}else t[a]=o}}},{key:"parseParens",value:function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=av(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r=Em);var a=this.parseChildren();e[r]=1===Object.keys(a).length?a.primary:new Um([],a),this.consumeOptional("//")}return e}},{key:"peekStartsWith",value:function(t){return this.remaining.startsWith(t)}},{key:"consumeOptional",value:function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}},{key:"capture",value:function(t){if(!this.consumeOptional(t))throw new Error('Expected "'.concat(t,'".'))}}]),t}(),lv=function(){function t(e){y(this,t),this._root=e}return b(t,[{key:"parent",value:function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}},{key:"children",value:function(t){var e=cv(t,this._root);return e?e.children.map((function(t){return t.value})):[]}},{key:"firstChild",value:function(t){var e=cv(t,this._root);return e&&e.children.length>0?e.children[0].value:null}},{key:"siblings",value:function(t){var e=hv(t,this._root);return e.length<2?[]:e[e.length-2].children.map((function(t){return t.value})).filter((function(e){return e!==t}))}},{key:"pathFromRoot",value:function(t){return hv(t,this._root).map((function(t){return t.value}))}},{key:"root",get:function(){return this._root.value}}]),t}();function cv(t,e){if(t===e.value)return e;var n,i=h(e.children);try{for(i.s();!(n=i.n()).done;){var r=cv(t,n.value);if(r)return r}}catch(a){i.e(a)}finally{i.f()}return null}function hv(t,e){if(t===e.value)return[e];var n,i=h(e.children);try{for(i.s();!(n=i.n()).done;){var r=hv(t,n.value);if(r.length)return r.unshift(e),r}}catch(a){i.e(a)}finally{i.f()}return[]}var dv=function(){function t(e,n){y(this,t),this.value=e,this.children=n}return b(t,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),t}();function fv(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var pv=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).snapshot=i,kv(a(r),t),r}return b(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(lv);function mv(t,e){var n=function(t,e){var n=new _v([],{},{},"",{},Em,e,null,t.root,-1,{});return new bv("",new dv(n,[]))}(t,e),i=new bp([new Wm("",{})]),r=new bp({}),a=new bp({}),o=new bp({}),s=new bp(""),u=new vv(i,r,o,s,a,Em,e,n.root);return u.snapshot=n.root,new pv(new dv(u,[]),n)}var vv=function(){function t(e,n,i,r,a,o,s,u){y(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this._futureSnapshot=u}return b(t,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(Y((function(t){return Im(t)})))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Y((function(t){return Im(t)})))),this._queryParamMap}}]),t}();function gv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=t.pathFromRoot,i=0;if("always"!==e)for(i=n.length-1;i>=1;){var r=n[i],a=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(a.component)break;i--}}return yv(n.slice(i))}function yv(t){return t.reduce((function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}var _v=function(){function t(e,n,i,r,a,o,s,u,l,c,h){y(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this.routeConfig=u,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}return b(t,[{key:"toString",value:function(){var t=this.url.map((function(t){return t.toString()})).join("/"),e=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(t,"', path:'").concat(e,"')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=Im(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Im(this.queryParams)),this._queryParamMap}}]),t}(),bv=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,i)).url=t,kv(a(r),i),r}return b(n,[{key:"toString",value:function(){return wv(this._root)}}]),n}(lv);function kv(t,e){e.value._routerState=t,e.children.forEach((function(e){return kv(t,e)}))}function wv(t){var e=t.children.length>0?" { ".concat(t.children.map(wv).join(", ")," } "):"";return"".concat(t.value).concat(e)}function Cv(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Rm(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Rm(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;nr;){if(a-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new Rv(i,!1,r-a)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(a,e,t),s=o.processChildren?Fv(o.segmentGroup,o.index,a.commands):Mv(o.segmentGroup,o.index,a.commands);return Iv(o.segmentGroup,s,e,i,r)}function Av(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Iv(t,e,n,i,r){var a={};return i&&Lm(i,(function(t,e){a[e]=Array.isArray(t)?t.map((function(t){return"".concat(t)})):"".concat(t)})),new Hm(n.root===t?e:Ov(n.root,t,e),a,r)}function Ov(t,e,n){var i={};return Lm(t.children,(function(t,r){i[r]=t===e?n:Ov(t,e,n)})),new Um(t.segments,i)}var Tv=function(){function t(e,n,i){if(y(this,t),this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=i,e&&i.length>0&&Av(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find((function(t){return"object"==typeof t&&null!=t&&t.outlets}));if(r&&r!==Fm(i))throw new Error("{outlets:{}} has to be the last command")}return b(t,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),t}(),Rv=function t(e,n,i){y(this,t),this.segmentGroup=e,this.processChildren=n,this.index=i};function Pv(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:"".concat(t)}function Mv(t,e,n){if(t||(t=new Um([],{})),0===t.segments.length&&t.hasChildren())return Fv(t,e,n);var i=function(t,e,n){for(var i=0,r=e,a={match:!1,pathIndex:0,commandIndex:0};r=n.length)return a;var o=t.segments[r],s=Pv(n[i]),u=i0&&void 0===s)break;if(s&&u&&"object"==typeof u&&void 0===u.outlets){if(!Bv(s,u,o))return a;i+=2}else{if(!Bv(s,{},o))return a;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex=2&&(n=!0),function(i){return i.lift(new Qp(t,e,n))}}((function(t,e){var n=!1;return e.reduce((function(t,i,r){if(t!==qv)return t;if(i===qv&&(n=!0),!n){if(!1===i)return i;if(r===e.length-1||Wv(i))return i}return t}),t)}),qv),Vf((function(t){return t!==qv})),Y((function(t){return Wv(t)?t:!0===t})),Gp(1))}))}var Gv=function t(e){y(this,t),this.segmentGroup=e||null},Kv=function t(e){y(this,t),this.urlTree=e};function Zv(t){return new V((function(e){return e.error(new Gv(t))}))}function $v(t){return new V((function(e){return e.error(new Kv(t))}))}function Xv(t){return new V((function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(t,"'")))}))}var Qv=function(){function t(e,n,i,r,a){y(this,t),this.configLoader=n,this.urlSerializer=i,this.urlTree=r,this.config=a,this.allowRedirects=!0,this.ngModule=e.get(be)}return b(t,[{key:"apply",value:function(){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,Em).pipe(Y((function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)}))).pipe(tm((function(e){if(e instanceof Kv)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof Gv)throw t.noMatchError(e);throw e})))}},{key:"match",value:function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,Em).pipe(Y((function(n){return e.createUrlTree(n,t.queryParams,t.fragment)}))).pipe(tm((function(t){if(t instanceof Gv)throw e.noMatchError(t);throw t})))}},{key:"noMatchError",value:function(t){return new Error("Cannot match any routes. URL Segment: '".concat(t.segmentGroup,"'"))}},{key:"createUrlTree",value:function(t,e,n){var i=t.segments.length>0?new Um([],c({},Em,t)):t;return new Hm(i,e,n)}},{key:"expandSegmentGroup",value:function(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(Y((function(t){return new Um([],t)}))):this.expandSegment(t,n,e,n.segments,i,!0)}},{key:"expandChildren",value:function(t,e,n){var i=this;return function(n,r){if(0===Object.keys(n).length)return Lf({});var a=[],o=[],s={};return Lm(n,(function(n,r){var u,l,c=(u=r,l=n,i.expandSegmentGroup(t,e,l,u)).pipe(Y((function(t){return s[r]=t})));r===Em?a.push(c):o.push(c)})),Lf.apply(null,a.concat(o)).pipe(Rp(),function(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Vf((function(e,n){return t(e,n,i)})):L,Mp(1),n?zp(e):Np((function(){return new Ap})))}}(),Y((function(){return s})))}(n.children)}},{key:"expandSegment",value:function(t,e,n,i,r,a){var o=this;return Lf.apply(void 0,l(n)).pipe(Nf((function(s){return o.expandSegmentAgainstRoute(t,e,n,s,i,r,a).pipe(tm((function(t){if(t instanceof Gv)return Lf(null);throw t})))})),im((function(t){return!!t})),tm((function(t,n){if(t instanceof Ap||"EmptyError"===t.name){if(o.noLeftoversInUrl(e,i,r))return Lf(new Um([],{}));throw new Gv(e)}throw t})))}},{key:"noLeftoversInUrl",value:function(t,e,n){return 0===e.length&&!t.children[n]}},{key:"expandSegmentAgainstRoute",value:function(t,e,n,i,r,a,o){return ng(i)!==a?Zv(e):void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,a):Zv(e)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,a){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,a):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,a)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(t,e,n,i){var r=this,a=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?$v(a):this.lineralizeSegments(n,a).pipe(ot((function(n){var a=new Um(n,{});return r.expandSegment(t,a,e,n,i,!1)})))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,a){var o=this,s=Jv(e,i,r),u=s.consumedSegments,l=s.lastChild,c=s.positionalParamSegments;if(!s.matched)return Zv(e);var h=this.applyRedirectCommands(u,i.redirectTo,c);return i.redirectTo.startsWith("/")?$v(h):this.lineralizeSegments(i,h).pipe(ot((function(i){return o.expandSegment(t,e,n,i.concat(r.slice(l)),a,!1)})))}},{key:"matchSegmentAgainstRoute",value:function(t,e,n,i){var r=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(Y((function(t){return n._loadedConfig=t,new Um(i,{})}))):Lf(new Um(i,{}));var a=Jv(e,n,i),o=a.consumedSegments,s=a.lastChild;if(!a.matched)return Zv(e);var u=i.slice(s);return this.getChildConfig(t,n,i).pipe(ot((function(t){var n=t.module,i=t.routes,a=function(t,e,n,i){return n.length>0&&function(t,e,n){return n.some((function(n){return eg(t,e,n)&&ng(n)!==Em}))}(t,n,i)?{segmentGroup:tg(new Um(e,function(t,e){var n={};n.primary=e;var i,r=h(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;""===a.path&&ng(a)!==Em&&(n[ng(a)]=new Um([],{}))}}catch(o){r.e(o)}finally{r.f()}return n}(i,new Um(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some((function(n){return eg(t,e,n)}))}(t,n,i)?{segmentGroup:tg(new Um(t.segments,function(t,e,n,i){var r,a={},o=h(n);try{for(o.s();!(r=o.n()).done;){var s=r.value;eg(t,e,s)&&!i[ng(s)]&&(a[ng(s)]=new Um([],{}))}}catch(u){o.e(u)}finally{o.f()}return Object.assign(Object.assign({},i),a)}(t,n,i,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,o,u,i),s=a.segmentGroup,l=a.slicedSegments;return 0===l.length&&s.hasChildren()?r.expandChildren(n,i,s).pipe(Y((function(t){return new Um(o,t)}))):0===i.length&&0===l.length?Lf(new Um(o,{})):r.expandSegment(n,s,i,l,Em,!0).pipe(Y((function(t){return new Um(o.concat(t.segments),t.children)})))})))}},{key:"getChildConfig",value:function(t,e,n){var i=this;return e.children?Lf(new Hv(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Lf(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(ot((function(n){return n?i.configLoader.load(t.injector,e).pipe(Y((function(t){return e._loadedConfig=t,t}))):function(t){return new V((function(e){return e.error(Om("Cannot load children because the guard of the route \"path: '".concat(t.path,"'\" returned false")))}))}(e)}))):Lf(new Hv([],t))}},{key:"runCanLoadGuards",value:function(t,e,n){var i=this,r=e.canLoad;return r&&0!==r.length?Lf(r.map((function(i){var r,a=t.get(i);if(function(t){return t&&Uv(t.canLoad)}(a))r=a.canLoad(e,n);else{if(!Uv(a))throw new Error("Invalid CanLoad guard");r=a(e,n)}return Nm(r)}))).pipe(Yv(),am((function(t){if(Wv(t)){var e=Om('Redirecting to "'.concat(i.urlSerializer.serialize(t),'"'));throw e.url=t,e}})),Y((function(t){return!0===t}))):Lf(!0)}},{key:"lineralizeSegments",value:function(t,e){for(var n=[],i=e.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Lf(n);if(i.numberOfChildren>1||!i.children.primary)return Xv(t.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}},{key:"applyRedirectCreatreUrlTree",value:function(t,e,n,i){var r=this.createSegmentGroup(t,e.root,n,i);return new Hm(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}},{key:"createQueryParams",value:function(t,e){var n={};return Lm(t,(function(t,i){if("string"==typeof t&&t.startsWith(":")){var r=t.substring(1);n[i]=e[r]}else n[i]=t})),n}},{key:"createSegmentGroup",value:function(t,e,n,i){var r=this,a=this.createSegments(t,e.segments,n,i),o={};return Lm(e.children,(function(e,a){o[a]=r.createSegmentGroup(t,e,n,i)})),new Um(a,o)}},{key:"createSegments",value:function(t,e,n,i){var r=this;return e.map((function(e){return e.path.startsWith(":")?r.findPosParam(t,e,i):r.findOrReturn(e,n)}))}},{key:"findPosParam",value:function(t,e,n){var i=n[e.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(t,"'. Cannot find '").concat(e.path,"'."));return i}},{key:"findOrReturn",value:function(t,e){var n,i=0,r=h(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.path===t.path)return e.splice(i),a;i++}}catch(o){r.e(o)}finally{r.f()}return t}}]),t}();function Jv(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var i=(e.matcher||Tm)(n,t,e);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function tg(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new Um(t.segments.concat(e.segments),e.children)}return t}function eg(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function ng(t){return t.outlet||Em}var ig=function t(e){y(this,t),this.path=e,this.route=this.path[this.path.length-1]},rg=function t(e,n){y(this,t),this.component=e,this.route=n};function ag(t,e,n){var i=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function og(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},a=fv(e);return t.children.forEach((function(t){sg(t,a[t.value.outlet],n,i.concat([t.value]),r),delete a[t.value.outlet]})),Lm(a,(function(t,e){return lg(t,n.getContext(e),r)})),r}function sg(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},a=t.value,o=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(o&&a.routeConfig===o.routeConfig){var u=ug(o,a,a.routeConfig.runGuardsAndResolvers);u?r.canActivateChecks.push(new ig(i)):(a.data=o.data,a._resolvedData=o._resolvedData),og(t,e,a.component?s?s.children:null:n,i,r),u&&s&&s.outlet&&s.outlet.isActivated&&r.canDeactivateChecks.push(new rg(s.outlet.component,o))}else o&&lg(e,s,r),r.canActivateChecks.push(new ig(i)),og(t,null,a.component?s?s.children:null:n,i,r);return r}function ug(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!qm(t.url,e.url);case"pathParamsOrQueryParamsChange":return!qm(t.url,e.url)||!Rm(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xv(t,e)||!Rm(t.queryParams,e.queryParams);case"paramsChange":default:return!xv(t,e)}}function lg(t,e,n){var i=fv(t),r=t.value;Lm(i,(function(t,i){lg(t,r.component?e?e.children.getContext(i):null:e,n)})),n.canDeactivateChecks.push(new rg(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function cg(t,e){return null!==t&&e&&e(new xm(t)),Lf(!0)}function hg(t,e){return null!==t&&e&&e(new wm(t)),Lf(!0)}function dg(t,e,n){var i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Lf(i.map((function(i){return Tp((function(){var r,a=ag(i,e,n);if(function(t){return t&&Uv(t.canActivate)}(a))r=Nm(a.canActivate(e,t));else{if(!Uv(a))throw new Error("Invalid CanActivate guard");r=Nm(a(e,t))}return r.pipe(im())}))}))).pipe(Yv()):Lf(!0)}function fg(t,e,n){var i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map((function(t){return function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)})).filter((function(t){return null!==t})).map((function(e){return Tp((function(){return Lf(e.guards.map((function(r){var a,o=ag(r,e.node,n);if(function(t){return t&&Uv(t.canActivateChild)}(o))a=Nm(o.canActivateChild(i,t));else{if(!Uv(o))throw new Error("Invalid CanActivateChild guard");a=Nm(o(i,t))}return a.pipe(im())}))).pipe(Yv())}))}));return Lf(r).pipe(Yv())}var pg=function t(){y(this,t)},mg=function(){function t(e,n,i,r,a,o){y(this,t),this.rootComponentType=e,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=o}return b(t,[{key:"recognize",value:function(){try{var t=yg(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,Em),n=new _v([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Em,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new dv(n,e),r=new bv(this.url,i);return this.inheritParamsAndData(r._root),Lf(r)}catch(a){return new V((function(t){return t.error(a)}))}}},{key:"inheritParamsAndData",value:function(t){var e=this,n=t.value,i=gv(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),t.children.forEach((function(t){return e.inheritParamsAndData(t)}))}},{key:"processSegmentGroup",value:function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}},{key:"processChildren",value:function(t,e){var n,i=this,r=Ym(e,(function(e,n){return i.processSegmentGroup(t,e,n)}));return n={},r.forEach((function(t){var e=n[t.value.outlet];if(e){var i=e.url.map((function(t){return t.toString()})).join("/"),r=t.value.url.map((function(t){return t.toString()})).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(i,"' and '").concat(r,"'."))}n[t.value.outlet]=t.value})),r.sort((function(t,e){return t.value.outlet===Em?-1:e.value.outlet===Em?1:t.value.outlet.localeCompare(e.value.outlet)})),r}},{key:"processSegment",value:function(t,e,n,i){var r,a=h(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;try{return this.processSegmentAgainstRoute(o,e,n,i)}catch(s){if(!(s instanceof pg))throw s}}}catch(u){a.e(u)}finally{a.f()}if(this.noLeftoversInUrl(e,n,i))return[];throw new pg}},{key:"noLeftoversInUrl",value:function(t,e,n){return 0===e.length&&!t.children[n]}},{key:"processSegmentAgainstRoute",value:function(t,e,n,i){if(t.redirectTo)throw new pg;if((t.outlet||Em)!==i)throw new pg;var r,a=[],o=[];if("**"===t.path){var s=n.length>0?Fm(n).parameters:{};r=new _v(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,kg(t),i,t.component,t,vg(e),gg(e)+n.length,wg(t))}else{var u=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new pg;return{consumedSegments:[],lastChild:0,parameters:{}}}var i=(e.matcher||Tm)(n,t,e);if(!i)throw new pg;var r={};Lm(i.posParams,(function(t,e){r[e]=t.path}));var a=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:a}}(e,t,n);a=u.consumedSegments,o=n.slice(u.lastChild),r=new _v(a,u.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,kg(t),i,t.component,t,vg(e),gg(e)+a.length,wg(t))}var l=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),c=yg(e,a,o,l,this.relativeLinkResolution),h=c.segmentGroup,d=c.slicedSegments;if(0===d.length&&h.hasChildren()){var f=this.processChildren(l,h);return[new dv(r,f)]}if(0===l.length&&0===d.length)return[new dv(r,[])];var p=this.processSegment(l,h,d,Em);return[new dv(r,p)]}}]),t}();function vg(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function gg(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function yg(t,e,n,i,r){if(n.length>0&&function(t,e,n){return n.some((function(n){return _g(t,e,n)&&bg(n)!==Em}))}(t,n,i)){var a=new Um(e,function(t,e,n,i){var r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;var a,o=h(n);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(""===s.path&&bg(s)!==Em){var u=new Um([],{});u._sourceSegment=t,u._segmentIndexShift=e.length,r[bg(s)]=u}}}catch(l){o.e(l)}finally{o.f()}return r}(t,e,i,new Um(n,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some((function(n){return _g(t,e,n)}))}(t,n,i)){var o=new Um(t.segments,function(t,e,n,i,r,a){var o,s={},u=h(i);try{for(u.s();!(o=u.n()).done;){var l=o.value;if(_g(t,n,l)&&!r[bg(l)]){var c=new Um([],{});c._sourceSegment=t,c._segmentIndexShift="legacy"===a?t.segments.length:e.length,s[bg(l)]=c}}}catch(d){u.e(d)}finally{u.f()}return Object.assign(Object.assign({},r),s)}(t,e,n,i,t.children,r));return o._sourceSegment=t,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:n}}var s=new Um(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function _g(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function bg(t){return t.outlet||Em}function kg(t){return t.data||{}}function wg(t){return t.resolve||{}}function Cg(t){return function(e){return e.pipe(Wp((function(e){var n=t(e);return n?nt(n).pipe(Y((function(){return e}))):nt([e])})))}}var xg=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(function(){function t(){y(this,t)}return b(t,[{key:"shouldDetach",value:function(t){return!1}},{key:"store",value:function(t,e){}},{key:"shouldAttach",value:function(t){return!1}},{key:"retrieve",value:function(t){return null}},{key:"shouldReuseRoute",value:function(t,e){return t.routeConfig===e.routeConfig}}]),t}()),Sg=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&ys(0,"router-outlet")},directives:function(){return[Wg]},encapsulation:2}),t}();function Dg(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy").recognize()}(t,n,i.urlAfterRedirects,(o=i.urlAfterRedirects,e.serializeUrl(o)),r,a).pipe(Y((function(t){return Object.assign(Object.assign({},i),{targetSnapshot:t})})));var o})))}}(e.rootComponentType,e.config,0,e.paramsInheritanceStrategy,e.relativeLinkResolution),am((function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)})),am((function(t){var i=new mm(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.next(i)})));if(s&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var u=t.extractedUrl,l=t.source,c=t.restoredState,h=t.extras,d=new hm(t.id,e.serializeUrl(u),l,c);n.next(d);var f=mv(u,e.rootComponentType).snapshot;return Lf(Object.assign(Object.assign({},t),{targetSnapshot:f,urlAfterRedirects:u,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),Ip})),Cg((function(t){var n=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})})),am((function(t){var n=new vm(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)})),Y((function(t){return Object.assign(Object.assign({},t),{guards:(n=t.targetSnapshot,i=t.currentSnapshot,r=e.rootContexts,a=n._root,og(a,i?i._root:null,r,[a.value]))});var n,i,r,a})),function(t,e){return function(n){return n.pipe(ot((function(n){var i=n.targetSnapshot,r=n.currentSnapshot,a=n.guards,o=a.canActivateChecks,s=a.canDeactivateChecks;return 0===s.length&&0===o.length?Lf(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return nt(t).pipe(ot((function(t){return function(t,e,n,i,r){var a=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return a&&0!==a.length?Lf(a.map((function(a){var o,s=ag(a,e,r);if(function(t){return t&&Uv(t.canDeactivate)}(s))o=Nm(s.canDeactivate(t,e,n,i));else{if(!Uv(s))throw new Error("Invalid CanDeactivate guard");o=Nm(s(t,e,n,i))}return o.pipe(im())}))).pipe(Yv()):Lf(!0)}(t.component,t.route,n,e,i)})),im((function(t){return!0!==t}),!0))}(s,i,r,t).pipe(ot((function(n){return n&&"boolean"==typeof n?function(t,e,n,i){return nt(e).pipe(Nf((function(e){return nt([hg(e.route.parent,i),cg(e.route,i),fg(t,e.path,n),dg(t,e.route,n)]).pipe(Rp(),im((function(t){return!0!==t}),!0))})),im((function(t){return!0!==t}),!0))}(i,o,t,e):Lf(n)})),Y((function(t){return Object.assign(Object.assign({},n),{guardsResult:t})})))})))}}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),am((function(t){if(Wv(t.guardsResult)){var n=Om('Redirecting to "'.concat(e.serializeUrl(t.guardsResult),'"'));throw n.url=t.guardsResult,n}})),am((function(t){var n=new gm(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(n)})),Vf((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var i=new fm(t.id,e.serializeUrl(t.extractedUrl),"");return n.next(i),t.resolve(!1),!1}return!0})),Cg((function(t){if(t.guards.canActivateChecks.length)return Lf(t).pipe(am((function(t){var n=new ym(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)})),Wp((function(t){var i,r,a=!1;return Lf(t).pipe((i=e.paramsInheritanceStrategy,r=e.ngModule.injector,function(t){return t.pipe(ot((function(t){var e=t.targetSnapshot,n=t.guards.canActivateChecks;if(!n.length)return Lf(t);var a=0;return nt(n).pipe(Nf((function(t){return function(t,e,n,i){return function(t,e,n,i){var r=Object.keys(t);if(0===r.length)return Lf({});var a={};return nt(r).pipe(ot((function(r){return function(t,e,n,i){var r=ag(t,e,i);return Nm(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(am((function(t){a[r]=t})))})),Mp(1),ot((function(){return Object.keys(a).length===r.length?Lf(a):Ip})))}(t._resolve,t,e,i).pipe(Y((function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),gv(t,n).resolve),null})))}(t.route,e,i,r)})),am((function(){return a++})),Mp(1),ot((function(e){return a===n.length?Lf(t):Ip})))})))}),am({next:function(){return a=!0},complete:function(){if(!a){var i=new fm(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");n.next(i),t.resolve(!1)}}}))})),am((function(t){var n=new _m(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)})))})),Cg((function(t){var n=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})})),Y((function(t){var n,i,r,a=(r=Sv(e.routeReuseStrategy,(n=t.targetSnapshot)._root,(i=t.currentRouterState)?i._root:void 0),new pv(r,n));return Object.assign(Object.assign({},t),{targetRouterState:a})})),am((function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)})),(r=e.rootContexts,a=e.routeReuseStrategy,o=function(t){return e.triggerEvent(t)},Y((function(t){return new jv(a,t.targetRouterState,t.currentRouterState,o).activate(r),t}))),am({next:function(){s=!0},complete:function(){s=!0}}),(i=function(){if(!s&&!u){e.resetUrlToCurrentUrlTree();var i=new fm(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID ".concat(t.id," is not equal to the current navigation id ").concat(e.navigationId));n.next(i),t.resolve(!1)}e.currentNavigation=null},function(t){return t.lift(new um(i))}),tm((function(i){if(u=!0,(s=i)&&s.ngNavigationCancelingError){var r=Wv(i.url);r||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var a=new fm(t.id,e.serializeUrl(t.extractedUrl),i.message);n.next(a),r?setTimeout((function(){var n=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);return e.scheduleNavigation(n,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})}),0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var o=new pm(t.id,e.serializeUrl(t.extractedUrl),i);n.next(o);try{t.resolve(e.errorHandler(i))}catch(l){t.reject(l)}}var s;return Ip})))})))}},{key:"resetRootComponentType",value:function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}},{key:"setTransition",value:function(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe((function(e){var n=t.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,n)&&setTimeout((function(){var e=n.source,i=n.state,r=n.urlTree,a={replaceUrl:!0};if(i){var o=Object.assign({},i);delete o.navigationId,0!==Object.keys(o).length&&(a.state=o)}t.scheduleNavigation(r,e,i,a)}),0),t.lastLocationChangeInfo=n})))}},{key:"extractLocationChangeInfoFromEvent",value:function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(t,e){if(!t)return!0;var n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(t){this.events.next(t)}},{key:"resetConfig",value:function(t){Dg(t),this.config=t.map(Ig),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}},{key:"createUrlTree",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.relativeTo,i=e.queryParams,r=e.fragment,a=e.preserveQueryParams,o=e.queryParamsHandling,s=e.preserveFragment;ar()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var u=n||this.routerState.root,l=s?this.currentUrlTree.fragment:r,c=null;if(o)switch(o){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}else c=a?this.currentUrlTree.queryParams:i||null;return null!==c&&(c=this.removeEmptyProps(c)),Ev(u,this.currentUrlTree,t,c,l)}},{key:"navigateByUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};ar()&&this.isNgZoneEnabled&&!mc.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=Wv(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}},{key:"navigate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return Bg(t),this.navigateByUrl(this.createUrlTree(t,e),e)}},{key:"serializeUrl",value:function(t){return this.urlSerializer.serialize(t)}},{key:"parseUrl",value:function(t){var e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}},{key:"isActive",value:function(t,e){if(Wv(t))return Vm(this.currentUrlTree,t,e);var n=this.parseUrl(t);return Vm(this.currentUrlTree,n,e)}},{key:"removeEmptyProps",value:function(t){return Object.keys(t).reduce((function(e,n){var i=t[n];return null!=i&&(e[n]=i),e}),{})}},{key:"processNavigations",value:function(){var t=this;this.navigations.subscribe((function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new dm(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)}),(function(e){t.console.warn("Unhandled Navigation Error: ")}))}},{key:"scheduleNavigation",value:function(t,e,n,i,r){var a,o,s,u=this.getTransition(),l="imperative"!==e&&"imperative"===(null==u?void 0:u.source),c=(this.lastSuccessfulId===u.id||this.currentNavigation?u.rawUrl:u.urlAfterRedirects).toString()===t.toString();if(l&&c)return Promise.resolve(!0);r?(a=r.resolve,o=r.reject,s=r.promise):s=new Promise((function(t,e){a=t,o=e}));var h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:a,reject:o,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch((function(t){return Promise.reject(t)}))}},{key:"setBrowserUrl",value:function(t,e,n,i){var r=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Io),pe(Gm),pe(Pg),pe(ch),pe(qo),pe(Vc),pe(dc),pe(void 0))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}();function Bg(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};y(this,t),this.router=e,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return b(t,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var t=this;return this.router.events.subscribe((function(e){e instanceof hm?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof dm&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))}))}},{key:"consumeScrollEvents",value:function(){var t=this;return this.router.events.subscribe((function(e){e instanceof Dm&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))}))}},{key:"scheduleScrollEvent",value:function(t,e){this.router.triggerEvent(new Dm(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Vg),pe(Jd),pe(void 0))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),Xg=new re("ROUTER_CONFIGURATION"),Qg=new re("ROUTER_FORROOT_GUARD"),Jg=[ch,{provide:Gm,useClass:Km},{provide:Vg,useFactory:function(t,e,n,i,r,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},u=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0,c=new Vg(null,t,e,n,i,r,a,Mm(o));if(u&&(c.urlHandlingStrategy=u),l&&(c.routeReuseStrategy=l),s.errorHandler&&(c.errorHandler=s.errorHandler),s.malformedUriErrorHandler&&(c.malformedUriErrorHandler=s.malformedUriErrorHandler),s.enableTracing){var h=Gc();c.events.subscribe((function(t){h.logGroup("Router Event: ".concat(t.constructor.name)),h.log(t.toString()),h.log(t),h.logGroupEnd()}))}return s.onSameUrlNavigation&&(c.onSameUrlNavigation=s.onSameUrlNavigation),s.paramsInheritanceStrategy&&(c.paramsInheritanceStrategy=s.paramsInheritanceStrategy),s.urlUpdateStrategy&&(c.urlUpdateStrategy=s.urlUpdateStrategy),s.relativeLinkResolution&&(c.relativeLinkResolution=s.relativeLinkResolution),c},deps:[Gm,Pg,ch,qo,Vc,dc,Og,Xg,[function t(){y(this,t)},new Ct],[function t(){y(this,t)},new Ct]]},Pg,{provide:vv,useFactory:function(t){return t.routerState.root},deps:[Vg]},{provide:Vc,useClass:zc},Zg,Kg,Gg,{provide:Xg,useValue:{enableTracing:!1}}];function ty(){return new Ic("Router",Vg)}var ey=function(){var t=function(){function t(e,n){y(this,t)}return b(t,null,[{key:"forRoot",value:function(e,n){return{ngModule:t,providers:[Jg,ay(e),{provide:Qg,useFactory:ry,deps:[[Vg,new Ct,new St]]},{provide:Xg,useValue:n||{}},{provide:ah,useFactory:iy,deps:[$c,[new wt(sh),new Ct],Xg]},{provide:$g,useFactory:ny,deps:[Vg,Jd,Xg]},{provide:Yg,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Kg},{provide:Ic,multi:!0,useFactory:ty},[oy,{provide:Kl,multi:!0,useFactory:sy,deps:[oy]},{provide:ly,useFactory:uy,deps:[oy]},{provide:ec,multi:!0,useExisting:ly}]]}}},{key:"forChild",value:function(e){return{ngModule:t,providers:[ay(e)]}}}]),t}();return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(pe(Qg,8),pe(Vg,8))}}),t}();function ny(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new $g(t,e,n)}function iy(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new lh(t,e):new uh(t,e)}function ry(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function ay(t){return[{provide:Yo,multi:!0,useValue:t},{provide:Og,multi:!0,useValue:t}]}var oy=function(){var t=function(){function t(e){y(this,t),this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new U}return b(t,[{key:"appInitializer",value:function(){var t=this;return this.injector.get(Qc,Promise.resolve(null)).then((function(){var e=null,n=new Promise((function(t){return e=t})),i=t.injector.get(Vg),r=t.injector.get(Xg);if(t.isLegacyDisabled(r)||t.isLegacyEnabled(r))e(!0);else if("disabled"===r.initialNavigation)i.setUpLocationChangeListener(),e(!0);else{if("enabled"!==r.initialNavigation)throw new Error("Invalid initialNavigation options: '".concat(r.initialNavigation,"'"));i.hooks.afterPreactivation=function(){return t.initNavigation?Lf(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},i.initialNavigation()}return n}))}},{key:"bootstrapListener",value:function(t){var e=this.injector.get(Xg),n=this.injector.get(Zg),i=this.injector.get($g),r=this.injector.get(Vg),a=this.injector.get(Lc);t===a.components[0]&&(this.isLegacyEnabled(e)?r.initialNavigation():this.isLegacyDisabled(e)&&r.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),r.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}},{key:"isLegacyEnabled",value:function(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}},{key:"isLegacyDisabled",value:function(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(qo))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}();function sy(t){return t.appInitializer.bind(t)}function uy(t){return t.bootstrapListener.bind(t)}var ly=new re("Router Initializer"),cy=function(){function t(t){this.user=t.user,this.role=t.role,this.admin=t.admin}return Object.defineProperty(t.prototype,"isStaff",{get:function(){return"staff"===this.role||"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdmin",{get:function(){return"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogged",{get:function(){return null!=this.user},enumerable:!1,configurable:!0}),t}();function hy(t){return null!=t&&"false"!=="".concat(t)}function dy(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return fy(t)?Number(t):e}function fy(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function py(t){return Array.isArray(t)?t:[t]}function my(t){return null==t?"":"string"==typeof t?t:"".concat(t,"px")}function vy(t){return t instanceof ku?t.nativeElement:t}function gy(t,e,n,i){return x(n)&&(i=n,n=void 0),i?gy(t,e,n).pipe(Y((function(t){return w(t)?i.apply(void 0,l(t)):i(t)}))):new V((function(i){yy(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)}))}function yy(t,e,n,i,r){var a;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var o=t;t.addEventListener(e,n,r),a=function(){return o.removeEventListener(e,n,r)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),a=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var u=t;t.addListener(e,n),a=function(){return u.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var l=0,c=t.length;l1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value:function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){f(n,t);var e=g(n);function n(t,i){return y(this,n),e.call(this)}return b(n,[{key:"schedule",value:function(t){return this}}]),n}(D)),by=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;y(this,t),this.SchedulerAction=e,this.now=n}return b(t,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,t).schedule(n,e)}}]),t}();return t.now=function(){return Date.now()},t}(),ky=function(t){f(n,t);var e=g(n);function n(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:by.now;return y(this,n),(i=e.call(this,t,(function(){return n.delegate&&n.delegate!==a(i)?n.delegate.now():r()}))).actions=[],i.active=!1,i.scheduled=void 0,i}return b(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(t,e,a):r(i(n.prototype),"schedule",this).call(this,t,e,a)}},{key:"flush",value:function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}}]),n}(by),wy=1,Cy=function(){return Promise.resolve()}(),xy={};function Sy(t){return t in xy&&(delete xy[t],!0)}var Dy=function(t){var e=wy++;return xy[e]=!0,Cy.then((function(){return Sy(e)&&t()})),e},Ey=function(t){Sy(t)},Ay=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return b(n,[{key:"requestAsyncId",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==a&&a>0?r(i(n.prototype),"requestAsyncId",this).call(this,t,e,a):(t.actions.push(this),t.scheduled||(t.scheduled=Dy(t.flush.bind(t,null))))}},{key:"recycleAsyncId",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==a&&a>0||null===a&&this.delay>0)return r(i(n.prototype),"recycleAsyncId",this).call(this,t,e,a);0===t.actions.length&&(Ey(e),t.scheduled=void 0)}}]),n}(_y),Iy=new(function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i=0}function Vy(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Ny(e)?i=Number(e)<1?1:Number(e):q(e)&&(n=e),q(n)||(n=Py),new V((function(e){var r=Ny(t)?t:+t-n.now();return n.schedule(By,r,{index:0,period:i,subscriber:e})}))}function By(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function jy(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Py;return My((function(){return Vy(t,e)}))}function zy(t){return function(e){return e.lift(new Hy(t))}}var Hy=function(){function t(e){y(this,t),this.notifier=e}return b(t,[{key:"call",value:function(t,e){var n=new Uy(t),i=at(this.notifier,new it(n));return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}]),t}(),Uy=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this,t)).seenValue=!1,i}return b(n,[{key:"notifyNext",value:function(){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(rt);function Wy(t,e){return new V(e?function(n){return e.schedule(qy,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function qy(t){t.subscriber.error(t.error)}var Yy,Gy=function(){var t=function(){function t(e,n,i){y(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return b(t,[{key:"observe",value:function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}},{key:"do",value:function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}},{key:"accept",value:function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Lf(this.value);case"E":return Wy(this.error);case"C":return Op()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}},{key:"createError",value:function(e){return new t("E",void 0,e)}},{key:"createComplete",value:function(){return t.completeNotification}}]),t}();return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();try{Yy="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(eW){Yy=!1}var Ky,Zy,$y,Xy,Qy,Jy=function(){var t=function t(e){y(this,t),this._platformId=e,this.isBrowser=this._platformId?"browser"===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&&!Yy)&&"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 t.\u0275fac=function(e){return new(e||t)(pe(tc))},t.\u0275prov=It({factory:function(){return new t(pe(tc))},token:t,providedIn:"root"}),t}(),t_=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),e_=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function n_(){if(Ky)return Ky;if("object"!=typeof document||!document)return Ky=new Set(e_);var t=document.createElement("input");return Ky=new Set(e_.filter((function(e){return t.setAttribute("type",e),t.type===e})))}function i_(t){return function(){if(null==Zy&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Zy=!0}}))}finally{Zy=Zy||!1}return Zy}()?t:!!t.capture}function r_(){if("object"!=typeof document||!document)return 0;if(null==$y){var t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";var n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",t.appendChild(n),document.body.appendChild(t),$y=0,0===t.scrollLeft&&(t.scrollLeft=1,$y=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return $y}function a_(t){if(function(){if(null==Qy){var t="undefined"!=typeof document?document.head:null;Qy=!(!t||!t.createShadowRoot&&!t.attachShadow)}return Qy}()){var e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}var o_=new re("cdk-dir-doc",{providedIn:"root",factory:function(){return me(Zc)}}),s_=function(){var t=function(){function t(e){if(y(this,t),this.value="ltr",this.change=new xl,e){var n=(e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null);this.value="ltr"===n||"rtl"===n?n:"ltr"}}return b(t,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(o_,8))},t.\u0275prov=It({factory:function(){return new t(pe(o_,8))},token:t,providedIn:"root"}),t}(),u_=function(){var t=function(){function t(){y(this,t),this._dir="ltr",this._isInitialized=!1,this.change=new xl}return b(t,[{key:"ngAfterContentInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){this.change.complete()}},{key:"dir",get:function(){return this._dir},set:function(t){var e=this._dir,n=t?t.toLowerCase():t;this._rawDir=t,this._dir="ltr"===n||"rtl"===n?n:"ltr",e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)}},{key:"value",get:function(){return this.dir}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","dir",""]],hostVars:1,hostBindings:function(t,e){2&t&&us("dir",e._rawDir)},inputs:{dir:"dir"},outputs:{change:"dirChange"},exportAs:["dir"],features:[vu([{provide:s_,useExisting:t}])]}),t}(),l_=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),c_=function t(){y(this,t)};function h_(t){return t&&"function"==typeof t.connect}var d_=function(){function t(){y(this,t)}return b(t,[{key:"applyChanges",value:function(t,e,n,i,r){t.forEachOperation((function(t,i,a){var o,s;if(null==t.previousIndex){var u=n(t,i,a);o=e.createEmbeddedView(u.templateRef,u.context,u.index),s=1}else null==a?(e.remove(i),s=3):(o=e.get(i),e.move(o,a),s=2);r&&r({context:null==o?void 0:o.context,operation:s,record:t})}))}},{key:"detach",value:function(){}}]),t}(),f_=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];y(this,t),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new U,i&&i.length&&(n?i.forEach((function(t){return e._markSelected(t)})):this._markSelected(i[0]),this._selectedToEmit.length=0)}return b(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new V((function(n){t._globalSubscription||t._addGlobalListener();var i=e>0?t._scrolled.pipe(jy(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){i.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}})):Lf()}},{key:"ngOnDestroy",value:function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach((function(e,n){return t.deregister(n)})),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Vf((function(t){return!t||n.indexOf(t)>-1})))}},{key:"getAncestorScrollContainers",value:function(t){var e=this,n=[];return this.scrollContainers.forEach((function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)})),n}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_scrollableContainsElement",value:function(t,e){var n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular((function(){return gy(t._getWindow().document,"scroll").subscribe((function(){return t._scrolled.next()}))}))}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(mc),pe(Jy),pe(Zc,8))},t.\u0275prov=It({factory:function(){return new t(pe(mc),pe(Jy),pe(Zc,8))},token:t,providedIn:"root"}),t}(),g_=function(){var t=function(){function t(e,n,i,r){var a=this;y(this,t),this.elementRef=e,this.scrollDispatcher=n,this.ngZone=i,this.dir=r,this._destroyed=new U,this._elementScrolled=new V((function(t){return a.ngZone.runOutsideAngular((function(){return gy(a.elementRef.nativeElement,"scroll").pipe(zy(a._destroyed)).subscribe(t)}))}))}return b(t,[{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(t){var e=this.elementRef.nativeElement,n=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=n?t.end:t.start),null==t.right&&(t.right=n?t.start:t.end),null!=t.bottom&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),n&&0!=r_()?(null!=t.left&&(t.right=e.scrollWidth-e.clientWidth-t.left),2==r_()?t.left=t.right:1==r_()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}},{key:"_applyScrollToOptions",value:function(t){var e=this.elementRef.nativeElement;!function(){if(null==Xy)if("object"==typeof document&&document||(Xy=!1),"scrollBehavior"in document.documentElement.style)Xy=!0;else{var t=Element.prototype.scrollTo;Xy=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}return Xy}()?(null!=t.top&&(e.scrollTop=t.top),null!=t.left&&(e.scrollLeft=t.left)):e.scrollTo(t)}},{key:"measureScrollOffset",value:function(t){var e="left",n="right",i=this.elementRef.nativeElement;if("top"==t)return i.scrollTop;if("bottom"==t)return i.scrollHeight-i.clientHeight-i.scrollTop;var r=this.dir&&"rtl"==this.dir.value;return"start"==t?t=r?n:e:"end"==t&&(t=r?e:n),r&&2==r_()?t==e?i.scrollWidth-i.clientWidth-i.scrollLeft:i.scrollLeft:r&&1==r_()?t==e?i.scrollLeft+i.scrollWidth-i.clientWidth:-i.scrollLeft:t==e?i.scrollLeft:i.scrollWidth-i.clientWidth-i.scrollLeft}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(v_),ds(mc),ds(s_,8))},t.\u0275dir=ze({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t}(),y_=function(){var t=function(){function t(e,n,i){var r=this;y(this,t),this._platform=e,this._change=new U,this._changeListener=function(t){r._change.next(t)},this._document=i,n.runOutsideAngular((function(){if(e.isBrowser){var t=r._getWindow();t.addEventListener("resize",r._changeListener),t.addEventListener("orientationchange",r._changeListener)}r.change().subscribe((function(){return r._updateViewportSize()}))}))}return b(t,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}},{key:"getViewportRect",value:function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=this._getDocument(),e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return t>0?this._change.pipe(jy(t)):this._change}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_updateViewportSize",value:function(){var t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Jy),pe(mc),pe(Zc,8))},t.\u0275prov=It({factory:function(){return new t(pe(Jy),pe(mc),pe(Zc,8))},token:t,providedIn:"root"}),t}(),__=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),b_=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[l_,t_,__],l_,__]}),t}(),k_=function(){function t(){y(this,t)}return b(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),w_=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this)).component=t,o.viewContainerRef=i,o.injector=r,o.componentFactoryResolver=a,o}return n}(k_),C_=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this)).templateRef=t,a.viewContainerRef=i,a.context=r,a}return b(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,r(i(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,r(i(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(k_),x_=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this)).element=t instanceof ku?t.nativeElement:t,i}return n}(k_),S_=function(){function t(){y(this,t),this._isDisposed=!1,this.attachDomPortal=null}return b(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof w_?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof C_?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof x_?(this._attachedPortal=t,this.attachDomPortal(t)):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(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),D_=function(t){f(n,t);var e=g(n);function n(t,o,s,u,l){var c,h;return y(this,n),(h=e.call(this)).outletElement=t,h._componentFactoryResolver=o,h._appRef=s,h._defaultInjector=u,h.attachDomPortal=function(t){var e=t.element,o=h._document.createComment("dom-portal");e.parentNode.insertBefore(o,e),h.outletElement.appendChild(e),r((c=a(h),i(n.prototype)),"setDisposeFn",c).call(c,(function(){o.parentNode&&o.parentNode.replaceChild(e,o)}))},h._document=l,h}return b(n,[{key:"attachComponentPortal",value:function(t){var e,n=this,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn((function(){return e.destroy()}))):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn((function(){n._appRef.detachView(e.hostView),e.destroy()}))),this.outletElement.appendChild(this._getComponentRootNode(e)),e}},{key:"attachTemplatePortal",value:function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach((function(t){return e.outletElement.appendChild(t)})),i.detectChanges(),this.setDisposeFn((function(){var t=n.indexOf(i);-1!==t&&n.remove(t)})),i}},{key:"dispose",value:function(){r(i(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(S_),E_=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){return y(this,n),e.call(this,t,i)}return n}(C_);return t.\u0275fac=function(e){return new(e||t)(ds(qu),ds(Gu))},t.\u0275dir=ze({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Zo]}),t}(),A_=function(){var t=function(t){f(n,t);var e=g(n);function n(t,o,s){var u,l;return y(this,n),(l=e.call(this))._componentFactoryResolver=t,l._viewContainerRef=o,l._isInitialized=!1,l.attached=new xl,l.attachDomPortal=function(t){var e=t.element,o=l._document.createComment("dom-portal");t.setAttachedHost(a(l)),e.parentNode.insertBefore(o,e),l._getRootNode().appendChild(e),r((u=a(l),i(n.prototype)),"setDisposeFn",u).call(u,(function(){o.parentNode&&o.parentNode.replaceChild(e,o)}))},l._document=s,l}return b(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,a=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=e.createComponent(a,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),r(i(n.prototype),"setDisposeFn",this).call(this,(function(){return o.destroy()})),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var a=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return r(i(n.prototype),"setDisposeFn",this).call(this,(function(){return e._viewContainerRef.clear()})),this._attachedPortal=t,this._attachedRef=a,this.attached.emit(a),a}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&r(i(n.prototype),"detach",this).call(this),t&&r(i(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(S_);return t.\u0275fac=function(e){return new(e||t)(ds(bu),ds(Gu),ds(Zc))},t.\u0275dir=ze({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Zo]}),t}(),I_=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(A_);return t.\u0275fac=function(e){return O_(e||t)},t.\u0275dir=ze({type:t,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[vu([{provide:A_,useExisting:t}]),Zo]}),t}(),O_=Ui(I_),T_=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),R_=function(){function t(e,n){y(this,t),this.predicate=e,this.inclusive=n}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new P_(t,this.predicate,this.inclusive))}}]),t}(),P_=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t)).predicate=i,a.inclusive=r,a.index=0,a}return b(n,[{key:"_next",value:function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(t,e)}},{key:"nextOrComplete",value:function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}]),n}(P),M_=13,F_=27,L_=32,N_=35,V_=36,B_=37,j_=38,z_=39,H_=40;function U_(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;ie.height||t.scrollWidth>e.width}}]),t}(),q_=function(){function t(e,n,i,r){var a=this;y(this,t),this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=function(){a.disable(),a._overlayRef.hasAttached()&&a._ngZone.run((function(){return a._overlayRef.detach()}))}}return b(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe((function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()}))):this._scrollSubscription=e.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),Y_=function(){function t(){y(this,t)}return b(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function G_(t,e){return e.some((function(e){return t.bottome.bottom||t.righte.right}))}function K_(t,e){return e.some((function(e){return t.tope.bottom||t.lefte.right}))}var Z_=function(){function t(e,n,i,r){y(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return b(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe((function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;G_(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run((function(){return t._overlayRef.detach()})))}})))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),$_=function(){var t=function t(e,n,i,r){var a=this;y(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new Y_},this.close=function(t){return new q_(a._scrollDispatcher,a._ngZone,a._viewportRuler,t)},this.block=function(){return new W_(a._viewportRuler,a._document)},this.reposition=function(t){return new Z_(a._scrollDispatcher,a._viewportRuler,a._ngZone,t)},this._document=r};return t.\u0275fac=function(e){return new(e||t)(pe(v_),pe(y_),pe(mc),pe(Zc))},t.\u0275prov=It({factory:function(){return new t(pe(v_),pe(y_),pe(mc),pe(Zc))},token:t,providedIn:"root"}),t}(),X_=function t(e){if(y(this,t),this.scrollStrategy=new Y_,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var n=0,i=Object.keys(e);n-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Zc))},t.\u0275prov=It({factory:function(){return new t(pe(Zc))},token:t,providedIn:"root"}),t}(),eb=function(){var t=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this,t))._keydownListener=function(t){for(var e=i._attachedOverlays,n=e.length-1;n>-1;n--)if(e[n]._keydownEvents.observers.length>0){e[n]._keydownEvents.next(t);break}},i}return b(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),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)}}]),n}(tb);return t.\u0275fac=function(e){return new(e||t)(pe(Zc))},t.\u0275prov=It({factory:function(){return new t(pe(Zc))},token:t,providedIn:"root"}),t}(),nb=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t))._platform=i,r._cursorStyleIsSet=!1,r._clickListener=function(t){for(var e=t.composedPath?t.composedPath()[0]:t.target,n=r._attachedOverlays.slice(),i=n.length-1;i>-1;i--){var a=n[i];if(!(a._outsidePointerEvents.observers.length<1)&&a.hasAttached()){if(a.overlayElement.contains(e))break;a._outsidePointerEvents.next(t)}}},r}return b(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),n}(tb);return t.\u0275fac=function(e){return new(e||t)(pe(Zc),pe(Jy))},t.\u0275prov=It({factory:function(){return new t(pe(Zc),pe(Jy))},token:t,providedIn:"root"}),t}(),ib=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),rb=function(){var t=function(){function t(e,n){y(this,t),this._platform=n,this._document=e}return b(t,[{key:"ngOnDestroy",value:function(){var t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var t=this._platform?this._platform.isBrowser:"undefined"!=typeof window,e="cdk-overlay-container";if(t||ib)for(var n=this._document.querySelectorAll(".".concat(e,'[platform="server"], ')+".".concat(e,'[platform="test"]')),i=0;ip&&(p=g,f=v)}}catch(y){m.e(y)}finally{m.f()}return this._isPushed=!1,void this._applyPosition(f.position,f.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&lb(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(ob),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 t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}},{key:"withScrollableContainers",value:function(t){return this._scrollables=t,this}},{key:"withPositions",value:function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(t){return this._viewportMargin=t,this}},{key:"withFlexibleDimensions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=t,this}},{key:"withGrowAfterOpen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=t,this}},{key:"withPush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=t,this}},{key:"withLockedPosition",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=t,this}},{key:"setOrigin",value:function(t){return this._origin=t,this}},{key:"withDefaultOffsetX",value:function(t){return this._offsetX=t,this}},{key:"withDefaultOffsetY",value:function(t){return this._offsetY=t,this}},{key:"withTransformOriginOn",value:function(t){return this._transformOriginSelector=t,this}},{key:"_getOriginPoint",value:function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}},{key:"_getOverlayPoint",value:function(t,e,n){var i;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}}},{key:"_getOverlayFit",value:function(t,e,n,i){var r=t.x,a=t.y,o=this._getOffset(i,"x"),s=this._getOffset(i,"y");o&&(r+=o),s&&(a+=s);var u=0-a,l=a+e.height-n.height,c=this._subtractOverflows(e.width,0-r,r+e.width-n.width),h=this._subtractOverflows(e.height,u,l),d=c*h;return{visibleArea:d,isCompletelyWithinViewport:e.width*e.height===d,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:c==e.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,a=cb(this._overlayRef.getConfig().minHeight),o=cb(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=a&&a<=i)&&(t.fitsInViewportHorizontally||null!=o&&o<=r)}return!1}},{key:"_pushOverlayOnScreen",value:function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var i,r,a=this._viewportRect,o=Math.max(t.x+e.width-a.width,0),s=Math.max(t.y+e.height-a.height,0),u=Math.max(a.top-n.top-t.y,0),l=Math.max(a.left-n.left-t.x,0);return this._previousPushAmount={x:i=e.width<=a.width?l||-o:t.xh&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!l||"start"===e.overlayX&&l)s=u.width-t.x+this._viewportMargin,a=t.x-this._viewportMargin;else if("start"===e.overlayX&&!l||"end"===e.overlayX&&l)o=t.x,a=u.right-t.x;else{var d=Math.min(u.right-t.x+u.left,t.x),f=this._lastBoundingBoxSize.width;o=t.x-d,(a=2*d)>f&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.x-f/2)}return{top:i,left:o,bottom:r,right:s,width:a,height:n}}},{key:"_setBoundingBoxStyles",value:function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;i.height=my(n.height),i.top=my(n.top),i.bottom=my(n.bottom),i.width=my(n.width),i.left=my(n.left),i.right=my(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=my(r)),a&&(i.maxWidth=my(a))}this._lastBoundingBoxSize=n,lb(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){lb(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){lb(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(t,e){var n={},i=this._hasExactPosition(),r=this._hasFlexibleDimensions,a=this._overlayRef.getConfig();if(i){var o=this._viewportRuler.getViewportScrollPosition();lb(n,this._getExactOverlayY(e,t,o)),lb(n,this._getExactOverlayX(e,t,o))}else n.position="static";var s="",u=this._getOffset(e,"x"),l=this._getOffset(e,"y");u&&(s+="translateX(".concat(u,"px) ")),l&&(s+="translateY(".concat(l,"px)")),n.transform=s.trim(),a.maxHeight&&(i?n.maxHeight=my(a.maxHeight):r&&(n.maxHeight="")),a.maxWidth&&(i?n.maxWidth=my(a.maxWidth):r&&(n.maxWidth="")),lb(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(t,e,n){var i={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var a=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=a,"bottom"===t.overlayY?i.bottom="".concat(this._document.documentElement.clientHeight-(r.y+this._overlayRect.height),"px"):i.top=my(r.y),i}},{key:"_getExactOverlayX",value:function(t,e,n){var i={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right="".concat(this._document.documentElement.clientWidth-(r.x+this._overlayRect.width),"px"):i.left=my(r.x),i}},{key:"_getScrollVisibility",value:function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map((function(t){return t.getElementRef().nativeElement.getBoundingClientRect()}));return{isOriginClipped:K_(t,n),isOriginOutsideView:G_(t,n),isOverlayClipped:K_(e,n),isOverlayOutsideView:G_(e,n)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}},{key:"left",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}},{key:"right",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}},{key:"width",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}},{key:"height",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}},{key:"centerHorizontally",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(t),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(t),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),i=n.width,r=n.height,a=n.maxWidth,o=n.maxHeight,s=!("100%"!==i&&"100vw"!==i||a&&"100%"!==a&&"100vw"!==a),u=!("100%"!==r&&"100vh"!==r||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=s?"0":this._leftOffset,t.marginTop=u?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,s?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=u?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(db),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}]),t}(),pb=function(){var t=function(){function t(e,n,i,r){y(this,t),this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r}return b(t,[{key:"global",value:function(){return new fb}},{key:"connectedTo",value:function(t,e,n){return new hb(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new ub(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(y_),pe(Zc),pe(Jy),pe(rb))},t.\u0275prov=It({factory:function(){return new t(pe(y_),pe(Zc),pe(Jy),pe(rb))},token:t,providedIn:"root"}),t}(),mb=0,vb=function(){var t=function(){function t(e,n,i,r,a,o,s,u,l,c,h){y(this,t),this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=i,this._positionBuilder=r,this._keyboardDispatcher=a,this._injector=o,this._ngZone=s,this._document=u,this._directionality=l,this._location=c,this._outsideClickDispatcher=h}return b(t,[{key:"create",value:function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new X_(t);return r.direction=r.direction||this._directionality.value,new ab(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-".concat(mb++),e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}},{key:"_createHostElement",value:function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}},{key:"_createPortalOutlet",value:function(t){return this._appRef||(this._appRef=this._injector.get(Lc)),new D_(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe($_),pe(rb),pe(bu),pe(pb),pe(eb),pe(qo),pe(mc),pe(Zc),pe(s_),pe(ch),pe(nb))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),gb=[{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"}],yb=new re("cdk-connected-overlay-scroll-strategy"),_b=function(){var t=function t(e){y(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t}(),bb=function(){var t=function(){function t(e,n,i,r,a){y(this,t),this._overlay=e,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=D.EMPTY,this._attachSubscription=D.EMPTY,this._detachSubscription=D.EMPTY,this._positionSubscription=D.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new xl,this.positionChange=new xl,this.attach=new xl,this.detach=new xl,this.overlayKeydown=new xl,this.overlayOutsideClick=new xl,this._templatePortal=new C_(n,i),this._scrollStrategyFactory=r,this.scrollStrategy=this._scrollStrategyFactory()}return b(t,[{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(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var t=this;this.positions&&this.positions.length||(this.positions=gb);var e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe((function(){return t.attach.emit()})),this._detachSubscription=e.detachments().subscribe((function(){return t.detach.emit()})),e.keydownEvents().subscribe((function(e){t.overlayKeydown.next(e),e.keyCode!==F_||U_(e)||(e.preventDefault(),t._detachOverlay())})),this._overlayRef.outsidePointerEvents().subscribe((function(e){t.overlayOutsideClick.next(e)}))}},{key:"_buildConfig",value:function(){var t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new X_({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}},{key:"_updatePositionStrategy",value:function(t){var e=this,n=this.positions.map((function(t){return{originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||e.offsetX,offsetY:t.offsetY||e.offsetY,panelClass:t.panelClass||void 0}}));return t.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}},{key:"_createPositionStrategy",value:function(){var t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}},{key:"_attachOverlay",value:function(){var t=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(e){t.backdropClick.emit(e)})):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new R_(t,e))}}((function(){return t.positionChange.observers.length>0}))).subscribe((function(e){t.positionChange.emit(e),0===t.positionChange.observers.length&&t._positionSubscription.unsubscribe()})))}},{key:"_detachOverlay",value:function(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}},{key:"offsetX",get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=hy(t)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(t){this._lockPosition=hy(t)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=hy(t)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=hy(t)}},{key:"push",get:function(){return this._push},set:function(t){this._push=hy(t)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(vb),ds(qu),ds(Gu),ds(yb),ds(s_,8))},t.\u0275dir=ze({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],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:[nn]}),t}(),kb={provide:yb,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},wb=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[vb,kb],imports:[[l_,T_,b_],b_]}),t}();function Cb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Py;return function(n){return n.lift(new xb(t,e))}}var xb=function(){function t(e,n){y(this,t),this.dueTime=e,this.scheduler=n}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new Sb(t,this.dueTime,this.scheduler))}}]),t}(),Sb=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t)).dueTime=i,a.scheduler=r,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return b(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Db,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}},{key:"clearDebounce",value:function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}]),n}(P);function Db(t){t.debouncedNext()}var Eb=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"create",value:function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Ab=function(){var t=function(){function t(e){y(this,t),this._mutationObserverFactory=e,this._observedElements=new Map}return b(t,[{key:"ngOnDestroy",value:function(){var t=this;this._observedElements.forEach((function(e,n){return t._cleanupObserver(n)}))}},{key:"observe",value:function(t){var e=this,n=vy(t);return new V((function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}}))}},{key:"_observeElement",value:function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new U,n=this._mutationObserverFactory.create((function(t){return e.next(t)}));n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}},{key:"_unobserveElement",value:function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}},{key:"_cleanupObserver",value:function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Eb))},t.\u0275prov=It({factory:function(){return new t(pe(Eb))},token:t,providedIn:"root"}),t}(),Ib=function(){var t=function(){function t(e,n,i){y(this,t),this._contentObserver=e,this._elementRef=n,this._ngZone=i,this.event=new xl,this._disabled=!1,this._currentSubscription=null}return b(t,[{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular((function(){t._currentSubscription=(t.debounce?e.pipe(Cb(t.debounce)):e).subscribe(t.event)}))}},{key:"_unsubscribe",value:function(){this._currentSubscription&&this._currentSubscription.unsubscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=hy(t),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(t){this._debounce=dy(t),this._subscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Ab),ds(ku),ds(mc))},t.\u0275dir=ze({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t}(),Ob=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[Eb]}),t}();function Tb(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var Rb="cdk-describedby-message-container",Pb="cdk-describedby-message",Mb="cdk-describedby-host",Fb=0,Lb=new Map,Nb=null,Vb=function(){var t=function(){function t(e,n){y(this,t),this._platform=n,this._document=e}return b(t,[{key:"describe",value:function(t,e){this._canBeDescribed(t,e)&&("string"!=typeof e?(this._setMessageId(e),Lb.set(e,{messageElement:e,referenceCount:0})):Lb.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}},{key:"removeDescription",value:function(t,e){if(e&&this._isElementNode(t)){if(this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e),"string"==typeof e){var n=Lb.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e)}Nb&&0===Nb.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var t=this._document.querySelectorAll("[".concat(Mb,"]")),e=0;e-1&&e!==n._activeItemIndex&&(n._activeItemIndex=e)}}))}return b(t,[{key:"skipPredicate",value:function(t){return this._skipPredicateFn=t,this}},{key:"withWrap",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=t,this}},{key:"withVerticalOrientation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=t,this}},{key:"withHorizontalOrientation",value:function(t){return this._horizontal=t,this}},{key:"withAllowedModifierKeys",value:function(t){return this._allowedModifierKeys=t,this}},{key:"withTypeAhead",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(am((function(e){return t._pressedLetters.push(e)})),Cb(e),Vf((function(){return t._pressedLetters.length>0})),Y((function(){return t._pressedLetters.join("")}))).subscribe((function(e){for(var n=t._getItemsArray(),i=1;i0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=t,this}},{key:"setActiveItem",value:function(t){var e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(t){var e=this,n=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every((function(n){return!t[n]||e._allowedModifierKeys.indexOf(n)>-1}));switch(n){case 9:return void this.tabOut.next();case H_:if(this._vertical&&i){this.setNextItemActive();break}return;case j_:if(this._vertical&&i){this.setPreviousItemActive();break}return;case z_:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case B_:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case V_:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case N_:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||U_(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],t.preventDefault()}},{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(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t),i=e[n];this._activeItem=null==i?null:i,this._activeItemIndex=n}},{key:"_setActiveItemByDelta",value:function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}},{key:"_setActiveInWrapMode",value:function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}},{key:"_setActiveInDefaultMode",value:function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}},{key:"_setActiveItemByIndex",value:function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}},{key:"_getItemsArray",value:function(){return this._items instanceof Dl?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),t}(),jb=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"setActiveItem",value:function(t){this.activeItem&&this.activeItem.setInactiveStyles(),r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(Bb),zb=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._origin="program",t}return b(n,[{key:"setFocusOrigin",value:function(t){return this._origin=t,this}},{key:"setActiveItem",value:function(t){r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.focus(this._origin)}}]),n}(Bb),Hb=function(){var t=function(){function t(e){y(this,t),this._platform=e}return b(t,[{key:"isDisabled",value:function(t){return t.hasAttribute("disabled")}},{key:"isVisible",value:function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}},{key:"isTabbable",value:function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(eW){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){if(-1===Wb(n))return!1;if(!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),r=Wb(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==i&&"object"!==i&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&("audio"===i?!!t.hasAttribute("controls")&&-1!==r:"video"===i?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}},{key:"isFocusable",value:function(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||Ub(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Jy))},t.\u0275prov=It({factory:function(){return new t(pe(Jy))},token:t,providedIn:"root"}),t}();function Ub(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Wb(t){if(!Ub(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var qb=function(){function t(e,n,i,r){var a=this,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];y(this,t),this._element=e,this._checker=n,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return a.focusLastTabbableElement()},this.endAnchorListener=function(){return a.focusFirstTabbableElement()},this._enabled=!0,o||this.attachAnchors()}return b(t,[{key:"destroy",value:function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular((function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t.startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t.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(){var t=this;return new Promise((function(e){t._executeOnStable((function(){return e(t.focusInitialElement())}))}))}},{key:"focusFirstTabbableElementWhenReady",value:function(){var t=this;return new Promise((function(e){t._executeOnStable((function(){return e(t.focusFirstTabbableElement())}))}))}},{key:"focusLastTabbableElementWhenReady",value:function(){var t=this;return new Promise((function(e){t._executeOnStable((function(){return e(t.focusLastTabbableElement())}))}))}},{key:"_getRegionBoundary",value:function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-".concat(t,"], ")+"[cdkFocusRegion".concat(t,"], ")+"[cdk-focus-".concat(t,"]")),n=0;n=0;n--){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}return null}},{key:"_createAnchor",value:function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}},{key:"_toggleAnchorTabIndex",value:function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}},{key:"_executeOnStable",value:function(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Gp(1)).subscribe(t)}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}}]),t}(),Yb=function(){var t=function(){function t(e,n,i){y(this,t),this._checker=e,this._ngZone=n,this._document=i}return b(t,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new qb(t,this._checker,this._ngZone,this._document,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Hb),pe(mc),pe(Zc))},t.\u0275prov=It({factory:function(){return new t(pe(Hb),pe(mc),pe(Zc))},token:t,providedIn:"root"}),t}(),Gb=function(){var t=function(){function t(e,n,i){y(this,t),this._elementRef=e,this._focusTrapFactory=n,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return b(t,[{key:"ngOnDestroy",value:function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}},{key:"ngAfterContentInit",value:function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}},{key:"ngDoCheck",value:function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}},{key:"ngOnChanges",value:function(t){var e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}},{key:"_captureFocus",value:function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}},{key:"enabled",get:function(){return this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=hy(t)}},{key:"autoCapture",get:function(){return this._autoCapture},set:function(t){this._autoCapture=hy(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Yb),ds(Zc))},t.\u0275dir=ze({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[nn]}),t}();"undefined"!=typeof Element&∈var Kb=new re("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),Zb=new re("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),$b=function(){var t=function(){function t(e,n,i,r){y(this,t),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=e||this._createLiveElement()}return b(t,[{key:"announce",value:function(t){for(var e,n,i=this,r=this._defaultOptions,a=arguments.length,o=new Array(a>1?a-1:0),s=1;s1&&void 0!==arguments[1]&&arguments[1],n=vy(t);if(!this._platform.isBrowser||1!==n.nodeType)return Lf(null);var i=a_(n)||this._getDocument(),r=this._elementInfo.get(n);if(r)return e&&(r.checkChildren=!0),r.subject;var a={checkChildren:e,subject:new U,rootNode:i};return this._elementInfo.set(n,a),this._registerGlobalListeners(a),a.subject}},{key:"stopMonitoring",value:function(t){var e=vy(t),n=this._elementInfo.get(e);n&&(n.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(n))}},{key:"focusVia",value:function(t,e,n){var i=vy(t);this._setOriginForCurrentEventQueue(e),"function"==typeof i.focus&&i.focus(n)}},{key:"ngOnDestroy",value:function(){var t=this;this._elementInfo.forEach((function(e,n){return t.stopMonitoring(n)}))}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(t,e,n){n?t.classList.add(e):t.classList.remove(e)}},{key:"_getFocusOrigin",value:function(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}},{key:"_setClasses",value:function(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}},{key:"_setOriginForCurrentEventQueue",value:function(t){var e=this;this._ngZone.runOutsideAngular((function(){e._origin=t,0===e._detectionMode&&(e._originTimeoutId=setTimeout((function(){return e._origin=null}),1))}))}},{key:"_wasCausedByTouch",value:function(t){var e=nk(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(t,e){var n=this._elementInfo.get(e);if(n&&(n.checkChildren||e===nk(t))){var i=this._getFocusOrigin(t);this._setClasses(e,i),this._emitOrigin(n.subject,i),this._lastFocusOrigin=i}}},{key:"_onBlur",value:function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(t,e){this._ngZone.run((function(){return t.next(e)}))}},{key:"_registerGlobalListeners",value:function(t){var e=this;if(this._platform.isBrowser){var n=t.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular((function(){n.addEventListener("focus",e._rootNodeFocusAndBlurListener,tk),n.addEventListener("blur",e._rootNodeFocusAndBlurListener,tk)})),this._rootNodeFocusListenerCount.set(n,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular((function(){var t=e._getDocument(),n=e._getWindow();t.addEventListener("keydown",e._documentKeydownListener,tk),t.addEventListener("mousedown",e._documentMousedownListener,tk),t.addEventListener("touchstart",e._documentTouchstartListener,tk),n.addEventListener("focus",e._windowFocusListener)}))}}},{key:"_removeGlobalListeners",value:function(t){var e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){var n=this._rootNodeFocusListenerCount.get(e);n>1?this._rootNodeFocusListenerCount.set(e,n-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,tk),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,tk),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){var i=this._getDocument(),r=this._getWindow();i.removeEventListener("keydown",this._documentKeydownListener,tk),i.removeEventListener("mousedown",this._documentMousedownListener,tk),i.removeEventListener("touchstart",this._documentTouchstartListener,tk),r.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(mc),pe(Jy),pe(Zc,8),pe(Jb,8))},t.\u0275prov=It({factory:function(){return new t(pe(mc),pe(Jy),pe(Zc,8),pe(Jb,8))},token:t,providedIn:"root"}),t}();function nk(t){return t.composedPath?t.composedPath()[0]:t.target}var ik=function(){var t=function(){function t(e,n){y(this,t),this._elementRef=e,this._focusMonitor=n,this.cdkFocusChange=new xl}return b(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe((function(e){return t.cdkFocusChange.emit(e)}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(ek))},t.\u0275dir=ze({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t}(),rk="cdk-high-contrast-black-on-white",ak="cdk-high-contrast-white-on-black",ok="cdk-high-contrast-active",sk=function(){var t=function(){function t(e,n){y(this,t),this._platform=e,this._document=n}return b(t,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);var e=this._document.defaultView||window,n=e&&e.getComputedStyle?e.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),i){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(this._platform.isBrowser&&this._document.body){var t=this._document.body.classList;t.remove(ok),t.remove(rk),t.remove(ak);var e=this.getHighContrastMode();1===e?(t.add(ok),t.add(rk)):2===e&&(t.add(ok),t.add(ak))}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Jy),pe(Zc))},t.\u0275prov=It({factory:function(){return new t(pe(Jy),pe(Zc))},token:t,providedIn:"root"}),t}(),uk=function(){var t=function t(e){y(this,t),e._applyBodyHighContrastModeCssClasses()};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(pe(sk))},imports:[[t_,Ob]]}),t}(),lk=new Au("10.2.5"),ck=function t(){y(this,t)},hk=function t(){y(this,t)},dk="*";function fk(t,e){return{type:7,name:t,definitions:e,options:{}}}function pk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function mk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:3,steps:t,options:e}}function vk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function gk(t){return{type:6,styles:t,offset:null}}function yk(t,e,n){return{type:0,name:t,styles:e,options:n}}function _k(t){return{type:5,steps:t}}function bk(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function kk(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}function wk(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function Ck(t){Promise.resolve(null).then(t)}var xk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;y(this,t),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+n}return b(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{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 t=this;Ck((function(){return t._onFinish()}))}},{key:"_onStart",value:function(){this._onStartFns.forEach((function(t){return t()})),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(t){return t()})),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(t){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}}]),t}(),Sk=function(){function t(e){var n=this;y(this,t),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var i=0,r=0,a=0,o=this.players.length;0==o?Ck((function(){return n._onFinish()})):this.players.forEach((function(t){t.onDone((function(){++i==o&&n._onFinish()})),t.onDestroy((function(){++r==o&&n._onDestroy()})),t.onStart((function(){++a==o&&n._onStart()}))})),this.totalTime=this.players.reduce((function(t,e){return Math.max(t,e.totalTime)}),0)}return b(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach((function(t){return t.init()}))}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[])}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach((function(t){return t.play()}))}},{key:"pause",value:function(){this.players.forEach((function(t){return t.pause()}))}},{key:"restart",value:function(){this.players.forEach((function(t){return t.restart()}))}},{key:"finish",value:function(){this._onFinish(),this.players.forEach((function(t){return t.finish()}))}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach((function(t){return t.destroy()})),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach((function(t){return t.reset()})),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(t){var e=t*this.totalTime;this.players.forEach((function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)}))}},{key:"getPosition",value:function(){var t=0;return this.players.forEach((function(e){var n=e.getPosition();t=Math.min(n,t)})),t}},{key:"beforeDestroy",value:function(){this.players.forEach((function(t){t.beforeDestroy&&t.beforeDestroy()}))}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}}]),t}(),Dk="!";function Ek(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Ak(t){switch(t.length){case 0:return new xk;case 1:return t[0];default:return new Sk(t)}}function Ik(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=[],s=[],u=-1,l=null;if(i.forEach((function(t){var n=t.offset,i=n==u,c=i&&l||{};Object.keys(t).forEach((function(n){var i=n,s=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),s){case Dk:s=r[n];break;case dk:s=a[n];break;default:s=e.normalizeStyleValue(n,i,s,o)}c[i]=s})),i||s.push(c),l=c,u=n})),o.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(o.join(c)))}return s}function Ok(t,e,n,i){switch(e){case"start":t.onStart((function(){return i(n&&Tk(n,"start",t))}));break;case"done":t.onDone((function(){return i(n&&Tk(n,"done",t))}));break;case"destroy":t.onDestroy((function(){return i(n&&Tk(n,"destroy",t))}))}}function Tk(t,e,n){var i=n.totalTime,r=Rk(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),a=t._data;return null!=a&&(r._data=a),r}function Rk(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6?arguments[6]:void 0;return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:a,disabled:!!o}}function Pk(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function Mk(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var Fk=function(t,e){return!1},Lk=function(t,e){return!1},Nk=function(t,e,n){return[]},Vk=Ek();(Vk||"undefined"!=typeof Element)&&(Fk=function(t,e){return t.contains(e)},Lk=function(){if(Vk||Element.prototype.matches)return function(t,e){return t.matches(e)};var t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?function(t,n){return e.apply(t,[n])}:Lk}(),Nk=function(t,e,n){var i=[];if(n)i.push.apply(i,l(t.querySelectorAll(e)));else{var r=t.querySelector(e);r&&i.push(r)}return i});var Bk=null,jk=!1;function zk(t){Bk||(Bk=("undefined"!=typeof document?document.body:null)||{},jk=!!Bk.style&&"WebkitAppearance"in Bk.style);var e=!0;return Bk.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&!(e=t in Bk.style)&&jk&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in Bk.style),e}var Hk=Lk,Uk=Fk,Wk=Nk;function qk(t){var e={};return Object.keys(t).forEach((function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]})),e}var Yk=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"validateStyleProperty",value:function(t){return zk(t)}},{key:"matchesElement",value:function(t,e){return Hk(t,e)}},{key:"containsElement",value:function(t,e){return Uk(t,e)}},{key:"query",value:function(t,e,n){return Wk(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return n||""}},{key:"animate",value:function(t,e,n,i,r){return new xk(n,i)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),Gk=function(){var t=function t(){y(this,t)};return t.NOOP=new Yk,t}(),Kk="ng-enter",Zk="ng-leave",$k="ng-trigger",Xk=".ng-trigger",Qk="ng-animating",Jk=".ng-animating";function tw(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ew(parseFloat(e[1]),e[2])}function ew(t,e){switch(e){case"s":return 1e3*t;default:return t}}function nw(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var i,r=0,a="";if("string"==typeof t){var o=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===o)return e.push('The provided timing value "'.concat(t,'" is invalid.')),{duration:0,delay:0,easing:""};i=ew(parseFloat(o[1]),o[2]);var s=o[3];null!=s&&(r=ew(parseFloat(s),o[4]));var u=o[5];u&&(a=u)}else i=t;if(!n){var l=!1,c=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),l=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&e.splice(c,0,'The provided timing value "'.concat(t,'" is invalid.'))}return{duration:i,delay:r,easing:a}}(t,e,n)}function iw(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function rw(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)for(var i in t)n[i]=t[i];else iw(t,n);return n}function aw(t,e,n){return n?e+":"+n+";":""}function ow(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(t,'" is not supported')),e;var a=r[1],o=r[2],s=r[3];e.push(Cw(a,s)),"<"!=o[0]||a==bw&&s==bw||e.push(Cw(s,a))}(t,r,i)})):r.push(n),r),animation:a,queryCount:e.queryCount,depCount:e.depCount,options:Ow(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map((function(t){return yw(n,t,e)})),options:Ow(t.options)}}},{key:"visitGroup",value:function(t,e){var n=this,i=e.currentTime,r=0,a=t.steps.map((function(t){e.currentTime=i;var a=yw(n,t,e);return r=Math.max(r,e.currentTime),a}));return e.currentTime=r,{type:3,steps:a,options:Ow(t.options)}}},{key:"visitAnimate",value:function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Tw(nw(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some((function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)}))){var r=Tw(0,0,"");return r.dynamic=!0,r.strValue=i,r}return Tw((n=n||nw(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:gk({});if(5==r.type)n=this.visitKeyframes(r,e);else{var a=t.styles,o=!1;if(!a){o=!0;var s={};i.easing&&(s.easing=i.easing),a=gk(s)}e.currentTime+=i.duration+i.delay;var u=this.visitStyle(a,e);u.isEmptyStep=o,n=u}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}},{key:"_makeStyleAst",value:function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach((function(t){"string"==typeof t?t==dk?n.push(t):e.errors.push("The provided style string value ".concat(t," is not allowed.")):n.push(t)})):n.push(t.styles);var i=!1,r=null;return n.forEach((function(t){if(Iw(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var a in e)if(e[a].toString().indexOf("{{")>=0){i=!0;break}}})),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,a=e.currentTime;i&&a>0&&(a-=i.duration+i.delay),t.styles.forEach((function(t){"string"!=typeof t&&Object.keys(t).forEach((function(i){if(n._driver.validateStyleProperty(i)){var o,s,u,l=e.collectedStyles[e.currentQuerySelector],c=l[i],h=!0;c&&(a!=r&&a>=c.startTime&&r<=c.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(c.startTime,'ms" and "').concat(c.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(a,'ms" and "').concat(r,'ms"')),h=!1),a=c.startTime),h&&(l[i]={startTime:a,endTime:r}),e.options&&(o=e.errors,s=e.options.params||{},(u=hw(t[i])).length&&u.forEach((function(t){s.hasOwnProperty(t)||o.push("Unable to resolve the local animation param ".concat(t," in the given list of values"))})))}else e.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))}))}))}},{key:"visitKeyframes",value:function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,a=[],o=!1,s=!1,u=0,l=t.steps.map((function(t){var i=n._makeStyleAst(t,e),l=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach((function(t){if(Iw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}}));else if(Iw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),c=0;return null!=l&&(r++,c=i.offset=l),s=s||c<0||c>1,o=o||c0&&r0?r==d?1:h*r:a[r],s=o*m;e.currentTime=f+p.delay+s,p.duration=s,n._validateStyleAst(t,e),t.offset=o,i.styles.push(t)})),i}},{key:"visitReference",value:function(t,e){return{type:8,animation:yw(this,lw(t.animation),e),options:Ow(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:Ow(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Ow(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=u(function(t){var e=!!t.split(/\s*,\s*/).find((function(t){return t==xw}));return e&&(t=t.replace(Sw,"")),[t=t.replace(/@\*/g,Xk).replace(/@\w+/g,(function(t){return".ng-trigger-"+t.substr(1)})).replace(/:animating/g,Jk),e]}(t.selector),2),a=r[0],o=r[1];e.currentQuerySelector=n.length?n+" "+a:a,Pk(e.collectedStyles,e.currentQuerySelector,{});var s=yw(this,lw(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:a,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:s,originalSelector:t.selector,options:Ow(t.options)}}},{key:"visitStagger",value:function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:nw(t.timings,e.errors,!0);return{type:12,animation:yw(this,lw(t.animation),e),timings:n,options:null}}}]),t}(),Aw=function t(e){y(this,t),this.errors=e,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 Iw(t){return!Array.isArray(t)&&"object"==typeof t}function Ow(t){var e;return t?(t=iw(t)).params&&(t.params=(e=t.params)?iw(e):null):t={},t}function Tw(t,e,n){return{duration:t,delay:e,easing:n}}function Rw(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:a,totalTime:r+a,easing:o,subTimeline:s}}var Pw=function(){function t(){y(this,t),this._map=new Map}return b(t,[{key:"consume",value:function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e}},{key:"append",value:function(t,e){var n,i=this._map.get(t);i||this._map.set(t,i=[]),(n=i).push.apply(n,l(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),Mw=new RegExp(":enter","g"),Fw=new RegExp(":leave","g");function Lw(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new Nw).buildKeyframes(t,e,n,i,r,a,o,s,u,l)}var Nw=function(){function t(){y(this,t)}return b(t,[{key:"buildKeyframes",value:function(t,e,n,i,r,a,o,s,u){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];u=u||new Pw;var c=new Bw(t,e,u,i,r,l,[]);c.options=s,c.currentTimeline.setStyles([a],null,c.errors,s),yw(this,n,c);var h=c.timelines.filter((function(t){return t.containsAnimation()}));if(h.length&&Object.keys(o).length){var d=h[h.length-1];d.allowOnlyTimelineStyles()||d.setStyles([o],null,c.errors,s)}return h.length?h.map((function(t){return t.buildKeyframes()})):[Rw(e,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(t,e){}},{key:"visitState",value:function(t,e){}},{key:"visitTransition",value:function(t,e){}},{key:"visitAnimateChild",value:function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(n,i,i.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=t}},{key:"visitAnimateRef",value:function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}},{key:"_visitSubInstructions",value:function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?tw(n.duration):null,a=null!=n.delay?tw(n.delay):null;return 0!==r&&t.forEach((function(t){var n=e.appendInstructionToTimeline(t,r,a);i=Math.max(i,n.duration+n.delay)})),i}},{key:"visitReference",value:function(t,e){e.updateOptions(t.options,!0),yw(this,t.animation,e),e.previousNode=t}},{key:"visitSequence",value:function(t,e){var n=this,i=e.subContextCount,r=e,a=t.options;if(a&&(a.params||a.delay)&&((r=e.createSubContext(a)).transformIntoNewTimeline(),null!=a.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Vw);var o=tw(a.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach((function(t){return yw(n,t,r)})),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}},{key:"visitGroup",value:function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,a=t.options&&t.options.delay?tw(t.options.delay):0;t.steps.forEach((function(o){var s=e.createSubContext(t.options);a&&s.delayNextStep(a),yw(n,o,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)})),i.forEach((function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)})),e.transformIntoNewTimeline(r),e.previousNode=t}},{key:"_visitTiming",value:function(t,e){if(t.dynamic){var n=t.strValue;return nw(e.params?dw(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}},{key:"visitAnimate",value:function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}},{key:"visitStyle",value:function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}},{key:"visitKeyframes",value:function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,a=e.createSubContext().currentTimeline;a.easing=n.easing,t.styles.forEach((function(t){a.forwardTime((t.offset||0)*r),a.setStyles(t.styles,t.easing,e.errors,e.options),a.applyStylesToKeyframe()})),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(i+r),e.previousNode=t}},{key:"visitQuery",value:function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},a=r.delay?tw(r.delay):0;a&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Vw);var o=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;var u=null;s.forEach((function(i,r){e.currentQueryIndex=r;var s=e.createSubContext(t.options,i);a&&s.delayNextStep(a),i===e.element&&(u=s.currentTimeline),yw(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,s.currentTimeline.currentTime)})),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),u&&(e.currentTimeline.mergeTimelineCollectedStyles(u),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}},{key:"visitStagger",value:function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,a=Math.abs(r.duration),o=a*(e.currentQueryTotal-1),s=a*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=o-s;break;case"full":s=n.currentStaggerTime}var u=e.currentTimeline;s&&u.delayNextStep(s);var l=u.currentTime;yw(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-l+(i.startTime-n.currentTimeline.startTime)}}]),t}(),Vw={},Bw=function(){function t(e,n,i,r,a,o,s,u){y(this,t),this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=a,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Vw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=u||new jw(this._driver,n,0),s.push(this.currentTimeline)}return b(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=tw(i.duration)),null!=i.delay&&(r.delay=tw(i.delay));var a=i.params;if(a){var o=r.params;o||(o=this.options.params={}),Object.keys(a).forEach((function(t){e&&o.hasOwnProperty(t)||(o[t]=dw(a[t],o,n.errors))}))}}}},{key:"_copyOptions",value:function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach((function(t){n[t]=e[t]}))}}return t}},{key:"createSubContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,a=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(e),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}},{key:"transformIntoNewTimeline",value:function(t){return this.previousNode=Vw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new zw(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}},{key:"delayNextStep",value:function(t){t>0&&this.currentTimeline.delayNextStep(t)}},{key:"invokeQuery",value:function(t,e,n,i,r,a){var o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(Mw,"."+this._enterClassName)).replace(Fw,"."+this._leaveClassName);var s=this._driver.query(this.element,t,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),o.push.apply(o,l(s))}return r||0!=o.length||a.push('`query("'.concat(e,'")` returned zero elements. (Use `query("').concat(e,'", { optional: true })` if you wish to allow this.)')),o}},{key:"params",get:function(){return this.options.params}}]),t}(),jw=function(){function t(e,n,i,r){y(this,t),this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,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(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return b(t,[{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:"delayNextStep",value:function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}},{key:"fork",value:function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}},{key:"_updateStyle",value:function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach((function(t){e._backFill[t]=e._globalTimelineStyles[t]||dk,e._currentKeyframe[t]=dk})),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var a=i&&i.params||{},o=function(t,e){var n,i={};return t.forEach((function(t){"*"===t?(n=n||Object.keys(e)).forEach((function(t){i[t]=dk})):rw(t,!1,i)})),i}(t,this._globalTimelineStyles);Object.keys(o).forEach((function(t){var e=dw(o[t],a,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:dk),r._updateStyle(t,e)}))}},{key:"applyStylesToKeyframe",value:function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach((function(n){t._currentKeyframe[n]=e[n]})),Object.keys(this._localTimelineStyles).forEach((function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])})))}},{key:"snapshotCurrentStyles",value:function(){var t=this;Object.keys(this._localTimelineStyles).forEach((function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)}))}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(t){var e=this;Object.keys(t._styleSummary).forEach((function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)}))}},{key:"buildKeyframes",value:function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach((function(a,o){var s=rw(a,!0);Object.keys(s).forEach((function(t){var i=s[t];i==Dk?e.add(t):i==dk&&n.add(t)})),i||(s.offset=o/t.duration),r.push(s)}));var a=e.size?fw(e.values()):[],o=n.size?fw(n.values()):[];if(i){var s=r[0],u=iw(s);s.offset=0,u.offset=1,r=[s,u]}return Rw(this.element,r,a,o,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t}}]),t}(),zw=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s){var u,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return y(this,n),(u=e.call(this,t,i,s.delay)).element=i,u.keyframes=r,u.preStyleProps=a,u.postStyleProps=o,u._stretchStartingKeyframe=l,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return b(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var a=[],o=i+n,s=n/o,u=rw(t[0],!1);u.offset=0,a.push(u);var l=rw(t[0],!1);l.offset=Hw(s),a.push(l);for(var c=t.length-1,h=1;h<=c;h++){var d=rw(t[h],!1);d.offset=Hw((n+d.offset*i)/o),a.push(d)}i=o,n=0,r="",t=a}return Rw(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(jw);function Hw(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,e-1);return Math.round(t*n)/n}var Uw=function t(){y(this,t)},Ww=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"normalizePropertyName",value:function(t,e){return mw(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var r="",a=n.toString().trim();if(qw[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&0==o[1].length&&i.push("Please provide a CSS unit value for ".concat(t,":").concat(n))}return a+r}}]),n}(Uw),qw=function(){return t="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(","),e={},t.forEach((function(t){return e[t]=!0})),e;var t,e}();function Yw(t,e,n,i,r,a,o,s,u,l,c,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:a,toState:i,toStyles:o,timelines:s,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:d}}var Gw={},Kw=function(){function t(e,n,i){y(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return b(t,[{key:"match",value:function(t,e,n,i){return function(t,e,n,i,r){return t.some((function(t){return t(e,n,i,r)}))}(this.ast.matchers,t,e,n,i)}},{key:"buildStyles",value:function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],a=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):a}},{key:"build",value:function(t,e,n,i,r,a,o,s,u,l){var c=[],h=this.ast.options&&this.ast.options.params||Gw,d=this.buildStyles(n,o&&o.params||Gw,c),f=s&&s.params||Gw,p=this.buildStyles(i,f,c),m=new Set,v=new Map,g=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),f)},b=l?[]:Lw(t,e,this.ast.animation,r,a,d,p,_,u,c),k=0;if(b.forEach((function(t){k=Math.max(t.duration+t.delay,k)})),c.length)return Yw(e,this._triggerName,n,i,y,d,p,[],[],v,g,k,c);b.forEach((function(t){var n=t.element,i=Pk(v,n,{});t.preStyleProps.forEach((function(t){return i[t]=!0}));var r=Pk(g,n,{});t.postStyleProps.forEach((function(t){return r[t]=!0})),n!==e&&m.add(n)}));var w=fw(m.values());return Yw(e,this._triggerName,n,i,y,d,p,b,w,v,g,k)}}]),t}(),Zw=function(){function t(e,n){y(this,t),this.styles=e,this.defaultParams=n}return b(t,[{key:"buildStyles",value:function(t,e){var n={},i=iw(this.defaultParams);return Object.keys(t).forEach((function(e){var n=t[e];null!=n&&(i[e]=n)})),this.styles.styles.forEach((function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach((function(t){var a=r[t];a.length>1&&(a=dw(a,i,e)),n[t]=a}))}})),n}}]),t}(),$w=function(){function t(e,n){var i=this;y(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach((function(t){i.states[t.name]=new Zw(t.style,t.options&&t.options.params||{})})),Xw(this.states,"true","1"),Xw(this.states,"false","0"),n.transitions.forEach((function(t){i.transitionFactories.push(new Kw(e,t,i.states))})),this.fallbackTransition=new Kw(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return b(t,[{key:"matchTransition",value:function(t,e,n,i){return this.transitionFactories.find((function(r){return r.match(t,e,n,i)}))||null}},{key:"matchStyles",value:function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),t}();function Xw(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Qw=new Pw,Jw=function(){function t(e,n,i){y(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return b(t,[{key:"register",value:function(t,e){var n=[],i=Dw(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,r=Ik(this._driver,this._normalizer,i,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}},{key:"create",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],o=this._animations[t],s=new Map;if(o?(n=Lw(this._driver,e,o,Kk,Zk,{},{},r,Qw,a)).forEach((function(t){var e=Pk(s,t.element,{});t.postStyleProps.forEach((function(t){return e[t]=null}))})):(a.push("The requested animation doesn't exist or has already been destroyed"),n=[]),a.length)throw new Error("Unable to create the animation due to the following errors: ".concat(a.join("\n")));s.forEach((function(t,e){Object.keys(t).forEach((function(n){t[n]=i._driver.computeStyle(e,n,dk)}))}));var u=n.map((function(t){var e=s.get(t.element);return i._buildPlayer(t,{},e)})),l=Ak(u);return this._playersById[t]=l,l.onDestroy((function(){return i.destroy(t)})),this.players.push(l),l}},{key:"destroy",value:function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by ".concat(t));return e}},{key:"listen",value:function(t,e,n,i){var r=Rk(e,"","","");return Ok(this._getPlayer(t),n,r,i),function(){}}},{key:"command",value:function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])}}]),t}(),tC="ng-animate-queued",eC="ng-animate-disabled",nC=".ng-animate-disabled",iC="ng-star-inserted",rC=[],aC={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},oC={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sC=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";y(this,t),this.namespaceId=n;var i=e&&e.hasOwnProperty("value"),r=i?e.value:e;if(this.value=fC(r),i){var a=iw(e);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return b(t,[{key:"absorbOptions",value:function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach((function(t){null==n[t]&&(n[t]=e[t])}))}}},{key:"params",get:function(){return this.options.params}}]),t}(),uC="void",lC=new sC(uC),cC=function(){function t(e,n,i){y(this,t),this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,yC(n,this._hostClassName)}return b(t,[{key:"listen",value:function(t,e,n,i){var r,a=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(e,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(e,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(e,'" is not supported!'));var o=Pk(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};o.push(s);var u=Pk(this._engine.statesByElement,t,{});return u.hasOwnProperty(e)||(yC(t,$k),yC(t,"ng-trigger-"+e),u[e]=lC),function(){a._engine.afterFlush((function(){var t=o.indexOf(s);t>=0&&o.splice(t,1),a._triggers[e]||delete u[e]}))}}},{key:"register",value:function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}},{key:"_getTrigger",value:function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'.concat(t,'" has not been registered!'));return e}},{key:"trigger",value:function(t,e,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this._getTrigger(e),o=new dC(this.id,e,t),s=this._engine.statesByElement.get(t);s||(yC(t,$k),yC(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var u=s[e],l=new sC(n,this.id),c=n&&n.hasOwnProperty("value");!c&&u&&l.absorbOptions(u.options),s[e]=l,u||(u=lC);var h=l.value===uC;if(h||u.value!==l.value){var d=Pk(this._engine.playersByElement,t,[]);d.forEach((function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()}));var f=a.matchTransition(u.value,l.value,t,l.params),p=!1;if(!f){if(!r)return;f=a.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:u,toState:l,player:o,isFallbackTransition:p}),p||(yC(t,tC),o.onStart((function(){_C(t,tC)}))),o.onDone((function(){var e=i.players.indexOf(o);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(o);r>=0&&n.splice(r,1)}})),this.players.push(o),d.push(o),o}if(!wC(u.params,l.params)){var m=[],v=a.matchStyles(u.value,u.params,m),g=a.matchStyles(l.value,l.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush((function(){uw(t,v),sw(t,g)}))}}},{key:"deregister",value:function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach((function(e,n){delete e[t]})),this._elementListeners.forEach((function(n,i){e._elementListeners.set(i,n.filter((function(e){return e.name!=t})))}))}},{key:"clearElementCache",value:function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach((function(t){return t.destroy()})),this._engine.playersByElement.delete(t))}},{key:"_signalRemovalForInnerTriggers",value:function(t,e){var n=this,i=this._engine.driver.query(t,Xk,!0);i.forEach((function(t){if(!t.__ng_removed){var i=n._engine.fetchNamespacesByElement(t);i.size?i.forEach((function(n){return n.triggerLeaveAnimation(t,e,!1,!0)})):n.clearElementCache(t)}})),this._engine.afterFlushAnimationsDone((function(){return i.forEach((function(t){return n.clearElementCache(t)}))}))}},{key:"triggerLeaveAnimation",value:function(t,e,n,i){var r=this,a=this._engine.statesByElement.get(t);if(a){var o=[];if(Object.keys(a).forEach((function(e){if(r._triggers[e]){var n=r.trigger(t,e,uC,i);n&&o.push(n)}})),o.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Ak(o).onDone((function(){return r._engine.processLeaveNode(t)})),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(t){var e=this,n=this._elementListeners.get(t);if(n){var i=new Set;n.forEach((function(n){var r=n.name;if(!i.has(r)){i.add(r);var a=e._triggers[r].fallbackTransition,o=e._engine.statesByElement.get(t)[r]||lC,s=new sC(uC),u=new dC(e.id,r,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:r,transition:a,fromState:o,toState:s,player:u,isFallbackTransition:!0})}}))}}},{key:"removeNode",value:function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),!this.triggerLeaveAnimation(t,e,!0)){var r=!1;if(i.totalAnimations){var a=i.players.length?i.playersByQueriedElement.get(t):[];if(a&&a.length)r=!0;else for(var o=t;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{var s=t.__ng_removed;s&&s!==aC||(i.afterFlush((function(){return n.clearElementCache(t)})),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}}},{key:"insertNode",value:function(t,e){yC(t,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(t){var e=this,n=[];return this._queue.forEach((function(i){var r=i.player;if(!r.destroyed){var a=i.element,o=e._elementListeners.get(a);o&&o.forEach((function(e){if(e.name==i.triggerName){var n=Rk(a,i.triggerName,i.fromState.value,i.toState.value);n._data=t,Ok(i.player,e.phase,n,e.callback)}})),r.markedForDestroy?e._engine.afterFlush((function(){r.destroy()})):n.push(i)}})),this._queue=[],n.sort((function(t,n){var i=t.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:e._engine.driver.containsElement(t.element,n.element)?1:-1}))}},{key:"destroy",value:function(t){this.players.forEach((function(t){return t.destroy()})),this._signalRemovalForInnerTriggers(this.hostElement,t)}},{key:"elementContainsData",value:function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find((function(e){return e.element===t}))||e}}]),t}(),hC=function(){function t(e,n,i){y(this,t),this.bodyNode=e,this.driver=n,this._normalizer=i,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(t,e){}}return b(t,[{key:"_onRemovalComplete",value:function(t,e){this.onRemovalComplete(t,e)}},{key:"createNamespace",value:function(t,e){var n=new cC(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}},{key:"_balanceNamespaceList",value:function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}},{key:"register",value:function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}},{key:"registerTrigger",value:function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}},{key:"destroy",value:function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush((function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)})),this.afterFlushAnimationsDone((function(){return i.destroy(e)}))}}},{key:"_fetchNamespace",value:function(t){return this._namespaceLookup[t]}},{key:"fetchNamespacesByElement",value:function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r=0&&this.collectedLeaveElements.splice(a,1)}if(t){var o=this._fetchNamespace(t);o&&o.insertNode(e,n)}i&&this.collectEnterElement(e)}}},{key:"collectEnterElement",value:function(t){this.collectedEnterElements.push(t)}},{key:"markElementAsDisabled",value:function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),yC(t,eC)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),_C(t,eC))}},{key:"removeNode",value:function(t,e,n,i){if(pC(e)){var r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){var a=this.namespacesByHostElement.get(e);a&&a.id!==t&&a.removeNode(e,i)}}else this._onRemovalComplete(e,i)}},{key:"markElementAsRemoved",value:function(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(t,e,n,i,r){return pC(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}}},{key:"_buildInstruction",value:function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}},{key:"destroyInnerAnimations",value:function(t){var e=this,n=this.driver.query(t,Xk,!0);n.forEach((function(t){return e.destroyActiveAnimationsForElement(t)})),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,Jk,!0)).forEach((function(t){return e.finishActiveQueriedAnimationOnElement(t)}))}},{key:"destroyActiveAnimationsForElement",value:function(t){var e=this.playersByElement.get(t);e&&e.forEach((function(t){t.queued?t.markedForDestroy=!0:t.destroy()}))}},{key:"finishActiveQueriedAnimationOnElement",value:function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach((function(t){return t.finish()}))}},{key:"whenRenderingDone",value:function(){var t=this;return new Promise((function(e){if(t.players.length)return Ak(t.players).onDone((function(){return e()}));e()}))}},{key:"processLeaveNode",value:function(t){var e=this,n=t.__ng_removed;if(n&&n.setForRemoval){if(t.__ng_removed=aC,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,nC)&&this.markElementAsDisabled(t,!1),this.driver.query(t,nC,!0).forEach((function(t){e.markElementAsDisabled(t,!1)}))}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((function(e,n){return t._balanceNamespaceList(e,n)})),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i=0;E--)this._namespaceList[E].drainQueuedTransitions(e).forEach((function(t){var e=t.player,a=t.element;if(S.push(e),n.collectedEnterElements.length){var l=a.__ng_removed;if(l&&l.setForMove)return void e.destroy()}var h=!d||!n.driver.containsElement(d,a),f=C.get(a),p=m.get(a),v=n._buildInstruction(t,i,p,f,h);if(v.errors&&v.errors.length)D.push(v);else{if(h)return e.onStart((function(){return uw(a,v.fromStyles)})),e.onDestroy((function(){return sw(a,v.toStyles)})),void r.push(e);if(t.isFallbackTransition)return e.onStart((function(){return uw(a,v.fromStyles)})),e.onDestroy((function(){return sw(a,v.toStyles)})),void r.push(e);v.timelines.forEach((function(t){return t.stretchStartingKeyframe=!0})),i.append(a,v.timelines),o.push({instruction:v,player:e,element:a}),v.queriedElements.forEach((function(t){return Pk(s,t,[]).push(e)})),v.preStyleProps.forEach((function(t,e){var n=Object.keys(t);if(n.length){var i=u.get(e);i||u.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}})),v.postStyleProps.forEach((function(t,e){var n=Object.keys(t),i=c.get(e);i||c.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}))}}));if(D.length){var A=[];D.forEach((function(t){A.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach((function(t){return A.push("- ".concat(t,"\n"))}))})),S.forEach((function(t){return t.destroy()})),this.reportError(A)}var I=new Map,O=new Map;o.forEach((function(t){var e=t.element;i.has(e)&&(O.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,I))})),r.forEach((function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach((function(t){Pk(I,e,[]).push(t),t.destroy()}))}));var T=g.filter((function(t){return CC(t,u,c)})),R=new Map;vC(R,this.driver,_,c,dk).forEach((function(t){CC(t,u,c)&&T.push(t)}));var P=new Map;p.forEach((function(t,e){vC(P,n.driver,new Set(t),u,Dk)})),T.forEach((function(t){var e=R.get(t),n=P.get(t);R.set(t,Object.assign(Object.assign({},e),n))}));var M=[],F=[],L={};o.forEach((function(t){var e=t.element,o=t.player,s=t.instruction;if(i.has(e)){if(h.has(e))return o.onDestroy((function(){return sw(e,s.toStyles)})),o.disabled=!0,o.overrideTotalTime(s.totalTime),void r.push(o);var u=L;if(O.size>1){for(var l=e,c=[];l=l.parentNode;){var d=O.get(l);if(d){u=d;break}c.push(l)}c.forEach((function(t){return O.set(t,u)}))}var f=n._buildAnimation(o.namespaceId,s,I,a,P,R);if(o.setRealPlayer(f),u===L)M.push(o);else{var p=n.playersByElement.get(u);p&&p.length&&(o.parentPlayer=Ak(p)),r.push(o)}}else uw(e,s.fromStyles),o.onDestroy((function(){return sw(e,s.toStyles)})),F.push(o),h.has(e)&&r.push(o)})),F.forEach((function(t){var e=a.get(t.element);if(e&&e.length){var n=Ak(e);t.setRealPlayer(n)}})),r.forEach((function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()}));for(var N=0;N0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new xk(t.duration,t.delay)}},{key:"queuedPlayers",get:function(){var t=[];return this._namespaceList.forEach((function(e){e.players.forEach((function(e){e.queued&&t.push(e)}))})),t}}]),t}(),dC=function(){function t(e,n,i){y(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new xk,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return b(t,[{key:"setRealPlayer",value:function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach((function(n){e._queuedCallbacks[n].forEach((function(e){return Ok(t,n,void 0,e)}))})),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(t){this.totalTime=t}},{key:"syncPlayerEvents",value:function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart((function(){return n.triggerCallback("start")})),t.onDone((function(){return e.finish()})),t.onDestroy((function(){return e.destroy()}))}},{key:"_queueEvent",value:function(t,e){Pk(this._queuedCallbacks,t,[]).push(e)}},{key:"onDone",value:function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}},{key:"onStart",value:function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}},{key:"onDestroy",value:function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}},{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(t){this.queued||this._player.setPosition(t)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)}}]),t}();function fC(t){return null!=t?t:null}function pC(t){return t&&1===t.nodeType}function mC(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function vC(t,e,n,i,r){var a=[];n.forEach((function(t){return a.push(mC(t))}));var o=[];i.forEach((function(n,i){var a={};n.forEach((function(t){var n=a[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=oC,o.push(i))})),t.set(i,a)}));var s=0;return n.forEach((function(t){return mC(t,a[s++])})),o}function gC(t,e){var n=new Map;if(t.forEach((function(t){return n.set(t,[])})),0==e.length)return n;var i=new Set(e),r=new Map;function a(t){if(!t)return 1;var e=r.get(t);if(e)return e;var o=t.parentNode;return e=n.has(o)?o:i.has(o)?1:a(o),r.set(t,e),e}return e.forEach((function(t){var e=a(t);1!==e&&n.get(e).push(t)})),n}function yC(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function _C(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function bC(t,e,n){Ak(n).onDone((function(){return t.processLeaveNode(e)}))}function kC(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(t)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),t}();function SC(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=EC(e[0]),e.length>1&&(i=EC(e[e.length-1]))):e&&(n=EC(e)),n||i?new DC(t,n,i):null}var DC=function(){var t=function(){function t(e,n,i){y(this,t),this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;var r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}return b(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&sw(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(sw(this._element,this._initialStyles),this._endStyles&&(sw(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(uw(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(uw(this._element,this._endStyles),this._endStyles=null),sw(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function EC(t){for(var e=null,n=Object.keys(t),i=0;i=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),FC(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(i=MC(n=NC(t=this._element,"").split(","),e))>=0&&(n.splice(i,1),LC(t,"",n.join(","))))}}]),t}();function RC(t,e,n){LC(t,"PlayState",n,PC(t,e))}function PC(t,e){var n=NC(t,"");return n.indexOf(",")>0?MC(n.split(","),e):MC([n],e)}function MC(t,e){for(var n=0;n=0)return n;return-1}function FC(t,e,n){n?t.removeEventListener(OC,e):t.addEventListener(OC,e)}function LC(t,e,n,i){var r=IC+e;if(null!=i){var a=t.style[r];if(a.length){var o=a.split(",");o[i]=n,n=o.join(",")}}t.style[r]=n}function NC(t,e){return t.style[IC+e]}var VC=function(){function t(e,n,i,r,a,o,s,u){y(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=a,this._finalStyles=s,this._specialStyles=u,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=r+a,this._buildStyler()}return b(t,[{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{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(t){return t()})),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach((function(t){return t()})),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(t){this._styler.setPosition(t)}},{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._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var t=this;this._styler=new TC(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",(function(){return t.finish()}))}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}},{key:"beforeDestroy",value:function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach((function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:_w(t.element,i))}))}this.currentSnapshot=e}}]),t}(),BC=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this)).element=t,r._startingStyles={},r.__initialized=!1,r._styles=qk(i),r}return b(n,[{key:"init",value:function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach((function(e){t._startingStyles[e]=t.element.style[e]})),r(i(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach((function(e){return t.element.style.setProperty(e,t._styles[e])})),r(i(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach((function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)})),this._startingStyles=null,r(i(n.prototype),"destroy",this).call(this))}}]),n}(xk),jC="gen_css_kf_",zC=function(){function t(){y(this,t),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return b(t,[{key:"validateStyleProperty",value:function(t){return zk(t)}},{key:"matchesElement",value:function(t,e){return Hk(t,e)}},{key:"containsElement",value:function(t,e){return Uk(t,e)}},{key:"query",value:function(t,e,n){return Wk(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"buildKeyframeElement",value:function(t,e,n){n=n.map((function(t){return qk(t)}));var i="@keyframes ".concat(e," {\n"),r="";n.forEach((function(t){r=" ";var e=parseFloat(t.offset);i+="".concat(r).concat(100*e,"% {\n"),r+=" ",Object.keys(t).forEach((function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(e,": ").concat(n,";\n"))}})),i+="".concat(r,"}\n")})),i+="}\n";var a=document.createElement("style");return a.textContent=i,a}},{key:"animate",value:function(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;o&&this._notifyFaultyScrubber();var s=a.filter((function(t){return t instanceof VC})),u={};vw(n,i)&&s.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return u[t]=e[t]}))}));var l=HC(e=gw(t,e,u));if(0==n)return new BC(t,l);var c="".concat(jC).concat(this._count++),h=this.buildKeyframeElement(t,c,e);document.querySelector("head").appendChild(h);var d=SC(t,e),f=new VC(t,e,c,n,i,r,l,d);return f.onDestroy((function(){return UC(h)})),f}},{key:"_notifyFaultyScrubber",value:function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}]),t}();function HC(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach((function(t){Object.keys(t).forEach((function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])}))})),e}function UC(t){t.parentNode.removeChild(t)}var WC=function(){function t(e,n,i,r){y(this,t),this.element=e,this.keyframes=n,this.options=i,this._specialStyles=r,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=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return b(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",(function(){return t._onFinish()}))}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(t,e,n){return t.animate(e,n)}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach((function(t){return t()})),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(t){return t()})),this._onDestroyFns=[])}},{key:"setPosition",value:function(t){this.domPlayer.currentTime=t*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach((function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:_w(t.element,n))})),this.currentSnapshot=e}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),t}(),qC=function(){function t(){y(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(YC().toString()),this._cssKeyframesDriver=new zC}return b(t,[{key:"validateStyleProperty",value:function(t){return zk(t)}},{key:"matchesElement",value:function(t,e){return Hk(t,e)}},{key:"containsElement",value:function(t,e){return Uk(t,e)}},{key:"query",value:function(t,e,n){return Wk(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"overrideWebAnimationsSupport",value:function(t){this._isNativeImpl=t}},{key:"animate",value:function(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0,s=!o&&!this._isNativeImpl;if(s)return this._cssKeyframesDriver.animate(t,e,n,i,r,a);var u=0==i?"both":"forwards",l={duration:n,delay:i,fill:u};r&&(l.easing=r);var c={},h=a.filter((function(t){return t instanceof WC}));vw(n,i)&&h.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return c[t]=e[t]}))}));var d=SC(t,e=gw(t,e=e.map((function(t){return rw(t,!1)})),c));return new WC(t,e,l,d)}}]),t}();function YC(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var GC=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this))._nextAnimationId=0,r._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Te.None,styles:[],data:{animation:[]}}),r}return b(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?vk(t):t;return $C(this._renderer,null,e,"register",[n]),new KC(e,this._renderer)}}]),n}(ck);return t.\u0275fac=function(e){return new(e||t)(pe(Cu),pe(Zc))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),KC=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this))._id=t,r._renderer=i,r}return b(n,[{key:"create",value:function(t,e){return new ZC(this._id,t,e||{},this._renderer)}}]),n}(hk),ZC=function(){function t(e,n,i,r){y(this,t),this.id=e,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return b(t,[{key:"_listen",value:function(t,e){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(t),e)}},{key:"_command",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=0&&t1&&void 0!==arguments[1]?arguments[1]:0,n=function(t){f(i,t);var n=g(i);function i(){var t;y(this,i);for(var r=arguments.length,a=new Array(r),o=0;o0?n:t}}]),t}(),Sx=new re("mat-date-formats");try{wx="undefined"!=typeof Intl}catch(eW){wx=!1}var Dx={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},Ex=Ox(31,(function(t){return String(t+1)})),Ax={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},Ix=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function Ox(t,e){for(var n=Array(t),i=0;i9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())}},{key:"addCalendarYears",value:function(t,e){return this.addCalendarMonths(t,12*e)}},{key:"addCalendarMonths",value:function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}},{key:"toIso8601",value:function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}},{key:"deserialize",value:function(t){if("string"==typeof t){if(!t)return null;if(Ix.test(t)){var e=new Date(t);if(this.isValid(e))return e}}return r(i(n.prototype),"deserialize",this).call(this,t)}},{key:"isDateInstance",value:function(t){return t instanceof Date}},{key:"isValid",value:function(t){return!isNaN(t.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(t,e,n){var i=new Date;return i.setFullYear(t,e,n),i.setHours(0,0,0,0),i}},{key:"_2digit",value:function(t){return("00"+t).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(t){return t.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(t,e){var n=new Date;return n.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(n)}}]),n}(xx);return t.\u0275fac=function(e){return new(e||t)(pe(Cx,8),pe(Jy))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),Rx=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:xx,useClass:Tx}],imports:[[t_]]}),t}(),Px={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},Mx=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:Sx,useValue:Px}],imports:[[Rx]]}),t}(),Fx=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Lx=function(){function t(e,n,i){y(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return b(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),Nx={enterDuration:450,exitDuration:400},Vx=i_({passive:!0}),Bx=["mousedown","touchstart"],jx=["mouseup","mouseleave","touchend","touchcancel"],zx=function(){function t(e,n,i,r){y(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=vy(i))}return b(t,[{key:"fadeInRipple",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=Object.assign(Object.assign({},Nx),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var o=i.radius||Ux(t,e,r),s=t-r.left,u=e-r.top,l=a.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left="".concat(s-o,"px"),c.style.top="".concat(u-o,"px"),c.style.height="".concat(2*o,"px"),c.style.width="".concat(2*o,"px"),null!=i.color&&(c.style.backgroundColor=i.color),c.style.transitionDuration="".concat(l,"ms"),this._containerElement.appendChild(c),Hx(c),c.style.transform="scale(1)";var h=new Lx(this,c,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone((function(){var t=h===n._mostRecentTransientRipple;h.state=1,i.persistent||t&&n._isPointerDown||h.fadeOut()}),l),h}},{key:"fadeOutRipple",value:function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=Object.assign(Object.assign({},Nx),t.config.animation);n.style.transitionDuration="".concat(i.exitDuration,"ms"),n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone((function(){t.state=3,n.parentNode.removeChild(n)}),i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach((function(t){return t.fadeOut()}))}},{key:"setupTriggerEvents",value:function(t){var e=vy(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Bx))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(jx),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=Qb(t),n=this._lastTouchStartEvent&&Date.now()1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular((function(){return setTimeout(t,e)}))}},{key:"_registerEvents",value:function(t){var e=this;this._ngZone.runOutsideAngular((function(){t.forEach((function(t){e._triggerElement.addEventListener(t,e,Vx)}))}))}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(Bx.forEach((function(e){t._triggerElement.removeEventListener(e,t,Vx)})),this._pointerUpEventsRegistered&&jx.forEach((function(e){t._triggerElement.removeEventListener(e,t,Vx)})))}}]),t}();function Hx(t){window.getComputedStyle(t).getPropertyValue("opacity")}function Ux(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}var Wx=new re("mat-ripple-global-options"),qx=function(){var t=function(){function t(e,n,i,r,a){y(this,t),this._elementRef=e,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new zx(this,n,e,i)}return b(t,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}},{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}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(mc),ds(Jy),ds(Wx,8),ds(ix,8))},t.\u0275dir=ze({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&qs("mat-ripple-unbounded",e.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"]}),t}(),Yx=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[mx,t_],mx]}),t}(),Gx=function(){var t=function t(e){y(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1};return t.\u0275fac=function(e){return new(e||t)(ds(ix,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&qs("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},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}),t}(),Kx=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),Zx=vx((function t(){y(this,t)})),$x=0,Xx=function(){var t=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._labelId="mat-optgroup-label-".concat($x++),t}return n}(Zx);return t.\u0275fac=function(e){return Qx(e||t)},t.\u0275dir=ze({type:t,inputs:{label:"label"},features:[Zo]}),t}(),Qx=Ui(Xx),Jx=new re("MatOptgroup"),tS=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(Xx);return t.\u0275fac=function(e){return eS(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(t,e){2&t&&(us("aria-disabled",e.disabled.toString())("aria-labelledby",e._labelId),qs("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[vu([{provide:Jx,useExisting:t}]),Zo],ngContentSelectors:ux,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(Ps(sx),vs(0,"label",0),nu(1),Ms(2),gs(),Ms(3,1)),2&t&&(ps("id",e._labelId),Xr(1),ru("",e.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}),t}(),eS=Ui(tS),nS=0,iS=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];y(this,t),this.source=e,this.isUserInput=n},rS=new re("MAT_OPTION_PARENT_COMPONENT"),aS=function(){var t=function(){function t(e,n,i,r){y(this,t),this._element=e,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(nS++),this.onSelectionChange=new xl,this._stateChanges=new U}return b(t,[{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(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)}},{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(t){t.keyCode!==M_&&t.keyCode!==L_||U_(t)||(this._selectViaInteraction(),t.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 t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new iS(this,t))}},{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(t){this._disabled=hy(t)}},{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()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(void 0),ds(Xx))},t.\u0275dir=ze({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t}(),oS=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a){return y(this,n),e.call(this,t,i,r,a)}return n}(aS);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(rS,8),ds(Jx,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&Ss("click",(function(){return e._selectViaInteraction()}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&(ou("id",e.id),us("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),qs("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[Zo],ngContentSelectors:cx,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(t,e){1&t&&(Ps(),cs(0,lx,1,2,"mat-pseudo-checkbox",0),vs(1,"span",1),Ms(2),gs(),ys(3,"div",2)),2&t&&(ps("ngIf",e.multiple),Xr(3),ps("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[yd,qx,Gx],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}.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}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t}();function sS(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),a=0,o=0;on+i?Math.max(0,t-i+e):n}var lS=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Yx,Qd,Kx]]}),t}(),cS=new re("mat-label-global-options");function hS(t,e){}var dS=function t(){y(this,t),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},fS={dialogContainer:fk("dialogContainer",[yk("void, exit",gk({opacity:0,transform:"scale(0.7)"})),yk("enter",gk({transform:"none"})),bk("* => enter",pk("150ms cubic-bezier(0, 0, 0.2, 1)",gk({transform:"none",opacity:1}))),bk("* => void, * => exit",pk("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",gk({opacity:0})))])},pS=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s){var u;return y(this,n),(u=e.call(this))._elementRef=t,u._focusTrapFactory=i,u._changeDetectorRef=r,u._config=o,u._focusMonitor=s,u._animationStateChanged=new xl,u._elementFocusedBeforeDialogWasOpened=null,u._closeInteractionType=null,u.attachDomPortal=function(t){return u._portalOutlet.hasAttached(),u._portalOutlet.attachDomPortal(t)},u._ariaLabelledBy=o.ariaLabelledBy||null,u._document=a,u}return b(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){var e=this._document.activeElement,n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}]),n}(S_);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Yb),ds(Eo),ds(Zc,8),ds(dS),ds(ek))},t.\u0275dir=ze({type:t,viewQuery:function(t,e){var n;1&t&&Nl(A_,!0),2&t&&Ll(n=Ul())&&(e._portalOutlet=n.first)},features:[Zo]}),t}(),mS=function(){var t=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._state="enter",t}return b(n,[{key:"_onAnimationDone",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===e&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==e&&"void"!==e||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(pS);return t.\u0275fac=function(e){return vS(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&Ds("@dialogContainer.start",(function(t){return e._onAnimationStart(t)}))("@dialogContainer.done",(function(t){return e._onAnimationDone(t)})),2&t&&(ou("id",e._id),us("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),su("@dialogContainer",e._state))},features:[Zo],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&cs(0,hS,0,0,"ng-template",0)},directives:[A_],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[fS.dialogContainer]}}),t}(),vS=Ui(mS),gS=0,yS=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-".concat(gS++);y(this,t),this._overlayRef=e,this._containerInstance=n,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new U,this._afterClosed=new U,this._beforeClosed=new U,this._state=0,n._id=r,n._animationStateChanged.pipe(Vf((function(t){return"opened"===t.state})),Gp(1)).subscribe((function(){i._afterOpened.next(),i._afterOpened.complete()})),n._animationStateChanged.pipe(Vf((function(t){return"closed"===t.state})),Gp(1)).subscribe((function(){clearTimeout(i._closeFallbackTimeout),i._finishDialogClose()})),e.detachments().subscribe((function(){i._beforeClosed.next(i._result),i._beforeClosed.complete(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()})),e.keydownEvents().pipe(Vf((function(t){return t.keyCode===F_&&!i.disableClose&&!U_(t)}))).subscribe((function(t){t.preventDefault(),_S(i,"keyboard")})),e.backdropClick().subscribe((function(){i.disableClose?i._containerInstance._recaptureFocus():_S(i,"mouse")}))}return b(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Vf((function(t){return"closing"===t.state})),Gp(1)).subscribe((function(n){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop(),e._closeFallbackTimeout=setTimeout((function(){return e._finishDialogClose()}),n.totalTime+100)})),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(t){return this._overlayRef.addPanelClass(t),this}},{key:"removePanelClass",value:function(t){return this._overlayRef.removePanelClass(t),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),t}();function _S(t,e,n){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(n)}var bS=new re("MatDialogData"),kS=new re("mat-dialog-default-options"),wS=new re("mat-dialog-scroll-strategy"),CS={provide:wS,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},xS=function(){var t=function(){function t(e,n,i,r,a,o,s,u,l){var c=this;y(this,t),this._overlay=e,this._injector=n,this._defaultOptions=i,this._parentDialog=r,this._overlayContainer=a,this._dialogRefConstructor=s,this._dialogContainerType=u,this._dialogDataToken=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new U,this._afterOpenedAtThisLevel=new U,this._ariaHiddenElements=new Map,this.afterAllClosed=Tp((function(){return c.openDialogs.length?c._getAfterAllClosed():c._getAfterAllClosed().pipe(Xp(void 0))})),this._scrollStrategy=o}return b(t,[{key:"_getAfterAllClosed",value:function(){var t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(t,e){var n=this;(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new dS)).id&&this.getDialogById(e.id);var i=this._createOverlay(e),r=this._attachDialogContainer(i,e),a=this._attachDialogContent(t,r,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.afterClosed().subscribe((function(){return n._removeOpenDialog(a)})),this.afterOpened.next(a),r._initializeWithAttachedContent(),a}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(t){return this.openDialogs.find((function(e){return e.id===t}))}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)}},{key:"_getOverlayConfig",value:function(t){var e=new X_({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}},{key:"_attachDialogContainer",value:function(t,e){var n=qo.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:dS,useValue:e}]}),i=new w_(this._dialogContainerType,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var r=new this._dialogRefConstructor(n,e,i.id);if(t instanceof qu)e.attachTemplatePortal(new C_(t,null,{$implicit:i.data,dialogRef:r}));else{var a=this._createInjector(i,r,e),o=e.attachComponentPortal(new w_(t,i.viewContainerRef,a));r.componentInstance=o.instance}return r.updateSize(i.width,i.height).updatePosition(i.position),r}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||i&&i.get(s_,null)||r.push({provide:s_,useValue:{value:t.direction,change:Lf()}}),qo.create({parent:i||this._injector,providers:r})}},{key:"_removeOpenDialog",value:function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")})),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(t){for(var e=t.length;e--;)t[e].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(vb),ds(qo),ds(void 0),ds(void 0),ds(rb),ds(void 0),ds(Io),ds(Io),ds(re))},t.\u0275dir=ze({type:t}),t}(),SS=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u){return y(this,n),e.call(this,t,i,a,s,u,o,yS,mS,bS)}return n}(xS);return t.\u0275fac=function(e){return new(e||t)(pe(vb),pe(qo),pe(ch,8),pe(kS,8),pe(wS),pe(t,12),pe(rb))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),DS=0,ES=function(){var t=function(){function t(e,n,i){y(this,t),this.dialogRef=e,this._elementRef=n,this._dialog=i,this.type="button"}return b(t,[{key:"ngOnInit",value:function(){this.dialogRef||(this.dialogRef=TS(this._elementRef,this._dialog.openDialogs))}},{key:"ngOnChanges",value:function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}},{key:"_onButtonClick",value:function(t){_S(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(yS,8),ds(ku),ds(SS))},t.\u0275dir=ze({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&Ss("click",(function(t){return e._onButtonClick(t)})),2&t&&us("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[nn]}),t}(),AS=function(){var t=function(){function t(e,n,i){y(this,t),this._dialogRef=e,this._elementRef=n,this._dialog=i,this.id="mat-dialog-title-".concat(DS++)}return b(t,[{key:"ngOnInit",value:function(){var t=this;this._dialogRef||(this._dialogRef=TS(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then((function(){var e=t._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=t.id)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(yS,8),ds(ku),ds(SS))},t.\u0275dir=ze({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&ou("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t}(),IS=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t}(),OS=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t}();function TS(t,e){for(var n=t.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?e.find((function(t){return t.id===n.id})):null}var RS=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[SS,CS],imports:[[wb,T_,mx],mx]}),t}();function PS(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var MS=["mat-button",""],FS=["*"],LS=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.cdk-high-contrast-active .mat-button-focus-overlay{background-color:#fff}.cdk-high-contrast-black-on-white .mat-button-focus-overlay{background-color:#000}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}\n",NS=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],VS=gx(vx(yx((function t(e){y(this,t),this._elementRef=e})))),BS=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;y(this,n),(a=e.call(this,t))._focusMonitor=i,a._animationMode=r,a.isRoundButton=a._hasHostAttributes("mat-fab","mat-mini-fab"),a.isIconButton=a._hasHostAttributes("mat-icon-button");var o,s=h(NS);try{for(s.s();!(o=s.n()).done;){var u=o.value;a._hasHostAttributes(u)&&a._getHostElement().classList.add(u)}}catch(l){s.e(l)}finally{s.f()}return t.nativeElement.classList.add("mat-button-base"),a.isRoundButton&&(a.color="accent"),a}return b(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),t,e)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&(this.dialogRef.afterClosed().subscribe((function(e){t.closed()})),this.setExtra(this.data.autoclose),this.subscription=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Py;return(!Ny(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Py),new V((function(n){return n.add(e.schedule(PS,t,{subscriber:n,counter:0,period:t})),n}))}(1e3).subscribe((function(e){var n=t.data.autoclose-1e3*(e+1);t.setExtra(n),n<=0&&t.close()})))},t.prototype.initYesNo=function(){},t.prototype.ngOnInit=function(){!0===this.data.warnOnYes&&(this.yesColor="warn",this.noColor="primary"),this.data.type===GS.yesno?this.initYesNo():this.initAlert()},t.\u0275fac=function(e){return new(e||t)(ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-modal"]],decls:8,vars:9,consts:[["mat-dialog-title","",3,"innerHtml"],[3,"innerHTML"],["mat-raised-button","","mat-dialog-close","",3,"click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"color","click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"click"],["mat-raised-button","","mat-dialog-close","",3,"color","click"]],template:function(t,e){1&t&&(ys(0,"h4",0),_l(1,"safeHtml"),ys(2,"mat-dialog-content",1),_l(3,"safeHtml"),vs(4,"mat-dialog-actions"),cs(5,WS,4,1,"button",2),cs(6,qS,3,1,"button",3),cs(7,YS,3,1,"button",3),gs()),2&t&&(ps("innerHtml",bl(1,5,e.data.title),Or),Xr(2),ps("innerHTML",bl(3,7,e.data.body),Or),Xr(3),ps("ngIf",0==e.data.type),Xr(1),ps("ngIf",1==e.data.type),Xr(1),ps("ngIf",1==e.data.type))},directives:[AS,IS,OS,yd,BS,ES,HS],pipes:[US],styles:[".uds-modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:left}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),ZS=function(t){return t.TEXT="text",t.TEXTBOX="textbox",t.NUMERIC="numeric",t.PASSWORD="password",t.HIDDEN="hidden",t.CHOICE="choice",t.MULTI_CHOICE="multichoice",t.EDITLIST="editlist",t.CHECKBOX="checkbox",t.IMAGECHOICE="imgchoice",t.DATE="date",t.DATETIME="datetime",t.TAGLIST="taglist",t}({}),$S=function(){function t(){}return t.locateChoice=function(t,e){var n=e.gui.values.find((function(e){return e.id===t}));if(void 0===n)try{n=e.gui.values[0]}catch(i){n={id:"",img:"",text:""}}return n},t}();function XS(t,e){return new V((function(n){var i=t.length;if(0!==i)for(var r=new Array(i),a=0,o=0,s=function(s){var u=nt(t[s]),l=!1;n.add(u.subscribe({next:function(t){l||(l=!0,o++),r[s]=t},error:function(t){return n.error(t)},complete:function(){++a!==i&&l||(o===i&&n.next(e?e.reduce((function(t,e,n){return t[e]=r[n],t}),{}):r),n.complete())}}))},u=0;u0&&void 0!==arguments[0]?arguments[0]:void 0;this.control&&this.control.reset(t)}},{key:"hasError",value:function(t,e){return!!this.control&&this.control.hasError(t,e)}},{key:"getError",value:function(t,e){return this.control?this.control.getError(t,e):null}},{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}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t}),t}(),aD=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(rD);return t.\u0275fac=function(e){return oD(e||t)},t.\u0275dir=ze({type:t,features:[Zo]}),t}(),oD=Ui(aD),sD=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t._rawValidators=[],t._rawAsyncValidators=[],t}return b(n,[{key:"validator",get:function(){}},{key:"asyncValidator",get:function(){}}]),n}(rD),uD=function(){function t(e){y(this,t),this._cd=e}return b(t,[{key:"ngClassUntouched",get:function(){return!!this._cd.control&&this._cd.control.untouched}},{key:"ngClassTouched",get:function(){return!!this._cd.control&&this._cd.control.touched}},{key:"ngClassPristine",get:function(){return!!this._cd.control&&this._cd.control.pristine}},{key:"ngClassDirty",get:function(){return!!this._cd.control&&this._cd.control.dirty}},{key:"ngClassValid",get:function(){return!!this._cd.control&&this._cd.control.valid}},{key:"ngClassInvalid",get:function(){return!!this._cd.control&&this._cd.control.invalid}},{key:"ngClassPending",get:function(){return!!this._cd.control&&this._cd.control.pending}}]),t}(),lD=function(){var t=function(t){f(n,t);var e=g(n);function n(t){return y(this,n),e.call(this,t)}return n}(uD);return t.\u0275fac=function(e){return new(e||t)(ds(sD,2))},t.\u0275dir=ze({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&qs("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[Zo]}),t}(),cD=function(){var t=function(t){f(n,t);var e=g(n);function n(t){return y(this,n),e.call(this,t)}return n}(uD);return t.\u0275fac=function(e){return new(e||t)(ds(aD,2))},t.\u0275dir=ze({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&qs("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[Zo]}),t}();function hD(t){return null==t||0===t.length}function dD(t){return null!=t&&"number"==typeof t.length}var fD=new re("NgValidators"),pD=new re("NgAsyncValidators"),mD=/^(?=.{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])?)*$/,vD=function(){function t(){y(this,t)}return b(t,null,[{key:"min",value:function(t){return function(e){if(hD(e.value)||hD(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&nt?{max:{max:t,actual:e.value}}:null}}},{key:"required",value:function(t){return hD(t.value)?{required:!0}:null}},{key:"requiredTrue",value:function(t){return!0===t.value?null:{required:!0}}},{key:"email",value:function(t){return hD(t.value)||mD.test(t.value)?null:{email:!0}}},{key:"minLength",value:function(t){return function(e){return hD(e.value)||!dD(e.value)?null:e.value.lengtht?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}}},{key:"pattern",value:function(e){return e?("string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),n=new RegExp(i)):(i=e.toString(),n=e),function(t){if(hD(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:i,actualValue:e}}}):t.nullValidator;var n,i}},{key:"nullValidator",value:function(t){return null}},{key:"compose",value:function(t){if(!t)return null;var e=t.filter(gD);return 0==e.length?null:function(t){return _D(bD(t,e))}}},{key:"composeAsync",value:function(t){if(!t)return null;var e=t.filter(gD);return 0==e.length?null:function(t){return function(){for(var t=arguments.length,e=new Array(t),n=0;n=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}},{key:"select",value:function(t){var e=this;this._accessors.forEach((function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)}))}},{key:"_isSameGroup",value:function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),DD=function(){var t=function(){function t(e,n,i,r){y(this,t),this._renderer=e,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return b(t,[{key:"ngOnInit",value:function(){this._control=this._injector.get(sD),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}}},{key:"fireUncheck",value:function(t){this.writeValue(t)}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Su),ds(ku),ds(SD),ds(qo))},t.\u0275dir=ze({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&Ss("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[vu([xD])]}),t}(),ED={provide:QS,useExisting:Ht((function(){return AD})),multi:!0},AD=function(){var t=function(){function t(e,n){y(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return b(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Su),ds(ku))},t.\u0275dir=ze({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&Ss("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[vu([ED])]}),t}(),ID={provide:QS,useExisting:Ht((function(){return TD})),multi:!0};function OD(t,e){return null==t?"".concat(e):(e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}var TD=function(){var t=function(){function t(e,n){y(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Object.is}return b(t,[{key:"writeValue",value:function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=OD(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(t){for(var e=0,n=Array.from(this._optionMap.keys());e-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){var i=[];if(void 0!==n.selectedOptions)for(var r=n.selectedOptions,a=0;a-1&&t.splice(n,1)}function KD(t,e,n,i){ar()&&"never"!==i&&((null!==i&&"once"!==i||e._ngModelWarningSentOnce)&&("always"!==i||n._ngModelWarningSent)||(e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}var ZD="VALID",$D="INVALID",XD="PENDING",QD="DISABLED";function JD(t){return(iE(t)?t.validators:t)||null}function tE(t){return Array.isArray(t)?zD(t):t||null}function eE(t,e){return(iE(e)?e.asyncValidators:t)||null}function nE(t){return Array.isArray(t)?HD(t):t||null}function iE(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var rE=function(){function t(e,n){y(this,t),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=tE(this._rawValidators),this._composedAsyncValidatorFn=nE(this._rawAsyncValidators)}return b(t,[{key:"setValidators",value:function(t){this._rawValidators=t,this._composedValidatorFn=tE(t)}},{key:"setAsyncValidators",value:function(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=nE(t)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild((function(t){return t.markAllAsTouched()}))}},{key:"markAsUntouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild((function(t){t.markAsUntouched({onlySelf:!0})})),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"markAsDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}},{key:"markAsPristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild((function(t){t.markAsPristine({onlySelf:!0})})),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"markAsPending",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status=XD,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}},{key:"disable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=QD,this.errors=null,this._forEachChild((function(e){e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))})),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach((function(t){return t(!0)}))}},{key:"enable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=ZD,this._forEachChild((function(e){e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))})),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach((function(t){return t(!1)}))}},{key:"_updateAncestors",value:function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(t){this._parent=t}},{key:"updateValueAndValidity",value:function(){var t=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!==ZD&&this.status!==XD||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}},{key:"_updateTreeValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild((function(e){return e._updateTreeValidity(t)})),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?QD:ZD}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(t){var e=this;if(this.asyncValidator){this.status=XD,this._hasOwnPendingAsyncValidator=!0;var n=yD(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe((function(n){e._hasOwnPendingAsyncValidator=!1,e.setErrors(n,{emitEvent:t})}))}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}},{key:"get",value:function(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;var i=t;return e.forEach((function(t){i=i instanceof oE?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof sE&&i.at(t)||null})),i}(this,t)}},{key:"getError",value:function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}},{key:"hasError",value:function(t,e){return!!this.getError(t,e)}},{key:"_updateControlsErrors",value:function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}},{key:"_initObservables",value:function(){this.valueChanges=new xl,this.statusChanges=new xl}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?QD:this.errors?$D:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(XD)?XD:this._anyControlsHaveStatus($D)?$D:ZD}},{key:"_anyControlsHaveStatus",value:function(t){return this._anyControls((function(e){return e.status===t}))}},{key:"_anyControlsDirty",value:function(){return this._anyControls((function(t){return t.dirty}))}},{key:"_anyControlsTouched",value:function(){return this._anyControls((function(t){return t.touched}))}},{key:"_updatePristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"_updateTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"_isBoxedValue",value:function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}},{key:"_registerOnCollectionChange",value:function(t){this._onCollectionChange=t}},{key:"_setUpdateStrategy",value:function(t){iE(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(t){this._rawValidators=this._composedValidatorFn=t}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===ZD}},{key:"invalid",get:function(){return this.status===$D}},{key:"pending",get:function(){return this.status==XD}},{key:"disabled",get:function(){return this.status===QD}},{key:"enabled",get:function(){return this.status!==QD}},{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:"root",get:function(){for(var t=this;t._parent;)t=t._parent;return t}}]),t}(),aE=function(t){f(n,t);var e=g(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return y(this,n),(t=e.call(this,JD(r),eE(a,r)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(r),t.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),t._initObservables(),t}return b(n,[{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach((function(t){return t(e.value,!1!==n.emitViewToModelChange)})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(t,e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(t){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(t){this._onChange.push(t)}},{key:"_clearChangeFns",value:function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}}},{key:"registerOnDisabledChange",value:function(t){this._onDisabledChange.push(t)}},{key:"_forEachChild",value:function(t){}},{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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}]),n}(rE),oE=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,JD(i),eE(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),a}return b(n,[{key:"registerControl",value:function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}},{key:"addControl",value:function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),Object.keys(t).forEach((function(i){e._throwIfControlMissing(i),e.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((function(i){e.controls[i]&&e.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})})),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this._reduceChildren({},(function(t,e,n){return t[n]=e instanceof aE?e.value:e.getRawValue(),t}))}},{key:"_syncPendingControls",value:function(){var t=this._reduceChildren(!1,(function(t,e){return!!e._syncPendingControls()||t}));return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){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[t])throw new Error("Cannot find form control with name: ".concat(t,"."))}},{key:"_forEachChild",value:function(t){var e=this;Object.keys(this.controls).forEach((function(n){return t(e.controls[n],n)}))}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild((function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)}))}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(t){for(var e=0,n=Object.keys(this.controls);e0||this.disabled}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild((function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))}))}}]),n}(rE),sE=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,JD(i),eE(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),a}return b(n,[{key:"at",value:function(t){return this.controls[t]}},{key:"push",value:function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}},{key:"removeAt",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),this.controls.splice(t,1),this.updateValueAndValidity()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),t.forEach((function(t,i){e._throwIfControlMissing(i),e.at(i).setValue(t,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach((function(t,i){e.at(i)&&e.at(i).patchValue(t,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})})),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this.controls.map((function(t){return t instanceof aE?t.value:t.getRawValue()}))}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild((function(t){return t._registerOnCollectionChange((function(){}))})),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var t=this.controls.reduce((function(t,e){return!!e._syncPendingControls()||t}),!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){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(t))throw new Error("Cannot find form control at index ".concat(t))}},{key:"_forEachChild",value:function(t){this.controls.forEach((function(e,n){t(e,n)}))}},{key:"_updateValue",value:function(){var t=this;this.value=this.controls.filter((function(e){return e.enabled||t.disabled})).map((function(t){return t.value}))}},{key:"_anyControls",value:function(t){return this.controls.some((function(e){return e.enabled&&t(e)}))}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild((function(e){return t._registerControl(e)}))}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild((function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))}))}},{key:"_allControlsDisabled",value:function(){var t,e=h(this.controls);try{for(e.s();!(t=e.n()).done;)if(t.value.enabled)return!1}catch(n){e.e(n)}finally{e.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(rE),uE={provide:aD,useExisting:Ht((function(){return cE}))},lE=function(){return Promise.resolve(null)}(),cE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new xl,r.form=new oE({},zD(t),HD(i)),r}return b(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;lE.then((function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),VD(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)}))}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){var e=this;lE.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),GD(e._directives,t)}))}},{key:"addFormGroup",value:function(t){var e=this;lE.then((function(){var n=e._findContainer(t.path),i=new oE({});jD(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})}))}},{key:"removeFormGroup",value:function(t){var e=this;lE.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)}))}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){var n=this;lE.then((function(){n.form.get(t.path).setValue(e)}))}},{key:"setValue",value:function(t){this.control.setValue(t)}},{key:"onSubmit",value:function(t){return this.submitted=!0,qD(this.form,this._directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(t){return t.pop(),t.length?this.form.get(t):this.form}},{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}}]),n}(aD);return t.\u0275fac=function(e){return new(e||t)(ds(fD,10),ds(pD,10))},t.\u0275dir=ze({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&Ss("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[vu([uE]),Zo]}),t}(),hE=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormGroup(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormGroup(this)}},{key:"_checkParentType",value:function(){}},{key:"control",get:function(){return this.formDirective.getFormGroup(this)}},{key:"path",get:function(){return ND(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return zD(this._validators)}},{key:"asyncValidator",get:function(){return HD(this._asyncValidators)}}]),n}(aD);return t.\u0275fac=function(e){return dE(e||t)},t.\u0275dir=ze({type:t,features:[Zo]}),t}(),dE=Ui(hE),fE={provide:aD,useExisting:Ht((function(){return pE}))},pE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this))._parent=t,a._validators=i,a._asyncValidators=r,a}return b(n,[{key:"_checkParentType",value:function(){}}]),n}(hE);return t.\u0275fac=function(e){return new(e||t)(ds(aD,5),ds(fD,10),ds(pD,10))},t.\u0275dir=ze({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[vu([fE]),Zo]}),t}(),mE={provide:sD,useExisting:Ht((function(){return gE}))},vE=function(){return Promise.resolve(null)}(),gE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o){var s;return y(this,n),(s=e.call(this)).control=new aE,s._registered=!1,s.update=new xl,s._parent=t,s._rawValidators=i||[],s._rawAsyncValidators=r||[],s.valueAccessor=YD(a(s),o),s}return b(n,[{key:"ngOnChanges",value:function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),UD(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{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(){VD(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(t){var e=this;vE.then((function(){e.control.setValue(t,{emitViewToModelChange:!1})}))}},{key:"_updateDisabled",value:function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;vE.then((function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()}))}},{key:"path",get:function(){return this._parent?ND(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return zD(this._rawValidators)}},{key:"asyncValidator",get:function(){return HD(this._rawAsyncValidators)}}]),n}(sD);return t.\u0275fac=function(e){return new(e||t)(ds(aD,9),ds(fD,10),ds(pD,10),ds(QS,10))},t.\u0275dir=ze({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[vu([mE]),Zo,nn]}),t}(),yE=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t}(),_E=new re("NgModelWithFormControlWarning"),bE={provide:sD,useExisting:Ht((function(){return kE}))},kE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o){var s;return y(this,n),(s=e.call(this))._ngModelWarningConfig=o,s.update=new xl,s._ngModelWarningSent=!1,s._rawValidators=t||[],s._rawAsyncValidators=i||[],s.valueAccessor=YD(a(s),r),s}return b(n,[{key:"ngOnChanges",value:function(t){this._isControlChanged(t)&&(VD(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),UD(t,this.viewModel)&&(KD(0,n,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_isControlChanged",value:function(t){return t.hasOwnProperty("form")}},{key:"isDisabled",set:function(t){}},{key:"path",get:function(){return[]}},{key:"validator",get:function(){return zD(this._rawValidators)}},{key:"asyncValidator",get:function(){return HD(this._rawAsyncValidators)}},{key:"control",get:function(){return this.form}}]),n}(sD);return t.\u0275fac=function(e){return new(e||t)(ds(fD,10),ds(pD,10),ds(QS,10),ds(_E,8))},t.\u0275dir=ze({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[vu([bE]),Zo,nn]}),t._ngModelWarningSentOnce=!1,t}(),wE={provide:aD,useExisting:Ht((function(){return CE}))},CE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this))._validators=t,r._asyncValidators=i,r.submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new xl,r}return b(n,[{key:"ngOnChanges",value:function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}},{key:"addControl",value:function(t){var e=this.form.get(t.path);return VD(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){GD(this.directives,t)}},{key:"addFormGroup",value:function(t){var e=this.form.get(t.path);jD(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(t){}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"addFormArray",value:function(t){var e=this.form.get(t.path);jD(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(t){}},{key:"getFormArray",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){this.form.get(t.path).setValue(e)}},{key:"onSubmit",value:function(t){return this.submitted=!0,qD(this.form,this.directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_updateDomValue",value:function(){var t=this;this.directives.forEach((function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){var n=function(){};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),e._rawValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)})),e._rawAsyncValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)})),t&&t._clearChangeFns()}(e.control,e),n&&VD(n,e),e.control=n)})),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var t=this;this.form._registerOnCollectionChange((function(){return t._updateDomValue()})),this._oldForm&&this._oldForm._registerOnCollectionChange((function(){})),this._oldForm=this.form}},{key:"_updateValidators",value:function(){var t=zD(this._validators);this.form.validator=vD.compose([this.form.validator,t]);var e=HD(this._asyncValidators);this.form.asyncValidator=vD.composeAsync([this.form.asyncValidator,e])}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(aD);return t.\u0275fac=function(e){return new(e||t)(ds(fD,10),ds(pD,10))},t.\u0275dir=ze({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&Ss("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[vu([wE]),Zo,nn]}),t}(),xE={provide:aD,useExisting:Ht((function(){return SE}))},SE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this))._parent=t,a._validators=i,a._asyncValidators=r,a}return b(n,[{key:"_checkParentType",value:function(){AE(this._parent)}}]),n}(hE);return t.\u0275fac=function(e){return new(e||t)(ds(aD,13),ds(fD,10),ds(pD,10))},t.\u0275dir=ze({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[vu([xE]),Zo]}),t}(),DE={provide:aD,useExisting:Ht((function(){return EE}))},EE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this))._parent=t,a._validators=i,a._asyncValidators=r,a}return b(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormArray(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormArray(this)}},{key:"_checkParentType",value:function(){AE(this._parent)}},{key:"control",get:function(){return this.formDirective.getFormArray(this)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"path",get:function(){return ND(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"validator",get:function(){return zD(this._validators)}},{key:"asyncValidator",get:function(){return HD(this._asyncValidators)}}]),n}(aD);return t.\u0275fac=function(e){return new(e||t)(ds(aD,13),ds(fD,10),ds(pD,10))},t.\u0275dir=ze({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[vu([DE]),Zo]}),t}();function AE(t){return!(t instanceof SE||t instanceof CE||t instanceof EE)}var IE={provide:sD,useExisting:Ht((function(){return OE}))},OE=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o,s){var u;return y(this,n),(u=e.call(this))._ngModelWarningConfig=s,u._added=!1,u.update=new xl,u._ngModelWarningSent=!1,u._parent=t,u._rawValidators=i||[],u._rawAsyncValidators=r||[],u.valueAccessor=YD(a(u),o),u}return b(n,[{key:"ngOnChanges",value:function(t){this._added||this._setUpControl(),UD(t,this.viewModel)&&(KD(0,n,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{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}},{key:"isDisabled",set:function(t){}},{key:"path",get:function(){return ND(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return zD(this._rawValidators)}},{key:"asyncValidator",get:function(){return HD(this._rawAsyncValidators)}}]),n}(sD);return t.\u0275fac=function(e){return new(e||t)(ds(aD,13),ds(fD,10),ds(pD,10),ds(QS,10),ds(_E,8))},t.\u0275dir=ze({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[vu([IE]),Zo,nn]}),t._ngModelWarningSentOnce=!1,t}(),TE={provide:fD,useExisting:Ht((function(){return PE})),multi:!0},RE={provide:fD,useExisting:Ht((function(){return ME})),multi:!0},PE=function(){var t=function(){function t(){y(this,t),this._required=!1}return b(t,[{key:"validate",value:function(t){return this.required?vD.required(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"required",get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&"false"!=="".concat(t),this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&us("required",e.required?"":null)},inputs:{required:"required"},features:[vu([TE])]}),t}(),ME=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"validate",value:function(t){return this.required?vD.requiredTrue(t):null}}]),n}(PE);return t.\u0275fac=function(e){return FE(e||t)},t.\u0275dir=ze({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&us("required",e.required?"":null)},features:[vu([RE]),Zo]}),t}(),FE=Ui(ME),LE={provide:fD,useExisting:Ht((function(){return NE})),multi:!0},NE=function(){var t=function(){function t(){y(this,t),this._enabled=!1}return b(t,[{key:"validate",value:function(t){return this._enabled?vD.email(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"email",set:function(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[vu([LE])]}),t}(),VE={provide:fD,useExisting:Ht((function(){return BE})),multi:!0},BE=function(){var t=function(){function t(){y(this,t),this._validator=vD.nullValidator}return b(t,[{key:"ngOnChanges",value:function(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null==this.minlength?null:this._validator(t)}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=vD.minLength("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&us("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[vu([VE]),nn]}),t}(),jE={provide:fD,useExisting:Ht((function(){return zE})),multi:!0},zE=function(){var t=function(){function t(){y(this,t),this._validator=vD.nullValidator}return b(t,[{key:"ngOnChanges",value:function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null!=this.maxlength?this._validator(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=vD.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&us("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[vu([jE]),nn]}),t}(),HE={provide:fD,useExisting:Ht((function(){return UE})),multi:!0},UE=function(){var t=function(){function t(){y(this,t),this._validator=vD.nullValidator}return b(t,[{key:"ngOnChanges",value:function(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return this._validator(t)}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=vD.pattern(this.pattern)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&us("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[vu([HE]),nn]}),t}(),WE=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}();function qE(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}var YE=function(){var t=function(){function t(){y(this,t)}return b(t,[{key:"group",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(t),i=null,r=null,a=void 0;return null!=e&&(qE(e)?(i=null!=e.validators?e.validators:null,r=null!=e.asyncValidators?e.asyncValidators:null,a=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,r=null!=e.asyncValidator?e.asyncValidator:null)),new oE(n,{asyncValidators:r,updateOn:a,validators:i})}},{key:"control",value:function(t,e,n){return new aE(t,e,n)}},{key:"array",value:function(t,e,n){var i=this,r=t.map((function(t){return i._createControl(t)}));return new sE(r,e,n)}},{key:"_reduceControls",value:function(t){var e=this,n={};return Object.keys(t).forEach((function(i){n[i]=e._createControl(t[i])})),n}},{key:"_createControl",value:function(t){return t instanceof aE||t instanceof oE||t instanceof sE?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),GE=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[SD],imports:[WE]}),t}(),KE=function(){var t=function(){function t(){y(this,t)}return b(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:_E,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}();return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[YE,SD],imports:[WE]}),t}();function ZE(t,e){1&t&&Ms(0)}var $E=["*"];function XE(t,e){}var QE=function(t){return{animationDuration:t}},JE=function(t,e){return{value:t,params:e}},tA=["tabBodyWrapper"],eA=["tabHeader"];function nA(t,e){}function iA(t,e){1&t&&cs(0,nA,0,0,"ng-template",9),2&t&&ps("cdkPortalOutlet",Ts().$implicit.templateLabel)}function rA(t,e){1&t&&nu(0),2&t&&iu(Ts().$implicit.textLabel)}function aA(t,e){if(1&t){var n=ws();vs(0,"div",6),Ss("click",(function(){In(n);var t=e.$implicit,i=e.index,r=Ts(),a=hs(1);return r._handleClick(t,a,i)})),vs(1,"div",7),cs(2,iA,1,1,"ng-template",8),cs(3,rA,1,1,"ng-template",8),gs(),gs()}if(2&t){var i=e.$implicit,r=e.index,a=Ts();qs("mat-tab-label-active",a.selectedIndex==r),ps("id",a._getTabLabelId(r))("disabled",i.disabled)("matRippleDisabled",i.disabled||a.disableRipple),us("tabIndex",a._getTabIndex(i,r))("aria-posinset",r+1)("aria-setsize",a._tabs.length)("aria-controls",a._getTabContentId(r))("aria-selected",a.selectedIndex==r)("aria-label",i.ariaLabel||null)("aria-labelledby",!i.ariaLabel&&i.ariaLabelledby?i.ariaLabelledby:null),Xr(2),ps("ngIf",i.templateLabel),Xr(1),ps("ngIf",!i.templateLabel)}}function oA(t,e){if(1&t){var n=ws();vs(0,"mat-tab-body",10),Ss("_onCentered",(function(){return In(n),Ts()._removeTabBodyWrapperHeight()}))("_onCentering",(function(t){return In(n),Ts()._setTabBodyWrapperHeight(t)})),gs()}if(2&t){var i=e.$implicit,r=e.index,a=Ts();qs("mat-tab-body-active",a.selectedIndex==r),ps("id",a._getTabContentId(r))("content",i.content)("position",i.position)("origin",i.origin)("animationDuration",a.animationDuration),us("aria-labelledby",a._getTabLabelId(r))}}var sA=["tabListContainer"],uA=["tabList"],lA=["nextPaginator"],cA=["previousPaginator"],hA=["mat-tab-nav-bar",""],dA=new re("MatInkBarPositioner",{providedIn:"root",factory:function(){return function(t){return{left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"}}}}),fA=function(){var t=function(){function t(e,n,i,r){y(this,t),this._elementRef=e,this._ngZone=n,this._inkBarPositioner=i,this._animationMode=r}return b(t,[{key:"alignToElement",value:function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){return e._setStyles(t)}))})):this._setStyles(t)}},{key:"show",value:function(){this._elementRef.nativeElement.style.visibility="visible"}},{key:"hide",value:function(){this._elementRef.nativeElement.style.visibility="hidden"}},{key:"_setStyles",value:function(t){var e=this._inkBarPositioner(t),n=this._elementRef.nativeElement;n.style.left=e.left,n.style.width=e.width}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(mc),ds(dA),ds(ix,8))},t.\u0275dir=ze({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&qs("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t}(),pA=new re("MatTabContent"),mA=function(){var t=function t(e){y(this,t),this.template=e};return t.\u0275fac=function(e){return new(e||t)(ds(qu))},t.\u0275dir=ze({type:t,selectors:[["","matTabContent",""]],features:[vu([{provide:pA,useExisting:t}])]}),t}(),vA=new re("MatTabLabel"),gA=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(E_);return t.\u0275fac=function(e){return yA(e||t)},t.\u0275dir=ze({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[vu([{provide:vA,useExisting:t}]),Zo]}),t}(),yA=Ui(gA),_A=vx((function t(){y(this,t)})),bA=new re("MAT_TAB_GROUP"),kA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this))._viewContainerRef=t,r._closestTabGroup=i,r.textLabel="",r._contentPortal=null,r._stateChanges=new U,r.position=null,r.origin=null,r.isActive=!1,r}return b(n,[{key:"ngOnChanges",value:function(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"ngOnInit",value:function(){this._contentPortal=new C_(this._explicitContent||this._implicitContent,this._viewContainerRef)}},{key:"_setTemplateLabelInput",value:function(t){t&&(this._templateLabel=t)}},{key:"templateLabel",get:function(){return this._templateLabel},set:function(t){this._setTemplateLabelInput(t)}},{key:"content",get:function(){return this._contentPortal}}]),n}(_A);return t.\u0275fac=function(e){return new(e||t)(ds(Gu),ds(bA,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,n){var i;1&t&&(jl(n,vA,!0),zl(n,pA,!0,qu)),2&t&&(Ll(i=Ul())&&(e.templateLabel=i.first),Ll(i=Ul())&&(e._explicitContent=i.first))},viewQuery:function(t,e){var n;1&t&&Nl(qu,!0),2&t&&Ll(n=Ul())&&(e._implicitContent=n.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[Zo,nn],ngContentSelectors:$E,decls:1,vars:0,template:function(t,e){1&t&&(Ps(),cs(0,ZE,1,0,"ng-template"))},encapsulation:2}),t}(),wA={translateTab:fk("translateTab",[yk("center, void, left-origin-center, right-origin-center",gk({transform:"none"})),yk("left",gk({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),yk("right",gk({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),bk("* => left, * => right, left => center, right => center",pk("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),bk("void => left-origin-center",[gk({transform:"translate3d(-100%, 0, 0)"}),pk("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),bk("void => right-origin-center",[gk({transform:"translate3d(100%, 0, 0)"}),pk("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},CA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t,i,a))._host=r,o._centeringSub=D.EMPTY,o._leavingSub=D.EMPTY,o}return b(n,[{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._centeringSub=this._host._beforeCentering.pipe(Xp(this._host._isCenterPosition(this._host._position))).subscribe((function(e){e&&!t.hasAttached()&&t.attach(t._host._content)})),this._leavingSub=this._host._afterLeavingCenter.subscribe((function(){t.detach()}))}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"ngOnDestroy",this).call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}]),n}(A_);return t.\u0275fac=function(e){return new(e||t)(ds(bu),ds(Gu),ds(Ht((function(){return SA}))),ds(Zc))},t.\u0275dir=ze({type:t,selectors:[["","matTabBodyHost",""]],features:[Zo]}),t}(),xA=function(){var t=function(){function t(e,n,i){var r=this;y(this,t),this._elementRef=e,this._dir=n,this._dirChangeSubscription=D.EMPTY,this._translateTabComplete=new U,this._onCentering=new xl,this._beforeCentering=new xl,this._afterLeavingCenter=new xl,this._onCentered=new xl(!0),this.animationDuration="500ms",n&&(this._dirChangeSubscription=n.change.subscribe((function(t){r._computePositionAnimationState(t),i.markForCheck()}))),this._translateTabComplete.pipe(Oy((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState}))).subscribe((function(t){r._isCenterPosition(t.toState)&&r._isCenterPosition(r._position)&&r._onCentered.emit(),r._isCenterPosition(t.fromState)&&!r._isCenterPosition(r._position)&&r._afterLeavingCenter.emit()}))}return b(t,[{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(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_isCenterPosition",value:function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}},{key:"_computePositionAnimationState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLayoutDirection();this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}},{key:"_computePositionFromOrigin",value:function(t){var e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}},{key:"position",set:function(t){this._positionIndex=t,this._computePositionAnimationState()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(s_,8),ds(Eo))},t.\u0275dir=ze({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t}(),SA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){return y(this,n),e.call(this,t,i,r)}return n}(xA);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(s_,8),ds(Eo))},t.\u0275cmp=Fe({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var n;1&t&&Vl(I_,!0),2&t&&Ll(n=Ul())&&(e._portalHost=n.first)},hostAttrs:[1,"mat-tab-body"],features:[Zo],decls:3,vars:6,consts:[[1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(vs(0,"div",0,1),Ss("@translateTab.start",(function(t){return e._onTranslateTabStarted(t)}))("@translateTab.done",(function(t){return e._translateTabComplete.next(t)})),cs(2,XE,0,0,"ng-template",2),gs()),2&t&&ps("@translateTab",ml(3,JE,e._position,pl(1,QE,e.animationDuration)))},directives:[CA],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:[wA.translateTab]}}),t}(),DA=new re("MAT_TABS_CONFIG"),EA=0,AA=function t(){y(this,t)},IA=gx(yx((function t(e){y(this,t),this._elementRef=e})),"primary"),OA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this,t))._changeDetectorRef=i,o._animationMode=a,o._tabs=new Dl,o._indexToSelect=0,o._tabBodyWrapperHeight=0,o._tabsSubscription=D.EMPTY,o._tabLabelSubscription=D.EMPTY,o._dynamicHeight=!1,o._selectedIndex=null,o.headerPosition="above",o.selectedIndexChange=new xl,o.focusChange=new xl,o.animationDone=new xl,o.selectedTabChange=new xl(!0),o._groupId=EA++,o.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",o.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,o}return b(n,[{key:"ngAfterContentChecked",value:function(){var t=this,e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){var n=null==this._selectedIndex;n||this.selectedTabChange.emit(this._createChangeEvent(e)),Promise.resolve().then((function(){t._tabs.forEach((function(t,n){return t.isActive=n===e})),n||t.selectedIndexChange.emit(e)}))}this._tabs.forEach((function(n,i){n.position=i-e,null==t._selectedIndex||0!=n.position||n.origin||(n.origin=e-t._selectedIndex)})),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())}},{key:"ngAfterContentInit",value:function(){var t=this;this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe((function(){if(t._clampTabIndex(t._indexToSelect)===t._selectedIndex)for(var e=t._tabs.toArray(),n=0;n.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;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}),t}(),RA=vx((function t(){y(this,t)})),PA=function(){var t=function(t){f(n,t);var e=g(n);function n(t){var i;return y(this,n),(i=e.call(this)).elementRef=t,i}return b(n,[{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}}]),n}(RA);return t.\u0275fac=function(e){return new(e||t)(ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(us("aria-disabled",!!e.disabled),qs("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[Zo]}),t}(),MA=i_({passive:!0}),FA=function(){var t=function(){function t(e,n,i,r,a,o,s){var u=this;y(this,t),this._elementRef=e,this._changeDetectorRef=n,this._viewportRuler=i,this._dir=r,this._ngZone=a,this._platform=o,this._animationMode=s,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new U,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new U,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new xl,this.indexFocused=new xl,a.runOutsideAngular((function(){gy(e.nativeElement,"mouseleave").pipe(zy(u._destroyed)).subscribe((function(){u._stopInterval()}))}))}return b(t,[{key:"ngAfterViewInit",value:function(){var t=this;gy(this._previousPaginator.nativeElement,"touchstart",MA).pipe(zy(this._destroyed)).subscribe((function(){t._handlePaginatorPress("before")})),gy(this._nextPaginator.nativeElement,"touchstart",MA).pipe(zy(this._destroyed)).subscribe((function(){t._handlePaginatorPress("after")}))}},{key:"ngAfterContentInit",value:function(){var t=this,e=this._dir?this._dir.change:Lf(null),n=this._viewportRuler.change(150),i=function(){t.updatePagination(),t._alignInkBarToSelectedTab()};this._keyManager=new zb(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),ht(e,n,this._items.changes).pipe(zy(this._destroyed)).subscribe((function(){Promise.resolve().then(i),t._keyManager.withHorizontalOrientation(t._getLayoutDirection())})),this._keyManager.change.pipe(zy(this._destroyed)).subscribe((function(e){t.indexFocused.emit(e),t._setTabFocus(e)}))}},{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(t){if(!U_(t))switch(t.keyCode){case M_:case L_:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}},{key:"_onContentChanges",value:function(){var t=this,e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run((function(){t.updatePagination(),t._alignInkBarToSelectedTab(),t._changeDetectorRef.markForCheck()})))}},{key:"updatePagination",value:function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}},{key:"_isValidIndex",value:function(t){if(!this._items)return!0;var e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}},{key:"_setTabFocus",value:function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();var e=this._tabListContainer.nativeElement,n=this._getLayoutDirection();e.scrollLeft="ltr"==n?0:e.scrollWidth-e.offsetWidth}}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_updateTabScrollPosition",value:function(){if(!this.disablePagination){var t=this.scrollDistance,e=this._platform,n="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translateX(".concat(Math.round(n),"px)"),e&&(e.TRIDENT||e.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}}},{key:"_scrollHeader",value:function(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}},{key:"_handlePaginatorClick",value:function(t){this._stopInterval(),this._scrollHeader(t)}},{key:"_scrollToLabel",value:function(t){if(!this.disablePagination){var e=this._items?this._items.toArray()[t]:null;if(e){var n,i,r=this._tabListContainer.nativeElement.offsetWidth,a=e.elementRef.nativeElement,o=a.offsetLeft,s=a.offsetWidth;"ltr"==this._getLayoutDirection()?i=(n=o)+s:n=(i=this._tabList.nativeElement.offsetWidth-o)-s;var u=this.scrollDistance,l=this.scrollDistance+r;nl&&(this.scrollDistance+=i-l+60)}}}},{key:"_checkPaginationEnabled",value:function(){if(this.disablePagination)this._showPaginationControls=!1;else{var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}},{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 t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}},{key:"_stopInterval",value:function(){this._stopScrolling.next()}},{key:"_handlePaginatorPress",value:function(t,e){var n=this;e&&null!=e.button&&0!==e.button||(this._stopInterval(),Vy(650,100).pipe(zy(ht(this._stopScrolling,this._destroyed))).subscribe((function(){var e=n._scrollHeader(t),i=e.distance;(0===i||i>=e.maxScrollDistance)&&n._stopInterval()})))}},{key:"_scrollTo",value:function(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};var e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(t){t=dy(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}},{key:"focusIndex",get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}},{key:"scrollDistance",get:function(){return this._scrollDistance},set:function(t){this._scrollTo(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(y_),ds(s_,8),ds(mc),ds(Jy),ds(ix,8))},t.\u0275dir=ze({type:t,inputs:{disablePagination:"disablePagination"}}),t}(),LA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u){var l;return y(this,n),(l=e.call(this,t,i,r,a,o,s,u))._disableRipple=!1,l}return b(n,[{key:"_itemSelected",value:function(t){t.preventDefault()}},{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=hy(t)}}]),n}(FA);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(y_),ds(s_,8),ds(mc),ds(Jy),ds(ix,8))},t.\u0275dir=ze({type:t,inputs:{disableRipple:"disableRipple"},features:[Zo]}),t}(),NA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u){return y(this,n),e.call(this,t,i,r,a,o,s,u)}return n}(LA);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(y_),ds(s_,8),ds(mc),ds(Jy),ds(ix,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,n){var i;1&t&&jl(n,PA,!1),2&t&&Ll(i=Ul())&&(e._items=i)},viewQuery:function(t,e){var n;1&t&&(Nl(fA,!0),Nl(sA,!0),Nl(uA,!0),Vl(lA,!0),Vl(cA,!0)),2&t&&(Ll(n=Ul())&&(e._inkBar=n.first),Ll(n=Ul())&&(e._tabListContainer=n.first),Ll(n=Ul())&&(e._tabList=n.first),Ll(n=Ul())&&(e._nextPaginator=n.first),Ll(n=Ul())&&(e._previousPaginator=n.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&qs("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Zo],ngContentSelectors:$E,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(t,e){1&t&&(Ps(),vs(0,"div",0,1),Ss("click",(function(){return e._handlePaginatorClick("before")}))("mousedown",(function(t){return e._handlePaginatorPress("before",t)}))("touchend",(function(){return e._stopInterval()})),ys(2,"div",2),gs(),vs(3,"div",3,4),Ss("keydown",(function(t){return e._handleKeydown(t)})),vs(5,"div",5,6),Ss("cdkObserveContent",(function(){return e._onContentChanges()})),vs(7,"div",7),Ms(8),gs(),ys(9,"mat-ink-bar"),gs(),gs(),vs(10,"div",8,9),Ss("mousedown",(function(t){return e._handlePaginatorPress("after",t)}))("click",(function(){return e._handlePaginatorClick("after")}))("touchend",(function(){return e._stopInterval()})),ys(12,"div",2),gs()),2&t&&(qs("mat-tab-header-pagination-disabled",e._disableScrollBefore),ps("matRippleDisabled",e._disableScrollBefore||e.disableRipple),Xr(5),qs("_mat-animation-noopable","NoopAnimations"===e._animationMode),Xr(5),qs("mat-tab-header-pagination-disabled",e._disableScrollAfter),ps("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[qx,Ib,fA],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}),t}(),VA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u){var l;return y(this,n),(l=e.call(this,t,a,o,i,r,s,u))._disableRipple=!1,l.color="primary",l}return b(n,[{key:"_itemSelected",value:function(){}},{key:"ngAfterContentInit",value:function(){var t=this;this._items.changes.pipe(Xp(null),zy(this._destroyed)).subscribe((function(){t.updateActiveLink()})),r(i(n.prototype),"ngAfterContentInit",this).call(this)}},{key:"updateActiveLink",value:function(t){if(this._items){for(var e=this._items.toArray(),n=0;n.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.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-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{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;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n'],encapsulation:2}),t}(),jA=_x(yx(vx((function t(){y(this,t)})))),zA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s){var u;return y(this,n),(u=e.call(this))._tabNavBar=t,u.elementRef=i,u._focusMonitor=o,u._isActive=!1,u.rippleConfig=r||{},u.tabIndex=parseInt(a)||0,"NoopAnimations"===s&&(u.rippleConfig.animation={enterDuration:0,exitDuration:0}),u}return b(n,[{key:"focus",value:function(){this.elementRef.nativeElement.focus()}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this.elementRef)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this.elementRef)}},{key:"active",get:function(){return this._isActive},set:function(t){hy(t)!==this._isActive&&(this._isActive=t,this._tabNavBar.updateActiveLink(this.elementRef))}},{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}}]),n}(jA);return t.\u0275fac=function(e){return new(e||t)(ds(VA),ds(ku),ds(Wx,8),fs("tabindex"),ds(ek),ds(ix,8))},t.\u0275dir=ze({type:t,inputs:{active:"active"},features:[Zo]}),t}(),HA=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o,s,u,l,c){var h;return y(this,n),(h=e.call(this,t,i,s,u,l,c))._tabLinkRipple=new zx(a(h),r,i,o),h._tabLinkRipple.setupTriggerEvents(i.nativeElement),h}return b(n,[{key:"ngOnDestroy",value:function(){r(i(n.prototype),"ngOnDestroy",this).call(this),this._tabLinkRipple._removeTriggerEvents()}}]),n}(zA);return t.\u0275fac=function(e){return new(e||t)(ds(BA),ds(ku),ds(mc),ds(Jy),ds(Wx,8),fs("tabindex"),ds(ek),ds(ix,8))},t.\u0275dir=ze({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){2&t&&(us("aria-current",e.active?"page":null)("aria-disabled",e.disabled)("tabIndex",e.tabIndex),qs("mat-tab-disabled",e.disabled)("mat-tab-label-active",e.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[Zo]}),t}(),UA=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Qd,mx,T_,Yx,Ob,uk],mx]}),t}();function WA(t,e){if(1&t){var n=ws();vs(0,"uds-field-text",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function qA(t,e){if(1&t){var n=ws();vs(0,"uds-field-textbox",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function YA(t,e){if(1&t){var n=ws();vs(0,"uds-field-numeric",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function GA(t,e){if(1&t){var n=ws();vs(0,"uds-field-password",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function KA(t,e){if(1&t){var n=ws();vs(0,"uds-field-hidden",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function ZA(t,e){if(1&t){var n=ws();vs(0,"uds-field-choice",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function $A(t,e){if(1&t){var n=ws();vs(0,"uds-field-multichoice",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function XA(t,e){if(1&t){var n=ws();vs(0,"uds-field-editlist",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function QA(t,e){if(1&t){var n=ws();vs(0,"uds-field-checkbox",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function JA(t,e){if(1&t){var n=ws();vs(0,"uds-field-imgchoice",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function tI(t,e){if(1&t){var n=ws();vs(0,"uds-field-date",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}function eI(t,e){if(1&t){var n=ws();vs(0,"uds-field-tags",2),Ss("changed",(function(t){return In(n),Ts().changed.emit(t)})),gs()}2&t&&ps("field",Ts().field)}var nI=function(){function t(){this.UDSGuiFieldType=ZS,this.changed=new xl}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:13,vars:14,consts:[["matTooltipShowDelay","1000",1,"field",3,"ngSwitch","matTooltip"],[3,"field","changed",4,"ngSwitchCase"],[3,"field","changed"]],template:function(t,e){1&t&&(vs(0,"div",0),cs(1,WA,1,1,"uds-field-text",1),cs(2,qA,1,1,"uds-field-textbox",1),cs(3,YA,1,1,"uds-field-numeric",1),cs(4,GA,1,1,"uds-field-password",1),cs(5,KA,1,1,"uds-field-hidden",1),cs(6,ZA,1,1,"uds-field-choice",1),cs(7,$A,1,1,"uds-field-multichoice",1),cs(8,XA,1,1,"uds-field-editlist",1),cs(9,QA,1,1,"uds-field-checkbox",1),cs(10,JA,1,1,"uds-field-imgchoice",1),cs(11,tI,1,1,"uds-field-date",1),cs(12,eI,1,1,"uds-field-tags",1),gs()),2&t&&(ps("ngSwitch",e.field.gui.type)("matTooltip",e.field.gui.tooltip),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.TEXT),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.TEXTBOX),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.NUMERIC),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.PASSWORD),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.HIDDEN),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.CHOICE),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.MULTI_CHOICE),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.EDITLIST),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.CHECKBOX),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.IMAGECHOICE),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.DATE),Xr(1),ps("ngSwitchCase",e.UDSGuiFieldType.TAGLIST))},styles:["uds-field[_ngcontent-%COMP%]{flex:1 50%} .mat-form-field{width:calc(100% - 1px)} .mat-form-field-flex{padding-top:0!important} .mat-tooltip{font-size:.9rem!important;margin:0!important;max-width:26em!important}"]}),t}();function iI(t,e){1&t&&nu(0),2&t&&ru(" ",Ts().$implicit," ")}function rI(t,e){if(1&t){var n=ws();vs(0,"uds-field",7),Ss("changed",(function(t){return In(n),Ts(3).changed.emit(t)})),gs()}2&t&&ps("field",e.$implicit)}function aI(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,iI,1,1,"ng-template",4),vs(2,"div",5),cs(3,rI,1,1,"uds-field",6),gs(),gs()),2&t){var n=e.$implicit,i=Ts(2);Xr(3),ps("ngForOf",i.fieldsByTab[n])}}function oI(t,e){if(1&t&&(vs(0,"mat-tab-group",2),cs(1,aI,4,1,"mat-tab",3),gs()),2&t){var n=Ts();ps("disableRipple",!0)("@.disabled",!0),Xr(1),ps("ngForOf",n.tabs)}}function sI(t,e){if(1&t&&(vs(0,"div"),ys(1,"uds-field",8),gs()),2&t){var n=e.$implicit;Xr(1),ps("field",n)}}function uI(t,e){1&t&&cs(0,sI,2,1,"div",3),2&t&&ps("ngForOf",Ts().fields)}var lI=django.gettext("Main"),cI=function(){function t(){this.changed=new xl}return t.prototype.ngOnInit=function(){var t=this;this.tabs=new Array,this.fieldsByTab={},this.fields.forEach((function(e){var n=void 0===e.gui.tab?lI:e.gui.tab;t.tabs.includes(n)||(t.tabs.push(n),t.fieldsByTab[n]=new Array),t.fieldsByTab[n].push(e)}))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-form"]],inputs:{fields:"fields"},outputs:{changed:"changed"},decls:3,vars:2,consts:[[3,"disableRipple",4,"ngIf","ngIfElse"],["onlyone",""],[3,"disableRipple"],[4,"ngFor","ngForOf"],["mat-tab-label",""],[1,"content"],[3,"field","changed",4,"ngFor","ngForOf"],[3,"field","changed"],[3,"field"]],template:function(t,e){if(1&t&&(cs(0,oI,2,3,"mat-tab-group",0),cs(1,uI,1,1,"ng-template",null,1,Gl)),2&t){var n=hs(2);ps("ngIf",e.tabs.length>1)("ngIfElse",n)}},directives:[yd,TA,vd,kA,gA,nI],styles:[".content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap} .mat-form-field-wrapper{padding-bottom:1em} .mat-tab-label{height:32px!important}"]}),t}();function hI(t,e){if(1&t){var n=ws();vs(0,"button",10),Ss("click",(function(){return In(n),Ts().customButtonClicked()})),nu(1),gs()}if(2&t){var i=Ts();Xr(1),iu(i.data.customButton)}}var dI,fI=function(){function t(t,e){this.dialogRef=t,this.data=e,this.onEvent=new xl(!0),this.saving=!1}return t.prototype.ngOnInit=function(){this.onEvent.emit({type:"init",data:null,dialog:this.dialogRef})},t.prototype.changed=function(t){this.onEvent.emit({type:"changed",data:t,dialog:this.dialogRef})},t.prototype.getFields=function(){var t={},e=[];return this.data.guiFields.forEach((function(n){var i=void 0!==n.values?n.values:n.value;n.gui.required&&0!==i&&(!i||i instanceof Array&&0===i.length)&&e.push(n.gui.label),"number"==typeof i&&(i=i.toString()),t[n.name]=i})),{data:t,errors:e}},t.prototype.save=function(){var t=this.getFields();t.errors.length>0?this.data.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+t.errors.join(", ")):this.onEvent.emit({data:t.data,type:"save",dialog:this.dialogRef})},t.prototype.customButtonClicked=function(){var t=this.getFields();this.onEvent.emit({data:t.data,type:this.data.customButton,errors:t.errors,dialog:this.dialogRef})},t.\u0275fac=function(e){return new(e||t)(ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-modal-form"]],decls:17,vars:7,consts:[["mat-dialog-title","",3,"innerHtml"],["vc",""],["autocomplete","off"],[3,"fields","changed"],[1,"buttons"],[1,"group1"],["ngClass","custom","mat-raised-button","",3,"click",4,"ngIf"],[1,"group2"],["mat-raised-button","",3,"disabled","click"],["mat-raised-button","","color","primary",3,"disabled","click"],["ngClass","custom","mat-raised-button","",3,"click"]],template:function(t,e){1&t&&(ys(0,"h4",0),_l(1,"safeHtml"),vs(2,"mat-dialog-content",null,1),vs(4,"form",2),vs(5,"uds-form",3),Ss("changed",(function(t){return e.changed(t)})),gs(),gs(),gs(),vs(6,"mat-dialog-actions"),vs(7,"div",4),vs(8,"div",5),cs(9,hI,2,1,"button",6),gs(),vs(10,"div",7),vs(11,"button",8),Ss("click",(function(){return e.dialogRef.close()})),vs(12,"uds-translate"),nu(13,"Discard & close"),gs(),gs(),vs(14,"button",9),Ss("click",(function(){return e.save()})),vs(15,"uds-translate"),nu(16,"Save"),gs(),gs(),gs(),gs(),gs()),2&t&&(ps("innerHtml",bl(1,5,e.data.title),Or),Xr(5),ps("fields",e.data.guiFields),Xr(4),ps("ngIf",null!=e.data.customButton),Xr(2),ps("disabled",e.saving),Xr(3),ps("disabled",e.saving))},directives:[AS,IS,yE,cD,cE,cI,OS,yd,BS,HS,fd],pipes:[US],styles:["h4[_ngcontent-%COMP%]{margin-bottom:0}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%} uds-field{flex:1 100%}button.custom[_ngcontent-%COMP%]{background-color:#4682b4;color:#fff}"]}),t}(),pI=function(){function t(t){this.gui=t}return t.prototype.executeCallback=function(t,e,n,i){var r=this;void 0===i&&(i={});var a=new Array;e.gui.fills.parameters.forEach((function(t){a.push(t+"="+encodeURIComponent(n[t].value))})),t.table.rest.callback(e.gui.fills.callbackName,a.join("&")).subscribe((function(e){var a=new Array;e.forEach((function(t){var e=n[t.name];void 0!==e&&(void 0!==e.gui.fills&&a.push(e),e.gui.values.length=0,t.values.forEach((function(t){return e.gui.values.push(t)})),e.value||(e.value=t.values.length>0?t.values[0].id:""))})),a.forEach((function(e){void 0===i[e.name]&&(i[e.name]=!0,r.executeCallback(t,e,n,i))}))}))},t.prototype.modalForm=function(t,e,n,i){void 0===n&&(n=null),e.sort((function(t,e){return t.gui.order>e.gui.order?1:-1}));var r=null!=n;n=r?n:{},e.forEach((function(t){!1!==r&&void 0!==t.gui.rdonly||(t.gui.rdonly=!1),t.gui.type===ZS.TEXT&&t.gui.multiline&&(t.gui.type=ZS.TEXTBOX);var e=n[t.name];void 0!==e&&(e instanceof Array?(t.values=new Array,e.forEach((function(e){return t.values.push(e)}))):t.value=e)}));var a=window.innerWidth<800?"80%":"50%";return this.gui.dialog.open(fI,{position:{top:"64px"},width:a,data:{title:t,guiFields:e,customButton:i,gui:this.gui},disableClose:!0}).componentInstance.onEvent},t.prototype.typedForm=function(t,e,n,i,r,a,o){var s=this;o=o||{};var u=new xl,l=n?"test":void 0,c={},h={},d=function(e){h.hasOwnProperty(e.name)&&""!==e.value&&void 0!==e.value&&s.executeCallback(t,e,c)};return o.snack||(o.snack=this.gui.snackbar.open(django.gettext("Loading data..."),django.gettext("dismiss"))),t.table.rest.gui(a).subscribe((function(n){o.snack.dismiss(),void 0!==i&&i.forEach((function(t){n.push(t)})),n.forEach((function(t){c[t.name]=t,void 0!==t.gui.fills&&(h[t.name]=t.gui.fills)})),s.modalForm(e,n,r,l).subscribe((function(e){switch(e.data&&(e.data.data_type=a),e.type){case l:if(e.errors.length>0)return void s.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+e.errors.join(", "));s.gui.snackbar.open(django.gettext("Testing..."),django.gettext("dismiss")),t.table.rest.test(a,e.data).subscribe((function(t){"ok"!==t?s.gui.snackbar.open(django.gettext("Test failed:")+" "+t,django.gettext("dismiss")):s.gui.snackbar.open(django.gettext("Test passed successfully"),django.gettext("dismiss"),{duration:2e3})}));break;case"changed":case"init":if(null===e.data)for(var i=0,h=n;i"+i.join(", ")+"";this.gui.yesno(e,a,!0).subscribe((function(e){if(e){var i=r.length,a=function(){n.gui.snackbar.open(django.gettext("Deletion finished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()};r.forEach((function(e){t.table.rest.delete(e).subscribe((function(t){0==--i&&a()}),(function(t){0==--i&&a()}))}))}}))},t}(),mI=function(){function t(t,e){this.dialog=t,this.snackbar=e,this.forms=new pI(this)}return t.prototype.alert=function(t,e,n,i){void 0===n&&(n=0);var r=i||(window.innerWidth<800?"80%":"40%");return this.dialog.open(KS,{width:r,data:{title:t,body:e,autoclose:n,type:GS.alert},disableClose:!0}).componentInstance.yesno},t.prototype.yesno=function(t,e,n){void 0===n&&(n=!1);var i=window.innerWidth<800?"80%":"40%";return this.dialog.open(KS,{width:i,data:{title:t,body:e,type:GS.yesno,warnOnYes:n},disableClose:!0}).componentInstance.yesno},t.prototype.icon=function(t,e){return void 0===e&&(e="24px"),''},t}(),vI=function(t){return t.NUMERIC="numeric",t.ALPHANUMERIC="alphanumeric",t.DATETIME="datetime",t.DATETIMESEC="datetimesec",t.DATE="date",t.TIME="time",t.ICON="iconType",t.CALLBACK="callback",t.DICTIONARY="dict",t.IMAGE="image",t}({}),gI=function(t){return t[t.ALWAYS=0]="ALWAYS",t[t.SINGLE_SELECT=1]="SINGLE_SELECT",t[t.MULTI_SELECT=2]="MULTI_SELECT",t[t.ONLY_MENU=3]="ONLY_MENU",t[t.ACCELERATOR=4]="ACCELERATOR",t}({}),yI="provider",_I="service",bI="pool",kI="user",wI="group",CI="transport",xI="osmanager",SI="calendar",DI="poolgroup",EI={provider:django.gettext("provider"),service:django.gettext("service"),pool:django.gettext("service pool"),authenticator:django.gettext("authenticator"),user:django.gettext("user"),group:django.gettext("group"),transport:django.gettext("transport"),osmanager:django.gettext("OS manager"),calendar:django.gettext("calendar"),poolgroup:django.gettext("pool group")},AI=function(){function t(t){this.router=t}return t.getGotoButton=function(t,e,n){return{id:t,html:'link'+django.gettext("Go to")+" "+EI[t]+"",type:gI.ACCELERATOR,acceleratorProperties:[e,n]}},t.prototype.gotoProvider=function(t){this.router.navigate(void 0!==t?["providers",t]:["providers"])},t.prototype.gotoService=function(t,e){this.router.navigate(void 0!==e?["providers",t,"detail",e]:["providers",t,"detail"])},t.prototype.gotoServicePool=function(t){this.router.navigate(["pools","service-pools",t])},t.prototype.gotoServicePoolDetail=function(t){this.router.navigate(["pools","service-pools",t,"detail"])},t.prototype.gotoMetapool=function(t){this.router.navigate(["pools","meta-pools",t])},t.prototype.gotoMetapoolDetail=function(t){this.router.navigate(["pools","meta-pools",t,"detail"])},t.prototype.gotoCalendar=function(t){this.router.navigate(["pools","calendars",t])},t.prototype.gotoCalendarDetail=function(t){this.router.navigate(["pools","calendars",t,"detail"])},t.prototype.gotoAccount=function(t){this.router.navigate(["pools","accounts",t])},t.prototype.gotoAccountDetail=function(t){this.router.navigate(["pools","accounts",t,"detail"])},t.prototype.gotoPoolGroup=function(t){this.router.navigate(["pools","pool-groups",t=t||""])},t.prototype.gotoAuthenticator=function(t){this.router.navigate(["authenticators",t])},t.prototype.gotoAuthenticatorDetail=function(t){this.router.navigate(["authenticators",t,"detail"])},t.prototype.gotoUser=function(t,e){this.router.navigate(["authenticators",t,"detail","users",e])},t.prototype.gotoGroup=function(t,e){this.router.navigate(["authenticators",t,"detail","groups",e])},t.prototype.gotoTransport=function(t){this.router.navigate(["transports",t])},t.prototype.gotoOSManager=function(t){this.router.navigate(["osmanagers",t])},t.prototype.goto=function(t,e,n){var i=function(t){var i=e;if(n[t].split(".").forEach((function(t){return i=i[t]})),!i)throw new Error("not going :)");return i};try{switch(t){case yI:this.gotoProvider(i(0));break;case _I:this.gotoService(i(0),i(1));break;case bI:this.gotoServicePool(i(0));break;case"authenticator":this.gotoAuthenticator(i(0));break;case kI:this.gotoUser(i(0),i(1));break;case wI:this.gotoGroup(i(0),i(1));break;case CI:this.gotoTransport(i(0));break;case xI:this.gotoOSManager(i(0));break;case SI:this.gotoCalendar(i(0));break;case DI:this.gotoPoolGroup(i(0))}}catch(r){}},t}(),II=function(){function t(e){y(this,t),this.total=e}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new OI(t,this.total))}}]),t}(),OI=function(t){f(n,t);var e=g(n);function n(t,i){var r;return y(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return b(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(P),TI=new Set,RI=function(){var t=function(){function t(e){y(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):PI}return b(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!TI.has(t))try{dI||((dI=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(dI)),dI.sheet&&(dI.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),TI.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Jy))},t.\u0275prov=It({factory:function(){return new t(pe(Jy))},token:t,providedIn:"root"}),t}();function PI(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var MI=function(){var t=function(){function t(e,n){y(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new U}return b(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return FI(py(t)).some((function(t){return e._registerQuery(t).mql.matches}))}},{key:"observe",value:function(t){var e=this,n=Sp(FI(py(t)).map((function(t){return e._registerQuery(t).observable})));return(n=$p(n.pipe(Gp(1)),n.pipe((function(t){return t.lift(new II(1))}),Cb(0)))).pipe(Y((function(t){var e={matches:!1,breakpoints:{}};return t.forEach((function(t){var n=t.matches,i=t.query;e.matches=e.matches||n,e.breakpoints[i]=n})),e})))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new V((function(t){var i=function(n){return e._zone.run((function(){return t.next(n)}))};return n.addListener(i),function(){n.removeListener(i)}})).pipe(Xp(n),Y((function(e){return{query:t,matches:e.matches}})),zy(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(RI),pe(mc))},t.\u0275prov=It({factory:function(){return new t(pe(RI),pe(mc))},token:t,providedIn:"root"}),t}();function FI(t){return t.map((function(t){return t.split(",")})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.trim()}))}function LI(t,e){if(1&t){var n=ws();vs(0,"div",1),vs(1,"button",2),Ss("click",(function(){return In(n),Ts().action()})),nu(2),gs(),gs()}if(2&t){var i=Ts();Xr(2),iu(i.data.action)}}function NI(t,e){}var VI=new re("MatSnackBarData"),BI=function t(){y(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},jI=Math.pow(2,31)-1,zI=function(){function t(e,n){var i=this;y(this,t),this._overlayRef=n,this._afterDismissed=new U,this._afterOpened=new U,this._onAction=new U,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe((function(){return i.dismiss()})),e._onExit.subscribe((function(){return i._finishDismiss()}))}return b(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout((function(){return e.dismiss()}),Math.min(t,jI))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction}}]),t}(),HI=function(){var t=function(){function t(e,n){y(this,t),this.snackBarRef=e,this.data=n}return b(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(zI),ds(VI))},t.\u0275cmp=Fe({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(vs(0,"span"),nu(1),gs(),cs(2,LI,3,1,"div",0)),2&t&&(Xr(1),iu(e.data.message),Xr(1),ps("ngIf",e.hasAction))},directives:[yd,BS],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t}(),UI={snackBarState:fk("state",[yk("void, hidden",gk({transform:"scale(0.8)",opacity:0})),yk("visible",gk({transform:"scale(1)",opacity:1})),bk("* => visible",pk("150ms cubic-bezier(0, 0, 0.2, 1)")),bk("* => void, * => hidden",pk("75ms cubic-bezier(0.4, 0.0, 1, 1)",gk({opacity:0})))])},WI=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a){var o;return y(this,n),(o=e.call(this))._ngZone=t,o._elementRef=i,o._changeDetectorRef=r,o.snackBarConfig=a,o._destroyed=!1,o._onExit=new U,o._onEnter=new U,o._animationState="void",o.attachDomPortal=function(t){return o._assertNotAttached(),o._applySnackBarClasses(),o._portalOutlet.attachDomPortal(t)},o._role="assertive"!==a.politeness||a.announcementMessage?"off"===a.politeness?null:"status":"alert",o}return b(n,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.toState;if(("void"===e&&"void"!==t.fromState||"hidden"===e)&&this._completeExit(),"visible"===e){var n=this._onEnter;this._ngZone.run((function(){n.next(),n.complete()}))}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.pipe(Gp(1)).subscribe((function(){t._onExit.next(),t._onExit.complete()}))}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){this._portalOutlet.hasAttached()}}]),n}(S_);return t.\u0275fac=function(e){return new(e||t)(ds(mc),ds(ku),ds(Eo),ds(BI))},t.\u0275cmp=Fe({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var n;1&t&&Nl(A_,!0),2&t&&Ll(n=Ul())&&(e._portalOutlet=n.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:2,hostBindings:function(t,e){1&t&&Ds("@state.done",(function(t){return e.onAnimationEnd(t)})),2&t&&(us("role",e._role),su("@state",e._animationState))},features:[Zo],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&cs(0,NI,0,0,"ng-template",0)},directives:[A_],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[UI.snackBarState]}}),t}(),qI=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[wb,T_,Qd,zS,mx],mx]}),t}(),YI=new re("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new BI}}),GI=function(){var t=function(){function t(e,n,i,r,a,o){y(this,t),this._overlay=e,this._live=n,this._injector=i,this._breakpointObserver=r,this._parentSnackBar=a,this._defaultConfig=o,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=HI,this.snackBarContainerComponent=WI,this.handsetCssClass="mat-snack-bar-handset"}return b(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=Object.assign(Object.assign({},this._defaultConfig),n);return i.data={message:t,action:e},i.announcementMessage===t&&(i.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,i)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var n=qo.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:BI,useValue:e}]}),i=new w_(this.snackBarContainerComponent,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance}},{key:"_attach",value:function(t,e){var n=this,i=Object.assign(Object.assign(Object.assign({},new BI),this._defaultConfig),e),r=this._createOverlay(i),a=this._attachSnackBarContainer(r,i),o=new zI(a,r);if(t instanceof qu){var s=new C_(t,null,{$implicit:i.data,snackBarRef:o});o.instance=a.attachTemplatePortal(s)}else{var u=this._createInjector(i,o),l=new w_(t,void 0,u),c=a.attachComponentPortal(l);o.instance=c.instance}return this._breakpointObserver.observe("(max-width: 599.99px) and (orientation: portrait)").pipe(zy(r.detachments())).subscribe((function(t){var e=r.overlayElement.classList;t.matches?e.add(n.handsetCssClass):e.remove(n.handsetCssClass)})),this._animateSnackBar(o,i),this._openedSnackBarRef=o,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var n=this;t.afterDismissed().subscribe((function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null),e.announcementMessage&&n._live.clear()})),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe((function(){t.containerInstance.enter()})),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe((function(){return t._dismissAfter(e.duration)})),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)}},{key:"_createOverlay",value:function(t){var e=new X_;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,a=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):a?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return qo.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:zI,useValue:e},{provide:VI,useValue:t.data}]})}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(vb),pe($b),pe(qo),pe(MI),pe(t,12),pe(YI))},t.\u0275prov=It({factory:function(){return new t(pe(vb),pe($b),pe(ae),pe(MI),pe(t,12),pe(YI))},token:t,providedIn:qI}),t}(),KI=function(){function t(t,e,n,i,r,a){this.http=t,this.router=e,this.dialog=n,this.snackbar=i,this.sanitizer=r,this.dateAdapter=a,this.user=new cy(udsData.profile),this.navigation=new AI(this.router),this.gui=new mI(this.dialog,this.snackbar),this.dateAdapter.setLocale(this.config.language)}return Object.defineProperty(t.prototype,"config",{get:function(){return udsData.config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"notices",{get:function(){return udsData.errors},enumerable:!1,configurable:!0}),t.prototype.restPath=function(t){return this.config.urls.rest+t},t.prototype.staticURL=function(t){return this.config.urls.static+t},t.prototype.logout=function(){window.location.href=this.config.urls.logout},t.prototype.gotoUser=function(){window.location.href=this.config.urls.user},t.prototype.putOnStorage=function(t,e){void 0!==typeof Storage&&sessionStorage.setItem(t,e)},t.prototype.getFromStorage=function(t){return void 0!==typeof Storage?sessionStorage.getItem(t):null},t.prototype.safeString=function(t){return this.sanitizer.bypassSecurityTrustHtml(t)},t.prototype.yesno=function(t){return t?django.gettext("yes"):django.gettext("no")},t.\u0275prov=It({token:t,factory:t.\u0275fac=function(e){return new(e||t)(pe(rp),pe(Vg),pe(SS),pe(GI),pe(Tf),pe(xx))},providedIn:"root"}),t}(),ZI=function(){function t(t){this.api=t}return t.prototype.canActivate=function(t,e){return!!this.api.user.isStaff||(window.location.href=this.api.config.urls.user,!1)},t.\u0275prov=It({token:t,factory:t.\u0275fac=function(e){return new(e||t)(pe(KI))},providedIn:"root"}),t}(),$I=function(t,e){return($I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function XI(t,e){function n(){this.constructor=t}$I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var QI=function(t){return t[t.NONE=0]="NONE",t[t.READ=32]="READ",t[t.MANAGEMENT=64]="MANAGEMENT",t[t.ALL=96]="ALL",t}({}),JI=function(){function t(t,e,n){this.api=t,void 0===n&&(n={}),void 0===n.base&&(n.base=e);var i=function(t,e){return void 0===t?e:t};this.id=e,this.paths={base:n.base,get:i(n.get,n.base),log:i(n.log,n.base),put:i(n.put,n.base),test:i(n.test,n.base+"/test"),delete:i(n.delete,n.base),types:i(n.types,n.base+"/types"),gui:i(n.gui,n.base+"/gui"),tableInfo:i(n.tableInfo,n.base+"/tableinfo")},this.headers=(new Uf).set("Content-Type","application/json; charset=utf8").set(this.api.config.auth_header,this.api.config.auth_token)}return t.prototype.handleError=function(t,e){var n;return void 0===e&&(e=!1),n=t.error instanceof ErrorEvent?t.error.message:e?django.gettext("Error saving: ")+t.error:"Error "+t.status+": "+t.error,this.api.gui.alert(e?django.gettext("Error saving element"):django.gettext("Error handling your request"),n),Wy(n)},t.prototype.getPath=function(t,e){return this.api.restPath(t+(void 0!==e?"/"+e:""))},t.prototype.doGet=function(t){var e=this;return this.api.http.get(t,{headers:this.headers}).pipe(tm((function(t){return e.handleError(t)})))},t.prototype.get=function(t){return this.doGet(this.getPath(this.paths.get,t))},t.prototype.getLogs=function(t){return this.doGet(this.getPath(this.paths.log,t)+"/log")},t.prototype.overview=function(t){return this.get("overview"+(void 0!==t?"?filter="+t:""))},t.prototype.summary=function(t){return this.get("overview?summarize"+(void 0!==t?"&filter="+t:""))},t.prototype.put=function(t,e){var n=this;return this.api.http.put(this.getPath(this.paths.put,e),t,{headers:this.headers}).pipe(tm((function(t){return n.handleError(t,!0)})))},t.prototype.create=function(t){return this.put(t)},t.prototype.save=function(t,e){return this.put(t,e=void 0!==e?e:t.id)},t.prototype.test=function(t,e){var n=this;return this.api.http.post(this.getPath(this.paths.test,t),e,{headers:this.headers}).pipe(tm((function(t){return n.handleError(t)})))},t.prototype.delete=function(t){var e=this;return this.api.http.delete(this.getPath(this.paths.delete,t),{headers:this.headers}).pipe(tm((function(t){return e.handleError(t)})))},t.prototype.permision=function(){return this.api.user.isAdmin?QI.ALL:QI.NONE},t.prototype.getPermissions=function(t){return this.doGet(this.getPath("permissions/"+this.paths.base+"/"+t))},t.prototype.addPermission=function(t,e,n,i){var r=this,a=this.getPath("permissions/"+this.paths.base+"/"+t+"/"+e+"/add/"+n);return this.api.http.put(a,{perm:i},{headers:this.headers}).pipe(tm((function(t){return r.handleError(t)})))},t.prototype.revokePermission=function(t){var e=this,n=this.getPath("permissions/revoke");return this.api.http.put(n,{items:t},{headers:this.headers}).pipe(tm((function(t){return e.handleError(t)})))},t.prototype.types=function(){return this.doGet(this.getPath(this.paths.types))},t.prototype.gui=function(t){var e=this.getPath(this.paths.gui+(void 0!==t?"/"+t:""));return this.doGet(e)},t.prototype.callback=function(t,e){var n=this.getPath("gui/callback/"+t+"?"+e);return this.doGet(n)},t.prototype.tableInfo=function(){return this.doGet(this.getPath(this.paths.tableInfo))},t.prototype.detail=function(t,e){return new tO(this,t,e)},t.prototype.invoke=function(t,e){var n=t;return e&&(n=n+"?"+e),this.get(n)},t}(),tO=function(t){function e(e,n,i,r){var a=t.call(this,e.api,[e.paths.base,n,i].join("/"))||this;return a.parentModel=e,a.parentId=n,a.model=i,a.perm=r,a}return XI(e,t),e.prototype.permision=function(){return this.perm||QI.ALL},e}(JI),eO=function(t){function e(e){var n=t.call(this,e,"providers")||this;return n.api=e,n}return XI(e,t),e.prototype.allServices=function(){return this.get("allservices")},e.prototype.service=function(t){return this.get("service/"+t)},e.prototype.maintenance=function(t){return this.get(t+"/maintenance")},e}(JI),nO=function(t){function e(e){var n=t.call(this,e,"authenticators")||this;return n.api=e,n}return XI(e,t),e.prototype.search=function(t,e,n,i){return void 0===i&&(i=12),this.get(t+"/search?type="+encodeURIComponent(e)+"&term="+encodeURIComponent(n)+"&limit="+i)},e}(JI),iO=function(t){function e(e){var n=t.call(this,e,"osmanagers")||this;return n.api=e,n}return XI(e,t),e}(JI),rO=function(t){function e(e){var n=t.call(this,e,"transports")||this;return n.api=e,n}return XI(e,t),e}(JI),aO=function(t){function e(e){var n=t.call(this,e,"networks")||this;return n.api=e,n}return XI(e,t),e}(JI),oO=function(t){function e(e){var n=t.call(this,e,"servicespools")||this;return n.api=e,n}return XI(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e.prototype.actionsList=function(t){return this.get(t+"/actionsList")},e.prototype.listAssignables=function(t){return this.get(t+"/listAssignables")},e.prototype.createFromAssignable=function(t,e,n){return this.get(t+"/createFromAssignable?user_id="+encodeURIComponent(e)+"&assignable_id="+encodeURIComponent(n))},e}(JI),sO=function(t){function e(e){var n=t.call(this,e,"metapools")||this;return n.api=e,n}return XI(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e}(JI),uO=function(t){function e(e){var n=t.call(this,e,"config")||this;return n.api=e,n}return XI(e,t),e}(JI),lO=function(t){function e(e){var n=t.call(this,e,"gallery/images")||this;return n.api=e,n}return XI(e,t),e}(JI),cO=function(t){function e(e){var n=t.call(this,e,"gallery/servicespoolgroups")||this;return n.api=e,n}return XI(e,t),e}(JI),hO=function(t){function e(e){var n=t.call(this,e,"system")||this;return n.api=e,n}return XI(e,t),e.prototype.information=function(){return this.get("overview")},e.prototype.stats=function(t){return this.get("stats/"+t)},e.prototype.flushCache=function(){return this.doGet(this.getPath("cache","flush"))},e}(JI),dO=function(t){function e(e){var n=t.call(this,e,"reports")||this;return n.api=e,n}return XI(e,t),e.prototype.types=function(){return Lf([])},e}(JI),fO=function(t){function e(e){var n=t.call(this,e,"calendars")||this;return n.api=e,n}return XI(e,t),e}(JI),pO=function(t){function e(e){var n=t.call(this,e,"accounts")||this;return n.api=e,n}return XI(e,t),e.prototype.timemark=function(t){return this.get(t+"/timemark")},e}(JI),mO=function(t){function e(e){var n=t.call(this,e,"proxies")||this;return n.api=e,n}return XI(e,t),e}(JI),vO=function(t){function e(e){var n=t.call(this,e,"actortokens")||this;return n.api=e,n}return XI(e,t),e}(JI),gO=function(){function t(t){this.api=t,this.providers=new eO(t),this.authenticators=new nO(t),this.osManagers=new iO(t),this.transports=new rO(t),this.networks=new aO(t),this.servicesPools=new oO(t),this.metaPools=new sO(t),this.gallery=new lO(t),this.servicesPoolGroups=new cO(t),this.calendars=new fO(t),this.accounts=new pO(t),this.proxy=new mO(t),this.system=new hO(t),this.configuration=new uO(t),this.actorToken=new vO(t),this.reports=new dO(t)}return t.\u0275prov=It({token:t,factory:t.\u0275fac=function(e){return new(e||t)(pe(KI))},providedIn:"root"}),t}();function yO(t,e){if(1&t&&(vs(0,"div",17),vs(1,"div",11),ys(2,"img",3),vs(3,"div",12),nu(4),gs(),gs(),vs(5,"div",13),vs(6,"a",15),vs(7,"uds-translate"),nu(8,"View service pools"),gs(),gs(),gs(),gs()),2&t){var n=Ts(2);Xr(2),ps("src",n.api.staticURL("admin/img/icons/logs.png"),Tr),Xr(2),ru(" ",n.data.restrained," ")}}function _O(t,e){if(1&t&&(vs(0,"div"),vs(1,"div",8),vs(2,"div",9),vs(3,"div",10),vs(4,"div",11),ys(5,"img",3),vs(6,"div",12),nu(7),gs(),gs(),vs(8,"div",13),vs(9,"a",14),vs(10,"uds-translate"),nu(11,"View authenticators"),gs(),gs(),gs(),gs(),vs(12,"div",10),vs(13,"div",11),ys(14,"img",3),vs(15,"div",12),nu(16),gs(),gs(),vs(17,"div",13),vs(18,"a",15),vs(19,"uds-translate"),nu(20,"View service pools"),gs(),gs(),gs(),gs(),vs(21,"div",10),vs(22,"div",11),ys(23,"img",3),vs(24,"div",12),nu(25),gs(),gs(),vs(26,"div",13),vs(27,"a",15),vs(28,"uds-translate"),nu(29,"View service pools"),gs(),gs(),gs(),gs(),cs(30,yO,9,2,"div",16),gs(),gs(),gs()),2&t){var n=Ts();Xr(5),ps("src",n.api.staticURL("admin/img/icons/authenticators.png"),Tr),Xr(2),ru(" ",n.data.users," "),Xr(7),ps("src",n.api.staticURL("admin/img/icons/pools.png"),Tr),Xr(2),ru(" ",n.data.pools," "),Xr(7),ps("src",n.api.staticURL("admin/img/icons/services.png"),Tr),Xr(2),ru(" ",n.data.user_services," "),Xr(5),ps("ngIf",n.data.restrained)}}function bO(t,e){1&t&&(vs(0,"div",18),vs(1,"div",19),vs(2,"div",20),vs(3,"uds-translate"),nu(4,"UDS Administration"),gs(),gs(),vs(5,"div",21),vs(6,"p"),vs(7,"uds-translate"),nu(8,"You are accessing UDS Administration as staff member."),gs(),gs(),vs(9,"p"),vs(10,"uds-translate"),nu(11,"This means that you have restricted access to elements."),gs(),gs(),vs(12,"p"),vs(13,"uds-translate"),nu(14,"In order to increase your access privileges, please contact your local UDS administrator. "),gs(),gs(),ys(15,"br"),vs(16,"p"),vs(17,"uds-translate"),nu(18,"Thank you."),gs(),gs(),gs(),gs(),gs())}var kO=function(){function t(t,e){this.api=t,this.rest=e,this.data={}}return t.prototype.ngOnInit=function(){var t=this;this.api.user.isAdmin&&this.rest.system.information().subscribe((function(e){t.data={users:django.gettext("#USR_NUMBER# users, #GRP_NUMBER# groups").replace("#USR_NUMBER#",e.users).replace("#GRP_NUMBER#",e.groups),pools:django.gettext("#POOLS_NUMBER# service pools").replace("#POOLS_NUMBER#",e.service_pools),user_services:django.gettext("#SERVICES_NUMBER# user services").replace("#SERVICES_NUMBER#",e.user_services)},e.restrained_services_pools>0&&(t.data.restrained=django.gettext("#RESTRAINED_NUMBER# restrained services!").replace("#RESTRAINED_NUMBER#",e.restrained_services_pools))}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-summary"]],decls:11,vars:3,consts:[[1,"card"],[1,"card-header"],[1,"card-title"],[3,"src"],[1,"card-subtitle"],[1,"card-content"],[4,"ngIf","ngIfElse"],["noAdmin",""],[1,"admin"],[1,"information"],[1,"info-panel"],[1,"info-panel-data"],[1,"info-text"],[1,"info-panel-link"],["mat-button","","routerLink","/authenticators"],["mat-button","","routerLink","/pools/service-pools"],["class","info-panel info-danger",4,"ngIf"],[1,"info-panel","info-danger"],[1,"staff-container"],[1,"staff","mat-elevation-z8"],[1,"staff-header"],[1,"staff-content"]],template:function(t,e){if(1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"div",2),ys(3,"img",3),vs(4,"uds-translate"),nu(5,"Dashboard"),gs(),gs(),ys(6,"div",4),gs(),vs(7,"div",5),cs(8,_O,31,7,"div",6),cs(9,bO,19,0,"ng-template",null,7,Gl),gs(),gs()),2&t){var n=hs(10);Xr(3),ps("src",e.api.staticURL("admin/img/icons/dashboard-monitor.png"),Tr),Xr(5),ps("ngIf",e.api.user.isAdmin)("ngIfElse",n)}},directives:[HS,yd,jS,zg],styles:[".card[_ngcontent-%COMP%]{height:80%}.staff-container[_ngcontent-%COMP%]{margin-top:2rem;display:flex;justify-content:center}.staff[_ngcontent-%COMP%]{border:#337ab7;border-width:1px;border-style:solid}.staff-header[_ngcontent-%COMP%]{display:flex;justify-content:center;background-color:#337ab7;color:#fff;font-weight:700}.staff-content[_ngcontent-%COMP%], .staff-header[_ngcontent-%COMP%]{padding:.5rem 1rem}.admin[_ngcontent-%COMP%]{display:flex;flex-direction:column}.information[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;width:100%}.info-panel[_ngcontent-%COMP%]{border-color:#333;background-image:linear-gradient(135deg,#fdfcfb,#e2d1c3);box-shadow:0 1px 4px 0 rgba(0,0,0,.14);box-sizing:border-box;color:#333;display:flex;flex-direction:column;margin:2rem 1rem;width:100%}.info-danger[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,#f83600 0,#f9d423);color:#fff;font-weight:700;font-size:1.5em}.info-panel-data[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:1rem}.info-panel-data[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:1rem;width:5rem}.info-text[_ngcontent-%COMP%]{width:100%;text-align:center}.info-panel-link[_ngcontent-%COMP%]{background:#4682b4}.info-panel-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:100%;color:#fff}"]}),t}(),wO=["underline"],CO=["connectionContainer"],xO=["inputContainer"],SO=["label"];function DO(t,e){1&t&&(_s(0),vs(1,"div",14),ys(2,"div",15),ys(3,"div",16),ys(4,"div",17),gs(),vs(5,"div",18),ys(6,"div",15),ys(7,"div",16),ys(8,"div",17),gs(),bs())}function EO(t,e){1&t&&(vs(0,"div",19),Ms(1,1),gs())}function AO(t,e){if(1&t&&(_s(0),Ms(1,2),vs(2,"span"),nu(3),gs(),bs()),2&t){var n=Ts(2);Xr(3),iu(n._control.placeholder)}}function IO(t,e){1&t&&Ms(0,3,["*ngSwitchCase","true"])}function OO(t,e){1&t&&(vs(0,"span",23),nu(1," *"),gs())}function TO(t,e){if(1&t){var n=ws();vs(0,"label",20,21),Ss("cdkObserveContent",(function(){return In(n),Ts().updateOutlineGap()})),cs(2,AO,4,1,"ng-container",12),cs(3,IO,1,0,"ng-content",12),cs(4,OO,2,0,"span",22),gs()}if(2&t){var i=Ts();qs("mat-empty",i._control.empty&&!i._shouldAlwaysFloat())("mat-form-field-empty",i._control.empty&&!i._shouldAlwaysFloat())("mat-accent","accent"==i.color)("mat-warn","warn"==i.color),ps("cdkObserveContentDisabled","outline"!=i.appearance)("id",i._labelId)("ngSwitch",i._hasLabel()),us("for",i._control.id)("aria-owns",i._control.id),Xr(2),ps("ngSwitchCase",!1),Xr(1),ps("ngSwitchCase",!0),Xr(1),ps("ngIf",!i.hideRequiredMarker&&i._control.required&&!i._control.disabled)}}function RO(t,e){1&t&&(vs(0,"div",24),Ms(1,4),gs())}function PO(t,e){if(1&t&&(vs(0,"div",25,26),ys(2,"span",27),gs()),2&t){var n=Ts();Xr(2),qs("mat-accent","accent"==n.color)("mat-warn","warn"==n.color)}}function MO(t,e){1&t&&(vs(0,"div"),Ms(1,5),gs()),2&t&&ps("@transitionMessages",Ts()._subscriptAnimationState)}function FO(t,e){if(1&t&&(vs(0,"div",31),nu(1),gs()),2&t){var n=Ts(2);ps("id",n._hintLabelId),Xr(1),iu(n.hintLabel)}}function LO(t,e){if(1&t&&(vs(0,"div",28),cs(1,FO,2,2,"div",29),Ms(2,6),ys(3,"div",30),Ms(4,7),gs()),2&t){var n=Ts();ps("@transitionMessages",n._subscriptAnimationState),Xr(1),ps("ngIf",n.hintLabel)}}var NO=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],VO=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],BO=0,jO=new re("MatError"),zO=function(){var t=function t(){y(this,t),this.id="mat-error-".concat(BO++)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(t,e){2&t&&us("id",e.id)},inputs:{id:"id"},features:[vu([{provide:jO,useExisting:t}])]}),t}(),HO={transitionMessages:fk("transitionMessages",[yk("enter",gk({opacity:1,transform:"translateY(0%)"})),bk("void => enter",[gk({opacity:0,transform:"translateY(-100%)"}),pk("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},UO=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t}),t}(),WO=0,qO=new re("MatHint"),YO=function(){var t=function t(){y(this,t),this.align="start",this.id="mat-hint-".concat(WO++)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(t,e){2&t&&(us("id",e.id)("align",null),qs("mat-form-field-hint-end","end"===e.align))},inputs:{align:"align",id:"id"},features:[vu([{provide:qO,useExisting:t}])]}),t}(),GO=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-label"]]}),t}(),KO=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-placeholder"]]}),t}(),ZO=new re("MatPrefix"),$O=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","matPrefix",""]],features:[vu([{provide:ZO,useExisting:t}])]}),t}(),XO=new re("MatSuffix"),QO=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["","matSuffix",""]],features:[vu([{provide:XO,useExisting:t}])]}),t}(),JO=0,tT=gx((function t(e){y(this,t),this._elementRef=e}),"primary"),eT=new re("MAT_FORM_FIELD_DEFAULT_OPTIONS"),nT=new re("MatFormField"),iT=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u,l){var c;return y(this,n),(c=e.call(this,t))._elementRef=t,c._changeDetectorRef=i,c._dir=a,c._defaults=o,c._platform=s,c._ngZone=u,c._outlineGapCalculationNeededImmediately=!1,c._outlineGapCalculationNeededOnStable=!1,c._destroyed=new U,c._showAlwaysAnimate=!1,c._subscriptAnimationState="",c._hintLabel="",c._hintLabelId="mat-hint-".concat(JO++),c._labelId="mat-form-field-label-".concat(JO++),c._labelOptions=r||{},c.floatLabel=c._getDefaultFloatLabelState(),c._animationsEnabled="NoopAnimations"!==l,c.appearance=o&&o.appearance?o.appearance:"legacy",c._hideRequiredMarker=!(!o||null==o.hideRequiredMarker)&&o.hideRequiredMarker,c}return b(n,[{key:"_shouldAlwaysFloat",value:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",value:function(){return"never"!==this.floatLabel}},{key:"getLabelId",value:function(){return this._hasFloatingLabel()?this._labelId:null}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var t=this;this._validateControlChild();var e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(e.controlType)),e.stateChanges.pipe(Xp(null)).subscribe((function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(zy(this._destroyed)).subscribe((function(){return t._changeDetectorRef.markForCheck()})),this._ngZone.runOutsideAngular((function(){t._ngZone.onStable.pipe(zy(t._destroyed)).subscribe((function(){t._outlineGapCalculationNeededOnStable&&t.updateOutlineGap()}))})),ht(this._prefixChildren.changes,this._suffixChildren.changes).subscribe((function(){t._outlineGapCalculationNeededOnStable=!0,t._changeDetectorRef.markForCheck()})),this._hintChildren.changes.pipe(Xp(null)).subscribe((function(){t._processHints(),t._changeDetectorRef.markForCheck()})),this._errorChildren.changes.pipe(Xp(null)).subscribe((function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})),this._dir&&this._dir.change.pipe(zy(this._destroyed)).subscribe((function(){"function"==typeof requestAnimationFrame?t._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){return t.updateOutlineGap()}))})):t.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(t){var e=this._control?this._control.ngControl:null;return e&&e[t]}},{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 t=this;this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,gy(this._label.nativeElement,"transitionend").pipe(Gp(1)).subscribe((function(){t._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||this._labelOptions.float||"auto"}},{key:"_syncDescribedByIds",value:function(){if(this._control){var t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push.apply(t,l(this._control.userAriaDescribedBy.split(" "))),"hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find((function(t){return"start"===t.align})):null,n=this._hintChildren?this._hintChildren.find((function(t){return"end"===t.align})):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&t.push.apply(t,l(this._errorChildren.map((function(t){return t.id}))));this._control.setDescribedByIds(t)}}},{key:"_validateControlChild",value:function(){}},{key:"updateOutlineGap",value:function(){var t=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&t&&t.children.length&&t.textContent.trim()&&this._platform.isBrowser)if(this._isAttachedToDOM()){var e=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),a=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var o=i.getBoundingClientRect();if(0===o.width&&0===o.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var s=this._getStartEnd(o),u=t.children,l=this._getStartEnd(u[0].getBoundingClientRect()),c=0,h=0;h0?.75*c+10:0}for(var d=0;d void",wk("@transformPanel",[kk()],{optional:!0}))]),transformPanel:fk("transformPanel",[yk("void",gk({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),yk("showing",gk({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),yk("showing-multiple",gk({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),bk("void => *",pk("120ms cubic-bezier(0, 0, 0.2, 1)")),bk("* => void",pk("100ms 25ms linear",gk({opacity:0})))])},mT=0,vT=256,gT=new re("mat-select-scroll-strategy"),yT=new re("MAT_SELECT_CONFIG"),_T={provide:gT,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},bT=function t(e,n){y(this,t),this.source=e,this.value=n},kT=yx(_x(vx(bx((function t(e,n,i,r,a){y(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=a}))))),wT=new re("MatSelectTrigger"),CT=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-select-trigger"]],features:[vu([{provide:wT,useExisting:t}])]}),t}(),xT=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o,s,u,c,h,d,f,p,m,v,g){var _;return y(this,n),(_=e.call(this,s,o,c,h,f))._viewportRuler=t,_._changeDetectorRef=i,_._ngZone=r,_._dir=u,_._parentFormField=d,_.ngControl=f,_._liveAnnouncer=v,_._panelOpen=!1,_._required=!1,_._scrollTop=0,_._multiple=!1,_._compareWith=function(t,e){return t===e},_._uid="mat-select-".concat(mT++),_._triggerAriaLabelledBy=null,_._destroy=new U,_._triggerFontSize=0,_._onChange=function(){},_._onTouched=function(){},_._valueId="mat-select-value-".concat(mT++),_._transformOrigin="top",_._panelDoneAnimatingStream=new U,_._offsetY=0,_._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],_._disableOptionCentering=!1,_._focused=!1,_.controlType="mat-select",_.ariaLabel="",_.optionSelectionChanges=Tp((function(){var t=_.options;return t?t.changes.pipe(Xp(t),Wp((function(){return ht.apply(void 0,l(t.map((function(t){return t.onSelectionChange}))))}))):_._ngZone.onStable.pipe(Gp(1),Wp((function(){return _.optionSelectionChanges})))})),_.openedChange=new xl,_._openedStream=_.openedChange.pipe(Vf((function(t){return t})),Y((function(){}))),_._closedStream=_.openedChange.pipe(Vf((function(t){return!t})),Y((function(){}))),_.selectionChange=new xl,_.valueChange=new xl,_.ngControl&&(_.ngControl.valueAccessor=a(_)),_._scrollStrategyFactory=m,_._scrollStrategy=_._scrollStrategyFactory(),_.tabIndex=parseInt(p)||0,_.id=_.id,g&&(null!=g.disableOptionCentering&&(_.disableOptionCentering=g.disableOptionCentering),null!=g.typeaheadDebounceInterval&&(_.typeaheadDebounceInterval=g.typeaheadDebounceInterval)),_}return b(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new f_(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Oy(),zy(this._destroy)).subscribe((function(){t.panelOpen?(t._scrollTop=0,t.openedChange.emit(!0)):(t.openedChange.emit(!1),t.overlayDir.offsetX=0,t._changeDetectorRef.markForCheck())})),this._viewportRuler.change().pipe(zy(this._destroy)).subscribe((function(){t._panelOpen&&(t._triggerRect=t.trigger.nativeElement.getBoundingClientRect(),t._changeDetectorRef.markForCheck())}))}},{key:"ngAfterContentInit",value:function(){var t=this;this._initKeyManager(),this._selectionModel.changed.pipe(zy(this._destroy)).subscribe((function(t){t.added.forEach((function(t){return t.select()})),t.removed.forEach((function(t){return t.deselect()}))})),this.options.changes.pipe(Xp(null),zy(this._destroy)).subscribe((function(){t._resetOptions(),t._initializeSelection()}))}},{key:"ngDoCheck",value:function(){var t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){var e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(t){t.disabled&&this.stateChanges.next(),t.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(){var t=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.pipe(Gp(1)).subscribe((function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(t._triggerFontSize,"px"))})))}},{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(t){this.value=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}},{key:"_handleClosedKeydown",value:function(t){var e=t.keyCode,n=e===H_||e===j_||e===B_||e===z_,i=e===M_||e===L_,r=this._keyManager;if(!r.isTyping()&&i&&!U_(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var a=this.selected;r.onKeydown(t);var o=this.selected;o&&a!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(t){var e=this._keyManager,n=t.keyCode,i=n===H_||n===j_,r=e.isTyping();if(i&&t.altKey)t.preventDefault(),this.close();else if(r||n!==M_&&n!==L_||!e.activeItem||U_(t))if(!r&&this._multiple&&65===n&&t.ctrlKey){t.preventDefault();var a=this.options.some((function(t){return!t.disabled&&!t.selected}));this.options.forEach((function(t){t.disabled||(a?t.select():t.deselect())}))}else{var o=e.activeItemIndex;e.onKeydown(t),this._multiple&&i&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==o&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.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 t=this;this.overlayDir.positionChange.pipe(Gp(1)).subscribe((function(){t._changeDetectorRef.detectChanges(),t._calculateOverlayOffsetX(),t.panel.nativeElement.scrollTop=t._scrollTop}))}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then((function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value),t.stateChanges.next()}))}},{key:"_setSelectionByValue",value:function(t){var e=this;if(this.multiple&&t)Array.isArray(t),this._selectionModel.clear(),t.forEach((function(t){return e._selectValue(t)})),this._sortValues();else{this._selectionModel.clear();var n=this._selectValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(t){var e=this,n=this.options.find((function(n){try{return null!=n.value&&e._compareWith(n.value,t)}catch(i){return!1}}));return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new jb(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(zy(this._destroy)).subscribe((function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())})),this._keyManager.change.pipe(zy(this._destroy)).subscribe((function(){t._panelOpen&&t.panel?t._scrollActiveOptionIntoView():t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()}))}},{key:"_resetOptions",value:function(){var t=this,e=ht(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(zy(e)).subscribe((function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())})),ht.apply(void 0,l(this.options.map((function(t){return t._stateChanges})))).pipe(zy(e)).subscribe((function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()}))}},{key:"_onSelect",value:function(t,e){var n=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(n!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),n!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;if(this.multiple){var e=this.options.toArray();this._selectionModel.sort((function(n,i){return t.sortComparator?t.sortComparator(n,i,e):e.indexOf(n)-e.indexOf(i)})),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(t){var e;e=this.multiple?this.selected.map((function(t){return t.value})):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(new bT(this,e)),this._changeDetectorRef.markForCheck()}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_scrollActiveOptionIntoView",value:function(){var t=this._keyManager.activeItemIndex||0,e=sS(t,this.options,this.optionGroups),n=this._getItemHeight();this.panel.nativeElement.scrollTop=uS((t+e)*n,n,this.panel.nativeElement.scrollTop,vT)}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_getOptionIndex",value:function(t){return this.options.reduce((function(e,n,i){return void 0!==e?e:t===n?i:void 0}),void 0)}},{key:"_calculateOverlayPosition",value:function(){var t=this._getItemHeight(),e=this._getItemCount(),n=Math.min(e*t,vT),i=e*t-n,r=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);r+=sS(r,this.options,this.optionGroups);var a=n/2;this._scrollTop=this._calculateOverlayScroll(r,a,i),this._offsetY=this._calculateOverlayOffsetY(r,a,i),this._checkOverlayWithinViewport(i)}},{key:"_calculateOverlayScroll",value:function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)}},{key:"_getPanelAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getLabelId",value:function(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}},{key:"_calculateOverlayOffsetX",value:function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?56:32;if(this.multiple)t=40;else{var a=this._selectionModel.selected[0]||this.options.first;t=a&&a.group?32:16}i||(t*=-1);var o=0-(e.left+t-(i?r:0)),s=e.right+t-n.width+(i?0:r);o>0?t+=o+8:s>0&&(t-=s+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(t,e,n){var i,r=this._getItemHeight(),a=(r-this._triggerRect.height)/2,o=Math.floor(vT/r);return this._disableOptionCentering?0:(i=0===this._scrollTop?t*r:this._scrollTop===n?(t-(this._getItemCount()-o))*r+(r-(this._getItemCount()*r-vT)%r):e-r/2,Math.round(-1*i-a))}},{key:"_checkOverlayWithinViewport",value:function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,a=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,vT)-a-this._triggerRect.height;o>r?this._adjustPanelUp(o,r):a>i?this._adjustPanelDown(a,i,t):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_getOriginBasedOnOption",value:function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2,n=Math.abs(this._offsetY)-e+t/2;return"50% ".concat(n,"px 0px")}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getTriggerAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(t){this._required=hy(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=hy(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=hy(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){t!==this._value&&(this.options&&this._setSelectionByValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=dy(t)}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map((function(t){return t.viewValue}));return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty}}]),n}(kT);return t.\u0275fac=function(e){return new(e||t)(ds(y_),ds(Eo),ds(mc),ds(Fx),ds(ku),ds(s_,8),ds(cE,8),ds(CE,8),ds(nT,8),ds(sD,10),fs("tabindex"),ds(gT),ds($b),ds(yT,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(jl(n,wT,!0),jl(n,oS,!0),jl(n,Jx,!0)),2&t&&(Ll(i=Ul())&&(e.customTrigger=i.first),Ll(i=Ul())&&(e.options=i),Ll(i=Ul())&&(e.optionGroups=i))},viewQuery:function(t,e){var n;1&t&&(Vl(aT,!0),Vl(oT,!0),Vl(bb,!0)),2&t&&(Ll(n=Ul())&&(e.trigger=n.first),Ll(n=Ul())&&(e.panel=n.first),Ll(n=Ul())&&(e.overlayDir=n.first))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&Ss("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()})),2&t&&(us("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),qs("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",disableOptionCentering:"disableOptionCentering",typeaheadDebounceInterval:"typeaheadDebounceInterval",placeholder:"placeholder",required:"required",multiple:"multiple",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[vu([{provide:UO,useExisting:t},{provide:rS,useExisting:t}]),Zo,nn],ngContentSelectors:fT,decls:9,vars:10,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",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,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(Ps(dT),vs(0,"div",0,1),Ss("click",(function(){return e.toggle()})),vs(3,"div",2),cs(4,sT,2,1,"span",3),cs(5,cT,3,2,"span",4),gs(),vs(6,"div",5),ys(7,"div",6),gs(),gs(),cs(8,hT,4,14,"ng-template",7),Ss("backdropClick",(function(){return e.close()}))("attach",(function(){return e._onAttached()}))("detach",(function(){return e.close()}))),2&t){var n=hs(1);Xr(3),ps("ngSwitch",e.empty),us("id",e._valueId),Xr(1),ps("ngSwitchCase",!0),Xr(1),ps("ngSwitchCase",!1),Xr(3),ps("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[_b,wd,Cd,bb,xd,fd],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}.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}\n"],encapsulation:2,data:{animation:[pT.transformPanelWrap,pT.transformPanel]},changeDetection:0}),t}(),ST=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[_T],imports:[[Qd,wb,lS,mx],__,rT,lS,mx]}),t}(),DT={tooltipState:fk("state",[yk("initial, void, hidden",gk({opacity:0,transform:"scale(0)"})),yk("visible",gk({transform:"scale(1)"})),bk("* => visible",pk("200ms cubic-bezier(0, 0, 0.2, 1)",_k([gk({opacity:0,transform:"scale(0)",offset:0}),gk({opacity:.5,transform:"scale(0.99)",offset:.5}),gk({opacity:1,transform:"scale(1)",offset:1})]))),bk("* => hidden",pk("100ms cubic-bezier(0, 0, 0.2, 1)",gk({opacity:0})))])},ET=i_({passive:!0}),AT=new re("mat-tooltip-scroll-strategy"),IT={provide:AT,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},OT=new re("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),TT=function(){var t=function(){function t(e,n,i,r,a,o,s,u,l,c,h){var d=this;y(this,t),this._overlay=e,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=r,this._ngZone=a,this._platform=o,this._ariaDescriber=s,this._focusMonitor=u,this._dir=c,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new U,this._handleKeydown=function(t){d._isTooltipVisible()&&t.keyCode===F_&&!U_(t)&&(t.preventDefault(),t.stopPropagation(),d._ngZone.run((function(){return d.hide(0)})))},this._scrollStrategy=l,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),a.runOutsideAngular((function(){n.nativeElement.addEventListener("keydown",d._handleKeydown)}))}return b(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(zy(this._destroyed)).subscribe((function(e){e?"keyboard"===e&&t._ngZone.run((function(){return t.show()})):t._ngZone.run((function(){return t.hide(0)}))}))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach((function(e){var n=u(e,2);t.removeEventListener(n[0],n[1],ET)})),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new w_(RT,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(zy(this._destroyed)).subscribe((function(){return t._detach()})),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return n.positionChanges.pipe(zy(this._destroyed)).subscribe((function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run((function(){return t.hide(0)}))})),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(zy(this._destroyed)).subscribe((function(){return t._detach()})),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),n.main),Object.assign(Object.assign({},e.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?t={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={originX:"end",originY:"center"});var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?t={overlayX:"center",overlayY:"bottom"}:"below"==n?t={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={overlayX:"start",overlayY:"center"});var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Gp(1),zy(this._destroyed)).subscribe((function(){t._tooltipInstance&&t._overlayRef.updatePosition()})))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var t=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){t._setupPointerExitEventsIfNeeded(),t.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){t._setupPointerExitEventsIfNeeded(),clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout((function(){return t.show()}),500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var t,e=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return e.hide()}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var i=function(){clearTimeout(e._touchstartTimeout),e.hide(e._defaultOptions.touchendHideDelay)};n.push(["touchend",i],["touchcancel",i])}this._addListeners(n),(t=this._passiveListeners).push.apply(t,n)}}},{key:"_addListeners",value:function(t){var e=this;t.forEach((function(t){var n=u(t,2);e._elementRef.nativeElement.addEventListener(n[0],n[1],ET)}))}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this.touchGestures;if("off"!==t){var e=this._elementRef.nativeElement,n=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==t&&e.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=hy(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular((function(){Promise.resolve().then((function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message)}))})))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(vb),ds(ku),ds(v_),ds(Gu),ds(mc),ds(Jy),ds(Vb),ds(ek),ds(AT),ds(s_,8),ds(OT,8))},t.\u0275dir=ze({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),RT=function(){var t=function(){function t(e,n){y(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new U,this._isHandset=this._breakpointObserver.observe("(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)")}return b(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout((function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()}),t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout((function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()}),t)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Eo),ds(MI))},t.\u0275cmp=Fe({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&Ss("click",(function(){return e._handleBodyInteraction()}),!1,Ci),2&t&&Ws("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(vs(0,"div",0),Ss("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),_l(1,"async"),nu(2),gs()),2&t&&(qs("mat-tooltip-handset",null==(n=bl(1,5,e._isHandset))?null:n.matches),ps("ngClass",e.tooltipClass)("@state",e._visibility),Xr(2),iu(e.message))},directives:[fd],pipes:[Pd],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[DT.tooltipState]},changeDetection:0}),t}(),PT=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[IT],imports:[[uk,Qd,wb,mx],mx,__]}),t}();function MT(t,e){if(1&t&&(vs(0,"mat-option",19),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n),Xr(1),ru(" ",n," ")}}function FT(t,e){if(1&t){var n=ws();vs(0,"mat-form-field",16),vs(1,"mat-select",17),Ss("selectionChange",(function(t){return In(n),Ts(2)._changePageSize(t.value)})),cs(2,MT,2,2,"mat-option",18),gs(),gs()}if(2&t){var i=Ts(2);ps("appearance",i._formFieldAppearance)("color",i.color),Xr(1),ps("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),Xr(1),ps("ngForOf",i._displayedPageSizeOptions)}}function LT(t,e){if(1&t&&(vs(0,"div",20),nu(1),gs()),2&t){var n=Ts(2);Xr(1),iu(n.pageSize)}}function NT(t,e){if(1&t&&(vs(0,"div",12),vs(1,"div",13),nu(2),gs(),cs(3,FT,3,6,"mat-form-field",14),cs(4,LT,2,1,"div",15),gs()),2&t){var n=Ts();Xr(2),ru(" ",n._intl.itemsPerPageLabel," "),Xr(1),ps("ngIf",n._displayedPageSizeOptions.length>1),Xr(1),ps("ngIf",n._displayedPageSizeOptions.length<=1)}}function VT(t,e){if(1&t){var n=ws();vs(0,"button",21),Ss("click",(function(){return In(n),Ts().firstPage()})),ni(),vs(1,"svg",7),ys(2,"path",22),gs(),gs()}if(2&t){var i=Ts();ps("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),us("aria-label",i._intl.firstPageLabel)}}function BT(t,e){if(1&t){var n=ws();ni(),ii(),vs(0,"button",23),Ss("click",(function(){return In(n),Ts().lastPage()})),ni(),vs(1,"svg",7),ys(2,"path",24),gs(),gs()}if(2&t){var i=Ts();ps("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),us("aria-label",i._intl.lastPageLabel)}}var jT=function(){var t=function t(){y(this,t),this.changes=new U,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of ".concat(n);var i=t*e,r=i<(n=Math.max(n,0))?Math.min(i+e,n):i+e;return"".concat(i+1," \u2013 ").concat(r," of ").concat(n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:function(){return new t},token:t,providedIn:"root"}),t}(),zT={provide:jT,deps:[[new Ct,new St,jT]],useFactory:function(t){return t||new jT}},HT=new re("MAT_PAGINATOR_DEFAULT_OPTIONS"),UT=vx(kx((function t(){y(this,t)}))),WT=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;if(y(this,n),(a=e.call(this))._intl=t,a._changeDetectorRef=i,a._pageIndex=0,a._length=0,a._pageSizeOptions=[],a._hidePageSize=!1,a._showFirstLastButtons=!1,a.page=new xl,a._intlChanges=t.changes.subscribe((function(){return a._changeDetectorRef.markForCheck()})),r){var o=r.pageSize,s=r.pageSizeOptions,u=r.hidePageSize,l=r.showFirstLastButtons,c=r.formFieldAppearance;null!=o&&(a._pageSize=o),null!=s&&(a._pageSizeOptions=s),null!=u&&(a._hidePageSize=u),null!=l&&(a._showFirstLastButtons=l),null!=c&&(a._formFieldAppearance=c)}return a}return b(n,[{key:"ngOnInit",value:function(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe()}},{key:"nextPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}}},{key:"previousPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}}},{key:"firstPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}}},{key:"lastPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}}},{key:"hasPreviousPage",value:function(){return this.pageIndex>=1&&0!=this.pageSize}},{key:"hasNextPage",value:function(){var t=this.getNumberOfPages()-1;return this.pageIndex=i.length&&(r=0),i[r]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=hy(t)}}]),n}(ZT);return t.\u0275fac=function(e){return XT(e||t)},t.\u0275dir=ze({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[Zo,nn]}),t}(),XT=Ui($T),QT=dx.ENTERING+" "+hx.STANDARD_CURVE,JT={indicator:fk("indicator",[yk("active-asc, asc",gk({transform:"translateY(0px)"})),yk("active-desc, desc",gk({transform:"translateY(10px)"})),bk("active-asc <=> active-desc",pk(QT))]),leftPointer:fk("leftPointer",[yk("active-asc, asc",gk({transform:"rotate(-45deg)"})),yk("active-desc, desc",gk({transform:"rotate(45deg)"})),bk("active-asc <=> active-desc",pk(QT))]),rightPointer:fk("rightPointer",[yk("active-asc, asc",gk({transform:"rotate(45deg)"})),yk("active-desc, desc",gk({transform:"rotate(-45deg)"})),bk("active-asc <=> active-desc",pk(QT))]),arrowOpacity:fk("arrowOpacity",[yk("desc-to-active, asc-to-active, active",gk({opacity:1})),yk("desc-to-hint, asc-to-hint, hint",gk({opacity:.54})),yk("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",gk({opacity:0})),bk("* => asc, * => desc, * => active, * => hint, * => void",pk("0ms")),bk("* <=> *",pk(QT))]),arrowPosition:fk("arrowPosition",[bk("* => desc-to-hint, * => desc-to-active",pk(QT,_k([gk({transform:"translateY(-25%)"}),gk({transform:"translateY(0)"})]))),bk("* => hint-to-desc, * => active-to-desc",pk(QT,_k([gk({transform:"translateY(0)"}),gk({transform:"translateY(25%)"})]))),bk("* => asc-to-hint, * => asc-to-active",pk(QT,_k([gk({transform:"translateY(25%)"}),gk({transform:"translateY(0)"})]))),bk("* => hint-to-asc, * => active-to-asc",pk(QT,_k([gk({transform:"translateY(0)"}),gk({transform:"translateY(-25%)"})]))),yk("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",gk({transform:"translateY(0)"})),yk("hint-to-desc, active-to-desc, desc",gk({transform:"translateY(-25%)"})),yk("hint-to-asc, active-to-asc, asc",gk({transform:"translateY(25%)"}))]),allowChildren:fk("allowChildren",[bk("* <=> *",[wk("@*",kk(),{optional:!0})])])},tR=function(){var t=function t(){y(this,t),this.changes=new U,this.sortButtonLabel=function(t){return"Change sorting for ".concat(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:function(){return new t},token:t,providedIn:"root"}),t}(),eR={provide:tR,deps:[[new Ct,new St,tR]],useFactory:function(t){return t||new tR}},nR=vx((function t(){y(this,t)})),iR=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s){var u;return y(this,n),(u=e.call(this))._intl=t,u._sort=r,u._columnDef=a,u._focusMonitor=o,u._elementRef=s,u._showIndicatorHint=!1,u._arrowDirection="",u._disableViewStateAnimation=!1,u.arrowPosition="after",u._rerenderSubscription=ht(r.sortChange,r._stateChanges,t.changes).subscribe((function(){u._isSorted()&&u._updateArrowDirection(),!u._isSorted()&&u._viewState&&"active"===u._viewState.toState&&(u._disableViewStateAnimation=!1,u._setAnimationTransitionState({fromState:"active",toState:u._arrowDirection})),i.markForCheck()})),u}return b(n,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){return t._setIndicatorHintVisible(!!e)}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);var t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}},{key:"_handleClick",value:function(){this._isDisabled()||this._toggleOnInteraction()}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==L_&&t.keyCode!==M_||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?"".concat(t,"-to-"):"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=hy(t)}}]),n}(nR);return t.\u0275fac=function(e){return new(e||t)(ds(tR),ds(Eo),ds($T,8),ds("MAT_SORT_HEADER_COLUMN_DEF",8),ds(ek),ds(ku))},t.\u0275cmp=Fe({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&Ss("click",(function(){return e._handleClick()}))("keydown",(function(t){return e._handleKeydown(t)}))("mouseenter",(function(){return e._setIndicatorHintVisible(!0)}))("mouseleave",(function(){return e._setIndicatorHintVisible(!1)})),2&t&&(us("aria-sort",e._getAriaSortAttribute()),qs("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[Zo],attrs:YT,ngContentSelectors:KT,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(Ps(),vs(0,"div",0),vs(1,"div",1),Ms(2),gs(),cs(3,GT,6,6,"div",2),gs()),2&t&&(qs("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),us("tabindex",e._isDisabled()?null:0),Xr(3),ps("ngIf",e._renderArrow()))},directives:[yd],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[JT.indicator,JT.leftPointer,JT.rightPointer,JT.arrowOpacity,JT.arrowPosition,JT.allowChildren]},changeDetection:0}),t}(),rR=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[eR],imports:[[Qd]]}),t}(),aR=[[["caption"]],[["colgroup"],["col"]]],oR=["caption","colgroup, col"];function sR(t,e){if(1&t&&(vs(0,"th",3),nu(1),gs()),2&t){var n=Ts();Ws("text-align",n.justify),Xr(1),ru(" ",n.headerText," ")}}function uR(t,e){if(1&t&&(vs(0,"td",4),nu(1),gs()),2&t){var n=e.$implicit,i=Ts();Ws("text-align",i.justify),Xr(1),ru(" ",i.dataAccessor(n,i.name)," ")}}function lR(t){return function(t){f(n,t);var e=g(n);function n(){var t;y(this,n);for(var i=arguments.length,r=new Array(i),a=0;a4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];y(this,t),this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=a,this._needsPositionStickyOnElement=o}return b(t,[{key:"clearStickyPositioning",value:function(t,e){var n,i=this,r=[],a=h(t);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.nodeType===o.ELEMENT_NODE){r.push(o);for(var s=0;s0;r--)e[r]&&(n[r]=i,i+=t[r]);return n}},{key:"_scheduleStyleChanges",value:function(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}]),t}(),NR=function(){var t=function t(e,n){y(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ds(Gu),ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","rowOutlet",""]]}),t}(),VR=function(){var t=function t(e,n){y(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ds(Gu),ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","headerRowOutlet",""]]}),t}(),BR=function(){var t=function t(e,n){y(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ds(Gu),ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","footerRowOutlet",""]]}),t}(),jR=function(){var t=function t(e,n){y(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ds(Gu),ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","noDataRowOutlet",""]]}),t}(),zR=function(){var t=function(){function t(e,n,i,r,a,o,s,u,l){y(this,t),this._differs=e,this._changeDetectorRef=n,this._elementRef=i,this._dir=a,this._platform=s,this._viewRepeater=u,this._coalescedStyleScheduler=l,this._onDestroy=new U,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new bp({start:0,end:Number.MAX_VALUE}),r||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=o,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return b(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((function(e,n){return t.trackBy?t.trackBy(n.dataIndex,n.data):n}))}},{key:"ngAfterContentChecked",value:function(){this._cacheRowDefs(),this._cacheColumnDefs();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),h_(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var n=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(e,n,(function(e,n,i){return t._getEmbeddedViewArgs(e.item,i)}),(function(t){return t.item.data}),(function(e){1===e.operation&&e.context&&t._renderCellTemplateForItem(e.record.item.rowDef,e.context)})):e.forEachOperation((function(e,i,r){if(null==e.previousIndex){var a=e.item;t._renderRow(t._rowOutlet,a.rowDef,r,{$implicit:a.data})}else if(null==r)n.remove(i);else{var o=n.get(i);n.move(o,r)}})),this._updateRowIndexContext(),e.forEachIdentityChange((function(t){n.get(t.currentIndex).context.$implicit=t.item.data})),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var n=this._headerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var n=this._footerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning([].concat(l(e),l(n),l(i)),["left","right"]),e.forEach((function(e,n){t._addStickyColumnStyles([e],t._headerRowDefs[n])})),this._rowDefs.forEach((function(e){for(var i=[],r=0;r0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((function(e,n){return t._renderRow(t._headerRowOutlet,e,n)})),this.updateStickyHeaderRowStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((function(e,n){return t._renderRow(t._footerRowOutlet,e,n)})),this.updateStickyFooterRowStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var n=this,i=Array.from(e.columns||[]).map((function(t){return n._columnDefsByName.get(t)})),r=i.map((function(t){return t.sticky})),a=i.map((function(t){return t.stickyEnd}));this._stickyStyler.updateStickyColumns(t,r,a)}},{key:"_getRenderedRows",value:function(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.viewContainer.createEmbeddedView(e.template,i,n);return this._renderCellTemplateForItem(e,i),r}},{key:"_renderCellTemplateForItem",value:function(t,e){var n,i=h(this._getCellTemplates(t));try{for(i.s();!(n=i.n()).done;)OR.mostRecentCellOutlet&&OR.mostRecentCellOutlet._viewContainer.createEmbeddedView(n.value,e)}catch(r){i.e(r)}finally{i.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,n=t.length;e0&&void 0!==arguments[0]?arguments[0]:[];return y(this,n),(t=e.call(this))._renderData=new bp([]),t._filter=new bp(""),t._internalPageChanges=new U,t._renderChangesSubscription=D.EMPTY,t.sortingDataAccessor=function(t,e){var n=t[e];if(fy(n)){var i=Number(n);return io?l=1:a0)){var i=Math.ceil(n.length/n.pageSize)-1||0,r=Math.min(n.pageIndex,i);r!==n.pageIndex&&(n.pageIndex=r,e._internalPageChanges.next())}}))}},{key:"connect",value:function(){return this._renderData}},{key:"disconnect",value:function(){}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t)}},{key:"filter",get:function(){return this._filter.value},set:function(t){this._filter.next(t)}},{key:"sort",get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()}},{key:"paginator",get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()}}]),n}(c_);function OP(t){return t instanceof Date&&!isNaN(+t)}function TP(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Py,n=OP(t),i=n?+t-e.now():Math.abs(t);return function(t){return t.lift(new RP(i,e))}}var RP=function(){function t(e,n){y(this,t),this.delay=e,this.scheduler=n}return b(t,[{key:"call",value:function(t,e){return e.subscribe(new PP(t,this.delay,this.scheduler))}}]),t}(),PP=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t)).delay=i,a.scheduler=r,a.queue=[],a.active=!1,a.errored=!1,a}return b(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new MP(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(Gy.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(Gy.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var a=Math.max(0,n[0].time-i.now());this.schedule(t,a)}else this.unsubscribe(),e.active=!1}}]),n}(P),MP=function t(e,n){y(this,t),this.time=e,this.notification=n},FP=i_({passive:!0}),LP=function(){var t=function(){function t(e,n){y(this,t),this._platform=e,this._ngZone=n,this._monitoredElements=new Map}return b(t,[{key:"monitor",value:function(t){var e=this;if(!this._platform.isBrowser)return Ip;var n=vy(t),i=this._monitoredElements.get(n);if(i)return i.subject;var r=new U,a="cdk-text-field-autofilled",o=function(t){"cdk-text-field-autofill-start"!==t.animationName||n.classList.contains(a)?"cdk-text-field-autofill-end"===t.animationName&&n.classList.contains(a)&&(n.classList.remove(a),e._ngZone.run((function(){return r.next({target:t.target,isAutofilled:!1})}))):(n.classList.add(a),e._ngZone.run((function(){return r.next({target:t.target,isAutofilled:!0})})))};return this._ngZone.runOutsideAngular((function(){n.addEventListener("animationstart",o,FP),n.classList.add("cdk-text-field-autofill-monitored")})),this._monitoredElements.set(n,{subject:r,unlisten:function(){n.removeEventListener("animationstart",o,FP)}}),r}},{key:"stopMonitoring",value:function(t){var e=vy(t),n=this._monitoredElements.get(e);n&&(n.unlisten(),n.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}},{key:"ngOnDestroy",value:function(){var t=this;this._monitoredElements.forEach((function(e,n){return t.stopMonitoring(n)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(Jy),pe(mc))},t.\u0275prov=It({factory:function(){return new t(pe(Jy),pe(mc))},token:t,providedIn:"root"}),t}(),NP=function(){var t=function(){function t(e,n){y(this,t),this._elementRef=e,this._autofillMonitor=n,this.cdkAutofill=new xl}return b(t,[{key:"ngOnInit",value:function(){var t=this;this._autofillMonitor.monitor(this._elementRef).subscribe((function(e){return t.cdkAutofill.emit(e)}))}},{key:"ngOnDestroy",value:function(){this._autofillMonitor.stopMonitoring(this._elementRef)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(LP))},t.\u0275dir=ze({type:t,selectors:[["","cdkAutofill",""]],outputs:{cdkAutofill:"cdkAutofill"}}),t}(),VP=function(){var t=function(){function t(e,n,i,r){y(this,t),this._elementRef=e,this._platform=n,this._ngZone=i,this._destroyed=new U,this._enabled=!0,this._previousMinRows=-1,this._document=r,this._textareaElement=this._elementRef.nativeElement,this._measuringClass=n.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring"}return b(t,[{key:"_setMinHeight",value:function(){var t=this.minRows&&this._cachedLineHeight?"".concat(this.minRows*this._cachedLineHeight,"px"):null;t&&(this._textareaElement.style.minHeight=t)}},{key:"_setMaxHeight",value:function(){var t=this.maxRows&&this._cachedLineHeight?"".concat(this.maxRows*this._cachedLineHeight,"px"):null;t&&(this._textareaElement.style.maxHeight=t)}},{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular((function(){gy(t._getWindow(),"resize").pipe(jy(16),zy(t._destroyed)).subscribe((function(){return t.resizeToFitContent(!0)}))})))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_cacheTextareaLineHeight",value:function(){if(!this._cachedLineHeight){var t=this._textareaElement.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,this._textareaElement.parentNode.removeChild(t),this._setMinHeight(),this._setMaxHeight()}}},{key:"ngDoCheck",value:function(){this._platform.isBrowser&&this.resizeToFitContent()}},{key:"resizeToFitContent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enabled&&(this._cacheTextareaLineHeight(),this._cachedLineHeight)){var n=this._elementRef.nativeElement,i=n.value;if(e||this._minRows!==this._previousMinRows||i!==this._previousValue){var r=n.placeholder;n.classList.add(this._measuringClass),n.placeholder="";var a=n.scrollHeight-4;n.style.height="".concat(a,"px"),n.classList.remove(this._measuringClass),n.placeholder=r,this._ngZone.runOutsideAngular((function(){"undefined"!=typeof requestAnimationFrame?requestAnimationFrame((function(){return t._scrollToCaretPosition(n)})):setTimeout((function(){return t._scrollToCaretPosition(n)}))})),this._previousValue=i,this._previousMinRows=this._minRows}}}},{key:"reset",value:function(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}},{key:"_noopInputHandler",value:function(){}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_scrollToCaretPosition",value:function(t){var e=t.selectionStart,n=t.selectionEnd,i=this._getDocument();this._destroyed.isStopped||i.activeElement!==t||t.setSelectionRange(e,n)}},{key:"minRows",get:function(){return this._minRows},set:function(t){this._minRows=dy(t),this._setMinHeight()}},{key:"maxRows",get:function(){return this._maxRows},set:function(t){this._maxRows=dy(t),this._setMaxHeight()}},{key:"enabled",get:function(){return this._enabled},set:function(t){t=hy(t),this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Jy),ds(mc),ds(Zc,8))},t.\u0275dir=ze({type:t,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,e){1&t&&Ss("input",(function(){return e._noopInputHandler()}))},inputs:{minRows:["cdkAutosizeMinRows","minRows"],maxRows:["cdkAutosizeMaxRows","maxRows"],enabled:["cdkTextareaAutosize","enabled"]},exportAs:["cdkTextareaAutosize"]}),t}(),BP=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[t_]]}),t}(),jP=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"matAutosizeMinRows",get:function(){return this.minRows},set:function(t){this.minRows=t}},{key:"matAutosizeMaxRows",get:function(){return this.maxRows},set:function(t){this.maxRows=t}},{key:"matAutosize",get:function(){return this.enabled},set:function(t){this.enabled=t}},{key:"matTextareaAutosize",get:function(){return this.enabled},set:function(t){this.enabled=t}}]),n}(VP);return t.\u0275fac=function(e){return zP(e||t)},t.\u0275dir=ze({type:t,selectors:[["textarea","mat-autosize",""],["textarea","matTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize","mat-autosize"],inputs:{cdkAutosizeMinRows:"cdkAutosizeMinRows",cdkAutosizeMaxRows:"cdkAutosizeMaxRows",matAutosizeMinRows:"matAutosizeMinRows",matAutosizeMaxRows:"matAutosizeMaxRows",matAutosize:["mat-autosize","matAutosize"],matTextareaAutosize:"matTextareaAutosize"},exportAs:["matTextareaAutosize"],features:[Zo]}),t}(),zP=Ui(jP),HP=new re("MAT_INPUT_VALUE_ACCESSOR"),UP=["button","checkbox","file","hidden","image","radio","range","reset","submit"],WP=0,qP=bx((function t(e,n,i,r){y(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r})),YP=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u,l,c,h){var d;y(this,n),(d=e.call(this,s,a,o,r))._elementRef=t,d._platform=i,d.ngControl=r,d._autofillMonitor=l,d._formField=h,d._uid="mat-input-".concat(WP++),d.focused=!1,d.stateChanges=new U,d.controlType="mat-input",d.autofilled=!1,d._disabled=!1,d._required=!1,d._type="text",d._readonly=!1,d._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter((function(t){return n_().has(t)}));var f=d._elementRef.nativeElement,p=f.nodeName.toLowerCase();return d._inputValueAccessor=u||f,d._previousNativeValue=d.value,d.id=d.id,i.IOS&&c.runOutsideAngular((function(){t.nativeElement.addEventListener("keyup",(function(t){var e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))}))})),d._isServer=!d._platform.isBrowser,d._isNativeSelect="select"===p,d._isTextarea="textarea"===p,d._isNativeSelect&&(d.controlType=f.multiple?"mat-native-select-multiple":"mat-native-select"),d}return b(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe((function(e){t.autofilled=e.isAutofilled,t.stateChanges.next()}))}},{key:"ngOnChanges",value:function(){this.stateChanges.next()}},{key:"ngOnDestroy",value:function(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_focusChanged",value:function(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}},{key:"_onInput",value:function(){}},{key:"_dirtyCheckPlaceholder",value:function(){var t,e,n=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(n!==this._previousPlaceholder){var i=this._elementRef.nativeElement;this._previousPlaceholder=n,n?i.setAttribute("placeholder",n):i.removeAttribute("placeholder")}}},{key:"_dirtyCheckNativeValue",value:function(){var t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}},{key:"_validateType",value:function(){UP.indexOf(this._type)}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var t=this._elementRef.nativeElement.validity;return t&&t.badInput}},{key:"setDescribedByIds",value:function(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}},{key:"disabled",get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(t){this._disabled=hy(t),this.focused&&(this.focused=!1,this.stateChanges.next())}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=hy(t)}},{key:"type",get:function(){return this._type},set:function(t){this._type=t||"text",this._validateType(),!this._isTextarea&&n_().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}},{key:"value",get:function(){return this._inputValueAccessor.value},set:function(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}},{key:"readonly",get:function(){return this._readonly},set:function(t){this._readonly=hy(t)}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}}]),n}(qP);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Jy),ds(sD,10),ds(cE,8),ds(CE,8),ds(Fx),ds(HP,10),ds(LP),ds(mc),ds(nT,8))},t.\u0275dir=ze({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&Ss("focus",(function(){return e._focusChanged(!0)}))("blur",(function(){return e._focusChanged(!1)}))("input",(function(){return e._onInput()})),2&t&&(ou("disabled",e.disabled)("required",e.required),us("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState)("aria-required",e.required.toString()),qs("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[vu([{provide:UO,useExisting:t}]),Zo,nn]}),t}(),GP=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[Fx],imports:[[BP,rT],BP,rT]}),t}(),KP=["searchSelectInput"],ZP=["innerSelectSearch"];function $P(t,e){if(1&t){var n=ws();vs(0,"button",6),Ss("click",(function(){return In(n),Ts()._reset(!0)})),vs(1,"i",7),nu(2,"close"),gs(),gs()}}var XP=function(t){return{"mat-select-search-inner-multiple":t}},QP=function(){function t(t,e){this.matSelect=t,this.changeDetectorRef=e,this.placeholderLabel=django.gettext("Filter"),this.noEntriesFoundLabel=django.gettext("No entries found"),this.clearSearchInput=!0,this.disableInitialFocus=!1,this.changed=new xl,this.overlayClassSet=!1,this.change=new xl,this._onDestroy=new U}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(e):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,e]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[e]=!0):this.matSelect.panelClass=e,this.matSelect.openedChange.pipe(TP(1),zy(this._onDestroy)).subscribe((function(e){e?(t.getWidth(),t.disableInitialFocus||t._focus()):t.clearSearchInput&&t._reset()})),this.matSelect.openedChange.pipe(Gp(1)).pipe(zy(this._onDestroy)).subscribe((function(){t._options=t.matSelect.options,t._options.changes.pipe(zy(t._onDestroy)).subscribe((function(){var e=t.matSelect._keyManager;e&&t.matSelect.panelOpen&&setTimeout((function(){e.setFirstItemActive(),t.getWidth()}),1)}))})),this.change.pipe(zy(this._onDestroy)).subscribe((function(){t.changeDetectorRef.detectChanges()})),this.initMultipleHandling()},t.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.setOverlayClass()})),this.matSelect.openedChange.pipe(Gp(1),zy(this._onDestroy)).subscribe((function(){t.matSelect.options.changes.pipe(zy(t._onDestroy)).subscribe((function(){t.changeDetectorRef.markForCheck()}))}))},t.prototype._handleKeydown=function(t){(t.key&&1===t.key.length||t.keyCode>=65&&t.keyCode<=90||t.keyCode>=48&&t.keyCode<=57||t.keyCode===L_)&&t.stopPropagation()},t.prototype.writeValue=function(t){t!==this._value&&(this._value=t,this.change.emit(t))},t.prototype.onInputChange=function(t){t!==this._value&&(this.initMultiSelectedValues(),this._value=t,this.changed.emit(t),this.change.emit(t))},t.prototype.onBlur=function(t){this.writeValue(t)},t.prototype._focus=function(){if(this.searchSelectInput&&this.matSelect.panel){var t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.searchSelectInput.nativeElement.focus(),t.scrollTop=e}},t.prototype._reset=function(t){this.searchSelectInput&&(this.searchSelectInput.nativeElement.value="",this.onInputChange(""),t&&this._focus())},t.prototype.setOverlayClass=function(){var t=this;this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(zy(this._onDestroy)).subscribe((function(){for(var e,n=t.searchSelectInput.nativeElement;n=n.parentElement;)if(n.classList.contains("cdk-overlay-pane")){e=n;break}e&&e.classList.add("cdk-overlay-pane-select-search")})),this.overlayClassSet=!0)},t.prototype.initMultipleHandling=function(){var t=this;this.matSelect.valueChange.pipe(zy(this._onDestroy)).subscribe((function(e){if(t.matSelect.multiple){var n=!1;if(t._value&&t._value.length&&t.previousSelectedValues&&Array.isArray(t.previousSelectedValues)){e&&Array.isArray(e)||(e=[]);var i=t.matSelect.options.map((function(t){return t.value}));t.previousSelectedValues.forEach((function(t){-1===e.indexOf(t)&&-1===i.indexOf(t)&&(e.push(t),n=!0)}))}n&&t.matSelect._onChange(e),t.previousSelectedValues=e}}))},t.prototype.getWidth=function(){if(this.innerSelectSearch&&this.innerSelectSearch.nativeElement){for(var t,e=this.innerSelectSearch.nativeElement;e=e.parentElement;)if(e.classList.contains("mat-select-panel")){t=e;break}t&&(this.innerSelectSearch.nativeElement.style.width=t.clientWidth+"px")}},t.prototype.initMultiSelectedValues=function(){this.matSelect.multiple&&!this._value&&(this.previousSelectedValues=this.matSelect.options.filter((function(t){return t.selected})).map((function(t){return t.value})))},t.\u0275fac=function(e){return new(e||t)(ds(xT),ds(Eo))},t.\u0275cmp=Fe({type:t,selectors:[["uds-mat-select-search"]],viewQuery:function(t,e){var n;1&t&&(Nl(KP,!0,ku),Nl(ZP,!0,ku)),2&t&&(Ll(n=Ul())&&(e.searchSelectInput=n.first),Ll(n=Ul())&&(e.innerSelectSearch=n.first))},inputs:{placeholderLabel:"placeholderLabel",noEntriesFoundLabel:"noEntriesFoundLabel",clearSearchInput:"clearSearchInput",disableInitialFocus:"disableInitialFocus"},outputs:{changed:"changed"},features:[vu([{provide:QS,useExisting:Ht((function(){return t})),multi:!0}])],decls:6,vars:5,consts:[["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner","mat-typography","mat-datepicker-content","mat-tab-header",3,"ngClass"],["innerSelectSearch",""],["matInput","","autocomplete","off",1,"mat-select-search-input",3,"placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ys(0,"input",0),vs(1,"div",1,2),vs(3,"input",3,4),Ss("keydown",(function(t){return e._handleKeydown(t)}))("input",(function(t){return e.onInputChange(t.target.value)}))("blur",(function(t){return e.onBlur(t.target.value)})),gs(),cs(5,$P,3,0,"button",5),gs()),2&t&&(Xr(1),ps("ngClass",pl(3,XP,e.matSelect.multiple)),Xr(2),ps("placeholder",e.placeholderLabel),Xr(2),ps("ngIf",e.value))},directives:[YP,fd,yd,BS],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;border-bottom-width:1px;border-bottom-style:solid;z-index:100;font-size:inherit;box-shadow:none;border-radius:0}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:100%} .mat-select-search-panel{transform:none!important;overflow-x:hidden}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:4px;top:5px} .cdk-overlay-pane-select-search{margin-top:-50px}"],changeDetection:0}),t}();function JP(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New user permission for"),gs())}function tM(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New group permission for"),gs())}function eM(t,e){if(1&t&&(vs(0,"mat-option",11),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),iu(n.text)}}function nM(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",12),Ss("changed",(function(t){return In(n),Ts().filterUser=t})),gs()}}function iM(t,e){if(1&t&&(vs(0,"mat-option",11),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),iu(n.text)}}function rM(t,e){if(1&t&&(vs(0,"mat-option",11),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),iu(n.text)}}var aM=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.filterUser="",this.authenticators=[],this.entities=[],this.permissions=[{id:"1",text:django.gettext("Read only")},{id:"2",text:django.gettext("Full Access")}],this.authenticator="",this.entity="",this.permission="1",this.onSave=new xl(!0)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"50%";return e.gui.dialog.open(t,{width:r,data:{type:n,item:i},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe((function(e){e.forEach((function(e){t.authenticators.push({id:e.id,text:e.name})}))}))},t.prototype.changeAuth=function(t){var e=this;this.entities.length=0,this.entity="",this.rest.authenticators.detail(t,this.data.type+"s").summary().subscribe((function(t){t.forEach((function(t){e.entities.push({id:t.id,text:t.name})}))}))},t.prototype.save=function(){this.onSave.emit({authenticator:this.authenticator,entity:this.entity,permissision:this.permission}),this.dialogRef.close()},t.prototype.filteredEntities=function(){var t=this,e=new Array;return this.entities.forEach((function(n){(""===t.filterUser||n.text.toLocaleLowerCase().includes(t.filterUser.toLocaleLowerCase()))&&e.push(n)})),e},t.prototype.getFieldLabel=function(t){return"user"===t?django.gettext("User"):"group"===t?django.gettext("Group"):"auth"===t?django.gettext("Authenticator"):django.gettext("Permission")},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-new-permission"]],decls:24,vars:13,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["titleGroup",""],[1,"container"],[3,"placeholder","ngModel","valueChange","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"placeholder","ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){if(1&t&&(vs(0,"h4",0),cs(1,JP,2,0,"uds-translate",1),ys(2,"b",2),cs(3,tM,2,0,"ng-template",null,3,Gl),gs(),vs(5,"mat-dialog-content"),vs(6,"div",4),vs(7,"mat-form-field"),vs(8,"mat-select",5),Ss("valueChange",(function(t){return e.changeAuth(t)}))("ngModelChange",(function(t){return e.authenticator=t})),cs(9,eM,2,2,"mat-option",6),gs(),gs(),vs(10,"mat-form-field"),vs(11,"mat-select",7),Ss("ngModelChange",(function(t){return e.entity=t})),cs(12,nM,1,0,"uds-mat-select-search",8),cs(13,iM,2,2,"mat-option",6),gs(),gs(),vs(14,"mat-form-field"),vs(15,"mat-select",7),Ss("ngModelChange",(function(t){return e.permission=t})),cs(16,rM,2,2,"mat-option",6),gs(),gs(),gs(),gs(),vs(17,"mat-dialog-actions"),vs(18,"button",9),vs(19,"uds-translate"),nu(20,"Cancel"),gs(),gs(),vs(21,"button",10),Ss("click",(function(){return e.save()})),vs(22,"uds-translate"),nu(23,"Ok"),gs(),gs(),gs()),2&t){var n=hs(4);Xr(1),ps("ngIf","user"===e.data.type)("ngIfElse",n),Xr(1),ps("innerHTML",e.data.item.name,Or),Xr(6),ps("placeholder",e.getFieldLabel("auth"))("ngModel",e.authenticator),Xr(1),ps("ngForOf",e.authenticators),Xr(2),ps("placeholder",e.getFieldLabel(e.data.type))("ngModel",e.entity),Xr(1),ps("ngIf",e.entities.length>10),Xr(1),ps("ngForOf",e.filteredEntities()),Xr(2),ps("placeholder",e.getFieldLabel("perm"))("ngModel",e.permission),Xr(1),ps("ngForOf",e.permissions)}},directives:[AS,yd,IS,iT,xT,lD,gE,vd,OS,BS,ES,HS,oS,QP],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function oM(t,e){if(1&t){var n=ws();vs(0,"div",11),vs(1,"div",12),nu(2),gs(),vs(3,"div",13),nu(4),vs(5,"a",14),Ss("click",(function(){In(n);var t=e.$implicit;return Ts(2).revokePermission(t)})),vs(6,"i",15),nu(7,"close"),gs(),gs(),gs(),gs()}if(2&t){var i=e.$implicit;Xr(2),au(" ",i.entity_name,"@",i.auth_name," "),Xr(2),ru(" ",i.perm_name," \xa0")}}function sM(t,e){if(1&t){var n=ws();vs(0,"div",7),vs(1,"div",8),vs(2,"div",9),Ss("click",(function(t){In(n);var i=e.$implicit;return Ts().newPermission(i),t.preventDefault()})),vs(3,"uds-translate"),nu(4,"New permission..."),gs(),gs(),cs(5,oM,8,3,"div",10),gs(),gs()}if(2&t){var i=e.$implicit;Xr(5),ps("ngForOf",i)}}var uM=function(t,e){return[t,e]},lM=function(){function t(t,e,n){this.api=t,this.dialogRef=e,this.data=n,this.userPermissions=[],this.groupPermissions=[]}return t.launch=function(e,n,i){var r=window.innerWidth<800?"90%":"60%";e.gui.dialog.open(t,{width:r,data:{rest:n,item:i},disableClose:!1})},t.prototype.ngOnInit=function(){this.reload()},t.prototype.reload=function(){var t=this;this.data.rest.getPermissions(this.data.item.id).subscribe((function(e){t.updatePermissions(e)}))},t.prototype.updatePermissions=function(t){var e=this;this.userPermissions.length=0,this.groupPermissions.length=0,t.forEach((function(t){"user"===t.type?e.userPermissions.push(t):e.groupPermissions.push(t)}))},t.prototype.revokePermission=function(t){var e=this;this.api.gui.yesno(django.gettext("Remove"),django.gettext("Confirm revokation of permission")+" "+t.entity_name+"@"+t.auth_name+" "+t.perm_name+"").subscribe((function(n){n&&e.data.rest.revokePermission([t.id]).subscribe((function(t){e.reload()}))}))},t.prototype.newPermission=function(t){var e=this,n=t===this.userPermissions?"user":"group";aM.launch(this.api,n,this.data.item).subscribe((function(t){e.data.rest.addPermission(e.data.item.id,n+"s",t.entity,t.permissision).subscribe((function(t){e.reload()}))}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-permissions-form"]],decls:17,vars:5,consts:[["mat-dialog-title",""],[3,"innerHTML"],[1,"titles"],[1,"title"],[1,"permissions"],["class","content",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","primary"],[1,"content"],[1,"perms"],[1,"perm","new",3,"click"],["class","perm",4,"ngFor","ngForOf"],[1,"perm"],[1,"owner"],[1,"permission"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Permissions for"),gs(),nu(3,"\xa0"),ys(4,"b",1),gs(),vs(5,"mat-dialog-content"),vs(6,"div",2),vs(7,"uds-translate",3),nu(8,"Users"),gs(),vs(9,"uds-translate",3),nu(10,"Groups"),gs(),gs(),vs(11,"div",4),cs(12,sM,6,1,"div",5),gs(),gs(),vs(13,"mat-dialog-actions"),vs(14,"button",6),vs(15,"uds-translate"),nu(16,"Ok"),gs(),gs(),gs()),2&t&&(Xr(4),ps("innerHTML",e.data.item.name,Or),Xr(8),ps("ngForOf",ml(2,uM,e.userPermissions,e.groupPermissions)))},directives:[AS,HS,IS,vd,OS,BS,ES],styles:[".titles[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;margin-bottom:.4rem}.title[_ngcontent-%COMP%]{font-size:1.4rem}.permissions[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start}.perms[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);margin-bottom:1rem;margin-right:1rem;padding:.5rem}.perm[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.perm[_ngcontent-%COMP%]:hover:not(.new){background-color:#333;color:#fff;cursor:default}.owner[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.new[_ngcontent-%COMP%]{color:#00f;justify-content:center}.new[_ngcontent-%COMP%]:hover{color:#fff;background-color:#00f;cursor:pointer}.content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;justify-content:space-between}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),cM=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")],hM=[django.gettext("January"),django.gettext("February"),django.gettext("March"),django.gettext("April"),django.gettext("May"),django.gettext("June"),django.gettext("July"),django.gettext("August"),django.gettext("September"),django.gettext("October"),django.gettext("November"),django.gettext("December")],dM={days:cM,shortDays:fM(cM),months:hM,shortMonths:fM(hM),AM:"AM",PM:"PM",am:"am",pm:"pm"};function fM(t){var e=[];return t.forEach((function(t){e.push(t.substr(0,3))})),e}function pM(t,e,n){return mM(t,e,n)}function mM(t,e,n,i){i=i||{},e=e||new Date,(n=n||dM).formats=n.formats||{};var r=e.getTime();return(i.utc||"number"==typeof i.timezone)&&(e=function(t){var e;return e=6e4*(t.getTimezoneOffset()||0),new Date(t.getTime()+e)}(e)),"number"==typeof i.timezone&&(e=new Date(e.getTime()+6e4*i.timezone)),t.replace(/%([-_0]?.)/g,(function(t,a){var o,s,u,l,c,h,d;if(s=null,l=null,2===a.length){if("-"===(s=a[0]))l="";else if("_"===s)l=" ";else{if("0"!==s)return t;l="0"}a=a[1]}switch(a){case"A":return n.days[e.getDay()];case"a":return n.shortDays[e.getDay()];case"B":return n.months[e.getMonth()];case"b":return n.shortMonths[e.getMonth()];case"C":return vM(Math.floor(e.getFullYear()/100),l);case"D":return mM(n.formats.D||"%m/%d/%y",e,n);case"d":return vM(e.getDate(),l);case"e":return e.getDate();case"F":return mM(n.formats.F||"%Y-%m-%d",e,n);case"H":return vM(e.getHours(),l);case"h":return n.shortMonths[e.getMonth()];case"I":return vM(gM(e),l);case"j":return h=new Date(e.getFullYear(),0,1),vM(Math.ceil((e.getTime()-h.getTime())/864e5),3);case"k":return vM(e.getHours(),void 0===l?" ":l);case"L":return vM(Math.floor(r%1e3),3);case"l":return vM(gM(e),void 0===l?" ":l);case"M":return vM(e.getMinutes(),l);case"m":return vM(e.getMonth()+1,l);case"n":return"\n";case"o":return String(e.getDate())+function(t){var e,n;if(e=t%10,(n=t%100)>=11&&n<=13||0===e||e>=4)return"th";switch(e){case 1:return"st";case 2:return"nd";case 3:return"rd"}}(e.getDate());case"P":case"p":return"";case"R":return mM(n.formats.R||"%H:%M",e,n);case"r":return mM(n.formats.r||"%I:%M:%S %p",e,n);case"S":return vM(e.getSeconds(),l);case"s":return Math.floor(r/1e3);case"T":return mM(n.formats.T||"%H:%M:%S",e,n);case"t":return"\t";case"U":return vM(yM(e,"sunday"),l);case"u":return 0===(o=e.getDay())?7:o;case"v":return mM(n.formats.v||"%e-%b-%Y",e,n);case"W":return vM(yM(e,"monday"),l);case"w":return e.getDay();case"Y":return e.getFullYear();case"y":return(d=String(e.getFullYear())).slice(d.length-2);case"Z":return i.utc?"GMT":(c=e.toString().match(/\((\w+)\)/))&&c[1]||"";case"z":return i.utc?"+0000":((u="number"==typeof i.timezone?i.timezone:-e.getTimezoneOffset())<0?"-":"+")+vM(Math.abs(u/60))+vM(u%60);default:return a}}))}function vM(t,e,n){"number"==typeof e&&(n=e,e="0"),e=null==e?"0":e,n=null==n?2:n;var i=String(t);if(e)for(;i.length12&&(e-=12),e}function yM(t,e){var n,i;return e=e||"sunday",i=t.getDay(),"monday"===e&&(0===i?i=6:i--),n=new Date(t.getFullYear(),0,1),Math.floor(((t-n)/864e5+7-i)/7)}function _M(t){return t.replace(/./g,(function(t){switch(t){case"a":case"A":return"%p";case"b":case"d":case"m":case"w":case"W":case"y":case"Y":return"%"+t;case"c":return"%FT%TZ";case"D":return"%a";case"e":return"%z";case"f":return"%I:%M";case"F":return"%F";case"h":case"g":return"%I";case"H":case"G":return"%H";case"i":return"%M";case"I":return"";case"j":return"%d";case"l":return"%A";case"L":return"";case"M":return"%b";case"n":return"%m";case"N":return"%b";case"o":return"%W";case"O":return"%z";case"P":return"%R %p";case"r":return"%a, %d %b %Y %T %z";case"s":return"%S";case"S":case"t":return"";case"T":return"%Z";case"u":return"0";case"U":return"";case"z":return"%j";case"Z":return"z";default:return t}}))}function bM(t,e,n){var i;if(void 0===n&&(n=null),"None"===e||null==e)e=7226578800,i=django.gettext("Never");else{var r=django.get_format(t);n&&(r+=n),i=pM(_M(r),new Date(1e3*e))}return i}function kM(t){return"yes"===t||!0===t||"true"===t||1===t}var wM=n("dunZ");function CM(t){return void 0!==t.changingThisBreaksApplicationSecurity&&(t=t.changingThisBreaksApplicationSecurity.replace(/<.*>/g,"")),'"'+(t=""+t).replace('"','""')+'"'}function xM(t){var e="";t.columns.forEach((function(t){e+=CM(t.title)+","})),e=e.slice(0,-1)+"\r\n",t.dataSource.data.forEach((function(n){t.columns.forEach((function(t){var i=n[t.name];switch(t.type){case vI.DATE:i=bM("SHORT_DATE_FORMAT",i);break;case vI.DATETIME:i=bM("SHORT_DATETIME_FORMAT",i);break;case vI.DATETIMESEC:i=bM("SHORT_DATE_FORMAT",i," H:i:s");break;case vI.TIME:i=bM("TIME_FORMAT",i)}e+=CM(i)+","})),e=e.slice(0,-1)+"\r\n"}));var n=new Blob([e],{type:"text/csv"});setTimeout((function(){Object(wM.saveAs)(n,t.title+".csv")}),100)}function SM(t,e){if(1&t&&(ni(),ys(0,"circle",3)),2&t){var n=Ts();Ws("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),us("r",n._getCircleRadius())}}function DM(t,e){if(1&t&&(ni(),ys(0,"circle",3)),2&t){var n=Ts();Ws("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),us("r",n._getCircleRadius())}}function EM(t,e){if(1&t&&(ni(),ys(0,"circle",3)),2&t){var n=Ts();Ws("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),us("r",n._getCircleRadius())}}function AM(t,e){if(1&t&&(ni(),ys(0,"circle",3)),2&t){var n=Ts();Ws("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),us("r",n._getCircleRadius())}}var IM=".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n",OM=gx((function t(e){y(this,t),this._elementRef=e}),"primary"),TM=new re("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}}),RM=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o){var s;y(this,n),(s=e.call(this,t))._elementRef=t,s._document=r,s._diameter=100,s._value=0,s._fallbackAnimation=!1,s.mode="determinate";var u=n._diameters;return s._spinnerAnimationLabel=s._getSpinnerAnimationLabel(),u.has(r.head)||u.set(r.head,new Set([100])),s._fallbackAnimation=i.EDGE||i.TRIDENT,s._noopAnimations="NoopAnimations"===a&&!!o&&!o._forceAnimations,o&&(o.diameter&&(s.diameter=o.diameter),o.strokeWidth&&(s.strokeWidth=o.strokeWidth)),s}return b(n,[{key:"ngOnInit",value:function(){var t=this._elementRef.nativeElement;this._styleRoot=a_(t)||this._document.head,this._attachStyleNode();var e="mat-progress-spinner-indeterminate".concat(this._fallbackAnimation?"-fallback":"","-animation");t.classList.add(e)}},{key:"_getCircleRadius",value:function(){return(this.diameter-10)/2}},{key:"_getViewBox",value:function(){var t=2*this._getCircleRadius()+this.strokeWidth;return"0 0 ".concat(t," ").concat(t)}},{key:"_getStrokeCircumference",value:function(){return 2*Math.PI*this._getCircleRadius()}},{key:"_getStrokeDashOffset",value:function(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}},{key:"_getCircleStrokeWidth",value:function(){return this.strokeWidth/this.diameter*100}},{key:"_attachStyleNode",value:function(){var t=this._styleRoot,e=this._diameter,i=n._diameters,r=i.get(t);if(!r||!r.has(e)){var a=this._document.createElement("style");a.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),a.textContent=this._getAnimationText(),t.appendChild(a),r||(r=new Set,i.set(t,r)),r.add(e)}}},{key:"_getAnimationText",value:function(){var t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,"".concat(.95*t)).replace(/END_VALUE/g,"".concat(.2*t)).replace(/DIAMETER/g,"".concat(this._spinnerAnimationLabel))}},{key:"_getSpinnerAnimationLabel",value:function(){return this.diameter.toString().replace(".","_")}},{key:"diameter",get:function(){return this._diameter},set:function(t){this._diameter=dy(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}},{key:"strokeWidth",get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=dy(t)}},{key:"value",get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,dy(t)))}}]),n}(OM);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Jy),ds(Zc,8),ds(ix,8),ds(TM))},t.\u0275cmp=Fe({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(us("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),Ws("width",e.diameter,"px")("height",e.diameter,"px"),qs("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[Zo],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(ni(),vs(0,"svg",0),cs(1,SM,1,9,"circle",1),cs(2,DM,1,7,"circle",2),gs()),2&t&&(Ws("width",e.diameter,"px")("height",e.diameter,"px"),ps("ngSwitch","indeterminate"===e.mode),us("viewBox",e._getViewBox()),Xr(1),ps("ngSwitchCase",!0),Xr(1),ps("ngSwitchCase",!1))},directives:[wd,Cd],styles:[IM],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t}(),PM=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o){var s;return y(this,n),(s=e.call(this,t,i,r,a,o)).mode="indeterminate",s}return n}(RM);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Jy),ds(Zc,8),ds(ix,8),ds(TM))},t.\u0275cmp=Fe({type:t,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(t,e){2&t&&(Ws("width",e.diameter,"px")("height",e.diameter,"px"),qs("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color"},features:[Zo],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(ni(),vs(0,"svg",0),cs(1,EM,1,9,"circle",1),cs(2,AM,1,7,"circle",2),gs()),2&t&&(Ws("width",e.diameter,"px")("height",e.diameter,"px"),ps("ngSwitch","indeterminate"===e.mode),us("viewBox",e._getViewBox()),Xr(1),ps("ngSwitchCase",!0),Xr(1),ps("ngSwitchCase",!1))},directives:[wd,Cd],styles:[IM],encapsulation:2,changeDetection:0}),t}(),MM=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[mx,Qd],mx]}),t}(),FM=["mat-menu-item",""],LM=["*"];function NM(t,e){if(1&t){var n=ws();vs(0,"div",0),Ss("keydown",(function(t){return In(n),Ts()._handleKeydown(t)}))("click",(function(){return In(n),Ts().closed.emit("click")}))("@transformMenu.start",(function(t){return In(n),Ts()._onAnimationStart(t)}))("@transformMenu.done",(function(t){return In(n),Ts()._onAnimationDone(t)})),vs(1,"div",1),Ms(2),gs(),gs()}if(2&t){var i=Ts();ps("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),us("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var VM={transformMenu:fk("transformMenu",[yk("void",gk({opacity:0,transform:"scale(0.8)"})),bk("void => enter",mk([wk(".mat-menu-content, .mat-mdc-menu-content",pk("100ms linear",gk({opacity:1}))),pk("120ms cubic-bezier(0, 0, 0.2, 1)",gk({transform:"scale(1)"}))])),bk("* => void",pk("100ms 25ms linear",gk({opacity:0})))]),fadeInItems:fk("fadeInItems",[yk("showing",gk({opacity:1})),bk("void => *",[gk({opacity:0}),pk("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},BM=new re("MatMenuContent"),jM=function(){var t=function(){function t(e,n,i,r,a,o,s){y(this,t),this._template=e,this._componentFactoryResolver=n,this._appRef=i,this._injector=r,this._viewContainerRef=a,this._document=o,this._changeDetectorRef=s,this._attached=new U}return b(t,[{key:"attach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._portal||(this._portal=new C_(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new D_(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}},{key:"detach",value:function(){this._portal.isAttached&&this._portal.detach()}},{key:"ngOnDestroy",value:function(){this._outlet&&this._outlet.dispose()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(qu),ds(bu),ds(Lc),ds(qo),ds(Gu),ds(Zc),ds(Eo))},t.\u0275dir=ze({type:t,selectors:[["ng-template","matMenuContent",""]],features:[vu([{provide:BM,useExisting:t}])]}),t}(),zM=new re("MAT_MENU_PANEL"),HM=yx(vx((function t(){y(this,t)}))),UM=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o){var s;return y(this,n),(s=e.call(this))._elementRef=t,s._focusMonitor=r,s._parentMenu=o,s.role="menuitem",s._hovered=new U,s._focused=new U,s._highlighted=!1,s._triggersSubmenu=!1,o&&o.addItem&&o.addItem(a(s)),s._document=i,s}return b(n,[{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}},{key:"ngAfterViewInit",value:function(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}},{key:"ngOnDestroy",value:function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_checkDisabled",value:function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}},{key:"_handleMouseEnter",value:function(){this._hovered.next(this)}},{key:"getLabel",value:function(){var t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3,n="";if(t.childNodes)for(var i=t.childNodes.length,r=0;r0&&void 0!==arguments[0]?arguments[0]:"program";this.lazyContent?this._ngZone.onStable.pipe(Gp(1)).subscribe((function(){return t._focusFirstItem(e)})):this._focusFirstItem(e)}},{key:"_focusFirstItem",value:function(t){var e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}}},{key:"resetActiveItem",value:function(){this._keyManager.setActiveItem(-1)}},{key:"setElevation",value:function(t){var e=Math.min(4+t,24),n="mat-elevation-z".concat(e),i=Object.keys(this._classList).find((function(t){return t.startsWith("mat-elevation-z")}));i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[n]=!0,this._previousElevation=n)}},{key:"setPositionClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.xPosition,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.yPosition,n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}},{key:"_startAnimation",value:function(){this._panelAnimationState="enter"}},{key:"_resetAnimation",value:function(){this._panelAnimationState="void"}},{key:"_onAnimationDone",value:function(t){this._animationDone.next(t),this._isAnimating=!1}},{key:"_onAnimationStart",value:function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}},{key:"_updateDirectDescendants",value:function(){var t=this;this._allItems.changes.pipe(Xp(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e._parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))}},{key:"xPosition",get:function(){return this._xPosition},set:function(t){this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=hy(t)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=hy(t)}},{key:"panelClass",set:function(t){var e=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach((function(t){e._classList[t]=!1})),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach((function(t){e._classList[t]=!0})),this._elementRef.nativeElement.className="")}},{key:"classList",get:function(){return this.panelClass},set:function(t){this.panelClass=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(mc),ds(WM))},t.\u0275dir=ze({type:t,contentQueries:function(t,e,n){var i;1&t&&(jl(n,BM,!0),jl(n,UM,!0),jl(n,UM,!1)),2&t&&(Ll(i=Ul())&&(e.lazyContent=i.first),Ll(i=Ul())&&(e._allItems=i),Ll(i=Ul())&&(e.items=i))},viewQuery:function(t,e){var n;1&t&&Vl(qu,!0),2&t&&Ll(n=Ul())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t}(),GM=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(YM);return t.\u0275fac=function(e){return KM(e||t)},t.\u0275dir=ze({type:t,features:[Zo]}),t}(),KM=Ui(GM),ZM=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){return y(this,n),e.call(this,t,i,r)}return n}(GM);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(mc),ds(WM))},t.\u0275cmp=Fe({type:t,selectors:[["mat-menu"]],exportAs:["matMenu"],features:[vu([{provide:zM,useExisting:GM},{provide:GM,useExisting:t}]),Zo],ngContentSelectors:LM,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(Ps(),cs(0,NM,3,6,"ng-template"))},directives:[fd],styles:['.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;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}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[VM.transformMenu,VM.fadeInItems]},changeDetection:0}),t}(),$M=new re("mat-menu-scroll-strategy"),XM={provide:$M,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},QM=i_({passive:!0}),JM=function(){var t=function(){function t(e,n,i,r,a,o,s,u){var l=this;y(this,t),this._overlay=e,this._element=n,this._viewContainerRef=i,this._parentMenu=a,this._menuItemInstance=o,this._dir=s,this._focusMonitor=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=D.EMPTY,this._hoverSubscription=D.EMPTY,this._menuCloseSubscription=D.EMPTY,this._handleTouchStart=function(){return l._openedBy="touch"},this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new xl,this.onMenuOpen=this.menuOpened,this.menuClosed=new xl,this.onMenuClose=this.menuClosed,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,QM),o&&(o._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=r}return b(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,QM),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this._menuItemInstance||!this._parentMenu)}},{key:"toggleMenu",value:function(){return this._menuOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return t.closeMenu()})),this._initMenu(),this.menu instanceof GM&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.close.emit()}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}},{key:"_destroyMenu",value:function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),e instanceof GM?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Vf((function(t){return"void"===t.toState})),Gp(1),zy(e.lazyContent._attached)).subscribe({next:function(){return e.lazyContent.detach()},complete:function(){return t._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),e.lazyContent&&e.lazyContent.detach())}}},{key:"_initMenu",value:function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},{key:"_setMenuElevation",value:function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}},{key:"_restoreFocus",value:function(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null}},{key:"_setIsMenuOpen",value:function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}},{key:"_checkMenu",value:function(){}},{key:"_createOverlay",value:function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}},{key:"_getOverlayConfig",value:function(){return new X_({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}},{key:"_subscribeToPositions",value:function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe((function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")}))}},{key:"_setPosition",value:function(t){var e=u("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],r=u("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),a=r[0],o=r[1],s=a,l=o,c=n,h=i,d=0;this.triggersSubmenu()?(h=n="before"===this.menu.xPosition?"start":"end",i=c="end"===n?"start":"end",d="bottom"===a?8:-8):this.menu.overlapTrigger||(s="top"===a?"bottom":"top",l="top"===o?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:c,overlayY:a,offsetY:d},{originX:i,originY:s,overlayX:h,overlayY:a,offsetY:d},{originX:n,originY:l,overlayX:c,overlayY:o,offsetY:-d},{originX:i,originY:l,overlayX:h,overlayY:o,offsetY:-d}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return ht(e,this._parentMenu?this._parentMenu.closed:Lf(),this._parentMenu?this._parentMenu._hovered().pipe(Vf((function(e){return e!==t._menuItemInstance})),Vf((function(){return t._menuOpen}))):Lf(),n)}},{key:"_handleMousedown",value:function(t){Qb(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;this.triggersSubmenu()&&(e===z_&&"ltr"===this.dir||e===B_&&"rtl"===this.dir)&&this.openMenu()}},{key:"_handleClick",value:function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}},{key:"_handleHover",value:function(){var t=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(Vf((function(e){return e===t._menuItemInstance&&!e.disabled})),TP(0,Iy)).subscribe((function(){t._openedBy="mouse",t.menu instanceof GM&&t.menu._isAnimating?t.menu._animationDone.pipe(Gp(1),TP(0,Iy),zy(t._parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))}},{key:"_getPortal",value:function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new C_(this.menu.templateRef,this._viewContainerRef)),this._portal}},{key:"_deprecatedMatMenuTriggerFor",get:function(){return this.menu},set:function(t){this.menu=t}},{key:"menu",get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe((function(t){e._destroyMenu(),"click"!==t&&"tab"!==t||!e._parentMenu||e._parentMenu.closed.emit(t)}))))}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(vb),ds(ku),ds(Gu),ds($M),ds(GM,8),ds(UM,10),ds(s_,8),ds(ek))},t.\u0275dir=ze({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&Ss("mousedown",(function(t){return e._handleMousedown(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("click",(function(t){return e._handleClick(t)})),2&t&&us("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t}(),tF=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[XM],imports:[mx]}),t}(),eF=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[XM],imports:[[Qd,mx,Yx,wb,tF],__,mx,tF]}),t}(),nF=function(){var t=function(){function t(){y(this,t),this._vertical=!1,this._inset=!1}return b(t,[{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=hy(t)}},{key:"inset",get:function(){return this._inset},set:function(t){this._inset=hy(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(us("aria-orientation",e.vertical?"vertical":"horizontal"),qs("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},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}),t}(),iF=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[mx],mx]}),t}(),rF=function(){function t(){}return t.prototype.transform=function(t,e){return t.sort(void 0===e?function(t,e){return t>e?1:-1}:function(t,n){return t[e]>n[e]?1:-1})},t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"sort",type:t,pure:!0}),t}(),aF=["trigger"];function oF(t,e){1&t&&ys(0,"img",36),2&t&&ps("src",Ts().icon,Tr)}function sF(t,e){if(1&t){var n=ws();vs(0,"button",46),Ss("click",(function(){In(n);var t=e.$implicit,i=Ts(5);return i.newAction.emit({param:t,table:i})})),gs()}if(2&t){var i=e.$implicit,r=Ts(5);ps("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Or)}}function uF(t,e){if(1&t&&(_s(0),vs(1,"button",42),nu(2),gs(),vs(3,"mat-menu",43,44),cs(5,sF,1,1,"button",45),_l(6,"sort"),gs(),bs()),2&t){var n=e.$implicit,i=hs(4);Xr(1),ps("matMenuTriggerFor",i),Xr(1),iu(n.key),Xr(1),ps("overlapTrigger",!1),Xr(2),ps("ngForOf",kl(6,4,n.value,"name"))}}function lF(t,e){if(1&t&&(_s(0),vs(1,"mat-menu",37,38),cs(3,uF,7,7,"ng-container",39),_l(4,"keyvalue"),gs(),vs(5,"a",40),vs(6,"i",17),nu(7,"insert_drive_file"),gs(),vs(8,"span",41),vs(9,"uds-translate"),nu(10,"New"),gs(),gs(),vs(11,"i",17),nu(12,"arrow_drop_down"),gs(),gs(),bs()),2&t){var n=hs(2),i=Ts(3);Xr(1),ps("overlapTrigger",!1),Xr(2),ps("ngForOf",bl(4,3,i.grpTypes)),Xr(2),ps("matMenuTriggerFor",n)}}function cF(t,e){if(1&t){var n=ws();vs(0,"button",46),Ss("click",(function(){In(n);var t=e.$implicit,i=Ts(4);return i.newAction.emit({param:t,table:i})})),gs()}if(2&t){var i=e.$implicit,r=Ts(4);ps("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Or)}}function hF(t,e){if(1&t&&(_s(0),vs(1,"mat-menu",37,38),cs(3,cF,1,1,"button",45),_l(4,"sort"),gs(),vs(5,"a",40),vs(6,"i",17),nu(7,"insert_drive_file"),gs(),vs(8,"span",41),vs(9,"uds-translate"),nu(10,"New"),gs(),gs(),vs(11,"i",17),nu(12,"arrow_drop_down"),gs(),gs(),bs()),2&t){var n=hs(2),i=Ts(3);Xr(1),ps("overlapTrigger",!1),Xr(2),ps("ngForOf",kl(4,3,i.oTypes,"name")),Xr(2),ps("matMenuTriggerFor",n)}}function dF(t,e){if(1&t&&(_s(0),cs(1,lF,13,5,"ng-container",8),cs(2,hF,13,6,"ng-container",8),bs()),2&t){var n=Ts(2);Xr(1),ps("ngIf",n.newGrouped),Xr(1),ps("ngIf",!n.newGrouped)}}function fF(t,e){if(1&t){var n=ws();_s(0),vs(1,"a",47),Ss("click",(function(){In(n);var t=Ts(2);return t.newAction.emit({param:void 0,table:t})})),vs(2,"i",17),nu(3,"insert_drive_file"),gs(),vs(4,"span",41),vs(5,"uds-translate"),nu(6,"New"),gs(),gs(),gs(),bs()}}function pF(t,e){if(1&t&&(_s(0),cs(1,dF,3,2,"ng-container",8),cs(2,fF,7,0,"ng-container",8),bs()),2&t){var n=Ts();Xr(1),ps("ngIf",null!=n.oTypes&&0!=n.oTypes.length),Xr(1),ps("ngIf",null!=n.oTypes&&0==n.oTypes.length)}}function mF(t,e){if(1&t){var n=ws();_s(0),vs(1,"a",48),Ss("click",(function(){In(n);var t=Ts();return t.emitIfSelection(t.editAction)})),vs(2,"i",17),nu(3,"edit"),gs(),vs(4,"span",41),vs(5,"uds-translate"),nu(6,"Edit"),gs(),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(1),ps("disabled",1!=i.selection.selected.length)}}function vF(t,e){if(1&t){var n=ws();_s(0),vs(1,"a",48),Ss("click",(function(){return In(n),Ts().permissions()})),vs(2,"i",17),nu(3,"perm_identity"),gs(),vs(4,"span",41),vs(5,"uds-translate"),nu(6,"Permissions"),gs(),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(1),ps("disabled",1!=i.selection.selected.length)}}function gF(t,e){if(1&t){var n=ws();vs(0,"a",50),Ss("click",(function(){In(n);var t=e.$implicit;return Ts(2).emitCustom(t)})),gs()}if(2&t){var i=e.$implicit;ps("disabled",Ts(2).isCustomDisabled(i))("innerHTML",i.html,Or)}}function yF(t,e){if(1&t&&(_s(0),cs(1,gF,1,2,"a",49),bs()),2&t){var n=Ts();Xr(1),ps("ngForOf",n.getcustomButtons())}}function _F(t,e){if(1&t){var n=ws();_s(0),vs(1,"a",51),Ss("click",(function(){return In(n),Ts().export()})),vs(2,"i",17),nu(3,"import_export"),gs(),vs(4,"span",41),vs(5,"uds-translate"),nu(6,"Export"),gs(),gs(),gs(),bs()}}function bF(t,e){if(1&t){var n=ws();_s(0),vs(1,"a",52),Ss("click",(function(){In(n);var t=Ts();return t.emitIfSelection(t.deleteAction,!0)})),vs(2,"i",17),nu(3,"delete_forever"),gs(),vs(4,"span",41),vs(5,"uds-translate"),nu(6,"Delete"),gs(),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(1),ps("disabled",i.selection.isEmpty())}}function kF(t,e){if(1&t){var n=ws();vs(0,"button",53),Ss("click",(function(){In(n);var t=Ts();return t.filterText="",t.applyFilter()})),vs(1,"i",17),nu(2,"close"),gs(),gs()}}function wF(t,e){1&t&&ys(0,"mat-header-cell")}function CF(t,e){1&t&&(vs(0,"i",17),nu(1,"check_box"),gs())}function xF(t,e){1&t&&(vs(0,"i",17),nu(1,"check_box_outline_blank"),gs())}function SF(t,e){if(1&t){var n=ws();vs(0,"mat-cell",56),Ss("click",(function(t){In(n);var i=e.$implicit;return Ts(2).clickRow(i,t)})),cs(1,CF,2,0,"i",57),cs(2,xF,2,0,"ng-template",null,58,Gl),gs()}if(2&t){var i=e.$implicit,r=hs(3),a=Ts(2);Xr(1),ps("ngIf",a.selection.isSelected(i))("ngIfElse",r)}}function DF(t,e){1&t&&(_s(0,54),cs(1,wF,1,0,"mat-header-cell",22),cs(2,SF,4,2,"mat-cell",55),bs())}function EF(t,e){1&t&&ys(0,"mat-header-cell")}function AF(t,e){if(1&t){var n=ws();vs(0,"mat-cell"),vs(1,"div",59),Ss("click",(function(t){In(n);var i=e.$implicit,r=Ts();return r.detailAction.emit({param:i,table:r}),t.stopPropagation()})),vs(2,"i",17),nu(3,"subdirectory_arrow_right"),gs(),gs(),gs()}}function IF(t,e){if(1&t&&(vs(0,"mat-header-cell",63),nu(1),gs()),2&t){var n=Ts().$implicit;Xr(1),iu(n.title)}}function OF(t,e){if(1&t){var n=ws();vs(0,"mat-cell",64),Ss("click",(function(t){In(n);var i=e.$implicit;return Ts(2).clickRow(i,t)}))("contextmenu",(function(t){In(n);var i=e.$implicit;return Ts(2).onContextMenu(i,t)})),ys(1,"div",65),gs()}if(2&t){var i=e.$implicit,r=Ts().$implicit,a=Ts();Xr(1),ps("innerHtml",a.getRowColumn(i,r),Or)}}function TF(t,e){1&t&&(_s(0,60),cs(1,IF,2,1,"mat-header-cell",61),cs(2,OF,2,1,"mat-cell",62),bs()),2&t&&Fs("matColumnDef",e.$implicit.name)}function RF(t,e){1&t&&ys(0,"mat-header-row")}function PF(t,e){if(1&t&&ys(0,"mat-row",66),2&t){var n=e.$implicit;ps("ngClass",Ts().rowClass(n))}}function MF(t,e){if(1&t&&(vs(0,"div",67),nu(1),vs(2,"uds-translate"),nu(3,"Selected items"),gs(),gs()),2&t){var n=Ts();Xr(1),ru(" ",n.selection.selected.length," ")}}function FF(t,e){if(1&t){var n=ws();vs(0,"button",71),Ss("click",(function(){In(n);var t=Ts().item,e=Ts();return e.detailAction.emit({param:t,table:e})})),vs(1,"i",72),nu(2,"subdirectory_arrow_right"),gs(),vs(3,"uds-translate"),nu(4,"Detail"),gs(),gs()}}function LF(t,e){if(1&t){var n=ws();vs(0,"button",71),Ss("click",(function(){In(n);var t=Ts(2);return t.emitIfSelection(t.editAction)})),vs(1,"i",72),nu(2,"edit"),gs(),vs(3,"uds-translate"),nu(4,"Edit"),gs(),gs()}}function NF(t,e){if(1&t){var n=ws();vs(0,"button",71),Ss("click",(function(){return In(n),Ts(2).permissions()})),vs(1,"i",72),nu(2,"perm_identity"),gs(),vs(3,"uds-translate"),nu(4,"Permissions"),gs(),gs()}}function VF(t,e){if(1&t){var n=ws();vs(0,"button",73),Ss("click",(function(){In(n);var t=e.$implicit;return Ts(2).emitCustom(t)})),gs()}if(2&t){var i=e.$implicit;ps("disabled",Ts(2).isCustomDisabled(i))("innerHTML",i.html,Or)}}function BF(t,e){if(1&t){var n=ws();vs(0,"button",74),Ss("click",(function(){In(n);var t=Ts(2);return t.emitIfSelection(t.deleteAction)})),vs(1,"i",72),nu(2,"delete_forever"),gs(),vs(3,"uds-translate"),nu(4,"Delete"),gs(),gs()}}function jF(t,e){if(1&t){var n=ws();vs(0,"button",73),Ss("click",(function(){In(n);var t=e.$implicit;return Ts(3).emitCustom(t)})),gs()}if(2&t){var i=e.$implicit;ps("disabled",Ts(3).isCustomDisabled(i))("innerHTML",i.html,Or)}}function zF(t,e){if(1&t&&(_s(0),ys(1,"mat-divider"),cs(2,jF,1,2,"button",69),bs()),2&t){var n=Ts(2);Xr(2),ps("ngForOf",n.getCustomAccelerators())}}function HF(t,e){if(1&t&&(cs(0,FF,5,0,"button",68),cs(1,LF,5,0,"button",68),cs(2,NF,5,0,"button",68),cs(3,VF,1,2,"button",69),cs(4,BF,5,0,"button",70),cs(5,zF,3,1,"ng-container",8)),2&t){var n=Ts();ps("ngIf",n.detailAction.observers.length>0),Xr(1),ps("ngIf",n.editAction.observers.length>0),Xr(1),ps("ngIf",!0===n.hasPermissions),Xr(1),ps("ngForOf",n.getCustomMenu()),Xr(1),ps("ngIf",n.deleteAction.observers.length>0),Xr(1),ps("ngIf",n.hasAccelerators)}}var UF=function(){return[5,10,25,100,1e3]},WF=function(){function t(t){this.api=t,this.title="",this.subtitle="",this.displayedColumns=[],this.columns=[],this.rowStyleInfo=null,this.dataSource=new IP([]),this.firstLoad=!0,this.loading=!1,this.lastClickInfo={time:0,x:-1e4,y:-1e4},this.contextMenuPosition={x:"0px",y:"0px"},this.filterText="",this.pageSize=10,this.newGrouped=!1,this.loaded=new xl,this.rowSelected=new xl,this.newAction=new xl,this.editAction=new xl,this.deleteAction=new xl,this.customButtonAction=new xl,this.detailAction=new xl}return t.prototype.ngOnInit=function(){var t=this;this.hasCustomButtons=void 0!==this.customButtons&&0!==this.customButtons.length&&0!==this.customButtonAction.observers.length&&this.getcustomButtons().length>0,this.hasAccelerators=this.getCustomAccelerators().length>0,this.hasButtons=this.hasCustomButtons||0!==this.detailAction.observers.length||0!==this.editAction.observers.length||this.hasPermissions||0!==this.deleteAction.observers.length,this.hasActions=this.hasButtons||void 0!==this.customButtons&&this.customButtons.length>0,this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=function(t,e){if(!(e in t))return"";var n=t[e];return"number"==typeof n?n:"string"==typeof n?n.toLocaleLowerCase():(null===n&&(n=7226578800),n.changingThisBreaksApplicationSecurity&&(n=n.changingThisBreaksApplicationSecurity),(""+n).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase())},this.dataSource.filterPredicate=function(e,n){try{t.columns.forEach((function(t){if((""+e[t.name]).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase().includes(n))throw!0}))}catch(i){return!0}return!1},this.dataSource.sort.active=this.api.getFromStorage(this.tableId+"sort-column")||"name",this.dataSource.sort.direction=this.api.getFromStorage(this.tableId+"sort-direction")||"asc",this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.selection=new f_(!0===this.multiSelect,[]);var e=this.rest.permision();0==(e&QI.MANAGEMENT)&&(this.newAction.observers.length=0,this.editAction.observers.length=0,this.deleteAction.observers.length=0,this.customButtonAction.observers.length=0),e!==QI.ALL&&(this.hasPermissions=!1),void 0!==this.icon&&(this.icon=this.api.staticURL("admin/img/icons/"+this.icon+".png")),this.rest.types().subscribe((function(e){t.rest.tableInfo().subscribe((function(n){t.initialize(n,e)}))}))},t.prototype.initialize=function(t,e){var n=this;this.oTypes=e,this.types=new Map,this.grpTypes=new Map,e.forEach((function(t){n.types.set(t.type,t),void 0!==t.group&&(n.grpTypes.has(t.group)||n.grpTypes.set(t.group,[]),n.grpTypes.get(t.group).push(t))})),this.rowStyleInfo=void 0!==t["row-style"]&&void 0!==t["row-style"].field?t["row-style"]:null,this.title=t.title,this.subtitle=t.subtitle||"",this.hasButtons&&this.displayedColumns.push("selection-column");var i=[];t.fields.forEach((function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];i.push({name:e,title:r.title,type:void 0===r.type?vI.ALPHANUMERIC:r.type,dict:r.dict}),(void 0===r.visible||r.visible)&&n.displayedColumns.push(e)}})),this.columns=i,this.detailAction.observers.length>0&&this.displayedColumns.push("detail-column"),this.overview()},t.prototype.overview=function(){var t=this;this.loading||(this.selection.clear(),this.dataSource.data=[],this.loading=!0,this.rest.overview().subscribe((function(e){t.loading=!1,void 0!==t.onItem&&e.forEach((function(e){t.onItem(e)})),t.dataSource.data=e,t.loaded.emit({param:t.firstLoad,table:t}),t.firstLoad=!1}),(function(e){t.loading=!1})))},t.prototype.getcustomButtons=function(){return this.customButtons?this.customButtons.filter((function(t){return t.type!==gI.ONLY_MENU&&t.type!==gI.ACCELERATOR})):[]},t.prototype.getCustomMenu=function(){return this.customButtons?this.customButtons.filter((function(t){return t.type!==gI.ACCELERATOR})):[]},t.prototype.getCustomAccelerators=function(){return this.customButtons?this.customButtons.filter((function(t){return t.type===gI.ACCELERATOR})):[]},t.prototype.getRowColumn=function(t,e){var n=t[e.name];switch(e.type){case vI.IMAGE:return this.api.safeString(this.api.gui.icon(n,"48px"));case vI.DATE:n=bM("SHORT_DATE_FORMAT",n);break;case vI.DATETIME:n=bM("SHORT_DATETIME_FORMAT",n);break;case vI.TIME:n=bM("TIME_FORMAT",n);break;case vI.DATETIMESEC:n=bM("SHORT_DATE_FORMAT",n," H:i:s");break;case vI.ICON:try{n=this.api.gui.icon(this.types.get(t.type).icon)+n}catch(i){}return this.api.safeString(n);case vI.CALLBACK:break;case vI.DICTIONARY:try{n=e.dict[n]}catch(i){n=""}}return n},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage(this.tableId+"sort-column",t.active),this.api.putOnStorage(this.tableId+"sort-direction",t.direction)},t.prototype.rowClass=function(t){var e=[];return this.selection.isSelected(t)&&e.push("selected"),null!==this.rowStyleInfo&&e.push(this.rowStyleInfo.prefix+t[this.rowStyleInfo.field]),e},t.prototype.emitIfSelection=function(t,e){void 0===e&&(e=!1);var n=this.selection.selected.length;n>0&&(!0!==e&&1!==n||t.emit({table:this,param:n}))},t.prototype.isCustomDisabled=function(t){switch(t.type){case void 0:case gI.SINGLE_SELECT:return 1!==this.selection.selected.length||!0===t.disabled;case gI.MULTI_SELECT:return this.selection.isEmpty()||!0===t.disabled;default:return!1}},t.prototype.emitCustom=function(t){(this.selection.selected.length||t.type===gI.ALWAYS)&&(t.type===gI.ACCELERATOR?this.api.navigation.goto(t.id,this.selection.selected[0],t.acceleratorProperties):this.customButtonAction.emit({param:t,table:this}))},t.prototype.clickRow=function(t,e){var n=(new Date).getTime();if((this.detailAction.observers.length||this.editAction.observers.length)&&Math.abs(this.lastClickInfo.x-e.x)<16&&Math.abs(this.lastClickInfo.y-e.y)<16&&n-this.lastClickInfo.time<250)return this.selection.clear(),this.selection.select(t),void(this.detailAction.observers.length?this.detailAction.emit({param:t,table:this}):this.emitIfSelection(this.editAction,!1));this.lastClickInfo={time:n,x:e.x,y:e.y},this.doSelect(t,e)},t.prototype.doSelect=function(t,e){if(e.ctrlKey)this.lastSel=t,this.selection.toggle(t);else if(e.shiftKey){if(this.selection.isEmpty())this.selection.toggle(t);else if(this.selection.clear(),this.lastSel!==t)for(var n=!1,i=this.dataSource.sortData(this.dataSource.data,this.dataSource.sort),r=0;r0),Xr(1),ps("ngIf",e.editAction.observers.length>0),Xr(1),ps("ngIf",!0===e.hasPermissions),Xr(1),ps("ngIf",e.hasCustomButtons),Xr(1),ps("ngIf",1==e.allowExport),Xr(1),ps("ngIf",e.deleteAction.observers.length>0),Xr(7),ps("ngModel",e.filterText),Xr(1),ps("ngIf",e.filterText),Xr(2),ps("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",fl(27,UF))("showFirstLastButtons",!0),Xr(6),ps("dataSource",e.dataSource),Xr(1),ps("ngIf",e.hasButtons),Xr(4),ps("ngForOf",e.columns),Xr(1),ps("matHeaderRowDef",e.displayedColumns),Xr(1),ps("matRowDefColumns",e.displayedColumns),Xr(1),ps("hidden",!e.loading),Xr(5),ps("ngIf",e.hasButtons&&e.selection.selected.length>0),Xr(1),Ws("left",e.contextMenuPosition.x)("top",e.contextMenuPosition.y),ps("matMenuTriggerFor",n)}},directives:[yd,HS,iT,YP,iD,lD,gE,WT,jS,ZR,$T,iP,JR,XR,vd,hP,mP,RM,JM,ZM,jM,UM,BS,QO,aP,lP,iR,gP,kP,fd,nF],pipes:[Wd,rF],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.buttons[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.buttons[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-right:1em;margin-bottom:1em}.buttons[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{margin-right:.4rem}.buttons[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]:hover:not([disabled]){background-color:#000;color:#fff}button.mat-menu-item[_ngcontent-%COMP%]{height:32px;line-height:32px}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.footer[_ngcontent-%COMP%]{margin:1em;display:flex;justify-content:flex-end}mat-cell[_ngcontent-%COMP%]:first-of-type, mat-header-cell[_ngcontent-%COMP%]:first-of-type{padding-left:.5rem}mat-row[_ngcontent-%COMP%]:hover{background-color:#f0f8ff;cursor:pointer}mat-table[_ngcontent-%COMP%]{width:100%;font-weight:300}.mat-column-detail-column[_ngcontent-%COMP%]{max-width:1.5rem;justify-content:center;color:#000!important;padding-right:.5rem}.detail-launcher[_ngcontent-%COMP%]{display:none}.mat-row[_ngcontent-%COMP%]:hover .detail-launcher[_ngcontent-%COMP%]{display:block}.mat-column-selection-column[_ngcontent-%COMP%]{max-width:2rem;justify-content:center;color:#000!important}.menu-warn[_ngcontent-%COMP%]{color:red}.menu-link[_ngcontent-%COMP%]{color:#00f}.loading[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center} .mat-menu-panel{min-height:48px} .mat-paginator-range-label{min-width:6em}"]}),t}(),qF='pause'+django.gettext("Maintenance")+"",YF='pause'+django.gettext("Exit maintenance mode")+"",GF='pause'+django.gettext("Enter maintenance mode")+"",KF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"maintenance",html:qF,type:gI.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New provider"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit provider"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete provider"))},t.prototype.onMaintenance=function(t){var e=this,n=t.table.selection.selected[0],i=n.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.yesno(django.gettext("Maintenance mode for")+" "+n.name,i).subscribe((function(i){i&&e.rest.providers.maintenance(n.id).subscribe((function(){t.table.overview()}))}))},t.prototype.onRowSelect=function(t){var e=t.table;this.customButtons[0].html=e.selection.selected.length>1||0===e.selection.selected.length?qF:e.selection.selected[0].maintenance_mode?YF:GF},t.prototype.onDetail=function(t){this.api.navigation.gotoService(t.param.id)},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("provider"))},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-services"]],decls:1,vars:7,consts:[["tableId","service-providers","icon","providers",3,"rest","onItem","multiSelect","allowExport","hasPermissions","customButtons","pageSize","customButtonAction","newAction","editAction","deleteAction","rowSelected","detailAction","loaded"]],template:function(t,e){1&t&&(vs(0,"uds-table",0),Ss("customButtonAction",(function(t){return e.onMaintenance(t)}))("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("rowSelected",(function(t){return e.onRowSelect(t)}))("detailAction",(function(t){return e.onDetail(t)}))("loaded",(function(t){return e.onLoad(t)})),gs()),2&t&&ps("rest",e.rest.providers)("onItem",e.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[WF],styles:[".row-maintenance-true>mat-cell{color:orange!important} .mat-column-maintenance_state, .mat-column-services_count, .mat-column-user_services_count{max-width:7rem;justify-content:center}"]}),t}(),ZF=n("MCLT"),$F=function(){function t(t,e,n,i){this.title=t,this.data=e,this.columns=n,this.id=i,this.columnsDefinition=Array.from(n,(function(t){var e={};return e[t.field]={visible:!0,title:t.title,type:void 0===t.type?vI.ALPHANUMERIC:t.type},e}))}return t.prototype.get=function(t){return Ip},t.prototype.getLogs=function(t){return Ip},t.prototype.overview=function(t){return Object(ZF.isFunction)(this.data)?this.data():Lf([])},t.prototype.summary=function(t){return this.overview()},t.prototype.put=function(t,e){return Ip},t.prototype.create=function(t){return Ip},t.prototype.save=function(t,e){return Ip},t.prototype.test=function(t,e){return Ip},t.prototype.delete=function(t){return Ip},t.prototype.permision=function(){return QI.ALL},t.prototype.getPermissions=function(t){return Ip},t.prototype.addPermission=function(t,e,n,i){return Ip},t.prototype.revokePermission=function(t){return Ip},t.prototype.types=function(){return Lf([])},t.prototype.gui=function(t){return Ip},t.prototype.callback=function(t,e){return Ip},t.prototype.tableInfo=function(){return Lf({fields:this.columnsDefinition,title:this.title})},t.prototype.detail=function(t,e){return null},t.prototype.invoke=function(t,e){return Ip},t}();function XF(t,e){if(1&t){var n=ws();vs(0,"button",24),Ss("click",(function(){In(n);var t=Ts();return t.filterText="",t.applyFilter()})),vs(1,"i",8),nu(2,"close"),gs(),gs()}}function QF(t,e){if(1&t&&(vs(0,"mat-header-cell",28),nu(1),gs()),2&t){var n=Ts().$implicit;Xr(1),iu(n)}}function JF(t,e){if(1&t&&(vs(0,"mat-cell"),ys(1,"div",29),gs()),2&t){var n=e.$implicit,i=Ts().$implicit,r=Ts();Xr(1),ps("innerHtml",r.getRowColumn(n,i),Or)}}function tL(t,e){1&t&&(_s(0,25),cs(1,QF,2,1,"mat-header-cell",26),cs(2,JF,2,1,"mat-cell",27),bs()),2&t&&ps("matColumnDef",e.$implicit)}function eL(t,e){1&t&&ys(0,"mat-header-row")}function nL(t,e){if(1&t&&ys(0,"mat-row",30),2&t){var n=e.$implicit;ps("ngClass",Ts().rowClass(n))}}var iL=function(){return[5,10,25,100,1e3]},rL=function(){function t(t){this.api=t,this.filterText="",this.title="Logs",this.displayedColumns=["date","level","source","message"],this.columns=[],this.dataSource=new IP([]),this.selection=new f_,this.pageSize=10}return t.prototype.ngOnInit=function(){var t=this;this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sort.active=this.api.getFromStorage("logs-sort-column")||"date",this.dataSource.sort.direction=this.api.getFromStorage("logs-sort-direction")||"desc",this.displayedColumns.forEach((function(e){t.columns.push({name:e,title:e,type:"date"===e?vI.DATETIMESEC:vI.ALPHANUMERIC})})),this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.overview()},t.prototype.overview=function(){var t=this;this.rest.getLogs(this.itemId).subscribe((function(e){t.dataSource.data=e}))},t.prototype.selectElement=function(t,e){},t.prototype.getRowColumn=function(t,e){var n=t[e];return"date"===e?n=bM("SHORT_DATE_FORMAT",n," H:i:s"):"level"===e&&(n={1e4:"OTHER",2e4:"DEBUG",3e4:"INFO",4e4:"WARN",5e4:"ERROR",6e4:"FATAL"}[n]||"OTHER"),n},t.prototype.rowClass=function(t){return["level-"+t.level]},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage("logs-sort-column",t.active),this.api.putOnStorage("logs-sort-direction",t.direction)},t.prototype.export=function(){xM(this)},t.prototype.keyDown=function(t){switch(t.keyCode){case V_:this.paginator.firstPage(),t.preventDefault();break;case N_:this.paginator.lastPage(),t.preventDefault();break;case z_:this.paginator.nextPage(),t.preventDefault();break;case B_:this.paginator.previousPage(),t.preventDefault()}},t.\u0275fac=function(e){return new(e||t)(ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-logs-table"]],viewQuery:function(t,e){var n;1&t&&(Nl(WT,!0),Nl($T,!0)),2&t&&(Ll(n=Ul())&&(e.paginator=n.first),Ll(n=Ul())&&(e.sort=n.first))},inputs:{rest:"rest",itemId:"itemId",tableId:"tableId",pageSize:"pageSize"},decls:36,vars:12,consts:[[1,"card"],[1,"card-header"],[1,"card-title"],[3,"src"],[1,"card-content"],[1,"header"],[1,"buttons"],["mat-raised-button","",3,"click"],[1,"material-icons"],[1,"button-text"],[1,"navigation"],[1,"filter"],["matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"paginator"],[3,"pageSize","hidePageSize","pageSizeOptions","showFirstLastButtons"],[1,"reload"],["mat-icon-button","",3,"click"],["tabindex","0",1,"table",3,"keydown"],["matSort","",3,"dataSource","matSortChange"],[3,"matColumnDef",4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[3,"ngClass",4,"matRowDef","matRowDefColumns"],[1,"footer"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"matColumnDef"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["mat-sort-header",""],[3,"innerHtml"],[3,"ngClass"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"div",2),ys(3,"img",3),nu(4," \xa0"),vs(5,"uds-translate"),nu(6,"Logs"),gs(),gs(),gs(),vs(7,"div",4),vs(8,"div",5),vs(9,"div",6),vs(10,"a",7),Ss("click",(function(){return e.export()})),vs(11,"i",8),nu(12,"import_export"),gs(),vs(13,"span",9),vs(14,"uds-translate"),nu(15,"Export"),gs(),gs(),gs(),gs(),vs(16,"div",10),vs(17,"div",11),vs(18,"uds-translate"),nu(19,"Filter"),gs(),nu(20,"\xa0 "),vs(21,"mat-form-field"),vs(22,"input",12),Ss("keyup",(function(){return e.applyFilter()}))("ngModelChange",(function(t){return e.filterText=t})),gs(),cs(23,XF,3,0,"button",13),gs(),gs(),vs(24,"div",14),ys(25,"mat-paginator",15),gs(),vs(26,"div",16),vs(27,"a",17),Ss("click",(function(){return e.overview()})),vs(28,"i",8),nu(29,"autorenew"),gs(),gs(),gs(),gs(),gs(),vs(30,"div",18),Ss("keydown",(function(t){return e.keyDown(t)})),vs(31,"mat-table",19),Ss("matSortChange",(function(t){return e.sortChanged(t)})),cs(32,tL,3,1,"ng-container",20),cs(33,eL,1,0,"mat-header-row",21),cs(34,nL,1,1,"mat-row",22),gs(),gs(),ys(35,"div",23),gs(),gs()),2&t&&(Xr(3),ps("src",e.api.staticURL("admin/img/icons/logs.png"),Tr),Xr(19),ps("ngModel",e.filterText),Xr(1),ps("ngIf",e.filterText),Xr(2),ps("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",fl(11,iL))("showFirstLastButtons",!0),Xr(6),ps("dataSource",e.dataSource),Xr(1),ps("ngForOf",e.displayedColumns),Xr(1),ps("matHeaderRowDef",e.displayedColumns),Xr(1),ps("matRowDefColumns",e.displayedColumns))},directives:[HS,jS,iT,YP,iD,lD,gE,yd,WT,ZR,$T,vd,hP,mP,BS,QO,iP,JR,XR,aP,iR,lP,gP,kP,fd],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.header[_ngcontent-%COMP%], .navigation[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.navigation[_ngcontent-%COMP%]{justify-content:flex-start}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.mat-column-date[_ngcontent-%COMP%]{max-width:160px}.mat-column-level[_ngcontent-%COMP%]{max-width:96px;text-align:center}.mat-column-source[_ngcontent-%COMP%]{max-width:128px} .level-50000>.mat-cell, .level-60000>.mat-cell{color:#ff1e1e!important} .level-40000>.mat-cell{color:#d65014!important}"]}),t}();function aL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Services pools"),gs())}function oL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Logs"),gs())}var sL=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],uL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.customButtons=[AI.getGotoButton(bI,"id")],this.services=i.services,this.service=i.service}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{service:i,services:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.servicePools=new $F(django.gettext("Service pools"),(function(){return t.services.invoke(t.service.id+"/servicesPools")}),sL,this.service.id+"infopsls")},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-information"]],decls:17,vars:7,consts:[["mat-dialog-title",""],["mat-tab-label",""],["pageSize","6",3,"rest","customButtons"],[1,"content"],[3,"rest","itemId","tableId","pageSize"],["mat-raised-button","","mat-dialog-close","","color","primary"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Information for"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),vs(5,"mat-tab-group"),vs(6,"mat-tab"),cs(7,aL,2,0,"ng-template",1),ys(8,"uds-table",2),gs(),vs(9,"mat-tab"),cs(10,oL,2,0,"ng-template",1),vs(11,"div",3),ys(12,"uds-logs-table",4),gs(),gs(),gs(),gs(),vs(13,"mat-dialog-actions"),vs(14,"button",5),vs(15,"uds-translate"),nu(16,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.service.name,"\n"),Xr(5),ps("rest",e.servicePools)("customButtons",e.customButtons),Xr(4),ps("rest",e.services)("itemId",e.service.id)("tableId","serviceInfo-d-log"+e.service.id)("pageSize",5))},directives:[AS,HS,IS,TA,kA,gA,WF,rL,OS,BS,ES],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.mat-column-count[_ngcontent-%COMP%], .mat-column-image[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{max-width:7rem;justify-content:center}.navigation[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:flex-end;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}"]}),t}();function lL(t,e){if(1&t&&(vs(0,"div",3),ys(1,"div",4),ys(2,"div",5),gs()),2&t){var n=e.$implicit;Xr(1),ps("innerHTML",n.gui.label,Or),Xr(1),ps("innerHTML",n.value,Or)}}var cL=function(){function t(t){this.api=t,this.displayables=null}return t.prototype.ngOnInit=function(){this.processFields()},t.prototype.processFields=function(){var t=this;if(!this.gui||!this.value)return[];var e=this.gui.filter((function(t){return t.gui.type!==ZS.HIDDEN}));e.forEach((function(e){var n=t.value[e.name];switch(e.gui.type){case ZS.CHECKBOX:e.value=n?django.gettext("Yes"):django.gettext("No");break;case ZS.PASSWORD:e.value=django.gettext("(hidden)");break;case ZS.CHOICE:var i=$S.locateChoice(n,e);e.value=i.text;break;case ZS.MULTI_CHOICE:e.value=django.gettext("Selected items :")+n.length;break;case ZS.IMAGECHOICE:i=$S.locateChoice(n,e),e.value=t.api.safeString(t.api.gui.icon(i.img)+" "+i.text);break;default:e.value=n}""!==e.value&&null!=e.value||(e.value="(empty)")})),this.displayables=e},t.\u0275fac=function(e){return new(e||t)(ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-information"]],inputs:{value:"value",gui:"gui"},decls:4,vars:1,consts:[[1,"card"],[1,"card-content"],["class","item",4,"ngFor","ngForOf"],[1,"item"],[1,"label",3,"innerHTML"],[1,"value",3,"innerHTML"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),cs(2,lL,3,2,"div",2),gs(),ys(3,"div"),gs()),2&t&&(Xr(2),ps("ngForOf",e.displayables))},directives:[vd],styles:[".card-content[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column}.item[_ngcontent-%COMP%]{padding-bottom:.5rem;display:flex}.label[_ngcontent-%COMP%]{font-weight:700;width:32rem;overflow-x:hidden;text-overflow:ellipsis;text-align:end;margin-right:1rem;align-self:center}"]}),t}();function hL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Summary"),gs())}function dL(t,e){if(1&t&&ys(0,"uds-information",15),2&t){var n=Ts(2);ps("value",n.provider)("gui",n.gui)}}function fL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Services"),gs())}function pL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Usage"),gs())}function mL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Logs"),gs())}function vL(t,e){if(1&t){var n=ws();vs(0,"div",6),vs(1,"div",7),vs(2,"mat-tab-group",8),Ss("selectedIndexChange",(function(t){return In(n),Ts().selectedTab=t})),vs(3,"mat-tab"),cs(4,hL,2,0,"ng-template",9),vs(5,"div",10),cs(6,dL,1,2,"uds-information",11),gs(),gs(),vs(7,"mat-tab"),cs(8,fL,2,0,"ng-template",9),vs(9,"div",10),vs(10,"uds-table",12),Ss("newAction",(function(t){return In(n),Ts().onNewService(t)}))("editAction",(function(t){return In(n),Ts().onEditService(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteService(t)}))("customButtonAction",(function(t){return In(n),Ts().onInformation(t)}))("loaded",(function(t){return In(n),Ts().onLoad(t)})),gs(),gs(),gs(),vs(11,"mat-tab"),cs(12,pL,2,0,"ng-template",9),vs(13,"div",10),vs(14,"uds-table",13),Ss("deleteAction",(function(t){return In(n),Ts().onDeleteUsage(t)})),gs(),gs(),gs(),vs(15,"mat-tab"),cs(16,mL,2,0,"ng-template",9),vs(17,"div",10),ys(18,"uds-logs-table",14),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ts();Xr(2),ps("selectedIndex",i.selectedTab)("@.disabled",!0),Xr(4),ps("ngIf",i.provider&&i.gui),Xr(4),ps("rest",i.services)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-services"+i.provider.id),Xr(4),ps("rest",i.usage)("multiSelect",!0)("allowExport",!0)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-usage"+i.provider.id),Xr(4),ps("rest",i.services.parentModel)("itemId",i.provider.id)("tableId","providers-d-log"+i.provider.id)}}var gL=function(t){return["/providers",t]},yL=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:gI.ONLY_MENU}],this.provider=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("provider");this.services=this.rest.providers.detail(e,"services"),this.usage=this.rest.providers.detail(e,"usage"),this.services.parentModel.get(e).subscribe((function(e){t.provider=e,t.services.parentModel.gui(e.type).subscribe((function(e){t.gui=e}))}))},t.prototype.onInformation=function(t){uL.launch(this.api,this.services,t.table.selection.selected[0])},t.prototype.onNewService=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New service"),!1)},t.prototype.onEditService=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit service"),!1)},t.prototype.onDeleteService=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service"))},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user service"))},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("service");if(void 0!==e){this.selectedTab=1;var n=t.table;n.dataSource.data.forEach((function(t){t.id===e&&n.selection.select(t)}))}}},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-services-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","providers",3,"rest","multiSelect","allowExport","customButtons","pageSize","tableId","newAction","editAction","deleteAction","customButtonAction","loaded"],["icon","usage",3,"rest","multiSelect","allowExport","pageSize","tableId","deleteAction"],[3,"rest","itemId","tableId"],[3,"value","gui"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"a",2),vs(3,"i",3),nu(4,"arrow_back"),gs(),gs(),nu(5," \xa0"),ys(6,"img",4),nu(7),gs(),cs(8,vL,19,17,"div",5),gs()),2&t&&(Xr(2),ps("routerLink",pl(4,gL,e.services.parentId)),Xr(4),ps("src",e.api.staticURL("admin/img/icons/services.png"),Tr),Xr(1),ru(" \xa0",null==e.provider?null:e.provider.name," "),Xr(1),ps("ngIf",null!==e.provider))},directives:[zg,yd,TA,kA,gA,WF,rL,HS,cL],styles:[""]}),t}(),_L=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("authenticator")},t.prototype.onDetail=function(t){this.api.navigation.gotoAuthenticatorDetail(t.param.id)},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Authenticator"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Authenticator"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Authenticator"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("authenticator"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible)},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-authenticators"]],decls:2,vars:6,consts:[["icon","authenticators",3,"rest","multiSelect","allowExport","hasPermissions","onItem","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(vs(0,"div"),vs(1,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("detailAction",(function(t){return e.onDetail(t)}))("loaded",(function(t){return e.onLoad(t)})),gs(),gs()),2&t&&(Xr(1),ps("rest",e.rest.authenticators)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[WF],styles:[""]}),t}(),bL=["panel"];function kL(t,e){if(1&t&&(vs(0,"div",0,1),Ms(2),gs()),2&t){var n=Ts();ps("id",n.id)("ngClass",n._classList)}}var wL=["*"],CL=0,xL=function t(e,n){y(this,t),this.source=e,this.option=n},SL=yx((function t(){y(this,t)})),DL=new re("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),EL=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this))._changeDetectorRef=t,a._elementRef=i,a._activeOptionChanges=D.EMPTY,a.showPanel=!1,a._isOpen=!1,a.displayWith=null,a.optionSelected=new xl,a.opened=new xl,a.closed=new xl,a.optionActivated=new xl,a._classList={},a.id="mat-autocomplete-".concat(CL++),a._autoActiveFirstOption=!!r.autoActiveFirstOption,a}return b(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new jb(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe((function(e){t.optionActivated.emit({source:t,option:t.options.toArray()[e]||null})})),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(t){var e=new xL(this,t);this.optionSelected.emit(e)}},{key:"_setVisibilityClasses",value:function(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}},{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=hy(t)}},{key:"classList",set:function(t){this._classList=t&&t.length?t.split(" ").reduce((function(t,e){return t[e.trim()]=!0,t}),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}}]),n}(SL);return t.\u0275fac=function(e){return new(e||t)(ds(Eo),ds(ku),ds(DL))},t.\u0275dir=ze({type:t,viewQuery:function(t,e){var n;1&t&&(Nl(qu,!0),Vl(bL,!0)),2&t&&(Ll(n=Ul())&&(e.template=n.first),Ll(n=Ul())&&(e.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[Zo]}),t}(),AL=function(){var t=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._visibleClass="mat-autocomplete-visible",t._hiddenClass="mat-autocomplete-hidden",t}return n}(EL);return t.\u0275fac=function(e){return IL(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,n){var i;1&t&&(jl(n,Jx,!0),jl(n,oS,!0)),2&t&&(Ll(i=Ul())&&(e.optionGroups=i),Ll(i=Ul())&&(e.options=i))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[vu([{provide:rS,useExisting:t}]),Zo],ngContentSelectors:wL,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(Ps(),cs(0,kL,3,2,"ng-template"))},directives:[fd],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"],encapsulation:2,changeDetection:0}),t}(),IL=Ui(AL),OL=function(){var t=function t(e){y(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(ds(ku))},t.\u0275dir=ze({type:t}),t}(),TL=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(OL);return t.\u0275fac=function(e){return RL(e||t)},t.\u0275dir=ze({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[Zo]}),t}(),RL=Ui(TL),PL=new re("mat-autocomplete-scroll-strategy"),ML={provide:PL,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},FL={provide:QS,useExisting:Ht((function(){return NL})),multi:!0},LL=function(){var t=function(){function t(e,n,i,r,a,o,s,u,c,h){var d=this;y(this,t),this._element=e,this._overlay=n,this._viewContainerRef=i,this._zone=r,this._changeDetectorRef=a,this._dir=s,this._formField=u,this._document=c,this._viewportRuler=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=D.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new U,this._windowBlurHandler=function(){d._canOpenOnNextFocus=d._document.activeElement!==d._element.nativeElement||d.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Tp((function(){return d.autocomplete&&d.autocomplete.options?ht.apply(void 0,l(d.autocomplete.options.map((function(t){return t.onSelectionChange})))):d._zone.onStable.pipe(Gp(1),Wp((function(){return d.optionSelections})))})),this._scrollStrategy=o}return b(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular((function(){return e.addEventListener("blur",t._windowBlurHandler)}))}},{key:"ngOnChanges",value:function(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"_getOutsideClickStream",value:function(){var t=this;return ht(gy(this._document,"click"),gy(this._document,"touchend")).pipe(Vf((function(e){var n=t._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=t._formField?t._formField._elementRef.nativeElement:null,r=t.connectedTo?t.connectedTo.elementRef.nativeElement:null;return t._overlayAttached&&n!==t._element.nativeElement&&(!i||!i.contains(n))&&(!r||!r.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)})))}},{key:"writeValue",value:function(t){var e=this;Promise.resolve(null).then((function(){return e._setTriggerValue(t)}))}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this._element.nativeElement.disabled=t}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;if(e!==F_||U_(t)||t.preventDefault(),this.activeOption&&e===M_&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,i=e===j_||e===H_;this.panelOpen||9===e?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var t=this;return ht(this._zone.onStable.pipe(Gp(1)),this.autocomplete.options.changes.pipe(am((function(){return t._positionStrategy.reapplyLastPosition()})),TP(0))).pipe(Wp((function(){var e=t.panelOpen;return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelOpen&&(t._overlayRef.updatePosition(),e!==t.panelOpen&&t.autocomplete.opened.emit()),t.panelClosingActions})),Gp(1)).subscribe((function(e){return t._setValueAndClose(e)}))}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(t){this.autocomplete.options.forEach((function(e){e!==t&&e.selected&&e.deselect()}))}},{key:"_attachOverlay",value:function(){var t=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!a_(this._element.nativeElement));var e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new C_(this.autocomplete.template,this._viewContainerRef),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,e.keydownEvents().subscribe((function(e){(e.keyCode===F_&&!U_(e)||e.keyCode===j_&&U_(e,"altKey"))&&(t._resetActiveItem(),t._closeKeyEventStream.next(),e.stopPropagation(),e.preventDefault())})),this._viewportSubscription=this._viewportRuler.change().subscribe((function(){t.panelOpen&&e&&e.updateSize({width:t._getPanelWidth()})}))),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var n=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&n!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){return new X_({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir})}},{key:"_getOverlayPosition",value:function(){var t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}},{key:"_setStrategyPositions",value:function(t){var e,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];e="above"===this.position?r:"below"===this.position?n:[].concat(n,r),t.withPositions(e)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}},{key:"_canOpen",value:function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_scrollToOption",value:function(t){var e=this.autocomplete,n=sS(t,e.options,e.optionGroups);if(0===t&&1===n)e._setScrollTop(0);else{var i=e.options.toArray()[t];if(i){var r=i._getHostElement(),a=uS(r.offsetTop,r.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(a)}}}},{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(t){this._autocompleteDisabled=hy(t)}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"panelClosingActions",get:function(){var t=this;return ht(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Vf((function(){return t._overlayAttached}))),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Vf((function(){return t._overlayAttached}))):Lf()).pipe(Y((function(t){return t instanceof iS?t:null})))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(vb),ds(Gu),ds(mc),ds(Eo),ds(PL),ds(s_,8),ds(nT,9),ds(Zc,8),ds(y_))},t.\u0275dir=ze({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[nn]}),t}(),NL=function(){var t=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",t}return n}(LL);return t.\u0275fac=function(e){return VL(e||t)},t.\u0275dir=ze({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&Ss("focusin",(function(){return e._handleFocus()}))("blur",(function(){return e._onTouched()}))("input",(function(t){return e._handleInput(t)}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&us("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[vu([FL]),Zo]}),t}(),VL=Ui(NL),BL=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[ML],imports:[[wb,lS,mx,Qd],__,lS,mx]}),t}();function jL(t,e){if(1&t&&(vs(0,"div"),vs(1,"uds-translate"),nu(2,"Edit user"),gs(),nu(3),gs()),2&t){var n=Ts();Xr(3),ru(" ",n.user.name," ")}}function zL(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New user"),gs())}function HL(t,e){if(1&t){var n=ws();vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",18),Ss("ngModelChange",(function(t){return In(n),Ts().user.name=t})),gs(),gs()}if(2&t){var i=Ts();Xr(2),ru(" ",i.authenticator.type_info.userNameLabel," "),Xr(1),ps("ngModel",i.user.name)("disabled",i.user.id)}}function UL(t,e){if(1&t&&(vs(0,"mat-option",21),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),au(" ",n.id," (",n.name,") ")}}function WL(t,e){if(1&t){var n=ws();vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",19),Ss("ngModelChange",(function(t){return In(n),Ts().user.name=t}))("input",(function(t){return In(n),Ts().filterUser(t)})),gs(),vs(4,"mat-autocomplete",null,20),cs(6,UL,2,3,"mat-option",15),gs(),gs()}if(2&t){var i=hs(5),r=Ts();Xr(2),ru(" ",r.authenticator.type_info.userNameLabel," "),Xr(1),ps("ngModel",r.user.name)("matAutocomplete",i),Xr(3),ps("ngForOf",r.users)}}function qL(t,e){if(1&t){var n=ws();vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",22),Ss("ngModelChange",(function(t){return In(n),Ts().user.password=t})),gs(),gs()}if(2&t){var i=Ts();Xr(2),ru(" ",i.authenticator.type_info.passwordLabel," "),Xr(1),ps("ngModel",i.user.password)}}function YL(t,e){if(1&t&&(vs(0,"mat-option",21),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}var GL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.users=[],this.authenticator=i.authenticator,this.user={id:void 0,name:"",real_name:"",comments:"",state:"A",is_admin:!1,staff_member:!1,password:"",role:"user",groups:[]},void 0!==i.user&&(this.user.id=i.user.id,this.user.name=i.user.name)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,user:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").overview().subscribe((function(e){t.groups=e})),this.user.id&&this.rest.authenticators.detail(this.authenticator.id,"users").get(this.user.id).subscribe((function(e){t.user=e,t.user.role=e.is_admin?"admin":e.staff_member?"staff":"user"}),(function(e){t.dialogRef.close()}))},t.prototype.roleChanged=function(t){this.user.is_admin="admin"===t,this.user.staff_member="admin"===t||"staff"===t},t.prototype.filterUser=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"user",t.target.value,100).subscribe((function(t){e.users.length=0,t.forEach((function(t){e.users.push(t)}))}))},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"users").save(this.user).subscribe((function(e){t.dialogRef.close(),t.onSave.emit(!0)}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-new-user"]],decls:60,vars:11,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["value","B"],[3,"ngModel","ngModelChange","valueChange"],["value","admin"],["value","staff"],["value","user"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value"],["type","password","matInput","",3,"ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(vs(0,"h4",0),cs(1,jL,4,1,"div",1),cs(2,zL,2,0,"ng-template",null,2,Gl),gs(),vs(4,"mat-dialog-content"),vs(5,"div",3),cs(6,HL,4,3,"mat-form-field",4),cs(7,WL,7,4,"mat-form-field",4),vs(8,"mat-form-field"),vs(9,"mat-label"),vs(10,"uds-translate"),nu(11,"Real name"),gs(),gs(),vs(12,"input",5),Ss("ngModelChange",(function(t){return e.user.real_name=t})),gs(),gs(),vs(13,"mat-form-field"),vs(14,"mat-label"),vs(15,"uds-translate"),nu(16,"Comments"),gs(),gs(),vs(17,"input",5),Ss("ngModelChange",(function(t){return e.user.comments=t})),gs(),gs(),vs(18,"mat-form-field"),vs(19,"mat-label"),vs(20,"uds-translate"),nu(21,"State"),gs(),gs(),vs(22,"mat-select",6),Ss("ngModelChange",(function(t){return e.user.state=t})),vs(23,"mat-option",7),vs(24,"uds-translate"),nu(25,"Enabled"),gs(),gs(),vs(26,"mat-option",8),vs(27,"uds-translate"),nu(28,"Disabled"),gs(),gs(),vs(29,"mat-option",9),vs(30,"uds-translate"),nu(31,"Blocked"),gs(),gs(),gs(),gs(),vs(32,"mat-form-field"),vs(33,"mat-label"),vs(34,"uds-translate"),nu(35,"Role"),gs(),gs(),vs(36,"mat-select",10),Ss("ngModelChange",(function(t){return e.user.role=t}))("valueChange",(function(t){return e.roleChanged(t)})),vs(37,"mat-option",11),vs(38,"uds-translate"),nu(39,"Admin"),gs(),gs(),vs(40,"mat-option",12),vs(41,"uds-translate"),nu(42,"Staff member"),gs(),gs(),vs(43,"mat-option",13),vs(44,"uds-translate"),nu(45,"User"),gs(),gs(),gs(),gs(),cs(46,qL,4,2,"mat-form-field",4),vs(47,"mat-form-field"),vs(48,"mat-label"),vs(49,"uds-translate"),nu(50,"Groups"),gs(),gs(),vs(51,"mat-select",14),Ss("ngModelChange",(function(t){return e.user.groups=t})),cs(52,YL,2,2,"mat-option",15),gs(),gs(),gs(),gs(),vs(53,"mat-dialog-actions"),vs(54,"button",16),vs(55,"uds-translate"),nu(56,"Cancel"),gs(),gs(),vs(57,"button",17),Ss("click",(function(){return e.save()})),vs(58,"uds-translate"),nu(59,"Ok"),gs(),gs(),gs()),2&t){var n=hs(3);Xr(1),ps("ngIf",e.user.id)("ngIfElse",n),Xr(5),ps("ngIf",!1===e.authenticator.type_info.canSearchUsers||e.user.id),Xr(1),ps("ngIf",!0===e.authenticator.type_info.canSearchUsers&&!e.user.id),Xr(5),ps("ngModel",e.user.real_name),Xr(5),ps("ngModel",e.user.comments),Xr(5),ps("ngModel",e.user.state),Xr(14),ps("ngModel",e.user.role),Xr(10),ps("ngIf",e.authenticator.type_info.needsPassword),Xr(5),ps("ngModel",e.user.groups),Xr(1),ps("ngForOf",e.groups)}},directives:[AS,yd,IS,iT,GO,HS,YP,iD,lD,gE,xT,oS,vd,OS,BS,ES,NL,AL],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),KL=["thumbContainer"],ZL=["toggleBar"],$L=["input"],XL=function(){return{enterDuration:150}},QL=["*"],JL=new re("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1}}}),tN=0,eN={provide:QS,useExisting:Ht((function(){return rN})),multi:!0},nN=function t(e,n){y(this,t),this.source=e,this.checked=n},iN=_x(gx(yx(vx((function t(e){y(this,t),this._elementRef=e}))),"accent")),rN=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s){var u;return y(this,n),(u=e.call(this,t))._focusMonitor=i,u._changeDetectorRef=r,u.defaults=o,u._animationMode=s,u._onChange=function(t){},u._onTouched=function(){},u._uniqueId="mat-slide-toggle-".concat(++tN),u._required=!1,u._checked=!1,u.name=null,u.id=u._uniqueId,u.labelPosition="after",u.ariaLabel=null,u.ariaLabelledby=null,u.change=new xl,u.toggleChange=new xl,u.tabIndex=parseInt(a)||0,u}return b(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){"keyboard"===e||"program"===e?t._inputElement.nativeElement.focus():e||Promise.resolve().then((function(){return t._onTouched()}))}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new nN(this,this.checked))}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"required",get:function(){return this._required},set:function(t){this._required=hy(t)}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=hy(t),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}}]),n}(iN);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(ek),ds(Eo),fs("tabindex"),ds(JL),ds(ix,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var n;1&t&&(Vl(KL,!0),Vl(ZL,!0),Vl($L,!0)),2&t&&(Ll(n=Ul())&&(e._thumbEl=n.first),Ll(n=Ul())&&(e._thumbBarEl=n.first),Ll(n=Ul())&&(e._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(ou("id",e.id),us("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),qs("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[vu([eN]),Zo],ngContentSelectors:QL,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(Ps(),vs(0,"label",0,1),vs(2,"div",2,3),vs(4,"input",4,5),Ss("change",(function(t){return e._onChangeEvent(t)}))("click",(function(t){return e._onInputClick(t)})),gs(),vs(6,"div",6,7),ys(8,"div",8),vs(9,"div",9),ys(10,"div",10),gs(),gs(),gs(),vs(11,"span",11,12),Ss("cdkObserveContent",(function(){return e._onLabelTextChange()})),vs(13,"span",13),nu(14,"\xa0"),gs(),Ms(15),gs(),gs()),2&t){var n=hs(1),i=hs(12);us("for",e.inputId),Xr(2),qs("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),Xr(2),ps("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),us("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Xr(5),ps("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",fl(17,XL))}},directives:[qx,Ib],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t}(),aN={provide:fD,useExisting:Ht((function(){return oN})),multi:!0},oN=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(ME);return t.\u0275fac=function(e){return sN(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[vu([aN]),Zo]}),t}(),sN=Ui(oN),uN=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),lN=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[uN,Yx,mx,Ob],uN,mx]}),t}();function cN(t,e){if(1&t&&(vs(0,"div"),vs(1,"uds-translate"),nu(2,"Edit group"),gs(),nu(3),gs()),2&t){var n=Ts();Xr(3),ru(" ",n.group.name," ")}}function hN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New group"),gs())}function dN(t,e){if(1&t){var n=ws();vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",13),Ss("ngModelChange",(function(t){return In(n),Ts(2).group.name=t})),gs(),gs()}if(2&t){var i=Ts(2);Xr(2),ru(" ",i.authenticator.type_info.groupNameLabel," "),Xr(1),ps("ngModel",i.group.name)("disabled",i.group.id)}}function fN(t,e){if(1&t&&(vs(0,"mat-option",17),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),au(" ",n.id," (",n.name,") ")}}function pN(t,e){if(1&t){var n=ws();vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",14),Ss("ngModelChange",(function(t){return In(n),Ts(2).group.name=t}))("input",(function(t){return In(n),Ts(2).filterGroup(t)})),gs(),vs(4,"mat-autocomplete",null,15),cs(6,fN,2,3,"mat-option",16),gs(),gs()}if(2&t){var i=hs(5),r=Ts(2);Xr(2),ru(" ",r.authenticator.type_info.groupNameLabel," "),Xr(1),ps("ngModel",r.group.name)("matAutocomplete",i),Xr(3),ps("ngForOf",r.fltrGroup)}}function mN(t,e){if(1&t&&(_s(0),cs(1,dN,4,3,"mat-form-field",12),cs(2,pN,7,4,"mat-form-field",12),bs()),2&t){var n=Ts();Xr(1),ps("ngIf",!1===n.authenticator.type_info.canSearchGroups||n.group.id),Xr(1),ps("ngIf",!0===n.authenticator.type_info.canSearchGroups&&!n.group.id)}}function vN(t,e){if(1&t){var n=ws();vs(0,"mat-form-field"),vs(1,"mat-label"),vs(2,"uds-translate"),nu(3,"Meta group name"),gs(),gs(),vs(4,"input",13),Ss("ngModelChange",(function(t){return In(n),Ts().group.name=t})),gs(),gs()}if(2&t){var i=Ts();Xr(4),ps("ngModel",i.group.name)("disabled",i.group.id)}}function gN(t,e){if(1&t&&(vs(0,"mat-option",17),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function yN(t,e){if(1&t){var n=ws();_s(0),vs(1,"mat-form-field"),vs(2,"mat-label"),vs(3,"uds-translate"),nu(4,"Service Pools"),gs(),gs(),vs(5,"mat-select",18),Ss("ngModelChange",(function(t){return In(n),Ts().group.pools=t})),cs(6,gN,2,2,"mat-option",16),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(5),ps("ngModel",i.group.pools),Xr(1),ps("ngForOf",i.servicePools)}}function _N(t,e){if(1&t&&(vs(0,"mat-option",17),nu(1),gs()),2&t){var n=Ts().$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function bN(t,e){if(1&t&&(_s(0),cs(1,_N,2,2,"mat-option",22),bs()),2&t){var n=e.$implicit;Xr(1),ps("ngIf","group"===n.type)}}function kN(t,e){if(1&t){var n=ws();vs(0,"div",19),vs(1,"span",20),vs(2,"uds-translate"),nu(3,"Match mode"),gs(),gs(),vs(4,"mat-slide-toggle",6),Ss("ngModelChange",(function(t){return In(n),Ts().group.meta_if_any=t})),nu(5),gs(),gs(),vs(6,"mat-form-field"),vs(7,"mat-label"),vs(8,"uds-translate"),nu(9,"Selected Groups"),gs(),gs(),vs(10,"mat-select",18),Ss("ngModelChange",(function(t){return In(n),Ts().group.groups=t})),cs(11,bN,2,1,"ng-container",21),gs(),gs()}if(2&t){var i=Ts();Xr(4),ps("ngModel",i.group.meta_if_any),Xr(1),ru(" ",i.getMatchValue()," "),Xr(5),ps("ngModel",i.group.groups),Xr(1),ps("ngForOf",i.groups)}}var wN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.fltrGroup=[],this.authenticator=i.authenticator,this.group={id:void 0,type:i.groupType,name:"",comments:"",meta_if_any:!1,state:"A",groups:[],pools:[]},void 0!==i.group&&(this.group.id=i.group.id,this.group.type=i.group.type,this.group.name=i.group.name)}return t.launch=function(e,n,i,r){var a=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,groupType:i,group:r},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.authenticator.id,"groups");void 0!==this.group.id&&e.get(this.group.id).subscribe((function(e){t.group=e}),(function(e){t.dialogRef.close()})),"meta"===this.group.type?e.summary().subscribe((function(e){return t.groups=e})):this.rest.servicesPools.summary().subscribe((function(e){return t.servicePools=e}))},t.prototype.filterGroup=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"group",t.target.value,100).subscribe((function(t){e.fltrGroup.length=0,t.forEach((function(t){e.fltrGroup.push(t)}))}))},t.prototype.getMatchValue=function(){return this.group.meta_if_any?django.gettext("Any"):django.gettext("All")},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").save(this.group).subscribe((function(e){t.dialogRef.close(),t.onSave.emit(!0)}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-new-group"]],decls:35,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],["metafirst",""],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["metasecond",""],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["multiple","",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-match"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"]],template:function(t,e){if(1&t&&(vs(0,"h4",0),cs(1,cN,4,1,"div",1),cs(2,hN,2,0,"ng-template",null,2,Gl),gs(),vs(4,"mat-dialog-content"),vs(5,"div",3),cs(6,mN,3,2,"ng-container",1),cs(7,vN,5,2,"ng-template",null,4,Gl),vs(9,"mat-form-field"),vs(10,"mat-label"),vs(11,"uds-translate"),nu(12,"Comments"),gs(),gs(),vs(13,"input",5),Ss("ngModelChange",(function(t){return e.group.comments=t})),gs(),gs(),vs(14,"mat-form-field"),vs(15,"mat-label"),vs(16,"uds-translate"),nu(17,"State"),gs(),gs(),vs(18,"mat-select",6),Ss("ngModelChange",(function(t){return e.group.state=t})),vs(19,"mat-option",7),vs(20,"uds-translate"),nu(21,"Enabled"),gs(),gs(),vs(22,"mat-option",8),vs(23,"uds-translate"),nu(24,"Disabled"),gs(),gs(),gs(),gs(),cs(25,yN,7,2,"ng-container",1),cs(26,kN,12,4,"ng-template",null,9,Gl),gs(),gs(),vs(28,"mat-dialog-actions"),vs(29,"button",10),vs(30,"uds-translate"),nu(31,"Cancel"),gs(),gs(),vs(32,"button",11),Ss("click",(function(){return e.save()})),vs(33,"uds-translate"),nu(34,"Ok"),gs(),gs(),gs()),2&t){var n=hs(3),i=hs(8),r=hs(27);Xr(1),ps("ngIf",e.group.id)("ngIfElse",n),Xr(5),ps("ngIf","group"===e.group.type)("ngIfElse",i),Xr(7),ps("ngModel",e.group.comments),Xr(5),ps("ngModel",e.group.state),Xr(7),ps("ngIf","group"===e.group.type)("ngIfElse",r)}},directives:[AS,yd,IS,iT,GO,HS,YP,iD,lD,gE,xT,oS,OS,BS,ES,NL,AL,vd,rN],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-match[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function CN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Groups"),gs())}function xN(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,CN,2,0,"ng-template",3),ys(2,"uds-table",4),gs()),2&t){var n=Ts();Xr(2),ps("rest",n.group)}}function SN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Services Pools"),gs())}function DN(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,SN,2,0,"ng-template",3),ys(2,"uds-table",4),gs()),2&t){var n=Ts();Xr(2),ps("rest",n.servicesPools)}}function EN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Assigned Services"),gs())}function AN(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,EN,2,0,"ng-template",3),ys(2,"uds-table",4),gs()),2&t){var n=Ts();Xr(2),ps("rest",n.userServices)}}var IN=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],ON=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],TN=[{field:"unique_id",title:django.gettext("Unique ID")},{field:"friendly_name",title:django.gettext("Friendly Name")},{field:"in_use",title:django.gettext("In Use")},{field:"ip",title:django.gettext("IP")},{field:"pool",title:django.gettext("Services Pool")}],RN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.users=i.users,this.user=i.user}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{users:n,user:i},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.users.parentId,"users").get(this.user.id).subscribe((function(e){t.group=new $F(django.gettext("Groups"),(function(){return t.rest.authenticators.detail(t.users.parentId,"groups").overview().pipe(Y((function(t){return t.filter((function(t){return e.groups.includes(t.id)}))})))}),IN,t.user.id+"infogrp"),t.servicesPools=new $F(django.gettext("Services Pools"),(function(){return t.users.invoke(t.user.id+"/servicesPools")}),ON,t.user.id+"infopool"),t.userServices=new $F(django.gettext("Assigned services"),(function(){return t.users.invoke(t.user.id+"/userServices").pipe(Y((function(e){return e.map((function(e){return e.in_use=t.api.yesno(e.in_use),e}))})))}),TN,t.user.id+"userservpool")}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-user-information"]],decls:13,vars:4,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],["pageSize","6",3,"rest"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Information for"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),vs(5,"mat-tab-group"),cs(6,xN,3,1,"mat-tab",1),cs(7,DN,3,1,"mat-tab",1),cs(8,AN,3,1,"mat-tab",1),gs(),gs(),vs(9,"mat-dialog-actions"),vs(10,"button",2),vs(11,"uds-translate"),nu(12,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.user.name,"\n"),Xr(3),ps("ngIf",e.group),Xr(1),ps("ngIf",e.servicesPools),Xr(1),ps("ngIf",e.userServices))},directives:[AS,HS,IS,TA,yd,OS,BS,ES,kA,gA,WF],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function PN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Services Pools"),gs())}function MN(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,PN,2,0,"ng-template",3),ys(2,"uds-table",4),gs()),2&t){var n=Ts();Xr(2),ps("rest",n.servicesPools)}}function FN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Users"),gs())}function LN(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,FN,2,0,"ng-template",3),ys(2,"uds-table",4),gs()),2&t){var n=Ts();Xr(2),ps("rest",n.users)}}function NN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Groups"),gs())}function VN(t,e){if(1&t&&(vs(0,"mat-tab"),cs(1,NN,2,0,"ng-template",3),ys(2,"uds-table",4),gs()),2&t){var n=Ts();Xr(2),ps("rest",n.groups)}}var BN=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],jN=[{field:"name",title:django.gettext("Name")},{field:"real_name",title:django.gettext("Real Name")},{field:"state",title:django.gettext("state")},{field:"last_access",title:django.gettext("Last access"),type:vI.DATETIME}],zN=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],HN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{group:i,groups:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.data.groups.parentId,"groups");this.servicesPools=new $F(django.gettext("Service pools"),(function(){return e.invoke(t.data.group.id+"/servicesPools")}),BN,this.data.group.id+"infopls"),this.users=new $F(django.gettext("Users"),(function(){return e.invoke(t.data.group.id+"/users").pipe(Y((function(t){return t.map((function(t){return t.state="A"===t.state?django.gettext("Enabled"):"I"===t.state?django.gettext("Disabled"):django.gettext("Blocked"),t}))})))}),jN,this.data.group.id+"infousr"),"meta"===this.data.group.type&&(this.groups=new $F(django.gettext("Groups"),(function(){return e.overview().pipe(Y((function(e){return e.filter((function(e){return t.data.group.groups.includes(e.id)}))})))}),zN,this.data.group.id+"infogrps"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-group-information"]],decls:12,vars:3,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],["pageSize","6",3,"rest"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Information for"),gs(),gs(),vs(3,"mat-dialog-content"),vs(4,"mat-tab-group"),cs(5,MN,3,1,"mat-tab",1),cs(6,LN,3,1,"mat-tab",1),cs(7,VN,3,1,"mat-tab",1),gs(),gs(),vs(8,"mat-dialog-actions"),vs(9,"button",2),vs(10,"uds-translate"),nu(11,"Ok"),gs(),gs(),gs()),2&t&&(Xr(5),ps("ngIf",e.servicesPools),Xr(1),ps("ngIf",e.users),Xr(1),ps("ngIf",e.groups))},directives:[AS,HS,IS,TA,yd,OS,BS,ES,kA,gA,WF],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function UN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Summary"),gs())}function WN(t,e){if(1&t&&ys(0,"uds-information",16),2&t){var n=Ts(2);ps("value",n.authenticator)("gui",n.gui)}}function qN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Users"),gs())}function YN(t,e){if(1&t){var n=ws();vs(0,"uds-table",17),Ss("loaded",(function(t){return In(n),Ts(2).onLoad(t)}))("newAction",(function(t){return In(n),Ts(2).onNewUser(t)}))("editAction",(function(t){return In(n),Ts(2).onEditUser(t)}))("deleteAction",(function(t){return In(n),Ts(2).onDeleteUser(t)}))("customButtonAction",(function(t){return In(n),Ts(2).onUserInformation(t)})),gs()}if(2&t){var i=Ts(2);ps("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function GN(t,e){if(1&t){var n=ws();vs(0,"uds-table",18),Ss("loaded",(function(t){return In(n),Ts(2).onLoad(t)}))("editAction",(function(t){return In(n),Ts(2).onEditUser(t)}))("deleteAction",(function(t){return In(n),Ts(2).onDeleteUser(t)}))("customButtonAction",(function(t){return In(n),Ts(2).onUserInformation(t)})),gs()}if(2&t){var i=Ts(2);ps("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function KN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Groups"),gs())}function ZN(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Logs"),gs())}function $N(t,e){if(1&t){var n=ws();vs(0,"div",6),vs(1,"div",7),vs(2,"mat-tab-group",8),Ss("selectedIndexChange",(function(t){return In(n),Ts().selectedTab=t})),vs(3,"mat-tab"),cs(4,UN,2,0,"ng-template",9),vs(5,"div",10),cs(6,WN,1,2,"uds-information",11),gs(),gs(),vs(7,"mat-tab"),cs(8,qN,2,0,"ng-template",9),vs(9,"div",10),cs(10,YN,1,6,"uds-table",12),cs(11,GN,1,6,"uds-table",13),gs(),gs(),vs(12,"mat-tab"),cs(13,KN,2,0,"ng-template",9),vs(14,"div",10),vs(15,"uds-table",14),Ss("loaded",(function(t){return In(n),Ts().onLoad(t)}))("newAction",(function(t){return In(n),Ts().onNewGroup(t)}))("editAction",(function(t){return In(n),Ts().onEditGroup(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteGroup(t)}))("customButtonAction",(function(t){return In(n),Ts().onGroupInformation(t)})),gs(),gs(),gs(),vs(16,"mat-tab"),cs(17,ZN,2,0,"ng-template",9),vs(18,"div",10),ys(19,"uds-logs-table",15),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ts();Xr(2),ps("selectedIndex",i.selectedTab)("@.disabled",!0),Xr(4),ps("ngIf",i.authenticator&&i.gui),Xr(4),ps("ngIf",i.authenticator.type_info.canCreateUsers),Xr(1),ps("ngIf",!i.authenticator.type_info.canCreateUsers),Xr(4),ps("rest",i.groups)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("tableId","authenticators-d-groups"+i.authenticator.id)("pageSize",i.api.config.admin.page_size),Xr(4),ps("rest",i.rest.authenticators)("itemId",i.authenticator.id)("tableId","authenticators-d-log"+i.authenticator.id)}}var XN=function(t){return["/authenticators",t]},QN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:gI.ONLY_MENU}],this.authenticator=null,this.selectedTab=1,this.selectedTab=this.route.snapshot.paramMap.get("group")?2:1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("authenticator");this.users=this.rest.authenticators.detail(e,"users"),this.groups=this.rest.authenticators.detail(e,"groups"),this.rest.authenticators.get(e).subscribe((function(e){t.authenticator=e,t.rest.authenticators.gui(e.type).subscribe((function(e){t.gui=e}))}))},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("user"),n=this.route.snapshot.paramMap.get("group");t.table.selectElement("id",e||n)}},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onNewUser=function(t){GL.launch(this.api,this.authenticator).subscribe((function(e){return t.table.overview()}))},t.prototype.onEditUser=function(t){GL.launch(this.api,this.authenticator,t.table.selection.selected[0]).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteUser=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user"))},t.prototype.onNewGroup=function(t){wN.launch(this.api,this.authenticator,t.param.type).subscribe((function(e){return t.table.overview()}))},t.prototype.onEditGroup=function(t){wN.launch(this.api,this.authenticator,t.param.type,t.table.selection.selected[0]).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete group"))},t.prototype.onUserInformation=function(t){RN.launch(this.api,this.users,t.table.selection.selected[0])},t.prototype.onGroupInformation=function(t){HN.launch(this.api,this.groups,t.table.selection.selected[0])},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-authenticators-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],[3,"rest","itemId","tableId"],[3,"value","gui"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"a",2),vs(3,"i",3),nu(4,"arrow_back"),gs(),gs(),nu(5," \xa0"),ys(6,"img",4),nu(7),gs(),cs(8,$N,20,14,"div",5),gs()),2&t&&(Xr(2),ps("routerLink",pl(4,XN,e.authenticator?e.authenticator.id:"")),Xr(4),ps("src",e.api.staticURL("admin/img/icons/services.png"),Tr),Xr(1),ru(" \xa0",null==e.authenticator?null:e.authenticator.name," "),Xr(1),ps("ngIf",e.authenticator))},directives:[zg,yd,TA,kA,gA,WF,rL,HS,cL],styles:[""]}),t}(),JN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("osmanager")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New OS Manager"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit OS Manager"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete OS Manager"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("osmanager"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-osmanagers"]],decls:2,vars:5,consts:[["icon","osmanagers",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"div"),vs(1,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs(),gs()),2&t&&(Xr(1),ps("rest",e.rest.osManagers)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[WF],styles:[""]}),t}(),tV=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("transport")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Transport"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Transport"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Transport"))},t.prototype.processElement=function(t){try{t.allowed_oss=t.allowed_oss.map((function(t){return t.id})).join(", ")}catch(e){t.allowed_oss=""}},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("transport"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-transports"]],decls:2,vars:7,consts:[["icon","transports",3,"rest","multiSelect","allowExport","hasPermissions","newGrouped","onItem","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"div"),vs(1,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs(),gs()),2&t&&(Xr(1),ps("rest",e.rest.transports)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[WF],styles:[".mat-column-priority{max-width:7rem;justify-content:center}"]}),t}(),eV=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("network")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Network"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Network"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Network"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("network"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-networks"]],decls:2,vars:5,consts:[["icon","networks",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"div"),vs(1,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs(),gs()),2&t&&(Xr(1),ps("rest",e.rest.networks)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[WF],styles:[""]}),t}(),nV=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("proxy")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Proxy"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Proxy"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Proxy"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("proxy"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-proxies"]],decls:2,vars:5,consts:[["icon","proxy",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"div"),vs(1,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs(),gs()),2&t&&(Xr(1),ps("rest",e.rest.proxy)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[WF],styles:[""]}),t}(),iV=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[AI.getGotoButton(yI,"provider_id"),AI.getGotoButton(_I,"provider_id","service_id"),AI.getGotoButton(xI,"osmanager_id"),AI.getGotoButton(DI,"pool_group_id")],this.editing=!1}return t.prototype.ngOnInit=function(){},t.prototype.onChange=function(t){var e=this,n=["initial_srvs","cache_l1_srvs","max_srvs"];if(null===t.on||"service_id"===t.on.field.name){if(""===t.all.service_id.value)return t.all.osmanager_id.gui.values.length=0,void n.forEach((function(e){return t.all[e].gui.rdonly=!0}));this.rest.providers.service(t.all.service_id.value).subscribe((function(i){t.all.allow_users_reset.gui.rdonly=!i.info.can_reset,t.all.osmanager_id.gui.values.length=0,e.editing||(t.all.osmanager_id.gui.rdonly=!i.info.needs_manager),!0===i.info.needs_manager?e.rest.osManagers.overview().subscribe((function(e){e.forEach((function(e){e.servicesTypes.forEach((function(n){i.info.servicesTypeProvided.includes(n)&&t.all.osmanager_id.gui.values.push({id:e.id,text:e.name})}))})),t.all.osmanager_id.value=t.all.osmanager_id.gui.values.length>0?t.all.osmanager_id.value||t.all.osmanager_id.gui.values[0].id:""})):(t.all.osmanager_id.gui.values.push({id:"",text:django.gettext("(This service does not requires an OS Manager)")}),t.all.osmanager_id.value=""),n.forEach((function(e){return t.all[e].gui.rdonly=!i.info.uses_cache})),t.all.cache_l2_srvs.gui.rdonly=!1===i.info.uses_cache||!1===i.info.uses_cache_l2,t.all.publish_on_save&&(t.all.publish_on_save.gui.rdonly=!i.info.needs_publication)})),n.forEach((function(e){t.all[e].gui.rdonly=!0}))}},t.prototype.onNew=function(t){var e=this;this.editing=!1,this.api.gui.forms.typedNewForm(t,django.gettext("New service Pool"),!1,[{name:"publish_on_save",value:!0,gui:{label:django.gettext("Publish on creation"),tooltip:django.gettext("If selected, will initiate the publication inmediatly after creation"),type:ZS.CHECKBOX,order:150,defvalue:"true"}}]).subscribe((function(t){return e.onChange(t)}))},t.prototype.onEdit=function(t){var e=this;this.editing=!0,this.api.gui.forms.typedEditForm(t,django.gettext("Edit Service Pool"),!1).subscribe((function(t){return e.onChange(t)}))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service pool"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.show_transports=this.api.yesno(t.show_transports),t.restrained?(t.name='warning '+this.api.gui.icon(t.info.icon)+t.name,t.state="T"):(t.name=this.api.gui.icon(t.info.icon)+t.name,t.meta_member.length>0&&(t.state="V")),t.name=this.api.safeString(t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onDetail=function(t){this.api.navigation.gotoServicePoolDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("pool"))},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools"]],decls:1,vars:7,consts:[["icon","pools",3,"rest","multiSelect","allowExport","hasPermissions","onItem","customButtons","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(vs(0,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("detailAction",(function(t){return e.onDetail(t)}))("loaded",(function(t){return e.onLoad(t)})),gs()),2&t&&ps("rest",e.rest.servicesPools)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[WF],styles:[".mat-column-state, .mat-column-usage, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center} .mat-column-show_transports{max-width:10rem;justify-content:center} .mat-column-pool_group_name{max-width:12rem} .row-state-T>.mat-cell{color:#d65014!important}"]}),t}();function rV(t,e){if(1&t&&(vs(0,"mat-option",8),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function aV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",9),Ss("changed",(function(t){return In(n),Ts().userFilter=t})),gs()}}function oV(t,e){if(1&t&&(vs(0,"mat-option",8),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}var sV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.auths=[],this.users=[],this.userFilter="",this.userService=i.userService,this.userServices=i.userServices}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,userServices:i},disableClose:!1}).componentInstance.onSave},t.prototype.authChanged=function(){var t=this;this.rest.authenticators.detail(this.authId,"users").summary().subscribe((function(e){t.users=e}))},t.prototype.ngOnInit=function(){var t=this;this.authId=this.userService.owner_info.auth_id||"",this.userId=this.userService.owner_info.user_id||"",this.rest.authenticators.summary().subscribe((function(e){t.auths=e,t.authChanged()}))},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(""===this.userFilter)return this.users;var e=new Array;return this.users.forEach((function(n){(""===t.userFilter||n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase()))&&e.push(n)})),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.userServices.save({id:this.userService.id,auth_id:this.authId,user_id:this.userId}).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)})):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-change-assigned-service-owner"]],decls:25,vars:5,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Change owner of assigned service"),gs(),gs(),vs(3,"mat-dialog-content"),vs(4,"div",1),vs(5,"mat-form-field"),vs(6,"mat-label"),vs(7,"uds-translate"),nu(8,"Authenticator"),gs(),gs(),vs(9,"mat-select",2),Ss("ngModelChange",(function(t){return e.authId=t}))("selectionChange",(function(t){return e.changeAuth(t)})),cs(10,rV,2,2,"mat-option",3),gs(),gs(),vs(11,"mat-form-field"),vs(12,"mat-label"),vs(13,"uds-translate"),nu(14,"User"),gs(),gs(),vs(15,"mat-select",4),Ss("ngModelChange",(function(t){return e.userId=t})),cs(16,aV,1,0,"uds-mat-select-search",5),cs(17,oV,2,2,"mat-option",3),gs(),gs(),gs(),gs(),vs(18,"mat-dialog-actions"),vs(19,"button",6),vs(20,"uds-translate"),nu(21,"Cancel"),gs(),gs(),vs(22,"button",7),Ss("click",(function(){return e.save()})),vs(23,"uds-translate"),nu(24,"Ok"),gs(),gs(),gs()),2&t&&(Xr(9),ps("ngModel",e.authId),Xr(1),ps("ngForOf",e.auths),Xr(5),ps("ngModel",e.userId),Xr(1),ps("ngIf",e.users.length>10),Xr(1),ps("ngForOf",e.filteredUsers()))},directives:[AS,HS,IS,iT,GO,xT,lD,gE,vd,yd,OS,BS,ES,oS,QP],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function uV(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New access rule for"),gs())}function lV(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Edit access rule for"),gs())}function cV(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Default fallback access for"),gs())}function hV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",11),Ss("changed",(function(t){return In(n),Ts(2).calendarsFilter=t})),gs()}}function dV(t,e){if(1&t&&(vs(0,"mat-option",12),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function fV(t,e){if(1&t){var n=ws();_s(0),vs(1,"mat-form-field"),vs(2,"mat-label"),vs(3,"uds-translate"),nu(4,"Priority"),gs(),gs(),vs(5,"input",8),Ss("ngModelChange",(function(t){return In(n),Ts().accessRule.priority=t})),gs(),gs(),vs(6,"mat-form-field"),vs(7,"mat-label"),vs(8,"uds-translate"),nu(9,"Calendar"),gs(),gs(),vs(10,"mat-select",3),Ss("ngModelChange",(function(t){return In(n),Ts().accessRule.calendarId=t})),cs(11,hV,1,0,"uds-mat-select-search",9),cs(12,dV,2,2,"mat-option",10),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(5),ps("ngModel",i.accessRule.priority),Xr(5),ps("ngModel",i.accessRule.calendarId),Xr(1),ps("ngIf",i.calendars.length>10),Xr(1),ps("ngForOf",i.filtered(i.calendars,i.calendarsFilter))}}var pV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.calendars=[],this.calendarsFilter="",this.pool=i.pool,this.model=i.model,this.accessRule={id:void 0,priority:0,access:"ALLOW",calendarId:""},i.accessRule&&(this.accessRule.id=i.accessRule.id)}return t.launch=function(e,n,i,r){var a=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i,accessRule:r},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.calendars.summary().subscribe((function(e){t.calendars=e})),void 0!==this.accessRule.id&&-1!==this.accessRule.id?this.model.get(this.accessRule.id).subscribe((function(e){t.accessRule=e})):-1===this.accessRule.id&&this.model.parentModel.getFallbackAccess(this.pool.id).subscribe((function(e){return t.accessRule.access=e}))},t.prototype.filtered=function(t,e){return""===e?t:t.filter((function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}))},t.prototype.save=function(){var t=this,e=function(){t.dialogRef.close(),t.onSave.emit(!0)};-1!==this.accessRule.id?this.model.save(this.accessRule).subscribe(e):this.model.parentModel.setFallbackAccess(this.pool.id,this.accessRule.access).subscribe(e)},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-access-calendars"]],decls:24,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],[3,"ngModel","ngModelChange"],["value","ALLOW"],["value","DENY"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(vs(0,"h4",0),cs(1,uV,2,0,"uds-translate",1),cs(2,lV,2,0,"uds-translate",1),cs(3,cV,2,0,"uds-translate",1),nu(4),gs(),vs(5,"mat-dialog-content"),vs(6,"div",2),cs(7,fV,13,4,"ng-container",1),vs(8,"mat-form-field"),vs(9,"mat-label"),vs(10,"uds-translate"),nu(11,"Action"),gs(),gs(),vs(12,"mat-select",3),Ss("ngModelChange",(function(t){return e.accessRule.access=t})),vs(13,"mat-option",4),nu(14," ALLOW "),gs(),vs(15,"mat-option",5),nu(16," DENY "),gs(),gs(),gs(),gs(),gs(),vs(17,"mat-dialog-actions"),vs(18,"button",6),vs(19,"uds-translate"),nu(20,"Cancel"),gs(),gs(),vs(21,"button",7),Ss("click",(function(){return e.save()})),vs(22,"uds-translate"),nu(23,"Ok"),gs(),gs(),gs()),2&t&&(Xr(1),ps("ngIf",void 0===e.accessRule.id),Xr(1),ps("ngIf",void 0!==e.accessRule.id&&-1!==e.accessRule.id),Xr(1),ps("ngIf",-1===e.accessRule.id),Xr(1),ru(" ",e.pool.name,"\n"),Xr(3),ps("ngIf",-1!==e.accessRule.id),Xr(5),ps("ngModel",e.accessRule.access))},directives:[AS,yd,IS,iT,GO,HS,xT,lD,gE,oS,OS,BS,ES,YP,CD,iD,vd,QP],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function mV(t,e){if(1&t&&(vs(0,"mat-option",8),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function vV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",9),Ss("changed",(function(t){return In(n),Ts().groupFilter=t})),gs()}}function gV(t,e){if(1&t&&(_s(0),nu(1),bs()),2&t){var n=Ts().$implicit;Xr(1),ru(" (",n.comments,")")}}function yV(t,e){if(1&t&&(vs(0,"mat-option",8),nu(1),cs(2,gV,2,1,"ng-container",10),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name,""),Xr(1),ps("ngIf",n.comments)}}var _V=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.model=null,this.auths=[],this.groups=[],this.groupFilter="",this.authId="",this.groupId="",this.pool=i.pool,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i},disableClose:!1}).componentInstance.onSave},t.prototype.authChanged=function(){var t=this;""!==this.authId&&this.rest.authenticators.detail(this.authId,"groups").summary().subscribe((function(e){t.groups=e}))},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe((function(e){t.auths=e,t.authChanged()}))},t.prototype.changeAuth=function(t){this.groupId="",this.authChanged()},t.prototype.filteredGroups=function(){var t=this;return""===this.groupFilter?this.groups:this.groups.filter((function(e){return e.name.toLocaleLowerCase().includes(t.groupFilter.toLocaleLowerCase())}))},t.prototype.save=function(){var t=this;""!==this.groupId&&""!==this.authId?this.model.create({id:this.groupId}).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)})):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid group"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-add-group"]],decls:26,vars:6,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"],[4,"ngIf"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"New group for"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),vs(5,"div",1),vs(6,"mat-form-field"),vs(7,"mat-label"),vs(8,"uds-translate"),nu(9,"Authenticator"),gs(),gs(),vs(10,"mat-select",2),Ss("ngModelChange",(function(t){return e.authId=t}))("selectionChange",(function(t){return e.changeAuth(t)})),cs(11,mV,2,2,"mat-option",3),gs(),gs(),vs(12,"mat-form-field"),vs(13,"mat-label"),vs(14,"uds-translate"),nu(15,"Group"),gs(),gs(),vs(16,"mat-select",4),Ss("ngModelChange",(function(t){return e.groupId=t})),cs(17,vV,1,0,"uds-mat-select-search",5),cs(18,yV,3,3,"mat-option",3),gs(),gs(),gs(),gs(),vs(19,"mat-dialog-actions"),vs(20,"button",6),vs(21,"uds-translate"),nu(22,"Cancel"),gs(),gs(),vs(23,"button",7),Ss("click",(function(){return e.save()})),vs(24,"uds-translate"),nu(25,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.pool.name,"\n"),Xr(7),ps("ngModel",e.authId),Xr(1),ps("ngForOf",e.auths),Xr(5),ps("ngModel",e.groupId),Xr(1),ps("ngIf",e.groups.length>10),Xr(1),ps("ngForOf",e.filteredGroups()))},directives:[AS,HS,IS,iT,GO,xT,lD,gE,vd,yd,OS,BS,ES,oS,QP],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function bV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",7),Ss("changed",(function(t){return In(n),Ts().transportsFilter=t})),gs()}}function kV(t,e){if(1&t&&(_s(0),nu(1),bs()),2&t){var n=Ts().$implicit;Xr(1),ru(" (",n.comments,")")}}function wV(t,e){if(1&t&&(vs(0,"mat-option",8),nu(1),cs(2,kV,2,1,"ng-container",9),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name,""),Xr(1),ps("ngIf",n.comments)}}var CV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.transports=[],this.transportsFilter="",this.transportId="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.transports.summary().subscribe((function(e){t.transports=e.filter((function(e){return t.servicePool.info.allowedProtocols.includes(e.protocol)}))}))},t.prototype.filteredTransports=function(){var t=this;return""===this.transportsFilter?this.transports:this.transports.filter((function(e){return e.name.toLocaleLowerCase().includes(t.transportsFilter.toLocaleLowerCase())}))},t.prototype.save=function(){var t=this;""!==this.transportId?this.rest.servicesPools.detail(this.servicePool.id,"transports").create({id:this.transportId}).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)})):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid transport"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-add-transport"]],decls:20,vars:4,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[4,"ngIf"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"New transport for"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),vs(5,"div",1),vs(6,"mat-form-field"),vs(7,"mat-label"),vs(8,"uds-translate"),nu(9,"Transport"),gs(),gs(),vs(10,"mat-select",2),Ss("ngModelChange",(function(t){return e.transportId=t})),cs(11,bV,1,0,"uds-mat-select-search",3),cs(12,wV,3,3,"mat-option",4),gs(),gs(),gs(),gs(),vs(13,"mat-dialog-actions"),vs(14,"button",5),vs(15,"uds-translate"),nu(16,"Cancel"),gs(),gs(),vs(17,"button",6),Ss("click",(function(){return e.save()})),vs(18,"uds-translate"),nu(19,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.servicePool.name,"\n"),Xr(7),ps("ngModel",e.transportId),Xr(1),ps("ngIf",e.transports.length>10),Xr(1),ps("ngForOf",e.filteredTransports()))},directives:[AS,HS,IS,iT,GO,xT,lD,gE,yd,vd,OS,BS,ES,QP,oS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),xV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.reason="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){},t.prototype.save=function(){var t=this;this.rest.servicesPools.detail(this.servicePool.id,"publications").invoke("publish","changelog="+encodeURIComponent(this.reason)).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-new-publication"]],decls:18,vars:2,consts:[["mat-dialog-title",""],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"New publication for"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),vs(5,"div",1),vs(6,"mat-form-field"),vs(7,"mat-label"),vs(8,"uds-translate"),nu(9,"Comments"),gs(),gs(),vs(10,"input",2),Ss("ngModelChange",(function(t){return e.reason=t})),gs(),gs(),gs(),gs(),vs(11,"mat-dialog-actions"),vs(12,"button",3),vs(13,"uds-translate"),nu(14,"Cancel"),gs(),gs(),vs(15,"button",4),Ss("click",(function(){return e.save()})),vs(16,"uds-translate"),nu(17,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.servicePool.name,"\n"),Xr(7),ps("ngModel",e.reason))},directives:[AS,HS,IS,iT,GO,YP,iD,lD,gE,OS,BS,ES],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),SV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1})},t.prototype.ngOnInit=function(){this.changeLogPubs=this.rest.servicesPools.detail(this.servicePool.id,"changelog")},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-publications-changelog"]],decls:11,vars:4,consts:[["mat-dialog-title",""],["icon","publications",3,"rest","allowExport","tableId"],["changeLog",""],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Changelog of"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),ys(5,"uds-table",1,2),gs(),vs(7,"mat-dialog-actions"),vs(8,"button",3),vs(9,"uds-translate"),nu(10,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.servicePool.name,"\n"),Xr(2),ps("rest",e.changeLogPubs)("allowExport",!0)("tableId","servicePools-d-changelog"+e.servicePool.id))},directives:[AS,HS,IS,WF,OS,BS,ES],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function DV(t,e){1&t&&(_s(0),vs(1,"uds-translate"),nu(2,"Edit action for"),gs(),bs())}function EV(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New action for"),gs())}function AV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",14),Ss("changed",(function(t){return In(n),Ts().calendarsFilter=t})),gs()}}function IV(t,e){if(1&t&&(vs(0,"mat-option",15),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function OV(t,e){if(1&t&&(vs(0,"mat-option",15),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.description," ")}}function TV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",14),Ss("changed",(function(t){return In(n),Ts(2).transportsFilter=t})),gs()}}function RV(t,e){if(1&t&&(vs(0,"mat-option",15),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function PV(t,e){if(1&t){var n=ws();_s(0),vs(1,"mat-form-field"),vs(2,"mat-label"),vs(3,"uds-translate"),nu(4,"Transport"),gs(),gs(),vs(5,"mat-select",4),Ss("ngModelChange",(function(t){return In(n),Ts().paramValue=t})),cs(6,TV,1,0,"uds-mat-select-search",5),cs(7,RV,2,2,"mat-option",6),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(5),ps("ngModel",i.paramValue),Xr(1),ps("ngIf",i.transports.length>10),Xr(1),ps("ngForOf",i.filtered(i.transports,i.transportsFilter))}}function MV(t,e){if(1&t&&(vs(0,"mat-option",15),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function FV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",14),Ss("changed",(function(t){return In(n),Ts(2).groupsFilter=t})),gs()}}function LV(t,e){if(1&t&&(vs(0,"mat-option",15),nu(1),gs()),2&t){var n=e.$implicit;ps("value",Ts(2).authenticator+"@"+n.id),Xr(1),ru(" ",n.name," ")}}function NV(t,e){if(1&t){var n=ws();_s(0),vs(1,"mat-form-field"),vs(2,"mat-label"),vs(3,"uds-translate"),nu(4,"Authenticator"),gs(),gs(),vs(5,"mat-select",10),Ss("ngModelChange",(function(t){return In(n),Ts().authenticator=t}))("valueChange",(function(t){return In(n),Ts().changedAuthenticator(t)})),cs(6,MV,2,2,"mat-option",6),gs(),gs(),vs(7,"mat-form-field"),vs(8,"mat-label"),vs(9,"uds-translate"),nu(10,"Group"),gs(),gs(),vs(11,"mat-select",4),Ss("ngModelChange",(function(t){return In(n),Ts().paramValue=t})),cs(12,FV,1,0,"uds-mat-select-search",5),cs(13,LV,2,2,"mat-option",6),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(5),ps("ngModel",i.authenticator),Xr(1),ps("ngForOf",i.authenticators),Xr(5),ps("ngModel",i.paramValue),Xr(1),ps("ngIf",i.groups.length>10),Xr(1),ps("ngForOf",i.filtered(i.groups,i.groupsFilter))}}function VV(t,e){if(1&t){var n=ws();_s(0),vs(1,"div",8),vs(2,"span",16),nu(3),gs(),nu(4,"\xa0 "),vs(5,"mat-slide-toggle",4),Ss("ngModelChange",(function(t){return In(n),Ts().paramValue=t})),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(3),iu(i.parameter.description),Xr(2),ps("ngModel",i.paramValue)}}function BV(t,e){if(1&t){var n=ws();_s(0),vs(1,"mat-form-field"),vs(2,"mat-label"),nu(3),gs(),vs(4,"input",17),Ss("ngModelChange",(function(t){return In(n),Ts().paramValue=t})),gs(),gs(),bs()}if(2&t){var i=Ts();Xr(3),ru(" ",i.parameter.description," "),Xr(1),ps("type",i.parameter.type)("ngModel",i.paramValue)}}var jV=function(){return["transport","group","bool"]},zV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.calendars=[],this.actionList=[],this.authenticators=[],this.transports=[],this.groups=[],this.paramsDict={},this.calendarsFilter="",this.groupsFilter="",this.transportsFilter="",this.authenticator="",this.parameter={},this.paramValue="",this.servicePool=i.servicePool,this.scheduledAction={id:void 0,action:"",calendar:"",calendarId:"",atStart:!0,eventsOffset:0,params:{}},void 0!==i.scheduledAction&&(this.scheduledAction.id=i.scheduledAction.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n,scheduledAction:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe((function(e){return t.authenticators=e})),this.rest.transports.summary().subscribe((function(e){return t.transports=e})),this.rest.calendars.summary().subscribe((function(e){return t.calendars=e})),this.rest.servicesPools.actionsList(this.servicePool.id).subscribe((function(e){t.actionList=e,t.actionList.forEach((function(e){t.paramsDict[e.id]=e.params[0]})),void 0!==t.scheduledAction.id&&t.rest.servicesPools.detail(t.servicePool.id,"actions").get(t.scheduledAction.id).subscribe((function(e){t.scheduledAction=e,t.changedAction(t.scheduledAction.action)}))}))},t.prototype.filtered=function(t,e){return""===e?t:t.filter((function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}))},t.prototype.changedAction=function(t){if(this.parameter=this.paramsDict[t],void 0!==this.parameter&&(this.paramValue=this.scheduledAction.params[this.parameter.name],void 0===this.paramValue&&(this.paramValue=!1!==this.parameter.default&&(this.parameter.default||"")),"group"===this.parameter.type)){var e=this.paramValue.split("@");2!==e.length&&(e=["",""]),this.authenticator=e[0],this.changedAuthenticator(this.authenticator)}},t.prototype.changedAuthenticator=function(t){var e=this;t&&this.rest.authenticators.detail(t,"groups").summary().subscribe((function(t){return e.groups=t}))},t.prototype.save=function(){var t=this;this.scheduledAction.params={},this.parameter&&(this.scheduledAction.params[this.parameter.name]=this.paramValue),this.rest.servicesPools.detail(this.servicePool.id,"actions").save(this.scheduledAction).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-scheduled-action"]],decls:42,vars:16,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["editTitle",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-atstart"],[3,"ngModel","ngModelChange","valueChange"],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[1,"label"],["matInput","",3,"type","ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(vs(0,"h4",0),cs(1,DV,3,0,"ng-container",1),cs(2,EV,2,0,"ng-template",null,2,Gl),nu(4),gs(),vs(5,"mat-dialog-content"),vs(6,"div",3),vs(7,"mat-form-field"),vs(8,"mat-label"),vs(9,"uds-translate"),nu(10,"Calendar"),gs(),gs(),vs(11,"mat-select",4),Ss("ngModelChange",(function(t){return e.scheduledAction.calendarId=t})),cs(12,AV,1,0,"uds-mat-select-search",5),cs(13,IV,2,2,"mat-option",6),gs(),gs(),vs(14,"mat-form-field"),vs(15,"mat-label"),vs(16,"uds-translate"),nu(17,"Events offset (minutes)"),gs(),gs(),vs(18,"input",7),Ss("ngModelChange",(function(t){return e.scheduledAction.eventsOffset=t})),gs(),gs(),vs(19,"div",8),vs(20,"span",9),vs(21,"uds-translate"),nu(22,"At the beginning of the interval?"),gs(),gs(),vs(23,"mat-slide-toggle",4),Ss("ngModelChange",(function(t){return e.scheduledAction.atStart=t})),nu(24),gs(),gs(),vs(25,"mat-form-field"),vs(26,"mat-label"),vs(27,"uds-translate"),nu(28,"Action"),gs(),gs(),vs(29,"mat-select",10),Ss("ngModelChange",(function(t){return e.scheduledAction.action=t}))("valueChange",(function(t){return e.changedAction(t)})),cs(30,OV,2,2,"mat-option",6),gs(),gs(),cs(31,PV,8,3,"ng-container",11),cs(32,NV,14,5,"ng-container",11),cs(33,VV,6,2,"ng-container",11),cs(34,BV,5,3,"ng-container",11),gs(),gs(),vs(35,"mat-dialog-actions"),vs(36,"button",12),vs(37,"uds-translate"),nu(38,"Cancel"),gs(),gs(),vs(39,"button",13),Ss("click",(function(){return e.save()})),vs(40,"uds-translate"),nu(41,"Ok"),gs(),gs(),gs()),2&t){var n=hs(3);Xr(1),ps("ngIf",void 0!==e.scheduledAction.id)("ngIfElse",n),Xr(3),ru(" ",e.servicePool.name,"\n"),Xr(7),ps("ngModel",e.scheduledAction.calendarId),Xr(1),ps("ngIf",e.calendars.length>10),Xr(1),ps("ngForOf",e.filtered(e.calendars,e.calendarsFilter)),Xr(5),ps("ngModel",e.scheduledAction.eventsOffset),Xr(5),ps("ngModel",e.scheduledAction.atStart),Xr(1),ru(" ",e.api.yesno(e.scheduledAction.atStart)," "),Xr(5),ps("ngModel",e.scheduledAction.action),Xr(1),ps("ngForOf",e.actionList),Xr(1),ps("ngIf","transport"===(null==e.parameter?null:e.parameter.type)),Xr(1),ps("ngIf","group"===(null==e.parameter?null:e.parameter.type)),Xr(1),ps("ngIf","bool"===(null==e.parameter?null:e.parameter.type)),Xr(1),ps("ngIf",(null==e.parameter?null:e.parameter.type)&&!fl(15,jV).includes(e.parameter.type))}},directives:[AS,yd,IS,iT,GO,HS,xT,lD,gE,vd,YP,CD,iD,rN,OS,BS,ES,QP,oS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-atstart[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}(),HV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.userService=i.userService,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,model:i},disableClose:!1})},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-userservices-log"]],decls:10,vars:4,consts:[["mat-dialog-title",""],[3,"rest","itemId","tableId"],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Logs of"),gs(),nu(3),gs(),vs(4,"mat-dialog-content"),ys(5,"uds-logs-table",1),gs(),vs(6,"mat-dialog-actions"),vs(7,"button",2),vs(8,"uds-translate"),nu(9,"Ok"),gs(),gs(),gs()),2&t&&(Xr(3),ru(" ",e.userService.name,"\n"),Xr(2),ps("rest",e.model)("itemId",e.userService.id)("tableId","servicePools-d-uslog"+e.userService.id))},directives:[AS,HS,IS,rL,OS,BS,ES],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function UV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",8),Ss("changed",(function(t){return In(n),Ts().assignablesServicesFilter=t})),gs()}}function WV(t,e){if(1&t&&(vs(0,"mat-option",9),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.text," ")}}function qV(t,e){if(1&t&&(vs(0,"mat-option",9),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}function YV(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",8),Ss("changed",(function(t){return In(n),Ts().userFilter=t})),gs()}}function GV(t,e){if(1&t&&(vs(0,"mat-option",9),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}var KV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.auths=[],this.assignablesServices=[],this.assignablesServicesFilter="",this.users=[],this.userFilter="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.authChanged=function(){var t=this;this.authId&&this.rest.authenticators.detail(this.authId,"users").summary().subscribe((function(e){t.users=e}))},t.prototype.ngOnInit=function(){var t=this;this.authId="",this.userId="",this.rest.authenticators.summary().subscribe((function(e){t.auths=e,t.authChanged()})),this.rest.servicesPools.listAssignables(this.servicePool.id).subscribe((function(e){t.assignablesServices=e}))},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(""===this.userFilter)return this.users;var e=new Array;return this.users.forEach((function(n){n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase())&&e.push(n)})),e},t.prototype.filteredAssignables=function(){var t=this;if(""===this.assignablesServicesFilter)return this.assignablesServices;var e=new Array;return this.assignablesServices.forEach((function(n){n.text.toLocaleLowerCase().includes(t.assignablesServicesFilter.toLocaleLowerCase())&&e.push(n)})),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.rest.servicesPools.createFromAssignable(this.servicePool.id,this.userId,this.serviceId).subscribe((function(e){t.dialogRef.close(),t.onSave.emit(!0)})):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-assign-service-to-owner"]],decls:32,vars:8,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","selectionChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(vs(0,"h4",0),vs(1,"uds-translate"),nu(2,"Assign service to user manually"),gs(),gs(),vs(3,"mat-dialog-content"),vs(4,"div",1),vs(5,"mat-form-field"),vs(6,"mat-label"),vs(7,"uds-translate"),nu(8,"Service"),gs(),gs(),vs(9,"mat-select",2),Ss("ngModelChange",(function(t){return e.serviceId=t})),cs(10,UV,1,0,"uds-mat-select-search",3),cs(11,WV,2,2,"mat-option",4),gs(),gs(),vs(12,"mat-form-field"),vs(13,"mat-label"),vs(14,"uds-translate"),nu(15,"Authenticator"),gs(),gs(),vs(16,"mat-select",5),Ss("ngModelChange",(function(t){return e.authId=t}))("selectionChange",(function(t){return e.changeAuth(t)})),cs(17,qV,2,2,"mat-option",4),gs(),gs(),vs(18,"mat-form-field"),vs(19,"mat-label"),vs(20,"uds-translate"),nu(21,"User"),gs(),gs(),vs(22,"mat-select",2),Ss("ngModelChange",(function(t){return e.userId=t})),cs(23,YV,1,0,"uds-mat-select-search",3),cs(24,GV,2,2,"mat-option",4),gs(),gs(),gs(),gs(),vs(25,"mat-dialog-actions"),vs(26,"button",6),vs(27,"uds-translate"),nu(28,"Cancel"),gs(),gs(),vs(29,"button",7),Ss("click",(function(){return e.save()})),vs(30,"uds-translate"),nu(31,"Ok"),gs(),gs(),gs()),2&t&&(Xr(9),ps("ngModel",e.serviceId),Xr(1),ps("ngIf",e.assignablesServices.length>10),Xr(1),ps("ngForOf",e.filteredAssignables()),Xr(5),ps("ngModel",e.authId),Xr(1),ps("ngForOf",e.auths),Xr(5),ps("ngModel",e.userId),Xr(1),ps("ngIf",e.users.length>10),Xr(1),ps("ngForOf",e.filteredUsers()))},directives:[AS,HS,IS,iT,GO,xT,lD,gE,yd,vd,OS,BS,ES,QP,oS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function ZV(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Summary"),gs())}function $V(t,e){if(1&t&&ys(0,"uds-information",20),2&t){var n=Ts(2);ps("value",n.servicePool)("gui",n.gui)}}function XV(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Assigned services"),gs())}function QV(t,e){if(1&t){var n=ws();vs(0,"uds-table",21),Ss("customButtonAction",(function(t){return In(n),Ts(2).onCustomAssigned(t)}))("deleteAction",(function(t){return In(n),Ts(2).onDeleteAssigned(t)})),gs()}if(2&t){var i=Ts(2);ps("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function JV(t,e){if(1&t){var n=ws();vs(0,"uds-table",22),Ss("customButtonAction",(function(t){return In(n),Ts(2).onCustomAssigned(t)}))("newAction",(function(t){return In(n),Ts(2).onNewAssigned(t)}))("deleteAction",(function(t){return In(n),Ts(2).onDeleteAssigned(t)})),gs()}if(2&t){var i=Ts(2);ps("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function tB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Cache"),gs())}function eB(t,e){if(1&t){var n=ws();vs(0,"mat-tab"),cs(1,tB,2,0,"ng-template",9),vs(2,"div",10),vs(3,"uds-table",23),Ss("customButtonAction",(function(t){return In(n),Ts(2).onCustomCached(t)}))("deleteAction",(function(t){return In(n),Ts(2).onDeleteCache(t)})),gs(),gs(),gs()}if(2&t){var i=Ts(2);Xr(3),ps("rest",i.cache)("multiSelect",!0)("allowExport",!0)("onItem",i.processsCacheElement)("tableId","servicePools-d-cache"+i.servicePool.id)("customButtons",i.customButtonsCachedServices)("pageSize",i.api.config.admin.page_size)}}function nB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Groups"),gs())}function iB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Transports"),gs())}function rB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Publications"),gs())}function aB(t,e){if(1&t){var n=ws();vs(0,"mat-tab"),cs(1,rB,2,0,"ng-template",9),vs(2,"div",10),vs(3,"uds-table",24),Ss("customButtonAction",(function(t){return In(n),Ts(2).onCustomPublication(t)}))("newAction",(function(t){return In(n),Ts(2).onNewPublication(t)}))("rowSelected",(function(t){return In(n),Ts(2).onPublicationRowSelect(t)})),gs(),gs(),gs()}if(2&t){var i=Ts(2);Xr(3),ps("rest",i.publications)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-publications"+i.servicePool.id)("customButtons",i.customButtonsPublication)("pageSize",i.api.config.admin.page_size)}}function oB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Scheduled actions"),gs())}function sB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Access calendars"),gs())}function uB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Logs"),gs())}function lB(t,e){if(1&t){var n=ws();vs(0,"div",6),vs(1,"div",7),vs(2,"mat-tab-group",8),Ss("selectedIndexChange",(function(t){return In(n),Ts().selectedTab=t})),vs(3,"mat-tab"),cs(4,ZV,2,0,"ng-template",9),vs(5,"div",10),cs(6,$V,1,2,"uds-information",11),gs(),gs(),vs(7,"mat-tab"),cs(8,XV,2,0,"ng-template",9),vs(9,"div",10),cs(10,QV,1,7,"uds-table",12),cs(11,JV,1,7,"ng-template",null,13,Gl),gs(),gs(),cs(13,eB,4,7,"mat-tab",14),vs(14,"mat-tab"),cs(15,nB,2,0,"ng-template",9),vs(16,"div",10),vs(17,"uds-table",15),Ss("newAction",(function(t){return In(n),Ts().onNewGroup(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteGroup(t)})),gs(),gs(),gs(),vs(18,"mat-tab"),cs(19,iB,2,0,"ng-template",9),vs(20,"div",10),vs(21,"uds-table",16),Ss("newAction",(function(t){return In(n),Ts().onNewTransport(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteTransport(t)})),gs(),gs(),gs(),cs(22,aB,4,6,"mat-tab",14),vs(23,"mat-tab"),cs(24,oB,2,0,"ng-template",9),vs(25,"div",10),vs(26,"uds-table",17),Ss("customButtonAction",(function(t){return In(n),Ts().onCustomScheduleAction(t)}))("newAction",(function(t){return In(n),Ts().onNewScheduledAction(t)}))("editAction",(function(t){return In(n),Ts().onEditScheduledAction(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteScheduledAction(t)})),gs(),gs(),gs(),vs(27,"mat-tab"),cs(28,sB,2,0,"ng-template",9),vs(29,"div",10),vs(30,"uds-table",18),Ss("newAction",(function(t){return In(n),Ts().onNewAccessCalendar(t)}))("editAction",(function(t){return In(n),Ts().onEditAccessCalendar(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteAccessCalendar(t)}))("loaded",(function(t){return In(n),Ts().onAccessCalendarLoad(t)})),gs(),gs(),gs(),vs(31,"mat-tab"),cs(32,uB,2,0,"ng-template",9),vs(33,"div",10),ys(34,"uds-logs-table",19),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=hs(12),r=Ts();Xr(2),ps("selectedIndex",r.selectedTab)("@.disabled",!0),Xr(4),ps("ngIf",r.servicePool&&r.gui),Xr(4),ps("ngIf",!1===r.servicePool.info.must_assign_manually)("ngIfElse",i),Xr(3),ps("ngIf",r.cache),Xr(4),ps("rest",r.groups)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsGroups)("tableId","servicePools-d-groups"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Xr(4),ps("rest",r.transports)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsTransports)("tableId","servicePools-d-transports"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Xr(1),ps("ngIf",r.publications),Xr(4),ps("rest",r.scheduledActions)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-actions"+r.servicePool.id)("customButtons",r.customButtonsScheduledAction)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Xr(4),ps("rest",r.accessCalendars)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonAccessCalendars)("tableId","servicePools-d-access"+r.servicePool.id)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Xr(4),ps("rest",r.rest.servicesPools)("itemId",r.servicePool.id)("tableId","servicePools-d-log"+r.servicePool.id)("pageSize",r.api.config.admin.page_size)}}var cB=function(t){return["/pools","service-pools",t]},hB='event'+django.gettext("Logs")+"",dB='schedule'+django.gettext("Launch now")+"",fB='perm_identity'+django.gettext("Change owner")+"",pB='perm_identity'+django.gettext("Assign service")+"",mB='cancel'+django.gettext("Cancel")+"",vB='event'+django.gettext("Changelog")+"",gB=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtonsScheduledAction=[{id:"launch-action",html:dB,type:gI.SINGLE_SELECT},AI.getGotoButton(SI,"calendarId")],this.customButtonAccessCalendars=[AI.getGotoButton(SI,"calendarId")],this.customButtonsAssignedServices=[{id:"change-owner",html:fB,type:gI.SINGLE_SELECT},{id:"log",html:hB,type:gI.SINGLE_SELECT},AI.getGotoButton(kI,"owner_info.auth_id","owner_info.user_id")],this.customButtonsCachedServices=[{id:"log",html:hB,type:gI.SINGLE_SELECT}],this.customButtonsPublication=[{id:"cancel-publication",html:mB,type:gI.SINGLE_SELECT},{id:"changelog",html:vB,type:gI.ALWAYS}],this.customButtonsGroups=[AI.getGotoButton(wI,"auth_id","id")],this.customButtonsTransports=[AI.getGotoButton(CI,"id")],this.servicePool=null,this.gui=null,this.selectedTab=1}return t.cleanInvalidSelections=function(t){return t.table.selection.selected.filter((function(t){return["E","R","M","S","C"].includes(t.state)})).forEach((function(e){return t.table.selection.deselect(e)})),t.table.selection.isEmpty()},t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("pool");this.assignedServices=this.rest.servicesPools.detail(e,"services"),this.groups=this.rest.servicesPools.detail(e,"groups"),this.transports=this.rest.servicesPools.detail(e,"transports"),this.scheduledActions=this.rest.servicesPools.detail(e,"actions"),this.accessCalendars=this.rest.servicesPools.detail(e,"access"),this.rest.servicesPools.get(e).subscribe((function(n){t.servicePool=n,t.cache=t.servicePool.info.uses_cache?t.rest.servicesPools.detail(e,"cache"):null,t.publications=t.servicePool.info.needs_publication?t.rest.servicesPools.detail(e,"publications"):null,t.servicePool.info.can_list_assignables&&t.customButtonsAssignedServices.push({id:"assign-service",html:pB,type:gI.ALWAYS}),t.rest.servicesPools.gui().subscribe((function(e){t.gui=e.filter((function(e){return!(!1===t.servicePool.info.uses_cache&&["initial_srvs","cache_l1_srvs","cache_l2_srvs","max_srvs"].includes(e.name)||!1===t.servicePool.info.uses_cache_l2&&"cache_l2_srvs"===e.name||!1===t.servicePool.info.needs_manager&&"osmanager_id"===e.name)}))}))}))},t.prototype.onNewAssigned=function(t){},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;sV.launch(this.api,e,this.assignedServices).subscribe((function(e){return t.table.overview()}))}else"log"===t.param.id?HV.launch(this.api,e,this.assignedServices):"assign-service"===t.param.id&&KV.launch(this.api,this.servicePool).subscribe((function(e){return t.table.overview()}))},t.prototype.onCustomCached=function(t){"log"===t.param.id&&HV.launch(this.api,t.table.selection.selected[0],this.cache)},t.prototype.processsAssignedElement=function(t){t.in_use=this.api.yesno(t.in_use),t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onDeleteAssigned=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete assigned service"))},t.prototype.onDeleteCache=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete cached service"))},t.prototype.processsCacheElement=function(t){t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onNewGroup=function(t){_V.launch(this.api,this.servicePool,this.groups).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewTransport=function(t){CV.launch(this.api,this.servicePool).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteTransport=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned transport"))},t.prototype.onNewPublication=function(t){xV.launch(this.api,this.servicePool).subscribe((function(e){t.table.overview()}))},t.prototype.onPublicationRowSelect=function(t){1===t.table.selection.selected.length&&(this.customButtonsPublication[0].disabled=!["P","W","L","K"].includes(t.table.selection.selected[0].state))},t.prototype.onCustomPublication=function(t){var e=this;"cancel-publication"===t.param.id?this.api.gui.yesno(django.gettext("Publication"),django.gettext("Cancel publication?"),!0).subscribe((function(n){n&&e.publications.invoke(t.table.selection.selected[0].id+"/cancel").subscribe((function(n){e.api.gui.snackbar.open(django.gettext("Publication canceled"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()}))})):"changelog"===t.param.id&&SV.launch(this.api,this.servicePool)},t.prototype.onNewScheduledAction=function(t){zV.launch(this.api,this.servicePool).subscribe((function(e){return t.table.overview()}))},t.prototype.onEditScheduledAction=function(t){zV.launch(this.api,this.servicePool,t.table.selection.selected[0]).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteScheduledAction=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete scheduled action"))},t.prototype.onCustomScheduleAction=function(t){var e=this;this.api.gui.yesno(django.gettext("Execute scheduled action"),django.gettext("Execute scheduled action right now?")).subscribe((function(n){n&&e.scheduledActions.invoke(t.table.selection.selected[0].id+"/execute").subscribe((function(){e.api.gui.snackbar.open(django.gettext("Scheduled action executed"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()}))}))},t.prototype.onNewAccessCalendar=function(t){pV.launch(this.api,this.servicePool,this.accessCalendars).subscribe((function(e){return t.table.overview()}))},t.prototype.onEditAccessCalendar=function(t){pV.launch(this.api,this.servicePool,this.accessCalendars,t.table.selection.selected[0]).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteAccessCalendar=function(t){-1!==t.table.selection.selected[0].id?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.servicesPools.getFallbackAccess(this.servicePool.id).subscribe((function(n){var i=t.table.dataSource.data.filter((function(t){return!0}));i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i}))},t.prototype.processsCalendarOrScheduledElement=function(t){t.name=t.calendar,t.atStart=this.api.yesno(t.atStart)},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-service-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction",4,"ngIf","ngIfElse"],["manually_assigned",""],[4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","transports",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","customButtons","onItem","pageSize","customButtonAction","newAction","editAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","customButtons","tableId","onItem","pageSize","newAction","editAction","deleteAction","loaded"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","newAction","deleteAction"],["icon","cached",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","publications",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","newAction","rowSelected"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"a",2),vs(3,"i",3),nu(4,"arrow_back"),gs(),gs(),nu(5," \xa0"),ys(6,"img",4),nu(7),gs(),cs(8,lB,35,37,"div",5),gs()),2&t&&(Xr(2),ps("routerLink",pl(4,cB,e.servicePool?e.servicePool.id:"")),Xr(4),ps("src",e.api.staticURL("admin/img/icons/pools.png"),Tr),Xr(1),ru(" \xa0",null==e.servicePool?null:e.servicePool.name," "),Xr(1),ps("ngIf",null!==e.servicePool))},directives:[zg,yd,TA,kA,gA,WF,rL,HS,cL],styles:[".mat-column-state{max-width:10rem;justify-content:center} .mat-column-cache_level, .mat-column-in_use, .mat-column-priority, .mat-column-revision{max-width:7rem;justify-content:center} .mat-column-access, .mat-column-creation_date, .mat-column-publish_date, .mat-column-state_date, .mat-column-trans_type{max-width:9rem} .mat-column-owner{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word}"]}),t}(),yB=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New meta pool"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit meta pool"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete meta pool"))},t.prototype.onDetail=function(t){this.api.navigation.gotoMetapoolDetail(t.param.id)},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.name=this.api.safeString(this.api.gui.icon(t.thumb)+t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("metapool"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-meta-pools"]],decls:2,vars:6,consts:[["icon","metas",3,"rest","multiSelect","allowExport","onItem","hasPermissions","pageSize","detailAction","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"div"),vs(1,"uds-table",0),Ss("detailAction",(function(t){return e.onDetail(t)}))("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs(),gs()),2&t&&(Xr(1),ps("rest",e.rest.metaPools)("multiSelect",!0)("allowExport",!0)("onItem",e.processElement)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[WF],styles:[".mat-column-pool_group_name, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center}"]}),t}();function _B(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New member pool"),gs())}function bB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Edit member pool"),gs())}function kB(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",11),Ss("changed",(function(t){return In(n),Ts().servicePoolsFilter=t})),gs()}}function wB(t,e){if(1&t&&(vs(0,"mat-option",12),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.name," ")}}var CB=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.servicePools=[],this.servicePoolsFilter="",this.model=i.model,this.memberPool={id:void 0,priority:0,pool_id:"",enabled:!0},i.memberPool&&(this.memberPool.id=i.memberPool.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{memberPool:i,model:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.servicesPools.summary().subscribe((function(e){return t.servicePools=e})),this.memberPool.id&&this.model.get(this.memberPool.id).subscribe((function(e){return t.memberPool=e}))},t.prototype.filtered=function(t,e){return""===e?t:t.filter((function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}))},t.prototype.save=function(){var t=this;this.memberPool.pool_id?this.model.save(this.memberPool).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)})):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid service pool"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-meta-pools-service-pools"]],decls:30,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"mat-form-field-infix"],[1,"label-enabled"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(vs(0,"h4",0),cs(1,_B,2,0,"uds-translate",1),cs(2,bB,2,0,"uds-translate",1),gs(),vs(3,"mat-dialog-content"),vs(4,"div",2),vs(5,"mat-form-field"),vs(6,"mat-label"),vs(7,"uds-translate"),nu(8,"Priority"),gs(),gs(),vs(9,"input",3),Ss("ngModelChange",(function(t){return e.memberPool.priority=t})),gs(),gs(),vs(10,"mat-form-field"),vs(11,"mat-label"),vs(12,"uds-translate"),nu(13,"Service pool"),gs(),gs(),vs(14,"mat-select",4),Ss("ngModelChange",(function(t){return e.memberPool.pool_id=t})),cs(15,kB,1,0,"uds-mat-select-search",5),cs(16,wB,2,2,"mat-option",6),gs(),gs(),vs(17,"div",7),vs(18,"span",8),vs(19,"uds-translate"),nu(20,"Enabled?"),gs(),gs(),vs(21,"mat-slide-toggle",4),Ss("ngModelChange",(function(t){return e.memberPool.enabled=t})),nu(22),gs(),gs(),gs(),gs(),vs(23,"mat-dialog-actions"),vs(24,"button",9),vs(25,"uds-translate"),nu(26,"Cancel"),gs(),gs(),vs(27,"button",10),Ss("click",(function(){return e.save()})),vs(28,"uds-translate"),nu(29,"Ok"),gs(),gs(),gs()),2&t&&(Xr(1),ps("ngIf",!(null!=e.memberPool&&e.memberPool.id)),Xr(1),ps("ngIf",null==e.memberPool?null:e.memberPool.id),Xr(7),ps("ngModel",e.memberPool.priority),Xr(5),ps("ngModel",e.memberPool.pool_id),Xr(1),ps("ngIf",e.servicePools.length>10),Xr(1),ps("ngForOf",e.filtered(e.servicePools,e.servicePoolsFilter)),Xr(5),ps("ngModel",e.memberPool.enabled),Xr(1),ru(" ",e.api.yesno(e.memberPool.enabled)," "))},directives:[AS,yd,IS,iT,GO,HS,YP,CD,iD,lD,gE,xT,vd,rN,OS,BS,ES,QP,oS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-enabled[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function xB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Summary"),gs())}function SB(t,e){if(1&t&&ys(0,"uds-information",17),2&t){var n=Ts(2);ps("value",n.metaPool)("gui",n.gui)}}function DB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Service pools"),gs())}function EB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Assigned services"),gs())}function AB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Groups"),gs())}function IB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Access calendars"),gs())}function OB(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Logs"),gs())}function TB(t,e){if(1&t){var n=ws();vs(0,"div",6),vs(1,"div",7),vs(2,"mat-tab-group",8),Ss("selectedIndexChange",(function(t){return In(n),Ts().selectedTab=t})),vs(3,"mat-tab"),cs(4,xB,2,0,"ng-template",9),vs(5,"div",10),cs(6,SB,1,2,"uds-information",11),gs(),gs(),vs(7,"mat-tab"),cs(8,DB,2,0,"ng-template",9),vs(9,"div",10),vs(10,"uds-table",12),Ss("newAction",(function(t){return In(n),Ts().onNewMemberPool(t)}))("editAction",(function(t){return In(n),Ts().onEditMemberPool(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteMemberPool(t)})),gs(),gs(),gs(),vs(11,"mat-tab"),cs(12,EB,2,0,"ng-template",9),vs(13,"div",10),vs(14,"uds-table",13),Ss("customButtonAction",(function(t){return In(n),Ts().onCustomAssigned(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteAssigned(t)})),gs(),gs(),gs(),vs(15,"mat-tab"),cs(16,AB,2,0,"ng-template",9),vs(17,"div",10),vs(18,"uds-table",14),Ss("newAction",(function(t){return In(n),Ts().onNewGroup(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteGroup(t)})),gs(),gs(),gs(),vs(19,"mat-tab"),cs(20,IB,2,0,"ng-template",9),vs(21,"div",10),vs(22,"uds-table",15),Ss("newAction",(function(t){return In(n),Ts().onNewAccessCalendar(t)}))("editAction",(function(t){return In(n),Ts().onEditAccessCalendar(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteAccessCalendar(t)}))("loaded",(function(t){return In(n),Ts().onAccessCalendarLoad(t)})),gs(),gs(),gs(),vs(23,"mat-tab"),cs(24,OB,2,0,"ng-template",9),vs(25,"div",10),ys(26,"uds-logs-table",16),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ts();Xr(2),ps("selectedIndex",i.selectedTab)("@.disabled",!0),Xr(4),ps("ngIf",i.metaPool&&i.gui),Xr(4),ps("rest",i.memberPools)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("customButtons",i.customButtons)("tableId","metaPools-d-members"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Xr(4),ps("rest",i.memberUserServices)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-services"+i.metaPool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size),Xr(4),ps("rest",i.groups)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-groups"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Xr(4),ps("rest",i.accessCalendars)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-access"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Xr(4),ps("rest",i.rest.metaPools)("itemId",i.metaPool.id)("tableId","metaPools-d-log"+i.metaPool.id)("pageSize",i.api.config.admin.page_size)}}var RB=function(t){return["/pools","meta-pools",t]},PB=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[AI.getGotoButton(bI,"pool_id")],this.customButtonsAssignedServices=[{id:"change-owner",html:fB,type:gI.SINGLE_SELECT},{id:"log",html:hB,type:gI.SINGLE_SELECT},AI.getGotoButton(kI,"owner_info.auth_id","owner_info.user_id")],this.metaPool=null,this.gui=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("metapool");this.rest.metaPools.get(e).subscribe((function(n){t.metaPool=n,t.rest.metaPools.gui().subscribe((function(e){t.gui=e})),t.memberPools=t.rest.metaPools.detail(e,"pools"),t.memberUserServices=t.rest.metaPools.detail(e,"services"),t.groups=t.rest.metaPools.detail(e,"groups"),t.accessCalendars=t.rest.metaPools.detail(e,"access")}))},t.prototype.onNewMemberPool=function(t){CB.launch(this.api,this.memberPools).subscribe((function(){return t.table.overview()}))},t.prototype.onEditMemberPool=function(t){CB.launch(this.api,this.memberPools,t.table.selection.selected[0]).subscribe((function(){return t.table.overview()}))},t.prototype.onDeleteMemberPool=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove member pool"))},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;sV.launch(this.api,e,this.memberUserServices).subscribe((function(e){return t.table.overview()}))}else"log"===t.param.id&&HV.launch(this.api,e,this.memberUserServices)},t.prototype.onDeleteAssigned=function(t){gB.cleanInvalidSelections(t)||this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned service"))},t.prototype.onNewGroup=function(t){_V.launch(this.api,this.metaPool.id,this.groups).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewAccessCalendar=function(t){pV.launch(this.api,this.metaPool,this.accessCalendars).subscribe((function(e){return t.table.overview()}))},t.prototype.onEditAccessCalendar=function(t){pV.launch(this.api,this.metaPool,this.accessCalendars,t.table.selection.selected[0]).subscribe((function(e){return t.table.overview()}))},t.prototype.onDeleteAccessCalendar=function(t){t.table.selection.selected[0].priority>0?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.metaPools.getFallbackAccess(this.metaPool.id).subscribe((function(n){var i=t.table.dataSource.data.filter((function(t){return!0}));i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i}))},t.prototype.processElement=function(t){t.enabled=this.api.yesno(t.enabled)},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-meta-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","customButtons","tableId","pageSize","newAction","editAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","groups",3,"rest","multiSelect","allowExport","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","pageSize","newAction","editAction","deleteAction","loaded"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"a",2),vs(3,"i",3),nu(4,"arrow_back"),gs(),gs(),nu(5," \xa0"),ys(6,"img",4),nu(7),gs(),cs(8,TB,27,30,"div",5),gs()),2&t&&(Xr(2),ps("routerLink",pl(4,RB,e.metaPool?e.metaPool.id:"")),Xr(4),ps("src",e.api.staticURL("admin/img/icons/metas.png"),Tr),Xr(1),ru(" ",null==e.metaPool?null:e.metaPool.name," "),Xr(1),ps("ngIf",e.metaPool))},directives:[zg,yd,TA,kA,gA,WF,rL,HS,cL],styles:[".mat-column-enabled, .mat-column-priority{max-width:8rem;justify-content:center}"]}),t}(),MB=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New pool group"),!1).subscribe((function(e){return t.table.overview()}))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit pool group"),!1).subscribe((function(e){return t.table.overview()}))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete pool group"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("poolgroup"))},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-pool-groups"]],decls:1,vars:5,consts:[["icon","spool-group",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs()),2&t&&ps("rest",e.rest.servicesPoolGroups)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[WF],styles:[".mat-column-priority, .mat-column-thumb{max-width:7rem;justify-content:center}"]}),t}(),FB=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New calendar"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit calendar"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar"))},t.prototype.onDetail=function(t){this.api.navigation.gotoCalendarDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("calendar"))},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-calendars"]],decls:1,vars:5,consts:[["icon","calendars",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(vs(0,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("detailAction",(function(t){return e.onDetail(t)}))("loaded",(function(t){return e.onLoad(t)})),gs()),2&t&&ps("rest",e.rest.calendars)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size)},directives:[WF],styles:[""]}),t}(),LB=["mat-calendar-body",""];function NB(t,e){if(1&t&&(vs(0,"tr",2),vs(1,"td",3),nu(2),gs(),gs()),2&t){var n=Ts();Xr(1),Ws("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),us("colspan",n.numCols),Xr(1),ru(" ",n.label," ")}}function VB(t,e){if(1&t&&(vs(0,"td",7),nu(1),gs()),2&t){var n=Ts(2);Ws("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),us("colspan",n._firstRowOffset),Xr(1),ru(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function BB(t,e){if(1&t){var n=ws();vs(0,"td",8),Ss("click",(function(t){In(n);var i=e.$implicit;return Ts(2)._cellClicked(i,t)})),vs(1,"div",9),nu(2),gs(),ys(3,"div",10),gs()}if(2&t){var i=e.$implicit,r=e.index,a=Ts().index,o=Ts();Ws("width",o._cellWidth)("padding-top",o._cellPadding)("padding-bottom",o._cellPadding),qs("mat-calendar-body-disabled",!i.enabled)("mat-calendar-body-active",o._isActiveCell(a,r))("mat-calendar-body-range-start",o._isRangeStart(i.compareValue))("mat-calendar-body-range-end",o._isRangeEnd(i.compareValue))("mat-calendar-body-in-range",o._isInRange(i.compareValue))("mat-calendar-body-comparison-bridge-start",o._isComparisonBridgeStart(i.compareValue,a,r))("mat-calendar-body-comparison-bridge-end",o._isComparisonBridgeEnd(i.compareValue,a,r))("mat-calendar-body-comparison-start",o._isComparisonStart(i.compareValue))("mat-calendar-body-comparison-end",o._isComparisonEnd(i.compareValue))("mat-calendar-body-in-comparison-range",o._isInComparisonRange(i.compareValue))("mat-calendar-body-preview-start",o._isPreviewStart(i.compareValue))("mat-calendar-body-preview-end",o._isPreviewEnd(i.compareValue))("mat-calendar-body-in-preview",o._isInPreview(i.compareValue)),ps("ngClass",i.cssClasses)("tabindex",o._isActiveCell(a,r)?0:-1),us("data-mat-row",a)("data-mat-col",r)("aria-label",i.ariaLabel)("aria-disabled",!i.enabled||null)("aria-selected",o._isSelected(i.compareValue)),Xr(1),qs("mat-calendar-body-selected",o._isSelected(i.compareValue))("mat-calendar-body-comparison-identical",o._isComparisonIdentical(i.compareValue))("mat-calendar-body-today",o.todayValue===i.compareValue),Xr(1),ru(" ",i.displayValue," ")}}function jB(t,e){if(1&t&&(vs(0,"tr",4),cs(1,VB,2,6,"td",5),cs(2,BB,4,46,"td",6),gs()),2&t){var n=e.$implicit,i=e.index,r=Ts();Xr(1),ps("ngIf",0===i&&r._firstRowOffset),Xr(1),ps("ngForOf",n)}}function zB(t,e){if(1&t&&(vs(0,"th",5),nu(1),gs()),2&t){var n=e.$implicit;us("aria-label",n.long),Xr(1),iu(n.narrow)}}var HB=["*"];function UB(t,e){}function WB(t,e){if(1&t){var n=ws();vs(0,"mat-month-view",5),Ss("activeDateChange",(function(t){return In(n),Ts().activeDate=t}))("_userSelection",(function(t){return In(n),Ts()._dateSelected(t)})),gs()}if(2&t){var i=Ts();ps("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)("comparisonStart",i.comparisonStart)("comparisonEnd",i.comparisonEnd)}}function qB(t,e){if(1&t){var n=ws();vs(0,"mat-year-view",6),Ss("activeDateChange",(function(t){return In(n),Ts().activeDate=t}))("monthSelected",(function(t){return In(n),Ts()._monthSelectedInYearView(t)}))("selectedChange",(function(t){return In(n),Ts()._goToDateInView(t,"month")})),gs()}if(2&t){var i=Ts();ps("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function YB(t,e){if(1&t){var n=ws();vs(0,"mat-multi-year-view",7),Ss("activeDateChange",(function(t){return In(n),Ts().activeDate=t}))("yearSelected",(function(t){return In(n),Ts()._yearSelectedInMultiYearView(t)}))("selectedChange",(function(t){return In(n),Ts()._goToDateInView(t,"year")})),gs()}if(2&t){var i=Ts();ps("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}var GB=["button"];function KB(t,e){1&t&&(ni(),vs(0,"svg",3),ys(1,"path",4),gs())}var ZB=[[["","matDatepickerToggleIcon",""]]],$B=["[matDatepickerToggleIcon]"],XB=[[["input","matStartDate",""]],[["input","matEndDate",""]]],QB=["input[matStartDate]","input[matEndDate]"],JB=function(){var t=function(){function t(){y(this,t),this.changes=new U,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return b(t,[{key:"formatYearRange",value:function(t,e){return"".concat(t," \u2013 ").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=It({factory:function(){return new t},token:t,providedIn:"root"}),t}(),tj=function t(e,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6?arguments[6]:void 0;y(this,t),this.value=e,this.displayValue=n,this.ariaLabel=i,this.enabled=r,this.cssClasses=a,this.compareValue=o,this.rawValue=s},ej=function(){var t=function(){function t(e,n){var i=this;y(this,t),this._elementRef=e,this._ngZone=n,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new xl,this.previewChange=new xl,this._enterHandler=function(t){if(i._skipNextFocus&&"focus"===t.type)i._skipNextFocus=!1;else if(t.target&&i.isRange){var e=i._getCellFromElement(t.target);e&&i._ngZone.run((function(){return i.previewChange.emit({value:e.enabled?e:null,event:t})}))}},this._leaveHandler=function(t){null!==i.previewEnd&&i.isRange&&t.target&&nj(t.target)&&i._ngZone.run((function(){return i.previewChange.emit({value:null,event:t})}))},n.runOutsideAngular((function(){var t=e.nativeElement;t.addEventListener("mouseenter",i._enterHandler,!0),t.addEventListener("focus",i._enterHandler,!0),t.addEventListener("mouseleave",i._leaveHandler,!0),t.addEventListener("blur",i._leaveHandler,!0)}))}return b(t,[{key:"_cellClicked",value:function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}},{key:"_isSelected",value:function(t){return this.startValue===t||this.endValue===t}},{key:"ngOnChanges",value:function(t){var e=t.numCols,n=this.rows,i=this.numCols;(t.rows||e)&&(this._firstRowOffset=n&&n.length&&n[0].length?i-n[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding="".concat(50*this.cellAspectRatio/i,"%")),!e&&this._cellWidth||(this._cellWidth="".concat(100/i,"%"))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}},{key:"_isActiveCell",value:function(t,e){var n=t*this.numCols+e;return t&&(n-=this._firstRowOffset),n==this.activeCell}},{key:"_focusActiveCell",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._ngZone.runOutsideAngular((function(){t._ngZone.onStable.pipe(Gp(1)).subscribe((function(){var n=t._elementRef.nativeElement.querySelector(".mat-calendar-body-active");n&&(e||(t._skipNextFocus=!0),n.focus())}))}))}},{key:"_isRangeStart",value:function(t){return ij(t,this.startValue,this.endValue)}},{key:"_isRangeEnd",value:function(t){return rj(t,this.startValue,this.endValue)}},{key:"_isInRange",value:function(t){return aj(t,this.startValue,this.endValue,this.isRange)}},{key:"_isComparisonStart",value:function(t){return ij(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isComparisonBridgeStart",value:function(t,e,n){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var i=this.rows[e][n-1];if(!i){var r=this.rows[e-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}},{key:"_isComparisonBridgeEnd",value:function(t,e,n){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var i=this.rows[e][n+1];if(!i){var r=this.rows[e+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}},{key:"_isComparisonEnd",value:function(t){return rj(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isInComparisonRange",value:function(t){return aj(t,this.comparisonStart,this.comparisonEnd,this.isRange)}},{key:"_isComparisonIdentical",value:function(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}},{key:"_isPreviewStart",value:function(t){return ij(t,this.previewStart,this.previewEnd)}},{key:"_isPreviewEnd",value:function(t){return rj(t,this.previewStart,this.previewEnd)}},{key:"_isInPreview",value:function(t){return aj(t,this.previewStart,this.previewEnd,this.isRange)}},{key:"_getCellFromElement",value:function(t){var e;if(nj(t)?e=t:nj(t.parentNode)&&(e=t.parentNode),e){var n=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(n&&i)return this.rows[parseInt(n)][parseInt(i)]}return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(mc))},t.\u0275cmp=Fe({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[nn],attrs:LB,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(cs(0,NB,3,6,"tr",0),cs(1,jB,3,2,"tr",1)),2&t&&(ps("ngIf",e._firstRowOffset.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t}();function nj(t){return"TD"===t.nodeName}function ij(t,e,n){return null!==n&&e!==n&&t=e&&t===n}function aj(t,e,n,i){return i&&null!==e&&null!==n&&e!==n&&t>=e&&t<=n}var oj=function t(e,n){y(this,t),this.start=e,this.end=n},sj=function(){var t=function(){function t(e,n){y(this,t),this.selection=e,this._adapter=n,this._selectionChanged=new U,this.selectionChanged=this._selectionChanged,this.selection=e}return b(t,[{key:"updateSelection",value:function(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}},{key:"ngOnDestroy",value:function(){this._selectionChanged.complete()}},{key:"_isValidDateInstance",value:function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(void 0),ds(xx))},t.\u0275dir=ze({type:t}),t}(),uj=function(){var t=function(t){f(n,t);var e=g(n);function n(t){return y(this,n),e.call(this,null,t)}return b(n,[{key:"add",value:function(t){r(i(n.prototype),"updateSelection",this).call(this,t,this)}},{key:"isValid",value:function(){return null!=this.selection&&this._isValidDateInstance(this.selection)}},{key:"isComplete",value:function(){return null!=this.selection}}]),n}(sj);return t.\u0275fac=function(e){return new(e||t)(pe(xx))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),lj=function(){var t=function(t){f(n,t);var e=g(n);function n(t){return y(this,n),e.call(this,new oj(null,null),t)}return b(n,[{key:"add",value:function(t){var e=this.selection,a=e.start,o=e.end;null==a?a=t:null==o?o=t:(a=t,o=null),r(i(n.prototype),"updateSelection",this).call(this,new oj(a,o),this)}},{key:"isValid",value:function(){var t=this.selection,e=t.start,n=t.end;return null==e&&null==n||(null!=e&&null!=n?this._isValidDateInstance(e)&&this._isValidDateInstance(n)&&this._adapter.compareDate(e,n)<=0:(null==e||this._isValidDateInstance(e))&&(null==n||this._isValidDateInstance(n)))}},{key:"isComplete",value:function(){return null!=this.selection.start&&null!=this.selection.end}}]),n}(sj);return t.\u0275fac=function(e){return new(e||t)(pe(xx))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),cj={provide:sj,deps:[[new Ct,new St,sj],xx],useFactory:function(t,e){return t||new uj(e)}},hj={provide:sj,deps:[[new Ct,new St,sj],xx],useFactory:function(t,e){return t||new lj(e)}},dj=new re("MAT_DATE_RANGE_SELECTION_STRATEGY"),fj=function(){var t=function(){function t(e){y(this,t),this._dateAdapter=e}return b(t,[{key:"selectionFinished",value:function(t,e){var n=e.start,i=e.end;return null==n?n=t:null==i&&t&&this._dateAdapter.compareDate(t,n)>=0?i=t:(n=t,i=null),new oj(n,i)}},{key:"createPreview",value:function(t,e){var n=null,i=null;return e.start&&!e.end&&t&&(n=e.start,i=t),new oj(n,i)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(pe(xx))},t.\u0275prov=It({token:t,factory:t.\u0275fac}),t}(),pj={provide:dj,deps:[[new Ct,new St,dj],xx],useFactory:function(t,e){return t||new fj(e)}},mj=function(){var t=function(){function t(e,n,i,r,a){y(this,t),this._changeDetectorRef=e,this._dateFormats=n,this._dateAdapter=i,this._dir=r,this._rangeStrategy=a,this._rerenderSubscription=D.EMPTY,this.selectedChange=new xl,this._userSelection=new xl,this.activeDateChange=new xl,this._activeDate=this._dateAdapter.today()}return b(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Xp(null)).subscribe((function(){return t._init()}))}},{key:"ngOnChanges",value:function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_dateSelected",value:function(t){var e,n,i=t.value,r=this._dateAdapter.getYear(this.activeDate),a=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.createDate(r,a,i);this._selected instanceof oj?(e=this._getDateInCurrentMonth(this._selected.start),n=this._getDateInCurrentMonth(this._selected.end)):e=n=this._getDateInCurrentMonth(this._selected),e===i&&n===i||this.selectedChange.emit(o),this._userSelection.emit({value:o,event:t.event})}},{key:"_handleCalendarBodyKeydown",value:function(t){var e=this._activeDate,n=this._isRtl();switch(t.keyCode){case B_:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case z_:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case j_:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case H_:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case V_:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case N_:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case M_:case L_:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case F_:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}},{key:"_init",value:function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(t){this._matCalendarBody._focusActiveCell(t)}},{key:"_previewChanged",value:function(t){var e=t.value;if(this._rangeStrategy){var n=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(n.start),this._previewEnd=this._getCellCompareValue(n.end),this._changeDetectorRef.detectChanges()}}},{key:"_initWeekdays",value:function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),n=this._dateAdapter.getDayOfWeekNames("long").map((function(t,n){return{long:t,narrow:e[n]}}));this._weekdays=n.slice(t).concat(n.slice(0,t))}},{key:"_createWeekCells",value:function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,i=this._firstWeekOffset;n=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}},{key:"_getDateInCurrentMonth",value:function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}},{key:"_hasSameMonthAndYear",value:function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}},{key:"_getCellCompareValue",value:function(t){if(t){var e=this._dateAdapter.getYear(t),n=this._dateAdapter.getMonth(t),i=this._dateAdapter.getDate(t);return new Date(e,n,i).getTime()}return null}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setRanges",value:function(t){t instanceof oj?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}},{key:"activeDate",get:function(){return this._activeDate},set:function(t){var e=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t instanceof oj?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}},{key:"minDate",get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"maxDate",get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Eo),ds(Sx,8),ds(xx,8),ds(s_,8),ds(dj,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var n;1&t&&Vl(ej,!0),2&t&&Ll(n=Ul())&&(e._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[nn],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(vs(0,"table",0),vs(1,"thead",1),vs(2,"tr"),cs(3,zB,2,2,"th",2),gs(),vs(4,"tr"),ys(5,"th",3),gs(),gs(),vs(6,"tbody",4),Ss("selectedValueChange",(function(t){return e._dateSelected(t)}))("previewChange",(function(t){return e._previewChanged(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),gs(),gs()),2&t&&(Xr(3),ps("ngForOf",e._weekdays),Xr(3),ps("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[vd,ej],encapsulation:2,changeDetection:0}),t}(),vj=24,gj=function(){var t=function(){function t(e,n,i){y(this,t),this._changeDetectorRef=e,this._dateAdapter=n,this._dir=i,this._rerenderSubscription=D.EMPTY,this.selectedChange=new xl,this.yearSelected=new xl,this.activeDateChange=new xl,this._activeDate=this._dateAdapter.today()}return b(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Xp(null)).subscribe((function(){return t._init()}))}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_init",value:function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-_j(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var n=0,i=[];nthis._dateAdapter.getYear(this.maxDate)||this.minDate&&tn||t===n&&e>i}return!1}},{key:"_isYearAndMonthBeforeMinDate",value:function(t,e){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return t enter",pk("120ms cubic-bezier(0, 0, 0.2, 1)",gk({opacity:1,transform:"scale(1, 1)"}))),bk("* => void",pk("100ms linear",gk({opacity:0})))]),fadeInCalendar:fk("fadeInCalendar",[yk("void",gk({opacity:0})),yk("enter",gk({opacity:1})),bk("void => *",pk("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},Sj=0,Dj=new re("mat-datepicker-scroll-strategy"),Ej={provide:Dj,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},Aj=gx((function t(e){y(this,t),this._elementRef=e})),Ij=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o){var s;return y(this,n),(s=e.call(this,t))._changeDetectorRef=i,s._model=r,s._dateAdapter=a,s._rangeSelectionStrategy=o,s._subscriptions=new D,s._animationState="enter",s._animationDone=new U,s}return b(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe((function(){t._changeDetectorRef.markForCheck()}))),this._calendar.focusActiveCell()}},{key:"ngOnDestroy",value:function(){this._subscriptions.unsubscribe(),this._animationDone.complete()}},{key:"_handleUserSelection",value:function(t){if(this._model&&this._dateAdapter){var e=this._model.selection,n=t.value,i=e instanceof oj;if(i&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(n,e,t.event);this._model.updateSelection(r,this)}else!n||!i&&this._dateAdapter.sameDate(n,e)||this._model.add(n)}this._model&&!this._model.isComplete()||this.datepicker.close()}},{key:"_startExitAnimation",value:function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}},{key:"_getSelected",value:function(){return this._model?this._model.selection:null}}]),n}(Aj);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(sj),ds(xx),ds(dj,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var n;1&t&&Vl(Cj,!0),2&t&&Ll(n=Ul())&&(e._calendar=n.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&Ds("@transformPanel.done",(function(){return e._animationDone.next()})),2&t&&(su("@transformPanel",e._animationState),qs("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[Zo],decls:1,vars:13,consts:[["cdkTrapFocus","",3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","_userSelection"]],template:function(t,e){1&t&&(vs(0,"mat-calendar",0),Ss("yearSelected",(function(t){return e.datepicker._selectYear(t)}))("monthSelected",(function(t){return e.datepicker._selectMonth(t)}))("_userSelection",(function(t){return e._handleUserSelection(t)})),gs()),2&t&&ps("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter")},directives:[Cj,Gb,fd],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[xj.transformPanel,xj.fadeInCalendar]},changeDetection:0}),t}(),Oj=function(){var t=function(){function t(e,n,i,r,a,o,s,u,l){y(this,t),this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=r,this._dateAdapter=o,this._dir=s,this._document=u,this._model=l,this._inputStateChanges=D.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new xl,this.monthSelected=new xl,this.openedStream=new xl,this.closedStream=new xl,this._opened=!1,this.id="mat-datepicker-".concat(Sj++),this._focusedElementBeforeOpen=null,this._backdropHarnessClass="".concat(this.id,"-backdrop"),this._stateChanges=new U,this._scrollStrategy=a}return b(t,[{key:"_getMinDate",value:function(){return this._datepickerInput&&this._datepickerInput.min}},{key:"_getMaxDate",value:function(){return this._datepickerInput&&this._datepickerInput.max}},{key:"_getDateFilter",value:function(){return this._datepickerInput&&this._datepickerInput.dateFilter}},{key:"ngOnChanges",value:function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()}},{key:"select",value:function(t){this._model.add(t)}},{key:"_selectYear",value:function(t){this.yearSelected.emit(t)}},{key:"_selectMonth",value:function(t){this.monthSelected.emit(t)}},{key:"_registerInput",value:function(t){var e=this;return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe((function(){return e._stateChanges.next(void 0)})),this._model}},{key:"open",value:function(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}},{key:"close",value:function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(Gp(1)).subscribe((function(){return t._destroyPopup()}))}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}}},{key:"_openAsDialog",value:function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Ij,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe((function(){return t.close()})),this._forwardContentValues(this._dialogRef.componentInstance)}},{key:"_openAsPopup",value:function(){var t=this,e=new w_(Ij,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Gp(1)).subscribe((function(){t._popupRef.updatePosition()}))}},{key:"_forwardContentValues",value:function(t){t.datepicker=this,t.color=this.color}},{key:"_createPopup",value:function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new X_({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),ht(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Vf((function(e){return e.keyCode===F_||t._datepickerInput&&e.altKey&&e.keyCode===j_})))).subscribe((function(e){e&&e.preventDefault(),t.close()}))}},{key:"_destroyPopup",value:function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}},{key:"_setConnectedPositions",value:function(t){var e="end"===this.xPosition?"end":"start",n="start"===e?"end":"start",i="above"===this.yPosition?"bottom":"top",r="top"===i?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:i},{originX:e,originY:i,overlayX:e,overlayY:r},{originX:n,originY:r,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:r}])}},{key:"startAt",get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"color",get:function(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t}},{key:"touchUi",get:function(){return this._touchUi},set:function(t){this._touchUi=hy(t)}},{key:"disabled",get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(t){var e=hy(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))}},{key:"opened",get:function(){return this._opened},set:function(t){hy(t)?this.open():this.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(SS),ds(vb),ds(mc),ds(Gu),ds(Dj),ds(xx,8),ds(s_,8),ds(Zc,8),ds(sj))},t.\u0275dir=ze({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",panelClass:"panelClass",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",openedStream:"opened",closedStream:"closed"},features:[nn]}),t}(),Tj=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(Oj);return t.\u0275fac=function(e){return Rj(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[vu([cj]),Zo],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t}(),Rj=Ui(Tj),Pj=function t(e,n){y(this,t),this.target=e,this.targetElement=n,this.value=this.target.value},Mj=function(){var t=function(){function t(e,n,i){var r=this;y(this,t),this._elementRef=e,this._dateAdapter=n,this._dateFormats=i,this.dateChange=new xl,this.dateInput=new xl,this._valueChange=new xl,this.stateChanges=new U,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=D.EMPTY,this._localeSubscription=D.EMPTY,this._parseValidator=function(){return r._lastValueValid?null:{matDatepickerParse:{text:r._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getDateFilter();return n&&e&&!n(e)?{matDatepickerFilter:!0}:null},this._minValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMinDate();return!n||!e||r._dateAdapter.compareDate(n,e)<=0?null:{matDatepickerMin:{min:n,actual:e}}},this._maxValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMaxDate();return!n||!e||r._dateAdapter.compareDate(n,e)>=0?null:{matDatepickerMax:{max:n,actual:e}}},this._lastValueValid=!1,this._localeSubscription=n.localeChanges.subscribe((function(){r.value=r.value}))}return b(t,[{key:"_getValidators",value:function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}},{key:"_registerModel",value:function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe((function(t){if(t.source!==e){var n=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(n),e._cvaOnChange(n),e._onTouched(),e._formatValue(n),e._canEmitChangeEvent(t)&&(e.dateInput.emit(new Pj(e,e._elementRef.nativeElement)),e.dateChange.emit(new Pj(e,e._elementRef.nativeElement))),e._outsideValueChanged&&e._outsideValueChanged()}}))}},{key:"ngAfterViewInit",value:function(){this._isInitialized=!0}},{key:"ngOnChanges",value:function(t){Fj(t,this._dateAdapter)&&this.stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this.stateChanges.complete()}},{key:"registerOnValidatorChange",value:function(t){this._validatorOnChange=t}},{key:"validate",value:function(t){return this._validator?this._validator(t):null}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._cvaOnChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_onKeydown",value:function(t){t.altKey&&t.keyCode===H_&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}},{key:"_onInput",value:function(t){var e=this._lastValueValid,n=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(n),n=this._dateAdapter.getValidDateOrNull(n),this._dateAdapter.sameDate(n,this.value)?(t&&!this.value&&this._cvaOnChange(n),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(n),this._cvaOnChange(n),this._valueChange.emit(n),this.dateInput.emit(new Pj(this,this._elementRef.nativeElement)))}},{key:"_onChange",value:function(){this.dateChange.emit(new Pj(this,this._elementRef.nativeElement))}},{key:"_onBlur",value:function(){this.value&&this._formatValue(this.value),this._onTouched()}},{key:"_formatValue",value:function(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}},{key:"_assignValue",value:function(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}},{key:"_isValidValue",value:function(t){return!t||this._dateAdapter.isValid(t)}},{key:"_parentDisabled",value:function(){return!1}},{key:"value",get:function(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue},set:function(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t);var e=this.value;this._assignValue(t),this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)}},{key:"disabled",get:function(){return!!this._disabled||this._parentDisabled()},set:function(t){var e=hy(t),n=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.next(void 0)),e&&this._isInitialized&&n.blur&&n.blur()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(xx,8),ds(Sx,8))},t.\u0275dir=ze({type:t,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[nn]}),t}();function Fj(t,e){for(var n=0,i=Object.keys(t);n0?e:t.placeholder}}]),n}(Hj);return t.\u0275fac=function(e){return new(e||t)(ds(zj),ds(ku),ds(Fx),ds(qo),ds(cE,8),ds(CE,8),ds(xx,8),ds(Sx,8))},t.\u0275dir=ze({type:t,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:6,hostBindings:function(t,e){1&t&&Ss("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("keydown",(function(t){return e._onKeydown(t)}))("blur",(function(){return e._onBlur()})),2&t&&(ou("disabled",e.disabled),us("id",e._rangeInput.id)("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},features:[vu([{provide:QS,useExisting:t,multi:!0},{provide:fD,useExisting:t,multi:!0}]),Zo]}),t}(),Wj=function(){var t=function(t){f(n,t);var e=g(n);function n(t,o,s,u,c,h,d,f){var p,m;return y(this,n),(m=e.call(this,t,o,s,u,c,h,d,f))._endValidator=function(t){var e=m._dateAdapter.getValidDateOrNull(m._dateAdapter.deserialize(t.value)),n=m._model?m._model.selection.start:null;return!e||!n||m._dateAdapter.compareDate(e,n)>=0?null:{matEndDateInvalid:{start:n,actual:e}}},m._validator=vD.compose([].concat(l(r((p=a(m),i(n.prototype)),"_getValidators",p).call(p)),[m._endValidator])),m._canEmitChangeEvent=function(t){return t.source!==m._rangeInput._startInput},m}return b(n,[{key:"ngOnInit",value:function(){r(i(n.prototype),"ngOnInit",this).call(this)}},{key:"ngDoCheck",value:function(){r(i(n.prototype),"ngDoCheck",this).call(this)}},{key:"_getValueFromModel",value:function(t){return t.end}},{key:"_assignValueToModel",value:function(t){if(this._model){var e=new oj(this._model.selection.start,t);this._model.updateSelection(e,this),this._cvaOnChange(t)}}},{key:"_onKeydown",value:function(t){8!==t.keyCode||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),r(i(n.prototype),"_onKeydown",this).call(this,t)}}]),n}(Hj);return t.\u0275fac=function(e){return new(e||t)(ds(zj),ds(ku),ds(Fx),ds(qo),ds(cE,8),ds(CE,8),ds(xx,8),ds(Sx,8))},t.\u0275dir=ze({type:t,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(t,e){1&t&&Ss("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("keydown",(function(t){return e._onKeydown(t)}))("blur",(function(){return e._onBlur()})),2&t&&(ou("disabled",e.disabled),us("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},features:[vu([{provide:QS,useExisting:t,multi:!0},{provide:fD,useExisting:t,multi:!0}]),Zo]}),t}(),qj=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"_forwardContentValues",value:function(t){r(i(n.prototype),"_forwardContentValues",this).call(this,t);var e=this._datepickerInput;e&&(t.comparisonStart=e.comparisonStart,t.comparisonEnd=e.comparisonEnd)}}]),n}(Oj);return t.\u0275fac=function(e){return Yj(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],features:[vu([hj,pj]),Zo],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t}(),Yj=Ui(qj),Gj=0,Kj=function(){var t=function(){function t(e,n,i,r,a){y(this,t),this._changeDetectorRef=e,this._elementRef=n,this._dateAdapter=r,this._formField=a,this.id="mat-date-range-input-".concat(Gj++),this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new U,this.ngControl=i}return b(t,[{key:"setDescribedByIds",value:function(t){this._ariaDescribedBy=t.length?t.join(" "):null}},{key:"onContainerClick",value:function(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())}},{key:"ngAfterContentInit",value:function(){var t=this;this._model&&this._registerModel(this._model),ht(this._startInput.stateChanges,this._endInput.stateChanges).subscribe((function(){t.stateChanges.next(void 0)}))}},{key:"ngOnChanges",value:function(t){Fj(t,this._dateAdapter)&&this.stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this.stateChanges.complete()}},{key:"getStartValue",value:function(){return this.value?this.value.start:null}},{key:"getThemePalette",value:function(){return this._formField?this._formField.color:void 0}},{key:"getConnectedOverlayOrigin",value:function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}},{key:"_getInputMirrorValue",value:function(){return this._startInput?this._startInput.getMirrorValue():""}},{key:"_shouldHidePlaceholders",value:function(){return!!this._startInput&&!this._startInput.isEmpty()}},{key:"_handleChildValueChange",value:function(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}},{key:"_openDatepicker",value:function(){this._rangePicker&&this._rangePicker.open()}},{key:"_shouldHideSeparator",value:function(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty}},{key:"_getAriaLabelledby",value:function(){var t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null}},{key:"_revalidate",value:function(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}},{key:"_registerModel",value:function(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)}},{key:"value",get:function(){return this._model?this._model.selection:null}},{key:"shouldLabelFloat",get:function(){return this.focused||!this.empty}},{key:"placeholder",get:function(){var t,e,n=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",i=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return n||i?"".concat(n," ").concat(this.separator," ").concat(i):""}},{key:"rangePicker",get:function(){return this._rangePicker},set:function(t){t&&(this._model=t._registerInput(this),this._rangePicker=t,this._registerModel(this._model))}},{key:"required",get:function(){return!!this._required},set:function(t){this._required=hy(t)}},{key:"dateFilter",get:function(){return this._dateFilter},set:function(t){this._dateFilter=t,this._revalidate()}},{key:"min",get:function(){return this._min},set:function(t){var e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._revalidate())}},{key:"max",get:function(){return this._max},set:function(t){var e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._revalidate())}},{key:"disabled",get:function(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled},set:function(t){var e=hy(t);e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}},{key:"errorState",get:function(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)}},{key:"empty",get:function(){var t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Eo),ds(ku),ds(aD,10),ds(xx,8),ds(nT,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-date-range-input"]],contentQueries:function(t,e,n){var i;1&t&&(jl(n,Uj,!0),jl(n,Wj,!0)),2&t&&(Ll(i=Ul())&&(e._startInput=i.first),Ll(i=Ul())&&(e._endInput=i.first))},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(t,e){2&t&&(us("id",null)("aria-labelledby",e._getAriaLabelledby())("aria-describedby",e._ariaDescribedBy)("data-mat-calendar",e.rangePicker?e.rangePicker.id:null),qs("mat-date-range-input-hide-placeholders",e._shouldHidePlaceholders())("mat-date-range-input-required",e.required))},inputs:{separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",rangePicker:"rangePicker",required:"required",dateFilter:"dateFilter",min:"min",max:"max",disabled:"disabled"},exportAs:["matDateRangeInput"],features:[vu([{provide:UO,useExisting:t},{provide:zj,useExisting:t}]),nn],ngContentSelectors:QB,decls:9,vars:4,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-start-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-end-wrapper"]],template:function(t,e){1&t&&(Ps(XB),vs(0,"div",0),Ss("cdkFocusChange",(function(t){return e.focused=null!==t})),vs(1,"div",1),Ms(2),vs(3,"span",2),nu(4),gs(),gs(),vs(5,"span",3),nu(6),gs(),vs(7,"div",4),Ms(8,1),gs(),gs()),2&t&&(Xr(4),iu(e._getInputMirrorValue()),Xr(1),qs("mat-date-range-input-separator-hidden",e._shouldHideSeparator()),Xr(1),iu(e.separator))},directives:[ik],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"],encapsulation:2,changeDetection:0}),t}(),Zj=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[JB,Ej],imports:[[Qd,zS,RS,wb,uk,T_],__]}),t}(),$j=["button"],Xj=["*"],Qj=new re("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),Jj=new re("MatButtonToggleGroup"),tz={provide:QS,useExisting:Ht((function(){return iz})),multi:!0},ez=0,nz=function t(e,n){y(this,t),this.source=e,this.value=n},iz=function(){var t=function(){function t(e,n){y(this,t),this._changeDetector=e,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=function(){},this._onTouched=function(){},this._name="mat-button-toggle-group-".concat(ez++),this.valueChange=new xl,this.change=new xl,this.appearance=n&&n.appearance?n.appearance:"standard"}return b(t,[{key:"ngOnInit",value:function(){this._selectionModel=new f_(this.multiple,void 0,!1)}},{key:"ngAfterContentInit",value:function(){var t;(t=this._selectionModel).select.apply(t,l(this._buttonToggles.filter((function(t){return t.checked}))))}},{key:"writeValue",value:function(t){this.value=t,this._changeDetector.markForCheck()}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_emitChangeEvent",value:function(){var t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,n=new nz(e,this.value);this._controlValueAccessorChangeFn(n.value),this.change.emit(n)}},{key:"_syncButtonToggle",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):r=!0,r?Promise.resolve().then((function(){return n._updateModelValue(i)})):this._updateModelValue(i)}},{key:"_isSelected",value:function(t){return this._selectionModel&&this._selectionModel.isSelected(t)}},{key:"_isPrechecked",value:function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some((function(e){return null!=t.value&&e===t.value})):t.value===this._rawValue)}},{key:"_setSelectionByValue",value:function(t){var e=this;this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach((function(t){return e._selectValue(t)}))):(this._clearSelection(),this._selectValue(t)))}},{key:"_clearSelection",value:function(){this._selectionModel.clear(),this._buttonToggles.forEach((function(t){return t.checked=!1}))}},{key:"_selectValue",value:function(t){var e=this._buttonToggles.find((function(e){return null!=e.value&&e.value===t}));e&&(e.checked=!0,this._selectionModel.select(e))}},{key:"_updateModelValue",value:function(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}},{key:"name",get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach((function(t){t.name=e._name,t._markForCheck()}))}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=hy(t)}},{key:"value",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map((function(t){return t.value})):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}},{key:"selected",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=hy(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=hy(t),this._buttonToggles&&this._buttonToggles.forEach((function(t){return t._markForCheck()}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(Eo),ds(Qj,8))},t.\u0275dir=ze({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;1&t&&jl(n,az,!0),2&t&&Ll(i=Ul())&&(e._buttonToggles=i)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(us("aria-disabled",e.disabled),qs("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[vu([tz,{provide:Jj,useExisting:t}])]}),t}(),rz=yx((function t(){y(this,t)})),az=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s){var u;y(this,n),(u=e.call(this))._changeDetectorRef=i,u._elementRef=r,u._focusMonitor=a,u._isSingleSelector=!1,u._checked=!1,u.ariaLabelledby=null,u._disabled=!1,u.change=new xl;var l=Number(o);return u.tabIndex=l||0===l?l:null,u.buttonToggleGroup=t,u.appearance=s&&s.appearance?s.appearance:"standard",u}return b(n,[{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-".concat(ez++),this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){var t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}},{key:"focus",value:function(t){this._buttonElement.nativeElement.focus(t)}},{key:"_onButtonClick",value:function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new nz(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}},{key:"buttonId",get:function(){return"".concat(this.id,"-button")}},{key:"appearance",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t}},{key:"checked",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=hy(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=hy(t)}}]),n}(rz);return t.\u0275fac=function(e){return new(e||t)(ds(Jj,8),ds(Eo),ds(ku),ds(ek),fs("tabindex"),ds(Qj,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;1&t&&Vl($j,!0),2&t&&Ll(n=Ul())&&(e._buttonElement=n.first)},hostAttrs:[1,"mat-button-toggle"],hostVars:11,hostBindings:function(t,e){1&t&&Ss("focus",(function(){return e.focus()})),2&t&&(us("tabindex",-1)("id",e.id)("name",null),qs("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[Zo],ngContentSelectors:Xj,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(Ps(),vs(0,"button",0,1),Ss("click",(function(){return e._onButtonClick()})),vs(2,"span",2),Ms(3),gs(),gs(),ys(4,"span",3),ys(5,"span",4)),2&t){var n=hs(1);ps("id",e.buttonId)("disabled",e.disabled||null),us("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Xr(5),ps("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[qx],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t}(),oz=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[mx,Yx],mx]}),t}();function sz(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Edit rule"),gs())}function uz(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New rule"),gs())}function lz(t,e){if(1&t&&(vs(0,"mat-option",22),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.value," ")}}function cz(t,e){if(1&t&&(vs(0,"mat-option",22),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.value," ")}}function hz(t,e){if(1&t&&(vs(0,"mat-button-toggle",22),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.value," ")}}function dz(t,e){if(1&t){var n=ws();vs(0,"div",23),vs(1,"span",24),vs(2,"uds-translate"),nu(3,"Weekdays"),gs(),gs(),vs(4,"mat-button-toggle-group",25),Ss("ngModelChange",(function(t){return In(n),Ts().wDays=t})),cs(5,hz,2,2,"mat-button-toggle",8),gs(),gs()}if(2&t){var i=Ts();Xr(4),ps("ngModel",i.wDays),Xr(1),ps("ngForOf",i.weekDays)}}function fz(t,e){if(1&t){var n=ws();vs(0,"mat-form-field",9),vs(1,"mat-label"),vs(2,"uds-translate"),nu(3,"Repeat every"),gs(),gs(),vs(4,"input",6),Ss("ngModelChange",(function(t){return In(n),Ts().rule.interval=t})),gs(),vs(5,"div",26),nu(6),gs(),gs()}if(2&t){var i=Ts();Xr(4),ps("ngModel",i.rule.interval),Xr(2),ru("\xa0",i.frequency(),"")}}var pz={DAILY:[django.gettext("day"),django.gettext("days"),django.gettext("Daily")],WEEKLY:[django.gettext("week"),django.gettext("weeks"),django.gettext("Weekly")],MONTHLY:[django.gettext("month"),django.gettext("months"),django.gettext("Monthly")],YEARLY:[django.gettext("year"),django.gettext("years"),django.gettext("Yearly")],WEEKDAYS:["","",django.gettext("Weekdays")]},mz={MINUTES:django.gettext("Minutes"),HOURS:django.gettext("Hours"),DAYS:django.gettext("Days"),WEEKS:django.gettext("Weeks")},vz=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")];function gz(t,e){void 0===e&&(e=!1);for(var n=new Array,i=0;i<7;i++)1&t&&n.push(vz[i].substr(0,e?100:3)),t>>=1;return n.length?n.join(", "):django.gettext("(no days)")}var yz=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.dunits=Object.keys(mz).map((function(t){return{id:t,value:mz[t]}})),this.freqs=Object.keys(pz).map((function(t){return{id:t,value:pz[t][2]}})),this.weekDays=vz.map((function(t,e){return{id:1<0?" "+django.gettext("and every event will be active for")+" "+this.rule.duration+" "+mz[this.rule.duration_unit]:django.gettext("with no duration")}return t.replace("$FIELD",n)},t.prototype.save=function(){var t=this;this.rules.save(this.rule).subscribe((function(){t.dialogRef.close(),t.onSave.emit(!0)}))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-calendar-rule"]],decls:73,vars:21,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],[1,"oneThird"],["matInput","","type","time",3,"ngModel","ngModelChange"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","ngModelChange"],["matSuffix","",3,"for"],["startDatePicker",""],["matInput","",3,"matDatepicker","ngModel","placeholder","ngModelChange"],["endDatePicker",""],[1,"weekdays"],[3,"ngModel","ngModelChange","valueChange"],["class","oneHalf mat-form-field-infix",4,"ngIf"],["class","oneHalf",4,"ngIf"],[1,"info"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"disabled","click"],[3,"value"],[1,"oneHalf","mat-form-field-infix"],[1,"label-weekdays"],["multiple","",3,"ngModel","ngModelChange"],["matSuffix",""]],template:function(t,e){if(1&t&&(vs(0,"h4",0),cs(1,sz,2,0,"uds-translate",1),cs(2,uz,2,0,"uds-translate",1),gs(),vs(3,"mat-dialog-content"),vs(4,"div",2),vs(5,"mat-form-field"),vs(6,"mat-label"),vs(7,"uds-translate"),nu(8,"Name"),gs(),gs(),vs(9,"input",3),Ss("ngModelChange",(function(t){return e.rule.name=t})),gs(),gs(),vs(10,"mat-form-field"),vs(11,"mat-label"),vs(12,"uds-translate"),nu(13,"Comments"),gs(),gs(),vs(14,"input",3),Ss("ngModelChange",(function(t){return e.rule.comments=t})),gs(),gs(),vs(15,"h3"),vs(16,"uds-translate"),nu(17,"Event"),gs(),gs(),vs(18,"mat-form-field",4),vs(19,"mat-label"),vs(20,"uds-translate"),nu(21,"Start time"),gs(),gs(),vs(22,"input",5),Ss("ngModelChange",(function(t){return e.startTime=t})),gs(),gs(),vs(23,"mat-form-field",4),vs(24,"mat-label"),vs(25,"uds-translate"),nu(26,"Duration"),gs(),gs(),vs(27,"input",6),Ss("ngModelChange",(function(t){return e.rule.duration=t})),gs(),gs(),vs(28,"mat-form-field",4),vs(29,"mat-label"),vs(30,"uds-translate"),nu(31,"Duration units"),gs(),gs(),vs(32,"mat-select",7),Ss("ngModelChange",(function(t){return e.rule.duration_unit=t})),cs(33,lz,2,2,"mat-option",8),gs(),gs(),vs(34,"h3"),nu(35," Repetition "),gs(),vs(36,"mat-form-field",9),vs(37,"mat-label"),vs(38,"uds-translate"),nu(39," Start date "),gs(),gs(),vs(40,"input",10),Ss("ngModelChange",(function(t){return e.startDate=t})),gs(),ys(41,"mat-datepicker-toggle",11),ys(42,"mat-datepicker",null,12),gs(),vs(44,"mat-form-field",9),vs(45,"mat-label"),vs(46,"uds-translate"),nu(47," Repeat until date "),gs(),gs(),vs(48,"input",13),Ss("ngModelChange",(function(t){return e.endDate=t})),gs(),ys(49,"mat-datepicker-toggle",11),ys(50,"mat-datepicker",null,14),gs(),vs(52,"div",15),vs(53,"mat-form-field",9),vs(54,"mat-label"),vs(55,"uds-translate"),nu(56,"Frequency"),gs(),gs(),vs(57,"mat-select",16),Ss("ngModelChange",(function(t){return e.rule.frequency=t}))("valueChange",(function(){return e.rule.interval=1})),cs(58,cz,2,2,"mat-option",8),gs(),gs(),cs(59,dz,6,2,"div",17),cs(60,fz,7,2,"mat-form-field",18),gs(),vs(61,"h3"),vs(62,"uds-translate"),nu(63,"Summary"),gs(),gs(),vs(64,"div",19),nu(65),gs(),gs(),gs(),vs(66,"mat-dialog-actions"),vs(67,"button",20),vs(68,"uds-translate"),nu(69,"Cancel"),gs(),gs(),vs(70,"button",21),Ss("click",(function(){return e.save()})),vs(71,"uds-translate"),nu(72,"Ok"),gs(),gs(),gs()),2&t){var n=hs(43),i=hs(51);Xr(1),ps("ngIf",e.rule.id),Xr(1),ps("ngIf",!e.rule.id),Xr(7),ps("ngModel",e.rule.name),Xr(5),ps("ngModel",e.rule.comments),Xr(8),ps("ngModel",e.startTime),Xr(5),ps("ngModel",e.rule.duration),Xr(5),ps("ngModel",e.rule.duration_unit),Xr(1),ps("ngForOf",e.dunits),Xr(7),ps("matDatepicker",n)("ngModel",e.startDate),Xr(1),ps("for",n),Xr(7),ps("matDatepicker",i)("ngModel",e.endDate)("placeholder",e.FOREVER_STRING),Xr(1),ps("for",i),Xr(8),ps("ngModel",e.rule.frequency),Xr(1),ps("ngForOf",e.freqs),Xr(1),ps("ngIf","WEEKDAYS"===e.rule.frequency),Xr(1),ps("ngIf","WEEKDAYS"!==e.rule.frequency),Xr(5),ru(" ",e.summary()," "),Xr(5),ps("disabled",null!==e.updateRuleData()||""===e.rule.name)}},directives:[AS,yd,IS,iT,GO,HS,YP,iD,lD,gE,CD,xT,vd,Vj,jj,QO,Tj,OS,BS,ES,oS,iz,az],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]:not(.oneThird):not(.oneHalf){width:100%}.mat-form-field.oneThird[_ngcontent-%COMP%]{width:31%;margin-right:2%}.mat-form-field.oneHalf[_ngcontent-%COMP%]{width:48%;margin-right:2%}h3[_ngcontent-%COMP%]{width:100%;margin-top:.3rem;margin-bottom:1rem}.weekdays[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end}.label-weekdays[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.mat-datepicker-toggle[_ngcontent-%COMP%]{color:#00f}.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:rgba(35,35,133,.5);color:#fff}"]}),t}();function _z(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Rules"),gs())}function bz(t,e){if(1&t){var n=ws();vs(0,"div",6),vs(1,"div",7),vs(2,"mat-tab-group",8),vs(3,"mat-tab"),cs(4,_z,2,0,"ng-template",9),vs(5,"div",10),vs(6,"uds-table",11),Ss("newAction",(function(t){return In(n),Ts().onNewRule(t)}))("editAction",(function(t){return In(n),Ts().onEditRule(t)}))("deleteAction",(function(t){return In(n),Ts().onDeleteRule(t)})),gs(),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ts();Xr(2),ps("@.disabled",!0),Xr(4),ps("rest",i.calendarRules)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","calendars-d-rules"+i.calendar.id)("pageSize",i.api.config.admin.page_size)}}var kz=function(t){return["/pools","calendars",t]},wz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("calendar");this.rest.calendars.get(e).subscribe((function(e){t.calendar=e,t.calendarRules=t.rest.calendars.detail(e.id,"rules")}))},t.prototype.onNewRule=function(t){yz.launch(this.api,this.calendarRules).subscribe((function(){return t.table.overview()}))},t.prototype.onEditRule=function(t){yz.launch(this.api,this.calendarRules,t.table.selection.selected[0]).subscribe((function(){return t.table.overview()}))},t.prototype.onDeleteRule=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar rule"))},t.prototype.processElement=function(t){!function(t){t.interval="WEEKDAYS"===t.frequency?gz(t.interval):t.interval+" "+pz[t.frequency][django.pluralidx(t.interval)],t.duration=t.duration+" "+mz[t.duration_unit]}(t)},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-calendars-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","pageSize","newAction","editAction","deleteAction"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"a",2),vs(3,"i",3),nu(4,"arrow_back"),gs(),gs(),nu(5," \xa0"),ys(6,"img",4),nu(7),gs(),cs(8,bz,7,7,"div",5),gs()),2&t&&(Xr(2),ps("routerLink",pl(4,kz,e.calendar?e.calendar.id:"")),Xr(4),ps("src",e.api.staticURL("admin/img/icons/calendars.png"),Tr),Xr(1),ru(" ",null==e.calendar?null:e.calendar.name," "),Xr(1),ps("ngIf",e.calendar))},directives:[zg,yd,TA,kA,gA,WF,HS],styles:[".mat-column-end, .mat-column-frequency, .mat-column-start{max-width:9rem} .mat-column-duration, .mat-column-interval{max-width:11rem}"]}),t}(),Cz='event'+django.gettext("Set time mark")+"",xz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"timemark",html:Cz,type:gI.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New account"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit account"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account"))},t.prototype.onTimeMark=function(t){var e=this,n=t.table.selection.selected[0];this.api.gui.yesno(django.gettext("Time mark"),django.gettext("Set time mark for $NAME to current date/time?").replace("$NAME",n.name)).subscribe((function(i){i&&e.rest.accounts.timemark(n.id).subscribe((function(){e.api.gui.snackbar.open(django.gettext("Time mark stablished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()}))}))},t.prototype.onDetail=function(t){this.api.navigation.gotoAccountDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("account"))},t.prototype.processElement=function(t){t.time_mark=78793200===t.time_mark?django.gettext("No time mark"):bM("SHORT_DATE_FORMAT",t.time_mark)},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-accounts"]],decls:1,vars:7,consts:[["icon","accounts",3,"rest","multiSelect","allowExport","hasPermissions","customButtons","pageSize","onItem","customButtonAction","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(vs(0,"uds-table",0),Ss("customButtonAction",(function(t){return e.onTimeMark(t)}))("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("detailAction",(function(t){return e.onDetail(t)}))("loaded",(function(t){return e.onLoad(t)})),gs()),2&t&&ps("rest",e.rest.accounts)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("onItem",e.processElement)},directives:[WF],styles:[""]}),t}();function Sz(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Account usage"),gs())}function Dz(t,e){if(1&t){var n=ws();vs(0,"div",6),vs(1,"div",7),vs(2,"mat-tab-group",8),vs(3,"mat-tab"),cs(4,Sz,2,0,"ng-template",9),vs(5,"div",10),vs(6,"uds-table",11),Ss("deleteAction",(function(t){return In(n),Ts().onDeleteUsage(t)})),gs(),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ts();Xr(2),ps("@.disabled",!0),Xr(4),ps("rest",i.accountUsage)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","account-d-usage"+i.account.id)}}var Ez=function(t){return["/pools","accounts",t]},Az=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("account");this.rest.accounts.get(e).subscribe((function(e){t.account=e,t.accountUsage=t.rest.accounts.detail(e.id,"usage")}))},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account usage"))},t.prototype.processElement=function(t){t.running=this.api.yesno(t.running)},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-accounts-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","accounts",3,"rest","multiSelect","allowExport","onItem","tableId","deleteAction"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"div",1),vs(2,"a",2),vs(3,"i",3),nu(4,"arrow_back"),gs(),gs(),nu(5," \xa0"),ys(6,"img",4),nu(7),gs(),cs(8,Dz,7,6,"div",5),gs()),2&t&&(Xr(2),ps("routerLink",pl(4,Ez,e.account?e.account.id:"")),Xr(4),ps("src",e.api.staticURL("admin/img/icons/accounts.png"),Tr),Xr(1),ru(" ",null==e.account?null:e.account.name," "),Xr(1),ps("ngIf",e.account))},directives:[zg,yd,TA,kA,gA,WF,HS],styles:[""]}),t}();function Iz(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"New image for"),gs())}function Oz(t,e){1&t&&(vs(0,"uds-translate"),nu(1,"Edit for"),gs())}var Tz=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new xl(!0),this.preview="",this.image={id:void 0,data:"",name:""},i.image&&(this.image.id=i.image.id)}return t.launch=function(e,n){void 0===n&&(n=null);var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{image:n},disableClose:!0}).componentInstance.onSave},t.prototype.onFileChanged=function(t){var e=this,n=t.target.files[0];if(n.size>262144)this.api.gui.alert(django.gettext("Error"),django.gettext("Image is too big (max. upload size is 256Kb)"));else if(["image/jpeg","image/png","image/gif"].includes(n.type)){var i=new FileReader;i.onload=function(t){var r=i.result;e.preview=r,e.image.data=r.substr(r.indexOf("base64,")+7),e.image.name||(e.image.name=n.name)},i.readAsDataURL(n)}else this.api.gui.alert(django.gettext("Error"),django.gettext("Invalid image type (only supports JPEG, PNG and GIF"))},t.prototype.ngOnInit=function(){var t=this;this.image.id&&this.rest.gallery.get(this.image.id).subscribe((function(e){switch(t.image=e,t.image.data.substr(2)){case"iV":t.preview="data:image/png;base64,"+t.image.data;break;case"/9":t.preview="data:image/jpeg;base64,"+t.image.data;break;default:t.preview="data:image/gif;base64,"+t.image.data}}))},t.prototype.background=function(){var t=this.api.config.image_size[0],e=this.api.config.image_size[1],n={"width.px":t,"height.px":e,"background-size":t+"px "+e+"px"};return this.preview&&(n["background-image"]="url("+this.preview+")"),n},t.prototype.save=function(){var t=this;this.image.name&&this.image.data?this.rest.gallery.save(this.image).subscribe((function(){t.api.gui.snackbar.open(django.gettext("Successfully saved"),django.gettext("dismiss"),{duration:2e3}),t.dialogRef.close(),t.onSave.emit(!0)})):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, provide a name and a image"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-gallery-image"]],decls:32,vars:7,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["type","file",2,"display","none",3,"change"],["fileInput",""],["matInput","","type","text",3,"hidden","click"],[1,"preview",3,"click"],[1,"image-preview",3,"ngStyle"],[1,"help"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){if(1&t){var n=ws();vs(0,"h4",0),cs(1,Iz,2,0,"uds-translate",1),cs(2,Oz,2,0,"uds-translate",1),gs(),vs(3,"mat-dialog-content"),vs(4,"div",2),vs(5,"mat-form-field"),vs(6,"mat-label"),vs(7,"uds-translate"),nu(8,"Image name"),gs(),gs(),vs(9,"input",3),Ss("ngModelChange",(function(t){return e.image.name=t})),gs(),gs(),vs(10,"input",4,5),Ss("change",(function(t){return e.onFileChanged(t)})),gs(),vs(12,"mat-form-field"),vs(13,"mat-label"),vs(14,"uds-translate"),nu(15,"Image (click to change)"),gs(),gs(),vs(16,"input",6),Ss("click",(function(){return In(n),hs(11).click()})),gs(),vs(17,"div",7),Ss("click",(function(){return In(n),hs(11).click()})),ys(18,"div",8),gs(),gs(),vs(19,"div",9),vs(20,"uds-translate"),nu(21,' For optimal results, use "squared" images. '),gs(),vs(22,"uds-translate"),nu(23," The image will be resized on upload to "),gs(),nu(24),gs(),gs(),gs(),vs(25,"mat-dialog-actions"),vs(26,"button",10),vs(27,"uds-translate"),nu(28,"Cancel"),gs(),gs(),vs(29,"button",11),Ss("click",(function(){return e.save()})),vs(30,"uds-translate"),nu(31,"Ok"),gs(),gs(),gs()}2&t&&(Xr(1),ps("ngIf",!e.image.id),Xr(1),ps("ngIf",e.image.id),Xr(7),ps("ngModel",e.image.name),Xr(7),ps("hidden",!0),Xr(2),ps("ngStyle",e.background()),Xr(6),au(" ",e.api.config.image_size[0],"x",e.api.config.image_size[1]," "))},directives:[AS,yd,IS,iT,GO,HS,YP,iD,lD,gE,Ed,OS,BS,ES],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%], .preview[_ngcontent-%COMP%]{width:100%}.preview[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.image-preview[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.3)}"]}),t}(),Rz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){Tz.launch(this.api).subscribe((function(){return t.table.overview()}))},t.prototype.onEdit=function(t){Tz.launch(this.api,t.table.selection.selected[0]).subscribe((function(){return t.table.overview()}))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete image"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("image"))},t.\u0275fac=function(e){return new(e||t)(ds(vv),ds(gO),ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-gallery"]],decls:1,vars:5,consts:[["icon","gallery",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(vs(0,"uds-table",0),Ss("newAction",(function(t){return e.onNew(t)}))("editAction",(function(t){return e.onEdit(t)}))("deleteAction",(function(t){return e.onDelete(t)}))("loaded",(function(t){return e.onLoad(t)})),gs()),2&t&&ps("rest",e.rest.gallery)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[WF],styles:[".mat-column-thumb{max-width:7rem;justify-content:center} .mat-column-name{max-width:32rem}"]}),t}(),Pz='assessment'+django.gettext("Generate report")+"",Mz=function(){function t(t,e){this.rest=t,this.api=e,this.customButtons=[{id:"genreport",html:Pz,type:gI.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},t.prototype.generateReport=function(t){var e=this,n=new xl;n.subscribe((function(n){e.api.gui.snackbar.open(django.gettext("Generating report...")),e.rest.reports.save(n,t.table.selection.selected[0].id).subscribe((function(t){for(var n=t.encoded?window.atob(t.data):t.data,i=n.length,r=new Uint8Array(i),a=0;a div[_ngcontent-%COMP%]{width:50%}.mat-form-field[_ngcontent-%COMP%]{width:100%}input[readonly][_ngcontent-%COMP%]{background-color:#e0e0e0}.slider-label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.config-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;margin-top:2rem;margin-bottom:2rem}"]}),t}(),Qz=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete actor token - USE WITH EXTREME CAUTION!!!"))},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(vv),ds(gO))},t.\u0275cmp=Fe({type:t,selectors:[["uds-actor-tokens"]],decls:2,vars:3,consts:[["icon","maleta",3,"rest","multiSelect","allowExport"]],template:function(t,e){1&t&&(vs(0,"div"),ys(1,"uds-table",0),gs()),2&t&&(Xr(1),ps("rest",e.rest.actorToken)("multiSelect",!0)("allowExport",!0))},directives:[WF],styles:[""]}),t}(),Jz=[{path:"",canActivate:[ZI],children:[{path:"",redirectTo:"summary",pathMatch:"full"},{path:"summary",component:kO},{path:"providers",component:KF},{path:"providers/:provider/detail",component:yL},{path:"providers/:provider",component:KF},{path:"providers/:provider/detail/:service",component:yL},{path:"authenticators",component:_L},{path:"authenticators/:authenticator/detail",component:QN},{path:"authenticators/:authenticator",component:_L},{path:"authenticators/:authenticator/detail/groups/:group",component:QN},{path:"authenticators/:authenticator/detail/users/:user",component:QN},{path:"osmanagers",component:JN},{path:"osmanagers/:osmanager",component:JN},{path:"transports",component:tV},{path:"transports/:transport",component:tV},{path:"networks",component:eV},{path:"networks/:network",component:eV},{path:"proxies",component:nV},{path:"proxies/:proxy",component:nV},{path:"pools/service-pools",component:iV},{path:"pools/service-pools/:pool",component:iV},{path:"pools/service-pools/:pool/detail",component:gB},{path:"pools/meta-pools",component:yB},{path:"pools/meta-pools/:metapool",component:yB},{path:"pools/meta-pools/:metapool/detail",component:PB},{path:"pools/pool-groups",component:MB},{path:"pools/pool-groups/:poolgroup",component:MB},{path:"pools/calendars",component:FB},{path:"pools/calendars/:calendar",component:FB},{path:"pools/calendars/:calendar/detail",component:wz},{path:"pools/accounts",component:xz},{path:"pools/accounts/:account",component:xz},{path:"pools/accounts/:account/detail",component:Az},{path:"tools/gallery",component:Rz},{path:"tools/gallery/:image",component:Rz},{path:"tools/reports",component:Mz},{path:"tools/reports/:report",component:Mz},{path:"tools/configuration",component:Xz},{path:"tools/actor_tokens",component:Qz}]},{path:"**",redirectTo:"summary"}],tH=function(){function t(){}return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[ey.forRoot(Jz)],ey]}),t}(),eH=["input"],nH=function(){return{enterDuration:150}},iH=["*"],rH=new re("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}}),aH=new re("mat-checkbox-click-action"),oH=0,sH={provide:QS,useExisting:Ht((function(){return cH})),multi:!0},uH=function t(){y(this,t)},lH=_x(gx(yx(vx((function t(e){y(this,t),this._elementRef=e}))))),cH=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u,l){var c;return y(this,n),(c=e.call(this,t))._changeDetectorRef=i,c._focusMonitor=r,c._ngZone=a,c._clickAction=s,c._animationMode=u,c._options=l,c.ariaLabel="",c.ariaLabelledby=null,c._uniqueId="mat-checkbox-".concat(++oH),c.id=c._uniqueId,c.labelPosition="after",c.name=null,c.change=new xl,c.indeterminateChange=new xl,c._onTouched=function(){},c._currentAnimationClass="",c._currentCheckState=0,c._controlValueAccessorChangeFn=function(){},c._checked=!1,c._disabled=!1,c._indeterminate=!1,c._options=c._options||{},c._options.color&&(c.color=c.defaultColor=c._options.color),c.tabIndex=parseInt(o)||0,c._clickAction=c._clickAction||c._options.clickAction,c}return b(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){e||Promise.resolve().then((function(){t._onTouched(),t._changeDetectorRef.markForCheck()}))})),this._syncIndeterminate(this._indeterminate)}},{key:"ngAfterViewChecked",value:function(){}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_getAriaChecked",value:function(){return this.checked?"true":this.indeterminate?"mixed":"false"}},{key:"_transitionCheckState",value:function(t){var e=this._currentCheckState,n=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);var i=this._currentAnimationClass;this._ngZone.runOutsideAngular((function(){setTimeout((function(){n.classList.remove(i)}),1e3)}))}}},{key:"_emitChangeEvent",value:function(){var t=new uH;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}},{key:"toggle",value:function(){this.checked=!this.checked}},{key:"_onInputClick",value:function(t){var e=this;t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then((function(){e._indeterminate=!1,e.indeterminateChange.emit(e._indeterminate)})),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"keyboard",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._inputElement,t,e)}},{key:"_onInteractionEvent",value:function(t){t.stopPropagation()}},{key:"_getAnimationClassForCheckStateTransition",value:function(t,e){if("NoopAnimations"===this._animationMode)return"";var n="";switch(t){case 0:if(1===e)n="unchecked-checked";else{if(3!=e)return"";n="unchecked-indeterminate"}break;case 2:n=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:n=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:n=1===e?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-".concat(n)}},{key:"_syncIndeterminate",value:function(t){var e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}},{key:"required",get:function(){return this._required},set:function(t){this._required=hy(t)}},{key:"checked",get:function(){return this._checked},set:function(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled},set:function(t){var e=hy(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}},{key:"indeterminate",get:function(){return this._indeterminate},set:function(t){var e=t!=this._indeterminate;this._indeterminate=hy(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}}]),n}(lH);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(ek),ds(mc),fs("tabindex"),ds(aH,8),ds(ix,8),ds(rH,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){var n;1&t&&(Vl(eH,!0),Vl(qx,!0)),2&t&&(Ll(n=Ul())&&(e._inputElement=n.first),Ll(n=Ul())&&(e.ripple=n.first))},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(ou("id",e.id),us("tabindex",null),qs("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[vu([sH]),Zo],ngContentSelectors:iH,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(Ps(),vs(0,"label",0,1),vs(2,"div",2),vs(3,"input",3,4),Ss("change",(function(t){return e._onInteractionEvent(t)}))("click",(function(t){return e._onInputClick(t)})),gs(),vs(5,"div",5),ys(6,"div",6),gs(),ys(7,"div",7),vs(8,"div",8),ni(),vs(9,"svg",9),ys(10,"path",10),gs(),ii(),ys(11,"div",11),gs(),gs(),vs(12,"span",12,13),Ss("cdkObserveContent",(function(){return e._onLabelTextChange()})),vs(14,"span",14),nu(15,"\xa0"),gs(),Ms(16),gs(),gs()),2&t){var n=hs(1),i=hs(13);us("for",e.inputId),Xr(2),qs("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),Xr(1),ps("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),us("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),Xr(2),ps("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",fl(19,nH))}},directives:[qx,Ib],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t}(),hH={provide:fD,useExisting:Ht((function(){return dH})),multi:!0},dH=function(){var t=function(t){f(n,t);var e=g(n);function n(){return y(this,n),e.apply(this,arguments)}return n}(ME);return t.\u0275fac=function(e){return fH(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[vu([hH]),Zo]}),t}(),fH=Ui(dH),pH=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),mH=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Yx,mx,Ob,pH],mx,pH]}),t}(),vH=["*"],gH=new re("MatChipRemove"),yH=new re("MatChipAvatar"),_H=new re("MatChipTrailingIcon"),bH=_x(gx(yx((function t(e){y(this,t),this._elementRef=e})),"primary"),-1),kH=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-chip-avatar"],["","matChipAvatar",""]],hostAttrs:[1,"mat-chip-avatar"],features:[vu([{provide:yH,useExisting:t}])]}),t}(),wH=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-chip-trailing-icon"],["","matChipTrailingIcon",""]],hostAttrs:[1,"mat-chip-trailing-icon"],features:[vu([{provide:_H,useExisting:t}])]}),t}(),CH=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o,s,u,l,c){var h;return y(this,n),(h=e.call(this,t))._elementRef=t,h._ngZone=i,h._changeDetectorRef=u,h._hasFocus=!1,h.chipListSelectable=!0,h._chipListMultiple=!1,h._chipListDisabled=!1,h._selected=!1,h._selectable=!0,h._disabled=!1,h._removable=!0,h._onFocus=new U,h._onBlur=new U,h.selectionChange=new xl,h.destroyed=new xl,h.removed=new xl,h._addHostClassName(),h._chipRippleTarget=(c||document).createElement("div"),h._chipRippleTarget.classList.add("mat-chip-ripple"),h._elementRef.nativeElement.appendChild(h._chipRippleTarget),h._chipRipple=new zx(a(h),i,h._chipRippleTarget,r),h._chipRipple.setupTriggerEvents(t),h.rippleConfig=o||{},h._animationsDisabled="NoopAnimations"===s,h.tabIndex=null!=l&&parseInt(l)||-1,h}return b(n,[{key:"_addHostClassName",value:function(){var t="mat-basic-chip",e=this._elementRef.nativeElement;e.hasAttribute(t)||e.tagName.toLowerCase()===t?e.classList.add(t):e.classList.add("mat-standard-chip")}},{key:"ngOnDestroy",value:function(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._markForCheck())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._markForCheck())}},{key:"selectViaInteraction",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._markForCheck())}},{key:"toggleSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._selected=!this.selected,this._dispatchSelectionChange(t),this._markForCheck(),this.selected}},{key:"focus",value:function(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}},{key:"remove",value:function(){this.removable&&this.removed.emit({chip:this})}},{key:"_handleClick",value:function(t){this.disabled?t.preventDefault():t.stopPropagation()}},{key:"_handleKeydown",value:function(t){if(!this.disabled)switch(t.keyCode){case 46:case 8:this.remove(),t.preventDefault();break;case L_:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}},{key:"_blur",value:function(){var t=this;this._ngZone.onStable.pipe(Gp(1)).subscribe((function(){t._ngZone.run((function(){t._hasFocus=!1,t._onBlur.next({chip:t})}))}))}},{key:"_dispatchSelectionChange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}},{key:"_markForCheck",value:function(){this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}},{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||!!this.rippleConfig.disabled}},{key:"selected",get:function(){return this._selected},set:function(t){var e=hy(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}},{key:"value",get:function(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t}},{key:"selectable",get:function(){return this._selectable&&this.chipListSelectable},set:function(t){this._selectable=hy(t)}},{key:"disabled",get:function(){return this._chipListDisabled||this._disabled},set:function(t){this._disabled=hy(t)}},{key:"removable",get:function(){return this._removable},set:function(t){this._removable=hy(t)}},{key:"ariaSelected",get:function(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}}]),n}(bH);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(mc),ds(Jy),ds(Wx,8),ds(ix,8),ds(Eo),fs("tabindex"),ds(Zc,8))},t.\u0275dir=ze({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,n){var i;1&t&&(jl(n,yH,!0),jl(n,_H,!0),jl(n,gH,!0)),2&t&&(Ll(i=Ul())&&(e.avatar=i.first),Ll(i=Ul())&&(e.trailingIcon=i.first),Ll(i=Ul())&&(e.removeIcon=i.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&Ss("click",(function(t){return e._handleClick(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()})),2&t&&(us("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),qs("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[Zo]}),t}(),xH=function(){var t=function(){function t(e,n){y(this,t),this._parentChip=e,n&&"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}return b(t,[{key:"_handleClick",value:function(t){var e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(CH),ds(ku))},t.\u0275dir=ze({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&Ss("click",(function(t){return e._handleClick(t)}))},features:[vu([{provide:gH,useExisting:t}])]}),t}(),SH=new re("mat-chips-default-options"),DH=bx((function t(e,n,i,r){y(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r})),EH=0,AH=function t(e,n){y(this,t),this.source=e,this.value=n},IH=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,o,s,u,l){var c;return y(this,n),(c=e.call(this,u,o,s,l))._elementRef=t,c._changeDetectorRef=i,c._dir=r,c.ngControl=l,c.controlType="mat-chip-list",c._lastDestroyedChipIndex=null,c._destroyed=new U,c._uid="mat-chip-list-".concat(EH++),c._tabIndex=0,c._userTabIndex=null,c._onTouched=function(){},c._onChange=function(){},c._multiple=!1,c._compareWith=function(t,e){return t===e},c._required=!1,c._disabled=!1,c.ariaOrientation="horizontal",c._selectable=!0,c.change=new xl,c.valueChange=new xl,c.ngControl&&(c.ngControl.valueAccessor=a(c)),c}return b(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new zb(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(zy(this._destroyed)).subscribe((function(e){return t._keyManager.withHorizontalOrientation(e)})),this._keyManager.tabOut.pipe(zy(this._destroyed)).subscribe((function(){t._allowFocusEscape()})),this.chips.changes.pipe(Xp(null),zy(this._destroyed)).subscribe((function(){t.disabled&&Promise.resolve().then((function(){t._syncChipsState()})),t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips(),t.stateChanges.next()}))}},{key:"ngOnInit",value:function(){this._selectionModel=new f_(this.multiple,void 0,!1),this.stateChanges.next()}},{key:"ngDoCheck",value:function(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}},{key:"registerInput",value:function(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"writeValue",value:function(t){this.chips&&this._setSelectionByValue(t,!1)}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this.stateChanges.next()}},{key:"onContainerClick",value:function(t){this._originatesFromChip(t)||this.focus()}},{key:"focus",value:function(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}},{key:"_focusInput",value:function(t){this._chipInput&&this._chipInput.focus(t)}},{key:"_keydown",value:function(t){var e=t.target;8===t.keyCode&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}},{key:"_updateTabIndex",value:function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}},{key:"_updateFocusForDestroyedChips",value:function(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){var t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}},{key:"_isValidIndex",value:function(t){return t>=0&&t1&&void 0!==arguments[1])||arguments[1];if(this._clearSelection(),this.chips.forEach((function(t){return t.deselect()})),Array.isArray(t))t.forEach((function(t){return e._selectValue(t,n)})),this._sortValues();else{var i=this._selectValue(t,n);i&&n&&this._keyManager.setActiveItem(i)}}},{key:"_selectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.chips.find((function(n){return null!=n.value&&e._compareWith(n.value,t)}));return i&&(n?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then((function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())}))}},{key:"_clearSelection",value:function(t){this._selectionModel.clear(),this.chips.forEach((function(e){e!==t&&e.deselect()})),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach((function(e){e.selected&&t._selectionModel.select(e)})),this.stateChanges.next())}},{key:"_propagateChanges",value:function(t){var e;e=Array.isArray(this.selected)?this.selected.map((function(t){return t.value})):this.selected?this.selected.value:t,this._value=e,this.change.emit(new AH(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}},{key:"_blur",value:function(){var t=this;this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout((function(){t.focused||t._markAsTouched()})):this._markAsTouched())}},{key:"_markAsTouched",value:function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_allowFocusEscape",value:function(){var t=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout((function(){t._tabIndex=t._userTabIndex||0,t._changeDetectorRef.markForCheck()})))}},{key:"_resetChips",value:function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}},{key:"_dropSubscriptions",value:function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}},{key:"_listenToChipsSelection",value:function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe((function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach((function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()})),e.isUserInput&&t._propagateChanges()}))}},{key:"_listenToChipsFocus",value:function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe((function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItem(n),t.stateChanges.next()})),this._chipBlurSubscription=this.chipBlurChanges.subscribe((function(){t._blur(),t.stateChanges.next()}))}},{key:"_listenToChipsRemoved",value:function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe((function(e){var n=e.chip,i=t.chips.toArray().indexOf(e.chip);t._isValidIndex(i)&&n._hasFocus&&(t._lastDestroyedChipIndex=i)}))}},{key:"_originatesFromChip",value:function(t){for(var e=t.target;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}},{key:"_hasFocusedChip",value:function(){return this.chips&&this.chips.some((function(t){return t._hasFocus}))}},{key:"_syncChipsState",value:function(){var t=this;this.chips&&this.chips.forEach((function(e){e._chipListDisabled=t._disabled,e._chipListMultiple=t.multiple}))}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"role",get:function(){return this.empty?null:"listbox"}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=hy(t),this._syncChipsState()}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t}},{key:"id",get:function(){return this._chipInput?this._chipInput.id:this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=hy(t),this.stateChanges.next()}},{key:"placeholder",get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"focused",get:function(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}},{key:"empty",get:function(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}},{key:"shouldLabelFloat",get:function(){return!this.empty||this.focused}},{key:"disabled",get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=hy(t),this._syncChipsState()}},{key:"selectable",get:function(){return this._selectable},set:function(t){var e=this;this._selectable=hy(t),this.chips&&this.chips.forEach((function(t){return t.chipListSelectable=e._selectable}))}},{key:"tabIndex",set:function(t){this._userTabIndex=t,this._tabIndex=t}},{key:"chipSelectionChanges",get:function(){return ht.apply(void 0,l(this.chips.map((function(t){return t.selectionChange}))))}},{key:"chipFocusChanges",get:function(){return ht.apply(void 0,l(this.chips.map((function(t){return t._onFocus}))))}},{key:"chipBlurChanges",get:function(){return ht.apply(void 0,l(this.chips.map((function(t){return t._onBlur}))))}},{key:"chipRemoveChanges",get:function(){return ht.apply(void 0,l(this.chips.map((function(t){return t.destroyed}))))}}]),n}(DH);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Eo),ds(s_,8),ds(cE,8),ds(CE,8),ds(Fx),ds(sD,10))},t.\u0275cmp=Fe({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,n){var i;1&t&&jl(n,CH,!0),2&t&&Ll(i=Ul())&&(e.chips=i)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&Ss("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(ou("id",e._uid),us("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),qs("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[vu([{provide:UO,useExisting:t}]),Zo],ngContentSelectors:vH,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(Ps(),vs(0,"div",0),Ms(1),gs())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t}(),OH=0,TH=function(){var t=function(){function t(e,n){y(this,t),this._elementRef=e,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new xl,this.placeholder="",this.id="mat-chip-list-input-".concat(OH++),this._disabled=!1,this._inputElement=this._elementRef.nativeElement}return b(t,[{key:"ngOnChanges",value:function(){this._chipList.stateChanges.next()}},{key:"_keydown",value:function(t){t&&9===t.keyCode&&!U_(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}},{key:"_blur",value:function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}},{key:"_focus",value:function(){this.focused=!0,this._chipList.stateChanges.next()}},{key:"_emitChipEnd",value:function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}},{key:"_onInput",value:function(){this._chipList.stateChanges.next()}},{key:"focus",value:function(t){this._inputElement.focus(t)}},{key:"_isSeparatorKey",value:function(t){return!U_(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}},{key:"chipList",set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))}},{key:"addOnBlur",get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=hy(t)}},{key:"disabled",get:function(){return this._disabled||this._chipList&&this._chipList.disabled},set:function(t){this._disabled=hy(t)}},{key:"empty",get:function(){return!this._inputElement.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(SH))},t.\u0275dir=ze({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&Ss("keydown",(function(t){return e._keydown(t)}))("blur",(function(){return e._blur()}))("focus",(function(){return e._focus()}))("input",(function(){return e._onInput()})),2&t&&(ou("id",e.id),us("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[nn]}),t}(),RH={separatorKeyCodes:[M_]},PH=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[Fx,{provide:SH,useValue:RH}]}),t}(),MH=0,FH=new re("CdkAccordion"),LH=function(){var t=function(){function t(){y(this,t),this._stateChanges=new U,this._openCloseAllActions=new U,this.id="cdk-accordion-".concat(MH++),this._multi=!1}return b(t,[{key:"openAll",value:function(){this._openCloseAll(!0)}},{key:"closeAll",value:function(){this._openCloseAll(!1)}},{key:"ngOnChanges",value:function(t){this._stateChanges.next(t)}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_openCloseAll",value:function(t){this.multi&&this._openCloseAllActions.next(t)}},{key:"multi",get:function(){return this._multi},set:function(t){this._multi=hy(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[vu([{provide:FH,useExisting:t}]),nn]}),t}(),NH=0,VH=function(){var t=function(){function t(e,n,i){var r=this;y(this,t),this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=i,this._openCloseAllSubscription=D.EMPTY,this.closed=new xl,this.opened=new xl,this.destroyed=new xl,this.expandedChange=new xl,this.id="cdk-accordion-child-".concat(NH++),this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=i.listen((function(t,e){r.accordion&&!r.accordion.multi&&r.accordion.id===e&&r.id!==t&&(r.expanded=!1)})),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}return b(t,[{key:"ngOnDestroy",value:function(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}},{key:"toggle",value:function(){this.disabled||(this.expanded=!this.expanded)}},{key:"close",value:function(){this.disabled||(this.expanded=!1)}},{key:"open",value:function(){this.disabled||(this.expanded=!0)}},{key:"_subscribeToOpenCloseAllActions",value:function(){var t=this;return this.accordion._openCloseAllActions.subscribe((function(e){t.disabled||(t.expanded=e)}))}},{key:"expanded",get:function(){return this._expanded},set:function(t){t=hy(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=hy(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(FH,12),ds(Eo),ds(p_))},t.\u0275dir=ze({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[vu([{provide:FH,useValue:void 0}])]}),t}(),BH=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),jH=["body"];function zH(t,e){}var HH=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],UH=["mat-expansion-panel-header","*","mat-action-row"];function WH(t,e){1&t&&ys(0,"span",2),2&t&&ps("@indicatorRotate",Ts()._getExpandedState())}var qH=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],YH=["mat-panel-title","mat-panel-description","*"],GH=new re("MAT_ACCORDION"),KH="225ms cubic-bezier(0.4,0.0,0.2,1)",ZH={indicatorRotate:fk("indicatorRotate",[yk("collapsed, void",gk({transform:"rotate(0deg)"})),yk("expanded",gk({transform:"rotate(180deg)"})),bk("expanded <=> collapsed, void => collapsed",pk(KH))]),bodyExpansion:fk("bodyExpansion",[yk("collapsed, void",gk({height:"0px",visibility:"hidden"})),yk("expanded",gk({height:"*",visibility:"visible"})),bk("expanded <=> collapsed, void => collapsed",pk(KH))])},$H=function(){var t=function t(e){y(this,t),this._template=e};return t.\u0275fac=function(e){return new(e||t)(ds(qu))},t.\u0275dir=ze({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]}),t}(),XH=0,QH=new re("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),JH=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r,a,o,s,u){var l;return y(this,n),(l=e.call(this,t,i,r))._viewContainerRef=a,l._animationMode=s,l._hideToggle=!1,l.afterExpand=new xl,l.afterCollapse=new xl,l._inputChanges=new U,l._headerId="mat-expansion-panel-header-".concat(XH++),l._bodyAnimationDone=new U,l.accordion=t,l._document=o,l._bodyAnimationDone.pipe(Oy((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState}))).subscribe((function(t){"void"!==t.fromState&&("expanded"===t.toState?l.afterExpand.emit():"collapsed"===t.toState&&l.afterCollapse.emit())})),u&&(l.hideToggle=u.hideToggle),l}return b(n,[{key:"_hasSpacing",value:function(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}},{key:"_getExpandedState",value:function(){return this.expanded?"expanded":"collapsed"}},{key:"toggle",value:function(){this.expanded=!this.expanded}},{key:"close",value:function(){this.expanded=!1}},{key:"open",value:function(){this.expanded=!0}},{key:"ngAfterContentInit",value:function(){var t=this;this._lazyContent&&this.opened.pipe(Xp(null),Vf((function(){return t.expanded&&!t._portal})),Gp(1)).subscribe((function(){t._portal=new C_(t._lazyContent._template,t._viewContainerRef)}))}},{key:"ngOnChanges",value:function(t){this._inputChanges.next(t)}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"ngOnDestroy",this).call(this),this._bodyAnimationDone.complete(),this._inputChanges.complete()}},{key:"_containsFocus",value:function(){if(this._body){var t=this._document.activeElement,e=this._body.nativeElement;return t===e||e.contains(t)}return!1}},{key:"hideToggle",get:function(){return this._hideToggle||this.accordion&&this.accordion.hideToggle},set:function(t){this._hideToggle=hy(t)}},{key:"togglePosition",get:function(){return this._togglePosition||this.accordion&&this.accordion.togglePosition},set:function(t){this._togglePosition=t}}]),n}(VH);return t.\u0275fac=function(e){return new(e||t)(ds(GH,12),ds(Eo),ds(p_),ds(Gu),ds(Zc),ds(ix,8),ds(QH,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(t,e,n){var i;1&t&&jl(n,$H,!0),2&t&&Ll(i=Ul())&&(e._lazyContent=i.first)},viewQuery:function(t,e){var n;1&t&&Vl(jH,!0),2&t&&Ll(n=Ul())&&(e._body=n.first)},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,e){2&t&&qs("mat-expanded",e.expanded)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-expansion-panel-spacing",e._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[vu([{provide:GH,useValue:void 0}]),Zo,nn],ngContentSelectors:UH,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,e){1&t&&(Ps(HH),Ms(0),vs(1,"div",0,1),Ss("@bodyExpansion.done",(function(t){return e._bodyAnimationDone.next(t)})),vs(3,"div",2),Ms(4,1),cs(5,zH,0,0,"ng-template",3),gs(),Ms(6,2),gs()),2&t&&(Xr(1),ps("@bodyExpansion",e._getExpandedState())("id",e.id),us("aria-labelledby",e._headerId),Xr(4),ps("cdkPortalOutlet",e._portal))},directives:[A_],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[ZH.bodyExpansion]},changeDetection:0}),t}(),tU=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-action-row"]],hostAttrs:[1,"mat-action-row"]}),t}(),eU=function(){var t=function(){function t(e,n,i,r,a,o){var s=this;y(this,t),this.panel=e,this._element=n,this._focusMonitor=i,this._changeDetectorRef=r,this._animationMode=o,this._parentChangeSubscription=D.EMPTY;var u=e.accordion?e.accordion._stateChanges.pipe(Vf((function(t){return!(!t.hideToggle&&!t.togglePosition)}))):Ip;this._parentChangeSubscription=ht(e.opened,e.closed,u,e._inputChanges.pipe(Vf((function(t){return!!(t.hideToggle||t.disabled||t.togglePosition)})))).subscribe((function(){return s._changeDetectorRef.markForCheck()})),e.closed.pipe(Vf((function(){return e._containsFocus()}))).subscribe((function(){return i.focusVia(n,"program")})),a&&(this.expandedHeight=a.expandedHeight,this.collapsedHeight=a.collapsedHeight)}return b(t,[{key:"_toggle",value:function(){this.disabled||this.panel.toggle()}},{key:"_isExpanded",value:function(){return this.panel.expanded}},{key:"_getExpandedState",value:function(){return this.panel._getExpandedState()}},{key:"_getPanelId",value:function(){return this.panel.id}},{key:"_getTogglePosition",value:function(){return this.panel.togglePosition}},{key:"_showToggle",value:function(){return!this.panel.hideToggle&&!this.panel.disabled}},{key:"_getHeaderHeight",value:function(){var t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}},{key:"_keydown",value:function(t){switch(t.keyCode){case L_:case M_:U_(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._element,t,e)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._element).subscribe((function(e){e&&t.panel.accordion&&t.panel.accordion._handleHeaderFocus(t)}))}},{key:"ngOnDestroy",value:function(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}},{key:"disabled",get:function(){return this.panel.disabled}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ds(JH,1),ds(ku),ds(ek),ds(Eo),ds(QH,8),ds(ix,8))},t.\u0275cmp=Fe({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&Ss("click",(function(){return e._toggle()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(us("id",e.panel._headerId)("tabindex",e.disabled?-1:0)("aria-controls",e._getPanelId())("aria-expanded",e._isExpanded())("aria-disabled",e.panel.disabled),Ws("height",e._getHeaderHeight()),qs("mat-expanded",e._isExpanded())("mat-expansion-toggle-indicator-after","after"===e._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===e._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:YH,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,e){1&t&&(Ps(qH),vs(0,"span",0),Ms(1),Ms(2,1),Ms(3,2),gs(),cs(4,WH,1,1,"span",1)),2&t&&(Xr(4),ps("ngIf",e._showToggle()))},directives:[yd],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}\n'],encapsulation:2,data:{animation:[ZH.indicatorRotate]},changeDetection:0}),t}(),nU=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),t}(),iU=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),t}(),rU=function(){var t=function(t){f(n,t);var e=g(n);function n(){var t;return y(this,n),(t=e.apply(this,arguments))._ownHeaders=new Dl,t._hideToggle=!1,t.displayMode="default",t.togglePosition="after",t}return b(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._headers.changes.pipe(Xp(this._headers)).subscribe((function(e){t._ownHeaders.reset(e.filter((function(e){return e.panel.accordion===t}))),t._ownHeaders.notifyOnChanges()})),this._keyManager=new zb(this._ownHeaders).withWrap().withHomeAndEnd()}},{key:"_handleHeaderKeydown",value:function(t){this._keyManager.onKeydown(t)}},{key:"_handleHeaderFocus",value:function(t){this._keyManager.updateActiveItem(t)}},{key:"hideToggle",get:function(){return this._hideToggle},set:function(t){this._hideToggle=hy(t)}}]),n}(LH);return t.\u0275fac=function(e){return aU(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-accordion"]],contentQueries:function(t,e,n){var i;1&t&&jl(n,eU,!0),2&t&&Ll(i=Ul())&&(e._headers=i)},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,e){2&t&&qs("mat-accordion-multi",e.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[vu([{provide:GH,useExisting:t}]),Zo]}),t}(),aU=Ui(rU),oU=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Qd,BH,T_]]}),t}(),sU=["*",[["mat-toolbar-row"]]],uU=["*","mat-toolbar-row"],lU=gx((function t(e){y(this,t),this._elementRef=e})),cU=function(){var t=function t(){y(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ze({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t}(),hU=function(){var t=function(t){f(n,t);var e=g(n);function n(t,i,r){var a;return y(this,n),(a=e.call(this,t))._platform=i,a._document=r,a}return b(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe((function(){return t._checkToolbarMixedModes()})))}},{key:"_checkToolbarMixedModes",value:function(){}}]),n}(lU);return t.\u0275fac=function(e){return new(e||t)(ds(ku),ds(Jy),ds(Zc))},t.\u0275cmp=Fe({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,n){var i;1&t&&jl(n,cU,!0),2&t&&Ll(i=Ul())&&(e._toolbarRows=i)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&qs("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[Zo],ngContentSelectors:uU,decls:2,vars:0,template:function(t,e){1&t&&(Ps(sU),Ms(0),Ms(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t}(),dU=function(){var t=function t(){y(this,t)};return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[mx],mx]}),t}(),fU=function(){function t(){}return t.\u0275mod=Be({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:eT,useValue:{floatLabel:"always"}},{provide:Cx,useValue:udsData.language}],imports:[Qd,GE,KE,dU,zS,eF,PT,oU,RS,rT,GP,ST,Zj,Mx,EP,qT,rR,MM,mH,UA,PH,oz,lN,BL,qI,iF]}),t}();function pU(t,e){if(1&t){var n=ws();vs(0,"button",6),Ss("click",(function(){In(n);var t=e.$implicit;return Ts().changeLang(t)})),nu(1),gs()}if(2&t){var i=e.$implicit;Xr(1),iu(i.name)}}function mU(t,e){if(1&t&&(vs(0,"button",12),vs(1,"i",7),nu(2,"face"),gs(),nu(3),gs()),2&t){var n=Ts();ps("matMenuTriggerFor",hs(7)),Xr(3),iu(n.api.user.user)}}function vU(t,e){if(1&t&&(vs(0,"button",18),nu(1),vs(2,"i",7),nu(3,"arrow_drop_down"),gs(),gs()),2&t){var n=Ts();ps("matMenuTriggerFor",hs(7)),Xr(1),ru("",n.api.user.user," ")}}var gU=function(){function t(t){this.api=t,this.isNavbarCollapsed=!0;var e=t.config.language;this.langs=[];for(var n=0,i=t.config.available_languages;n .mat-button[_ngcontent-%COMP%]{padding-left:1.5rem}.icon[_ngcontent-%COMP%]{width:24px;margin:0 1em 0 0}"]}),t}();function wU(t,e){1&t&&ys(0,"div",1),2&t&&ps("innerHTML",Ts().messages,Or)}var CU=function(){function t(t){this.api=t,this.messages="",this.visible=!1}return t.prototype.ngOnInit=function(){var t=this;if(this.api.notices.length>0){var e='
';this.messages='
'+e+this.api.notices.map((function(t){return t.replace(/ /gm," ").replace(/([A-Z]+[A-Z]+)/gm,"$1").replace(/([0-9]+)/gm,"$1")})).join("
"+e)+"
",this.api.gui.alert("",this.messages,0,"80%").subscribe((function(){t.visible=!0}))}},t.\u0275fac=function(e){return new(e||t)(ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-notices"]],decls:1,vars:1,consts:[["class","notice",3,"innerHTML",4,"ngIf"],[1,"notice",3,"innerHTML"]],template:function(t,e){1&t&&cs(0,wU,1,1,"div",0),2&t&&ps("ngIf",e.visible)},directives:[yd],styles:[".notice[_ngcontent-%COMP%]{display:block} .warn-notice-container{background:#4682b4;border-radius:3px;box-shadow:0 4px 20px 0 rgba(0,0,0,.14),0 7px 10px -5px rgba(70,93,156,.4);box-sizing:border-box;color:#fff;margin:1rem 2rem 0;padding:15px;word-wrap:break-word;display:flex;flex-direction:column} .warn-notice{display:block;width:100%;text-align:center;font-size:1.1em;margin-bottom:.5rem}"]}),t}(),xU=function(){function t(){}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-footer"]],decls:4,vars:0,consts:[["href","https://www.udsenterprise.com"]],template:function(t,e){1&t&&(vs(0,"div"),nu(1,"\xa9 2012-2020 "),vs(2,"a",0),nu(3,"Virtual Cable S.L.U."),gs(),gs())},styles:[""]}),t}(),SU=function(){function t(){this.title="uds admin"}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-root"]],decls:8,vars:0,consts:[[1,"page"],[1,"content"],[1,"footer"]],template:function(t,e){1&t&&(ys(0,"uds-navbar"),ys(1,"uds-sidebar"),vs(2,"div",0),vs(3,"div",1),ys(4,"uds-notices"),ys(5,"router-outlet"),gs(),vs(6,"div",2),ys(7,"uds-footer"),gs(),gs())},directives:[gU,kU,CU,Wg,xU],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.footer[_ngcontent-%COMP%]{flex-shrink:0;margin:1em;height:1em;display:flex;flex-direction:row;justify-content:flex-end}.content[_ngcontent-%COMP%]{flex:1 0 auto;width:calc(100% - 56px - 8px);margin:4rem auto auto 56px;padding-left:8px;overflow-x:hidden}"]}),t}(),DU=function(t){function e(){var e=t.call(this)||this;return e.itemsPerPageLabel=django.gettext("Items per page"),e}return XI(e,t),e.\u0275prov=It({token:e,factory:e.\u0275fac=function(t){return new(t||e)}}),e}(jT),EU=function(){function t(){}return t.prototype.transform=function(t,e){return Array.from(t)},t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=He({name:"iterable",type:t,pure:!0}),t}(),AU=function(){function t(){this.changed=new xl}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-text"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:6,consts:[["appearance","standard"],["matInput","","type","text",3,"ngModel","placeholder","required","disabled","maxlength","ngModelChange","change"]],template:function(t,e){1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",1),Ss("ngModelChange",(function(t){return e.field.value=t}))("change",(function(){return e.changed.emit(e)})),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("maxlength",e.field.gui.length||128))},directives:[iT,GO,YP,iD,lD,gE,PE,zE],styles:[""]}),t}(),IU=function(){function t(){this.changed=new xl}return t.prototype.ngOnInit=function(){this.field.value||0===this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-numeric"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","number",3,"ngModel","placeholder","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",1),Ss("ngModelChange",(function(t){return e.field.value=t}))("change",(function(){return e.changed.emit(e)})),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly))},directives:[iT,GO,YP,CD,iD,lD,gE,PE],styles:[""]}),t}(),OU=function(){function t(){this.passwordType="password",this.changed=new xl}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-password"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[["appearance","standard","floatLabel","always"],["matInput","","autocomplete","off",3,"ngModel","placeholder","required","disabled","type","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],["matSuffix","",1,"material-icons"]],template:function(t,e){1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",1),Ss("ngModelChange",(function(t){return e.field.value=t}))("change",(function(){return e.changed.emit(e)})),gs(),vs(4,"a",2),Ss("click",(function(){return e.passwordType="text"===e.passwordType?"password":"text"})),vs(5,"i",3),nu(6,"remove_red_eye"),gs(),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("type",e.passwordType))},directives:[iT,GO,YP,iD,lD,gE,PE,jS,QO],styles:[""]}),t}(),TU=function(){function t(){}return t.prototype.ngOnInit=function(){""!==this.field.value&&void 0!==this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-hidden"]],inputs:{field:"field"},decls:0,vars:0,template:function(t,e){},styles:[""]}),t}(),RU=function(){function t(){}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-textbox"]],inputs:{field:"field",value:"value"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","auto"],["matInput","","type","text",3,"ngModel","placeholder","required","readonly","ngModelChange"]],template:function(t,e){1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"textarea",1),Ss("ngModelChange",(function(t){return e.field.value=t})),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",e.field.gui.required)("readonly",e.field.gui.rdonly))},directives:[iT,GO,YP,iD,lD,gE,PE],styles:[""]}),t}();function PU(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",3),Ss("changed",(function(t){return In(n),Ts().filter=t})),gs()}}function MU(t,e){if(1&t&&(vs(0,"mat-option",4),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.text," ")}}var FU=function(){function t(){this.filter="",this.changed=new xl}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>0&&(this.field.value=this.field.gui.values[0].id),this.field.value=""+this.field.value},t.prototype.filteredValues=function(){if(""===this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter((function(e){return e.text.toLocaleLowerCase().includes(t)}))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-choice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[[3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"mat-select",0),Ss("ngModelChange",(function(t){return e.field.value=t}))("valueChange",(function(){return e.changed.emit(e)})),cs(4,PU,1,0,"uds-mat-select-search",1),cs(5,MU,2,2,"mat-option",2),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Xr(1),ps("ngIf",e.field.gui.values.length>10),Xr(1),ps("ngForOf",e.filteredValues()))},directives:[iT,GO,xT,lD,gE,PE,yd,vd,QP,oS],styles:[""]}),t}();function LU(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",3),Ss("changed",(function(t){return In(n),Ts().filter=t})),gs()}}function NU(t,e){if(1&t&&(vs(0,"mat-option",4),nu(1),gs()),2&t){var n=e.$implicit;ps("value",n.id),Xr(1),ru(" ",n.text," ")}}var VU=function(){function t(){this.filter="",this.changed=new xl}return t.prototype.ngOnInit=function(){this.field.value=void 0,void 0!==this.field.values?this.field.values.forEach((function(t,e,n){n[e]=""+t.id})):this.field.values=new Array},t.prototype.filteredValues=function(){if(""===this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter((function(e){return e.text.toLocaleLowerCase().includes(t)}))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-multichoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[["multiple","",3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"mat-select",0),Ss("ngModelChange",(function(t){return e.field.values=t}))("valueChange",(function(){return e.changed.emit(e)})),cs(4,LU,1,0,"uds-mat-select-search",1),cs(5,NU,2,2,"mat-option",2),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("ngModel",e.field.values)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Xr(1),ps("ngIf",e.field.gui.values.length>10),Xr(1),ps("ngForOf",e.filteredValues()))},directives:[iT,GO,xT,lD,gE,PE,yd,vd,QP,oS],styles:[""]}),t}();function BU(t,e){if(1&t){var n=ws();vs(0,"div",12),vs(1,"div",13),nu(2),gs(),vs(3,"div",14),nu(4," \xa0"),vs(5,"a",15),Ss("click",(function(){In(n);var t=e.index;return Ts().removeElement(t)})),vs(6,"i",16),nu(7,"close"),gs(),gs(),gs(),gs()}if(2&t){var i=e.$implicit;Xr(2),ru(" ",i," ")}}var jU=function(){function t(t,e,n,i){var r=this;this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.values=[],this.input="",this.onSave=new xl(!0),this.data.values.forEach((function(t){return r.values.push(t)}))}return t.launch=function(e,n,i){var r=window.innerWidth<800?"50%":"30%";return e.gui.dialog.open(t,{width:r,data:{title:n,values:i},disableClose:!0}).componentInstance.onSave},t.prototype.addElements=function(){var t=this;this.input.split(",").forEach((function(e){t.values.push(e)})),this.input=""},t.prototype.checkKey=function(t){"Enter"===t.code&&this.addElements()},t.prototype.removeAll=function(){this.values.length=0},t.prototype.removeElement=function(t){this.values.splice(t,1)},t.prototype.save=function(){var t=this;this.data.values.length=0,this.values.forEach((function(e){return t.data.values.push(e)})),this.onSave.emit(this.values),this.dialogRef.close()},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(ds(KI),ds(gO),ds(yS),ds(bS))},t.\u0275cmp=Fe({type:t,selectors:[["uds-editlist-editor"]],decls:23,vars:3,consts:[["mat-dialog-title",""],[1,"content"],[1,"list"],["class","elem",4,"ngFor","ngForOf"],[1,"buttons"],["mat-raised-button","","color","warn",3,"click"],[1,"input"],[1,"example-full-width"],["type","text","matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","",1,"material-icons",3,"click"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[1,"elem"],[1,"val"],[1,"remove"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(vs(0,"h4",0),nu(1),gs(),vs(2,"mat-dialog-content"),vs(3,"div",1),vs(4,"div",2),cs(5,BU,8,1,"div",3),gs(),vs(6,"div",4),vs(7,"button",5),Ss("click",(function(){return e.removeAll()})),vs(8,"uds-translate"),nu(9,"Remove all"),gs(),gs(),gs(),vs(10,"div",6),vs(11,"mat-form-field",7),vs(12,"input",8),Ss("keyup",(function(t){return e.checkKey(t)}))("ngModelChange",(function(t){return e.input=t})),gs(),vs(13,"button",9),Ss("click",(function(){return e.addElements()})),vs(14,"uds-translate"),nu(15,"Add"),gs(),gs(),gs(),gs(),gs(),gs(),vs(16,"mat-dialog-actions"),vs(17,"button",10),vs(18,"uds-translate"),nu(19,"Cancel"),gs(),gs(),vs(20,"button",11),Ss("click",(function(){return e.save()})),vs(21,"uds-translate"),nu(22,"Ok"),gs(),gs(),gs()),2&t&&(Xr(1),ru(" ",e.data.title,"\n"),Xr(4),ps("ngForOf",e.values),Xr(7),ps("ngModel",e.input))},directives:[AS,IS,vd,BS,HS,iT,YP,iD,lD,gE,QO,OS,ES],styles:[".content[_ngcontent-%COMP%]{width:100%;justify-content:space-between;justify-self:center}.content[_ngcontent-%COMP%], .list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.list[_ngcontent-%COMP%]{margin:1rem;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);padding:.5rem}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:1rem}.input[_ngcontent-%COMP%]{margin:0 1rem}.elem[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.elem[_ngcontent-%COMP%]:hover{background-color:#333;color:#fff;cursor:default}.val[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),zU=function(){function t(t){this.api=t,this.changed=new xl}return t.prototype.ngOnInit=function(){},t.prototype.launch=function(){var t=this;void 0===this.field.values&&(this.field.values=[]),jU.launch(this.api,this.field.gui.label,this.field.values).subscribe((function(e){t.changed.emit({field:t.field})}))},t.prototype.getValue=function(){if(void 0===this.field.values)return"";var t=this.field.values.filter((function(t,e,n){return e<5})).join(", ");return this.field.values.length>5&&(t+=django.gettext(", (%i more items)").replace("%i",""+(this.field.values.length-5))),t},t.\u0275fac=function(e){return new(e||t)(ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-editlist"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","text",1,"editlist",3,"readonly","value","placeholder","disabled","click"]],template:function(t,e){1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",1),Ss("click",(function(){return e.launch()})),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("readonly",!0)("value",e.getValue())("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly))},directives:[iT,GO,YP],styles:[".editlist[_ngcontent-%COMP%]{cursor:pointer}"]}),t}(),HU=function(){function t(){this.changed=new xl}return t.prototype.ngOnInit=function(){var t;this.field.value=kM(""===(t=this.field.value)||null==t?this.field.gui.defvalue:this.field.value)},t.prototype.getValue=function(){return kM(this.field.value)?django.gettext("Yes"):django.gettext("No")},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-checkbox"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:5,vars:5,consts:[[1,"mat-form-field-infix"],[1,"label"],[3,"ngModel","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(vs(0,"div",0),vs(1,"span",1),nu(2),gs(),vs(3,"mat-slide-toggle",2),Ss("ngModelChange",(function(t){return e.field.value=t}))("change",(function(){return e.changed.emit(e)})),nu(4),gs(),gs()),2&t&&(Xr(2),iu(e.field.gui.label),Xr(1),ps("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Xr(1),ru(" ",e.getValue()," "))},directives:[rN,oN,lD,gE,PE],styles:[".label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function UU(t,e){if(1&t&&ys(0,"div",5),2&t){var n=Ts().$implicit;ps("innerHTML",Ts().asIcon(n),Or)}}function WU(t,e){if(1&t&&(vs(0,"div"),cs(1,UU,1,1,"div",4),gs()),2&t){var n=e.$implicit,i=Ts();Xr(1),ps("ngIf",n.id==i.field.value)}}function qU(t,e){if(1&t){var n=ws();vs(0,"uds-mat-select-search",6),Ss("changed",(function(t){return In(n),Ts().filter=t})),gs()}}function YU(t,e){if(1&t&&(vs(0,"mat-option",7),ys(1,"div",5),gs()),2&t){var n=e.$implicit,i=Ts();ps("value",n.id),Xr(1),ps("innerHTML",i.asIcon(n),Or)}}var GU=function(){function t(t){this.api=t,this.filter="",this.changed=new xl}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>=0&&(this.field.value=this.field.gui.values[0].id)},t.prototype.asIcon=function(t){return this.api.safeString(this.api.gui.icon(t.img)+t.text)},t.prototype.filteredValues=function(){if(""===this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter((function(e){return e.text.toLocaleLowerCase().includes(t)}))},t.\u0275fac=function(e){return new(e||t)(ds(KI))},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-imgchoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:8,vars:8,consts:[[3,"placeholder","ngModel","required","disabled","valueChange","ngModelChange"],[4,"ngFor","ngForOf"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(vs(0,"mat-form-field"),vs(1,"mat-label"),nu(2),gs(),vs(3,"mat-select",0),Ss("valueChange",(function(){return e.changed.emit(e)}))("ngModelChange",(function(t){return e.field.value=t})),vs(4,"mat-select-trigger"),cs(5,WU,2,1,"div",1),gs(),cs(6,qU,1,0,"uds-mat-select-search",2),cs(7,YU,2,2,"mat-option",3),gs(),gs()),2&t&&(Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("placeholder",e.field.gui.tooltip)("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Xr(2),ps("ngForOf",e.field.gui.values),Xr(1),ps("ngIf",e.field.gui.values.length>10),Xr(1),ps("ngForOf",e.filteredValues()))},directives:[iT,GO,xT,lD,gE,PE,CT,vd,yd,QP,oS],styles:[""]}),t}(),KU=function(){function t(){this.changed=new xl,this.value=new Date}return Object.defineProperty(t.prototype,"date",{get:function(){return this.value},set:function(t){this.value!==t&&(this.value=t,this.field.value=pM("%Y-%m-%d",this.value))},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,"2000-01-01"===this.field.value?this.field.value=pM("%Y-01-01"):"2000-01-01"===this.field.value&&(this.field.value=pM("%Y-12-31"));var t=this.field.value.split("-");3===t.length&&(this.value=new Date(+t[0],+t[1]-1,+t[2]))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-date"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","placeholder","disabled","ngModelChange"],["matSuffix","",3,"for"],["endDatePicker",""]],template:function(t,e){if(1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"input",1),Ss("ngModelChange",(function(t){return e.date=t})),gs(),ys(4,"mat-datepicker-toggle",2),ys(5,"mat-datepicker",null,3),gs()),2&t){var n=hs(6);Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("matDatepicker",n)("ngModel",e.date)("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly),Xr(1),ps("for",n)}},directives:[iT,GO,YP,Vj,iD,lD,gE,jj,QO,Tj],styles:[""]}),t}();function ZU(t,e){if(1&t){var n=ws();vs(0,"mat-chip",5),Ss("removed",(function(){In(n);var t=e.$implicit;return Ts().remove(t)})),nu(1),vs(2,"i",6),nu(3,"cancel"),gs(),gs()}if(2&t){var i=e.$implicit,r=Ts();ps("selectable",!1)("removable",!0!==r.field.gui.rdonly),Xr(1),ru(" ",i," ")}}var $U,XU,QU,JU=function(){function t(){this.separatorKeysCodes=[M_,188],this.changed=new xl}return t.prototype.ngOnInit=function(){void 0===this.field.values&&(this.field.values=new Array,this.field.value=void 0),this.field.values.forEach((function(t,e,n){""===t.trim()&&n.splice(e,1)}))},t.prototype.add=function(t){var e=t.input,n=t.value;(n||"").trim()&&this.field.values.push(n.trim()),e&&(e.value="")},t.prototype.remove=function(t){var e=this.field.values.indexOf(t);e>=0&&this.field.values.splice(e,1)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Fe({type:t,selectors:[["uds-field-tags"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:8,consts:[["appearance","standard","floatLabel","always"],[3,"selectable","disabled","change"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],[3,"placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matChipInputTokenEnd"],[3,"selectable","removable","removed"],["matChipRemove","",1,"material-icons"]],template:function(t,e){if(1&t&&(vs(0,"mat-form-field",0),vs(1,"mat-label"),nu(2),gs(),vs(3,"mat-chip-list",1,2),Ss("change",(function(){return e.changed.emit(e)})),cs(5,ZU,4,3,"mat-chip",3),vs(6,"input",4),Ss("matChipInputTokenEnd",(function(t){return e.add(t)})),gs(),gs(),gs()),2&t){var n=hs(4);Xr(2),ru(" ",e.field.gui.label," "),Xr(1),ps("selectable",!1)("disabled",!0===e.field.gui.rdonly),Xr(2),ps("ngForOf",e.field.values),Xr(1),ps("placeholder",e.field.gui.tooltip)("matChipInputFor",n)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",!0)}},directives:[iT,GO,IH,vd,TH,CH,xH],styles:[".mat-chip-trailing-icon[_ngcontent-%COMP%]{position:relative;top:-4px;left:-4px}mat-form-field[_ngcontent-%COMP%]{width:99.5%}"]}),t}(),tW=function(){function t(){}return t.\u0275mod=Be({type:t,bootstrap:[SU]}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[KI,gO,{provide:jT,useClass:DU}],imports:[[Ff,_p,tH,ox,fU]]}),t}();$U=[fd,pd,vd,yd,Ad,Ed,wd,Cd,xd,Sd,Dd,Wg,jg,zg,Ug,Sg,yE,RD,LD,iD,CD,AD,tD,TD,FD,DD,lD,cD,PE,BE,zE,UE,ME,NE,gE,pE,cE,kE,CE,OE,SE,EE,hU,cU,u_,BS,jS,g_,ZM,UM,JM,jM,TT,RT,rU,JH,tU,eU,iU,nU,$H,mS,ES,AS,IS,OS,zO,iT,YO,GO,KO,$O,QO,NP,VP,YP,jP,xT,CT,oS,tS,Cj,ej,Tj,Ij,Vj,jj,Bj,mj,kj,gj,wj,Kj,Uj,Wj,qj,ZR,JR,hP,iP,XR,mP,eP,fP,aP,lP,sP,gP,kP,_P,CP,SP,WT,$T,iR,RM,PM,cH,dH,TA,gA,kA,BA,HA,mA,IH,CH,TH,xH,kH,wH,iz,az,oN,rN,AL,NL,TL,WI,nF,SU,gU,HS,KS,xU,kO,kU,WF,KF,yL,_L,iV,fI,cI,nI,AU,IU,OU,TU,RU,FU,VU,QP,zU,HU,GU,KU,JU,rL,lM,aM,cL,gB,jU,uL,QN,RN,HN,GL,wN,JN,tV,eV,nV,KV,sV,_V,CV,xV,zV,pV,SV,HV,yB,PB,CB,MB,FB,wz,yz,xz,Az,Rz,Tz,Mz,Xz,Qz,CU],XU=[Pd,Nd,Md,Hd,Xd,Yd,Gd,Ld,Kd,Vd,jd,zd,Wd,US,EU,rF],(QU=nI.\u0275cmp).directiveDefs=function(){return $U.map(Le)},QU.pipeDefs=function(){return XU.map(Ne)},function(){if(rr)throw new Error("Cannot enable prod mode after platform setup.");ir=!1}(),Pf().bootstrapModule(tW).catch((function(t){return console.log(t)}))}},[[0,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},"1gqn":function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},KKCa:function(t,e){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},MCLT:function(t,e,n){var i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},i=0;i=a)return t;switch(t){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return t}}),l=i[n];n=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(n)?i.showHidden=n:n&&e._extend(i,n),y(i.showHidden)&&(i.showHidden=!1),y(i.depth)&&(i.depth=2),y(i.colors)&&(i.colors=!1),y(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=l),c(i,t,i.depth)}function l(t,e){var n=s.styles[e];return n?"\x1b["+s.colors[n][0]+"m"+t+"\x1b["+s.colors[n][1]+"m":t}function u(t,e){return t}function c(t,n,i){if(t.customInspect&&n&&C(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var r=n.inspect(i,t);return g(r)||(r=c(t,r,i)),r}var a=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(g(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return v(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(a)return a;var o=Object.keys(n),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),w(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(n);if(0===o.length){if(C(n))return t.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(_(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(k(n))return t.stylize(Date.prototype.toString.call(n),"date");if(w(n))return h(n)}var l,u="",b=!1,S=["{","}"];return f(n)&&(b=!0,S=["[","]"]),C(n)&&(u=" [Function"+(n.name?": "+n.name:"")+"]"),_(n)&&(u=" "+RegExp.prototype.toString.call(n)),k(n)&&(u=" "+Date.prototype.toUTCString.call(n)),w(n)&&(u=" "+h(n)),0!==o.length||b&&0!=n.length?i<0?_(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),l=b?function(t,e,n,i,r){for(var a=[],o=0,s=e.length;o60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(l,u,S)):S[0]+u+S[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,i,r,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]}).get?s=t.stylize(l.set?"[Getter/Setter]":"[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),D(i,r)||(o="["+r+"]"),s||(t.seen.indexOf(l.value)<0?(s=m(n)?c(t,l.value,null):c(t,l.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(a&&r.match(/^\d+$/))return s;(o=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function v(t){return"number"==typeof t}function g(t){return"string"==typeof t}function y(t){return void 0===t}function _(t){return b(t)&&"[object RegExp]"===S(t)}function b(t){return"object"==typeof t&&null!==t}function k(t){return b(t)&&"[object Date]"===S(t)}function w(t){return b(t)&&("[object Error]"===S(t)||t instanceof Error)}function C(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(y(a)&&(a=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=process.pid;o[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,i)}}else o[t]=function(){};return o[t]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=_,e.isObject=b,e.isDate=k,e.isError=w,e.isFunction=C,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n("1gqn");var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=n("KKCa"),e._extend=function(t,e){if(!e||!b(e))return t;for(var n=Object.keys(e),i=n.length;i--;)t[n[i]]=e[n[i]];return t};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!=typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,i=new Promise(function(t,i){e=t,n=i}),r=[],a=0;a=200&&e.status<=299}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var s=i.URL||i.webkitURL,l=document.createElement("a");l.download=e=e||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin!==location.origin?a(l.href)?r(t,e,n):o(l,l.target="_blank"):o(l)):(l.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){o(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(a(t))r(t,e,n);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){o(i)})}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var o="application/octet-stream"===t.type,s=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||o&&s)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},u.readAsDataURL(t)}else{var c=i.URL||i.webkitURL,h=c.createObjectURL(t);a?a.location=h:location.href=h,a=null,setTimeout(function(){c.revokeObjectURL(h)},4e4)}});i.saveAs=s.saveAs=s,t.exports=s},zUnb:function(t,e,n){"use strict";function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(n):a.value}})(t,e,n||t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function h(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function p(t,e,n){return(p=f()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&d(r,n.prototype),r}).apply(null,arguments)}function m(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(i){return i.pipe(st(function(n,i){return it(t(n,i)).pipe(G(function(t,r){return e(n,t,i,r)}))},n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new lt(t,n))})}var lt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;g(this,t),this.project=e,this.concurrent=n}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new ut(t,this.project,this.concurrent))}}]),t}(),ut=function(t){y(n,t);var e=k(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return g(this,n),(r=e.call(this,t)).project=i,r.concurrent=a,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return v(n,[{key:"_next",value:function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(at);function ct(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return st(N,t)}function ht(t,e){return e?nt(t,e):new j($(t))}function dt(){for(var t=Number.POSITIVE_INFINITY,e=null,n=arguments.length,i=new Array(n),r=0;r1&&"number"==typeof i[i.length-1]&&(t=i.pop())):"number"==typeof a&&(t=i.pop()),null===e&&1===i.length&&i[0]instanceof j?i[0]:ct(t)(ht(i,e))}function ft(){return function(t){return t.lift(new pt(t))}}var pt=function(){function t(e){g(this,t),this.connectable=e}return v(t,[{key:"call",value:function(t,e){var n=this.connectable;n._refCount++;var i=new mt(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),t}(),mt=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).connectable=i,r}return v(n,[{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(M),vt=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this)).source=t,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return v(n,[{key:"_subscribe",value:function(t){return this.getSubject().subscribe(t)}},{key:"getSubject",value:function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new A).add(this.source.subscribe(new yt(this.getSubject(),this))),t.closed&&(this._connection=null,t=A.EMPTY)),t}},{key:"refCount",value:function(){return ft()(this)}}]),n}(j),gt=function(){var t=vt.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),yt=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).connectable=i,r}return v(n,[{key:"_error",value:function(t){this._unsubscribe(),r(i(n.prototype),"_error",this).call(this,t)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),r(i(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}]),n}(U);function _t(){return new q}function bt(t){for(var e in t)if(t[e]===bt)return e;throw Error("Could not find renamed property on target object.")}function kt(t,e){for(var n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function wt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(wt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function Ct(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}var St=bt({__forward_ref__:bt});function xt(t){return t.__forward_ref__=xt,t.toString=function(){return wt(this())},t}function Et(t){return At(t)?t():t}function At(t){return"function"==typeof t&&t.hasOwnProperty(St)&&t.__forward_ref__===xt}function Dt(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ot(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function It(t){return Tt(t,Mt)||Tt(t,Lt)}function Tt(t,e){return t.hasOwnProperty(e)?t[e]:null}function Rt(t){return t&&(t.hasOwnProperty(Ft)||t.hasOwnProperty(Nt))?t[Ft]:null}var Pt,Mt=bt({"\u0275prov":bt}),Ft=bt({"\u0275inj":bt}),Lt=bt({ngInjectableDef:bt}),Nt=bt({ngInjectorDef:bt}),Vt=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function jt(){return Pt}function Bt(t){var e=Pt;return Pt=t,e}function zt(t,e,n){var i=It(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&Vt.Optional)return null;if(void 0!==e)return e;throw new Error("Injector: NOT_FOUND [".concat(wt(t),"]"))}function Ht(t){return{toString:t}.toString()}var Ut=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),qt=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),Wt="undefined"!=typeof globalThis&&globalThis,Yt="undefined"!=typeof window&&window,Gt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Kt="undefined"!=typeof global&&global,Zt=Wt||Kt||Yt||Gt,$t={},Xt=[],Qt=bt({"\u0275cmp":bt}),Jt=bt({"\u0275dir":bt}),te=bt({"\u0275pipe":bt}),ee=bt({"\u0275mod":bt}),ne=bt({"\u0275loc":bt}),ie=bt({"\u0275fac":bt}),re=bt({__NG_ELEMENT_ID__:bt}),ae=0;function oe(t){return Ht(function(){var e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Ut.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Xt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||qt.Emulated,id:"c",styles:t.styles||Xt,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,a=t.pipes;return n.id+=ae++,n.inputs=he(t.inputs,e),n.outputs=he(t.outputs),r&&r.forEach(function(t){return t(n)}),n.directiveDefs=i?function(){return("function"==typeof i?i():i).map(se)}:null,n.pipeDefs=a?function(){return("function"==typeof a?a():a).map(le)}:null,n})}function se(t){return pe(t)||function(t){return t[Jt]||null}(t)}function le(t){return function(t){return t[te]||null}(t)}var ue={};function ce(t){var e={type:t.type,bootstrap:t.bootstrap||Xt,declarations:t.declarations||Xt,imports:t.imports||Xt,exports:t.exports||Xt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&Ht(function(){ue[t.id]=t.type}),e}function he(t,e){if(null==t)return $t;var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],a=r;Array.isArray(r)&&(a=r[1],r=r[0]),n[r]=i,e&&(e[r]=a)}return n}var de=oe;function fe(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function pe(t){return t[Qt]||null}function me(t,e){var n=t[ee]||null;if(!n&&!0===e)throw new Error("Type ".concat(wt(t)," does not have '\u0275mod' property."));return n}var ve=20,ge=10;function ye(t){return Array.isArray(t)&&"object"==typeof t[1]}function _e(t){return Array.isArray(t)&&!0===t[1]}function be(t){return 0!=(8&t.flags)}function ke(t){return 2==(2&t.flags)}function we(t){return 1==(1&t.flags)}function Ce(t){return null!==t.template}function Se(t,e){return t.hasOwnProperty(ie)?t[ie]:null}var xe=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,function(t,e){var n=t?"NG0".concat(t,": "):"";return"".concat(n).concat(e)}(t,i))).code=t,r}return n}(w(Error));function Ee(t){return"string"==typeof t?t:null==t?"":String(t)}function Ae(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ee(t)}function De(t,e){var n=e?" in ".concat(e):"";throw new xe("201","No provider for ".concat(Ae(t)," found").concat(n))}var Oe=function(){function t(e,n,i){g(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i}return v(t,[{key:"isFirstChange",value:function(){return this.firstChange}}]),t}();function Ie(){return Te}function Te(t){return t.type.prototype.ngOnChanges&&(t.setInput=Pe),Re}function Re(){var t=Me(this),e=null==t?void 0:t.current;if(e){var n=t.previous;if(n===$t)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}}function Pe(t,e,n,i){var r=Me(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:$t,current:null}),a=r.current||(r.current={}),o=r.previous,s=this.declaredInputs[n],l=o[s];a[s]=new Oe(l&&l.currentValue,e,o===$t),t[i]=e}function Me(t){return t.__ngSimpleChanges__||null}Ie.ngInherit=!0;var Fe="http://www.w3.org/2000/svg",Le=void 0;function Ne(){return void 0!==Le?Le:"undefined"!=typeof document?document:void 0}function Ve(t){return!!t.listen}var je={createRenderer:function(t,e){return Ne()}};function Be(t){for(;Array.isArray(t);)t=t[0];return t}function ze(t,e){return Be(e[t])}function He(t,e){return Be(e[t.index])}function Ue(t,e){return t.data[e]}function qe(t,e){return t[e]}function We(t,e){var n=e[t];return ye(n)?n:n[0]}function Ye(t){var e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Ge(t){return 4==(4&t[2])}function Ke(t){return 128==(128&t[2])}function Ze(t,e){return null==e?null:t[e]}function $e(t){t[18]=0}function Xe(t,e){t[5]+=e;for(var n=t,i=t[3];null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}var Qe={lFrame:Cn(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Je(){return Qe.bindingsEnabled}function tn(){return Qe.lFrame.lView}function en(){return Qe.lFrame.tView}function nn(t){Qe.lFrame.contextLView=t}function rn(){for(var t=an();null!==t&&64===t.type;)t=t.parent;return t}function an(){return Qe.lFrame.currentTNode}function on(t,e){var n=Qe.lFrame;n.currentTNode=t,n.isParent=e}function sn(){return Qe.lFrame.isParent}function ln(){Qe.lFrame.isParent=!1}function un(){return Qe.isInCheckNoChangesMode}function cn(t){Qe.isInCheckNoChangesMode=t}function hn(){var t=Qe.lFrame,e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function dn(){return Qe.lFrame.bindingIndex}function fn(){return Qe.lFrame.bindingIndex++}function pn(t){var e=Qe.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function mn(t){Qe.lFrame.currentDirectiveIndex=t}function vn(t){var e=Qe.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function gn(){return Qe.lFrame.currentQueryIndex}function yn(t){Qe.lFrame.currentQueryIndex=t}function _n(t){var e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function bn(t,e,n){if(n&Vt.SkipSelf){for(var i=e,r=t;!(null!==(i=i.parent)||n&Vt.Host||null===(i=_n(r))||(r=r[15],10&i.type)););if(null===i)return!1;e=i,t=r}var a=Qe.lFrame=wn();return a.currentTNode=e,a.lView=t,!0}function kn(t){var e=wn(),n=t[1];Qe.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function wn(){var t=Qe.lFrame,e=null===t?null:t.child;return null===e?Cn(t):e}function Cn(t){var e={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:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Sn(){var t=Qe.lFrame;return Qe.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var xn=Sn;function En(){var t=Sn();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function An(t){return(Qe.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Qe.lFrame.contextLView))[8]}function Dn(){return Qe.lFrame.selectedIndex}function On(t){Qe.lFrame.selectedIndex=t}function In(){var t=Qe.lFrame;return Ue(t.tView,t.selectedIndex)}function Tn(){Qe.lFrame.currentNamespace=Fe}function Rn(){Qe.lFrame.currentNamespace=null}function Pn(t,e){for(var n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[s]<0&&(t[18]+=65536),(o>11>16&&(3&t[2])===e&&(t[2]+=2048,a.call(o)):a.call(o)}var jn=-1,Bn=function t(e,n,i){g(this,t),this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function zn(t,e,n){for(var i=Ve(t),r=0;re){o=a-1;break}}}for(;a>16,i=e;n>0;)i=i[15],n--;return i}var Zn=!0;function $n(t){var e=Zn;return Zn=t,e}var Xn=0;function Qn(t,e){var n=ti(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,Jn(i.data,t),Jn(e,null),Jn(i.blueprint,null));var r=ei(t,e),a=t.injectorIndex;if(Yn(r))for(var o=Gn(r),s=Kn(r,e),l=s[1].data,u=0;u<8;u++)e[a+u]=s[o+u]|l[o+u];return e[a+8]=r,a}function Jn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function ti(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function ei(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=0,i=null,r=e;null!==r;){var a=r[1],o=a.type;if(null===(i=2===o?a.declTNode:1===o?r[6]:null))return jn;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return jn}function ni(t,e,n){!function(t,e,n){var i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(re)&&(i=n[re]),null==i&&(i=n[re]=Xn++);var r=255&i,a=1<3&&void 0!==arguments[3]?arguments[3]:Vt.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==t){var a=hi(n);if("function"==typeof a){if(!bn(e,t,i))return i&Vt.Host?ii(r,n,i):ri(e,n,i,r);try{var o=a();if(null!=o||i&Vt.Optional)return o;De(n)}finally{xn()}}else if("number"==typeof a){var s=null,l=ti(t,e),u=jn,c=i&Vt.Host?e[16][6]:null;for((-1===l||i&Vt.SkipSelf)&&((u=-1===l?ei(t,e):e[l+8])!==jn&&fi(i,!1)?(s=e[1],l=Gn(u),e=Kn(u,e)):l=-1);-1!==l;){var h=e[1];if(di(a,l,h.data)){var d=li(l,e,n,s,i,c);if(d!==oi)return d}(u=e[l+8])!==jn&&fi(i,e[1].data[l+8]===c)&&di(a,l,e)?(s=h,l=Gn(u),e=Kn(u,e)):l=-1}}}return ri(e,n,i,r)}var oi={};function si(){return new pi(rn(),tn())}function li(t,e,n,i,r,a){var o=e[1],s=o.data[t+8],l=ui(s,o,n,null==i?ke(s)&&Zn:i!=o&&0!=(3&s.type),r&Vt.Host&&a===s);return null!==l?ci(e,o,l,s):oi}function ui(t,e,n,i,r){for(var a=t.providerIndexes,o=e.data,s=1048575&a,l=t.directiveStart,u=a>>20,c=r?s+u:t.directiveEnd,h=i?s:s+u;h=l&&d.type===n)return h}if(r){var f=o[l];if(f&&Ce(f)&&f.type===n)return l}return null}function ci(t,e,n,i){var r=t[n],a=e.data;if(r instanceof Bn){var o=r;o.resolving&&function(t,e){throw new xe("200","Circular dependency in DI detected for ".concat(t).concat(""))}(Ae(a[n]));var s=$n(o.canSeeViewProviders);o.resolving=!0;var l=o.injectImpl?Bt(o.injectImpl):null;bn(t,i,Vt.Default);try{r=t[n]=o.factory(void 0,a,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){var i=e.type.prototype,r=i.ngOnInit,a=i.ngDoCheck;if(i.ngOnChanges){var o=Te(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,a))}(n,a[n],e)}finally{null!==l&&Bt(l),$n(s),o.resolving=!1,xn()}}return r}function hi(t){if("string"==typeof t)return t.charCodeAt(0)||0;var e=t.hasOwnProperty(re)?t[re]:void 0;return"number"==typeof e?e>=0?255&e:si:e}function di(t,e,n){var i=64&t,r=32&t;return!!((128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e])&1<=t.length?t.push(n):t.splice(e,0,n)}function Ei(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Ai(t,e){for(var n=[],i=0;i=0?t[1|i]=n:function(t,e,n,i){var r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i=~i,e,n),i}function Oi(t,e){var n=Ii(t,e);if(n>=0)return t[1|n]}function Ii(t,e){return function(t,e,n){for(var i=0,r=t.length>>1;r!==i;){var a=i+(r-i>>1),o=t[a<<1];if(e===o)return a<<1;o>e?r=a:i=a+1}return~(r<<1)}(t,e)}var Ti=_i("Inject",function(t){return{token:t}}),Ri=_i("Optional"),Pi=_i("Self"),Mi=_i("SkipSelf"),Fi=_i("Host"),Li={},Ni=/\n/gm,Vi="__source",ji=bt({provide:String,useValue:bt}),Bi=void 0;function zi(t){var e=Bi;return Bi=t,e}function Hi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vt.Default;if(void 0===Bi)throw new Error("inject() must be called from an injection context");return null===Bi?zt(t,void 0,e):Bi.get(t,e&Vt.Optional?null:void 0,e)}function Ui(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vt.Default;return(jt()||Hi)(Et(t),e)}var qi,Wi=Ui;function Yi(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:null;t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;var r=wt(e);if(Array.isArray(e))r=e.map(wt).join(" -> ");else if("object"==typeof e){var a=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];a.push(o+":"+("string"==typeof s?JSON.stringify(s):wt(s)))}r="{".concat(a.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(t.replace(Ni,"\n "))}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}function Ki(t){var e;return(null===(e=function(){if(void 0===qi&&(qi=null,Zt.trustedTypes))try{qi=Zt.trustedTypes.createPolicy("angular",{createHTML:function(t){return t},createScript:function(t){return t},createScriptURL:function(t){return t}})}catch(e){}return qi}())||void 0===e?void 0:e.createHTML(t))||t}var Zi=function(){function t(e){g(this,t),this.changingThisBreaksApplicationSecurity=e}return v(t,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see https://g.co/ng/security#xss)"}}]),t}(),$i=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}(Zi),Xi=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}(Zi),Qi=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}(Zi),Ji=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}(Zi),tr=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}(Zi);function er(t){return t instanceof Zi?t.changingThisBreaksApplicationSecurity:t}function nr(t,e){var n=ir(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error("Required a safe ".concat(e,", got a ").concat(n," (see https://g.co/ng/security#xss)"))}return n===e}function ir(t){return t instanceof Zi&&t.getTypeName()||null}var rr=function(){function t(e){g(this,t),this.inertDocumentHelper=e}return v(t,[{key:"getInertBodyElement",value:function(t){t=""+t;try{var e=(new window.DOMParser).parseFromString(Ki(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(n){return null}}}]),t}(),ar=function(){function t(e){if(g(this,t),this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);var i=this.inertDocument.createElement("body");n.appendChild(i)}}return v(t,[{key:"getInertBodyElement",value:function(t){var e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Ki(t),e;var n=this.inertDocument.createElement("body");return n.innerHTML=Ki(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(t){for(var e=t.attributes,n=e.length-1;0"),!0}},{key:"endElement",value:function(t){var e=t.nodeName.toLowerCase();vr.hasOwnProperty(e)&&!dr.hasOwnProperty(e)&&(this.buf.push(""))}},{key:"chars",value:function(t){this.buf.push(Sr(t))}},{key:"checkClobberedElement",value:function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(t.outerHTML));return e}}]),t}(),wr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Cr=/([^\#-~ |!])/g;function Sr(t){return t.replace(/&/g,"&").replace(wr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Cr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function xr(t,e){var n=null;try{hr=hr||function(t){var e=new ar(t);return function(){try{return!!(new window.DOMParser).parseFromString(Ki(""),"text/html")}catch(t){return!1}}()?new rr(e):e}(t);var i=e?String(e):"";n=hr.getInertBodyElement(i);var r=5,a=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=a,a=n.innerHTML,n=hr.getInertBodyElement(i)}while(i!==a);return(new kr).sanitizeChildren(Er(n)||n)}finally{if(n)for(var o=Er(n)||n;o.firstChild;)o.removeChild(o.firstChild)}}function Er(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Ar=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Dr(t){var e=Ir();return e?e.sanitize(Ar.HTML,t)||"":nr(t,"HTML")?er(t):xr(Ne(),Ee(t))}function Or(t){var e=Ir();return e?e.sanitize(Ar.URL,t)||"":nr(t,"URL")?er(t):lr(Ee(t))}function Ir(){var t=tn();return t&&t[12]}function Tr(t){return t.ngDebugContext}function Rr(t){return t.ngOriginalError}function Pr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&(t[i-1][4]=r[4]);var o=Ei(t,ge+e);ua(r[1],n=r,n[11],2,null,null),n[0]=null,n[6]=null;var s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}}function $r(t,e){if(!(256&e[2])){var n=e[11];Ve(n)&&n.destroyNode&&ua(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return Xr(t[1],t);for(;e;){var n=null;if(ye(e))n=e[13];else{var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)ye(e)&&Xr(e[1],e),e=e[3];null===e&&(e=t),ye(e)&&Xr(e[1],e),n=e&&e[4]}e=n}}(e)}}function Xr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){var n;if(null!=t&&null!=(n=t.destroyHooks))for(var i=0;i=0?i[r=u]():i[r=-u].unsubscribe(),a+=2}else{var c=i[r=n[a+1]];n[a].call(c)}if(null!==i){for(var h=r+1;ha?"":r[c+1].toLowerCase();var d=8&i?h:null;if(d&&-1!==pa(d,u,0)||2&i&&u!==h){if(ba(i))return!1;o=!0}}}}else{if(!o&&!ba(i)&&!ba(l))return!1;if(o&&ba(l))continue;o=!1,i=l|1&i}}return ba(i)||o}function ba(t){return 0==(1&t)}function ka(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var a=!1;r-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],i=0;i0?'="'+s+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||ba(o)||(e+=Sa(a,r),r=""),i=o,a=a||!ba(i);n++}return""!==r&&(e+=Sa(a,r)),e}var Ea={};function Aa(t){Da(en(),tn(),Dn()+t,un())}function Da(t,e,n,i){if(!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&Mn(e,r,n)}else{var a=t.preOrderHooks;null!==a&&Fn(e,a,0,n)}On(n)}function Oa(t,e){return t<<17|e<<2}function Ia(t){return t>>17&32767}function Ta(t){return 2|t}function Ra(t){return(131068&t)>>2}function Pa(t,e){return-131069&t|e<<2}function Ma(t){return 1|t}function Fa(t,e){var n=t.contentQueries;if(null!==n)for(var i=0;ive&&Da(t,e,ve,un()),n(i,r)}finally{On(a)}}function Ua(t,e,n){if(be(e))for(var i=e.directiveEnd,r=e.directiveStart;r2&&void 0!==arguments[2]?arguments[2]:He,i=e.localNames;if(null!==i)for(var r=e.index+1,a=0;a0;){var n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(s)!=l&&s.push(l),s.push(i,r,o)}}function Ja(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function to(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function eo(t,e,n){if(n){if(e.exportAs)for(var i=0;i0&&uo(n)}}function uo(t){for(var e=Hr(t);null!==e;e=Ur(e))for(var n=ge;n0&&uo(i)}var a=t[1].components;if(null!==a)for(var o=0;o0&&uo(s)}}function co(t,e){var n=We(e,t),i=n[1];!function(t,e){for(var n=e.length;n1&&void 0!==arguments[1]?arguments[1]:Li;if(e===Li){var n=new Error("NullInjectorError: No provider for ".concat(wt(t),"!"));throw n.name="NullInjectorError",n}return e}}]),t}(),Ao=new bi("Set Injector scope."),Do={},Oo={},Io=[],To=void 0;function Ro(){return void 0===To&&(To=new Eo),To}function Po(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new Mo(t,n,e||Ro(),i)}var Mo=function(){function t(e,n,i){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;g(this,t),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var o=[];n&&Si(n,function(t){return r.processProvider(t,e,n)}),Si([e],function(t){return r.processInjectorType(t,[],o)}),this.records.set(xo,No(void 0,this));var s=this.records.get(Ao);this.scope=null!=s?s.value:null,this.source=a||("object"==typeof e?null:wt(e))}return v(t,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(t){return t.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Li,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vt.Default;this.assertNotDestroyed();var i=zi(this);try{if(!(n&Vt.SkipSelf)){var r=this.records.get(t);if(void 0===r){var a=Bo(t)&&It(t);r=a&&this.injectableDefInScope(a)?No(Fo(t),Do):null,this.records.set(t,r)}if(null!=r)return this.hydrate(t,r)}var o=n&Vt.Self?Ro():this.parent;return o.get(t,e=n&Vt.Optional&&e===Li?null:e)}catch(l){if("NullInjectorError"===l.name){var s=l.ngTempTokenPath=l.ngTempTokenPath||[];if(s.unshift(wt(t)),i)throw l;return Gi(l,t,"R3InjectorError",this.source)}throw l}finally{zi(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var t=this;this.injectorDefTypes.forEach(function(e){return t.get(e)})}},{key:"toString",value:function(){var t=[];return this.records.forEach(function(e,n){return t.push(wt(n))}),"R3Injector[".concat(t.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(t,e,n){var i=this;if(!(t=Et(t)))return!1;var r=Rt(t),a=null==r&&t.ngModule||void 0,o=void 0===a?t:a,s=-1!==n.indexOf(o);if(void 0!==a&&(r=Rt(a)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(o);try{Si(r.imports,function(t){i.processInjectorType(t,e,n)&&(void 0===l&&(l=[]),l.push(t))})}finally{}if(void 0!==l)for(var u=function(t){var e=l[t],n=e.ngModule,r=e.providers;Si(r,function(t){return i.processProvider(t,n,r||Io)})},c=0;c0){var n=Ai(e,"?");throw new Error("Can't resolve all parameters for ".concat(wt(t),": (").concat(n.join(", "),")."))}var i=function(t){var e=t&&(t[Mt]||t[Lt]);if(e){var n=function(t){if(t.hasOwnProperty("name"))return t.name;var e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" 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(n,'" class.')),e}return null}(t);return null!==i?function(){return i.factory(t)}:function(){return new t}}(t);throw new Error("unreachable")}function Lo(t,e,n){var i,r=void 0;if(jo(t)){var a=Et(t);return Se(a)||Fo(a)}if(Vo(t))r=function(){return Et(t.useValue)};else if((i=t)&&i.useFactory)r=function(){return t.useFactory.apply(t,h(Yi(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))r=function(){return Ui(Et(t.useExisting))};else{var o=Et(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Se(o)||Fo(o);r=function(){return p(o,h(Yi(t.deps)))}}return r}function No(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:t,value:e,multi:n?[]:void 0}}function Vo(t){return null!==t&&"object"==typeof t&&ji in t}function jo(t){return"function"==typeof t}function Bo(t){return"function"==typeof t||"object"==typeof t&&t instanceof bi}var zo=function(t,e,n){return function(t){var e=Po(t,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 e._resolveInjectorDefTypes(),e}({name:n},e,t,n)},Ho=function(){var t=function(){function t(){g(this,t)}return v(t,null,[{key:"create",value:function(t,e){return Array.isArray(t)?zo(t,e,""):zo(t.providers,t.parent,t.name||"")}}]),t}();return t.THROW_IF_NOT_FOUND=Li,t.NULL=new Eo,t.\u0275prov=Dt({token:t,providedIn:"any",factory:function(){return Ui(xo)}}),t.__NG_ELEMENT_ID__=-1,t}();function Uo(t,e){Pn(Ye(t)[1],rn())}function qo(t){for(var e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0,i=[t];e;){var r=void 0;if(Ce(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(n){i.push(r);var a=t;a.inputs=Wo(t.inputs),a.declaredInputs=Wo(t.declaredInputs),a.outputs=Wo(t.outputs);var o=r.hostBindings;o&&Ko(t,o);var s=r.viewQuery,l=r.contentQueries;if(s&&Yo(t,s),l&&Go(t,l),kt(t.inputs,r.inputs),kt(t.declaredInputs,r.declaredInputs),kt(t.outputs,r.outputs),Ce(r)&&r.data.animation){var u=t.data;u.animation=(u.animation||[]).concat(r.data.animation)}}var c=r.features;if(c)for(var h=0;h=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=qn(r.hostAttrs,n=qn(n,r.hostAttrs))}}(i)}function Wo(t){return t===$t?{}:t===Xt?[]:t}function Yo(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function Go(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function Ko(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e}var Zo=null;function $o(){if(!Zo){var t=Zt.Symbol;if(t&&t.iterator)Zo=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:Vt.Default,n=tn();if(null===n)return Ui(t,e);var i=rn();return ai(i,n,Et(t),e)}function ls(t,e,n){var i=tn();return es(i,fn(),e)&&$a(en(),In(),i,t,e,i[11],n,!1),ls}function us(t,e,n,i,r){var a=r?"class":"style";wo(t,n,e.inputs[a],a,i)}function cs(t,e,n,i){var r=tn(),a=en(),o=ve+t,s=r[11],l=r[o]=Gr(s,e,Qe.lFrame.currentNamespace),u=a.firstCreatePass?function(t,e,n,i,r,a,o){var s=e.consts,l=Na(e,t,2,r,Ze(s,a));return Xa(e,n,l,Ze(s,o)),null!==l.attrs&&So(l,l.attrs,!1),null!==l.mergedAttrs&&So(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(o,a,r,0,e,n,i):a.data[o];on(u,!0);var c=u.mergedAttrs;null!==c&&zn(s,l,c);var h=u.classes;null!==h&&fa(s,l,h);var d=u.styles;null!==d&&da(s,l,d),64!=(64&u.flags)&&aa(a,r,l,u),0===Qe.lFrame.elementDepthCount&&Fr(l,r),Qe.lFrame.elementDepthCount++,we(u)&&(qa(a,r,u),Ua(a,u,r)),null!==i&&Wa(r,u)}function hs(){var t=rn();sn()?ln():on(t=t.parent,!1);var e=t;Qe.lFrame.elementDepthCount--;var n=en();n.firstCreatePass&&(Pn(n,t),be(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&us(n,e,tn(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&us(n,e,tn(),e.stylesWithoutHost,!1)}function ds(t,e,n,i){cs(t,e,n,i),hs()}function fs(t,e,n){var i=tn(),r=en(),a=t+ve,o=r.firstCreatePass?function(t,e,n,i,r){var a=e.consts,o=Ze(a,i),s=Na(e,t,8,"ng-container",o);return null!==o&&So(s,o,!0),Xa(e,n,s,Ze(a,r)),null!==e.queries&&e.queries.elementStart(e,s),s}(a,r,i,e,n):r.data[a];on(o,!0);var s=i[a]=i[11].createComment("");aa(r,i,s,o),Fr(s,i),we(o)&&(qa(r,i,o),Ua(r,o,i)),null!=n&&Wa(i,o)}function ps(){var t=rn(),e=en();sn()?ln():on(t=t.parent,!1),e.firstCreatePass&&(Pn(e,t),be(t)&&e.queries.elementEnd(t))}function ms(t,e,n){fs(t,e,n),ps()}function vs(){return tn()}function gs(t){return!!t&&"function"==typeof t.then}function ys(t){return!!t&&"function"==typeof t.subscribe}function _s(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=tn(),a=en(),o=rn();return ws(a,r,r[11],o,t,e,n,i),_s}function bs(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=rn(),a=tn(),o=en(),s=vn(o.data),l=bo(s,r,a);return ws(o,a,l,r,t,e,n,i),bs}function ks(t,e,n,i){var r=t.cleanup;if(null!=r)for(var a=0;al?s[l]:null}"string"==typeof o&&(a+=2)}return null}function ws(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,l=we(i),u=t.firstCreatePass,c=u&&_o(t),h=yo(e),d=!0;if(3&i.type){var f=He(i,e),p=s?s(f):$t,m=p.target||f,v=h.length,g=s?function(t){return s(Be(t[i.index])).target}:i.index;if(Ve(n)){var y=null;if(!s&&l&&(y=ks(t,e,r,i.index)),null!==y){var _=y.__ngLastListenerFn__||y;_.__ngNextListenerFn__=a,y.__ngLastListenerFn__=a,d=!1}else{a=Ss(i,e,a,!1);var b=n.listen(p.name||m,r,a);h.push(a,b),c&&c.push(r,g,v,v+1)}}else a=Ss(i,e,a,!0),m.addEventListener(r,a,o),h.push(a),c&&c.push(r,g,v,o)}else a=Ss(i,e,a,!1);var k,w=i.outputs;if(d&&null!==w&&(k=w[r])){var C=k.length;if(C)for(var S=0;S0&&void 0!==arguments[0]?arguments[0]:1;return An(t)}function Es(t,e){for(var n=null,i=function(t){var e=t.attrs;if(null!=e){var n=e.indexOf(5);if(0==(1&n))return e[n+1]}return null}(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=tn(),r=en(),a=Na(r,ve+t,16,null,n||null);null===a.projection&&(a.projection=e),ln(),64!=(64&a.flags)&&ca(r,i,a)}function Os(t,e,n){return Is(t,"",e,"",n),Os}function Is(t,e,n,i,r){var a=tn(),o=rs(a,e,n,i);return o!==Ea&&$a(en(),In(),a,t,o,a[11],r,!1),Is}var Ts=[];function Rs(t,e,n,i,r){for(var a=t[n+1],o=null===e,s=i?Ia(a):Ra(a),l=!1;0!==s&&(!1===l||o);){var u=t[s+1];Ps(t[s],e)&&(l=!0,t[s+1]=i?Ma(u):Ta(u)),s=i?Ia(u):Ra(u)}l&&(t[n+1]=i?Ta(a):Ma(a))}function Ps(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Ii(t,e)>=0}var Ms={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Fs(t){return t.substring(Ms.key,Ms.keyEnd)}function Ls(t,e){var n=Ms.textEnd;return n===e?-1:(e=Ms.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Ms.key=e,n),Ns(t,e,n))}function Ns(t,e,n){for(;e=0;n=Ls(e,n))Di(t,Fs(e),!0)}function zs(t,e,n,i){var r=tn(),a=en(),o=pn(2);a.firstUpdatePass&&Us(a,t,o,i),e!==Ea&&es(r,o,e)&&Ys(a,a.data[Dn()],r,r[11],t,r[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=wt(er(t)))),t}(e,n),i,o)}function Hs(t,e){return e>=t.expandoStartIndex}function Us(t,e,n,i){var r=t.data;if(null===r[n+1]){var a=r[Dn()],o=Hs(t,n);Zs(a,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){var r=vn(t),a=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=Ws(n=qs(null,t,e,n,i),e.attrs,i),a=null);else{var o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(n=qs(r,t,e,n,i),null===a){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==Ra(i))return t[Ia(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){t[Ia(n?e.classBindings:e.styleBindings)]=i}(t,e,i,s=Ws(s=qs(null,t,e,s[1],i),e.attrs,i))}else a=function(t,e,n){for(var i=void 0,r=e.directiveEnd,a=1+e.directiveStylingLast;a0)&&(c=!0):u=n,r)if(0!==l){var h=Ia(t[s+1]);t[i+1]=Oa(h,s),0!==h&&(t[h+1]=Pa(t[h+1],i)),t[s+1]=131071&t[s+1]|i<<17}else t[i+1]=Oa(s,0),0!==s&&(t[s+1]=Pa(t[s+1],i)),s=i;else t[i+1]=Oa(l,0),0===s?s=i:t[l+1]=Pa(t[l+1],i),l=i;c&&(t[i+1]=Ta(t[i+1])),Rs(t,u,i,!0),Rs(t,u,i,!1),function(t,e,n,i,r){var a=r?t.residualClasses:t.residualStyles;null!=a&&"string"==typeof e&&Ii(a,e)>=0&&(n[i+1]=Ma(n[i+1]))}(e,u,t,i,a),o=Oa(s,l),a?e.classBindings=o:e.styleBindings=o}(r,a,e,n,o,i)}}function qs(t,e,n,i,r){var a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var l=t[r],u=Array.isArray(l),c=u?l[1]:l,h=null===c,d=n[r+1];d===Ea&&(d=h?Ts:void 0);var f=h?Oi(d,i):c===i?d:void 0;if(u&&!Ks(f)&&(f=Oi(l,i)),Ks(f)&&(s=f,o))return s;var p=t[r+1];r=o?Ia(p):Ra(p)}if(null!==e){var m=a?e.residualClasses:e.residualStyles;null!=m&&(s=Oi(m,i))}return s}function Ks(t){return void 0!==t}function Zs(t,e){return 0!=(t.flags&(e?16:32))}function $s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=tn(),i=en(),r=t+ve,a=i.firstCreatePass?Na(i,r,1,e,null):i.data[r],o=n[r]=Yr(n[11],e);aa(i,n,o,a),on(a,!1)}function Xs(t){return Qs("",t,""),Xs}function Qs(t,e,n){var i=tn(),r=rs(i,t,e,n);return r!==Ea&&Co(i,Dn(),r),Qs}function Js(t,e,n,i,r){var a=tn(),o=function(t,e,n,i,r,a){var o=ns(t,dn(),n,r);return pn(2),o?e+Ee(n)+i+Ee(r)+a:Ea}(a,t,e,n,i,r);return o!==Ea&&Co(a,Dn(),o),Js}function tl(t,e,n){var i=tn();return es(i,fn(),e)&&$a(en(),In(),i,t,e,i[11],n,!0),tl}function el(t,e,n){var i=tn();if(es(i,fn(),e)){var r=en(),a=In();$a(r,a,i,t,e,bo(vn(r.data),a,i),n,!0)}return el}var nl=void 0,il=["en",[["a","p"],["AM","PM"],nl],[["AM","PM"],nl,nl],[["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"]],nl,[["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"]],nl,[["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}",nl,"{1} 'at' {0}",nl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],rl={};function al(t){return t in rl||(rl[t]=Zt.ng&&Zt.ng.common&&Zt.ng.common.locales&&Zt.ng.common.locales[t]),rl[t]}var ol=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({}),sl="en-US";function ll(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: ".concat(t)+" [Expected=> ".concat(null," ").concat("!="," ").concat(e," <=Actual]"))}(n,e),"string"==typeof t&&t.toLowerCase().replace(/_/g,"-")}function ul(t,e,n){var i=en();if(i.firstCreatePass){var r=Ce(t);cl(n,i.data,i.blueprint,r,!0),cl(e,i.data,i.blueprint,r,!1)}}function cl(t,e,n,i,r){if(t=Et(t),Array.isArray(t))for(var a=0;a>20;if(jo(t)||!t.multi){var p=new Bn(u,r,ss),m=fl(l,e,r?h:h+f,d);-1===m?(ni(Qn(c,s),o,l),hl(o,t,e.length),e.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(p),s.push(p)):(n[m]=p,s[m]=p)}else{var v=fl(l,e,h+f,d),g=fl(l,e,h,h+f),y=g>=0&&n[g];if(r&&!y||!r&&!(v>=0&&n[v])){ni(Qn(c,s),o,l);var _=function(t,e,n,i,r){var a=new Bn(t,n,ss);return a.multi=[],a.index=e,a.componentProviders=0,dl(a,r,i&&!n),a}(r?ml:pl,n.length,r,i,u);!r&&y&&(n[g].providerFactory=_),hl(o,t,e.length,0),e.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else hl(o,t,v>-1?v:g,dl(n[r?g:v],u,!r&&i));!r&&i&&y&&n[g].componentProviders++}}}function hl(t,e,n,i){var r=jo(e);if(r||e.useClass){var a=(e.useClass||e).prototype.ngOnDestroy;if(a){var o=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){var s=o.indexOf(n);-1===s?o.push(n,[i,a]):o[s+1].push(i,a)}else o.push(n,a)}}}function dl(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function fl(t,e,n,i){for(var r=n;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return ul(n,i?i(t):t,e)}}}var yl=function t(){g(this,t)},_l=function t(){g(this,t)},bl=function(){function t(){g(this,t)}return v(t,[{key:"resolveComponentFactory",value:function(t){throw function(t){var e=Error("No component factory found for ".concat(wt(t),". Did you add it to @NgModule.entryComponents?"));return e.ngComponent=t,e}(t)}}]),t}(),kl=function(){var t=function t(){g(this,t)};return t.NULL=new bl,t}();function wl(){}function Cl(t,e){return new xl(He(t,e))}var Sl=function(){return Cl(rn(),tn())},xl=function(){var t=function t(e){g(this,t),this.nativeElement=e};return t.__NG_ELEMENT_ID__=Sl,t}(),El=function t(){g(this,t)},Al=function(){var t=function t(){g(this,t)};return t.__NG_ELEMENT_ID__=function(){return Dl()},t}(),Dl=function(){var t=tn(),e=We(rn().index,t);return function(t){return t[11]}(ye(e)?e:t)},Ol=function(){var t=function t(){g(this,t)};return t.\u0275prov=Dt({token:t,providedIn:"root",factory:function(){return null}}),t}(),Il=function t(e){g(this,t),this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},Tl=new Il("11.0.9"),Rl=function(){function t(){g(this,t)}return v(t,[{key:"supports",value:function(t){return Qo(t)}},{key:"create",value:function(t){return new Ml(t)}}]),t}(),Pl=function(t,e){return e},Ml=function(){function t(e){g(this,t),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=e||Pl}return v(t,[{key:"forEachItem",value:function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)}},{key:"forEachOperation",value:function(t){for(var e=this._itHead,n=this._removalsHead,i=0,r=null;e||n;){var a=!n||e&&e.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var a=e[n.index];if(null!==a&&i.push(Be(a)),_e(a))for(var o=ge;o-1&&(Zr(t,n),Ei(e,n))}this._attachedToViewContainer=!1}$r(this._lView[1],this._lView)}},{key:"onDestroy",value:function(t){Ka(this._lView[1],this._lView,null,t)}},{key:"markForCheck",value:function(){fo(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){po(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(t,e,n){cn(!0);try{po(t,e,n)}finally{cn(!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(){var t;this._appRef=null,ua(this._lView[1],t=this._lView,t[11],2,null,null)}},{key:"attachToAppRef",value:function(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}},{key:"rootNodes",get:function(){var t=this._lView,e=t[1];return ql(e,t,e.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),t}(),Yl=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this,t))._view=t,i}return v(n,[{key:"detectChanges",value:function(){mo(this._view)}},{key:"checkNoChanges",value:function(){!function(t){cn(!0);try{mo(t)}finally{cn(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Wl),Gl=Zl,Kl=function(){var t=function t(){g(this,t)};return t.__NG_ELEMENT_ID__=Gl,t.__ChangeDetectorRef__=!0,t}();function Zl(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return $l(rn(),tn(),t)}function $l(t,e,n){if(!n&&ke(t)){var i=We(t.index,e);return new Wl(i,i)}return 47&t.type?new Wl(e[16],e):null}var Xl=[new jl],Ql=new Hl([new Rl]),Jl=new Ul(Xl),tu=function(){return iu(rn(),tn())},eu=function(){var t=function t(){g(this,t)};return t.__NG_ELEMENT_ID__=tu,t}(),nu=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this))._declarationLView=t,a._declarationTContainer=i,a.elementRef=r,a}return v(n,[{key:"createEmbeddedView",value:function(t){var e=this._declarationTContainer.tViews,n=La(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var i=this._declarationLView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),ja(e,n,t),new Wl(n)}}]),n}(eu);function iu(t,e){return 4&t.type?new nu(e,t,Cl(t,e)):null}var ru=function t(){g(this,t)},au=function t(){g(this,t)},ou=function(){return hu(rn(),tn())},su=function(){var t=function t(){g(this,t)};return t.__NG_ELEMENT_ID__=ou,t}(),lu=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this))._lContainer=t,a._hostTNode=i,a._hostLView=r,a}return v(n,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(t){var e=uu(this._lContainer);return null!==e&&e[t]||null}},{key:"createEmbeddedView",value:function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i}},{key:"createComponent",value:function(t,e,n,i,r){var a=n||this.parentInjector;if(!r&&null==t.ngModule&&a){var o=a.get(ru,null);o&&(r=o)}var s=t.create(a,i,void 0,r);return this.insert(s.hostView,e),s}},{key:"insert",value:function(t,e){var n=t._lView,i=n[1];if(_e(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var a=n[3],o=new lu(a,a[6],a[3]);o.detach(o.indexOf(t))}}var s=this._adjustIndex(e),l=this._lContainer;!function(t,e,n,i){var r=ge+i,a=n.length;i>0&&(n[r-1][4]=e),i1&&void 0!==arguments[1]?arguments[1]:0;return null==t?this.length+e:t}},{key:"element",get:function(){return Cl(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new pi(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var t=ei(this._hostTNode,this._hostLView);if(Yn(t)){var e=Kn(t,this._hostLView),n=Gn(t);return new pi(e[1].data[n+8],e)}return new pi(null,this._hostLView)}},{key:"length",get:function(){return this._lContainer.length-ge}}]),n}(su);function uu(t){return t[8]}function cu(t){return t[8]||(t[8]=[])}function hu(t,e){var n,i=e[t.index];if(_e(i))n=i;else{var r;if(8&t.type)r=Be(i);else{var a=e[11];r=a.createComment("");var o=He(t,e);Jr(a,na(a,o),r,function(t,e){return Ve(t)?t.nextSibling(e):e.nextSibling}(a,o),!1)}e[t.index]=n=so(i,e,r,t),ho(e,n)}return new lu(n,t,e)}var du={},fu=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this)).ngModule=t,i}return v(n,[{key:"resolveComponentFactory",value:function(t){var e=pe(t);return new vu(e,this.ngModule)}}]),n}(kl);function pu(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}var mu=new bi("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Lr}}),vu=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this)).componentDef=t,r.ngModule=i,r.componentType=t.type,r.selector=t.selectors.map(xa).join(","),r.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],r.isBoundToModule=!!i,r}return v(n,[{key:"create",value:function(t,e,n,i){var r,a,o=(i=i||this.ngModule)?function(t,e){return{get:function(n,i,r){var a=t.get(n,du,r);return a!==du||i===du?a:e.get(n,i,r)}}}(t,i.injector):t,s=o.get(El,je),l=o.get(Ol,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(t,e,n){if(Ve(t))return t.selectRootElement(e,n===qt.ShadowDom);var i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(u,n,this.componentDef.encapsulation):Gr(s.createRenderer(null,this.componentDef),c,function(t){var e=t.toLowerCase();return"svg"===e?Fe:"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,f={components:[],scheduler:Lr,clean:go,playerHandler:null,flags:0},p=Ga(0,null,null,1,0,null,null,null,null,null),m=La(null,p,f,d,null,null,s,u,l,o);kn(m);try{var v=function(t,e,n,i,r,a){var o=n[1];n[20]=t;var s=Na(o,20,2,"#host",null),l=s.mergedAttrs=e.hostAttrs;null!==l&&(So(s,l,!0),null!==t&&(zn(r,t,l),null!==s.classes&&fa(r,t,s.classes),null!==s.styles&&da(r,t,s.styles)));var u=i.createRenderer(t,e),c=La(n,Ya(e),null,e.onPush?64:16,n[20],s,i,u,null,null);return o.firstCreatePass&&(ni(Qn(s,n),o,e.type),to(o,s),no(s,n.length,1)),ho(n,c),n[20]=c}(h,this.componentDef,m,s,u);if(h)if(n)zn(u,h,["ng-version",Tl.full]);else{var g=function(t){for(var e=[],n=[],i=1,r=2;i0&&fa(u,h,_.join(" "))}if(a=Ue(p,ve),void 0!==e)for(var b=a.projection=[],k=0;k1&&void 0!==arguments[1]?arguments[1]:Ho.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vt.Default;return t===Ho||t===ru||t===xo?this:this._r3Injector.get(t,e,n)}},{key:"destroy",value:function(){var t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null}},{key:"onDestroy",value:function(t){this.destroyCbs.push(t)}}]),n}(ru),bu=function(t){y(n,t);var e=k(n);function n(t){var i,r,a;return g(this,n),(i=e.call(this)).moduleType=t,null!==me(t)&&(r=t,a=new Set,function t(e){var n=me(e,!0),i=n.id;null!==i&&(function(t,e,n){if(e&&e!==n)throw new Error("Duplicate module registered for ".concat(t," - ").concat(wt(e)," vs ").concat(wt(e.name)))}(i,yu.get(i),e),yu.set(i,e));var r,o=c(Vr(n.imports));try{for(o.s();!(r=o.n()).done;){var s=r.value;a.has(s)||(a.add(s),t(s))}}catch(l){o.e(l)}finally{o.f()}}(r)),i}return v(n,[{key:"create",value:function(t){return new _u(this.moduleType,t)}}]),n}(au);function ku(t,e,n){var i=hn()+t,r=tn();return r[i]===Ea?ts(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function wu(t,e,n,i){return xu(tn(),hn(),t,e,n,i)}function Cu(t,e,n,i,r){return Eu(tn(),hn(),t,e,n,i,r)}function Su(t,e){var n=t[e];return n===Ea?void 0:n}function xu(t,e,n,i,r,a){var o=e+n;return es(t,o,r)?ts(t,o+1,a?i.call(a,r):i(r)):Su(t,o+1)}function Eu(t,e,n,i,r,a,o){var s=e+n;return ns(t,s,r,a)?ts(t,s+2,o?i.call(o,r,a):i(r,a)):Su(t,s+2)}function Au(t,e){var n,i=en(),r=t+ve;i.firstCreatePass?(n=function(t,e){if(e)for(var n=e.length-1;n>=0;n--){var i=e[n];if(t===i.name)return i}throw new xe("302","The pipe '".concat(t,"' could not be found!"))}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var a=n.factory||(n.factory=Se(n.type)),o=Bt(ss);try{var s=$n(!1),l=a();return $n(s),function(t,e,n,i){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=i}(i,tn(),r,l),l}finally{Bt(o)}}function Du(t,e,n){var i=t+ve,r=tn(),a=qe(r,i);return Tu(r,Iu(r,i)?xu(r,hn(),e,a.transform,n,a):a.transform(n))}function Ou(t,e,n,i){var r=t+ve,a=tn(),o=qe(a,r);return Tu(a,Iu(a,r)?Eu(a,hn(),e,o.transform,n,i,o):o.transform(n,i))}function Iu(t,e){return t[1].data[e].pure}function Tu(t,e){return Xo.isWrapped(e)&&(e=Xo.unwrap(e),t[dn()]=Ea),e}var Ru=function(t){y(n,t);var e=k(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return g(this,n),(t=e.call(this)).__isAsync=i,t}return v(n,[{key:"emit",value:function(t){r(i(n.prototype),"next",this).call(this,t)}},{key:"subscribe",value:function(t,e,a){var o,s=function(t){return null},l=function(){return null};t&&"object"==typeof t?(o=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(s=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(l=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(o=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},e&&(s=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)}),a&&(l=this.__isAsync?function(){setTimeout(function(){return a()})}:function(){a()}));var u=r(i(n.prototype),"subscribe",this).call(this,o,s,l);return t instanceof A&&t.add(u),u}}]),n}(q);function Pu(){return this._results[$o()]()}var Mu=function(){function t(){g(this,t),this.dirty=!0,this._results=[],this.changes=new Ru,this.length=0;var e=$o(),n=t.prototype;n[e]||(n[e]=Pu)}return v(t,[{key:"map",value:function(t){return this._results.map(t)}},{key:"filter",value:function(t){return this._results.filter(t)}},{key:"find",value:function(t){return this._results.find(t)}},{key:"reduce",value:function(t,e){return this._results.reduce(t,e)}},{key:"forEach",value:function(t){this._results.forEach(t)}},{key:"some",value:function(t){return this._results.some(t)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(t){this._results=Ci(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}},{key:"notifyOnChanges",value:function(){this.changes.emit(this)}},{key:"setDirty",value:function(){this.dirty=!0}},{key:"destroy",value:function(){this.changes.complete(),this.changes.unsubscribe()}}]),t}(),Fu=function(){function t(e){g(this,t),this.queryList=e,this.matches=null}return v(t,[{key:"clone",value:function(){return new t(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),t}(),Lu=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];g(this,t),this.queries=e}return v(t,[{key:"createEmbeddedView",value:function(e){var n=e.queries;if(null!==n){for(var i=null!==e.contentQueries?e.contentQueries[0]:n.length,r=[],a=0;a3&&void 0!==arguments[3]?arguments[3]:null;g(this,t),this.predicate=e,this.descendants=n,this.isStatic=i,this.read=r},Vu=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];g(this,t),this.queries=e}return v(t,[{key:"elementStart",value:function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;g(this,t),this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return v(t,[{key:"elementStart",value:function(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}},{key:"elementEnd",value:function(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(t,e){this.elementStart(t,e)}},{key:"embeddedTView",value:function(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}},{key:"isApplyingToNode",value:function(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var e=this._declarationNodeIndex,n=t.parent;null!==n&&8&n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(t,e){var n=this.metadata.predicate;if(Array.isArray(n))for(var i=0;i0)i.push(o[s/2]);else{for(var u=a[s+1],c=e[-l],h=ge;h0&&(r=setTimeout(function(){i._callbacks=i._callbacks.filter(function(t){return t.timeoutId!==r}),t(i._didWork,i.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(t,e,n){return[]}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Cc))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Rc=function(){var t=function(){function t(){g(this,t),this._applications=new Map,Pc.addToWindow(this)}return v(t,[{key:"registerApplication",value:function(t,e){this._applications.set(t,e)}},{key:"unregisterApplication",value:function(t){this._applications.delete(t)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(t){return this._applications.get(t)||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(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Pc.findTestabilityInTree(this,t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Pc=new(function(){function t(){g(this,t)}return v(t,[{key:"addToWindow",value:function(t){}},{key:"findTestabilityInTree",value:function(t,e,n){return null}}]),t}()),Mc=!0,Fc=!1;function Lc(){return Fc=!0,Mc}var Nc=function(t,e,n){var i=new bu(n);return Promise.resolve(i)},Vc=new bi("AllowMultipleToken"),jc=function t(e,n){g(this,t),this.name=e,this.token=n};function Bc(t){if(Oc&&!Oc.destroyed&&!Oc.injector.get(Vc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Oc=t.get(qc);var e=t.get(sc,null);return e&&e.forEach(function(t){return t()}),Oc}function zc(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: ".concat(e),r=new bi(i);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=Uc();if(!a||a.injector.get(Vc,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var o=n.concat(e).concat({provide:r,useValue:!0},{provide:Ao,useValue:"platform"});Bc(Ho.create({providers:o,name:i}))}return Hc(r)}}function Hc(t){var e=Uc();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}function Uc(){return Oc&&!Oc.destroyed?Oc:null}var qc=function(){var t=function(){function t(e){g(this,t),this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return v(t,[{key:"bootstrapModuleFactory",value:function(t,e){var n,i,r=this,a=(i=e&&e.ngZoneEventCoalescing||!1,"noop"===(n=e?e.ngZone:void 0)?new Ic:("zone.js"===n?void 0:n)||new Cc({enableLongStackTrace:Lc(),shouldCoalesceEventChangeDetection:i})),o=[{provide:Cc,useValue:a}];return a.run(function(){var e=Ho.create({providers:o,parent:r.injector,name:t.moduleType.name}),n=t.create(e),i=n.injector.get(Mr,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(function(){var t=a.onError.subscribe({next:function(t){i.handleError(t)}});n.onDestroy(function(){Gc(r._modules,n),t.unsubscribe()})}),function(t,e,i){try{var a=((o=n.injector.get(ic)).runInitializers(),o.donePromise.then(function(){return ll(n.injector.get(hc,sl)||sl),r._moduleDoBootstrap(n),n}));return gs(a)?a.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):a}catch(s){throw e.runOutsideAngular(function(){return t.handleError(s)}),s}var o}(i,a)})}},{key:"bootstrapModule",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=Wc({},n);return Nc(0,0,t).then(function(t){return e.bootstrapModuleFactory(t,i)})}},{key:"_moduleDoBootstrap",value:function(t){var e=t.injector.get(Yc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module ".concat(wt(t.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ')+"Please define one of these.");t.instance.ngDoBootstrap(e)}this._modules.push(t)}},{key:"onDestroy",value:function(t){this._destroyListeners.push(t)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Ho))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}();function Wc(t,e){return Array.isArray(e)?e.reduce(Wc,t):Object.assign(Object.assign({},t),e)}var Yc=function(){var t=function(){function t(e,n,i,r,a,o){var s=this;g(this,t),this._zone=e,this._console=n,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var l=new j(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),u=new j(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){Cc.assertNotInAngularZone(),wc(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Cc.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=dt(l,u.pipe(function(t){return ft()((e=_t,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,gt);return i.source=t,i.subjectFactory=n,i})(t));var e}))}return v(t,[{key:"bootstrap",value:function(t,e){var n,i=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.");n=t instanceof _l?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(ru),a=n.create(Ho.NULL,[],e||n.selector,r),o=a.location.nativeElement,s=a.injector.get(Tc,null),l=s&&a.injector.get(Rc);return s&&l&&l.registerApplication(o,s),a.onDestroy(function(){i.detachView(a.hostView),Gc(i.components,a),l&&l.unregisterApplication(o)}),this._loadComponent(a),Lc()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),a}},{key:"tick",value:function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var e,n=c(this._views);try{for(n.s();!(e=n.n()).done;)e.value.detectChanges()}catch(i){n.e(i)}finally{n.f()}}catch(r){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(r)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(t){var e=t;this._views.push(e),e.attachToAppRef(this)}},{key:"detachView",value:function(t){var e=t;Gc(this._views,e),e.detachFromAppRef()}},{key:"_loadComponent",value:function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(uc,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(t){return t.destroy()}),this._onMicrotaskEmptySubscription.unsubscribe()}},{key:"viewCount",get:function(){return this._views.length}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Cc),Ui(cc),Ui(Ho),Ui(Mr),Ui(kl),Ui(ic))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}();function Gc(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Kc=function t(){g(this,t)},Zc=function t(){g(this,t)},$c={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Xc=function(){var t=function(){function t(e,n){g(this,t),this._compiler=e,this._config=n||$c}return v(t,[{key:"load",value:function(t){return this.loadAndCompile(t)}},{key:"loadAndCompile",value:function(t){var e=this,i=l(t.split("#"),2),r=i[0],a=i[1];return void 0===a&&(a="default"),n("crnd")(r).then(function(t){return t[a]}).then(function(t){return Qc(t,r,a)}).then(function(t){return e._compiler.compileModuleAsync(t)})}},{key:"loadFactory",value:function(t){var e=l(t.split("#"),2),i=e[0],r=e[1],a="NgFactory";return void 0===r&&(r="default",a=""),n("crnd")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then(function(t){return t[r+a]}).then(function(t){return Qc(t,i,r)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(bc),Ui(Zc,8))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}();function Qc(t,e,n){if(!t)throw new Error("Cannot find '".concat(n,"' in '").concat(e,"'"));return t}var Jc=zc(null,"core",[{provide:lc,useValue:"unknown"},{provide:qc,deps:[Ho]},{provide:Rc,deps:[]},{provide:cc,deps:[]}]),th=[{provide:Yc,useClass:Yc,deps:[Cc,cc,Ho,Mr,kl,ic]},{provide:mu,deps:[Cc],useFactory:function(t){var e=[];return t.onStable.subscribe(function(){for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:ic,useClass:ic,deps:[[new Ri,nc]]},{provide:bc,useClass:bc,deps:[]},ac,{provide:Hl,useFactory:function(){return Ql},deps:[]},{provide:Ul,useFactory:function(){return Jl},deps:[]},{provide:hc,useFactory:function(t){return ll(t=t||"undefined"!=typeof $localize&&$localize.locale||sl),t},deps:[[new Ti(hc),new Ri,new Mi]]},{provide:dc,useValue:"USD"}],eh=function(){var t=function t(e){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(Ui(Yc))},providers:th}),t}(),nh=null;function ih(){return nh}var rh=function t(){g(this,t)},ah=new bi("DocumentToken"),oh=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:sh,token:t,providedIn:"platform"}),t}();function sh(){return Ui(uh)}var lh=new bi("Location Initialized"),uh=function(){var t=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this))._doc=t,i._init(),i}return v(n,[{key:"_init",value:function(){this.location=ih().getLocation(),this._history=ih().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return ih().getBaseHref(this._doc)}},{key:"onPopState",value:function(t){ih().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}},{key:"onHashChange",value:function(t){ih().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}},{key:"pushState",value:function(t,e,n){ch()?this._history.pushState(t,e,n):this.location.hash=n}},{key:"replaceState",value:function(t,e,n){ch()?this._history.replaceState(t,e,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{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(t){this.location.pathname=t}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(oh);return t.\u0275fac=function(e){return new(e||t)(Ui(ah))},t.\u0275prov=Dt({factory:hh,token:t,providedIn:"platform"}),t}();function ch(){return!!window.history.pushState}function hh(){return new uh(Ui(ah))}function dh(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function fh(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function ph(t){return t&&"?"!==t[0]?"?"+t:t}var mh=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:vh,token:t,providedIn:"root"}),t}();function vh(t){var e=Ui(ah).location;return new yh(Ui(oh),e&&e.origin||"")}var gh=new bi("appBaseHref"),yh=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;if(g(this,n),(r=e.call(this))._platformLocation=t,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)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 r._baseHref=i,r}return v(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(t){return dh(this._baseHref,t)}},{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._platformLocation.pathname+ph(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?"".concat(e).concat(n):e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+ph(i));this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+ph(i));this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(mh);return t.\u0275fac=function(e){return new(e||t)(Ui(oh),Ui(gh,8))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),_h=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this))._platformLocation=t,r._baseHref="",null!=i&&(r._baseHref=i),r}return v(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}},{key:"prepareExternalUrl",value:function(t){var e=dh(this._baseHref,t);return e.length>0?"#"+e:e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+ph(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+ph(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(mh);return t.\u0275fac=function(e){return new(e||t)(Ui(oh),Ui(gh,8))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),bh=function(){var t=function(){function t(e,n){var i=this;g(this,t),this._subject=new Ru,this._urlChangeListeners=[],this._platformStrategy=e;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=fh(wh(r)),this._platformStrategy.onPopState(function(t){i._subject.emit({url:i.path(!0),pop:!0,state:t.state,type:t.type})})}return v(t,[{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(t))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(t+ph(e))}},{key:"normalize",value:function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,wh(e)))}},{key:"prepareExternalUrl",value:function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}},{key:"go",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+ph(e)),n)}},{key:"replaceState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+ph(e)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(t){var e=this;this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(t){e._notifyUrlChangeListeners(t.url,t.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(n){return n(t,e)})}},{key:"subscribe",value:function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(mh),Ui(oh))},t.normalizeQueryParams=ph,t.joinWithSlash=dh,t.stripTrailingSlash=fh,t.\u0275prov=Dt({factory:kh,token:t,providedIn:"root"}),t}();function kh(){return new bh(Ui(mh),Ui(oh))}function wh(t){return t.replace(/\/index.html$/,"")}var Ch=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Sh=function t(){g(this,t)},xh=function(){var t=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this)).locale=t,i}return v(n,[{key:"getPluralCategory",value:function(t,e){switch(function(t){return function(t){var e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t),n=al(e);if(n)return n;var i=e.split("-")[0];if(n=al(i))return n;if("en"===i)return il;throw new Error('Missing locale data for the locale "'.concat(t,'".'))}(t)[ol.PluralCase]}(e||this.locale)(t)){case Ch.Zero:return"zero";case Ch.One:return"one";case Ch.Two:return"two";case Ch.Few:return"few";case Ch.Many:return"many";default:return"other"}}}]),n}(Sh);return t.\u0275fac=function(e){return new(e||t)(Ui(hc))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}();function Eh(t,e){e=encodeURIComponent(e);var n,i=c(t.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=r.indexOf("="),o=l(-1==a?[r,""]:[r.slice(0,a),r.slice(a+1)],2),s=o[1];if(o[0].trim()===e)return decodeURIComponent(s)}}catch(u){i.e(u)}finally{i.f()}return null}var Ah=function(){var t=function(){function t(e,n,i,r){g(this,t),this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return v(t,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}},{key:"_applyKeyValueChanges",value:function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})}},{key:"_applyIterableChanges",value:function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat(wt(t.item)));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})}},{key:"_applyClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))}},{key:"_removeClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))}},{key:"_toggleClass",value:function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})}},{key:"klass",set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Qo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Hl),ss(Ul),ss(xl),ss(Al))},t.\u0275dir=de({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t}(),Dh=function(){function t(e,n,i,r){g(this,t),this.$implicit=e,this.ngForOf=n,this.index=i,this.count=r}return v(t,[{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}}]),t}(),Oh=function(){var t=function(){function t(e,n,i){g(this,t),this._viewContainer=e,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return v(t,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(t,"' of type '").concat((e=t).name||typeof e,"'. NgFor only supports binding to Iterables such as Arrays."))}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(t){var e=this,n=[];t.forEachOperation(function(t,i,r){if(null==t.previousIndex){var a=e._viewContainer.createEmbeddedView(e._template,new Dh(null,e._ngForOf,-1,-1),null===r?void 0:r),o=new Ih(t,a);n.push(o)}else if(null==r)e._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=e._viewContainer.get(i);e._viewContainer.move(s,r);var l=new Ih(t,s);n.push(l)}});for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:Vt.Default,e=Zl(!0);if(null!=e||t&Vt.Optional)return e;De("ChangeDetectorRef")}())},t.\u0275pipe=fe({name:"async",type:t,pure:!1}),t}();function Uh(t,e){return{key:t,value:e}}var qh=function(){var t=function(){function t(e){g(this,t),this.differs=e,this.keyValues=[]}return v(t,[{key:"transform",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wh;if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());var i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem(function(t){e.keyValues.push(Uh(t.key,t.currentValue))}),this.keyValues.sort(n)),this.keyValues}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Ul))},t.\u0275pipe=fe({name:"keyvalue",type:t,pure:!1}),t}();function Wh(t,e){var n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n1&&void 0!==arguments[1])||arguments[1],i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Zt.getAllAngularTestabilities=function(){return t.getAllTestabilities()},Zt.getAllAngularRootElements=function(){return t.getAllRootElements()},Zt.frameworkStabilizers||(Zt.frameworkStabilizers=[]),Zt.frameworkStabilizers.push(function(t){var e=Zt.getAllAngularTestabilities(),n=e.length,i=!1,r=function(e){i=i||e,0==--n&&t(i)};e.forEach(function(t){t.whenStable(r)})})}},{key:"findTestabilityInTree",value:function(t,e,n){if(null==e)return null;var i=t.getTestability(e);return null!=i?i:n?ih().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}],[{key:"init",value:function(){var e;e=new t,Pc=e}}]),t}(),nd=new bi("EventManagerPlugins"),id=function(){var t=function(){function t(e,n){var i=this;g(this,t),this._zone=n,this._eventNameToPlugin=new Map,e.forEach(function(t){return t.manager=i}),this._plugins=e.slice().reverse()}return v(t,[{key:"addEventListener",value:function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}},{key:"addGlobalEventListener",value:function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,i=0;i-1&&(e.splice(n,1),a+=t+".")}),a+=r,0!=e.length||0===r.length)return null;var o={};return o.domEventName=i,o.fullKey=a,o}},{key:"getEventFullKey",value:function(t){var e="",n=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&kd.hasOwnProperty(e)&&(e=kd[e]))}return bd[e]||e}(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),_d.forEach(function(i){i!=n&&(0,wd[i])(t)&&(e+=i+".")}),e+=n}},{key:"eventCallback",value:function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded(function(){return e(r)})}}},{key:"_normalizeKey",value:function(t){switch(t){case"esc":return"escape";default:return t}}}]),n}(rd);return t.\u0275fac=function(e){return new(e||t)(Ui(ah))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Sd=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:function(){return Ui(xd)},token:t,providedIn:"root"}),t}(),xd=function(){var t=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this))._doc=t,i}return v(n,[{key:"sanitize",value:function(t,e){if(null==e)return null;switch(t){case Ar.NONE:return e;case Ar.HTML:return nr(e,"HTML")?er(e):xr(this._doc,String(e));case Ar.STYLE:return nr(e,"Style")?er(e):e;case Ar.SCRIPT:if(nr(e,"Script"))return er(e);throw new Error("unsafe value used in a script context");case Ar.URL:return ir(e),nr(e,"URL")?er(e):lr(String(e));case Ar.RESOURCE_URL:if(nr(e,"ResourceURL"))return er(e);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(t," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(t){return new $i(t)}},{key:"bypassSecurityTrustStyle",value:function(t){return new Xi(t)}},{key:"bypassSecurityTrustScript",value:function(t){return new Qi(t)}},{key:"bypassSecurityTrustUrl",value:function(t){return new Ji(t)}},{key:"bypassSecurityTrustResourceUrl",value:function(t){return new tr(t)}}]),n}(Sd);return t.\u0275fac=function(e){return new(e||t)(Ui(ah))},t.\u0275prov=Dt({factory:function(){return t=Ui(xo),new xd(t.get(ah));var t},token:t,providedIn:"root"}),t}(),Ed=zc(Jc,"browser",[{provide:lc,useValue:"browser"},{provide:sc,useValue:function(){Xh.makeCurrent(),ed.init()},multi:!0},{provide:ah,useFactory:function(){return function(t){Le=t}(document),document},deps:[]}]),Ad=[[],{provide:Ao,useValue:"root"},{provide:Mr,useFactory:function(){return new Mr},deps:[]},{provide:nd,useClass:yd,multi:!0,deps:[ah,Cc,lc]},{provide:nd,useClass:Cd,multi:!0,deps:[ah]},[],{provide:pd,useClass:pd,deps:[id,od,rc]},{provide:El,useExisting:pd},{provide:ad,useExisting:od},{provide:od,useClass:od,deps:[ah]},{provide:Tc,useClass:Tc,deps:[Cc]},{provide:id,useClass:id,deps:[nd,Cc]},[]],Dd=function(){var t=function(){function t(e){if(g(this,t),e)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 v(t,null,[{key:"withServerTransition",value:function(e){return{ngModule:t,providers:[{provide:rc,useValue:e.appId},{provide:Jh,useExisting:rc},td]}}}]),t}();return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(Ui(t,12))},providers:Ad,imports:[Yh,eh]}),t}();function Od(){for(var t=arguments.length,e=new Array(t),n=0;n0){var i=t.slice(0,e),r=i.toLowerCase(),a=t.slice(e+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(a):n.headers.set(r,[a])}})}:function(){n.headers=new Map,Object.keys(e).forEach(function(t){var i=e[t],r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(t,r))})}:this.headers=new Map}return v(t,[{key:"has",value:function(t){return this.init(),this.headers.has(t.toLowerCase())}},{key:"get",value:function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(t){return this.init(),this.headers.get(t.toLowerCase())||null}},{key:"append",value:function(t,e){return this.clone({name:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({name:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({name:t,value:e,op:"d"})}},{key:"maybeSetNormalizedName",value:function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}},{key:"init",value:function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return e.applyUpdate(t)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach(function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))})}},{key:"clone",value:function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}},{key:"applyUpdate",value:function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,h(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var a=this.headers.get(e);if(!a)return;0===(a=a.filter(function(t){return-1===r.indexOf(t)})).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}else this.headers.delete(e),this.normalizedNames.delete(e)}}},{key:"forEach",value:function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return t(e.normalizedNames.get(n),e.headers.get(n))})}}]),t}(),Nd=function(){function t(){g(this,t)}return v(t,[{key:"encodeKey",value:function(t){return jd(t)}},{key:"encodeValue",value:function(t){return jd(t)}},{key:"decodeKey",value:function(t){return decodeURIComponent(t)}},{key:"decodeValue",value:function(t){return decodeURIComponent(t)}}]),t}();function Vd(t,e){var n=new Map;return t.length>0&&t.split("&").forEach(function(t){var i=t.indexOf("="),r=l(-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],2),a=r[0],o=r[1],s=n.get(a)||[];s.push(o),n.set(a,s)}),n}function jd(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Bd=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(g(this,t),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new Nd,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Vd(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(function(t){var i=n.fromObject[t];e.map.set(t,Array.isArray(i)?i:[i])})):this.map=null}return v(t,[{key:"has",value:function(t){return this.init(),this.map.has(t)}},{key:"get",value:function(t){this.init();var e=this.map.get(t);return e?e[0]:null}},{key:"getAll",value:function(t){return this.init(),this.map.get(t)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(t,e){return this.clone({param:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({param:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({param:t,value:e,op:"d"})}},{key:"toString",value:function(){var t=this;return this.init(),this.keys().map(function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map(function(e){return n+"="+t.encoder.encodeValue(e)}).join("&")}).filter(function(t){return""!==t}).join("&")}},{key:"clone",value:function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n}},{key:"init",value:function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(e){return t.map.set(e,t.cloneFrom.map.get(e))}),this.updates.forEach(function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}}),this.cloneFrom=this.updates=null)}}]),t}();function zd(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Hd(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Ud(t){return"undefined"!=typeof FormData&&t instanceof FormData}var qd=function(){function t(e,n,i,r){var a;if(g(this,t),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,a=r):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new Ld),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s0&&void 0!==arguments[0]?arguments[0]:{},n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,a=void 0!==e.body?e.body:this.body,o=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,s=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,l=e.headers||this.headers,u=e.params||this.params;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce(function(t,n){return t.set(n,e.setHeaders[n])},l)),e.setParams&&(u=Object.keys(e.setParams).reduce(function(t,n){return t.set(n,e.setParams[n])},u)),new t(n,i,a,{params:u,headers:l,reportProgress:s,responseType:r,withCredentials:o})}}]),t}(),Wd=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({}),Yd=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";g(this,t),this.headers=e.headers||new Ld,this.status=void 0!==e.status?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300},Gd=function(t){y(n,t);var e=k(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return g(this,n),(t=e.call(this,i)).type=Wd.ResponseHeader,t}return v(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Yd),Kd=function(t){y(n,t);var e=k(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return g(this,n),(t=e.call(this,i)).type=Wd.Response,t.body=void 0!==i.body?i.body:null,t}return v(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Yd),Zd=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this,t,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for ".concat(t.url||"(unknown url)"):"Http failure response for ".concat(t.url||"(unknown url)",": ").concat(t.status," ").concat(t.statusText),i.error=t.error||null,i}return n}(Yd);function $d(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var Xd=function(){var t=function(){function t(e){g(this,t),this.handler=e}return v(t,[{key:"request",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof qd)n=t;else{var a=void 0;a=r.headers instanceof Ld?r.headers:new Ld(r.headers);var o=void 0;r.params&&(o=r.params instanceof Bd?r.params:new Bd({fromObject:r.params})),n=new qd(t,e,void 0!==r.body?r.body:null,{headers:a,params:o,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=Od(n).pipe(Id(function(t){return i.handler.handle(t)}));if(t instanceof qd||"events"===r.observe)return s;var l=s.pipe(Td(function(t){return t instanceof Kd}));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(G(function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(G(function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(G(function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(G(function(t){return t.body}))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}},{key:"delete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",t,e)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",t,e)}},{key:"head",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",t,e)}},{key:"jsonp",value:function(t,e){return this.request("JSONP",t,{params:(new Bd).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",t,e)}},{key:"patch",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",t,$d(n,e))}},{key:"post",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",t,$d(n,e))}},{key:"put",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",t,$d(n,e))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Md))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Qd=function(){function t(e,n){g(this,t),this.next=e,this.interceptor=n}return v(t,[{key:"handle",value:function(t){return this.interceptor.intercept(t,this.next)}}]),t}(),Jd=new bi("HTTP_INTERCEPTORS"),tf=function(){var t=function(){function t(){g(this,t)}return v(t,[{key:"intercept",value:function(t,e){return e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),ef=/^\)\]\}',?\n/,nf=function t(){g(this,t)},rf=function(){var t=function(){function t(){g(this,t)}return v(t,[{key:"build",value:function(){return new XMLHttpRequest}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),af=function(){var t=function(){function t(e){g(this,t),this.xhrFactory=e}return v(t,[{key:"handle",value:function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new j(function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach(function(t,e){return i.setRequestHeader(t,e.join(","))}),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var a=t.responseType.toLowerCase();i.responseType="json"!==a?a:"text"}var o=t.serializeBody(),s=null,l=function(){if(null!==s)return s;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new Ld(i.getAllResponseHeaders()),a=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new Gd({headers:r,status:e,statusText:n,url:a})},u=function(){var e=l(),r=e.headers,a=e.status,o=e.statusText,s=e.url,u=null;204!==a&&(u=void 0===i.response?i.responseText:i.response),0===a&&(a=u?200:0);var c=a>=200&&a<300;if("json"===t.responseType&&"string"==typeof u){var h=u;u=u.replace(ef,"");try{u=""!==u?JSON.parse(u):null}catch(d){u=h,c&&(c=!1,u={error:d,text:u})}}c?(n.next(new Kd({body:u,headers:r,status:a,statusText:o,url:s||void 0})),n.complete()):n.error(new Zd({error:u,headers:r,status:a,statusText:o,url:s||void 0}))},c=function(t){var e=l(),r=new Zd({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e.url||void 0});n.error(r)},h=!1,d=function(e){h||(n.next(l()),h=!0);var r={type:Wd.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},f=function(t){var e={type:Wd.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",u),i.addEventListener("error",c),t.reportProgress&&(i.addEventListener("progress",d),null!==o&&i.upload&&i.upload.addEventListener("progress",f)),i.send(o),n.next({type:Wd.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("load",u),t.reportProgress&&(i.removeEventListener("progress",d),null!==o&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(nf))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),of=new bi("XSRF_COOKIE_NAME"),sf=new bi("XSRF_HEADER_NAME"),lf=function t(){g(this,t)},uf=function(){var t=function(){function t(e,n,i){g(this,t),this.doc=e,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return v(t,[{key:"getToken",value:function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Eh(t,this.cookieName),this.lastCookieString=t),this.lastToken}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(ah),Ui(lc),Ui(of))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),cf=function(){var t=function(){function t(e,n){g(this,t),this.tokenService=e,this.headerName=n}return v(t,[{key:"intercept",value:function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(lf),Ui(sf))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),hf=function(){var t=function(){function t(e,n){g(this,t),this.backend=e,this.injector=n,this.chain=null}return v(t,[{key:"handle",value:function(t){if(null===this.chain){var e=this.injector.get(Jd,[]);this.chain=e.reduceRight(function(t,e){return new Qd(t,e)},this.backend)}return this.chain.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Fd),Ui(Ho))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),df=function(){var t=function(){function t(){g(this,t)}return v(t,null,[{key:"disable",value:function(){return{ngModule:t,providers:[{provide:cf,useClass:tf}]}}},{key:"withOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.cookieName?{provide:of,useValue:e.cookieName}:[],e.headerName?{provide:sf,useValue:e.headerName}:[]]}}}]),t}();return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[cf,{provide:Jd,useExisting:cf,multi:!0},{provide:lf,useClass:uf},{provide:of,useValue:"XSRF-TOKEN"},{provide:sf,useValue:"X-XSRF-TOKEN"}]}),t}(),ff=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[Xd,{provide:Md,useClass:hf},af,{provide:Fd,useExisting:af},rf,{provide:nf,useExisting:rf}],imports:[[df.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t}(),pf=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this))._value=t,i}return v(n,[{key:"_subscribe",value:function(t){var e=r(i(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new z;return this._value}},{key:"next",value:function(t){r(i(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(q),mf=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyError",value:function(t,e){this.destination.error(t)}},{key:"notifyComplete",value:function(t){this.destination.complete()}}]),n}(M),vf=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this)).parent=t,a.outerValue=i,a.outerIndex=r,a.index=0,a}return v(n,[{key:"_next",value:function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}},{key:"_error",value:function(t){this.parent.notifyError(t,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(M);function gf(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new vf(t,n,i);if(!r.closed)return e instanceof j?e.subscribe(r):et(e)(r)}var yf={};function _f(){for(var t=arguments.length,e=new Array(t),n=0;n=2&&(n=!0),function(i){return i.lift(new Nf(t,e,n))}}var Nf=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];g(this,t),this.accumulator=e,this.seed=n,this.hasSeed=i}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new Vf(t,this.accumulator,this.seed,this.hasSeed))}}]),t}(),Vf=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t)).accumulator=i,o._seed=r,o.hasSeed=a,o.index=0,o}return v(n,[{key:"_next",value:function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(i){this.destination.error(i)}this.seed=e,this.destination.next(e)}},{key:"seed",get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t}}]),n}(M);function jf(t){return function(e){var n=new Bf(t),i=e.lift(n);return n.caught=i}}var Bf=function(){function t(e){g(this,t),this.selector=e}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new zf(t,this.selector,this.caught))}}]),t}(),zf=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t)).selector=i,a.caught=r,a}return v(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(s){return void r(i(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var a=new rt(this);this.add(a);var o=ot(e,a);o!==a&&this.add(o)}}}]),n}(at);function Hf(t){return function(e){return 0===t?Ef():e.lift(new Uf(t))}}var Uf=function(){function t(e){if(g(this,t),this.total=e,this.total<0)throw new Tf}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new qf(t,this.total))}}]),t}(),qf=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).total=i,r.ring=new Array,r.count=0,r}return v(n,[{key:"_next",value:function(t){var e=this.ring,n=this.total,i=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r0&&void 0!==arguments[0]?arguments[0]:Kf;return function(e){return e.lift(new Yf(t))}}var Yf=function(){function t(e){g(this,t),this.errorFactory=e}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new Gf(t,this.errorFactory))}}]),t}(),Gf=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).errorFactory=i,r.hasValue=!1,r}return v(n,[{key:"_next",value:function(t){this.hasValue=!0,this.destination.next(t)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}]),n}(M);function Kf(){return new wf}function Zf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e){return e.lift(new $f(t))}}var $f=function(){function t(e){g(this,t),this.defaultValue=e}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new Xf(t,this.defaultValue))}}]),t}(),Xf=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).defaultValue=i,r.isEmpty=!0,r}return v(n,[{key:"_next",value:function(t){this.isEmpty=!1,this.destination.next(t)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(M);function Qf(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Td(function(e,n){return t(e,n,i)}):N,Rf(1),n?Zf(e):Wf(function(){return new wf}))}}function Jf(){}function tp(t,e,n){return function(i){return i.lift(new ep(t,e,n))}}var ep=function(){function t(e,n,i){g(this,t),this.nextOrObserver=e,this.error=n,this.complete=i}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new np(t,this.nextOrObserver,this.error,this.complete))}}]),t}(),np=function(t){y(n,t);var e=k(n);function n(t,i,r,o){var s;return g(this,n),(s=e.call(this,t))._tapNext=Jf,s._tapError=Jf,s._tapComplete=Jf,s._tapError=r||Jf,s._tapComplete=o||Jf,x(i)?(s._context=a(s),s._tapNext=i):i&&(s._context=i,s._tapNext=i.next||Jf,s._tapError=i.error||Jf,s._tapComplete=i.complete||Jf),s}return v(n,[{key:"_next",value:function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}},{key:"_error",value:function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}]),n}(M),ip=function(){function t(e){g(this,t),this.callback=e}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new rp(t,this.callback))}}]),t}(),rp=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).add(new A(i)),r}return n}(M),ap=function t(e,n){g(this,t),this.id=e,this.url=n},op=function(t){y(n,t);var e=k(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return g(this,n),(r=e.call(this,t,i)).navigationTrigger=a,r.restoredState=o,r}return v(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(ap),sp=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a}return v(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(ap),lp=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t,i)).reason=r,a}return v(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(ap),up=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t,i)).error=r,a}return v(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(ap),cp=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return v(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(ap),hp=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return v(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(ap),dp=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o){var s;return g(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s.shouldActivate=o,s}return v(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(ap),fp=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return v(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(ap),pp=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o.state=a,o}return v(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(ap),mp=function(){function t(e){g(this,t),this.route=e}return v(t,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),t}(),vp=function(){function t(e){g(this,t),this.route=e}return v(t,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),t}(),gp=function(){function t(e){g(this,t),this.snapshot=e}return v(t,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),yp=function(){function t(e){g(this,t),this.snapshot=e}return v(t,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),_p=function(){function t(e){g(this,t),this.snapshot=e}return v(t,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),bp=function(){function t(e){g(this,t),this.snapshot=e}return v(t,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),kp=function(){function t(e,n,i){g(this,t),this.routerEvent=e,this.position=n,this.anchor=i}return v(t,[{key:"toString",value:function(){var t=this.position?"".concat(this.position[0],", ").concat(this.position[1]):null;return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(t,"')")}}]),t}(),wp="primary",Cp=function(){function t(e){g(this,t),this.params=e||{}}return v(t,[{key:"has",value:function(t){return Object.prototype.hasOwnProperty.call(this.params,t)}},{key:"get",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null}},{key:"getAll",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),t}();function Sp(t){return new Cp(t)}function xp(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function Ep(t,e,n){var i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length0?t[t.length-1]:null}function Tp(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Rp(t){return ys(t)?t:gs(t)?it(Promise.resolve(t)):Od(t)}function Pp(t,e,n){return n?function(t,e){return Ap(t,e)}(t.queryParams,e.queryParams)&&Mp(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(function(n){return Dp(t[n],e[n])})}(t.queryParams,e.queryParams)&&Fp(t.root,e.root)}function Mp(t,e){if(!Bp(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(var n in e.children){if(!t.children[n])return!1;if(!Mp(t.children[n],e.children[n]))return!1}return!0}function Fp(t,e){return Lp(t,e,e.segments)}function Lp(t,e,n){if(t.segments.length>n.length)return!!Bp(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Bp(t.segments,n))return!1;for(var i in e.children){if(!t.children[i])return!1;if(!Fp(t.children[i],e.children[i]))return!1}return!0}var r=n.slice(0,t.segments.length),a=n.slice(t.segments.length);return!!Bp(t.segments,r)&&!!t.children.primary&&Lp(t.children.primary,e,a)}var Np=function(){function t(e,n,i){g(this,t),this.root=e,this.queryParams=n,this.fragment=i}return v(t,[{key:"toString",value:function(){return Up.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Sp(this.queryParams)),this._queryParamMap}}]),t}(),Vp=function(){function t(e,n){var i=this;g(this,t),this.segments=e,this.children=n,this.parent=null,Tp(n,function(t,e){return t.parent=i})}return v(t,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return qp(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),t}(),jp=function(){function t(e,n){g(this,t),this.path=e,this.parameters=n}return v(t,[{key:"toString",value:function(){return Xp(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=Sp(this.parameters)),this._parameterMap}}]),t}();function Bp(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}var zp=function t(){g(this,t)},Hp=function(){function t(){g(this,t)}return v(t,[{key:"parse",value:function(t){var e=new nm(t);return new Np(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}},{key:"serialize",value:function(t){var e,n,i="/".concat(Wp(t.root,!0)),r=(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return"".concat(Gp(t),"=").concat(Gp(e))}).join("&"):"".concat(Gp(t),"=").concat(Gp(n))})).length?"?".concat(n.join("&")):""),a="string"==typeof t.fragment?"#".concat(encodeURI(t.fragment)):"";return"".concat(i).concat(r).concat(a)}}]),t}(),Up=new Hp;function qp(t){return t.segments.map(function(t){return Xp(t)}).join("/")}function Wp(t,e){if(!t.hasChildren())return qp(t);if(e){var n=t.children.primary?Wp(t.children.primary,!1):"",i=[];return Tp(t.children,function(t,e){e!==wp&&i.push("".concat(e,":").concat(Wp(t,!1)))}),i.length>0?"".concat(n,"(").concat(i.join("//"),")"):n}var r=function(t,e){var n=[];return Tp(t.children,function(t,i){i===wp&&(n=n.concat(e(t,i)))}),Tp(t.children,function(t,i){i!==wp&&(n=n.concat(e(t,i)))}),n}(t,function(e,n){return n===wp?[Wp(t.children.primary,!1)]:["".concat(n,":").concat(Wp(e,!1))]});return 1===Object.keys(t.children).length&&null!=t.children.primary?"".concat(qp(t),"/").concat(r[0]):"".concat(qp(t),"/(").concat(r.join("//"),")")}function Yp(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Gp(t){return Yp(t).replace(/%3B/gi,";")}function Kp(t){return Yp(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Zp(t){return decodeURIComponent(t)}function $p(t){return Zp(t.replace(/\+/g,"%20"))}function Xp(t){return"".concat(Kp(t.path)).concat((e=t.parameters,Object.keys(e).map(function(t){return";".concat(Kp(t),"=").concat(Kp(e[t]))}).join("")));var e}var Qp=/^[^\/()?;=#]+/;function Jp(t){var e=t.match(Qp);return e?e[0]:""}var tm=/^[^=?&#]+/,em=/^[^?&#]+/,nm=function(){function t(e){g(this,t),this.url=e,this.remaining=e}return v(t,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Vp([],{}):new Vp([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Vp(t,e)),n}},{key:"parseSegment",value:function(){var t=Jp(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(t),new jp(Zp(t),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t}},{key:"parseParam",value:function(t){var e=Jp(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=Jp(this.remaining);i&&this.capture(n=i)}t[Zp(e)]=Zp(n)}}},{key:"parseQueryParam",value:function(t){var e,n=(e=this.remaining.match(tm))?e[0]:"";if(n){this.capture(n);var i="";if(this.consumeOptional("=")){var r=function(t){var e=t.match(em);return e?e[0]:""}(this.remaining);r&&this.capture(i=r)}var a=$p(n),o=$p(i);if(t.hasOwnProperty(a)){var s=t[a];Array.isArray(s)||(t[a]=s=[s]),s.push(o)}else t[a]=o}}},{key:"parseParens",value:function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=Jp(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r=wp);var a=this.parseChildren();e[r]=1===Object.keys(a).length?a.primary:new Vp([],a),this.consumeOptional("//")}return e}},{key:"peekStartsWith",value:function(t){return this.remaining.startsWith(t)}},{key:"consumeOptional",value:function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}},{key:"capture",value:function(t){if(!this.consumeOptional(t))throw new Error('Expected "'.concat(t,'".'))}}]),t}(),im=function(){function t(e){g(this,t),this._root=e}return v(t,[{key:"parent",value:function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}},{key:"children",value:function(t){var e=rm(t,this._root);return e?e.children.map(function(t){return t.value}):[]}},{key:"firstChild",value:function(t){var e=rm(t,this._root);return e&&e.children.length>0?e.children[0].value:null}},{key:"siblings",value:function(t){var e=am(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})}},{key:"pathFromRoot",value:function(t){return am(t,this._root).map(function(t){return t.value})}},{key:"root",get:function(){return this._root.value}}]),t}();function rm(t,e){if(t===e.value)return e;var n,i=c(e.children);try{for(i.s();!(n=i.n()).done;){var r=rm(t,n.value);if(r)return r}}catch(a){i.e(a)}finally{i.f()}return null}function am(t,e){if(t===e.value)return[e];var n,i=c(e.children);try{for(i.s();!(n=i.n()).done;){var r=am(t,n.value);if(r.length)return r.unshift(e),r}}catch(a){i.e(a)}finally{i.f()}return[]}var om=function(){function t(e,n){g(this,t),this.value=e,this.children=n}return v(t,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),t}();function sm(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var lm=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).snapshot=i,mm(a(r),t),r}return v(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(im);function um(t,e){var n=function(t,e){var n=new fm([],{},{},"",{},wp,e,null,t.root,-1,{});return new pm("",new om(n,[]))}(t,e),i=new pf([new jp("",{})]),r=new pf({}),a=new pf({}),o=new pf({}),s=new pf(""),l=new cm(i,r,o,s,a,wp,e,n.root);return l.snapshot=n.root,new lm(new om(l,[]),n)}var cm=function(){function t(e,n,i,r,a,o,s,l){g(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this._futureSnapshot=l}return v(t,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(G(function(t){return Sp(t)}))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(G(function(t){return Sp(t)}))),this._queryParamMap}}]),t}();function hm(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=t.pathFromRoot,i=0;if("always"!==e)for(i=n.length-1;i>=1;){var r=n[i],a=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(a.component)break;i--}}return dm(n.slice(i))}function dm(t){return t.reduce(function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}},{params:{},data:{},resolve:{}})}var fm=function(){function t(e,n,i,r,a,o,s,l,u,c,h){g(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this.routeConfig=l,this._urlSegment=u,this._lastPathIndex=c,this._resolve=h}return v(t,[{key:"toString",value:function(){var t=this.url.map(function(t){return t.toString()}).join("/"),e=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(t,"', path:'").concat(e,"')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=Sp(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Sp(this.queryParams)),this._queryParamMap}}]),t}(),pm=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,i)).url=t,mm(a(r),i),r}return v(n,[{key:"toString",value:function(){return vm(this._root)}}]),n}(im);function mm(t,e){e.value._routerState=t,e.children.forEach(function(e){return mm(t,e)})}function vm(t){var e=t.children.length>0?" { ".concat(t.children.map(vm).join(", ")," } "):"";return"".concat(t.value).concat(e)}function gm(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Ap(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Ap(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;nr;){if(a-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new Am(i,!1,r-a)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(a,e,t),s=o.processChildren?Om(o.segmentGroup,o.index,a.commands):Dm(o.segmentGroup,o.index,a.commands);return Sm(o.segmentGroup,s,e,i,r)}function wm(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Cm(t){return"object"==typeof t&&null!=t&&t.outlets}function Sm(t,e,n,i,r){var a={};return i&&Tp(i,function(t,e){a[e]=Array.isArray(t)?t.map(function(t){return"".concat(t)}):"".concat(t)}),new Np(n.root===t?e:xm(n.root,t,e),a,r)}function xm(t,e,n){var i={};return Tp(t.children,function(t,r){i[r]=t===e?n:xm(t,e,n)}),new Vp(t.segments,i)}var Em=function(){function t(e,n,i){if(g(this,t),this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=i,e&&i.length>0&&wm(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find(Cm);if(r&&r!==Ip(i))throw new Error("{outlets:{}} has to be the last command")}return v(t,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),t}(),Am=function t(e,n,i){g(this,t),this.segmentGroup=e,this.processChildren=n,this.index=i};function Dm(t,e,n){if(t||(t=new Vp([],{})),0===t.segments.length&&t.hasChildren())return Om(t,e,n);var i=function(t,e,n){for(var i=0,r=e,a={match:!1,pathIndex:0,commandIndex:0};r=n.length)return a;var o=t.segments[r],s=n[i];if(Cm(s))break;var l="".concat(s),u=i0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!Pm(l,u,o))return a;i+=2}else{if(!Pm(l,{},o))return a;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex1&&void 0!==arguments[1]?arguments[1]:"",n=0;n0)?Object.assign({},Km):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};var r=(e.matcher||Ep)(n,t,e);if(!r)return Object.assign({},Km);var a={};Tp(r.posParams,function(t,e){a[e]=t.path});var o=r.consumed.length>0?Object.assign(Object.assign({},a),r.consumed[r.consumed.length-1].parameters):a;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o,positionalParamSegments:null!==(i=r.posParams)&&void 0!==i?i:{}}}function $m(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"corrected";if(n.length>0&&Jm(t,n,i)){var a=new Vp(e,Qm(t,e,i,new Vp(n,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===n.length&&tv(t,n,i)){var o=new Vp(t.segments,Xm(t,e,n,i,t.children,r));return o._sourceSegment=t,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:n}}var s=new Vp(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function Xm(t,e,n,i,r,a){var o,s={},l=c(i);try{for(l.s();!(o=l.n()).done;){var u=o.value;if(ev(t,n,u)&&!r[Ym(u)]){var h=new Vp([],{});h._sourceSegment=t,h._segmentIndexShift="legacy"===a?t.segments.length:e.length,s[Ym(u)]=h}}}catch(d){l.e(d)}finally{l.f()}return Object.assign(Object.assign({},r),s)}function Qm(t,e,n,i){var r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;var a,o=c(n);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(""===s.path&&Ym(s)!==wp){var l=new Vp([],{});l._sourceSegment=t,l._segmentIndexShift=e.length,r[Ym(s)]=l}}}catch(u){o.e(u)}finally{o.f()}return r}function Jm(t,e,n){return n.some(function(n){return ev(t,e,n)&&Ym(n)!==wp})}function tv(t,e,n){return n.some(function(n){return ev(t,e,n)})}function ev(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path}function nv(t,e,n,i){return!!(Ym(t)===i||i!==wp&&ev(e,n,t))&&("**"===t.path||Zm(e,t,n).matched)}function iv(t,e,n){return 0===e.length&&!t.children[n]}var rv=function t(e){g(this,t),this.segmentGroup=e||null},av=function t(e){g(this,t),this.urlTree=e};function ov(t){return new j(function(e){return e.error(new rv(t))})}function sv(t){return new j(function(e){return e.error(new av(t))})}function lv(t){return new j(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(t,"'")))})}var uv=function(){function t(e,n,i,r,a){g(this,t),this.configLoader=n,this.urlSerializer=i,this.urlTree=r,this.config=a,this.allowRedirects=!0,this.ngModule=e.get(ru)}return v(t,[{key:"apply",value:function(){var t=this,e=$m(this.urlTree.root,[],[],this.config).segmentGroup,n=new Vp(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,n,wp).pipe(G(function(e){return t.createUrlTree(cv(e),t.urlTree.queryParams,t.urlTree.fragment)})).pipe(jf(function(e){if(e instanceof av)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof rv)throw t.noMatchError(e);throw e}))}},{key:"match",value:function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,wp).pipe(G(function(n){return e.createUrlTree(cv(n),t.queryParams,t.fragment)})).pipe(jf(function(t){if(t instanceof rv)throw e.noMatchError(t);throw t}))}},{key:"noMatchError",value:function(t){return new Error("Cannot match any routes. URL Segment: '".concat(t.segmentGroup,"'"))}},{key:"createUrlTree",value:function(t,e,n){var i=t.segments.length>0?new Vp([],u({},wp,t)):t;return new Np(i,e,n)}},{key:"expandSegmentGroup",value:function(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(G(function(t){return new Vp([],t)})):this.expandSegment(t,n,e,n.segments,i,!0)}},{key:"expandChildren",value:function(t,e,n){for(var i=this,r=[],a=0,o=Object.keys(n.children);a=2;return function(i){return i.pipe(t?Td(function(e,n){return t(e,n,i)}):N,Hf(1),n?Zf(e):Wf(function(){return new wf}))}}())}},{key:"expandSegment",value:function(t,e,n,i,r,a){var o=this;return it(n).pipe(Id(function(s){return o.expandSegmentAgainstRoute(t,e,n,s,i,r,a).pipe(jf(function(t){if(t instanceof rv)return Od(null);throw t}))}),Qf(function(t){return!!t}),jf(function(t,n){if(t instanceof wf||"EmptyError"===t.name){if(iv(e,i,r))return Od(new Vp([],{}));throw new rv(e)}throw t}))}},{key:"expandSegmentAgainstRoute",value:function(t,e,n,i,r,a,o){return nv(i,e,r,a)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r,a):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,a):ov(e):ov(e)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,a){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,a):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,a)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(t,e,n,i){var r=this,a=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?sv(a):this.lineralizeSegments(n,a).pipe(st(function(n){var a=new Vp(n,{});return r.expandSegment(t,a,e,n,i,!1)}))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,a){var o=this,s=Zm(e,i,r),l=s.consumedSegments,u=s.lastChild,c=s.positionalParamSegments;if(!s.matched)return ov(e);var h=this.applyRedirectCommands(l,i.redirectTo,c);return i.redirectTo.startsWith("/")?sv(h):this.lineralizeSegments(i,h).pipe(st(function(i){return o.expandSegment(t,e,n,i.concat(r.slice(u)),a,!1)}))}},{key:"matchSegmentAgainstRoute",value:function(t,e,n,i,r){var a=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(G(function(t){return n._loadedConfig=t,new Vp(i,{})})):Od(new Vp(i,{}));var o=Zm(e,n,i),s=o.consumedSegments,l=o.lastChild;if(!o.matched)return ov(e);var u=i.slice(l);return this.getChildConfig(t,n,i).pipe(st(function(t){var i=t.module,o=t.routes,l=$m(e,s,u,o),c=l.segmentGroup,h=l.slicedSegments,d=new Vp(c.segments,c.children);if(0===h.length&&d.hasChildren())return a.expandChildren(i,o,d).pipe(G(function(t){return new Vp(s,t)}));if(0===o.length&&0===h.length)return Od(new Vp(s,{}));var f=Ym(n)===r;return a.expandSegment(i,d,o,h,f?wp:r,!0).pipe(G(function(t){return new Vp(s.concat(t.segments),t.children)}))}))}},{key:"getChildConfig",value:function(t,e,n){var i=this;return e.children?Od(new Lm(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Od(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(st(function(n){return n?i.configLoader.load(t.injector,e).pipe(G(function(t){return e._loadedConfig=t,t})):function(t){return new j(function(e){return e.error(xp("Cannot load children because the guard of the route \"path: '".concat(t.path,"'\" returned false")))})}(e)})):Od(new Lm([],t))}},{key:"runCanLoadGuards",value:function(t,e,n){var i=this,r=e.canLoad;return r&&0!==r.length?Od(r.map(function(i){var r,a=t.get(i);if(function(t){return t&&Nm(t.canLoad)}(a))r=a.canLoad(e,n);else{if(!Nm(a))throw new Error("Invalid CanLoad guard");r=a(e,n)}return Rp(r)})).pipe(Bm(),tp(function(t){if(Vm(t)){var e=xp('Redirecting to "'.concat(i.urlSerializer.serialize(t),'"'));throw e.url=t,e}}),G(function(t){return!0===t})):Od(!0)}},{key:"lineralizeSegments",value:function(t,e){for(var n=[],i=e.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Od(n);if(i.numberOfChildren>1||!i.children.primary)return lv(t.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}},{key:"applyRedirectCreatreUrlTree",value:function(t,e,n,i){var r=this.createSegmentGroup(t,e.root,n,i);return new Np(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}},{key:"createQueryParams",value:function(t,e){var n={};return Tp(t,function(t,i){if("string"==typeof t&&t.startsWith(":")){var r=t.substring(1);n[i]=e[r]}else n[i]=t}),n}},{key:"createSegmentGroup",value:function(t,e,n,i){var r=this,a=this.createSegments(t,e.segments,n,i),o={};return Tp(e.children,function(e,a){o[a]=r.createSegmentGroup(t,e,n,i)}),new Vp(a,o)}},{key:"createSegments",value:function(t,e,n,i){var r=this;return e.map(function(e){return e.path.startsWith(":")?r.findPosParam(t,e,i):r.findOrReturn(e,n)})}},{key:"findPosParam",value:function(t,e,n){var i=n[e.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(t,"'. Cannot find '").concat(e.path,"'."));return i}},{key:"findOrReturn",value:function(t,e){var n,i=0,r=c(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.path===t.path)return e.splice(i),a;i++}}catch(o){r.e(o)}finally{r.f()}return t}}]),t}();function cv(t){for(var e={},n=0,i=Object.keys(t.children);n0||a.hasChildren())&&(e[r]=a)}return function(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new Vp(t.segments.concat(e.segments),e.children)}return t}(new Vp(t.segments,e))}var hv=function t(e){g(this,t),this.path=e,this.route=this.path[this.path.length-1]},dv=function t(e,n){g(this,t),this.component=e,this.route=n};function fv(t,e,n){var i=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function pv(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},a=sm(e);return t.children.forEach(function(t){mv(t,a[t.value.outlet],n,i.concat([t.value]),r),delete a[t.value.outlet]}),Tp(a,function(t,e){return gv(t,n.getContext(e),r)}),r}function mv(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},a=t.value,o=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(o&&a.routeConfig===o.routeConfig){var l=vv(o,a,a.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new hv(i)):(a.data=o.data,a._resolvedData=o._resolvedData),pv(t,e,a.component?s?s.children:null:n,i,r),l&&s&&s.outlet&&s.outlet.isActivated&&r.canDeactivateChecks.push(new dv(s.outlet.component,o))}else o&&gv(e,s,r),r.canActivateChecks.push(new hv(i)),pv(t,null,a.component?s?s.children:null:n,i,r);return r}function vv(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Bp(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Bp(t.url,e.url)||!Ap(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ym(t,e)||!Ap(t.queryParams,e.queryParams);case"paramsChange":default:return!ym(t,e)}}function gv(t,e,n){var i=sm(t),r=t.value;Tp(i,function(t,i){gv(t,r.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new dv(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}var yv=function t(){g(this,t)};function _v(t){return new j(function(e){return e.error(t)})}var bv=function(){function t(e,n,i,r,a,o){g(this,t),this.rootComponentType=e,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=o}return v(t,[{key:"recognize",value:function(){var t=$m(this.urlTree.root,[],[],this.config.filter(function(t){return void 0===t.redirectTo}),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,wp);if(null===e)return null;var n=new fm([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},wp,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new om(n,e),r=new pm(this.url,i);return this.inheritParamsAndData(r._root),r}},{key:"inheritParamsAndData",value:function(t){var e=this,n=t.value,i=hm(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})}},{key:"processSegmentGroup",value:function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}},{key:"processChildren",value:function(t,e){for(var n=[],i=0,r=Object.keys(e.children);i0?Ip(n).parameters:{};r=new fm(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Cv(t),Ym(t),t.component,t,kv(e),wv(e)+n.length,Sv(t))}else{var l=Zm(e,t,n);if(!l.matched)return null;a=l.consumedSegments,o=n.slice(l.lastChild),r=new fm(a,l.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Cv(t),Ym(t),t.component,t,kv(e),wv(e)+a.length,Sv(t))}var u=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),c=$m(e,a,o,u.filter(function(t){return void 0===t.redirectTo}),this.relativeLinkResolution),h=c.segmentGroup,d=c.slicedSegments;if(0===d.length&&h.hasChildren()){var f=this.processChildren(u,h);return null===f?null:[new om(r,f)]}if(0===u.length&&0===d.length)return[new om(r,[])];var p=Ym(t)===i,m=this.processSegment(u,h,d,p?wp:i);return null===m?null:[new om(r,m)]}}]),t}();function kv(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function wv(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function Cv(t){return t.data||{}}function Sv(t){return t.resolve||{}}function xv(t){return Df(function(e){var n=t(e);return n?it(n).pipe(G(function(){return e})):Od(e)})}var Ev=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return n}(function(){function t(){g(this,t)}return v(t,[{key:"shouldDetach",value:function(t){return!1}},{key:"store",value:function(t,e){}},{key:"shouldAttach",value:function(t){return!1}},{key:"retrieve",value:function(t){return null}},{key:"shouldReuseRoute",value:function(t,e){return t.routeConfig===e.routeConfig}}]),t}()),Av=new bi("ROUTES"),Dv=function(){function t(e,n,i,r){g(this,t),this.loader=e,this.compiler=n,this.onLoadStartListener=i,this.onLoadEndListener=r}return v(t,[{key:"load",value:function(t,e){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(G(function(i){n.onLoadEndListener&&n.onLoadEndListener(e);var r=i.create(t);return new Lm(Op(r.injector.get(Av)).map(Wm),r)}))}},{key:"loadModuleFactory",value:function(t){var e=this;return"string"==typeof t?it(this.loader.load(t)):Rp(t()).pipe(st(function(t){return t instanceof au?Od(t):it(e.compiler.compileModuleAsync(t))}))}}]),t}(),Ov=function t(){g(this,t),this.outlet=null,this.route=null,this.resolver=null,this.children=new Iv,this.attachRef=null},Iv=function(){function t(){g(this,t),this.contexts=new Map}return v(t,[{key:"onChildOutletCreated",value:function(t,e){var n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}},{key:"onChildOutletDestroyed",value:function(t){var e=this.getContext(t);e&&(e.outlet=null)}},{key:"onOutletDeactivated",value:function(){var t=this.contexts;return this.contexts=new Map,t}},{key:"onOutletReAttached",value:function(t){this.contexts=t}},{key:"getOrCreateContext",value:function(t){var e=this.getContext(t);return e||(e=new Ov,this.contexts.set(t,e)),e}},{key:"getContext",value:function(t){return this.contexts.get(t)||null}}]),t}(),Tv=function(){function t(){g(this,t)}return v(t,[{key:"shouldProcessUrl",value:function(t){return!0}},{key:"extract",value:function(t){return t}},{key:"merge",value:function(t,e){return t}}]),t}();function Rv(t){throw t}function Pv(t,e,n){return e.parse("/")}function Mv(t,e){return Od(null)}var Fv=function(){var t=function(){function t(e,n,i,r,a,o,s,l){var u=this;g(this,t),this.rootComponentType=e,this.urlSerializer=n,this.rootContexts=i,this.location=r,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new q,this.errorHandler=Rv,this.malformedUriErrorHandler=Pv,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Mv,afterPreactivation:Mv},this.urlHandlingStrategy=new Tv,this.routeReuseStrategy=new Ev,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=a.get(ru),this.console=a.get(cc);var c=a.get(Cc);this.isNgZoneEnabled=c instanceof Cc&&Cc.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=new Np(new Vp([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Dv(o,s,function(t){return u.triggerEvent(new mp(t))},function(t){return u.triggerEvent(new vp(t))}),this.routerState=um(this.currentUrlTree,this.rootComponentType),this.transitions=new pf({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return v(t,[{key:"setupNavigations",value:function(t){var e=this,n=this.events;return t.pipe(Td(function(t){return 0!==t.id}),G(function(t){return Object.assign(Object.assign({},t),{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})}),Df(function(t){var i,r,a,o,s=!1,l=!1;return Od(t).pipe(tp(function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?Object.assign(Object.assign({},e.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Df(function(t){var i,r,a,o,s=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||s)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Od(t).pipe(Df(function(t){var i=e.transitions.getValue();return n.next(new op(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==e.transitions.getValue()?xf:Promise.resolve(t)}),(i=e.ngModule.injector,r=e.configLoader,a=e.urlSerializer,o=e.config,Df(function(t){return function(t,e,n,i,r){return new uv(t,e,n,i,r).apply()}(i,r,a,t.extractedUrl,o).pipe(G(function(e){return Object.assign(Object.assign({},t),{urlAfterRedirects:e})}))})),tp(function(t){e.currentNavigation=Object.assign(Object.assign({},e.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,n,i,r,a){return st(function(i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";try{var o=new bv(t,e,n,i,r,a).recognize();return null===o?_v(new yv):Od(o)}catch(s){return _v(s)}}(t,n,i.urlAfterRedirects,(o=i.urlAfterRedirects,e.serializeUrl(o)),r,a).pipe(G(function(t){return Object.assign(Object.assign({},i),{targetSnapshot:t})}));var o})}(e.rootComponentType,e.config,0,e.paramsInheritanceStrategy,e.relativeLinkResolution),tp(function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var i=new cp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.next(i)}));if(s&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var l=t.extractedUrl,u=t.source,c=t.restoredState,h=t.extras,d=new op(t.id,e.serializeUrl(l),u,c);n.next(d);var f=um(l,e.rootComponentType).snapshot;return Od(Object.assign(Object.assign({},t),{targetSnapshot:f,urlAfterRedirects:l,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),xf}),xv(function(t){var n=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})}),tp(function(t){var n=new hp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}),G(function(t){return Object.assign(Object.assign({},t),{guards:(n=t.targetSnapshot,i=t.currentSnapshot,r=e.rootContexts,a=n._root,pv(a,i?i._root:null,r,[a.value]))});var n,i,r,a}),function(t,e){return st(function(n){var i=n.targetSnapshot,r=n.currentSnapshot,a=n.guards,o=a.canActivateChecks,s=a.canDeactivateChecks;return 0===s.length&&0===o.length?Od(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return it(t).pipe(st(function(t){return function(t,e,n,i,r){var a=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return a&&0!==a.length?Od(a.map(function(a){var o,s=fv(a,e,r);if(function(t){return t&&Nm(t.canDeactivate)}(s))o=Rp(s.canDeactivate(t,e,n,i));else{if(!Nm(s))throw new Error("Invalid CanDeactivate guard");o=Rp(s(t,e,n,i))}return o.pipe(Qf())})).pipe(Bm()):Od(!0)}(t.component,t.route,n,e,i)}),Qf(function(t){return!0!==t},!0))}(s,i,r,t).pipe(st(function(n){return n&&"boolean"==typeof n?function(t,e,n,i){return it(e).pipe(Id(function(e){return Sf(function(t,e){return null!==t&&e&&e(new gp(t)),Od(!0)}(e.route.parent,i),function(t,e){return null!==t&&e&&e(new _p(t)),Od(!0)}(e.route,i),function(t,e,n){var i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(function(t){return function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t}).map(function(e){return Af(function(){return Od(e.guards.map(function(r){var a,o=fv(r,e.node,n);if(function(t){return t&&Nm(t.canActivateChild)}(o))a=Rp(o.canActivateChild(i,t));else{if(!Nm(o))throw new Error("Invalid CanActivateChild guard");a=Rp(o(i,t))}return a.pipe(Qf())})).pipe(Bm())})});return Od(r).pipe(Bm())}(t,e.path,n),function(t,e,n){var i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Od(i.map(function(i){return Af(function(){var r,a=fv(i,e,n);if(function(t){return t&&Nm(t.canActivate)}(a))r=Rp(a.canActivate(e,t));else{if(!Nm(a))throw new Error("Invalid CanActivate guard");r=Rp(a(e,t))}return r.pipe(Qf())})})).pipe(Bm()):Od(!0)}(t,e.route,n))}),Qf(function(t){return!0!==t},!0))}(i,o,t,e):Od(n)}),G(function(t){return Object.assign(Object.assign({},n),{guardsResult:t})}))})}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),tp(function(t){if(Vm(t.guardsResult)){var n=xp('Redirecting to "'.concat(e.serializeUrl(t.guardsResult),'"'));throw n.url=t.guardsResult,n}var i=new dp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(i)}),Td(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var i=new lp(t.id,e.serializeUrl(t.extractedUrl),"");return n.next(i),t.resolve(!1),!1}return!0}),xv(function(t){if(t.guards.canActivateChecks.length)return Od(t).pipe(tp(function(t){var n=new fp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}),Df(function(t){var i,r,a=!1;return Od(t).pipe((i=e.paramsInheritanceStrategy,r=e.ngModule.injector,st(function(t){var e=t.targetSnapshot,n=t.guards.canActivateChecks;if(!n.length)return Od(t);var a=0;return it(n).pipe(Id(function(t){return function(t,e,n,i){return function(t,e,n,i){var r=Object.keys(t);if(0===r.length)return Od({});var a={};return it(r).pipe(st(function(r){return function(t,e,n,i){var r=fv(t,e,i);return Rp(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(tp(function(t){a[r]=t}))}),Hf(1),st(function(){return Object.keys(a).length===r.length?Od(a):xf}))}(t._resolve,t,e,i).pipe(G(function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),hm(t,n).resolve),null}))}(t.route,e,i,r)}),tp(function(){return a++}),Hf(1),st(function(e){return a===n.length?Od(t):xf}))})),tp({next:function(){return a=!0},complete:function(){if(!a){var i=new lp(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");n.next(i),t.resolve(!1)}}}))}),tp(function(t){var n=new pp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}))}),xv(function(t){var n=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})}),G(function(t){var n,i,r,a=(r=_m(e.routeReuseStrategy,(n=t.targetSnapshot)._root,(i=t.currentRouterState)?i._root:void 0),new lm(r,n));return Object.assign(Object.assign({},t),{targetRouterState:a})}),tp(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)}),(r=e.rootContexts,a=e.routeReuseStrategy,o=function(t){return e.triggerEvent(t)},G(function(t){return new Mm(a,t.targetRouterState,t.currentRouterState,o).activate(r),t})),tp({next:function(){s=!0},complete:function(){s=!0}}),(i=function(){if(!s&&!l){e.resetUrlToCurrentUrlTree();var i=new lp(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID ".concat(t.id," is not equal to the current navigation id ").concat(e.navigationId));n.next(i),t.resolve(!1)}e.currentNavigation=null},function(t){return t.lift(new ip(i))}),jf(function(i){if(l=!0,(s=i)&&s.ngNavigationCancelingError){var r=Vm(i.url);r||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var a=new lp(t.id,e.serializeUrl(t.extractedUrl),i.message);n.next(a),r?setTimeout(function(){var n=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(n,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var o=new up(t.id,e.serializeUrl(t.extractedUrl),i);n.next(o);try{t.resolve(e.errorHandler(i))}catch(u){t.reject(u)}}var s;return xf}))}))}},{key:"resetRootComponentType",value:function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}},{key:"setTransition",value:function(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var n=t.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,n)&&setTimeout(function(){var e=n.source,i=n.state,r=n.urlTree,a={replaceUrl:!0};if(i){var o=Object.assign({},i);delete o.navigationId,0!==Object.keys(o).length&&(a.state=o)}t.scheduleNavigation(r,e,i,a)},0),t.lastLocationChangeInfo=n}))}},{key:"extractLocationChangeInfoFromEvent",value:function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(t,e){if(!t)return!0;var n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(t){this.events.next(t)}},{key:"resetConfig",value:function(t){Hm(t),this.config=t.map(Wm),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}},{key:"createUrlTree",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.relativeTo,i=e.queryParams,r=e.fragment,a=e.queryParamsHandling,o=e.preserveFragment,s=n||this.routerState.root,l=o?this.currentUrlTree.fragment:r,u=null;switch(a){case"merge":u=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=i||null}return null!==u&&(u=this.removeEmptyProps(u)),km(s,this.currentUrlTree,t,u,l)}},{key:"navigateByUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1},n=Vm(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}},{key:"navigate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return Lv(t),this.navigateByUrl(this.createUrlTree(t,e),e)}},{key:"serializeUrl",value:function(t){return this.urlSerializer.serialize(t)}},{key:"parseUrl",value:function(t){var e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}},{key:"isActive",value:function(t,e){if(Vm(t))return Pp(this.currentUrlTree,t,e);var n=this.parseUrl(t);return Pp(this.currentUrlTree,n,e)}},{key:"removeEmptyProps",value:function(t){return Object.keys(t).reduce(function(e,n){var i=t[n];return null!=i&&(e[n]=i),e},{})}},{key:"processNavigations",value:function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new sp(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})}},{key:"scheduleNavigation",value:function(t,e,n,i,r){var a,o,s,l=this.getTransition(),u="imperative"!==e&&"imperative"===(null==l?void 0:l.source),c=(this.lastSuccessfulId===l.id||this.currentNavigation?l.rawUrl:l.urlAfterRedirects).toString()===t.toString();if(u&&c)return Promise.resolve(!0);r?(a=r.resolve,o=r.reject,s=r.promise):s=new Promise(function(t,e){a=t,o=e});var h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:a,reject:o,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch(function(t){return Promise.reject(t)})}},{key:"setBrowserUrl",value:function(t,e,n,i){var r=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(wi),Ui(zp),Ui(Iv),Ui(bh),Ui(Ho),Ui(Kc),Ui(bc),Ui(void 0))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}();function Lv(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};g(this,t),this.router=e,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return v(t,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var t=this;return this.router.events.subscribe(function(e){e instanceof op?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof sp&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))})}},{key:"consumeScrollEvents",value:function(){var t=this;return this.router.events.subscribe(function(e){e instanceof kp&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))})}},{key:"scheduleScrollEvent",value:function(t,e){this.router.triggerEvent(new kp(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Fv),Ui(Gh),Ui(void 0))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Gv=new bi("ROUTER_CONFIGURATION"),Kv=new bi("ROUTER_FORROOT_GUARD"),Zv=[bh,{provide:zp,useClass:Hp},{provide:Fv,useFactory:function(t,e,n,i,r,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0,c=new Fv(null,t,e,n,i,r,a,Op(o));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),ng(s,c),s.enableTracing){var h=ih();c.events.subscribe(function(t){h.logGroup("Router Event: ".concat(t.constructor.name)),h.log(t.toString()),h.log(t),h.logGroupEnd()})}return c},deps:[zp,Iv,bh,Ho,Kc,bc,Av,Gv,[function t(){g(this,t)},new Ri],[function t(){g(this,t)},new Ri]]},Iv,{provide:cm,useFactory:function(t){return t.routerState.root},deps:[Fv]},{provide:Kc,useClass:Xc},Wv,qv,Uv,{provide:Gv,useValue:{enableTracing:!1}}];function $v(){return new jc("Router",Fv)}var Xv=function(){var t=function(){function t(e,n){g(this,t)}return v(t,null,[{key:"forRoot",value:function(e,n){return{ngModule:t,providers:[Zv,eg(e),{provide:Kv,useFactory:tg,deps:[[Fv,new Ri,new Mi]]},{provide:Gv,useValue:n||{}},{provide:mh,useFactory:Jv,deps:[oh,[new Ti(gh),new Ri],Gv]},{provide:Yv,useFactory:Qv,deps:[Fv,Gh,Gv]},{provide:Hv,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:qv},{provide:jc,multi:!0,useFactory:$v},[ig,{provide:nc,multi:!0,useFactory:rg,deps:[ig]},{provide:og,useFactory:ag,deps:[ig]},{provide:uc,multi:!0,useExisting:og}]]}}},{key:"forChild",value:function(e){return{ngModule:t,providers:[eg(e)]}}}]),t}();return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(Ui(Kv,8),Ui(Fv,8))}}),t}();function Qv(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Yv(t,e,n)}function Jv(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new _h(t,e):new yh(t,e)}function tg(t){return"guarded"}function eg(t){return[{provide:ki,multi:!0,useValue:t},{provide:Av,multi:!0,useValue:t}]}function ng(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}var ig=function(){var t=function(){function t(e){g(this,t),this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new q}return v(t,[{key:"appInitializer",value:function(){var t=this;return this.injector.get(lh,Promise.resolve(null)).then(function(){var e=null,n=new Promise(function(t){return e=t}),i=t.injector.get(Fv),r=t.injector.get(Gv);return"disabled"===r.initialNavigation?(i.setUpLocationChangeListener(),e(!0)):"enabled"===r.initialNavigation||"enabledBlocking"===r.initialNavigation?(i.hooks.afterPreactivation=function(){return t.initNavigation?Od(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},i.initialNavigation()):e(!0),n})}},{key:"bootstrapListener",value:function(t){var e=this.injector.get(Gv),n=this.injector.get(Wv),i=this.injector.get(Yv),r=this.injector.get(Fv),a=this.injector.get(Yc);t===a.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||r.initialNavigation(),n.setUpPreloading(),i.init(),r.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Ho))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}();function rg(t){return t.appInitializer.bind(t)}function ag(t){return t.bootstrapListener.bind(t)}var og=new bi("Router Initializer"),sg=function(){function t(t){this.user=t.user,this.role=t.role,this.admin=t.admin}return Object.defineProperty(t.prototype,"isStaff",{get:function(){return"staff"===this.role||"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdmin",{get:function(){return"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogged",{get:function(){return null!=this.user},enumerable:!1,configurable:!0}),t}();function lg(t){return null!=t&&"false"!=="".concat(t)}function ug(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return cg(t)?Number(t):e}function cg(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function hg(t){return Array.isArray(t)?t:[t]}function dg(t){return null==t?"":"string"==typeof t?t:"".concat(t,"px")}function fg(t){return t instanceof xl?t.nativeElement:t}function pg(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\s+/,n=[];if(null!=t){var i,r=Array.isArray(t)?t:"".concat(t).split(e),a=c(r);try{for(a.s();!(i=a.n()).done;){var o=i.value,s="".concat(o).trim();s&&n.push(s)}}catch(l){a.e(l)}finally{a.f()}}return n}function mg(t,e,n,i){return x(n)&&(i=n,n=void 0),i?mg(t,e,n).pipe(G(function(t){return C(t)?i.apply(void 0,h(t)):i(t)})):new j(function(i){vg(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}function vg(t,e,n,i,r){var a;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var o=t;t.addEventListener(e,n,r),a=function(){return o.removeEventListener(e,n,r)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),a=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var l=t;t.addListener(e,n),a=function(){return l.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var u=0,c=t.length;u1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value:function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){y(n,t);var e=k(n);function n(t,i){return g(this,n),e.call(this)}return v(n,[{key:"schedule",value:function(t){return this}}]),n}(A)),yg=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;g(this,t),this.SchedulerAction=e,this.now=n}return v(t,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,t).schedule(n,e)}}]),t}();return t.now=function(){return Date.now()},t}(),_g=function(t){y(n,t);var e=k(n);function n(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yg.now;return g(this,n),(i=e.call(this,t,function(){return n.delegate&&n.delegate!==a(i)?n.delegate.now():r()})).actions=[],i.active=!1,i.scheduled=void 0,i}return v(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(t,e,a):r(i(n.prototype),"schedule",this).call(this,t,e,a)}},{key:"flush",value:function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}}]),n}(yg),bg=1,kg=function(){return Promise.resolve()}(),wg={};function Cg(t){return t in wg&&(delete wg[t],!0)}var Sg=function(t){var e=bg++;return wg[e]=!0,kg.then(function(){return Cg(e)&&t()}),e},xg=function(t){Cg(t)},Eg=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return v(n,[{key:"requestAsyncId",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==a&&a>0?r(i(n.prototype),"requestAsyncId",this).call(this,t,e,a):(t.actions.push(this),t.scheduled||(t.scheduled=Sg(t.flush.bind(t,null))))}},{key:"recycleAsyncId",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==a&&a>0||null===a&&this.delay>0)return r(i(n.prototype),"recycleAsyncId",this).call(this,t,e,a);0===t.actions.length&&(xg(e),t.scheduled=void 0)}}]),n}(gg),Ag=new(function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i=0}function Lg(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Fg(e)?i=Number(e)<1?1:Number(e):Y(e)&&(n=e),Y(n)||(n=Tg),new j(function(e){var r=Fg(t)?t:+t-n.now();return n.schedule(Ng,r,{index:0,period:i,subscriber:e})})}function Ng(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function Vg(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tg;return Rg(function(){return Lg(t,e)})}function jg(t){return function(e){return e.lift(new Bg(t))}}var Bg=function(){function t(e){g(this,t),this.notifier=e}return v(t,[{key:"call",value:function(t,e){var n=new zg(t),i=ot(this.notifier,new rt(n));return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}]),t}(),zg=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this,t)).seenValue=!1,i}return v(n,[{key:"notifyNext",value:function(){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(at);function Hg(t,e){return new j(e?function(n){return e.schedule(Ug,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function Ug(t){t.subscriber.error(t.error)}var qg,Wg=function(){var t=function(){function t(e,n,i){g(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return v(t,[{key:"observe",value:function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}},{key:"do",value:function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}},{key:"accept",value:function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Od(this.value);case"E":return Hg(this.error);case"C":return Ef()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}},{key:"createError",value:function(e){return new t("E",void 0,e)}},{key:"createComplete",value:function(){return t.completeNotification}}]),t}();return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();try{qg="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(RB){qg=!1}var Yg,Gg,Kg,Zg,$g=function(){var t=function t(e){g(this,t),this._platformId=e,this.isBrowser=this._platformId?"browser"===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&&!qg)&&"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 t.\u0275fac=function(e){return new(e||t)(Ui(lc))},t.\u0275prov=Dt({factory:function(){return new t(Ui(lc))},token:t,providedIn:"root"}),t}(),Xg=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),Qg=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Jg(){if(Yg)return Yg;if("object"!=typeof document||!document)return Yg=new Set(Qg);var t=document.createElement("input");return Yg=new Set(Qg.filter(function(e){return t.setAttribute("type",e),t.type===e}))}function ty(t){return function(){if(null==Gg&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Gg=!0}}))}finally{Gg=Gg||!1}return Gg}()?t:!!t.capture}function ey(){if(null==Kg){if("object"!=typeof document||!document)return Kg=!1;if("scrollBehavior"in document.documentElement.style)Kg=!0;else{var t=Element.prototype.scrollTo;Kg=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Kg}function ny(t){if(function(){if(null==Zg){var t="undefined"!=typeof document?document.head:null;Zg=!(!t||!t.createShadowRoot&&!t.attachShadow)}return Zg}()){var e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}var iy=new bi("cdk-dir-doc",{providedIn:"root",factory:function(){return Wi(ah)}}),ry=function(){var t=function(){function t(e){if(g(this,t),this.value="ltr",this.change=new Ru,e){var n=(e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null);this.value="ltr"===n||"rtl"===n?n:"ltr"}}return v(t,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(iy,8))},t.\u0275prov=Dt({factory:function(){return new t(Ui(iy,8))},token:t,providedIn:"root"}),t}(),ay=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),oy=function t(){g(this,t)};function sy(t){return t&&"function"==typeof t.connect}var ly=function(){function t(){g(this,t)}return v(t,[{key:"applyChanges",value:function(t,e,n,i,r){t.forEachOperation(function(t,i,a){var o,s;if(null==t.previousIndex){var l=n(t,i,a);o=e.createEmbeddedView(l.templateRef,l.context,l.index),s=1}else null==a?(e.remove(i),s=3):(o=e.get(i),e.move(o,a),s=2);r&&r({context:null==o?void 0:o.context,operation:s,record:t})})}},{key:"detach",value:function(){}}]),t}(),uy=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g(this,t),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new q,i&&i.length&&(n?i.forEach(function(t){return e._markSelected(t)}):this._markSelected(i[0]),this._selectedToEmit.length=0)}return v(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new j(function(n){t._globalSubscription||t._addGlobalListener();var i=e>0?t._scrolled.pipe(Vg(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){i.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}}):Od()}},{key:"ngOnDestroy",value:function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Td(function(t){return!t||n.indexOf(t)>-1}))}},{key:"getAncestorScrollContainers",value:function(t){var e=this,n=[];return this.scrollContainers.forEach(function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)}),n}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_scrollableContainsElement",value:function(t,e){var n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return mg(t._getWindow().document,"scroll").subscribe(function(){return t._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Cc),Ui($g),Ui(ah,8))},t.\u0275prov=Dt({factory:function(){return new t(Ui(Cc),Ui($g),Ui(ah,8))},token:t,providedIn:"root"}),t}(),dy=function(){var t=function(){function t(e,n,i){var r=this;g(this,t),this._platform=e,this._change=new q,this._changeListener=function(t){r._change.next(t)},this._document=i,n.runOutsideAngular(function(){if(e.isBrowser){var t=r._getWindow();t.addEventListener("resize",r._changeListener),t.addEventListener("orientationchange",r._changeListener)}r.change().subscribe(function(){return r._updateViewportSize()})})}return v(t,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}},{key:"getViewportRect",value:function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=this._document,e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return t>0?this._change.pipe(Vg(t)):this._change}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_updateViewportSize",value:function(){var t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui($g),Ui(Cc),Ui(ah,8))},t.\u0275prov=Dt({factory:function(){return new t(Ui($g),Ui(Cc),Ui(ah,8))},token:t,providedIn:"root"}),t}(),fy=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),py=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[ay,Xg,fy],ay,fy]}),t}(),my=function(){function t(){g(this,t)}return v(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),vy=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this)).component=t,o.viewContainerRef=i,o.injector=r,o.componentFactoryResolver=a,o}return n}(my),gy=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this)).templateRef=t,a.viewContainerRef=i,a.context=r,a}return v(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,r(i(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,r(i(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(my),yy=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this)).element=t instanceof xl?t.nativeElement:t,i}return n}(my),_y=function(){function t(){g(this,t),this._isDisposed=!1,this.attachDomPortal=null}return v(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof vy?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof gy?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof yy?(this._attachedPortal=t,this.attachDomPortal(t)):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(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),by=function(t){y(n,t);var e=k(n);function n(t,o,s,l,u){var c,h;return g(this,n),(h=e.call(this)).outletElement=t,h._componentFactoryResolver=o,h._appRef=s,h._defaultInjector=l,h.attachDomPortal=function(t){var e=t.element,o=h._document.createComment("dom-portal");e.parentNode.insertBefore(o,e),h.outletElement.appendChild(e),r((c=a(h),i(n.prototype)),"setDisposeFn",c).call(c,function(){o.parentNode&&o.parentNode.replaceChild(e,o)})},h._document=u,h}return v(n,[{key:"attachComponentPortal",value:function(t){var e,n=this,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(function(){return e.destroy()})):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e}},{key:"attachTemplatePortal",value:function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),i.detectChanges(),this.setDisposeFn(function(){var t=n.indexOf(i);-1!==t&&n.remove(t)}),i}},{key:"dispose",value:function(){r(i(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(_y),ky=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){return g(this,n),e.call(this,t,i)}return n}(gy);return t.\u0275fac=function(e){return new(e||t)(ss(eu),ss(su))},t.\u0275dir=de({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[qo]}),t}(),wy=function(){var t=function(t){y(n,t);var e=k(n);function n(t,o,s){var l,u;return g(this,n),(u=e.call(this))._componentFactoryResolver=t,u._viewContainerRef=o,u._isInitialized=!1,u.attached=new Ru,u.attachDomPortal=function(t){var e=t.element,o=u._document.createComment("dom-portal");t.setAttachedHost(a(u)),e.parentNode.insertBefore(o,e),u._getRootNode().appendChild(e),r((l=a(u),i(n.prototype)),"setDisposeFn",l).call(l,function(){o.parentNode&&o.parentNode.replaceChild(e,o)})},u._document=s,u}return v(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,a=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=e.createComponent(a,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),r(i(n.prototype),"setDisposeFn",this).call(this,function(){return o.destroy()}),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var a=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return r(i(n.prototype),"setDisposeFn",this).call(this,function(){return e._viewContainerRef.clear()}),this._attachedPortal=t,this._attachedRef=a,this.attached.emit(a),a}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&r(i(n.prototype),"detach",this).call(this),t&&r(i(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(_y);return t.\u0275fac=function(e){return new(e||t)(ss(kl),ss(su),ss(ah))},t.\u0275dir=de({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[qo]}),t}(),Cy=function(){var t=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return n}(wy);return t.\u0275fac=function(e){return Sy(e||t)},t.\u0275dir=de({type:t,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[gl([{provide:wy,useExisting:t}]),qo]}),t}(),Sy=vi(Cy),xy=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),Ey=function(){function t(e,n){g(this,t),this.predicate=e,this.inclusive=n}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new Ay(t,this.predicate,this.inclusive))}}]),t}(),Ay=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t)).predicate=i,a.inclusive=r,a.index=0,a}return v(n,[{key:"_next",value:function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(t,e)}},{key:"nextOrComplete",value:function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}]),n}(M),Dy=13,Oy=27,Iy=32,Ty=35,Ry=36,Py=37,My=38,Fy=39,Ly=40;function Ny(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;ie.height||t.scrollWidth>e.width}}]),t}(),By=function(){function t(e,n,i,r){var a=this;g(this,t),this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=function(){a.disable(),a._overlayRef.hasAttached()&&a._ngZone.run(function(){return a._overlayRef.detach()})}}return v(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),zy=function(){function t(){g(this,t)}return v(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function Hy(t,e){return e.some(function(e){return t.bottome.bottom||t.righte.right})}function Uy(t,e){return e.some(function(e){return t.tope.bottom||t.lefte.right})}var qy=function(){function t(e,n,i,r){g(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return v(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;Hy(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),Wy=function(){var t=function t(e,n,i,r){var a=this;g(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new zy},this.close=function(t){return new By(a._scrollDispatcher,a._ngZone,a._viewportRuler,t)},this.block=function(){return new jy(a._viewportRuler,a._document)},this.reposition=function(t){return new qy(a._scrollDispatcher,a._viewportRuler,a._ngZone,t)},this._document=r};return t.\u0275fac=function(e){return new(e||t)(Ui(hy),Ui(dy),Ui(Cc),Ui(ah))},t.\u0275prov=Dt({factory:function(){return new t(Ui(hy),Ui(dy),Ui(Cc),Ui(ah))},token:t,providedIn:"root"}),t}(),Yy=function t(e){if(g(this,t),this.scrollStrategy=new zy,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var n=0,i=Object.keys(e);n-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(ah))},t.\u0275prov=Dt({factory:function(){return new t(Ui(ah))},token:t,providedIn:"root"}),t}(),$y=function(){var t=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this,t))._keydownListener=function(t){for(var e=i._attachedOverlays,n=e.length-1;n>-1;n--)if(e[n]._keydownEvents.observers.length>0){e[n]._keydownEvents.next(t);break}},i}return v(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),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)}}]),n}(Zy);return t.\u0275fac=function(e){return new(e||t)(Ui(ah))},t.\u0275prov=Dt({factory:function(){return new t(Ui(ah))},token:t,providedIn:"root"}),t}(),Xy=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t))._platform=i,r._cursorStyleIsSet=!1,r._clickListener=function(t){for(var e=t.composedPath?t.composedPath()[0]:t.target,n=r._attachedOverlays.slice(),i=n.length-1;i>-1;i--){var a=n[i];if(!(a._outsidePointerEvents.observers.length<1)&&a.hasAttached()){if(a.overlayElement.contains(e))break;a._outsidePointerEvents.next(t)}}},r}return v(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),n}(Zy);return t.\u0275fac=function(e){return new(e||t)(Ui(ah),Ui($g))},t.\u0275prov=Dt({factory:function(){return new t(Ui(ah),Ui($g))},token:t,providedIn:"root"}),t}(),Qy=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),Jy=function(){var t=function(){function t(e,n){g(this,t),this._platform=n,this._document=e}return v(t,[{key:"ngOnDestroy",value:function(){var t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var t="cdk-overlay-container";if(this._platform.isBrowser||Qy)for(var e=this._document.querySelectorAll(".".concat(t,'[platform="server"], ')+".".concat(t,'[platform="test"]')),n=0;np&&(p=g,f=v)}}catch(y){m.e(y)}finally{m.f()}return this._isPushed=!1,void this._applyPosition(f.position,f.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&r_(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(e_),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 t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}},{key:"withScrollableContainers",value:function(t){return this._scrollables=t,this}},{key:"withPositions",value:function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(t){return this._viewportMargin=t,this}},{key:"withFlexibleDimensions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=t,this}},{key:"withGrowAfterOpen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=t,this}},{key:"withPush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=t,this}},{key:"withLockedPosition",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=t,this}},{key:"setOrigin",value:function(t){return this._origin=t,this}},{key:"withDefaultOffsetX",value:function(t){return this._offsetX=t,this}},{key:"withDefaultOffsetY",value:function(t){return this._offsetY=t,this}},{key:"withTransformOriginOn",value:function(t){return this._transformOriginSelector=t,this}},{key:"_getOriginPoint",value:function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}},{key:"_getOverlayPoint",value:function(t,e,n){var i;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}}},{key:"_getOverlayFit",value:function(t,e,n,i){var r=t.x,a=t.y,o=this._getOffset(i,"x"),s=this._getOffset(i,"y");o&&(r+=o),s&&(a+=s);var l=0-a,u=a+e.height-n.height,c=this._subtractOverflows(e.width,0-r,r+e.width-n.width),h=this._subtractOverflows(e.height,l,u),d=c*h;return{visibleArea:d,isCompletelyWithinViewport:e.width*e.height===d,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:c==e.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,a=a_(this._overlayRef.getConfig().minHeight),o=a_(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=a&&a<=i)&&(t.fitsInViewportHorizontally||null!=o&&o<=r)}return!1}},{key:"_pushOverlayOnScreen",value:function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var i,r,a=this._viewportRect,o=Math.max(t.x+e.width-a.width,0),s=Math.max(t.y+e.height-a.height,0),l=Math.max(a.top-n.top-t.y,0),u=Math.max(a.left-n.left-t.x,0);return this._previousPushAmount={x:i=e.width<=a.width?u||-o:t.xh&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!u||"start"===e.overlayX&&u)s=l.width-t.x+this._viewportMargin,a=t.x-this._viewportMargin;else if("start"===e.overlayX&&!u||"end"===e.overlayX&&u)o=t.x,a=l.right-t.x;else{var d=Math.min(l.right-t.x+l.left,t.x),f=this._lastBoundingBoxSize.width;o=t.x-d,(a=2*d)>f&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.x-f/2)}return{top:i,left:o,bottom:r,right:s,width:a,height:n}}},{key:"_setBoundingBoxStyles",value:function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;i.height=dg(n.height),i.top=dg(n.top),i.bottom=dg(n.bottom),i.width=dg(n.width),i.left=dg(n.left),i.right=dg(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=dg(r)),a&&(i.maxWidth=dg(a))}this._lastBoundingBoxSize=n,r_(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){r_(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){r_(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(t,e){var n={},i=this._hasExactPosition(),r=this._hasFlexibleDimensions,a=this._overlayRef.getConfig();if(i){var o=this._viewportRuler.getViewportScrollPosition();r_(n,this._getExactOverlayY(e,t,o)),r_(n,this._getExactOverlayX(e,t,o))}else n.position="static";var s="",l=this._getOffset(e,"x"),u=this._getOffset(e,"y");l&&(s+="translateX(".concat(l,"px) ")),u&&(s+="translateY(".concat(u,"px)")),n.transform=s.trim(),a.maxHeight&&(i?n.maxHeight=dg(a.maxHeight):r&&(n.maxHeight="")),a.maxWidth&&(i?n.maxWidth=dg(a.maxWidth):r&&(n.maxWidth="")),r_(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(t,e,n){var i={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var a=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=a,"bottom"===t.overlayY?i.bottom="".concat(this._document.documentElement.clientHeight-(r.y+this._overlayRect.height),"px"):i.top=dg(r.y),i}},{key:"_getExactOverlayX",value:function(t,e,n){var i={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right="".concat(this._document.documentElement.clientWidth-(r.x+this._overlayRect.width),"px"):i.left=dg(r.x),i}},{key:"_getScrollVisibility",value:function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:Uy(t,n),isOriginOutsideView:Hy(t,n),isOverlayClipped:Uy(e,n),isOverlayOutsideView:Hy(e,n)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}},{key:"left",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}},{key:"right",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}},{key:"width",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}},{key:"height",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}},{key:"centerHorizontally",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(t),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(t),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),i=n.width,r=n.height,a=n.maxWidth,o=n.maxHeight,s=!("100%"!==i&&"100vw"!==i||a&&"100%"!==a&&"100vw"!==a),l=!("100%"!==r&&"100vh"!==r||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=s?"0":this._leftOffset,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,s?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=l?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(s_),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}]),t}(),u_=function(){var t=function(){function t(e,n,i,r){g(this,t),this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r}return v(t,[{key:"global",value:function(){return new l_}},{key:"connectedTo",value:function(t,e,n){return new o_(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new i_(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(dy),Ui(ah),Ui($g),Ui(Jy))},t.\u0275prov=Dt({factory:function(){return new t(Ui(dy),Ui(ah),Ui($g),Ui(Jy))},token:t,providedIn:"root"}),t}(),c_=0,h_=function(){var t=function(){function t(e,n,i,r,a,o,s,l,u,c,h){g(this,t),this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=i,this._positionBuilder=r,this._keyboardDispatcher=a,this._injector=o,this._ngZone=s,this._document=l,this._directionality=u,this._location=c,this._outsideClickDispatcher=h}return v(t,[{key:"create",value:function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new Yy(t);return r.direction=r.direction||this._directionality.value,new t_(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-".concat(c_++),e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}},{key:"_createHostElement",value:function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}},{key:"_createPortalOutlet",value:function(t){return this._appRef||(this._appRef=this._injector.get(Yc)),new by(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Wy),Ui(Jy),Ui(kl),Ui(u_),Ui($y),Ui(Ho),Ui(Cc),Ui(ah),Ui(ry),Ui(bh),Ui(Xy))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),d_=[{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"}],f_=new bi("cdk-connected-overlay-scroll-strategy"),p_=function(){var t=function t(e){g(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(ss(xl))},t.\u0275dir=de({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t}(),m_=function(){var t=function(){function t(e,n,i,r,a){g(this,t),this._overlay=e,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=A.EMPTY,this._attachSubscription=A.EMPTY,this._detachSubscription=A.EMPTY,this._positionSubscription=A.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new Ru,this.positionChange=new Ru,this.attach=new Ru,this.detach=new Ru,this.overlayKeydown=new Ru,this.overlayOutsideClick=new Ru,this._templatePortal=new gy(n,i),this._scrollStrategyFactory=r,this.scrollStrategy=this._scrollStrategyFactory()}return v(t,[{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(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var t=this;this.positions&&this.positions.length||(this.positions=d_);var e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(function(){return t.attach.emit()}),this._detachSubscription=e.detachments().subscribe(function(){return t.detach.emit()}),e.keydownEvents().subscribe(function(e){t.overlayKeydown.next(e),e.keyCode!==Oy||t.disableClose||Ny(e)||(e.preventDefault(),t._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(function(e){t.overlayOutsideClick.next(e)})}},{key:"_buildConfig",value:function(){var t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new Yy({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}},{key:"_updatePositionStrategy",value:function(t){var e=this,n=this.positions.map(function(t){return{originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||e.offsetX,offsetY:t.offsetY||e.offsetY,panelClass:t.panelClass||void 0}});return t.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}},{key:"_createPositionStrategy",value:function(){var t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}},{key:"_attachOverlay",value:function(){var t=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(e){t.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new Ey(t,e))}}(function(){return t.positionChange.observers.length>0})).subscribe(function(e){t.positionChange.emit(e),0===t.positionChange.observers.length&&t._positionSubscription.unsubscribe()}))}},{key:"_detachOverlay",value:function(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}},{key:"offsetX",get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=lg(t)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(t){this._lockPosition=lg(t)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=lg(t)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=lg(t)}},{key:"push",get:function(){return this._push},set:function(t){this._push=lg(t)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(h_),ss(eu),ss(su),ss(f_),ss(ry,8))},t.\u0275dir=de({type:t,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:[Ie]}),t}(),v_={provide:f_,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},g_=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[h_,v_],imports:[[ay,xy,py],py]}),t}();function y_(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tg;return function(n){return n.lift(new __(t,e))}}var __=function(){function t(e,n){g(this,t),this.dueTime=e,this.scheduler=n}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new b_(t,this.dueTime,this.scheduler))}}]),t}(),b_=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t)).dueTime=i,a.scheduler=r,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return v(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(k_,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}},{key:"clearDebounce",value:function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}]),n}(M);function k_(t){t.debouncedNext()}var w_=function(){var t=function(){function t(){g(this,t)}return v(t,[{key:"create",value:function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),C_=function(){var t=function(){function t(e){g(this,t),this._mutationObserverFactory=e,this._observedElements=new Map}return v(t,[{key:"ngOnDestroy",value:function(){var t=this;this._observedElements.forEach(function(e,n){return t._cleanupObserver(n)})}},{key:"observe",value:function(t){var e=this,n=fg(t);return new j(function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}})}},{key:"_observeElement",value:function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new q,n=this._mutationObserverFactory.create(function(t){return e.next(t)});n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}},{key:"_unobserveElement",value:function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}},{key:"_cleanupObserver",value:function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(w_))},t.\u0275prov=Dt({factory:function(){return new t(Ui(w_))},token:t,providedIn:"root"}),t}(),S_=function(){var t=function(){function t(e,n,i){g(this,t),this._contentObserver=e,this._elementRef=n,this._ngZone=i,this.event=new Ru,this._disabled=!1,this._currentSubscription=null}return v(t,[{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){t._currentSubscription=(t.debounce?e.pipe(y_(t.debounce)):e).subscribe(t.event)})}},{key:"_unsubscribe",value:function(){var t;null===(t=this._currentSubscription)||void 0===t||t.unsubscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=lg(t),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(t){this._debounce=ug(t),this._subscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(C_),ss(xl),ss(Cc))},t.\u0275dir=de({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t}(),x_=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[w_]}),t}();function E_(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var A_="cdk-describedby-message-container",D_="cdk-describedby-message",O_="cdk-describedby-host",I_=0,T_=new Map,R_=null,P_=function(){var t=function(){function t(e,n){g(this,t),this._platform=n,this._document=e}return v(t,[{key:"describe",value:function(t,e){this._canBeDescribed(t,e)&&("string"!=typeof e?(this._setMessageId(e),T_.set(e,{messageElement:e,referenceCount:0})):T_.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}},{key:"removeDescription",value:function(t,e){if(e&&this._isElementNode(t)){if(this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e),"string"==typeof e){var n=T_.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e)}R_&&0===R_.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var t=this._document.querySelectorAll("[".concat(O_,"]")),e=0;e-1&&e!==n._activeItemIndex&&(n._activeItemIndex=e)}})}return v(t,[{key:"skipPredicate",value:function(t){return this._skipPredicateFn=t,this}},{key:"withWrap",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=t,this}},{key:"withVerticalOrientation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=t,this}},{key:"withHorizontalOrientation",value:function(t){return this._horizontal=t,this}},{key:"withAllowedModifierKeys",value:function(t){return this._allowedModifierKeys=t,this}},{key:"withTypeAhead",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(tp(function(e){return t._pressedLetters.push(e)}),y_(e),Td(function(){return t._pressedLetters.length>0}),G(function(){return t._pressedLetters.join("")})).subscribe(function(e){for(var n=t._getItemsArray(),i=1;i0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=t,this}},{key:"setActiveItem",value:function(t){var e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(t){var e=this,n=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(function(n){return!t[n]||e._allowedModifierKeys.indexOf(n)>-1});switch(n){case 9:return void this.tabOut.next();case Ly:if(this._vertical&&i){this.setNextItemActive();break}return;case My:if(this._vertical&&i){this.setPreviousItemActive();break}return;case Fy:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case Py:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case Ry:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case Ty:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||Ny(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],t.preventDefault()}},{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(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t),i=e[n];this._activeItem=null==i?null:i,this._activeItemIndex=n}},{key:"_setActiveItemByDelta",value:function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}},{key:"_setActiveInWrapMode",value:function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}},{key:"_setActiveInDefaultMode",value:function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}},{key:"_setActiveItemByIndex",value:function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}},{key:"_getItemsArray",value:function(){return this._items instanceof Mu?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),t}(),F_=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"setActiveItem",value:function(t){this.activeItem&&this.activeItem.setInactiveStyles(),r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(M_),L_=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._origin="program",t}return v(n,[{key:"setFocusOrigin",value:function(t){return this._origin=t,this}},{key:"setActiveItem",value:function(t){r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.focus(this._origin)}}]),n}(M_),N_=function(){var t=function(){function t(e){g(this,t),this._platform=e}return v(t,[{key:"isDisabled",value:function(t){return t.hasAttribute("disabled")}},{key:"isVisible",value:function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}},{key:"isTabbable",value:function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(RB){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){if(-1===j_(n))return!1;if(!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),r=j_(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==i&&"object"!==i&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&("audio"===i?!!t.hasAttribute("controls")&&-1!==r:"video"===i?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}},{key:"isFocusable",value:function(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||V_(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui($g))},t.\u0275prov=Dt({factory:function(){return new t(Ui($g))},token:t,providedIn:"root"}),t}();function V_(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function j_(t){if(!V_(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var B_=function(){function t(e,n,i,r){var a=this,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];g(this,t),this._element=e,this._checker=n,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return a.focusLastTabbableElement()},this.endAnchorListener=function(){return a.focusFirstTabbableElement()},this._enabled=!0,o||this.attachAnchors()}return v(t,[{key:"destroy",value:function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t.startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t.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(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})}},{key:"focusFirstTabbableElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})}},{key:"focusLastTabbableElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})}},{key:"_getRegionBoundary",value:function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-".concat(t,"], ")+"[cdkFocusRegion".concat(t,"], ")+"[cdk-focus-".concat(t,"]")),n=0;n=0;n--){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}return null}},{key:"_createAnchor",value:function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}},{key:"_toggleAnchorTabIndex",value:function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}},{key:"_executeOnStable",value:function(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Rf(1)).subscribe(t)}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}}]),t}(),z_=function(){var t=function(){function t(e,n,i){g(this,t),this._checker=e,this._ngZone=n,this._document=i}return v(t,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new B_(t,this._checker,this._ngZone,this._document,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(N_),Ui(Cc),Ui(ah))},t.\u0275prov=Dt({factory:function(){return new t(Ui(N_),Ui(Cc),Ui(ah))},token:t,providedIn:"root"}),t}(),H_=function(){var t=function(){function t(e,n,i){g(this,t),this._elementRef=e,this._focusTrapFactory=n,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return v(t,[{key:"ngOnDestroy",value:function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}},{key:"ngAfterContentInit",value:function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}},{key:"ngDoCheck",value:function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}},{key:"ngOnChanges",value:function(t){var e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}},{key:"_captureFocus",value:function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}},{key:"enabled",get:function(){return this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=lg(t)}},{key:"autoCapture",get:function(){return this._autoCapture},set:function(t){this._autoCapture=lg(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(z_),ss(ah))},t.\u0275dir=de({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[Ie]}),t}();"undefined"!=typeof Element&∈var U_=new bi("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),q_=new bi("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),W_=function(){var t=function(){function t(e,n,i,r){g(this,t),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=e||this._createLiveElement()}return v(t,[{key:"announce",value:function(t){for(var e,n,i=this,r=this._defaultOptions,a=arguments.length,o=new Array(a>1?a-1:0),s=1;s1&&void 0!==arguments[1]&&arguments[1],n=fg(t);if(!this._platform.isBrowser||1!==n.nodeType)return Od(null);var i=ny(n)||this._getDocument(),r=this._elementInfo.get(n);if(r)return e&&(r.checkChildren=!0),r.subject;var a={checkChildren:e,subject:new q,rootNode:i};return this._elementInfo.set(n,a),this._registerGlobalListeners(a),a.subject}},{key:"stopMonitoring",value:function(t){var e=fg(t),n=this._elementInfo.get(e);n&&(n.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(n))}},{key:"focusVia",value:function(t,e,n){var i=this,r=fg(t);r===this._getDocument().activeElement?this._getClosestElementsInfo(r).forEach(function(t){var n=l(t,2);return i._originChanged(n[0],e,n[1])}):(this._setOriginForCurrentEventQueue(e),"function"==typeof r.focus&&r.focus(n))}},{key:"ngOnDestroy",value:function(){var t=this;this._elementInfo.forEach(function(e,n){return t.stopMonitoring(n)})}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(t,e,n){n?t.classList.add(e):t.classList.remove(e)}},{key:"_getFocusOrigin",value:function(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}},{key:"_setClasses",value:function(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}},{key:"_setOriginForCurrentEventQueue",value:function(t){var e=this;this._ngZone.runOutsideAngular(function(){e._origin=t,0===e._detectionMode&&(e._originTimeoutId=setTimeout(function(){return e._origin=null},1))})}},{key:"_wasCausedByTouch",value:function(t){var e=X_(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(t,e){var n=this._elementInfo.get(e);n&&(n.checkChildren||e===X_(t))&&this._originChanged(e,this._getFocusOrigin(t),n)}},{key:"_onBlur",value:function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(t,e){this._ngZone.run(function(){return t.next(e)})}},{key:"_registerGlobalListeners",value:function(t){var e=this;if(this._platform.isBrowser){var n=t.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular(function(){n.addEventListener("focus",e._rootNodeFocusAndBlurListener,Z_),n.addEventListener("blur",e._rootNodeFocusAndBlurListener,Z_)}),this._rootNodeFocusListenerCount.set(n,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(function(){var t=e._getDocument(),n=e._getWindow();t.addEventListener("keydown",e._documentKeydownListener,Z_),t.addEventListener("mousedown",e._documentMousedownListener,Z_),t.addEventListener("touchstart",e._documentTouchstartListener,Z_),n.addEventListener("focus",e._windowFocusListener)})}}},{key:"_removeGlobalListeners",value:function(t){var e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){var n=this._rootNodeFocusListenerCount.get(e);n>1?this._rootNodeFocusListenerCount.set(e,n-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Z_),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Z_),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){var i=this._getDocument(),r=this._getWindow();i.removeEventListener("keydown",this._documentKeydownListener,Z_),i.removeEventListener("mousedown",this._documentMousedownListener,Z_),i.removeEventListener("touchstart",this._documentTouchstartListener,Z_),r.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}},{key:"_originChanged",value:function(t,e,n){this._setClasses(t,e),this._emitOrigin(n.subject,e),this._lastFocusOrigin=e}},{key:"_getClosestElementsInfo",value:function(t){var e=[];return this._elementInfo.forEach(function(n,i){(i===t||n.checkChildren&&i.contains(t))&&e.push([i,n])}),e}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(Cc),Ui($g),Ui(ah,8),Ui(K_,8))},t.\u0275prov=Dt({factory:function(){return new t(Ui(Cc),Ui($g),Ui(ah,8),Ui(K_,8))},token:t,providedIn:"root"}),t}();function X_(t){return t.composedPath?t.composedPath()[0]:t.target}var Q_=function(){var t=function(){function t(e,n){g(this,t),this._elementRef=e,this._focusMonitor=n,this.cdkFocusChange=new Ru}return v(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(e){return t.cdkFocusChange.emit(e)})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss($_))},t.\u0275dir=de({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t}(),J_="cdk-high-contrast-black-on-white",tb="cdk-high-contrast-white-on-black",eb="cdk-high-contrast-active",nb=function(){var t=function(){function t(e,n){g(this,t),this._platform=e,this._document=n}return v(t,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);var e=this._document.defaultView||window,n=e&&e.getComputedStyle?e.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),i){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(this._platform.isBrowser&&this._document.body){var t=this._document.body.classList;t.remove(eb),t.remove(J_),t.remove(tb);var e=this.getHighContrastMode();1===e?(t.add(eb),t.add(J_)):2===e&&(t.add(eb),t.add(tb))}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui($g),Ui(ah))},t.\u0275prov=Dt({factory:function(){return new t(Ui($g),Ui(ah))},token:t,providedIn:"root"}),t}(),ib=function(){var t=function t(e){g(this,t),e._applyBodyHighContrastModeCssClasses()};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(Ui(nb))},imports:[[Xg,x_]]}),t}(),rb=new Il("11.0.4"),ab=function t(){g(this,t)},ob=function t(){g(this,t)},sb="*";function lb(t,e){return{type:7,name:t,definitions:e,options:{}}}function ub(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function cb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function hb(t){return{type:6,styles:t,offset:null}}function db(t,e,n){return{type:0,name:t,styles:e,options:n}}function fb(t){return{type:5,steps:t}}function pb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function mb(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}function vb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function gb(t){Promise.resolve(null).then(t)}var yb=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;g(this,t),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+n}return v(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{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 t=this;gb(function(){return t._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(t){return t()}),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(t){return t()}),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(t){this._position=this.totalTime?t*this.totalTime:1}},{key:"getPosition",value:function(){return this.totalTime?this._position/this.totalTime:1}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}}]),t}(),_b=function(){function t(e){var n=this;g(this,t),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var i=0,r=0,a=0,o=this.players.length;0==o?gb(function(){return n._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++i==o&&n._onFinish()}),t.onDestroy(function(){++r==o&&n._onDestroy()}),t.onStart(function(){++a==o&&n._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return v(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(t){return t.init()})}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})}},{key:"pause",value:function(){this.players.forEach(function(t){return t.pause()})}},{key:"restart",value:function(){this.players.forEach(function(t){return t.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}},{key:"getPosition",value:function(){var t=this.players.reduce(function(t,e){return null===t||e.totalTime>t.totalTime?e:t},null);return null!=t?t.getPosition():0}},{key:"beforeDestroy",value:function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}}]),t}(),bb="!";function kb(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function wb(t){switch(t.length){case 0:return new yb;case 1:return t[0];default:return new _b(t)}}function Cb(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=[],s=[],l=-1,u=null;if(i.forEach(function(t){var n=t.offset,i=n==l,c=i&&u||{};Object.keys(t).forEach(function(n){var i=n,s=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),s){case bb:s=r[n];break;case sb:s=a[n];break;default:s=e.normalizeStyleValue(n,i,s,o)}c[i]=s}),i||s.push(c),u=c,l=n}),o.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(o.join(c)))}return s}function Sb(t,e,n,i){switch(e){case"start":t.onStart(function(){return i(n&&xb(n,"start",t))});break;case"done":t.onDone(function(){return i(n&&xb(n,"done",t))});break;case"destroy":t.onDestroy(function(){return i(n&&xb(n,"destroy",t))})}}function xb(t,e,n){var i=n.totalTime,r=Eb(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),a=t._data;return null!=a&&(r._data=a),r}function Eb(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6?arguments[6]:void 0;return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:a,disabled:!!o}}function Ab(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function Db(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var Ob=function(t,e){return!1},Ib=function(t,e){return!1},Tb=function(t,e,n){return[]},Rb=kb();(Rb||"undefined"!=typeof Element)&&(Ob=function(t,e){return t.contains(e)},Ib=function(){if(Rb||Element.prototype.matches)return function(t,e){return t.matches(e)};var t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?function(t,n){return e.apply(t,[n])}:Ib}(),Tb=function(t,e,n){var i=[];if(n)for(var r=t.querySelectorAll(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function Qb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)for(var i in t)n[i]=t[i];else Xb(t,n);return n}function Jb(t,e,n){return n?e+":"+n+";":""}function tk(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(t,'" is not supported')),e;var a=r[1],o=r[2],s=r[3];e.push(gk(a,s)),"<"!=o[0]||a==pk&&s==pk||e.push(gk(s,a))}(t,r,i)}):r.push(n),r),animation:a,queryCount:e.queryCount,depCount:e.depCount,options:Sk(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return dk(n,t,e)}),options:Sk(t.options)}}},{key:"visitGroup",value:function(t,e){var n=this,i=e.currentTime,r=0,a=t.steps.map(function(t){e.currentTime=i;var a=dk(n,t,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:a,options:Sk(t.options)}}},{key:"visitAnimate",value:function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return xk($b(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var r=xk(0,0,"");return r.dynamic=!0,r.strValue=i,r}return xk((n=n||$b(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:hb({});if(5==r.type)n=this.visitKeyframes(r,e);else{var a=t.styles,o=!1;if(!a){o=!0;var s={};i.easing&&(s.easing=i.easing),a=hb(s)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(a,e);l.isEmptyStep=o,n=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}},{key:"_makeStyleAst",value:function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==sb?n.push(t):e.errors.push("The provided style string value ".concat(t," is not allowed.")):n.push(t)}):n.push(t.styles);var i=!1,r=null;return n.forEach(function(t){if(Ck(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var a in e)if(e[a].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,a=e.currentTime;i&&a>0&&(a-=i.duration+i.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(i){if(n._driver.validateStyleProperty(i)){var o,s,l,u=e.collectedStyles[e.currentQuerySelector],c=u[i],h=!0;c&&(a!=r&&a>=c.startTime&&r<=c.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(c.startTime,'ms" and "').concat(c.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(a,'ms" and "').concat(r,'ms"')),h=!1),a=c.startTime),h&&(u[i]={startTime:a,endTime:r}),e.options&&(o=e.errors,s=e.options.params||{},(l=ak(t[i])).length&&l.forEach(function(t){s.hasOwnProperty(t)||o.push("Unable to resolve the local animation param ".concat(t," in the given list of values"))}))}else e.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,a=[],o=!1,s=!1,l=0,u=t.steps.map(function(t){var i=n._makeStyleAst(t,e),u=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(Ck(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(Ck(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),s=s||c<0||c>1,o=o||c0&&r0?r==d?1:h*r:a[r],s=o*m;e.currentTime=f+p.delay+s,p.duration=s,n._validateStyleAst(t,e),t.offset=o,i.styles.push(t)}),i}},{key:"visitReference",value:function(t,e){return{type:8,animation:dk(this,ik(t.animation),e),options:Sk(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:Sk(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Sk(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=l(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return t==yk});return e&&(t=t.replace(_k,"")),[t=t.replace(/@\*/g,Wb).replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,Gb),e]}(t.selector),2),a=r[0],o=r[1];e.currentQuerySelector=n.length?n+" "+a:a,Ab(e.collectedStyles,e.currentQuerySelector,{});var s=dk(this,ik(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:a,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:s,originalSelector:t.selector,options:Sk(t.options)}}},{key:"visitStagger",value:function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:$b(t.timings,e.errors,!0);return{type:12,animation:dk(this,ik(t.animation),e),timings:n,options:null}}}]),t}(),wk=function t(e){g(this,t),this.errors=e,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 Ck(t){return!Array.isArray(t)&&"object"==typeof t}function Sk(t){var e;return t?(t=Xb(t)).params&&(t.params=(e=t.params)?Xb(e):null):t={},t}function xk(t,e,n){return{duration:t,delay:e,easing:n}}function Ek(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:a,totalTime:r+a,easing:o,subTimeline:s}}var Ak=function(){function t(){g(this,t),this._map=new Map}return v(t,[{key:"consume",value:function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e}},{key:"append",value:function(t,e){var n,i=this._map.get(t);i||this._map.set(t,i=[]),(n=i).push.apply(n,h(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),Dk=new RegExp(":enter","g"),Ok=new RegExp(":leave","g");function Ik(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new Tk).buildKeyframes(t,e,n,i,r,a,o,s,l,u)}var Tk=function(){function t(){g(this,t)}return v(t,[{key:"buildKeyframes",value:function(t,e,n,i,r,a,o,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new Ak;var c=new Pk(t,e,l,i,r,u,[]);c.options=s,c.currentTimeline.setStyles([a],null,c.errors,s),dk(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(o).length){var d=h[h.length-1];d.allowOnlyTimelineStyles()||d.setStyles([o],null,c.errors,s)}return h.length?h.map(function(t){return t.buildKeyframes()}):[Ek(e,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(t,e){}},{key:"visitState",value:function(t,e){}},{key:"visitTransition",value:function(t,e){}},{key:"visitAnimateChild",value:function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(n,i,i.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=t}},{key:"visitAnimateRef",value:function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}},{key:"_visitSubInstructions",value:function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?Kb(n.duration):null,a=null!=n.delay?Kb(n.delay):null;return 0!==r&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,r,a);i=Math.max(i,n.duration+n.delay)}),i}},{key:"visitReference",value:function(t,e){e.updateOptions(t.options,!0),dk(this,t.animation,e),e.previousNode=t}},{key:"visitSequence",value:function(t,e){var n=this,i=e.subContextCount,r=e,a=t.options;if(a&&(a.params||a.delay)&&((r=e.createSubContext(a)).transformIntoNewTimeline(),null!=a.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Rk);var o=Kb(a.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(function(t){return dk(n,t,r)}),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}},{key:"visitGroup",value:function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,a=t.options&&t.options.delay?Kb(t.options.delay):0;t.steps.forEach(function(o){var s=e.createSubContext(t.options);a&&s.delayNextStep(a),dk(n,o,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)}),i.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(r),e.previousNode=t}},{key:"_visitTiming",value:function(t,e){if(t.dynamic){var n=t.strValue;return $b(e.params?ok(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}},{key:"visitAnimate",value:function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}},{key:"visitStyle",value:function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}},{key:"visitKeyframes",value:function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,a=e.createSubContext().currentTimeline;a.easing=n.easing,t.styles.forEach(function(t){a.forwardTime((t.offset||0)*r),a.setStyles(t.styles,t.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(i+r),e.previousNode=t}},{key:"visitQuery",value:function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},a=r.delay?Kb(r.delay):0;a&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Rk);var o=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;var l=null;s.forEach(function(i,r){e.currentQueryIndex=r;var s=e.createSubContext(t.options,i);a&&s.delayNextStep(a),i===e.element&&(l=s.currentTimeline),dk(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,s.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}},{key:"visitStagger",value:function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,a=Math.abs(r.duration),o=a*(e.currentQueryTotal-1),s=a*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=o-s;break;case"full":s=n.currentStaggerTime}var l=e.currentTimeline;s&&l.delayNextStep(s);var u=l.currentTime;dk(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),t}(),Rk={},Pk=function(){function t(e,n,i,r,a,o,s,l){g(this,t),this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=a,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Rk,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mk(this._driver,n,0),s.push(this.currentTimeline)}return v(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=Kb(i.duration)),null!=i.delay&&(r.delay=Kb(i.delay));var a=i.params;if(a){var o=r.params;o||(o=this.options.params={}),Object.keys(a).forEach(function(t){e&&o.hasOwnProperty(t)||(o[t]=ok(a[t],o,n.errors))})}}}},{key:"_copyOptions",value:function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t}},{key:"createSubContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,a=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(e),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}},{key:"transformIntoNewTimeline",value:function(t){return this.previousNode=Rk,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new Fk(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}},{key:"delayNextStep",value:function(t){t>0&&this.currentTimeline.delayNextStep(t)}},{key:"invokeQuery",value:function(t,e,n,i,r,a){var o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(Dk,"."+this._enterClassName)).replace(Ok,"."+this._leaveClassName);var s=this._driver.query(this.element,t,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),o.push.apply(o,h(s))}return r||0!=o.length||a.push('`query("'.concat(e,'")` returned zero elements. (Use `query("').concat(e,'", { optional: true })` if you wish to allow this.)')),o}},{key:"params",get:function(){return this.options.params}}]),t}(),Mk=function(){function t(e,n,i,r){g(this,t),this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,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(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return v(t,[{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:"delayNextStep",value:function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}},{key:"fork",value:function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}},{key:"_updateStyle",value:function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||sb,e._currentKeyframe[t]=sb}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var a=i&&i.params||{},o=function(t,e){var n,i={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){i[t]=sb}):Qb(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(o).forEach(function(t){var e=ok(o[t],a,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:sb),r._updateStyle(t,e)})}},{key:"applyStylesToKeyframe",value:function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))}},{key:"snapshotCurrentStyles",value:function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)})}},{key:"buildKeyframes",value:function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach(function(a,o){var s=Qb(a,!0);Object.keys(s).forEach(function(t){var i=s[t];i==bb?e.add(t):i==sb&&n.add(t)}),i||(s.offset=o/t.duration),r.push(s)});var a=e.size?sk(e.values()):[],o=n.size?sk(n.values()):[];if(i){var s=r[0],l=Xb(s);s.offset=0,l.offset=1,r=[s,l]}return Ek(this.element,r,a,o,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t}}]),t}(),Fk=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s){var l,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return g(this,n),(l=e.call(this,t,i,s.delay)).element=i,l.keyframes=r,l.preStyleProps=a,l.postStyleProps=o,l._stretchStartingKeyframe=u,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return v(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var a=[],o=i+n,s=n/o,l=Qb(t[0],!1);l.offset=0,a.push(l);var u=Qb(t[0],!1);u.offset=Lk(s),a.push(u);for(var c=t.length-1,h=1;h<=c;h++){var d=Qb(t[h],!1);d.offset=Lk((n+d.offset*i)/o),a.push(d)}i=o,n=0,r="",t=a}return Ek(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(Mk);function Lk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,e-1);return Math.round(t*n)/n}var Nk=function t(){g(this,t)},Vk=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"normalizePropertyName",value:function(t,e){return uk(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var r="",a=n.toString().trim();if(jk[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&0==o[1].length&&i.push("Please provide a CSS unit value for ".concat(t,":").concat(n))}return a+r}}]),n}(Nk),jk=function(){return t="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(","),e={},t.forEach(function(t){return e[t]=!0}),e;var t,e}();function Bk(t,e,n,i,r,a,o,s,l,u,c,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:a,toState:i,toStyles:o,timelines:s,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:d}}var zk={},Hk=function(){function t(e,n,i){g(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return v(t,[{key:"match",value:function(t,e,n,i){return function(t,e,n,i,r){return t.some(function(t){return t(e,n,i,r)})}(this.ast.matchers,t,e,n,i)}},{key:"buildStyles",value:function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],a=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):a}},{key:"build",value:function(t,e,n,i,r,a,o,s,l,u){var c=[],h=this.ast.options&&this.ast.options.params||zk,d=this.buildStyles(n,o&&o.params||zk,c),f=s&&s.params||zk,p=this.buildStyles(i,f,c),m=new Set,v=new Map,g=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),f)},b=u?[]:Ik(t,e,this.ast.animation,r,a,d,p,_,l,c),k=0;if(b.forEach(function(t){k=Math.max(t.duration+t.delay,k)}),c.length)return Bk(e,this._triggerName,n,i,y,d,p,[],[],v,g,k,c);b.forEach(function(t){var n=t.element,i=Ab(v,n,{});t.preStyleProps.forEach(function(t){return i[t]=!0});var r=Ab(g,n,{});t.postStyleProps.forEach(function(t){return r[t]=!0}),n!==e&&m.add(n)});var w=sk(m.values());return Bk(e,this._triggerName,n,i,y,d,p,b,w,v,g,k)}}]),t}(),Uk=function(){function t(e,n){g(this,t),this.styles=e,this.defaultParams=n}return v(t,[{key:"buildStyles",value:function(t,e){var n={},i=Xb(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach(function(t){var a=r[t];a.length>1&&(a=ok(a,i,e)),n[t]=a})}}),n}}]),t}(),qk=function(){function t(e,n){var i=this;g(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(t){i.states[t.name]=new Uk(t.style,t.options&&t.options.params||{})}),Wk(this.states,"true","1"),Wk(this.states,"false","0"),n.transitions.forEach(function(t){i.transitionFactories.push(new Hk(e,t,i.states))}),this.fallbackTransition=new Hk(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return v(t,[{key:"matchTransition",value:function(t,e,n,i){return this.transitionFactories.find(function(r){return r.match(t,e,n,i)})||null}},{key:"matchStyles",value:function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),t}();function Wk(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Yk=new Ak,Gk=function(){function t(e,n,i){g(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return v(t,[{key:"register",value:function(t,e){var n=[],i=bk(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,r=Cb(this._driver,this._normalizer,i,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}},{key:"create",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],o=this._animations[t],s=new Map;if(o?(n=Ik(this._driver,e,o,Hb,Ub,{},{},r,Yk,a)).forEach(function(t){var e=Ab(s,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(a.push("The requested animation doesn't exist or has already been destroyed"),n=[]),a.length)throw new Error("Unable to create the animation due to the following errors: ".concat(a.join("\n")));s.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=i._driver.computeStyle(e,n,sb)})});var l=n.map(function(t){var e=s.get(t.element);return i._buildPlayer(t,{},e)}),u=wb(l);return this._playersById[t]=u,u.onDestroy(function(){return i.destroy(t)}),this.players.push(u),u}},{key:"destroy",value:function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by ".concat(t));return e}},{key:"listen",value:function(t,e,n,i){var r=Eb(e,"","","");return Sb(this._getPlayer(t),n,r,i),function(){}}},{key:"command",value:function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])}}]),t}(),Kk="ng-animate-queued",Zk="ng-animate-disabled",$k=".ng-animate-disabled",Xk="ng-star-inserted",Qk=[],Jk={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tw={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ew=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";g(this,t),this.namespaceId=n;var i=e&&e.hasOwnProperty("value"),r=i?e.value:e;if(this.value=sw(r),i){var a=Xb(e);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return v(t,[{key:"absorbOptions",value:function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}}},{key:"params",get:function(){return this.options.params}}]),t}(),nw="void",iw=new ew(nw),rw=function(){function t(e,n,i){g(this,t),this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,dw(n,this._hostClassName)}return v(t,[{key:"listen",value:function(t,e,n,i){var r,a=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(e,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(e,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(e,'" is not supported!'));var o=Ab(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};o.push(s);var l=Ab(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(dw(t,qb),dw(t,"ng-trigger-"+e),l[e]=iw),function(){a._engine.afterFlush(function(){var t=o.indexOf(s);t>=0&&o.splice(t,1),a._triggers[e]||delete l[e]})}}},{key:"register",value:function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}},{key:"_getTrigger",value:function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'.concat(t,'" has not been registered!'));return e}},{key:"trigger",value:function(t,e,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this._getTrigger(e),o=new ow(this.id,e,t),s=this._engine.statesByElement.get(t);s||(dw(t,qb),dw(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var l=s[e],u=new ew(n,this.id),c=n&&n.hasOwnProperty("value");!c&&l&&u.absorbOptions(l.options),s[e]=u,l||(l=iw);var h=u.value===nw;if(h||l.value!==u.value){var d=Ab(this._engine.playersByElement,t,[]);d.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var f=a.matchTransition(l.value,u.value,t,u.params),p=!1;if(!f){if(!r)return;f=a.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:u,player:o,isFallbackTransition:p}),p||(dw(t,Kk),o.onStart(function(){fw(t,Kk)})),o.onDone(function(){var e=i.players.indexOf(o);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(o);r>=0&&n.splice(r,1)}}),this.players.push(o),d.push(o),o}if(!vw(l.params,u.params)){var m=[],v=a.matchStyles(l.value,l.params,m),g=a.matchStyles(u.value,u.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(function(){nk(t,v),ek(t,g)})}}},{key:"deregister",value:function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach(function(e,n){delete e[t]}),this._elementListeners.forEach(function(n,i){e._elementListeners.set(i,n.filter(function(e){return e.name!=t}))})}},{key:"clearElementCache",value:function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach(function(t){return t.destroy()}),this._engine.playersByElement.delete(t))}},{key:"_signalRemovalForInnerTriggers",value:function(t,e){var n=this,i=this._engine.driver.query(t,Wb,!0);i.forEach(function(t){if(!t.__ng_removed){var i=n._engine.fetchNamespacesByElement(t);i.size?i.forEach(function(n){return n.triggerLeaveAnimation(t,e,!1,!0)}):n.clearElementCache(t)}}),this._engine.afterFlushAnimationsDone(function(){return i.forEach(function(t){return n.clearElementCache(t)})})}},{key:"triggerLeaveAnimation",value:function(t,e,n,i){var r=this,a=this._engine.statesByElement.get(t);if(a){var o=[];if(Object.keys(a).forEach(function(e){if(r._triggers[e]){var n=r.trigger(t,e,nw,i);n&&o.push(n)}}),o.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&wb(o).onDone(function(){return r._engine.processLeaveNode(t)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(t){var e=this,n=this._elementListeners.get(t);if(n){var i=new Set;n.forEach(function(n){var r=n.name;if(!i.has(r)){i.add(r);var a=e._triggers[r].fallbackTransition,o=e._engine.statesByElement.get(t)[r]||iw,s=new ew(nw),l=new ow(e.id,r,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:r,transition:a,fromState:o,toState:s,player:l,isFallbackTransition:!0})}})}}},{key:"removeNode",value:function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),!this.triggerLeaveAnimation(t,e,!0)){var r=!1;if(i.totalAnimations){var a=i.players.length?i.playersByQueriedElement.get(t):[];if(a&&a.length)r=!0;else for(var o=t;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{var s=t.__ng_removed;s&&s!==Jk||(i.afterFlush(function(){return n.clearElementCache(t)}),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}}},{key:"insertNode",value:function(t,e){dw(t,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(t){var e=this,n=[];return this._queue.forEach(function(i){var r=i.player;if(!r.destroyed){var a=i.element,o=e._elementListeners.get(a);o&&o.forEach(function(e){if(e.name==i.triggerName){var n=Eb(a,i.triggerName,i.fromState.value,i.toState.value);n._data=t,Sb(i.player,e.phase,n,e.callback)}}),r.markedForDestroy?e._engine.afterFlush(function(){r.destroy()}):n.push(i)}}),this._queue=[],n.sort(function(t,n){var i=t.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:e._engine.driver.containsElement(t.element,n.element)?1:-1})}},{key:"destroy",value:function(t){this.players.forEach(function(t){return t.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,t)}},{key:"elementContainsData",value:function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(function(e){return e.element===t})||e}}]),t}(),aw=function(){function t(e,n,i){g(this,t),this.bodyNode=e,this.driver=n,this._normalizer=i,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(t,e){}}return v(t,[{key:"_onRemovalComplete",value:function(t,e){this.onRemovalComplete(t,e)}},{key:"createNamespace",value:function(t,e){var n=new rw(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}},{key:"_balanceNamespaceList",value:function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}},{key:"register",value:function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}},{key:"registerTrigger",value:function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}},{key:"destroy",value:function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return i.destroy(e)})}}},{key:"_fetchNamespace",value:function(t){return this._namespaceLookup[t]}},{key:"fetchNamespacesByElement",value:function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r=0&&this.collectedLeaveElements.splice(a,1)}if(t){var o=this._fetchNamespace(t);o&&o.insertNode(e,n)}i&&this.collectEnterElement(e)}}},{key:"collectEnterElement",value:function(t){this.collectedEnterElements.push(t)}},{key:"markElementAsDisabled",value:function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),dw(t,Zk)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),fw(t,Zk))}},{key:"removeNode",value:function(t,e,n,i){if(lw(e)){var r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){var a=this.namespacesByHostElement.get(e);a&&a.id!==t&&a.removeNode(e,i)}}else this._onRemovalComplete(e,i)}},{key:"markElementAsRemoved",value:function(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(t,e,n,i,r){return lw(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}}},{key:"_buildInstruction",value:function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}},{key:"destroyInnerAnimations",value:function(t){var e=this,n=this.driver.query(t,Wb,!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,Gb,!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})}},{key:"destroyActiveAnimationsForElement",value:function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})}},{key:"whenRenderingDone",value:function(){var t=this;return new Promise(function(e){if(t.players.length)return wb(t.players).onDone(function(){return e()});e()})}},{key:"processLeaveNode",value:function(t){var e=this,n=t.__ng_removed;if(n&&n.setForRemoval){if(t.__ng_removed=Jk,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,$k)&&this.markElementAsDisabled(t,!1),this.driver.query(t,$k,!0).forEach(function(t){e.markElementAsDisabled(t,!1)})}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(e,n){return t._balanceNamespaceList(e,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i=0;A--)this._namespaceList[A].drainQueuedTransitions(e).forEach(function(t){var e=t.player,a=t.element;if(x.push(e),n.collectedEnterElements.length){var c=a.__ng_removed;if(c&&c.setForMove)return void e.destroy()}var h=!d||!n.driver.containsElement(d,a),f=C.get(a),p=m.get(a),v=n._buildInstruction(t,i,p,f,h);if(v.errors&&v.errors.length)E.push(v);else{if(h)return e.onStart(function(){return nk(a,v.fromStyles)}),e.onDestroy(function(){return ek(a,v.toStyles)}),void r.push(e);if(t.isFallbackTransition)return e.onStart(function(){return nk(a,v.fromStyles)}),e.onDestroy(function(){return ek(a,v.toStyles)}),void r.push(e);v.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),i.append(a,v.timelines),o.push({instruction:v,player:e,element:a}),v.queriedElements.forEach(function(t){return Ab(s,t,[]).push(e)}),v.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var i=l.get(e);i||l.set(e,i=new Set),n.forEach(function(t){return i.add(t)})}}),v.postStyleProps.forEach(function(t,e){var n=Object.keys(t),i=u.get(e);i||u.set(e,i=new Set),n.forEach(function(t){return i.add(t)})})}});if(E.length){var D=[];E.forEach(function(t){D.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach(function(t){return D.push("- ".concat(t,"\n"))})}),x.forEach(function(t){return t.destroy()}),this.reportError(D)}var O=new Map,I=new Map;o.forEach(function(t){var e=t.element;i.has(e)&&(I.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,O))}),r.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){Ab(O,e,[]).push(t),t.destroy()})});var T=g.filter(function(t){return gw(t,l,u)}),R=new Map;cw(R,this.driver,_,u,sb).forEach(function(t){gw(t,l,u)&&T.push(t)});var P=new Map;p.forEach(function(t,e){cw(P,n.driver,new Set(t),l,bb)}),T.forEach(function(t){var e=R.get(t),n=P.get(t);R.set(t,Object.assign(Object.assign({},e),n))});var M=[],F=[],L={};o.forEach(function(t){var e=t.element,o=t.player,s=t.instruction;if(i.has(e)){if(c.has(e))return o.onDestroy(function(){return ek(e,s.toStyles)}),o.disabled=!0,o.overrideTotalTime(s.totalTime),void r.push(o);var l=L;if(I.size>1){for(var u=e,h=[];u=u.parentNode;){var d=I.get(u);if(d){l=d;break}h.push(u)}h.forEach(function(t){return I.set(t,l)})}var f=n._buildAnimation(o.namespaceId,s,O,a,P,R);if(o.setRealPlayer(f),l===L)M.push(o);else{var p=n.playersByElement.get(l);p&&p.length&&(o.parentPlayer=wb(p)),r.push(o)}}else nk(e,s.fromStyles),o.onDestroy(function(){return ek(e,s.toStyles)}),F.push(o),c.has(e)&&r.push(o)}),F.forEach(function(t){var e=a.get(t.element);if(e&&e.length){var n=wb(e);t.setRealPlayer(n)}}),r.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var N=0;N0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new yb(t.duration,t.delay)}},{key:"queuedPlayers",get:function(){var t=[];return this._namespaceList.forEach(function(e){e.players.forEach(function(e){e.queued&&t.push(e)})}),t}}]),t}(),ow=function(){function t(e,n,i){g(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new yb,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return v(t,[{key:"setRealPlayer",value:function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return Sb(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(t){this.totalTime=t}},{key:"syncPlayerEvents",value:function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})}},{key:"_queueEvent",value:function(t,e){Ab(this._queuedCallbacks,t,[]).push(e)}},{key:"onDone",value:function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}},{key:"onStart",value:function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}},{key:"onDestroy",value:function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}},{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(t){this.queued||this._player.setPosition(t)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)}}]),t}();function sw(t){return null!=t?t:null}function lw(t){return t&&1===t.nodeType}function uw(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function cw(t,e,n,i,r){var a=[];n.forEach(function(t){return a.push(uw(t))});var o=[];i.forEach(function(n,i){var a={};n.forEach(function(t){var n=a[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=tw,o.push(i))}),t.set(i,a)});var s=0;return n.forEach(function(t){return uw(t,a[s++])}),o}function hw(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var i=new Set(e),r=new Map;function a(t){if(!t)return 1;var e=r.get(t);if(e)return e;var o=t.parentNode;return e=n.has(o)?o:i.has(o)?1:a(o),r.set(t,e),e}return e.forEach(function(t){var e=a(t);1!==e&&n.get(e).push(t)}),n}function dw(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function fw(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function pw(t,e,n){wb(n).onDone(function(){return t.processLeaveNode(e)})}function mw(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(t)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),t}();function _w(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=kw(e[0]),e.length>1&&(i=kw(e[e.length-1]))):e&&(n=kw(e)),n||i?new bw(t,n,i):null}var bw=function(){var t=function(){function t(e,n,i){g(this,t),this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;var r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}return v(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&ek(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(ek(this._element,this._initialStyles),this._endStyles&&(ek(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(nk(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(nk(this._element,this._endStyles),this._endStyles=null),ek(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function kw(t){for(var e=null,n=Object.keys(t),i=0;i=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Ow(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(i=Dw(n=Tw(t=this._element,"").split(","),e))>=0&&(n.splice(i,1),Iw(t,"",n.join(","))))}}]),t}();function Ew(t,e,n){Iw(t,"PlayState",n,Aw(t,e))}function Aw(t,e){var n=Tw(t,"");return n.indexOf(",")>0?Dw(n.split(","),e):Dw([n],e)}function Dw(t,e){for(var n=0;n=0)return n;return-1}function Ow(t,e,n){n?t.removeEventListener(Sw,e):t.addEventListener(Sw,e)}function Iw(t,e,n,i){var r=Cw+e;if(null!=i){var a=t.style[r];if(a.length){var o=a.split(",");o[i]=n,n=o.join(",")}}t.style[r]=n}function Tw(t,e){return t.style[Cw+e]||""}var Rw=function(){function t(e,n,i,r,a,o,s,l){g(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=a,this._finalStyles=s,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=r+a,this._buildStyler()}return v(t,[{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{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(t){return t()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(t){return t()}),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(t){this._styler.setPosition(t)}},{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._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var t=this;this._styler=new xw(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}},{key:"beforeDestroy",value:function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:fk(t.element,i))})}this.currentSnapshot=e}}]),t}(),Pw=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this)).element=t,r._startingStyles={},r.__initialized=!1,r._styles=jb(i),r}return v(n,[{key:"init",value:function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(e){t._startingStyles[e]=t.element.style[e]}),r(i(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(e){return t.element.style.setProperty(e,t._styles[e])}),r(i(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)}),this._startingStyles=null,r(i(n.prototype),"destroy",this).call(this))}}]),n}(yb),Mw="gen_css_kf_",Fw=function(){function t(){g(this,t),this._count=0,this._head=document.querySelector("head")}return v(t,[{key:"validateStyleProperty",value:function(t){return Fb(t)}},{key:"matchesElement",value:function(t,e){return Lb(t,e)}},{key:"containsElement",value:function(t,e){return Nb(t,e)}},{key:"query",value:function(t,e,n){return Vb(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"buildKeyframeElement",value:function(t,e,n){n=n.map(function(t){return jb(t)});var i="@keyframes ".concat(e," {\n"),r="";n.forEach(function(t){r=" ";var e=parseFloat(t.offset);i+="".concat(r).concat(100*e,"% {\n"),r+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(e,": ").concat(n,";\n"))}}),i+="".concat(r,"}\n")}),i+="}\n";var a=document.createElement("style");return a.textContent=i,a}},{key:"animate",value:function(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=a.filter(function(t){return t instanceof Rw}),s={};ck(n,i)&&o.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return s[t]=e[t]})});var l=Lw(e=hk(t,e,s));if(0==n)return new Pw(t,l);var u="".concat(Mw).concat(this._count++),c=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(c);var h=_w(t,e),d=new Rw(t,e,u,n,i,r,l,h);return d.onDestroy(function(){return Nw(c)}),d}}]),t}();function Lw(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}function Nw(t){t.parentNode.removeChild(t)}var Vw=function(){function t(e,n,i,r){g(this,t),this.element=e,this.keyframes=n,this.options=i,this._specialStyles=r,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=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return v(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(t,e,n){return t.animate(e,n)}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),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(t){return t()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(t){this.domPlayer.currentTime=t*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:fk(t.element,n))}),this.currentSnapshot=e}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),t}(),jw=function(){function t(){g(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Bw().toString()),this._cssKeyframesDriver=new Fw}return v(t,[{key:"validateStyleProperty",value:function(t){return Fb(t)}},{key:"matchesElement",value:function(t,e){return Lb(t,e)}},{key:"containsElement",value:function(t,e){return Nb(t,e)}},{key:"query",value:function(t,e,n){return Vb(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"overrideWebAnimationsSupport",value:function(t){this._isNativeImpl=t}},{key:"animate",value:function(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0,s=!o&&!this._isNativeImpl;if(s)return this._cssKeyframesDriver.animate(t,e,n,i,r,a);var l=0==i?"both":"forwards",u={duration:n,delay:i,fill:l};r&&(u.easing=r);var c={},h=a.filter(function(t){return t instanceof Vw});ck(n,i)&&h.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return c[t]=e[t]})});var d=_w(t,e=hk(t,e=e.map(function(t){return Qb(t,!1)}),c));return new Vw(t,e,u,d)}}]),t}();function Bw(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var zw=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this))._nextAnimationId=0,r._renderer=t.createRenderer(i.body,{id:"0",encapsulation:qt.None,styles:[],data:{animation:[]}}),r}return v(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?cb(t):t;return qw(this._renderer,null,e,"register",[n]),new Hw(e,this._renderer)}}]),n}(ab);return t.\u0275fac=function(e){return new(e||t)(Ui(El),Ui(ah))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Hw=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this))._id=t,r._renderer=i,r}return v(n,[{key:"create",value:function(t,e){return new Uw(this._id,t,e||{},this._renderer)}}]),n}(ob),Uw=function(){function t(e,n,i,r){g(this,t),this.id=e,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return v(t,[{key:"_listen",value:function(t,e){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(t),e)}},{key:"_command",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=0&&t3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,i)}},{key:"removeChild",value:function(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}},{key:"selectRootElement",value:function(t,e){return this.delegate.selectRootElement(t,e)}},{key:"parentNode",value:function(t){return this.delegate.parentNode(t)}},{key:"nextSibling",value:function(t){return this.delegate.nextSibling(t)}},{key:"setAttribute",value:function(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}},{key:"removeAttribute",value:function(t,e,n){this.delegate.removeAttribute(t,e,n)}},{key:"addClass",value:function(t,e){this.delegate.addClass(t,e)}},{key:"removeClass",value:function(t,e){this.delegate.removeClass(t,e)}},{key:"setStyle",value:function(t,e,n,i){this.delegate.setStyle(t,e,n,i)}},{key:"removeStyle",value:function(t,e,n){this.delegate.removeStyle(t,e,n)}},{key:"setProperty",value:function(t,e,n){e.charAt(0)==Ww&&e==Yw?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}},{key:"setValue",value:function(t,e){this.delegate.setValue(t,e)}},{key:"listen",value:function(t,e,n){return this.delegate.listen(t,e,n)}},{key:"disableAnimations",value:function(t,e){this.engine.disableAnimations(t,e)}},{key:"data",get:function(){return this.delegate.data}}]),t}(),Zw=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,i,r,a)).factory=t,o.namespaceId=i,o}return v(n,[{key:"setProperty",value:function(t,e,n){e.charAt(0)==Ww?"."==e.charAt(1)&&e==Yw?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}},{key:"listen",value:function(t,e,n){var i,r,a=this;if(e.charAt(0)==Ww){var o=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),s=e.substr(1),u="";if(s.charAt(0)!=Ww){var c=l((r=(i=s).indexOf("."),[i.substring(0,r),i.substr(r+1)]),2);s=c[0],u=c[1]}return this.engine.listen(this.namespaceId,o,s,u,function(t){a.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}]),n}(Kw),$w=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){return g(this,n),e.call(this,t.body,i,r)}return n}(yw);return t.\u0275fac=function(e){return new(e||t)(Ui(ah),Ui(zb),Ui(Nk))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),Xw=new bi("AnimationModuleType"),Qw=[{provide:ab,useClass:zw},{provide:Nk,useFactory:function(){return new Vk}},{provide:yw,useClass:$w},{provide:El,useFactory:function(t,e,n){return new Gw(t,e,n)},deps:[pd,yw,Cc]}],Jw=[{provide:zb,useFactory:function(){return"function"==typeof Bw()?new jw:new Fw}},{provide:Xw,useValue:"BrowserAnimations"}].concat(Qw),tC=([{provide:zb,useClass:Bb},{provide:Xw,useValue:"NoopAnimations"}].concat(Qw),function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:Jw,imports:[Dd]}),t}());function eC(t,e){if(1&t&&ds(0,"mat-pseudo-checkbox",3),2&t){var n=xs();ls("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}var nC=["*"],iC=function(){var t=function t(){g(this,t)};return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),rC=function(){var t=function t(){g(this,t)};return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),aC=new Il("11.0.4"),oC=new bi("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),sC=function(){var t=function(){function t(e,n,i){g(this,t),this._hasDoneGlobalChecks=!1,this._document=i,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=n,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return v(t,[{key:"_getWindow",value:function(){var t=this._document.defaultView||window;return"object"==typeof t&&t?t:null}},{key:"_checksAreEnabled",value:function(){return Lc()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var t=this._getWindow();return t&&(t.__karma__||t.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.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._checksAreEnabled()&&!1!==this._sanityChecks&&this._sanityChecks.theme&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.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(t)}}},{key:"_checkCdkVersionMatch",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&aC.full!==rb.full&&console.warn("The Angular Material version ("+aC.full+") does not match the Angular CDK version ("+rb.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),t}();return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)(Ui(nb),Ui(oC,8),Ui(ah))},imports:[[ay],ay]}),t}();function lC(t){return function(t){y(n,t);var e=k(n);function n(){var t;g(this,n);for(var i=arguments.length,r=new Array(i),a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=function(t){y(i,t);var n=k(i);function i(){var t;g(this,i);for(var r=arguments.length,a=new Array(r),o=0;o0?n:t}}]),t}(),gC=new bi("mat-date-formats");try{pC="undefined"!=typeof Intl}catch(RB){pC=!1}var yC={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},_C=wC(31,function(t){return String(t+1)}),bC={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},kC=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function wC(t,e){for(var n=Array(t),i=0;i9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())}},{key:"addCalendarYears",value:function(t,e){return this.addCalendarMonths(t,12*e)}},{key:"addCalendarMonths",value:function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}},{key:"toIso8601",value:function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}},{key:"deserialize",value:function(t){if("string"==typeof t){if(!t)return null;if(kC.test(t)){var e=new Date(t);if(this.isValid(e))return e}}return r(i(n.prototype),"deserialize",this).call(this,t)}},{key:"isDateInstance",value:function(t){return t instanceof Date}},{key:"isValid",value:function(t){return!isNaN(t.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(t,e,n){var i=new Date;return i.setFullYear(t,e,n),i.setHours(0,0,0,0),i}},{key:"_2digit",value:function(t){return("00"+t).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(t){return t.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(t,e){var n=new Date;return n.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(n)}}]),n}(vC);return t.\u0275fac=function(e){return new(e||t)(Ui(mC,8),Ui($g))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),SC=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:vC,useClass:CC}],imports:[[Xg]]}),t}(),xC={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},EC=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:gC,useValue:xC}],imports:[[SC]]}),t}(),AC=function(){var t=function(){function t(){g(this,t)}return v(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),DC=function(){function t(e,n,i){g(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return v(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),OC={enterDuration:450,exitDuration:400},IC=ty({passive:!0}),TC=["mousedown","touchstart"],RC=["mouseup","mouseleave","touchend","touchcancel"],PC=function(){function t(e,n,i,r){g(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=fg(i))}return v(t,[{key:"fadeInRipple",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=Object.assign(Object.assign({},OC),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var o=i.radius||FC(t,e,r),s=t-r.left,l=e-r.top,u=a.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left="".concat(s-o,"px"),c.style.top="".concat(l-o,"px"),c.style.height="".concat(2*o,"px"),c.style.width="".concat(2*o,"px"),null!=i.color&&(c.style.backgroundColor=i.color),c.style.transitionDuration="".concat(u,"ms"),this._containerElement.appendChild(c),MC(c),c.style.transform="scale(1)";var h=new DC(this,c,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(function(){var t=h===n._mostRecentTransientRipple;h.state=1,i.persistent||t&&n._isPointerDown||h.fadeOut()},u),h}},{key:"fadeOutRipple",value:function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=Object.assign(Object.assign({},OC),t.config.animation);n.style.transitionDuration="".concat(i.exitDuration,"ms"),n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(function(){t.state=3,n.parentNode.removeChild(n)},i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(t){return t.fadeOut()})}},{key:"setupTriggerEvents",value:function(t){var e=fg(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(TC))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(RC),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=G_(t),n=this._lastTouchStartEvent&&Date.now()1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})}},{key:"_registerEvents",value:function(t){var e=this;this._ngZone.runOutsideAngular(function(){t.forEach(function(t){e._triggerElement.addEventListener(t,e,IC)})})}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(TC.forEach(function(e){t._triggerElement.removeEventListener(e,t,IC)}),this._pointerUpEventsRegistered&&RC.forEach(function(e){t._triggerElement.removeEventListener(e,t,IC)}))}}]),t}();function MC(t){window.getComputedStyle(t).getPropertyValue("opacity")}function FC(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}var LC=new bi("mat-ripple-global-options"),NC=function(){var t=function(){function t(e,n,i,r,a){g(this,t),this._elementRef=e,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new PC(this,n,e,i)}return v(t,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}},{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}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Cc),ss($g),ss(LC,8),ss(Xw,8))},t.\u0275dir=de({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&js("mat-ripple-unbounded",e.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"]}),t}(),VC=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[sC,Xg],sC]}),t}(),jC=function(){var t=function t(e){g(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1};return t.\u0275fac=function(e){return new(e||t)(ss(Xw,8))},t.\u0275cmp=oe({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&js("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},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}),t}(),BC=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[sC]]}),t}(),zC=lC(function t(){g(this,t)}),HC=0,UC=function(){var t=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._labelId="mat-optgroup-label-".concat(HC++),t}return n}(zC);return t.\u0275fac=function(e){return qC(e||t)},t.\u0275dir=de({type:t,inputs:{label:"label"},features:[qo]}),t}(),qC=vi(UC),WC=new bi("MatOptgroup"),YC=0,GC=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g(this,t),this.source=e,this.isUserInput=n},KC=new bi("MAT_OPTION_PARENT_COMPONENT"),ZC=function(){var t=function(){function t(e,n,i,r){g(this,t),this._element=e,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(YC++),this.onSelectionChange=new Ru,this._stateChanges=new q}return v(t,[{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(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)}},{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(t){t.keyCode!==Dy&&t.keyCode!==Iy||Ny(t)||(this._selectViaInteraction(),t.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 t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new GC(this,t))}},{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(t){this._disabled=lg(t)}},{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()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(void 0),ss(UC))},t.\u0275dir=de({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t}(),$C=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a){return g(this,n),e.call(this,t,i,r,a)}return n}(ZC);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(KC,8),ss(WC,8))},t.\u0275cmp=oe({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&_s("click",function(){return e._selectViaInteraction()})("keydown",function(t){return e._handleKeydown(t)}),2&t&&(tl("id",e.id),is("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),js("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[qo],ngContentSelectors:nC,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(t,e){1&t&&(As(),as(0,eC,1,2,"mat-pseudo-checkbox",0),cs(1,"span",1),Ds(2),hs(),ds(3,"div",2)),2&t&&(ls("ngIf",e.multiple),Aa(3),ls("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[Th,NC,jC],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}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t}();function XC(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),a=0,o=0;on+i?Math.max(0,t-i+e):n}var JC=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[VC,Yh,sC,BC]]}),t}();function tS(t,e){}var eS=function t(){g(this,t),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},nS={dialogContainer:lb("dialogContainer",[db("void, exit",hb({opacity:0,transform:"scale(0.7)"})),db("enter",hb({transform:"none"})),pb("* => enter",ub("150ms cubic-bezier(0, 0, 0.2, 1)",hb({transform:"none",opacity:1}))),pb("* => void, * => exit",ub("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",hb({opacity:0})))])},iS=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s){var l;return g(this,n),(l=e.call(this))._elementRef=t,l._focusTrapFactory=i,l._changeDetectorRef=r,l._config=o,l._focusMonitor=s,l._animationStateChanged=new Ru,l._elementFocusedBeforeDialogWasOpened=null,l._closeInteractionType=null,l.attachDomPortal=function(t){return l._portalOutlet.hasAttached(),l._portalOutlet.attachDomPortal(t)},l._ariaLabelledBy=o.ariaLabelledBy||null,l._document=a,l}return v(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){var e=this._document.activeElement,n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}]),n}(_y);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(z_),ss(Kl),ss(ah,8),ss(eS),ss($_))},t.\u0275dir=de({type:t,viewQuery:function(t,e){var n;1&t&&Wu(wy,!0),2&t&&qu(n=Xu())&&(e._portalOutlet=n.first)},features:[qo]}),t}(),rS=function(){var t=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._state="enter",t}return v(n,[{key:"_onAnimationDone",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===e&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==e&&"void"!==e||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(iS);return t.\u0275fac=function(e){return aS(e||t)},t.\u0275cmp=oe({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&bs("@dialogContainer.start",function(t){return e._onAnimationStart(t)})("@dialogContainer.done",function(t){return e._onAnimationDone(t)}),2&t&&(tl("id",e._id),is("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),el("@dialogContainer",e._state))},features:[qo],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&as(0,tS,0,0,"ng-template",0)},directives:[wy],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[nS.dialogContainer]}}),t}(),aS=vi(rS),oS=0,sS=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-".concat(oS++);g(this,t),this._overlayRef=e,this._containerInstance=n,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new q,this._afterClosed=new q,this._beforeClosed=new q,this._state=0,n._id=r,n._animationStateChanged.pipe(Td(function(t){return"opened"===t.state}),Rf(1)).subscribe(function(){i._afterOpened.next(),i._afterOpened.complete()}),n._animationStateChanged.pipe(Td(function(t){return"closed"===t.state}),Rf(1)).subscribe(function(){clearTimeout(i._closeFallbackTimeout),i._finishDialogClose()}),e.detachments().subscribe(function(){i._beforeClosed.next(i._result),i._beforeClosed.complete(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()}),e.keydownEvents().pipe(Td(function(t){return t.keyCode===Oy&&!i.disableClose&&!Ny(t)})).subscribe(function(t){t.preventDefault(),lS(i,"keyboard")}),e.backdropClick().subscribe(function(){i.disableClose?i._containerInstance._recaptureFocus():lS(i,"mouse")})}return v(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Td(function(t){return"closing"===t.state}),Rf(1)).subscribe(function(n){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop(),e._closeFallbackTimeout=setTimeout(function(){return e._finishDialogClose()},n.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(t){return this._overlayRef.addPanelClass(t),this}},{key:"removePanelClass",value:function(t){return this._overlayRef.removePanelClass(t),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),t}();function lS(t,e,n){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(n)}var uS=new bi("MatDialogData"),cS=new bi("mat-dialog-default-options"),hS=new bi("mat-dialog-scroll-strategy"),dS={provide:hS,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},fS=function(){var t=function(){function t(e,n,i,r,a,o,s,l,u){var c=this;g(this,t),this._overlay=e,this._injector=n,this._defaultOptions=i,this._parentDialog=r,this._overlayContainer=a,this._dialogRefConstructor=s,this._dialogContainerType=l,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new q,this._afterOpenedAtThisLevel=new q,this._ariaHiddenElements=new Map,this.afterAllClosed=Af(function(){return c.openDialogs.length?c._getAfterAllClosed():c._getAfterAllClosed().pipe(Ff(void 0))}),this._scrollStrategy=o}return v(t,[{key:"_getAfterAllClosed",value:function(){var t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(t,e){var n=this;(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new eS)).id&&this.getDialogById(e.id);var i=this._createOverlay(e),r=this._attachDialogContainer(i,e),a=this._attachDialogContent(t,r,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.afterClosed().subscribe(function(){return n._removeOpenDialog(a)}),this.afterOpened.next(a),r._initializeWithAttachedContent(),a}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(t){return this.openDialogs.find(function(e){return e.id===t})}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)}},{key:"_getOverlayConfig",value:function(t){var e=new Yy({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}},{key:"_attachDialogContainer",value:function(t,e){var n=Ho.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:eS,useValue:e}]}),i=new vy(this._dialogContainerType,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var r=new this._dialogRefConstructor(n,e,i.id);if(t instanceof eu)e.attachTemplatePortal(new gy(t,null,{$implicit:i.data,dialogRef:r}));else{var a=this._createInjector(i,r,e),o=e.attachComponentPortal(new vy(t,i.viewContainerRef,a));r.componentInstance=o.instance}return r.updateSize(i.width,i.height).updatePosition(i.position),r}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||i&&i.get(ry,null)||r.push({provide:ry,useValue:{value:t.direction,change:Od()}}),Ho.create({parent:i||this._injector,providers:r})}},{key:"_removeOpenDialog",value:function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(t){for(var e=t.length;e--;)t[e].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(h_),ss(Ho),ss(void 0),ss(void 0),ss(Jy),ss(void 0),ss(wi),ss(wi),ss(bi))},t.\u0275dir=de({type:t}),t}(),pS=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s,l){return g(this,n),e.call(this,t,i,a,s,l,o,sS,rS,uS)}return n}(fS);return t.\u0275fac=function(e){return new(e||t)(Ui(h_),Ui(Ho),Ui(bh,8),Ui(cS,8),Ui(hS),Ui(t,12),Ui(Jy))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),mS=0,vS=function(){var t=function(){function t(e,n,i){g(this,t),this.dialogRef=e,this._elementRef=n,this._dialog=i,this.type="button"}return v(t,[{key:"ngOnInit",value:function(){this.dialogRef||(this.dialogRef=bS(this._elementRef,this._dialog.openDialogs))}},{key:"ngOnChanges",value:function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}},{key:"_onButtonClick",value:function(t){lS(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(sS,8),ss(xl),ss(pS))},t.\u0275dir=de({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&_s("click",function(t){return e._onButtonClick(t)}),2&t&&is("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Ie]}),t}(),gS=function(){var t=function(){function t(e,n,i){g(this,t),this._dialogRef=e,this._elementRef=n,this._dialog=i,this.id="mat-dialog-title-".concat(mS++)}return v(t,[{key:"ngOnInit",value:function(){var t=this;this._dialogRef||(this._dialogRef=bS(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(function(){var e=t._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=t.id)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(sS,8),ss(xl),ss(pS))},t.\u0275dir=de({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&tl("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t}(),yS=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t}(),_S=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t}();function bS(t,e){for(var n=t.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?e.find(function(t){return t.id===n.id}):null}var kS=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[pS,dS],imports:[[g_,xy,sC],sC]}),t}();function wS(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var CS=["mat-button",""],SS=["*"],xS=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",ES=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],AS=uC(lC(cC(function t(e){g(this,t),this._elementRef=e}))),DS=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;g(this,n),(a=e.call(this,t))._focusMonitor=i,a._animationMode=r,a.isRoundButton=a._hasHostAttributes("mat-fab","mat-mini-fab"),a.isIconButton=a._hasHostAttributes("mat-icon-button");var o,s=c(ES);try{for(s.s();!(o=s.n()).done;){var l=o.value;a._hasHostAttributes(l)&&a._getHostElement().classList.add(l)}}catch(u){s.e(u)}finally{s.f()}return t.nativeElement.classList.add("mat-button-base"),a.isRoundButton&&(a.color="accent"),a}return v(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),t,e)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&(this.dialogRef.afterClosed().subscribe(function(e){t.closed()}),this.setExtra(this.data.autoclose),this.subscription=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tg;return(!Fg(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Tg),new j(function(n){return n.add(e.schedule(wS,t,{subscriber:n,counter:0,period:t})),n})}(1e3).subscribe(function(e){var n=t.data.autoclose-1e3*(e+1);t.setExtra(n),n<=0&&t.close()}))},t.prototype.initYesNo=function(){},t.prototype.ngOnInit=function(){!0===this.data.warnOnYes&&(this.yesColor="warn",this.noColor="primary"),this.data.type===LS.yesno?this.initYesNo():this.initAlert()},t.\u0275fac=function(e){return new(e||t)(ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-modal"]],decls:8,vars:9,consts:[["mat-dialog-title","",3,"innerHtml"],[3,"innerHTML"],["mat-raised-button","","mat-dialog-close","",3,"click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"color","click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"click"],["mat-raised-button","","mat-dialog-close","",3,"color","click"]],template:function(t,e){1&t&&(ds(0,"h4",0),Au(1,"safeHtml"),ds(2,"mat-dialog-content",1),Au(3,"safeHtml"),cs(4,"mat-dialog-actions"),as(5,PS,4,1,"button",2),as(6,MS,3,1,"button",3),as(7,FS,3,1,"button",3),hs()),2&t&&(ls("innerHtml",Du(1,5,e.data.title),Dr),Aa(2),ls("innerHTML",Du(3,7,e.data.body),Dr),Aa(3),ls("ngIf",0==e.data.type),Aa(1),ls("ngIf",1==e.data.type),Aa(1),ls("ngIf",1==e.data.type))},directives:[gS,yS,_S,Th,DS,vS,TS],pipes:[RS],styles:[".uds-modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:left}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),VS=function(t){return t.TEXT="text",t.TEXTBOX="textbox",t.NUMERIC="numeric",t.PASSWORD="password",t.HIDDEN="hidden",t.CHOICE="choice",t.MULTI_CHOICE="multichoice",t.EDITLIST="editlist",t.CHECKBOX="checkbox",t.IMAGECHOICE="imgchoice",t.DATE="date",t.DATETIME="datetime",t.TAGLIST="taglist",t}({}),jS=function(){function t(){}return t.locateChoice=function(t,e){var n=e.gui.values.find(function(e){return e.id===t});if(void 0===n)try{n=e.gui.values[0]}catch(i){n={id:"",img:"",text:""}}return n},t}();function BS(t,e){return new j(function(n){var i=t.length;if(0!==i)for(var r=new Array(i),a=0,o=0,s=function(s){var l=it(t[s]),u=!1;n.add(l.subscribe({next:function(t){u||(u=!0,o++),r[s]=t},error:function(t){return n.error(t)},complete:function(){++a!==i&&u||(o===i&&n.next(e?e.reduce(function(t,e,n){return t[e]=r[n],t},{}):r),n.complete())}}))},l=0;lt?{max:{max:t,actual:e.value}}:null}}},{key:"required",value:function(t){return GS(t.value)?{required:!0}:null}},{key:"requiredTrue",value:function(t){return!0===t.value?null:{required:!0}}},{key:"email",value:function(t){return GS(t.value)||XS.test(t.value)?null:{email:!0}}},{key:"minLength",value:function(t){return function(e){return GS(e.value)||!KS(e.value)?null:e.value.lengtht?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}}},{key:"pattern",value:function(e){return e?("string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),n=new RegExp(i)):(i=e.toString(),n=e),function(t){if(GS(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:i,actualValue:e}}}):t.nullValidator;var n,i}},{key:"nullValidator",value:function(t){return null}},{key:"compose",value:function(t){if(!t)return null;var e=t.filter(JS);return 0==e.length?null:function(t){return ex(nx(t,e))}}},{key:"composeAsync",value:function(t){if(!t)return null;var e=t.filter(JS);return 0==e.length?null:function(t){return function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;this.control&&this.control.reset(t)}},{key:"hasError",value:function(t,e){return!!this.control&&this.control.hasError(t,e)}},{key:"getError",value:function(t,e){return this.control?this.control.getError(t,e):null}},{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:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t}),t}(),cx=function(){var t=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(ux);return t.\u0275fac=function(e){return hx(e||t)},t.\u0275dir=de({type:t,features:[qo]}),t}(),hx=vi(cx),dx=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t}return n}(ux),fx=function(){function t(e){g(this,t),this._cd=e}return v(t,[{key:"ngClassUntouched",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.untouched)&&void 0!==n&&n}},{key:"ngClassTouched",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.touched)&&void 0!==n&&n}},{key:"ngClassPristine",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.pristine)&&void 0!==n&&n}},{key:"ngClassDirty",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.dirty)&&void 0!==n&&n}},{key:"ngClassValid",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.valid)&&void 0!==n&&n}},{key:"ngClassInvalid",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.invalid)&&void 0!==n&&n}},{key:"ngClassPending",get:function(){var t,e,n;return null!==(n=null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e?void 0:e.pending)&&void 0!==n&&n}}]),t}(),px=function(){var t=function(t){y(n,t);var e=k(n);function n(t){return g(this,n),e.call(this,t)}return n}(fx);return t.\u0275fac=function(e){return new(e||t)(ss(dx,2))},t.\u0275dir=de({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&js("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[qo]}),t}(),mx=function(){var t=function(t){y(n,t);var e=k(n);function n(t){return g(this,n),e.call(this,t)}return n}(fx);return t.\u0275fac=function(e){return new(e||t)(ss(cx,10))},t.\u0275dir=de({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&js("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[qo]}),t}(),vx={provide:zS,useExisting:xt(function(){return gx}),multi:!0},gx=function(){var t=function(){function t(e,n){g(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return v(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Al),ss(xl))},t.\u0275dir=de({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&_s("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[gl([vx])]}),t}(),yx={provide:zS,useExisting:xt(function(){return bx}),multi:!0},_x=function(){var t=function(){function t(){g(this,t),this._accessors=[]}return v(t,[{key:"add",value:function(t,e){this._accessors.push([t,e])}},{key:"remove",value:function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}},{key:"select",value:function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})}},{key:"_isSameGroup",value:function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),bx=function(){var t=function(){function t(e,n,i,r){g(this,t),this._renderer=e,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return v(t,[{key:"ngOnInit",value:function(){this._control=this._injector.get(dx),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}}},{key:"fireUncheck",value:function(t){this.writeValue(t)}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Al),ss(xl),ss(_x),ss(Ho))},t.\u0275dir=de({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&_s("change",function(){return e.onChange()})("blur",function(){return e.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[gl([yx])]}),t}(),kx={provide:zS,useExisting:xt(function(){return wx}),multi:!0},wx=function(){var t=function(){function t(e,n){g(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return v(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Al),ss(xl))},t.\u0275dir=de({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&_s("change",function(t){return e.onChange(t.target.value)})("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[gl([kx])]}),t}(),Cx={provide:zS,useExisting:xt(function(){return Sx}),multi:!0},Sx=function(){var t=function(){function t(e,n){g(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Object.is}return v(t,[{key:"writeValue",value:function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=function(t,e){return null==t?"".concat(e):(e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(t){for(var e=0,n=Array.from(this._optionMap.keys());e-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){var i=[];if(void 0!==n.selectedOptions)for(var r=n.selectedOptions,a=0;a0&&t.setValidators(i.filter(function(t){return t!==e.validator}))}if(null!==e.asyncValidator){var r=lx(t);Array.isArray(r)&&r.length>0&&t.setAsyncValidators(r.filter(function(t){return t!==e.asyncValidator}))}}if(n){var a=function(){};Dx(e._rawValidators,a),Dx(e._rawAsyncValidators,a)}}function Tx(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Rx(t,e){Ox(t,e,!1)}var Px=[US,wx,gx,Sx,Ex,bx];function Mx(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function Fx(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Lx="VALID",Nx="INVALID",Vx="PENDING",jx="DISABLED";function Bx(t){return(qx(t)?t.validators:t)||null}function zx(t){return Array.isArray(t)?rx(t):t||null}function Hx(t,e){return(qx(e)?e.asyncValidators:t)||null}function Ux(t){return Array.isArray(t)?ax(t):t||null}function qx(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var Wx=function(){function t(e,n){g(this,t),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=zx(this._rawValidators),this._composedAsyncValidatorFn=Ux(this._rawAsyncValidators)}return v(t,[{key:"setValidators",value:function(t){this._rawValidators=t,this._composedValidatorFn=zx(t)}},{key:"setAsyncValidators",value:function(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=Ux(t)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(t){return t.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"markAsDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}},{key:"markAsPristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"markAsPending",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status=Vx,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}},{key:"disable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=jx,this.errors=null,this._forEachChild(function(e){e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(function(t){return t(!0)})}},{key:"enable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=Lx,this._forEachChild(function(e){e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(function(t){return t(!1)})}},{key:"_updateAncestors",value:function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(t){this._parent=t}},{key:"updateValueAndValidity",value:function(){var t=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!==Lx&&this.status!==Vx||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}},{key:"_updateTreeValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?jx:Lx}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(t){var e=this;if(this.asyncValidator){this.status=Vx,this._hasOwnPendingAsyncValidator=!0;var n=tx(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){e._hasOwnPendingAsyncValidator=!1,e.setErrors(n,{emitEvent:t})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}},{key:"get",value:function(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;var i=t;return e.forEach(function(t){i=i instanceof Gx?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof Kx&&i.at(t)||null}),i}(this,t)}},{key:"getError",value:function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}},{key:"hasError",value:function(t,e){return!!this.getError(t,e)}},{key:"_updateControlsErrors",value:function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}},{key:"_initObservables",value:function(){this.valueChanges=new Ru,this.statusChanges=new Ru}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?jx:this.errors?Nx:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Vx)?Vx:this._anyControlsHaveStatus(Nx)?Nx:Lx}},{key:"_anyControlsHaveStatus",value:function(t){return this._anyControls(function(e){return e.status===t})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(t){return t.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(t){return t.touched})}},{key:"_updatePristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"_updateTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"_isBoxedValue",value:function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}},{key:"_registerOnCollectionChange",value:function(t){this._onCollectionChange=t}},{key:"_setUpdateStrategy",value:function(t){qx(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(t){this._rawValidators=this._composedValidatorFn=t}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===Lx}},{key:"invalid",get:function(){return this.status===Nx}},{key:"pending",get:function(){return this.status==Vx}},{key:"disabled",get:function(){return this.status===jx}},{key:"enabled",get:function(){return this.status!==jx}},{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:"root",get:function(){for(var t=this;t._parent;)t=t._parent;return t}}]),t}(),Yx=function(t){y(n,t);var e=k(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return g(this,n),(t=e.call(this,Bx(r),Hx(a,r)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(r),t._initObservables(),t.updateValueAndValidity({onlySelf:!0,emitEvent:!!a}),t}return v(n,[{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(function(t){return t(e.value,!1!==n.emitViewToModelChange)}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(t,e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(t){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(t){this._onChange.push(t)}},{key:"_unregisterOnChange",value:function(t){Fx(this._onChange,t)}},{key:"registerOnDisabledChange",value:function(t){this._onDisabledChange.push(t)}},{key:"_unregisterOnDisabledChange",value:function(t){Fx(this._onDisabledChange,t)}},{key:"_forEachChild",value:function(t){}},{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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}]),n}(Wx),Gx=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,Bx(i),Hx(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),a}return v(n,[{key:"registerControl",value:function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}},{key:"addControl",value:function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),Object.keys(t).forEach(function(i){e._throwIfControlMissing(i),e.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(function(i){e.controls[i]&&e.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof Yx?e.value:e.getRawValue(),t})}},{key:"_syncPendingControls",value:function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){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[t])throw new Error("Cannot find form control with name: ".concat(t,"."))}},{key:"_forEachChild",value:function(t){var e=this;Object.keys(this.controls).forEach(function(n){return t(e.controls[n],n)})}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(t){for(var e=0,n=Object.keys(this.controls);e0||this.disabled}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))})}}]),n}(Wx),Kx=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,Bx(i),Hx(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),a}return v(n,[{key:"at",value:function(t){return this.controls[t]}},{key:"push",value:function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}},{key:"removeAt",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),t.forEach(function(t,i){e._throwIfControlMissing(i),e.at(i).setValue(t,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach(function(t,i){e.at(i)&&e.at(i).patchValue(t,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this.controls.map(function(t){return t instanceof Yx?t.value:t.getRawValue()})}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild(function(t){return t._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){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(t))throw new Error("Cannot find form control at index ".concat(t))}},{key:"_forEachChild",value:function(t){this.controls.forEach(function(e,n){t(e,n)})}},{key:"_updateValue",value:function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})}},{key:"_anyControls",value:function(t){return this.controls.some(function(e){return e.enabled&&t(e)})}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))})}},{key:"_allControlsDisabled",value:function(){var t,e=c(this.controls);try{for(e.s();!(t=e.n()).done;)if(t.value.enabled)return!1}catch(n){e.e(n)}finally{e.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(Wx),Zx={provide:cx,useExisting:xt(function(){return Xx})},$x=function(){return Promise.resolve(null)}(),Xx=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new Ru,r.form=new Gx({},rx(t),ax(i)),r}return v(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;$x.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),Ax(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){var e=this;$x.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),Fx(e._directives,t)})}},{key:"addFormGroup",value:function(t){var e=this;$x.then(function(){var n=e._findContainer(t.path),i=new Gx({});Rx(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(t){var e=this;$x.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){var n=this;$x.then(function(){n.form.get(t.path).setValue(e)})}},{key:"setValue",value:function(t){this.control.setValue(t)}},{key:"onSubmit",value:function(t){return this.submitted=!0,Mx(this.form,this._directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(t){return t.pop(),t.length?this.form.get(t):this.form}},{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}}]),n}(cx);return t.\u0275fac=function(e){return new(e||t)(ss(ZS,10),ss($S,10))},t.\u0275dir=de({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&_s("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[gl([Zx]),qo]}),t}(),Qx={provide:dx,useExisting:xt(function(){return tE})},Jx=function(){return Promise.resolve(null)}(),tE=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,o){var s;return g(this,n),(s=e.call(this)).control=new Yx,s._registered=!1,s.update=new Ru,s._parent=t,s._setValidators(i),s._setAsyncValidators(r),s.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e);var n=void 0,i=void 0,r=void 0;return e.forEach(function(t){var e;t.constructor===YS?n=t:(e=t,Px.some(function(t){return e.constructor===t})?i=t:r=t)}),r||i||n||null}(a(s),o),s}return v(n,[{key:"ngOnChanges",value:function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{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(){Ax(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(t){var e=this;Jx.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;Jx.then(function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()})}},{key:"path",get:function(){return this._parent?(t=this.name,[].concat(h(this._parent.path),[t])):[this.name];var t}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(dx);return t.\u0275fac=function(e){return new(e||t)(ss(cx,9),ss(ZS,10),ss($S,10),ss(zS,10))},t.\u0275dir=de({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[gl([Qx]),qo,Ie]}),t}(),eE=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t}(),nE=new bi("NgModelWithFormControlWarning"),iE={provide:cx,useExisting:xt(function(){return rE})},rE=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this)).validators=t,r.asyncValidators=i,r.submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new Ru,r._setValidators(t),r._setAsyncValidators(i),r}return v(n,[{key:"ngOnChanges",value:function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"addControl",value:function(t){var e=this.form.get(t.path);return Ax(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){Fx(this.directives,t)}},{key:"addFormGroup",value:function(t){var e=this.form.get(t.path);Rx(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(t){}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"addFormArray",value:function(t){var e=this.form.get(t.path);Rx(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(t){}},{key:"getFormArray",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){this.form.get(t.path).setValue(e)}},{key:"onSubmit",value:function(t){return this.submitted=!0,Mx(this.form,this.directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_updateDomValue",value:function(){var t=this;this.directives.forEach(function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){var n=function(){};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),Ix(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(function(){}))}(e.control||null,e),n&&Ax(n,e),e.control=n)}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var t=this;this.form._registerOnCollectionChange(function(){return t._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){Ox(this.form,this,!1),this._oldForm&&Ix(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(cx);return t.\u0275fac=function(e){return new(e||t)(ss(ZS,10),ss($S,10))},t.\u0275dir=de({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&_s("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[gl([iE]),qo,Ie]}),t}(),aE={provide:ZS,useExisting:xt(function(){return sE}),multi:!0},oE={provide:ZS,useExisting:xt(function(){return lE}),multi:!0},sE=function(){var t=function(){function t(){g(this,t),this._required=!1}return v(t,[{key:"validate",value:function(t){return this.required?QS.required(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"required",get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&"false"!=="".concat(t),this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&is("required",e.required?"":null)},inputs:{required:"required"},features:[gl([aE])]}),t}(),lE=function(){var t=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return v(n,[{key:"validate",value:function(t){return this.required?QS.requiredTrue(t):null}}]),n}(sE);return t.\u0275fac=function(e){return uE(e||t)},t.\u0275dir=de({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&is("required",e.required?"":null)},features:[gl([oE]),qo]}),t}(),uE=vi(lE),cE={provide:ZS,useExisting:xt(function(){return hE}),multi:!0},hE=function(){var t=function(){function t(){g(this,t),this._validator=QS.nullValidator}return v(t,[{key:"ngOnChanges",value:function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null!=this.maxlength?this._validator(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=QS.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&is("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[gl([cE]),Ie]}),t}(),dE=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}();function fE(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}var pE=function(){var t=function(){function t(){g(this,t)}return v(t,[{key:"group",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(t),i=null,r=null,a=void 0;return null!=e&&(fE(e)?(i=null!=e.validators?e.validators:null,r=null!=e.asyncValidators?e.asyncValidators:null,a=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,r=null!=e.asyncValidator?e.asyncValidator:null)),new Gx(n,{asyncValidators:r,updateOn:a,validators:i})}},{key:"control",value:function(t,e,n){return new Yx(t,e,n)}},{key:"array",value:function(t,e,n){var i=this,r=t.map(function(t){return i._createControl(t)});return new Kx(r,e,n)}},{key:"_reduceControls",value:function(t){var e=this,n={};return Object.keys(t).forEach(function(i){n[i]=e._createControl(t[i])}),n}},{key:"_createControl",value:function(t){return t instanceof Yx||t instanceof Gx||t instanceof Kx?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),mE=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[_x],imports:[dE]}),t}(),vE=function(){var t=function(){function t(){g(this,t)}return v(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:nE,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}();return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[pE,_x],imports:[dE]}),t}();function gE(t,e){1&t&&Ds(0)}var yE=["*"];function _E(t,e){}var bE=function(t){return{animationDuration:t}},kE=function(t,e){return{value:t,params:e}},wE=["tabBodyWrapper"],CE=["tabHeader"];function SE(t,e){}function xE(t,e){1&t&&as(0,SE,0,0,"ng-template",9),2&t&&ls("cdkPortalOutlet",xs().$implicit.templateLabel)}function EE(t,e){1&t&&$s(0),2&t&&Xs(xs().$implicit.textLabel)}function AE(t,e){if(1&t){var n=vs();cs(0,"div",6),_s("click",function(){nn(n);var t=e.$implicit,i=e.index,r=xs(),a=os(1);return r._handleClick(t,a,i)}),cs(1,"div",7),as(2,xE,1,1,"ng-template",8),as(3,EE,1,1,"ng-template",8),hs(),hs()}if(2&t){var i=e.$implicit,r=e.index,a=xs();js("mat-tab-label-active",a.selectedIndex==r),ls("id",a._getTabLabelId(r))("disabled",i.disabled)("matRippleDisabled",i.disabled||a.disableRipple),is("tabIndex",a._getTabIndex(i,r))("aria-posinset",r+1)("aria-setsize",a._tabs.length)("aria-controls",a._getTabContentId(r))("aria-selected",a.selectedIndex==r)("aria-label",i.ariaLabel||null)("aria-labelledby",!i.ariaLabel&&i.ariaLabelledby?i.ariaLabelledby:null),Aa(2),ls("ngIf",i.templateLabel),Aa(1),ls("ngIf",!i.templateLabel)}}function DE(t,e){if(1&t){var n=vs();cs(0,"mat-tab-body",10),_s("_onCentered",function(){return nn(n),xs()._removeTabBodyWrapperHeight()})("_onCentering",function(t){return nn(n),xs()._setTabBodyWrapperHeight(t)}),hs()}if(2&t){var i=e.$implicit,r=e.index,a=xs();js("mat-tab-body-active",a.selectedIndex==r),ls("id",a._getTabContentId(r))("content",i.content)("position",i.position)("origin",i.origin)("animationDuration",a.animationDuration),is("aria-labelledby",a._getTabLabelId(r))}}var OE=["tabListContainer"],IE=["tabList"],TE=["nextPaginator"],RE=["previousPaginator"],PE=new bi("MatInkBarPositioner",{providedIn:"root",factory:function(){return function(t){return{left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"}}}}),ME=function(){var t=function(){function t(e,n,i,r){g(this,t),this._elementRef=e,this._ngZone=n,this._inkBarPositioner=i,this._animationMode=r}return v(t,[{key:"alignToElement",value:function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return e._setStyles(t)})}):this._setStyles(t)}},{key:"show",value:function(){this._elementRef.nativeElement.style.visibility="visible"}},{key:"hide",value:function(){this._elementRef.nativeElement.style.visibility="hidden"}},{key:"_setStyles",value:function(t){var e=this._inkBarPositioner(t),n=this._elementRef.nativeElement;n.style.left=e.left,n.style.width=e.width}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Cc),ss(PE),ss(Xw,8))},t.\u0275dir=de({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&js("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t}(),FE=new bi("MatTabContent"),LE=new bi("MatTabLabel"),NE=function(){var t=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return n}(ky);return t.\u0275fac=function(e){return VE(e||t)},t.\u0275dir=de({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[gl([{provide:LE,useExisting:t}]),qo]}),t}(),VE=vi(NE),jE=lC(function t(){g(this,t)}),BE=new bi("MAT_TAB_GROUP"),zE=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this))._viewContainerRef=t,r._closestTabGroup=i,r.textLabel="",r._contentPortal=null,r._stateChanges=new q,r.position=null,r.origin=null,r.isActive=!1,r}return v(n,[{key:"ngOnChanges",value:function(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"ngOnInit",value:function(){this._contentPortal=new gy(this._explicitContent||this._implicitContent,this._viewContainerRef)}},{key:"_setTemplateLabelInput",value:function(t){t&&(this._templateLabel=t)}},{key:"templateLabel",get:function(){return this._templateLabel},set:function(t){this._setTemplateLabelInput(t)}},{key:"content",get:function(){return this._contentPortal}}]),n}(jE);return t.\u0275fac=function(e){return new(e||t)(ss(su),ss(BE))},t.\u0275cmp=oe({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,n){var i;1&t&&(Ku(n,LE,!0),Zu(n,FE,!0,eu)),2&t&&(qu(i=Xu())&&(e.templateLabel=i.first),qu(i=Xu())&&(e._explicitContent=i.first))},viewQuery:function(t,e){var n;1&t&&Wu(eu,!0),2&t&&qu(n=Xu())&&(e._implicitContent=n.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[qo,Ie],ngContentSelectors:yE,decls:1,vars:0,template:function(t,e){1&t&&(As(),as(0,gE,1,0,"ng-template"))},encapsulation:2}),t}(),HE={translateTab:lb("translateTab",[db("center, void, left-origin-center, right-origin-center",hb({transform:"none"})),db("left",hb({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),db("right",hb({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),pb("* => left, * => right, left => center, right => center",ub("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),pb("void => left-origin-center",[hb({transform:"translate3d(-100%, 0, 0)"}),ub("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),pb("void => right-origin-center",[hb({transform:"translate3d(100%, 0, 0)"}),ub("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},UE=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t,i,a))._host=r,o._centeringSub=A.EMPTY,o._leavingSub=A.EMPTY,o}return v(n,[{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._centeringSub=this._host._beforeCentering.pipe(Ff(this._host._isCenterPosition(this._host._position))).subscribe(function(e){e&&!t.hasAttached()&&t.attach(t._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(function(){t.detach()})}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"ngOnDestroy",this).call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}]),n}(wy);return t.\u0275fac=function(e){return new(e||t)(ss(kl),ss(su),ss(xt(function(){return WE})),ss(ah))},t.\u0275dir=de({type:t,selectors:[["","matTabBodyHost",""]],features:[qo]}),t}(),qE=function(){var t=function(){function t(e,n,i){var r=this;g(this,t),this._elementRef=e,this._dir=n,this._dirChangeSubscription=A.EMPTY,this._translateTabComplete=new q,this._onCentering=new Ru,this._beforeCentering=new Ru,this._afterLeavingCenter=new Ru,this._onCentered=new Ru(!0),this.animationDuration="500ms",n&&(this._dirChangeSubscription=n.change.subscribe(function(t){r._computePositionAnimationState(t),i.markForCheck()})),this._translateTabComplete.pipe(Dg(function(t,e){return t.fromState===e.fromState&&t.toState===e.toState})).subscribe(function(t){r._isCenterPosition(t.toState)&&r._isCenterPosition(r._position)&&r._onCentered.emit(),r._isCenterPosition(t.fromState)&&!r._isCenterPosition(r._position)&&r._afterLeavingCenter.emit()})}return v(t,[{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(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_isCenterPosition",value:function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}},{key:"_computePositionAnimationState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLayoutDirection();this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}},{key:"_computePositionFromOrigin",value:function(t){var e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}},{key:"position",set:function(t){this._positionIndex=t,this._computePositionAnimationState()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(ry,8),ss(Kl))},t.\u0275dir=de({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t}(),WE=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){return g(this,n),e.call(this,t,i,r)}return n}(qE);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(ry,8),ss(Kl))},t.\u0275cmp=oe({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var n;1&t&&Yu(Cy,!0),2&t&&qu(n=Xu())&&(e._portalHost=n.first)},hostAttrs:[1,"mat-tab-body"],features:[qo],decls:3,vars:6,consts:[[1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(cs(0,"div",0,1),_s("@translateTab.start",function(t){return e._onTranslateTabStarted(t)})("@translateTab.done",function(t){return e._translateTabComplete.next(t)}),as(2,_E,0,0,"ng-template",2),hs()),2&t&&ls("@translateTab",Cu(3,kE,e._position,wu(1,bE,e.animationDuration)))},directives:[UE],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:[HE.translateTab]}}),t}(),YE=new bi("MAT_TABS_CONFIG"),GE=0,KE=function t(){g(this,t)},ZE=uC(cC(function t(e){g(this,t),this._elementRef=e}),"primary"),$E=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a){var o;return g(this,n),(o=e.call(this,t))._changeDetectorRef=i,o._animationMode=a,o._tabs=new Mu,o._indexToSelect=0,o._tabBodyWrapperHeight=0,o._tabsSubscription=A.EMPTY,o._tabLabelSubscription=A.EMPTY,o._selectedIndex=null,o.headerPosition="above",o.selectedIndexChange=new Ru,o.focusChange=new Ru,o.animationDone=new Ru,o.selectedTabChange=new Ru(!0),o._groupId=GE++,o.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",o.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,o.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,o}return v(n,[{key:"ngAfterContentChecked",value:function(){var t=this,e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){var n=null==this._selectedIndex;n||this.selectedTabChange.emit(this._createChangeEvent(e)),Promise.resolve().then(function(){t._tabs.forEach(function(t,n){return t.isActive=n===e}),n||t.selectedIndexChange.emit(e)})}this._tabs.forEach(function(n,i){n.position=i-e,null==t._selectedIndex||0!=n.position||n.origin||(n.origin=e-t._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())}},{key:"ngAfterContentInit",value:function(){var t=this;this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(function(){if(t._clampTabIndex(t._indexToSelect)===t._selectedIndex)for(var e=t._tabs.toArray(),n=0;n.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;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}),t}(),QE=lC(function t(){g(this,t)}),JE=function(){var t=function(t){y(n,t);var e=k(n);function n(t){var i;return g(this,n),(i=e.call(this)).elementRef=t,i}return v(n,[{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}}]),n}(QE);return t.\u0275fac=function(e){return new(e||t)(ss(xl))},t.\u0275dir=de({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(is("aria-disabled",!!e.disabled),js("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[qo]}),t}(),tA=ty({passive:!0}),eA=function(){var t=function(){function t(e,n,i,r,a,o,s){var l=this;g(this,t),this._elementRef=e,this._changeDetectorRef=n,this._viewportRuler=i,this._dir=r,this._ngZone=a,this._platform=o,this._animationMode=s,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new q,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new q,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new Ru,this.indexFocused=new Ru,a.runOutsideAngular(function(){mg(e.nativeElement,"mouseleave").pipe(jg(l._destroyed)).subscribe(function(){l._stopInterval()})})}return v(t,[{key:"ngAfterViewInit",value:function(){var t=this;mg(this._previousPaginator.nativeElement,"touchstart",tA).pipe(jg(this._destroyed)).subscribe(function(){t._handlePaginatorPress("before")}),mg(this._nextPaginator.nativeElement,"touchstart",tA).pipe(jg(this._destroyed)).subscribe(function(){t._handlePaginatorPress("after")})}},{key:"ngAfterContentInit",value:function(){var t=this,e=this._dir?this._dir.change:Od(null),n=this._viewportRuler.change(150),i=function(){t.updatePagination(),t._alignInkBarToSelectedTab()};this._keyManager=new L_(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),dt(e,n,this._items.changes).pipe(jg(this._destroyed)).subscribe(function(){Promise.resolve().then(i),t._keyManager.withHorizontalOrientation(t._getLayoutDirection())}),this._keyManager.change.pipe(jg(this._destroyed)).subscribe(function(e){t.indexFocused.emit(e),t._setTabFocus(e)})}},{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(t){if(!Ny(t))switch(t.keyCode){case Dy:case Iy:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}},{key:"_onContentChanges",value:function(){var t=this,e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(function(){t.updatePagination(),t._alignInkBarToSelectedTab(),t._changeDetectorRef.markForCheck()}))}},{key:"updatePagination",value:function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}},{key:"_isValidIndex",value:function(t){if(!this._items)return!0;var e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}},{key:"_setTabFocus",value:function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();var e=this._tabListContainer.nativeElement,n=this._getLayoutDirection();e.scrollLeft="ltr"==n?0:e.scrollWidth-e.offsetWidth}}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_updateTabScrollPosition",value:function(){if(!this.disablePagination){var t=this.scrollDistance,e="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translateX(".concat(Math.round(e),"px)"),(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}}},{key:"_scrollHeader",value:function(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}},{key:"_handlePaginatorClick",value:function(t){this._stopInterval(),this._scrollHeader(t)}},{key:"_scrollToLabel",value:function(t){if(!this.disablePagination){var e=this._items?this._items.toArray()[t]:null;if(e){var n,i,r=this._tabListContainer.nativeElement.offsetWidth,a=e.elementRef.nativeElement,o=a.offsetLeft,s=a.offsetWidth;"ltr"==this._getLayoutDirection()?i=(n=o)+s:n=(i=this._tabList.nativeElement.offsetWidth-o)-s;var l=this.scrollDistance,u=this.scrollDistance+r;nu&&(this.scrollDistance+=i-u+60)}}}},{key:"_checkPaginationEnabled",value:function(){if(this.disablePagination)this._showPaginationControls=!1;else{var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}},{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 t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}},{key:"_stopInterval",value:function(){this._stopScrolling.next()}},{key:"_handlePaginatorPress",value:function(t,e){var n=this;e&&null!=e.button&&0!==e.button||(this._stopInterval(),Lg(650,100).pipe(jg(dt(this._stopScrolling,this._destroyed))).subscribe(function(){var e=n._scrollHeader(t),i=e.distance;(0===i||i>=e.maxScrollDistance)&&n._stopInterval()}))}},{key:"_scrollTo",value:function(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};var e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(t){t=ug(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}},{key:"focusIndex",get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}},{key:"scrollDistance",get:function(){return this._scrollDistance},set:function(t){this._scrollTo(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(dy),ss(ry,8),ss(Cc),ss($g),ss(Xw,8))},t.\u0275dir=de({type:t,inputs:{disablePagination:"disablePagination"}}),t}(),nA=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s,l){var u;return g(this,n),(u=e.call(this,t,i,r,a,o,s,l))._disableRipple=!1,u}return v(n,[{key:"_itemSelected",value:function(t){t.preventDefault()}},{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=lg(t)}}]),n}(eA);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(dy),ss(ry,8),ss(Cc),ss($g),ss(Xw,8))},t.\u0275dir=de({type:t,inputs:{disableRipple:"disableRipple"},features:[qo]}),t}(),iA=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s,l){return g(this,n),e.call(this,t,i,r,a,o,s,l)}return n}(nA);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(dy),ss(ry,8),ss(Cc),ss($g),ss(Xw,8))},t.\u0275cmp=oe({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,n){var i;1&t&&Ku(n,JE,!1),2&t&&qu(i=Xu())&&(e._items=i)},viewQuery:function(t,e){var n;1&t&&(Wu(ME,!0),Wu(OE,!0),Wu(IE,!0),Yu(TE,!0),Yu(RE,!0)),2&t&&(qu(n=Xu())&&(e._inkBar=n.first),qu(n=Xu())&&(e._tabListContainer=n.first),qu(n=Xu())&&(e._tabList=n.first),qu(n=Xu())&&(e._nextPaginator=n.first),qu(n=Xu())&&(e._previousPaginator=n.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&js("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[qo],ngContentSelectors:yE,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(t,e){1&t&&(As(),cs(0,"div",0,1),_s("click",function(){return e._handlePaginatorClick("before")})("mousedown",function(t){return e._handlePaginatorPress("before",t)})("touchend",function(){return e._stopInterval()}),ds(2,"div",2),hs(),cs(3,"div",3,4),_s("keydown",function(t){return e._handleKeydown(t)}),cs(5,"div",5,6),_s("cdkObserveContent",function(){return e._onContentChanges()}),cs(7,"div",7),Ds(8),hs(),ds(9,"mat-ink-bar"),hs(),hs(),cs(10,"div",8,9),_s("mousedown",function(t){return e._handlePaginatorPress("after",t)})("click",function(){return e._handlePaginatorClick("after")})("touchend",function(){return e._stopInterval()}),ds(12,"div",2),hs()),2&t&&(js("mat-tab-header-pagination-disabled",e._disableScrollBefore),ls("matRippleDisabled",e._disableScrollBefore||e.disableRipple),Aa(5),js("_mat-animation-noopable","NoopAnimations"===e._animationMode),Aa(5),js("mat-tab-header-pagination-disabled",e._disableScrollAfter),ls("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[NC,S_,ME],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}),t}(),rA=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Yh,sC,xy,VC,x_,ib],sC]}),t}();function aA(t,e){if(1&t){var n=vs();cs(0,"uds-field-text",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function oA(t,e){if(1&t){var n=vs();cs(0,"uds-field-textbox",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function sA(t,e){if(1&t){var n=vs();cs(0,"uds-field-numeric",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function lA(t,e){if(1&t){var n=vs();cs(0,"uds-field-password",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function uA(t,e){if(1&t){var n=vs();cs(0,"uds-field-hidden",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function cA(t,e){if(1&t){var n=vs();cs(0,"uds-field-choice",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function hA(t,e){if(1&t){var n=vs();cs(0,"uds-field-multichoice",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function dA(t,e){if(1&t){var n=vs();cs(0,"uds-field-editlist",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function fA(t,e){if(1&t){var n=vs();cs(0,"uds-field-checkbox",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function pA(t,e){if(1&t){var n=vs();cs(0,"uds-field-imgchoice",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function mA(t,e){if(1&t){var n=vs();cs(0,"uds-field-date",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}function vA(t,e){if(1&t){var n=vs();cs(0,"uds-field-tags",2),_s("changed",function(t){return nn(n),xs().changed.emit(t)}),hs()}2&t&&ls("field",xs().field)}var gA=function(){function t(){this.UDSGuiFieldType=VS,this.changed=new Ru}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:13,vars:14,consts:[["matTooltipShowDelay","1000",1,"field",3,"ngSwitch","matTooltip"],[3,"field","changed",4,"ngSwitchCase"],[3,"field","changed"]],template:function(t,e){1&t&&(cs(0,"div",0),as(1,aA,1,1,"uds-field-text",1),as(2,oA,1,1,"uds-field-textbox",1),as(3,sA,1,1,"uds-field-numeric",1),as(4,lA,1,1,"uds-field-password",1),as(5,uA,1,1,"uds-field-hidden",1),as(6,cA,1,1,"uds-field-choice",1),as(7,hA,1,1,"uds-field-multichoice",1),as(8,dA,1,1,"uds-field-editlist",1),as(9,fA,1,1,"uds-field-checkbox",1),as(10,pA,1,1,"uds-field-imgchoice",1),as(11,mA,1,1,"uds-field-date",1),as(12,vA,1,1,"uds-field-tags",1),hs()),2&t&&(ls("ngSwitch",e.field.gui.type)("matTooltip",e.field.gui.tooltip),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.TEXT),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.TEXTBOX),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.NUMERIC),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.PASSWORD),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.HIDDEN),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.CHOICE),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.MULTI_CHOICE),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.EDITLIST),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.CHECKBOX),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.IMAGECHOICE),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.DATE),Aa(1),ls("ngSwitchCase",e.UDSGuiFieldType.TAGLIST))},styles:["uds-field[_ngcontent-%COMP%]{flex:1 50%} .mat-form-field{width:calc(100% - 1px)} .mat-form-field-flex{padding-top:0!important} .mat-tooltip{font-size:.9rem!important;margin:0!important;max-width:26em!important}"]}),t}();function yA(t,e){1&t&&$s(0),2&t&&Qs(" ",xs().$implicit," ")}function _A(t,e){if(1&t){var n=vs();cs(0,"uds-field",7),_s("changed",function(t){return nn(n),xs(3).changed.emit(t)}),hs()}2&t&&ls("field",e.$implicit)}function bA(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,yA,1,1,"ng-template",4),cs(2,"div",5),as(3,_A,1,1,"uds-field",6),hs(),hs()),2&t){var n=e.$implicit,i=xs(2);Aa(3),ls("ngForOf",i.fieldsByTab[n])}}function kA(t,e){if(1&t&&(cs(0,"mat-tab-group",2),as(1,bA,4,1,"mat-tab",3),hs()),2&t){var n=xs();ls("disableRipple",!0)("@.disabled",!0),Aa(1),ls("ngForOf",n.tabs)}}function wA(t,e){if(1&t&&(cs(0,"div"),ds(1,"uds-field",8),hs()),2&t){var n=e.$implicit;Aa(1),ls("field",n)}}function CA(t,e){1&t&&as(0,wA,2,1,"div",3),2&t&&ls("ngForOf",xs().fields)}var SA=django.gettext("Main"),xA=function(){function t(){this.changed=new Ru}return t.prototype.ngOnInit=function(){var t=this;this.tabs=new Array,this.fieldsByTab={},this.fields.forEach(function(e){var n=void 0===e.gui.tab?SA:e.gui.tab;t.tabs.includes(n)||(t.tabs.push(n),t.fieldsByTab[n]=new Array),t.fieldsByTab[n].push(e)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-form"]],inputs:{fields:"fields"},outputs:{changed:"changed"},decls:3,vars:2,consts:[[3,"disableRipple",4,"ngIf","ngIfElse"],["onlyone",""],[3,"disableRipple"],[4,"ngFor","ngForOf"],["mat-tab-label",""],[1,"content"],[3,"field","changed",4,"ngFor","ngForOf"],[3,"field","changed"],[3,"field"]],template:function(t,e){if(1&t&&(as(0,kA,2,3,"mat-tab-group",0),as(1,CA,1,1,"ng-template",null,1,ec)),2&t){var n=os(2);ls("ngIf",e.tabs.length>1)("ngIfElse",n)}},directives:[Th,XE,Oh,zE,NE,gA],styles:[".content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap} .mat-form-field-wrapper{padding-bottom:1em} .mat-tab-label{height:32px!important}"]}),t}();function EA(t,e){if(1&t){var n=vs();cs(0,"button",10),_s("click",function(){return nn(n),xs().customButtonClicked()}),$s(1),hs()}if(2&t){var i=xs();Aa(1),Xs(i.data.customButton)}}var AA,DA=function(){function t(t,e){this.dialogRef=t,this.data=e,this.onEvent=new Ru(!0),this.saving=!1}return t.prototype.ngOnInit=function(){this.onEvent.emit({type:"init",data:null,dialog:this.dialogRef})},t.prototype.changed=function(t){this.onEvent.emit({type:"changed",data:t,dialog:this.dialogRef})},t.prototype.getFields=function(){var t={},e=[];return this.data.guiFields.forEach(function(n){var i=void 0!==n.values?n.values:n.value;n.gui.required&&0!==i&&(!i||i instanceof Array&&0===i.length)&&e.push(n.gui.label),"number"==typeof i&&(i=i.toString()),t[n.name]=i}),{data:t,errors:e}},t.prototype.save=function(){var t=this.getFields();t.errors.length>0?this.data.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+t.errors.join(", ")):this.onEvent.emit({data:t.data,type:"save",dialog:this.dialogRef})},t.prototype.customButtonClicked=function(){var t=this.getFields();this.onEvent.emit({data:t.data,type:this.data.customButton,errors:t.errors,dialog:this.dialogRef})},t.\u0275fac=function(e){return new(e||t)(ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-modal-form"]],decls:17,vars:7,consts:[["mat-dialog-title","",3,"innerHtml"],["vc",""],["autocomplete","off"],[3,"fields","changed"],[1,"buttons"],[1,"group1"],["ngClass","custom","mat-raised-button","",3,"click",4,"ngIf"],[1,"group2"],["mat-raised-button","",3,"disabled","click"],["mat-raised-button","","color","primary",3,"disabled","click"],["ngClass","custom","mat-raised-button","",3,"click"]],template:function(t,e){1&t&&(ds(0,"h4",0),Au(1,"safeHtml"),cs(2,"mat-dialog-content",null,1),cs(4,"form",2),cs(5,"uds-form",3),_s("changed",function(t){return e.changed(t)}),hs(),hs(),hs(),cs(6,"mat-dialog-actions"),cs(7,"div",4),cs(8,"div",5),as(9,EA,2,1,"button",6),hs(),cs(10,"div",7),cs(11,"button",8),_s("click",function(){return e.dialogRef.close()}),cs(12,"uds-translate"),$s(13,"Discard & close"),hs(),hs(),cs(14,"button",9),_s("click",function(){return e.save()}),cs(15,"uds-translate"),$s(16,"Save"),hs(),hs(),hs(),hs(),hs()),2&t&&(ls("innerHtml",Du(1,5,e.data.title),Dr),Aa(5),ls("fields",e.data.guiFields),Aa(4),ls("ngIf",null!=e.data.customButton),Aa(2),ls("disabled",e.saving),Aa(3),ls("disabled",e.saving))},directives:[gS,yS,eE,mx,Xx,xA,_S,Th,DS,TS,Ah],pipes:[RS],styles:["h4[_ngcontent-%COMP%]{margin-bottom:0}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%} uds-field{flex:1 100%}button.custom[_ngcontent-%COMP%]{background-color:#4682b4;color:#fff}"]}),t}(),OA=function(){function t(t){this.gui=t}return t.prototype.executeCallback=function(t,e,n,i){var r=this;void 0===i&&(i={});var a=new Array;e.gui.fills.parameters.forEach(function(t){a.push(t+"="+encodeURIComponent(n[t].value))}),t.table.rest.callback(e.gui.fills.callbackName,a.join("&")).subscribe(function(e){var a=new Array;e.forEach(function(t){var e=n[t.name];void 0!==e&&(void 0!==e.gui.fills&&a.push(e),e.gui.values.length=0,t.values.forEach(function(t){return e.gui.values.push(t)}),e.value||(e.value=t.values.length>0?t.values[0].id:""))}),a.forEach(function(e){void 0===i[e.name]&&(i[e.name]=!0,r.executeCallback(t,e,n,i))})})},t.prototype.modalForm=function(t,e,n,i){void 0===n&&(n=null),e.sort(function(t,e){return t.gui.order>e.gui.order?1:-1});var r=null!=n;n=r?n:{},e.forEach(function(t){!1!==r&&void 0!==t.gui.rdonly||(t.gui.rdonly=!1),t.gui.type===VS.TEXT&&t.gui.multiline&&(t.gui.type=VS.TEXTBOX);var e=n[t.name];void 0!==e&&(e instanceof Array?(t.values=new Array,e.forEach(function(e){return t.values.push(e)})):t.value=e)});var a=window.innerWidth<800?"80%":"50%";return this.gui.dialog.open(DA,{position:{top:"64px"},width:a,data:{title:t,guiFields:e,customButton:i,gui:this.gui},disableClose:!0}).componentInstance.onEvent},t.prototype.typedForm=function(t,e,n,i,r,a,o){var s=this;o=o||{};var l=new Ru,u=n?"test":void 0,c={},h={},d=function(e){h.hasOwnProperty(e.name)&&""!==e.value&&void 0!==e.value&&s.executeCallback(t,e,c)};return o.snack||(o.snack=this.gui.snackbar.open(django.gettext("Loading data..."),django.gettext("dismiss"))),t.table.rest.gui(a).subscribe(function(n){o.snack.dismiss(),void 0!==i&&i.forEach(function(t){n.push(t)}),n.forEach(function(t){c[t.name]=t,void 0!==t.gui.fills&&(h[t.name]=t.gui.fills)}),s.modalForm(e,n,r,u).subscribe(function(e){switch(e.data&&(e.data.data_type=a),e.type){case u:if(e.errors.length>0)return void s.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+e.errors.join(", "));s.gui.snackbar.open(django.gettext("Testing..."),django.gettext("dismiss")),t.table.rest.test(a,e.data).subscribe(function(t){"ok"!==t?s.gui.snackbar.open(django.gettext("Test failed:")+" "+t,django.gettext("dismiss")):s.gui.snackbar.open(django.gettext("Test passed successfully"),django.gettext("dismiss"),{duration:2e3})});break;case"changed":case"init":if(null===e.data)for(var i=0,h=n;i"+i.join(", ")+"";this.gui.yesno(e,a,!0).subscribe(function(e){if(e){var i=r.length,a=function(){n.gui.snackbar.open(django.gettext("Deletion finished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()};r.forEach(function(e){t.table.rest.delete(e).subscribe(function(t){0==--i&&a()},function(t){0==--i&&a()})})}})},t}(),IA=function(){function t(t,e){this.dialog=t,this.snackbar=e,this.forms=new OA(this)}return t.prototype.alert=function(t,e,n,i){void 0===n&&(n=0);var r=i||(window.innerWidth<800?"80%":"40%");return this.dialog.open(NS,{width:r,data:{title:t,body:e,autoclose:n,type:LS.alert},disableClose:!0}).componentInstance.yesno},t.prototype.yesno=function(t,e,n){void 0===n&&(n=!1);var i=window.innerWidth<800?"80%":"40%";return this.dialog.open(NS,{width:i,data:{title:t,body:e,type:LS.yesno,warnOnYes:n},disableClose:!0}).componentInstance.yesno},t.prototype.icon=function(t,e){return void 0===e&&(e="24px"),''},t}(),TA=function(t){return t.NUMERIC="numeric",t.ALPHANUMERIC="alphanumeric",t.DATETIME="datetime",t.DATETIMESEC="datetimesec",t.DATE="date",t.TIME="time",t.ICON="iconType",t.CALLBACK="callback",t.DICTIONARY="dict",t.IMAGE="image",t}({}),RA=function(t){return t[t.ALWAYS=0]="ALWAYS",t[t.SINGLE_SELECT=1]="SINGLE_SELECT",t[t.MULTI_SELECT=2]="MULTI_SELECT",t[t.ONLY_MENU=3]="ONLY_MENU",t[t.ACCELERATOR=4]="ACCELERATOR",t}({}),PA="provider",MA="service",FA="pool",LA="user",NA="group",VA="transport",jA="osmanager",BA="calendar",zA="poolgroup",HA={provider:django.gettext("provider"),service:django.gettext("service"),pool:django.gettext("service pool"),authenticator:django.gettext("authenticator"),user:django.gettext("user"),group:django.gettext("group"),transport:django.gettext("transport"),osmanager:django.gettext("OS manager"),calendar:django.gettext("calendar"),poolgroup:django.gettext("pool group")},UA=function(){function t(t){this.router=t}return t.getGotoButton=function(t,e,n){return{id:t,html:'link'+django.gettext("Go to")+" "+HA[t]+"",type:RA.ACCELERATOR,acceleratorProperties:[e,n]}},t.prototype.gotoProvider=function(t){this.router.navigate(void 0!==t?["providers",t]:["providers"])},t.prototype.gotoService=function(t,e){this.router.navigate(void 0!==e?["providers",t,"detail",e]:["providers",t,"detail"])},t.prototype.gotoServicePool=function(t){this.router.navigate(["pools","service-pools",t])},t.prototype.gotoServicePoolDetail=function(t){this.router.navigate(["pools","service-pools",t,"detail"])},t.prototype.gotoMetapool=function(t){this.router.navigate(["pools","meta-pools",t])},t.prototype.gotoMetapoolDetail=function(t){this.router.navigate(["pools","meta-pools",t,"detail"])},t.prototype.gotoCalendar=function(t){this.router.navigate(["pools","calendars",t])},t.prototype.gotoCalendarDetail=function(t){this.router.navigate(["pools","calendars",t,"detail"])},t.prototype.gotoAccount=function(t){this.router.navigate(["pools","accounts",t])},t.prototype.gotoAccountDetail=function(t){this.router.navigate(["pools","accounts",t,"detail"])},t.prototype.gotoPoolGroup=function(t){this.router.navigate(["pools","pool-groups",t=t||""])},t.prototype.gotoAuthenticator=function(t){this.router.navigate(["authenticators",t])},t.prototype.gotoAuthenticatorDetail=function(t){this.router.navigate(["authenticators",t,"detail"])},t.prototype.gotoUser=function(t,e){this.router.navigate(["authenticators",t,"detail","users",e])},t.prototype.gotoGroup=function(t,e){this.router.navigate(["authenticators",t,"detail","groups",e])},t.prototype.gotoTransport=function(t){this.router.navigate(["transports",t])},t.prototype.gotoOSManager=function(t){this.router.navigate(["osmanagers",t])},t.prototype.goto=function(t,e,n){var i=function(t){var i=e;if(n[t].split(".").forEach(function(t){return i=i[t]}),!i)throw new Error("not going :)");return i};try{switch(t){case PA:this.gotoProvider(i(0));break;case MA:this.gotoService(i(0),i(1));break;case FA:this.gotoServicePool(i(0));break;case"authenticator":this.gotoAuthenticator(i(0));break;case LA:this.gotoUser(i(0),i(1));break;case NA:this.gotoGroup(i(0),i(1));break;case VA:this.gotoTransport(i(0));break;case jA:this.gotoOSManager(i(0));break;case BA:this.gotoCalendar(i(0));break;case zA:this.gotoPoolGroup(i(0))}}catch(r){}},t}(),qA=function(){function t(e){g(this,t),this.total=e}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new WA(t,this.total))}}]),t}(),WA=function(t){y(n,t);var e=k(n);function n(t,i){var r;return g(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return v(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(M),YA=new Set,GA=function(){var t=function(){function t(e){g(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):KA}return v(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!YA.has(t))try{AA||((AA=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(AA)),AA.sheet&&(AA.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),YA.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui($g))},t.\u0275prov=Dt({factory:function(){return new t(Ui($g))},token:t,providedIn:"root"}),t}();function KA(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var ZA=function(){var t=function(){function t(e,n){g(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new q}return v(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return $A(hg(t)).some(function(t){return e._registerQuery(t).mql.matches})}},{key:"observe",value:function(t){var e=this,n=_f($A(hg(t)).map(function(t){return e._registerQuery(t).observable}));return(n=Sf(n.pipe(Rf(1)),n.pipe(function(t){return t.lift(new qA(1))},y_(0)))).pipe(G(function(t){var e={matches:!1,breakpoints:{}};return t.forEach(function(t){var n=t.matches,i=t.query;e.matches=e.matches||n,e.breakpoints[i]=n}),e}))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new j(function(t){var i=function(n){return e._zone.run(function(){return t.next(n)})};return n.addListener(i),function(){n.removeListener(i)}}).pipe(Ff(n),G(function(e){return{query:t,matches:e.matches}}),jg(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(GA),Ui(Cc))},t.\u0275prov=Dt({factory:function(){return new t(Ui(GA),Ui(Cc))},token:t,providedIn:"root"}),t}();function $A(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}function XA(t,e){if(1&t){var n=vs();cs(0,"div",1),cs(1,"button",2),_s("click",function(){return nn(n),xs().action()}),$s(2),hs(),hs()}if(2&t){var i=xs();Aa(2),Xs(i.data.action)}}function QA(t,e){}var JA=new bi("MatSnackBarData"),tD=function t(){g(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},eD=Math.pow(2,31)-1,nD=function(){function t(e,n){var i=this;g(this,t),this._overlayRef=n,this._afterDismissed=new q,this._afterOpened=new q,this._onAction=new q,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe(function(){return i.dismiss()}),e._onExit.subscribe(function(){return i._finishDismiss()})}return v(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout(function(){return e.dismiss()},Math.min(t,eD))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction}}]),t}(),iD=function(){var t=function(){function t(e,n){g(this,t),this.snackBarRef=e,this.data=n}return v(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(nD),ss(JA))},t.\u0275cmp=oe({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(cs(0,"span"),$s(1),hs(),as(2,XA,3,1,"div",0)),2&t&&(Aa(1),Xs(e.data.message),Aa(1),ls("ngIf",e.hasAction))},directives:[Th,DS],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t}(),rD={snackBarState:lb("state",[db("void, hidden",hb({transform:"scale(0.8)",opacity:0})),db("visible",hb({transform:"scale(1)",opacity:1})),pb("* => visible",ub("150ms cubic-bezier(0, 0, 0.2, 1)")),pb("* => void, * => hidden",ub("75ms cubic-bezier(0.4, 0.0, 1, 1)",hb({opacity:0})))])},aD=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o){var s;return g(this,n),(s=e.call(this))._ngZone=t,s._elementRef=i,s._changeDetectorRef=r,s._platform=a,s.snackBarConfig=o,s._announceDelay=150,s._destroyed=!1,s._onAnnounce=new q,s._onExit=new q,s._onEnter=new q,s._animationState="void",s.attachDomPortal=function(t){return s._assertNotAttached(),s._applySnackBarClasses(),s._portalOutlet.attachDomPortal(t)},s._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",s}return v(n,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.toState;if(("void"===e&&"void"!==t.fromState||"hidden"===e)&&this._completeExit(),"visible"===e){var n=this._onEnter;this._ngZone.run(function(){n.next(),n.complete()})}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.pipe(Rf(1)).subscribe(function(){t._onExit.next(),t._onExit.complete()})}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(function(e){return t.classList.add(e)}):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){this._portalOutlet.hasAttached()}},{key:"_screenReaderAnnounce",value:function(){var t=this;this._announceTimeoutId||this._ngZone.runOutsideAngular(function(){t._announceTimeoutId=setTimeout(function(){var e=t._elementRef.nativeElement.querySelector("[aria-hidden]"),n=t._elementRef.nativeElement.querySelector("[aria-live]");if(e&&n){var i=null;t._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(i=document.activeElement),e.removeAttribute("aria-hidden"),n.appendChild(e),null==i||i.focus(),t._onAnnounce.next(),t._onAnnounce.complete()}},t._announceDelay)})}}]),n}(_y);return t.\u0275fac=function(e){return new(e||t)(ss(Cc),ss(xl),ss(Kl),ss($g),ss(tD))},t.\u0275cmp=oe({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var n;1&t&&Wu(wy,!0),2&t&&qu(n=Xu())&&(e._portalOutlet=n.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&bs("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&el("@state",e._animationState)},features:[qo],decls:3,vars:1,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(cs(0,"div",0),as(1,QA,0,0,"ng-template",1),hs(),ds(2,"div")),2&t&&(Aa(2),is("aria-live",e._live))},directives:[wy],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[rD.snackBarState]}}),t}(),oD=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[g_,xy,Yh,IS,sC],sC]}),t}(),sD=new bi("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new tD}}),lD=function(){var t=function(){function t(e,n,i,r,a,o){g(this,t),this._overlay=e,this._live=n,this._injector=i,this._breakpointObserver=r,this._parentSnackBar=a,this._defaultConfig=o,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=iD,this.snackBarContainerComponent=aD,this.handsetCssClass="mat-snack-bar-handset"}return v(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=Object.assign(Object.assign({},this._defaultConfig),n);return i.data={message:t,action:e},i.announcementMessage===t&&(i.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,i)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var n=Ho.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:tD,useValue:e}]}),i=new vy(this.snackBarContainerComponent,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance}},{key:"_attach",value:function(t,e){var n=this,i=Object.assign(Object.assign(Object.assign({},new tD),this._defaultConfig),e),r=this._createOverlay(i),a=this._attachSnackBarContainer(r,i),o=new nD(a,r);if(t instanceof eu){var s=new gy(t,null,{$implicit:i.data,snackBarRef:o});o.instance=a.attachTemplatePortal(s)}else{var l=this._createInjector(i,o),u=new vy(t,void 0,l),c=a.attachComponentPortal(u);o.instance=c.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(jg(r.detachments())).subscribe(function(t){var e=r.overlayElement.classList;t.matches?e.add(n.handsetCssClass):e.remove(n.handsetCssClass)}),i.announcementMessage&&a._onAnnounce.subscribe(function(){n._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(o,i),this._openedSnackBarRef=o,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var n=this;t.afterDismissed().subscribe(function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null),e.announcementMessage&&n._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(function(){t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(function(){return t._dismissAfter(e.duration)})}},{key:"_createOverlay",value:function(t){var e=new Yy;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,a=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):a?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return Ho.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:nD,useValue:e},{provide:JA,useValue:t.data}]})}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui(h_),Ui(W_),Ui(Ho),Ui(ZA),Ui(t,12),Ui(sD))},t.\u0275prov=Dt({factory:function(){return new t(Ui(h_),Ui(W_),Ui(xo),Ui(ZA),Ui(t,12),Ui(sD))},token:t,providedIn:oD}),t}(),uD=function(){function t(t,e,n,i,r,a){this.http=t,this.router=e,this.dialog=n,this.snackbar=i,this.sanitizer=r,this.dateAdapter=a,this.user=new sg(udsData.profile),this.navigation=new UA(this.router),this.gui=new IA(this.dialog,this.snackbar),this.dateAdapter.setLocale(this.config.language)}return Object.defineProperty(t.prototype,"config",{get:function(){return udsData.config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"notices",{get:function(){return udsData.errors},enumerable:!1,configurable:!0}),t.prototype.restPath=function(t){return this.config.urls.rest+t},t.prototype.staticURL=function(t){return this.config.urls.static+t},t.prototype.logout=function(){window.location.href=this.config.urls.logout},t.prototype.gotoUser=function(){window.location.href=this.config.urls.user},t.prototype.putOnStorage=function(t,e){void 0!==typeof Storage&&sessionStorage.setItem(t,e)},t.prototype.getFromStorage=function(t){return void 0!==typeof Storage?sessionStorage.getItem(t):null},t.prototype.safeString=function(t){return this.sanitizer.bypassSecurityTrustHtml(t)},t.prototype.yesno=function(t){return t?django.gettext("yes"):django.gettext("no")},t.\u0275prov=Dt({token:t,factory:t.\u0275fac=function(e){return new(e||t)(Ui(Xd),Ui(Fv),Ui(pS),Ui(lD),Ui(Sd),Ui(vC))},providedIn:"root"}),t}(),cD=function(){function t(t){this.api=t}return t.prototype.canActivate=function(t,e){return!!this.api.user.isStaff||(window.location.href=this.api.config.urls.user,!1)},t.\u0275prov=Dt({token:t,factory:t.\u0275fac=function(e){return new(e||t)(Ui(uD))},providedIn:"root"}),t}(),hD=function(t,e){return(hD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function dD(t,e){function n(){this.constructor=t}hD(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var fD=function(t){return t[t.NONE=0]="NONE",t[t.READ=32]="READ",t[t.MANAGEMENT=64]="MANAGEMENT",t[t.ALL=96]="ALL",t}({}),pD=function(){function t(t,e,n){this.api=t,void 0===n&&(n={}),void 0===n.base&&(n.base=e);var i=function(t,e){return void 0===t?e:t};this.id=e,this.paths={base:n.base,get:i(n.get,n.base),log:i(n.log,n.base),put:i(n.put,n.base),test:i(n.test,n.base+"/test"),delete:i(n.delete,n.base),types:i(n.types,n.base+"/types"),gui:i(n.gui,n.base+"/gui"),tableInfo:i(n.tableInfo,n.base+"/tableinfo")},this.headers=(new Ld).set("Content-Type","application/json; charset=utf8").set(this.api.config.auth_header,this.api.config.auth_token)}return t.prototype.handleError=function(t,e){var n;return void 0===e&&(e=!1),n=t.error instanceof ErrorEvent?t.error.message:e?django.gettext("Error saving: ")+t.error:"Error "+t.status+": "+t.error,this.api.gui.alert(e?django.gettext("Error saving element"):django.gettext("Error handling your request"),n),Hg(n)},t.prototype.getPath=function(t,e){return this.api.restPath(t+(void 0!==e?"/"+e:""))},t.prototype.doGet=function(t){var e=this;return this.api.http.get(t,{headers:this.headers}).pipe(jf(function(t){return e.handleError(t)}))},t.prototype.get=function(t){return this.doGet(this.getPath(this.paths.get,t))},t.prototype.getLogs=function(t){return this.doGet(this.getPath(this.paths.log,t)+"/log")},t.prototype.overview=function(t){return this.get("overview"+(void 0!==t?"?filter="+t:""))},t.prototype.summary=function(t){return this.get("overview?summarize"+(void 0!==t?"&filter="+t:""))},t.prototype.put=function(t,e){var n=this;return this.api.http.put(this.getPath(this.paths.put,e),t,{headers:this.headers}).pipe(jf(function(t){return n.handleError(t,!0)}))},t.prototype.create=function(t){return this.put(t)},t.prototype.save=function(t,e){return this.put(t,e=void 0!==e?e:t.id)},t.prototype.test=function(t,e){var n=this;return this.api.http.post(this.getPath(this.paths.test,t),e,{headers:this.headers}).pipe(jf(function(t){return n.handleError(t)}))},t.prototype.delete=function(t){var e=this;return this.api.http.delete(this.getPath(this.paths.delete,t),{headers:this.headers}).pipe(jf(function(t){return e.handleError(t)}))},t.prototype.permision=function(){return this.api.user.isAdmin?fD.ALL:fD.NONE},t.prototype.getPermissions=function(t){return this.doGet(this.getPath("permissions/"+this.paths.base+"/"+t))},t.prototype.addPermission=function(t,e,n,i){var r=this,a=this.getPath("permissions/"+this.paths.base+"/"+t+"/"+e+"/add/"+n);return this.api.http.put(a,{perm:i},{headers:this.headers}).pipe(jf(function(t){return r.handleError(t)}))},t.prototype.revokePermission=function(t){var e=this,n=this.getPath("permissions/revoke");return this.api.http.put(n,{items:t},{headers:this.headers}).pipe(jf(function(t){return e.handleError(t)}))},t.prototype.types=function(){return this.doGet(this.getPath(this.paths.types))},t.prototype.gui=function(t){var e=this.getPath(this.paths.gui+(void 0!==t?"/"+t:""));return this.doGet(e)},t.prototype.callback=function(t,e){var n=this.getPath("gui/callback/"+t+"?"+e);return this.doGet(n)},t.prototype.tableInfo=function(){return this.doGet(this.getPath(this.paths.tableInfo))},t.prototype.detail=function(t,e){return new mD(this,t,e)},t.prototype.invoke=function(t,e){var n=t;return e&&(n=n+"?"+e),this.get(n)},t}(),mD=function(t){function e(e,n,i,r){var a=t.call(this,e.api,[e.paths.base,n,i].join("/"))||this;return a.parentModel=e,a.parentId=n,a.model=i,a.perm=r,a}return dD(e,t),e.prototype.permision=function(){return this.perm||fD.ALL},e}(pD),vD=function(t){function e(e){var n=t.call(this,e,"providers")||this;return n.api=e,n}return dD(e,t),e.prototype.allServices=function(){return this.get("allservices")},e.prototype.service=function(t){return this.get("service/"+t)},e.prototype.maintenance=function(t){return this.get(t+"/maintenance")},e}(pD),gD=function(t){function e(e){var n=t.call(this,e,"authenticators")||this;return n.api=e,n}return dD(e,t),e.prototype.search=function(t,e,n,i){return void 0===i&&(i=12),this.get(t+"/search?type="+encodeURIComponent(e)+"&term="+encodeURIComponent(n)+"&limit="+i)},e}(pD),yD=function(t){function e(e){var n=t.call(this,e,"osmanagers")||this;return n.api=e,n}return dD(e,t),e}(pD),_D=function(t){function e(e){var n=t.call(this,e,"transports")||this;return n.api=e,n}return dD(e,t),e}(pD),bD=function(t){function e(e){var n=t.call(this,e,"networks")||this;return n.api=e,n}return dD(e,t),e}(pD),kD=function(t){function e(e){var n=t.call(this,e,"servicespools")||this;return n.api=e,n}return dD(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e.prototype.actionsList=function(t){return this.get(t+"/actionsList")},e.prototype.listAssignables=function(t){return this.get(t+"/listAssignables")},e.prototype.createFromAssignable=function(t,e,n){return this.get(t+"/createFromAssignable?user_id="+encodeURIComponent(e)+"&assignable_id="+encodeURIComponent(n))},e}(pD),wD=function(t){function e(e){var n=t.call(this,e,"metapools")||this;return n.api=e,n}return dD(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e}(pD),CD=function(t){function e(e){var n=t.call(this,e,"config")||this;return n.api=e,n}return dD(e,t),e}(pD),SD=function(t){function e(e){var n=t.call(this,e,"gallery/images")||this;return n.api=e,n}return dD(e,t),e}(pD),xD=function(t){function e(e){var n=t.call(this,e,"gallery/servicespoolgroups")||this;return n.api=e,n}return dD(e,t),e}(pD),ED=function(t){function e(e){var n=t.call(this,e,"system")||this;return n.api=e,n}return dD(e,t),e.prototype.information=function(){return this.get("overview")},e.prototype.stats=function(t){return this.get("stats/"+t)},e.prototype.flushCache=function(){return this.doGet(this.getPath("cache","flush"))},e}(pD),AD=function(t){function e(e){var n=t.call(this,e,"reports")||this;return n.api=e,n}return dD(e,t),e.prototype.types=function(){return Od([])},e}(pD),DD=function(t){function e(e){var n=t.call(this,e,"calendars")||this;return n.api=e,n}return dD(e,t),e}(pD),OD=function(t){function e(e){var n=t.call(this,e,"accounts")||this;return n.api=e,n}return dD(e,t),e.prototype.timemark=function(t){return this.get(t+"/timemark")},e}(pD),ID=function(t){function e(e){var n=t.call(this,e,"proxies")||this;return n.api=e,n}return dD(e,t),e}(pD),TD=function(t){function e(e){var n=t.call(this,e,"actortokens")||this;return n.api=e,n}return dD(e,t),e}(pD),RD=function(){function t(t){this.api=t,this.providers=new vD(t),this.authenticators=new gD(t),this.osManagers=new yD(t),this.transports=new _D(t),this.networks=new bD(t),this.servicesPools=new kD(t),this.metaPools=new wD(t),this.gallery=new SD(t),this.servicesPoolGroups=new xD(t),this.calendars=new DD(t),this.accounts=new OD(t),this.proxy=new ID(t),this.system=new ED(t),this.configuration=new CD(t),this.actorToken=new TD(t),this.reports=new AD(t)}return t.\u0275prov=Dt({token:t,factory:t.\u0275fac=function(e){return new(e||t)(Ui(uD))},providedIn:"root"}),t}();function PD(t,e){if(1&t&&(cs(0,"div",17),cs(1,"div",11),ds(2,"img",3),cs(3,"div",12),$s(4),hs(),hs(),cs(5,"div",13),cs(6,"a",15),cs(7,"uds-translate"),$s(8,"View service pools"),hs(),hs(),hs(),hs()),2&t){var n=xs(2);Aa(2),ls("src",n.api.staticURL("admin/img/icons/logs.png"),Or),Aa(2),Qs(" ",n.data.restrained," ")}}function MD(t,e){if(1&t&&(cs(0,"div"),cs(1,"div",8),cs(2,"div",9),cs(3,"div",10),cs(4,"div",11),ds(5,"img",3),cs(6,"div",12),$s(7),hs(),hs(),cs(8,"div",13),cs(9,"a",14),cs(10,"uds-translate"),$s(11,"View authenticators"),hs(),hs(),hs(),hs(),cs(12,"div",10),cs(13,"div",11),ds(14,"img",3),cs(15,"div",12),$s(16),hs(),hs(),cs(17,"div",13),cs(18,"a",15),cs(19,"uds-translate"),$s(20,"View service pools"),hs(),hs(),hs(),hs(),cs(21,"div",10),cs(22,"div",11),ds(23,"img",3),cs(24,"div",12),$s(25),hs(),hs(),cs(26,"div",13),cs(27,"a",15),cs(28,"uds-translate"),$s(29,"View service pools"),hs(),hs(),hs(),hs(),as(30,PD,9,2,"div",16),hs(),hs(),hs()),2&t){var n=xs();Aa(5),ls("src",n.api.staticURL("admin/img/icons/authenticators.png"),Or),Aa(2),Qs(" ",n.data.users," "),Aa(7),ls("src",n.api.staticURL("admin/img/icons/pools.png"),Or),Aa(2),Qs(" ",n.data.pools," "),Aa(7),ls("src",n.api.staticURL("admin/img/icons/services.png"),Or),Aa(2),Qs(" ",n.data.user_services," "),Aa(5),ls("ngIf",n.data.restrained)}}function FD(t,e){1&t&&(cs(0,"div",18),cs(1,"div",19),cs(2,"div",20),cs(3,"uds-translate"),$s(4,"UDS Administration"),hs(),hs(),cs(5,"div",21),cs(6,"p"),cs(7,"uds-translate"),$s(8,"You are accessing UDS Administration as staff member."),hs(),hs(),cs(9,"p"),cs(10,"uds-translate"),$s(11,"This means that you have restricted access to elements."),hs(),hs(),cs(12,"p"),cs(13,"uds-translate"),$s(14,"In order to increase your access privileges, please contact your local UDS administrator. "),hs(),hs(),ds(15,"br"),cs(16,"p"),cs(17,"uds-translate"),$s(18,"Thank you."),hs(),hs(),hs(),hs(),hs())}var LD=function(){function t(t,e){this.api=t,this.rest=e,this.data={}}return t.prototype.ngOnInit=function(){var t=this;this.api.user.isAdmin&&this.rest.system.information().subscribe(function(e){t.data={users:django.gettext("#USR_NUMBER# users, #GRP_NUMBER# groups").replace("#USR_NUMBER#",e.users).replace("#GRP_NUMBER#",e.groups),pools:django.gettext("#POOLS_NUMBER# service pools").replace("#POOLS_NUMBER#",e.service_pools),user_services:django.gettext("#SERVICES_NUMBER# user services").replace("#SERVICES_NUMBER#",e.user_services)},e.restrained_services_pools>0&&(t.data.restrained=django.gettext("#RESTRAINED_NUMBER# restrained services!").replace("#RESTRAINED_NUMBER#",e.restrained_services_pools))})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-summary"]],decls:11,vars:3,consts:[[1,"card"],[1,"card-header"],[1,"card-title"],[3,"src"],[1,"card-subtitle"],[1,"card-content"],[4,"ngIf","ngIfElse"],["noAdmin",""],[1,"admin"],[1,"information"],[1,"info-panel"],[1,"info-panel-data"],[1,"info-text"],[1,"info-panel-link"],["mat-button","","routerLink","/authenticators"],["mat-button","","routerLink","/pools/service-pools"],["class","info-panel info-danger",4,"ngIf"],[1,"info-panel","info-danger"],[1,"staff-container"],[1,"staff","mat-elevation-z8"],[1,"staff-header"],[1,"staff-content"]],template:function(t,e){if(1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"div",2),ds(3,"img",3),cs(4,"uds-translate"),$s(5,"Dashboard"),hs(),hs(),ds(6,"div",4),hs(),cs(7,"div",5),as(8,MD,31,7,"div",6),as(9,FD,19,0,"ng-template",null,7,ec),hs(),hs()),2&t){var n=os(10);Aa(3),ls("src",e.api.staticURL("admin/img/icons/dashboard-monitor.png"),Or),Aa(5),ls("ngIf",e.api.user.isAdmin)("ngIfElse",n)}},directives:[TS,Th,OS,Vv],styles:[".card[_ngcontent-%COMP%]{height:80%}.staff-container[_ngcontent-%COMP%]{margin-top:2rem;display:flex;justify-content:center}.staff[_ngcontent-%COMP%]{border:#337ab7;border-width:1px;border-style:solid}.staff-header[_ngcontent-%COMP%]{display:flex;justify-content:center;background-color:#337ab7;color:#fff;font-weight:700}.staff-content[_ngcontent-%COMP%], .staff-header[_ngcontent-%COMP%]{padding:.5rem 1rem}.admin[_ngcontent-%COMP%]{display:flex;flex-direction:column}.information[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;width:100%}.info-panel[_ngcontent-%COMP%]{border-color:#333;background-image:linear-gradient(135deg,#fdfcfb,#e2d1c3);box-shadow:0 1px 4px 0 rgba(0,0,0,.14);box-sizing:border-box;color:#333;display:flex;flex-direction:column;margin:2rem 1rem;width:100%}.info-danger[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,#f83600 0,#f9d423);color:#fff;font-weight:700;font-size:1.5em}.info-panel-data[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:1rem}.info-panel-data[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:1rem;width:5rem}.info-text[_ngcontent-%COMP%]{width:100%;text-align:center}.info-panel-link[_ngcontent-%COMP%]{background:#4682b4}.info-panel-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:100%;color:#fff}"]}),t}(),ND=["underline"],VD=["connectionContainer"],jD=["inputContainer"],BD=["label"];function zD(t,e){1&t&&(fs(0),cs(1,"div",14),ds(2,"div",15),ds(3,"div",16),ds(4,"div",17),hs(),cs(5,"div",18),ds(6,"div",15),ds(7,"div",16),ds(8,"div",17),hs(),ps())}function HD(t,e){1&t&&(cs(0,"div",19),Ds(1,1),hs())}function UD(t,e){if(1&t&&(fs(0),Ds(1,2),cs(2,"span"),$s(3),hs(),ps()),2&t){var n=xs(2);Aa(3),Xs(n._control.placeholder)}}function qD(t,e){1&t&&Ds(0,3,["*ngSwitchCase","true"])}function WD(t,e){1&t&&(cs(0,"span",23),$s(1," *"),hs())}function YD(t,e){if(1&t){var n=vs();cs(0,"label",20,21),_s("cdkObserveContent",function(){return nn(n),xs().updateOutlineGap()}),as(2,UD,4,1,"ng-container",12),as(3,qD,1,0,"ng-content",12),as(4,WD,2,0,"span",22),hs()}if(2&t){var i=xs();js("mat-empty",i._control.empty&&!i._shouldAlwaysFloat())("mat-form-field-empty",i._control.empty&&!i._shouldAlwaysFloat())("mat-accent","accent"==i.color)("mat-warn","warn"==i.color),ls("cdkObserveContentDisabled","outline"!=i.appearance)("id",i._labelId)("ngSwitch",i._hasLabel()),is("for",i._control.id)("aria-owns",i._control.id),Aa(2),ls("ngSwitchCase",!1),Aa(1),ls("ngSwitchCase",!0),Aa(1),ls("ngIf",!i.hideRequiredMarker&&i._control.required&&!i._control.disabled)}}function GD(t,e){1&t&&(cs(0,"div",24),Ds(1,4),hs())}function KD(t,e){if(1&t&&(cs(0,"div",25,26),ds(2,"span",27),hs()),2&t){var n=xs();Aa(2),js("mat-accent","accent"==n.color)("mat-warn","warn"==n.color)}}function ZD(t,e){1&t&&(cs(0,"div"),Ds(1,5),hs()),2&t&&ls("@transitionMessages",xs()._subscriptAnimationState)}function $D(t,e){if(1&t&&(cs(0,"div",31),$s(1),hs()),2&t){var n=xs(2);ls("id",n._hintLabelId),Aa(1),Xs(n.hintLabel)}}function XD(t,e){if(1&t&&(cs(0,"div",28),as(1,$D,2,2,"div",29),Ds(2,6),ds(3,"div",30),Ds(4,7),hs()),2&t){var n=xs();ls("@transitionMessages",n._subscriptAnimationState),Aa(1),ls("ngIf",n.hintLabel)}}var QD=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],JD=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],tO=new bi("MatError"),eO={transitionMessages:lb("transitionMessages",[db("enter",hb({opacity:1,transform:"translateY(0%)"})),pb("void => enter",[hb({opacity:0,transform:"translateY(-100%)"}),ub("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},nO=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t}),t}(),iO=new bi("MatHint"),rO=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["mat-label"]]}),t}(),aO=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["mat-placeholder"]]}),t}(),oO=new bi("MatPrefix"),sO=new bi("MatSuffix"),lO=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["","matSuffix",""]],features:[gl([{provide:sO,useExisting:t}])]}),t}(),uO=0,cO=uC(function t(e){g(this,t),this._elementRef=e},"primary"),hO=new bi("MAT_FORM_FIELD_DEFAULT_OPTIONS"),dO=new bi("MatFormField"),fO=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s,l,u){var c;return g(this,n),(c=e.call(this,t))._elementRef=t,c._changeDetectorRef=i,c._dir=a,c._defaults=o,c._platform=s,c._ngZone=l,c._outlineGapCalculationNeededImmediately=!1,c._outlineGapCalculationNeededOnStable=!1,c._destroyed=new q,c._showAlwaysAnimate=!1,c._subscriptAnimationState="",c._hintLabel="",c._hintLabelId="mat-hint-".concat(uO++),c._labelId="mat-form-field-label-".concat(uO++),c.floatLabel=c._getDefaultFloatLabelState(),c._animationsEnabled="NoopAnimations"!==u,c.appearance=o&&o.appearance?o.appearance:"legacy",c._hideRequiredMarker=!(!o||null==o.hideRequiredMarker)&&o.hideRequiredMarker,c}return v(n,[{key:"_shouldAlwaysFloat",value:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",value:function(){return"never"!==this.floatLabel}},{key:"getLabelId",value:function(){return this._hasFloatingLabel()?this._labelId:null}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var t=this;this._validateControlChild();var e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(e.controlType)),e.stateChanges.pipe(Ff(null)).subscribe(function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(jg(this._destroyed)).subscribe(function(){return t._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.pipe(jg(t._destroyed)).subscribe(function(){t._outlineGapCalculationNeededOnStable&&t.updateOutlineGap()})}),dt(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){t._outlineGapCalculationNeededOnStable=!0,t._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Ff(null)).subscribe(function(){t._processHints(),t._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Ff(null)).subscribe(function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(jg(this._destroyed)).subscribe(function(){"function"==typeof requestAnimationFrame?t._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return t.updateOutlineGap()})}):t.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(t){var e=this._control?this._control.ngControl:null;return e&&e[t]}},{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 t=this;this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,mg(this._label.nativeElement,"transitionend").pipe(Rf(1)).subscribe(function(){t._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 t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push.apply(t,h(this._control.userAriaDescribedBy.split(" "))),"hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find(function(t){return"start"===t.align}):null,n=this._hintChildren?this._hintChildren.find(function(t){return"end"===t.align}):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&t.push.apply(t,h(this._errorChildren.map(function(t){return t.id})));this._control.setDescribedByIds(t)}}},{key:"_validateControlChild",value:function(){}},{key:"updateOutlineGap",value:function(){var t=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&t&&t.children.length&&t.textContent.trim()&&this._platform.isBrowser)if(this._isAttachedToDOM()){var e=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),a=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var o=i.getBoundingClientRect();if(0===o.width&&0===o.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var s=this._getStartEnd(o),l=t.children,u=this._getStartEnd(l[0].getBoundingClientRect()),c=0,h=0;h0?.75*c+10:0}for(var d=0;d void",vb("@transformPanel",[mb()],{optional:!0}))]),transformPanel:lb("transformPanel",[db("void",hb({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),db("showing",hb({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),db("showing-multiple",hb({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),pb("void => *",ub("120ms cubic-bezier(0, 0, 0.2, 1)")),pb("* => void",ub("100ms 25ms linear",hb({opacity:0})))])},xO=0,EO=256,AO=new bi("mat-select-scroll-strategy"),DO=new bi("MAT_SELECT_CONFIG"),OO={provide:AO,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},IO=function t(e,n){g(this,t),this.source=e,this.value=n},TO=cC(hC(lC(dC(function t(e,n,i,r,a){g(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=a})))),RO=new bi("MatSelectTrigger"),PO=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["mat-select-trigger"]],features:[gl([{provide:RO,useExisting:t}])]}),t}(),MO=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,o,s,l,u,c,d,f,p,m,v,y){var _,b,k,w;return g(this,n),(_=e.call(this,s,o,u,c,f))._viewportRuler=t,_._changeDetectorRef=i,_._ngZone=r,_._dir=l,_._parentFormField=d,_.ngControl=f,_._liveAnnouncer=v,_._defaultOptions=y,_._panelOpen=!1,_._compareWith=function(t,e){return t===e},_._uid="mat-select-".concat(xO++),_._triggerAriaLabelledBy=null,_._destroy=new q,_._onChange=function(){},_._onTouched=function(){},_._valueId="mat-select-value-".concat(xO++),_._panelDoneAnimatingStream=new q,_._overlayPanelClass=(null===(b=_._defaultOptions)||void 0===b?void 0:b.overlayPanelClass)||"",_._focused=!1,_.controlType="mat-select",_._required=!1,_._multiple=!1,_._disableOptionCentering=null!==(w=null===(k=_._defaultOptions)||void 0===k?void 0:k.disableOptionCentering)&&void 0!==w&&w,_.ariaLabel="",_.optionSelectionChanges=Af(function(){var t=_.options;return t?t.changes.pipe(Ff(t),Df(function(){return dt.apply(void 0,h(t.map(function(t){return t.onSelectionChange})))})):_._ngZone.onStable.pipe(Rf(1),Df(function(){return _.optionSelectionChanges}))}),_.openedChange=new Ru,_._openedStream=_.openedChange.pipe(Td(function(t){return t}),G(function(){})),_._closedStream=_.openedChange.pipe(Td(function(t){return!t}),G(function(){})),_.selectionChange=new Ru,_.valueChange=new Ru,_.ngControl&&(_.ngControl.valueAccessor=a(_)),null!=(null==y?void 0:y.typeaheadDebounceInterval)&&(_._typeaheadDebounceInterval=y.typeaheadDebounceInterval),_._scrollStrategyFactory=m,_._scrollStrategy=_._scrollStrategyFactory(),_.tabIndex=parseInt(p)||0,_.id=_.id,_}return v(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new uy(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Dg(),jg(this._destroy)).subscribe(function(){return t._panelDoneAnimating(t.panelOpen)})}},{key:"ngAfterContentInit",value:function(){var t=this;this._initKeyManager(),this._selectionModel.changed.pipe(jg(this._destroy)).subscribe(function(t){t.added.forEach(function(t){return t.select()}),t.removed.forEach(function(t){return t.deselect()})}),this.options.changes.pipe(Ff(null),jg(this._destroy)).subscribe(function(){t._resetOptions(),t._initializeSelection()})}},{key:"ngDoCheck",value:function(){var t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){var e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(t){t.disabled&&this.stateChanges.next(),t.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(t){this.value=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}},{key:"_handleClosedKeydown",value:function(t){var e=t.keyCode,n=e===Ly||e===My||e===Py||e===Fy,i=e===Dy||e===Iy,r=this._keyManager;if(!r.isTyping()&&i&&!Ny(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var a=this.selected;r.onKeydown(t);var o=this.selected;o&&a!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(t){var e=this._keyManager,n=t.keyCode,i=n===Ly||n===My,r=e.isTyping();if(i&&t.altKey)t.preventDefault(),this.close();else if(r||n!==Dy&&n!==Iy||!e.activeItem||Ny(t))if(!r&&this._multiple&&65===n&&t.ctrlKey){t.preventDefault();var a=this.options.some(function(t){return!t.disabled&&!t.selected});this.options.forEach(function(t){t.disabled||(a?t.select():t.deselect())})}else{var o=e.activeItemIndex;e.onKeydown(t),this._multiple&&i&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==o&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.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 t=this;this.overlayDir.positionChange.pipe(Rf(1)).subscribe(function(){t._changeDetectorRef.detectChanges(),t._positioningSettled()})}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value),t.stateChanges.next()})}},{key:"_setSelectionByValue",value:function(t){var e=this;if(this._selectionModel.selected.forEach(function(t){return t.setInactiveStyles()}),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(function(t){return e._selectValue(t)}),this._sortValues();else{var n=this._selectValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(t){var e=this,n=this.options.find(function(n){try{return null!=n.value&&e._compareWith(n.value,t)}catch(i){return!1}});return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new F_(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(jg(this._destroy)).subscribe(function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())}),this._keyManager.change.pipe(jg(this._destroy)).subscribe(function(){t._panelOpen&&t.panel?t._scrollOptionIntoView(t._keyManager.activeItemIndex||0):t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()})}},{key:"_resetOptions",value:function(){var t=this,e=dt(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(jg(e)).subscribe(function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())}),dt.apply(void 0,h(this.options.map(function(t){return t._stateChanges}))).pipe(jg(e)).subscribe(function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()})}},{key:"_onSelect",value:function(t,e){var n=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(n!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),n!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;if(this.multiple){var e=this.options.toArray();this._selectionModel.sort(function(n,i){return t.sortComparator?t.sortComparator(n,i,e):e.indexOf(n)-e.indexOf(i)}),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(t){var e;e=this.multiple?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(this._getChangeEvent(e)),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 t;return!this._panelOpen&&!this.disabled&&(null===(t=this.options)||void 0===t?void 0:t.length)>0}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_getPanelAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getLabelId",value:function(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}},{key:"_getTriggerAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}},{key:"_panelDoneAnimating",value:function(t){this.openedChange.emit(t)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(t){this._required=lg(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=lg(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=lg(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){t!==this._value&&(this.options&&this._setSelectionByValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=ug(t)}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map(function(t){return t.viewValue});return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty}}]),n}(TO);return t.\u0275fac=function(e){return new(e||t)(ss(dy),ss(Kl),ss(Cc),ss(AC),ss(xl),ss(ry,8),ss(Xx,8),ss(rE,8),ss(dO,8),ss(dx,10),gi("tabindex"),ss(AO),ss(W_),ss(DO,8))},t.\u0275dir=de({type:t,viewQuery:function(t,e){var n;1&t&&(Yu(mO,!0),Yu(vO,!0),Yu(m_,!0)),2&t&&(qu(n=Xu())&&(e.trigger=n.first),qu(n=Xu())&&(e.panel=n.first),qu(n=Xu())&&(e.overlayDir=n.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:[qo,Ie]}),t}(),FO=function(){var t=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._scrollTop=0,t._triggerFontSize=0,t._transformOrigin="top",t._offsetY=0,t._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],t}return v(n,[{key:"_calculateOverlayScroll",value:function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)}},{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._viewportRuler.change().pipe(jg(this._destroy)).subscribe(function(){t.panelOpen&&(t._triggerRect=t.trigger.nativeElement.getBoundingClientRect(),t._changeDetectorRef.markForCheck())})}},{key:"open",value:function(){var t=this;r(i(n.prototype),"_canOpen",this).call(this)&&(r(i(n.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(Rf(1)).subscribe(function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(t._triggerFontSize,"px"))}))}},{key:"_scrollOptionIntoView",value:function(t){var e=XC(t,this.options,this.optionGroups),n=this._getItemHeight();this.panel.nativeElement.scrollTop=QC((t+e)*n,n,this.panel.nativeElement.scrollTop,EO)}},{key:"_positioningSettled",value:function(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}},{key:"_panelDoneAnimating",value:function(t){this.panelOpen?this._scrollTop=0:(this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),r(i(n.prototype),"_panelDoneAnimating",this).call(this,t)}},{key:"_getChangeEvent",value:function(t){return new IO(this,t)}},{key:"_calculateOverlayOffsetX",value:function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?56:32;if(this.multiple)t=40;else{var a=this._selectionModel.selected[0]||this.options.first;t=a&&a.group?32:16}i||(t*=-1);var o=0-(e.left+t-(i?r:0)),s=e.right+t-n.width+(i?0:r);o>0?t+=o+8:s>0&&(t-=s+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(t,e,n){var i,r=this._getItemHeight(),a=(r-this._triggerRect.height)/2,o=Math.floor(EO/r);return this.disableOptionCentering?0:(i=0===this._scrollTop?t*r:this._scrollTop===n?(t-(this._getItemCount()-o))*r+(r-(this._getItemCount()*r-EO)%r):e-r/2,Math.round(-1*i-a))}},{key:"_checkOverlayWithinViewport",value:function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,a=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,EO)-a-this._triggerRect.height;o>r?this._adjustPanelUp(o,r):a>i?this._adjustPanelDown(a,i,t):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_calculateOverlayPosition",value:function(){var t,e=this._getItemHeight(),n=this._getItemCount(),i=Math.min(n*e,EO),r=n*e-i;t=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),t+=XC(t,this.options,this.optionGroups);var a=i/2;this._scrollTop=this._calculateOverlayScroll(t,a,r),this._offsetY=this._calculateOverlayOffsetY(t,a,r),this._checkOverlayWithinViewport(r)}},{key:"_getOriginBasedOnOption",value:function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2,n=Math.abs(this._offsetY)-e+t/2;return"50% ".concat(n,"px 0px")}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}}]),n}(MO);return t.\u0275fac=function(e){return LO(e||t)},t.\u0275cmp=oe({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(Ku(n,RO,!0),Ku(n,$C,!0),Ku(n,WC,!0)),2&t&&(qu(i=Xu())&&(e.customTrigger=i.first),qu(i=Xu())&&(e.options=i),qu(i=Xu())&&(e.optionGroups=i))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&_s("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()}),2&t&&(is("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),js("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[gl([{provide:nO,useExisting:t},{provide:KC,useExisting:t}]),qo],ngContentSelectors:CO,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",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"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(As(wO),cs(0,"div",0,1),_s("click",function(){return e.toggle()}),cs(3,"div",2),as(4,gO,2,1,"span",3),as(5,bO,3,2,"span",4),hs(),cs(6,"div",5),ds(7,"div",6),hs(),hs(),as(8,kO,4,14,"ng-template",7),_s("backdropClick",function(){return e.close()})("attach",function(){return e._onAttached()})("detach",function(){return e.close()})),2&t){var n=os(1);is("aria-owns",e.panelOpen?e.id+"-panel":null),Aa(3),ls("ngSwitch",e.empty),is("id",e._valueId),Aa(1),ls("ngSwitchCase",!0),Aa(1),ls("ngSwitchCase",!1),Aa(3),ls("cdkConnectedOverlayPanelClass",e._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[p_,Fh,Lh,m_,Nh,Ah],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}\n"],encapsulation:2,data:{animation:[SO.transformPanelWrap,SO.transformPanel]},changeDetection:0}),t}(),LO=vi(FO),NO=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[OO],imports:[[Yh,g_,JC,sC],fy,pO,JC,sC]}),t}(),VO={tooltipState:lb("state",[db("initial, void, hidden",hb({opacity:0,transform:"scale(0)"})),db("visible",hb({transform:"scale(1)"})),pb("* => visible",ub("200ms cubic-bezier(0, 0, 0.2, 1)",fb([hb({opacity:0,transform:"scale(0)",offset:0}),hb({opacity:.5,transform:"scale(0.99)",offset:.5}),hb({opacity:1,transform:"scale(1)",offset:1})]))),pb("* => hidden",ub("100ms cubic-bezier(0, 0, 0.2, 1)",hb({opacity:0})))])},jO=ty({passive:!0}),BO=new bi("mat-tooltip-scroll-strategy"),zO={provide:BO,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},HO=new bi("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),UO=function(){var t=function(){function t(e,n,i,r,a,o,s,l,u,c,h){var d=this;g(this,t),this._overlay=e,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=r,this._ngZone=a,this._platform=o,this._ariaDescriber=s,this._focusMonitor=l,this._dir=c,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new q,this._handleKeydown=function(t){d._isTooltipVisible()&&t.keyCode===Oy&&!Ny(t)&&(t.preventDefault(),t.stopPropagation(),d._ngZone.run(function(){return d.hide(0)}))},this._scrollStrategy=u,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),a.runOutsideAngular(function(){n.nativeElement.addEventListener("keydown",d._handleKeydown)})}return v(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(jg(this._destroyed)).subscribe(function(e){e?"keyboard"===e&&t._ngZone.run(function(){return t.show()}):t._ngZone.run(function(){return t.hide(0)})})}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(function(e){var n=l(e,2);t.removeEventListener(n[0],n[1],jO)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new vy(qO,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(jg(this._destroyed)).subscribe(function(){return t._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return n.positionChanges.pipe(jg(this._destroyed)).subscribe(function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run(function(){return t.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(jg(this._destroyed)).subscribe(function(){return t._detach()}),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),n.main),Object.assign(Object.assign({},e.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?t={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={originX:"end",originY:"center"});var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?t={overlayX:"center",overlayY:"bottom"}:"below"==n?t={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={overlayX:"start",overlayY:"center"});var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Rf(1),jg(this._destroyed)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var t=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){t._setupPointerExitEventsIfNeeded(),t.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){t._setupPointerExitEventsIfNeeded(),clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout(function(){return t.show()},500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var t,e=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return e.hide()}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var i=function(){clearTimeout(e._touchstartTimeout),e.hide(e._defaultOptions.touchendHideDelay)};n.push(["touchend",i],["touchcancel",i])}this._addListeners(n),(t=this._passiveListeners).push.apply(t,n)}}},{key:"_addListeners",value:function(t){var e=this;t.forEach(function(t){var n=l(t,2);e._elementRef.nativeElement.addEventListener(n[0],n[1],jO)})}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this.touchGestures;if("off"!==t){var e=this._elementRef.nativeElement,n=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==t&&e.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=lg(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message)})}))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(h_),ss(xl),ss(hy),ss(su),ss(Cc),ss($g),ss(P_),ss($_),ss(BO),ss(ry,8),ss(HO,8))},t.\u0275dir=de({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),qO=function(){var t=function(){function t(e,n){g(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new q,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)")}return v(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()},t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()},t)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Kl),ss(ZA))},t.\u0275cmp=oe({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&_s("click",function(){return e._handleBodyInteraction()},!1,Nr),2&t&&Vs("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(cs(0,"div",0),_s("@state.start",function(){return e._animationStart()})("@state.done",function(t){return e._animationDone(t)}),Au(1,"async"),$s(2),hs()),2&t&&(js("mat-tooltip-handset",null==(n=Du(1,5,e._isHandset))?null:n.matches),ls("ngClass",e.tooltipClass)("@state",e._visibility),Aa(2),Xs(e.message))},directives:[Ah],pipes:[Hh],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[VO.tooltipState]},changeDetection:0}),t}(),WO=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[zO],imports:[[ib,Yh,g_,sC],sC,fy]}),t}();function YO(t,e){if(1&t&&(cs(0,"mat-option",19),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n),Aa(1),Qs(" ",n," ")}}function GO(t,e){if(1&t){var n=vs();cs(0,"mat-form-field",16),cs(1,"mat-select",17),_s("selectionChange",function(t){return nn(n),xs(2)._changePageSize(t.value)}),as(2,YO,2,2,"mat-option",18),hs(),hs()}if(2&t){var i=xs(2);ls("appearance",i._formFieldAppearance)("color",i.color),Aa(1),ls("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),Aa(1),ls("ngForOf",i._displayedPageSizeOptions)}}function KO(t,e){if(1&t&&(cs(0,"div",20),$s(1),hs()),2&t){var n=xs(2);Aa(1),Xs(n.pageSize)}}function ZO(t,e){if(1&t&&(cs(0,"div",12),cs(1,"div",13),$s(2),hs(),as(3,GO,3,6,"mat-form-field",14),as(4,KO,2,1,"div",15),hs()),2&t){var n=xs();Aa(2),Qs(" ",n._intl.itemsPerPageLabel," "),Aa(1),ls("ngIf",n._displayedPageSizeOptions.length>1),Aa(1),ls("ngIf",n._displayedPageSizeOptions.length<=1)}}function $O(t,e){if(1&t){var n=vs();cs(0,"button",21),_s("click",function(){return nn(n),xs().firstPage()}),Tn(),cs(1,"svg",7),ds(2,"path",22),hs(),hs()}if(2&t){var i=xs();ls("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),is("aria-label",i._intl.firstPageLabel)}}function XO(t,e){if(1&t){var n=vs();Tn(),Rn(),cs(0,"button",23),_s("click",function(){return nn(n),xs().lastPage()}),Tn(),cs(1,"svg",7),ds(2,"path",24),hs(),hs()}if(2&t){var i=xs();ls("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),is("aria-label",i._intl.lastPageLabel)}}var QO=function(){var t=function t(){g(this,t),this.changes=new q,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of ".concat(n);var i=t*e,r=i<(n=Math.max(n,0))?Math.min(i+e,n):i+e;return"".concat(i+1," \u2013 ").concat(r," of ").concat(n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),JO={provide:QO,deps:[[new Ri,new Mi,QO]],useFactory:function(t){return t||new QO}},tI=new bi("MAT_PAGINATOR_DEFAULT_OPTIONS"),eI=lC(fC(function t(){g(this,t)})),nI=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;if(g(this,n),(a=e.call(this))._intl=t,a._changeDetectorRef=i,a._pageIndex=0,a._length=0,a._pageSizeOptions=[],a._hidePageSize=!1,a._showFirstLastButtons=!1,a.page=new Ru,a._intlChanges=t.changes.subscribe(function(){return a._changeDetectorRef.markForCheck()}),r){var o=r.pageSize,s=r.pageSizeOptions,l=r.hidePageSize,u=r.showFirstLastButtons;null!=o&&(a._pageSize=o),null!=s&&(a._pageSizeOptions=s),null!=l&&(a._hidePageSize=l),null!=u&&(a._showFirstLastButtons=u)}return a}return v(n,[{key:"ngOnInit",value:function(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe()}},{key:"nextPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}}},{key:"previousPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}}},{key:"firstPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}}},{key:"lastPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}}},{key:"hasPreviousPage",value:function(){return this.pageIndex>=1&&0!=this.pageSize}},{key:"hasNextPage",value:function(){var t=this.getNumberOfPages()-1;return this.pageIndex=i.length&&(r=0),i[r]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=lg(t)}}]),n}(lI);return t.\u0275fac=function(e){return cI(e||t)},t.\u0275dir=de({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[qo,Ie]}),t}(),cI=vi(uI),hI=rC.ENTERING+" "+iC.STANDARD_CURVE,dI={indicator:lb("indicator",[db("active-asc, asc",hb({transform:"translateY(0px)"})),db("active-desc, desc",hb({transform:"translateY(10px)"})),pb("active-asc <=> active-desc",ub(hI))]),leftPointer:lb("leftPointer",[db("active-asc, asc",hb({transform:"rotate(-45deg)"})),db("active-desc, desc",hb({transform:"rotate(45deg)"})),pb("active-asc <=> active-desc",ub(hI))]),rightPointer:lb("rightPointer",[db("active-asc, asc",hb({transform:"rotate(45deg)"})),db("active-desc, desc",hb({transform:"rotate(-45deg)"})),pb("active-asc <=> active-desc",ub(hI))]),arrowOpacity:lb("arrowOpacity",[db("desc-to-active, asc-to-active, active",hb({opacity:1})),db("desc-to-hint, asc-to-hint, hint",hb({opacity:.54})),db("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",hb({opacity:0})),pb("* => asc, * => desc, * => active, * => hint, * => void",ub("0ms")),pb("* <=> *",ub(hI))]),arrowPosition:lb("arrowPosition",[pb("* => desc-to-hint, * => desc-to-active",ub(hI,fb([hb({transform:"translateY(-25%)"}),hb({transform:"translateY(0)"})]))),pb("* => hint-to-desc, * => active-to-desc",ub(hI,fb([hb({transform:"translateY(0)"}),hb({transform:"translateY(25%)"})]))),pb("* => asc-to-hint, * => asc-to-active",ub(hI,fb([hb({transform:"translateY(25%)"}),hb({transform:"translateY(0)"})]))),pb("* => hint-to-asc, * => active-to-asc",ub(hI,fb([hb({transform:"translateY(0)"}),hb({transform:"translateY(-25%)"})]))),db("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",hb({transform:"translateY(0)"})),db("hint-to-desc, active-to-desc, desc",hb({transform:"translateY(-25%)"})),db("hint-to-asc, active-to-asc, asc",hb({transform:"translateY(25%)"}))]),allowChildren:lb("allowChildren",[pb("* <=> *",[vb("@*",mb(),{optional:!0})])])},fI=function(){var t=function t(){g(this,t),this.changes=new q,this.sortButtonLabel=function(t){return"Change sorting for ".concat(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),pI={provide:fI,deps:[[new Ri,new Mi,fI]],useFactory:function(t){return t||new fI}},mI=lC(function t(){g(this,t)}),vI=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s){var l;return g(this,n),(l=e.call(this))._intl=t,l._changeDetectorRef=i,l._sort=r,l._columnDef=a,l._focusMonitor=o,l._elementRef=s,l._showIndicatorHint=!1,l._arrowDirection="",l._disableViewStateAnimation=!1,l.arrowPosition="after",l._rerenderSubscription=dt(r.sortChange,r._stateChanges,t.changes).subscribe(function(){l._isSorted()&&l._updateArrowDirection(),!l._isSorted()&&l._viewState&&"active"===l._viewState.toState&&(l._disableViewStateAnimation=!1,l._setAnimationTransitionState({fromState:"active",toState:l._arrowDirection})),i.markForCheck()}),l}return v(n,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){var n=!!e;n!==t._showIndicatorHint&&(t._setIndicatorHintVisible(n),t._changeDetectorRef.markForCheck())})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);var t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}},{key:"_handleClick",value:function(){this._isDisabled()||this._toggleOnInteraction()}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==Iy&&t.keyCode!==Dy||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?"".concat(t,"-to-"):"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=lg(t)}}]),n}(mI);return t.\u0275fac=function(e){return new(e||t)(ss(fI),ss(Kl),ss(uI,8),ss("MAT_SORT_HEADER_COLUMN_DEF",8),ss($_),ss(xl))},t.\u0275cmp=oe({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&_s("click",function(){return e._handleClick()})("keydown",function(t){return e._handleKeydown(t)})("mouseenter",function(){return e._setIndicatorHintVisible(!0)})("mouseleave",function(){return e._setIndicatorHintVisible(!1)}),2&t&&(is("aria-sort",e._getAriaSortAttribute()),js("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[qo],attrs:aI,ngContentSelectors:sI,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(As(),cs(0,"div",0),cs(1,"div",1),Ds(2),hs(),as(3,oI,6,6,"div",2),hs()),2&t&&(js("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),is("tabindex",e._isDisabled()?null:0),Aa(3),ls("ngIf",e._renderArrow()))},directives:[Th],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[dI.indicator,dI.leftPointer,dI.rightPointer,dI.arrowOpacity,dI.arrowPosition,dI.allowChildren]},changeDetection:0}),t}(),gI=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[pI],imports:[[Yh,sC]]}),t}(),yI=[[["caption"]],[["colgroup"],["col"]]],_I=["caption","colgroup, col"];function bI(t){return function(t){y(n,t);var e=k(n);function n(){var t;g(this,n);for(var i=arguments.length,r=new Array(i),a=0;a4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];g(this,t),this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=a,this._needsPositionStickyOnElement=o,this._cachedCellWidths=[]}return v(t,[{key:"clearStickyPositioning",value:function(t,e){var n,i=this,r=[],a=c(t);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.nodeType===o.ELEMENT_NODE){r.push(o);for(var s=0;s3&&void 0!==arguments[3])||arguments[3];if(t.length&&this._isBrowser&&(e.some(function(t){return t})||n.some(function(t){return t}))){var a=t[0],o=a.children.length,s=this._getCellWidths(a,r),l=this._getStickyStartColumnPositions(s,e),u=this._getStickyEndColumnPositions(s,n);this._scheduleStyleChanges(function(){var r,a="rtl"===i.direction,s=a?"right":"left",h=a?"left":"right",d=c(t);try{for(d.s();!(r=d.n()).done;)for(var f=r.value,p=0;p1&&void 0!==arguments[1])||arguments[1];if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;for(var n=[],i=t.children,r=0;r0;r--)e[r]&&(n[r]=i,i+=t[r]);return n}},{key:"_scheduleStyleChanges",value:function(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}]),t}(),WI=function(){var t=function t(e,n){g(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ss(su),ss(xl))},t.\u0275dir=de({type:t,selectors:[["","rowOutlet",""]]}),t}(),YI=function(){var t=function t(e,n){g(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ss(su),ss(xl))},t.\u0275dir=de({type:t,selectors:[["","headerRowOutlet",""]]}),t}(),GI=function(){var t=function t(e,n){g(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ss(su),ss(xl))},t.\u0275dir=de({type:t,selectors:[["","footerRowOutlet",""]]}),t}(),KI=function(){var t=function t(e,n){g(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(ss(su),ss(xl))},t.\u0275dir=de({type:t,selectors:[["","noDataRowOutlet",""]]}),t}(),ZI=function(){var t=function(){function t(e,n,i,r,a,o,s,l,u,c){g(this,t),this._differs=e,this._changeDetectorRef=n,this._elementRef=i,this._dir=a,this._platform=s,this._viewRepeater=l,this._coalescedStyleScheduler=u,this._viewportRuler=c,this._onDestroy=new q,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.viewChange=new pf({start:0,end:Number.MAX_VALUE}),r||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=o,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return v(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create(function(e,n){return t.trackBy?t.trackBy(n.dataIndex,n.data):n}),this._viewportRuler&&this._viewportRuler.change().pipe(jg(this._onDestroy)).subscribe(function(){t._forceRecalculateCellWidths=!0})}},{key:"ngAfterContentChecked",value:function(){this._cacheRowDefs(),this._cacheColumnDefs();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),sy(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var n=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(e,n,function(e,n,i){return t._getEmbeddedViewArgs(e.item,i)},function(t){return t.item.data},function(e){1===e.operation&&e.context&&t._renderCellTemplateForItem(e.record.item.rowDef,e.context)}):e.forEachOperation(function(e,i,r){if(null==e.previousIndex){var a=e.item;t._renderRow(t._rowOutlet,a.rowDef,r,{$implicit:a.data})}else if(null==r)n.remove(i);else{var o=n.get(i);n.move(o,r)}}),this._updateRowIndexContext(),e.forEachIdentityChange(function(t){n.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"setNoDataRow",value:function(t){this._customNoDataRow=t}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var n=this._headerRowDefs.map(function(t){return t.sticky});this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach(function(t){return t.resetStickyChanged()})}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var n=this._footerRowDefs.map(function(t){return t.sticky});this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(function(t){return t.resetStickyChanged()})}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([].concat(h(e),h(n),h(i)),["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach(function(e,n){t._addStickyColumnStyles([e],t._headerRowDefs[n])}),this._rowDefs.forEach(function(e){for(var i=[],r=0;r0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach(function(e,n){return t._renderRow(t._headerRowOutlet,e,n)}),this.updateStickyHeaderRowStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach(function(e,n){return t._renderRow(t._footerRowOutlet,e,n)}),this.updateStickyFooterRowStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var n=this,i=Array.from(e.columns||[]).map(function(t){return n._columnDefsByName.get(t)}),r=i.map(function(t){return t.sticky}),a=i.map(function(t){return t.stickyEnd});this._stickyStyler.updateStickyColumns(t,r,a,!this._fixedLayout||this._forceRecalculateCellWidths)}},{key:"_getRenderedRows",value:function(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.viewContainer.createEmbeddedView(e.template,i,n);return this._renderCellTemplateForItem(e,i),r}},{key:"_renderCellTemplateForItem",value:function(t,e){var n,i=c(this._getCellTemplates(t));try{for(i.s();!(n=i.n()).done;)jI.mostRecentCellOutlet&&jI.mostRecentCellOutlet._viewContainer.createEmbeddedView(n.value,e)}catch(r){i.e(r)}finally{i.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,n=t.length;e0&&void 0!==arguments[0]?arguments[0]:[];return g(this,n),(t=e.call(this))._renderData=new pf([]),t._filter=new pf(""),t._internalPageChanges=new q,t._renderChangesSubscription=A.EMPTY,t.sortingDataAccessor=function(t,e){var n=t[e];if(cg(n)){var i=Number(n);return io?u=1:a0)){var i=Math.ceil(n.length/n.pageSize)-1||0,r=Math.min(n.pageIndex,i);r!==n.pageIndex&&(n.pageIndex=r,e._internalPageChanges.next())}})}},{key:"connect",value:function(){return this._renderData}},{key:"disconnect",value:function(){}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t)}},{key:"filter",get:function(){return this._filter.value},set:function(t){this._filter.next(t)}},{key:"sort",get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()}},{key:"paginator",get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()}}]),n}(oy);function CT(t){return t instanceof Date&&!isNaN(+t)}function ST(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tg,n=CT(t),i=n?+t-e.now():Math.abs(t);return function(t){return t.lift(new xT(i,e))}}var xT=function(){function t(e,n){g(this,t),this.delay=e,this.scheduler=n}return v(t,[{key:"call",value:function(t,e){return e.subscribe(new ET(t,this.delay,this.scheduler))}}]),t}(),ET=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t)).delay=i,a.scheduler=r,a.queue=[],a.active=!1,a.errored=!1,a}return v(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new AT(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(Wg.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(Wg.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var a=Math.max(0,n[0].time-i.now());this.schedule(t,a)}else this.unsubscribe(),e.active=!1}}]),n}(M),AT=function t(e,n){g(this,t),this.time=e,this.notification=n},DT=ty({passive:!0}),OT=function(){var t=function(){function t(e,n){g(this,t),this._platform=e,this._ngZone=n,this._monitoredElements=new Map}return v(t,[{key:"monitor",value:function(t){var e=this;if(!this._platform.isBrowser)return xf;var n=fg(t),i=this._monitoredElements.get(n);if(i)return i.subject;var r=new q,a="cdk-text-field-autofilled",o=function(t){"cdk-text-field-autofill-start"!==t.animationName||n.classList.contains(a)?"cdk-text-field-autofill-end"===t.animationName&&n.classList.contains(a)&&(n.classList.remove(a),e._ngZone.run(function(){return r.next({target:t.target,isAutofilled:!1})})):(n.classList.add(a),e._ngZone.run(function(){return r.next({target:t.target,isAutofilled:!0})}))};return this._ngZone.runOutsideAngular(function(){n.addEventListener("animationstart",o,DT),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:r,unlisten:function(){n.removeEventListener("animationstart",o,DT)}}),r}},{key:"stopMonitoring",value:function(t){var e=fg(t),n=this._monitoredElements.get(e);n&&(n.unlisten(),n.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}},{key:"ngOnDestroy",value:function(){var t=this;this._monitoredElements.forEach(function(e,n){return t.stopMonitoring(n)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Ui($g),Ui(Cc))},t.\u0275prov=Dt({factory:function(){return new t(Ui($g),Ui(Cc))},token:t,providedIn:"root"}),t}(),IT=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Xg]]}),t}(),TT=new bi("MAT_INPUT_VALUE_ACCESSOR"),RT=["button","checkbox","file","hidden","image","radio","range","reset","submit"],PT=0,MT=dC(function t(e,n,i,r){g(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}),FT=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s,l,u,c,h){var d;g(this,n),(d=e.call(this,s,a,o,r))._elementRef=t,d._platform=i,d.ngControl=r,d._autofillMonitor=u,d._formField=h,d._uid="mat-input-".concat(PT++),d.focused=!1,d.stateChanges=new q,d.controlType="mat-input",d.autofilled=!1,d._disabled=!1,d._required=!1,d._type="text",d._readonly=!1,d._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(function(t){return Jg().has(t)});var f=d._elementRef.nativeElement,p=f.nodeName.toLowerCase();return d._inputValueAccessor=l||f,d._previousNativeValue=d.value,d.id=d.id,i.IOS&&c.runOutsideAngular(function(){t.nativeElement.addEventListener("keyup",function(t){var e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),d._isServer=!d._platform.isBrowser,d._isNativeSelect="select"===p,d._isTextarea="textarea"===p,d._isNativeSelect&&(d.controlType=f.multiple?"mat-native-select-multiple":"mat-native-select"),d}return v(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(function(e){t.autofilled=e.isAutofilled,t.stateChanges.next()})}},{key:"ngOnChanges",value:function(){this.stateChanges.next()}},{key:"ngOnDestroy",value:function(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_focusChanged",value:function(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}},{key:"_onInput",value:function(){}},{key:"_dirtyCheckPlaceholder",value:function(){var t,e,n=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(n!==this._previousPlaceholder){var i=this._elementRef.nativeElement;this._previousPlaceholder=n,n?i.setAttribute("placeholder",n):i.removeAttribute("placeholder")}}},{key:"_dirtyCheckNativeValue",value:function(){var t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}},{key:"_validateType",value:function(){RT.indexOf(this._type)}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var t=this._elementRef.nativeElement.validity;return t&&t.badInput}},{key:"setDescribedByIds",value:function(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}},{key:"disabled",get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(t){this._disabled=lg(t),this.focused&&(this.focused=!1,this.stateChanges.next())}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=lg(t)}},{key:"type",get:function(){return this._type},set:function(t){this._type=t||"text",this._validateType(),!this._isTextarea&&Jg().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}},{key:"value",get:function(){return this._inputValueAccessor.value},set:function(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}},{key:"readonly",get:function(){return this._readonly},set:function(t){this._readonly=lg(t)}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}}]),n}(MT);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss($g),ss(dx,10),ss(Xx,8),ss(rE,8),ss(AC),ss(TT,10),ss(OT),ss(Cc),ss(dO,8))},t.\u0275dir=de({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&_s("focus",function(){return e._focusChanged(!0)})("blur",function(){return e._focusChanged(!1)})("input",function(){return e._onInput()}),2&t&&(tl("disabled",e.disabled)("required",e.required),is("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState)("aria-required",e.required.toString()),js("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[gl([{provide:nO,useExisting:t}]),qo,Ie]}),t}(),LT=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[AC],imports:[[IT,pO,sC],IT,pO]}),t}(),NT=["searchSelectInput"],VT=["innerSelectSearch"];function jT(t,e){if(1&t){var n=vs();cs(0,"button",6),_s("click",function(){return nn(n),xs()._reset(!0)}),cs(1,"i",7),$s(2,"close"),hs(),hs()}}var BT=function(t){return{"mat-select-search-inner-multiple":t}},zT=function(){function t(t,e){this.matSelect=t,this.changeDetectorRef=e,this.placeholderLabel=django.gettext("Filter"),this.noEntriesFoundLabel=django.gettext("No entries found"),this.clearSearchInput=!0,this.disableInitialFocus=!1,this.changed=new Ru,this.overlayClassSet=!1,this.change=new Ru,this._onDestroy=new q}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(e):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,e]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[e]=!0):this.matSelect.panelClass=e,this.matSelect.openedChange.pipe(ST(1),jg(this._onDestroy)).subscribe(function(e){e?(t.getWidth(),t.disableInitialFocus||t._focus()):t.clearSearchInput&&t._reset()}),this.matSelect.openedChange.pipe(Rf(1)).pipe(jg(this._onDestroy)).subscribe(function(){t._options=t.matSelect.options,t._options.changes.pipe(jg(t._onDestroy)).subscribe(function(){var e=t.matSelect._keyManager;e&&t.matSelect.panelOpen&&setTimeout(function(){e.setFirstItemActive(),t.getWidth()},1)})}),this.change.pipe(jg(this._onDestroy)).subscribe(function(){t.changeDetectorRef.detectChanges()}),this.initMultipleHandling()},t.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout(function(){t.setOverlayClass()}),this.matSelect.openedChange.pipe(Rf(1),jg(this._onDestroy)).subscribe(function(){t.matSelect.options.changes.pipe(jg(t._onDestroy)).subscribe(function(){t.changeDetectorRef.markForCheck()})})},t.prototype._handleKeydown=function(t){(t.key&&1===t.key.length||t.keyCode>=65&&t.keyCode<=90||t.keyCode>=48&&t.keyCode<=57||t.keyCode===Iy)&&t.stopPropagation()},t.prototype.writeValue=function(t){t!==this._value&&(this._value=t,this.change.emit(t))},t.prototype.onInputChange=function(t){t!==this._value&&(this.initMultiSelectedValues(),this._value=t,this.changed.emit(t),this.change.emit(t))},t.prototype.onBlur=function(t){this.writeValue(t)},t.prototype._focus=function(){if(this.searchSelectInput&&this.matSelect.panel){var t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.searchSelectInput.nativeElement.focus(),t.scrollTop=e}},t.prototype._reset=function(t){this.searchSelectInput&&(this.searchSelectInput.nativeElement.value="",this.onInputChange(""),t&&this._focus())},t.prototype.setOverlayClass=function(){var t=this;this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(jg(this._onDestroy)).subscribe(function(){for(var e,n=t.searchSelectInput.nativeElement;n=n.parentElement;)if(n.classList.contains("cdk-overlay-pane")){e=n;break}e&&e.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)},t.prototype.initMultipleHandling=function(){var t=this;this.matSelect.valueChange.pipe(jg(this._onDestroy)).subscribe(function(e){if(t.matSelect.multiple){var n=!1;if(t._value&&t._value.length&&t.previousSelectedValues&&Array.isArray(t.previousSelectedValues)){e&&Array.isArray(e)||(e=[]);var i=t.matSelect.options.map(function(t){return t.value});t.previousSelectedValues.forEach(function(t){-1===e.indexOf(t)&&-1===i.indexOf(t)&&(e.push(t),n=!0)})}n&&t.matSelect._onChange(e),t.previousSelectedValues=e}})},t.prototype.getWidth=function(){if(this.innerSelectSearch&&this.innerSelectSearch.nativeElement){for(var t,e=this.innerSelectSearch.nativeElement;e=e.parentElement;)if(e.classList.contains("mat-select-panel")){t=e;break}t&&(this.innerSelectSearch.nativeElement.style.width=t.clientWidth+"px")}},t.prototype.initMultiSelectedValues=function(){this.matSelect.multiple&&!this._value&&(this.previousSelectedValues=this.matSelect.options.filter(function(t){return t.selected}).map(function(t){return t.value}))},t.\u0275fac=function(e){return new(e||t)(ss(FO),ss(Kl))},t.\u0275cmp=oe({type:t,selectors:[["uds-mat-select-search"]],viewQuery:function(t,e){if(1&t&&(Wu(NT,!0,xl),Wu(VT,!0,xl)),2&t){var n=void 0;qu(n=Xu())&&(e.searchSelectInput=n.first),qu(n=Xu())&&(e.innerSelectSearch=n.first)}},inputs:{placeholderLabel:"placeholderLabel",noEntriesFoundLabel:"noEntriesFoundLabel",clearSearchInput:"clearSearchInput",disableInitialFocus:"disableInitialFocus"},outputs:{changed:"changed"},features:[gl([{provide:zS,useExisting:xt(function(){return t}),multi:!0}])],decls:6,vars:5,consts:[["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner","mat-typography","mat-datepicker-content","mat-tab-header",3,"ngClass"],["innerSelectSearch",""],["matInput","","autocomplete","off",1,"mat-select-search-input",3,"placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ds(0,"input",0),cs(1,"div",1,2),cs(3,"input",3,4),_s("keydown",function(t){return e._handleKeydown(t)})("input",function(t){return e.onInputChange(t.target.value)})("blur",function(t){return e.onBlur(t.target.value)}),hs(),as(5,jT,3,0,"button",5),hs()),2&t&&(Aa(1),ls("ngClass",wu(3,BT,e.matSelect.multiple)),Aa(2),ls("placeholder",e.placeholderLabel),Aa(2),ls("ngIf",e.value))},directives:[FT,Ah,Th,DS],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;border-bottom-width:1px;border-bottom-style:solid;z-index:100;font-size:inherit;box-shadow:none;border-radius:0}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:100%} .mat-select-search-panel{transform:none!important;overflow-x:hidden}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:4px;top:5px} .cdk-overlay-pane-select-search{margin-top:-50px}"],changeDetection:0}),t}();function HT(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New user permission for"),hs())}function UT(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New group permission for"),hs())}function qT(t,e){if(1&t&&(cs(0,"mat-option",11),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Xs(n.text)}}function WT(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",12),_s("changed",function(t){return nn(n),xs().filterUser=t}),hs()}}function YT(t,e){if(1&t&&(cs(0,"mat-option",11),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Xs(n.text)}}function GT(t,e){if(1&t&&(cs(0,"mat-option",11),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Xs(n.text)}}var KT=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.filterUser="",this.authenticators=[],this.entities=[],this.permissions=[{id:"1",text:django.gettext("Read only")},{id:"2",text:django.gettext("Full Access")}],this.authenticator="",this.entity="",this.permission="1",this.onSave=new Ru(!0)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"50%";return e.gui.dialog.open(t,{width:r,data:{type:n,item:i},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){e.forEach(function(e){t.authenticators.push({id:e.id,text:e.name})})})},t.prototype.changeAuth=function(t){var e=this;this.entities.length=0,this.entity="",this.rest.authenticators.detail(t,this.data.type+"s").summary().subscribe(function(t){t.forEach(function(t){e.entities.push({id:t.id,text:t.name})})})},t.prototype.save=function(){this.onSave.emit({authenticator:this.authenticator,entity:this.entity,permissision:this.permission}),this.dialogRef.close()},t.prototype.filteredEntities=function(){var t=this,e=new Array;return this.entities.forEach(function(n){(""===t.filterUser||n.text.toLocaleLowerCase().includes(t.filterUser.toLocaleLowerCase()))&&e.push(n)}),e},t.prototype.getFieldLabel=function(t){return"user"===t?django.gettext("User"):"group"===t?django.gettext("Group"):"auth"===t?django.gettext("Authenticator"):django.gettext("Permission")},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-new-permission"]],decls:24,vars:13,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["titleGroup",""],[1,"container"],[3,"placeholder","ngModel","valueChange","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"placeholder","ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){if(1&t&&(cs(0,"h4",0),as(1,HT,2,0,"uds-translate",1),ds(2,"b",2),as(3,UT,2,0,"ng-template",null,3,ec),hs(),cs(5,"mat-dialog-content"),cs(6,"div",4),cs(7,"mat-form-field"),cs(8,"mat-select",5),_s("valueChange",function(t){return e.changeAuth(t)})("ngModelChange",function(t){return e.authenticator=t}),as(9,qT,2,2,"mat-option",6),hs(),hs(),cs(10,"mat-form-field"),cs(11,"mat-select",7),_s("ngModelChange",function(t){return e.entity=t}),as(12,WT,1,0,"uds-mat-select-search",8),as(13,YT,2,2,"mat-option",6),hs(),hs(),cs(14,"mat-form-field"),cs(15,"mat-select",7),_s("ngModelChange",function(t){return e.permission=t}),as(16,GT,2,2,"mat-option",6),hs(),hs(),hs(),hs(),cs(17,"mat-dialog-actions"),cs(18,"button",9),cs(19,"uds-translate"),$s(20,"Cancel"),hs(),hs(),cs(21,"button",10),_s("click",function(){return e.save()}),cs(22,"uds-translate"),$s(23,"Ok"),hs(),hs(),hs()),2&t){var n=os(4);Aa(1),ls("ngIf","user"===e.data.type)("ngIfElse",n),Aa(1),ls("innerHTML",e.data.item.name,Dr),Aa(6),ls("placeholder",e.getFieldLabel("auth"))("ngModel",e.authenticator),Aa(1),ls("ngForOf",e.authenticators),Aa(2),ls("placeholder",e.getFieldLabel(e.data.type))("ngModel",e.entity),Aa(1),ls("ngIf",e.entities.length>10),Aa(1),ls("ngForOf",e.filteredEntities()),Aa(2),ls("placeholder",e.getFieldLabel("perm"))("ngModel",e.permission),Aa(1),ls("ngForOf",e.permissions)}},directives:[gS,Th,yS,fO,FO,px,tE,Oh,_S,DS,vS,TS,$C,zT],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function ZT(t,e){if(1&t){var n=vs();cs(0,"div",11),cs(1,"div",12),$s(2),hs(),cs(3,"div",13),$s(4),cs(5,"a",14),_s("click",function(){nn(n);var t=e.$implicit;return xs(2).revokePermission(t)}),cs(6,"i",15),$s(7,"close"),hs(),hs(),hs(),hs()}if(2&t){var i=e.$implicit;Aa(2),Js(" ",i.entity_name,"@",i.auth_name," "),Aa(2),Qs(" ",i.perm_name," \xa0")}}function $T(t,e){if(1&t){var n=vs();cs(0,"div",7),cs(1,"div",8),cs(2,"div",9),_s("click",function(t){nn(n);var i=e.$implicit;return xs().newPermission(i),t.preventDefault()}),cs(3,"uds-translate"),$s(4,"New permission..."),hs(),hs(),as(5,ZT,8,3,"div",10),hs(),hs()}if(2&t){var i=e.$implicit;Aa(5),ls("ngForOf",i)}}var XT=function(t,e){return[t,e]},QT=function(){function t(t,e,n){this.api=t,this.dialogRef=e,this.data=n,this.userPermissions=[],this.groupPermissions=[]}return t.launch=function(e,n,i){var r=window.innerWidth<800?"90%":"60%";e.gui.dialog.open(t,{width:r,data:{rest:n,item:i},disableClose:!1})},t.prototype.ngOnInit=function(){this.reload()},t.prototype.reload=function(){var t=this;this.data.rest.getPermissions(this.data.item.id).subscribe(function(e){t.updatePermissions(e)})},t.prototype.updatePermissions=function(t){var e=this;this.userPermissions.length=0,this.groupPermissions.length=0,t.forEach(function(t){"user"===t.type?e.userPermissions.push(t):e.groupPermissions.push(t)})},t.prototype.revokePermission=function(t){var e=this;this.api.gui.yesno(django.gettext("Remove"),django.gettext("Confirm revokation of permission")+" "+t.entity_name+"@"+t.auth_name+" "+t.perm_name+"").subscribe(function(n){n&&e.data.rest.revokePermission([t.id]).subscribe(function(t){e.reload()})})},t.prototype.newPermission=function(t){var e=this,n=t===this.userPermissions?"user":"group";KT.launch(this.api,n,this.data.item).subscribe(function(t){e.data.rest.addPermission(e.data.item.id,n+"s",t.entity,t.permissision).subscribe(function(t){e.reload()})})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-permissions-form"]],decls:17,vars:5,consts:[["mat-dialog-title",""],[3,"innerHTML"],[1,"titles"],[1,"title"],[1,"permissions"],["class","content",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","primary"],[1,"content"],[1,"perms"],[1,"perm","new",3,"click"],["class","perm",4,"ngFor","ngForOf"],[1,"perm"],[1,"owner"],[1,"permission"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Permissions for"),hs(),$s(3,"\xa0"),ds(4,"b",1),hs(),cs(5,"mat-dialog-content"),cs(6,"div",2),cs(7,"uds-translate",3),$s(8,"Users"),hs(),cs(9,"uds-translate",3),$s(10,"Groups"),hs(),hs(),cs(11,"div",4),as(12,$T,6,1,"div",5),hs(),hs(),cs(13,"mat-dialog-actions"),cs(14,"button",6),cs(15,"uds-translate"),$s(16,"Ok"),hs(),hs(),hs()),2&t&&(Aa(4),ls("innerHTML",e.data.item.name,Dr),Aa(8),ls("ngForOf",Cu(2,XT,e.userPermissions,e.groupPermissions)))},directives:[gS,TS,yS,Oh,_S,DS,vS],styles:[".titles[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;margin-bottom:.4rem}.title[_ngcontent-%COMP%]{font-size:1.4rem}.permissions[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start}.perms[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);margin-bottom:1rem;margin-right:1rem;padding:.5rem}.perm[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.perm[_ngcontent-%COMP%]:hover:not(.new){background-color:#333;color:#fff;cursor:default}.owner[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.new[_ngcontent-%COMP%]{color:#00f;justify-content:center}.new[_ngcontent-%COMP%]:hover{color:#fff;background-color:#00f;cursor:pointer}.content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;justify-content:space-between}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),JT=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")],tR=[django.gettext("January"),django.gettext("February"),django.gettext("March"),django.gettext("April"),django.gettext("May"),django.gettext("June"),django.gettext("July"),django.gettext("August"),django.gettext("September"),django.gettext("October"),django.gettext("November"),django.gettext("December")],eR={days:JT,shortDays:nR(JT),months:tR,shortMonths:nR(tR),AM:"AM",PM:"PM",am:"am",pm:"pm"};function nR(t){var e=[];return t.forEach(function(t){e.push(t.substr(0,3))}),e}function iR(t,e,n){return rR(t,e,n)}function rR(t,e,n,i){i=i||{},e=e||new Date,(n=n||eR).formats=n.formats||{};var r=e.getTime();return(i.utc||"number"==typeof i.timezone)&&(e=function(t){var e;return e=6e4*(t.getTimezoneOffset()||0),new Date(t.getTime()+e)}(e)),"number"==typeof i.timezone&&(e=new Date(e.getTime()+6e4*i.timezone)),t.replace(/%([-_0]?.)/g,function(t,a){var o,s,l,u,c,h,d;if(s=null,u=null,2===a.length){if("-"===(s=a[0]))u="";else if("_"===s)u=" ";else{if("0"!==s)return t;u="0"}a=a[1]}switch(a){case"A":return n.days[e.getDay()];case"a":return n.shortDays[e.getDay()];case"B":return n.months[e.getMonth()];case"b":return n.shortMonths[e.getMonth()];case"C":return aR(Math.floor(e.getFullYear()/100),u);case"D":return rR(n.formats.D||"%m/%d/%y",e,n);case"d":return aR(e.getDate(),u);case"e":return e.getDate();case"F":return rR(n.formats.F||"%Y-%m-%d",e,n);case"H":return aR(e.getHours(),u);case"h":return n.shortMonths[e.getMonth()];case"I":return aR(oR(e),u);case"j":return h=new Date(e.getFullYear(),0,1),aR(Math.ceil((e.getTime()-h.getTime())/864e5),3);case"k":return aR(e.getHours(),void 0===u?" ":u);case"L":return aR(Math.floor(r%1e3),3);case"l":return aR(oR(e),void 0===u?" ":u);case"M":return aR(e.getMinutes(),u);case"m":return aR(e.getMonth()+1,u);case"n":return"\n";case"o":return String(e.getDate())+function(t){var e,n;if(e=t%10,(n=t%100)>=11&&n<=13||0===e||e>=4)return"th";switch(e){case 1:return"st";case 2:return"nd";case 3:return"rd"}}(e.getDate());case"P":case"p":return"";case"R":return rR(n.formats.R||"%H:%M",e,n);case"r":return rR(n.formats.r||"%I:%M:%S %p",e,n);case"S":return aR(e.getSeconds(),u);case"s":return Math.floor(r/1e3);case"T":return rR(n.formats.T||"%H:%M:%S",e,n);case"t":return"\t";case"U":return aR(sR(e,"sunday"),u);case"u":return 0===(o=e.getDay())?7:o;case"v":return rR(n.formats.v||"%e-%b-%Y",e,n);case"W":return aR(sR(e,"monday"),u);case"w":return e.getDay();case"Y":return e.getFullYear();case"y":return(d=String(e.getFullYear())).slice(d.length-2);case"Z":return i.utc?"GMT":(c=e.toString().match(/\((\w+)\)/))&&c[1]||"";case"z":return i.utc?"+0000":((l="number"==typeof i.timezone?i.timezone:-e.getTimezoneOffset())<0?"-":"+")+aR(Math.abs(l/60))+aR(l%60);default:return a}})}function aR(t,e,n){"number"==typeof e&&(n=e,e="0"),e=null==e?"0":e,n=null==n?2:n;var i=String(t);if(e)for(;i.length12&&(e-=12),e}function sR(t,e){var n,i;return e=e||"sunday",i=t.getDay(),"monday"===e&&(0===i?i=6:i--),n=new Date(t.getFullYear(),0,1),Math.floor(((t-n)/864e5+7-i)/7)}function lR(t){return t.replace(/./g,function(t){switch(t){case"a":case"A":return"%p";case"b":case"d":case"m":case"w":case"W":case"y":case"Y":return"%"+t;case"c":return"%FT%TZ";case"D":return"%a";case"e":return"%z";case"f":return"%I:%M";case"F":return"%F";case"h":case"g":return"%I";case"H":case"G":return"%H";case"i":return"%M";case"I":return"";case"j":return"%d";case"l":return"%A";case"L":return"";case"M":return"%b";case"n":return"%m";case"N":return"%b";case"o":return"%W";case"O":return"%z";case"P":return"%R %p";case"r":return"%a, %d %b %Y %T %z";case"s":return"%S";case"S":case"t":return"";case"T":return"%Z";case"u":return"0";case"U":return"";case"z":return"%j";case"Z":return"z";default:return t}})}function uR(t,e,n){var i;if(void 0===n&&(n=null),"None"===e||null==e)e=7226578800,i=django.gettext("Never");else{var r=django.get_format(t);n&&(r+=n),i=iR(lR(r),new Date(1e3*e))}return i}function cR(t){return"yes"===t||!0===t||"true"===t||1===t}var hR=n("dunZ");function dR(t){return void 0!==t.changingThisBreaksApplicationSecurity&&(t=t.changingThisBreaksApplicationSecurity.replace(/<.*>/g,"")),'"'+(t=""+t).replace('"','""')+'"'}function fR(t){var e="";t.columns.forEach(function(t){e+=dR(t.title)+","}),e=e.slice(0,-1)+"\r\n",t.dataSource.data.forEach(function(n){t.columns.forEach(function(t){var i=n[t.name];switch(t.type){case TA.DATE:i=uR("SHORT_DATE_FORMAT",i);break;case TA.DATETIME:i=uR("SHORT_DATETIME_FORMAT",i);break;case TA.DATETIMESEC:i=uR("SHORT_DATE_FORMAT",i," H:i:s");break;case TA.TIME:i=uR("TIME_FORMAT",i)}e+=dR(i)+","}),e=e.slice(0,-1)+"\r\n"});var n=new Blob([e],{type:"text/csv"});setTimeout(function(){Object(hR.saveAs)(n,t.title+".csv")},100)}function pR(t,e){if(1&t&&(Tn(),ds(0,"circle",3)),2&t){var n=xs();Vs("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),is("r",n._getCircleRadius())}}function mR(t,e){if(1&t&&(Tn(),ds(0,"circle",3)),2&t){var n=xs();Vs("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),is("r",n._getCircleRadius())}}var vR=uC(function t(e){g(this,t),this._elementRef=e},"primary"),gR=new bi("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}}),yR=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o){var s;g(this,n),(s=e.call(this,t))._elementRef=t,s._document=r,s._diameter=100,s._value=0,s._fallbackAnimation=!1,s.mode="determinate";var l=n._diameters;return s._spinnerAnimationLabel=s._getSpinnerAnimationLabel(),l.has(r.head)||l.set(r.head,new Set([100])),s._fallbackAnimation=i.EDGE||i.TRIDENT,s._noopAnimations="NoopAnimations"===a&&!!o&&!o._forceAnimations,o&&(o.diameter&&(s.diameter=o.diameter),o.strokeWidth&&(s.strokeWidth=o.strokeWidth)),s}return v(n,[{key:"ngOnInit",value:function(){var t=this._elementRef.nativeElement;this._styleRoot=ny(t)||this._document.head,this._attachStyleNode();var e="mat-progress-spinner-indeterminate".concat(this._fallbackAnimation?"-fallback":"","-animation");t.classList.add(e)}},{key:"_getCircleRadius",value:function(){return(this.diameter-10)/2}},{key:"_getViewBox",value:function(){var t=2*this._getCircleRadius()+this.strokeWidth;return"0 0 ".concat(t," ").concat(t)}},{key:"_getStrokeCircumference",value:function(){return 2*Math.PI*this._getCircleRadius()}},{key:"_getStrokeDashOffset",value:function(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}},{key:"_getCircleStrokeWidth",value:function(){return this.strokeWidth/this.diameter*100}},{key:"_attachStyleNode",value:function(){var t=this._styleRoot,e=this._diameter,i=n._diameters,r=i.get(t);if(!r||!r.has(e)){var a=this._document.createElement("style");a.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),a.textContent=this._getAnimationText(),t.appendChild(a),r||(r=new Set,i.set(t,r)),r.add(e)}}},{key:"_getAnimationText",value:function(){var t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,"".concat(.95*t)).replace(/END_VALUE/g,"".concat(.2*t)).replace(/DIAMETER/g,"".concat(this._spinnerAnimationLabel))}},{key:"_getSpinnerAnimationLabel",value:function(){return this.diameter.toString().replace(".","_")}},{key:"diameter",get:function(){return this._diameter},set:function(t){this._diameter=ug(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}},{key:"strokeWidth",get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=ug(t)}},{key:"value",get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,ug(t)))}}]),n}(vR);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss($g),ss(ah,8),ss(Xw,8),ss(gR))},t.\u0275cmp=oe({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(is("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),Vs("width",e.diameter,"px")("height",e.diameter,"px"),js("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[qo],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(Tn(),cs(0,"svg",0),as(1,pR,1,9,"circle",1),as(2,mR,1,7,"circle",2),hs()),2&t&&(Vs("width",e.diameter,"px")("height",e.diameter,"px"),ls("ngSwitch","indeterminate"===e.mode),is("viewBox",e._getViewBox()),Aa(1),ls("ngSwitchCase",!0),Aa(1),ls("ngSwitchCase",!1))},directives:[Fh,Lh],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n"],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t}(),_R=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[sC,Yh],sC]}),t}(),bR=["mat-menu-item",""],kR=["*"];function wR(t,e){if(1&t){var n=vs();cs(0,"div",0),_s("keydown",function(t){return nn(n),xs()._handleKeydown(t)})("click",function(){return nn(n),xs().closed.emit("click")})("@transformMenu.start",function(t){return nn(n),xs()._onAnimationStart(t)})("@transformMenu.done",function(t){return nn(n),xs()._onAnimationDone(t)}),cs(1,"div",1),Ds(2),hs(),hs()}if(2&t){var i=xs();ls("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),is("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var CR={transformMenu:lb("transformMenu",[db("void",hb({opacity:0,transform:"scale(0.8)"})),pb("void => enter",ub("120ms cubic-bezier(0, 0, 0.2, 1)",hb({opacity:1,transform:"scale(1)"}))),pb("* => void",ub("100ms 25ms linear",hb({opacity:0})))]),fadeInItems:lb("fadeInItems",[db("showing",hb({opacity:1})),pb("void => *",[hb({opacity:0}),ub("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},SR=new bi("MatMenuContent"),xR=function(){var t=function(){function t(e,n,i,r,a,o,s){g(this,t),this._template=e,this._componentFactoryResolver=n,this._appRef=i,this._injector=r,this._viewContainerRef=a,this._document=o,this._changeDetectorRef=s,this._attached=new q}return v(t,[{key:"attach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._portal||(this._portal=new gy(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new by(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}},{key:"detach",value:function(){this._portal.isAttached&&this._portal.detach()}},{key:"ngOnDestroy",value:function(){this._outlet&&this._outlet.dispose()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(eu),ss(kl),ss(Yc),ss(Ho),ss(su),ss(ah),ss(Kl))},t.\u0275dir=de({type:t,selectors:[["ng-template","matMenuContent",""]],features:[gl([{provide:SR,useExisting:t}])]}),t}(),ER=new bi("MAT_MENU_PANEL"),AR=cC(lC(function t(){g(this,t)})),DR=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,o){var s;return g(this,n),(s=e.call(this))._elementRef=t,s._focusMonitor=r,s._parentMenu=o,s.role="menuitem",s._hovered=new q,s._focused=new q,s._highlighted=!1,s._triggersSubmenu=!1,o&&o.addItem&&o.addItem(a(s)),s}return v(n,[{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}},{key:"ngAfterViewInit",value:function(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}},{key:"ngOnDestroy",value:function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_checkDisabled",value:function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}},{key:"_handleMouseEnter",value:function(){this._hovered.next(this)}},{key:"getLabel",value:function(){for(var t,e,n=this._elementRef.nativeElement.cloneNode(!0),i=n.querySelectorAll("mat-icon, .material-icons"),r=0;r0&&void 0!==arguments[0]?arguments[0]:"program";this.lazyContent?this._ngZone.onStable.pipe(Rf(1)).subscribe(function(){return t._focusFirstItem(e)}):this._focusFirstItem(e)}},{key:"_focusFirstItem",value:function(t){var e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}}},{key:"resetActiveItem",value:function(){this._keyManager.setActiveItem(-1)}},{key:"setElevation",value:function(t){var e=Math.min(4+t,24),n="mat-elevation-z".concat(e),i=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[n]=!0,this._previousElevation=n)}},{key:"setPositionClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.xPosition,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.yPosition,n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}},{key:"_startAnimation",value:function(){this._panelAnimationState="enter"}},{key:"_resetAnimation",value:function(){this._panelAnimationState="void"}},{key:"_onAnimationDone",value:function(t){this._animationDone.next(t),this._isAnimating=!1}},{key:"_onAnimationStart",value:function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}},{key:"_updateDirectDescendants",value:function(){var t=this;this._allItems.changes.pipe(Ff(this._allItems)).subscribe(function(e){t._directDescendantItems.reset(e.filter(function(e){return e._parentMenu===t})),t._directDescendantItems.notifyOnChanges()})}},{key:"xPosition",get:function(){return this._xPosition},set:function(t){this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=lg(t)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=lg(t)}},{key:"panelClass",set:function(t){var e=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(function(t){e._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(function(t){e._classList[t]=!0}),this._elementRef.nativeElement.className="")}},{key:"classList",get:function(){return this.panelClass},set:function(t){this.panelClass=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Cc),ss(OR))},t.\u0275dir=de({type:t,contentQueries:function(t,e,n){var i;1&t&&(Ku(n,SR,!0),Ku(n,DR,!0),Ku(n,DR,!1)),2&t&&(qu(i=Xu())&&(e.lazyContent=i.first),qu(i=Xu())&&(e._allItems=i),qu(i=Xu())&&(e.items=i))},viewQuery:function(t,e){var n;1&t&&Yu(eu,!0),2&t&&qu(n=Xu())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t}(),RR=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){return g(this,n),e.call(this,t,i,r)}return n}(TR);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Cc),ss(OR))},t.\u0275cmp=oe({type:t,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,e){2&t&&is("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[gl([{provide:ER,useExisting:t}]),qo],ngContentSelectors:kR,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(As(),as(0,wR,3,6,"ng-template"))},directives:[Ah],styles:['.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;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}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[CR.transformMenu,CR.fadeInItems]},changeDetection:0}),t}(),PR=new bi("mat-menu-scroll-strategy"),MR={provide:PR,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},FR=ty({passive:!0}),LR=function(){var t=function(){function t(e,n,i,r,a,o,s,l){var u=this;g(this,t),this._overlay=e,this._element=n,this._viewContainerRef=i,this._menuItemInstance=o,this._dir=s,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=A.EMPTY,this._hoverSubscription=A.EMPTY,this._menuCloseSubscription=A.EMPTY,this._handleTouchStart=function(){return u._openedBy="touch"},this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new Ru,this.onMenuOpen=this.menuOpened,this.menuClosed=new Ru,this.onMenuClose=this.menuClosed,this._scrollStrategy=r,this._parentMaterialMenu=a instanceof TR?a:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,FR),o&&(o._triggersSubmenu=this.triggersSubmenu())}return v(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,FR),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this._menuItemInstance||!this._parentMaterialMenu)}},{key:"toggleMenu",value:function(){return this._menuOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof TR&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.close.emit()}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}},{key:"_destroyMenu",value:function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),e instanceof TR?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Td(function(t){return"void"===t.toState}),Rf(1),jg(e.lazyContent._attached)).subscribe({next:function(){return e.lazyContent.detach()},complete:function(){return t._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),e.lazyContent&&e.lazyContent.detach())}}},{key:"_initMenu",value:function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},{key:"_setMenuElevation",value:function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}},{key:"_restoreFocus",value:function(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null}},{key:"_setIsMenuOpen",value:function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}},{key:"_checkMenu",value:function(){}},{key:"_createOverlay",value:function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}},{key:"_getOverlayConfig",value:function(){return new Yy({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}},{key:"_subscribeToPositions",value:function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe(function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}},{key:"_setPosition",value:function(t){var e=l("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],r=l("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),a=r[0],o=r[1],s=a,u=o,c=n,h=i,d=0;this.triggersSubmenu()?(h=n="before"===this.menu.xPosition?"start":"end",i=c="end"===n?"start":"end",d="bottom"===a?8:-8):this.menu.overlapTrigger||(s="top"===a?"bottom":"top",u="top"===o?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:c,overlayY:a,offsetY:d},{originX:i,originY:s,overlayX:h,overlayY:a,offsetY:d},{originX:n,originY:u,overlayX:c,overlayY:o,offsetY:-d},{originX:i,originY:u,overlayX:h,overlayY:o,offsetY:-d}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return dt(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:Od(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Td(function(e){return e!==t._menuItemInstance}),Td(function(){return t._menuOpen})):Od(),n)}},{key:"_handleMousedown",value:function(t){G_(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;e!==Dy&&e!==Iy||(this._openedBy="keyboard"),this.triggersSubmenu()&&(e===Fy&&"ltr"===this.dir||e===Py&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}},{key:"_handleClick",value:function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}},{key:"_handleHover",value:function(){var t=this;this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Td(function(e){return e===t._menuItemInstance&&!e.disabled}),ST(0,Ag)).subscribe(function(){t._openedBy="mouse",t.menu instanceof TR&&t.menu._isAnimating?t.menu._animationDone.pipe(Rf(1),ST(0,Ag),jg(t._parentMaterialMenu._hovered())).subscribe(function(){return t.openMenu()}):t.openMenu()}))}},{key:"_getPortal",value:function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new gy(this.menu.templateRef,this._viewContainerRef)),this._portal}},{key:"_deprecatedMatMenuTriggerFor",get:function(){return this.menu},set:function(t){this.menu=t}},{key:"menu",get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(function(t){e._destroyMenu(),"click"!==t&&"tab"!==t||!e._parentMaterialMenu||e._parentMaterialMenu.closed.emit(t)})))}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(h_),ss(xl),ss(su),ss(PR),ss(ER,8),ss(DR,10),ss(ry,8),ss($_))},t.\u0275dir=de({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&_s("mousedown",function(t){return e._handleMousedown(t)})("keydown",function(t){return e._handleKeydown(t)})("click",function(t){return e._handleClick(t)}),2&t&&is("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t}(),NR=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[MR],imports:[sC]}),t}(),VR=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[MR],imports:[[Yh,sC,VC,g_,NR],fy,sC,NR]}),t}(),jR=function(){var t=function(){function t(){g(this,t),this._vertical=!1,this._inset=!1}return v(t,[{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=lg(t)}},{key:"inset",get:function(){return this._inset},set:function(t){this._inset=lg(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(is("aria-orientation",e.vertical?"vertical":"horizontal"),js("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},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}),t}(),BR=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[sC],sC]}),t}(),zR=function(){function t(){}return t.prototype.transform=function(t,e){return t.sort(void 0===e?function(t,e){return t>e?1:-1}:function(t,n){return t[e]>n[e]?1:-1})},t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=fe({name:"sort",type:t,pure:!0}),t}(),HR=["trigger"];function UR(t,e){1&t&&ds(0,"img",36),2&t&&ls("src",xs().icon,Or)}function qR(t,e){if(1&t){var n=vs();cs(0,"button",46),_s("click",function(){nn(n);var t=e.$implicit,i=xs(5);return i.newAction.emit({param:t,table:i})}),hs()}if(2&t){var i=e.$implicit,r=xs(5);ls("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Dr)}}function WR(t,e){if(1&t&&(fs(0),cs(1,"button",42),$s(2),hs(),cs(3,"mat-menu",43,44),as(5,qR,1,1,"button",45),Au(6,"sort"),hs(),ps()),2&t){var n=e.$implicit,i=os(4);Aa(1),ls("matMenuTriggerFor",i),Aa(1),Xs(n.key),Aa(1),ls("overlapTrigger",!1),Aa(2),ls("ngForOf",Ou(6,4,n.value,"name"))}}function YR(t,e){if(1&t&&(fs(0),cs(1,"mat-menu",37,38),as(3,WR,7,7,"ng-container",39),Au(4,"keyvalue"),hs(),cs(5,"a",40),cs(6,"i",17),$s(7,"insert_drive_file"),hs(),cs(8,"span",41),cs(9,"uds-translate"),$s(10,"New"),hs(),hs(),cs(11,"i",17),$s(12,"arrow_drop_down"),hs(),hs(),ps()),2&t){var n=os(2),i=xs(3);Aa(1),ls("overlapTrigger",!1),Aa(2),ls("ngForOf",Du(4,3,i.grpTypes)),Aa(2),ls("matMenuTriggerFor",n)}}function GR(t,e){if(1&t){var n=vs();cs(0,"button",46),_s("click",function(){nn(n);var t=e.$implicit,i=xs(4);return i.newAction.emit({param:t,table:i})}),hs()}if(2&t){var i=e.$implicit,r=xs(4);ls("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Dr)}}function KR(t,e){if(1&t&&(fs(0),cs(1,"mat-menu",37,38),as(3,GR,1,1,"button",45),Au(4,"sort"),hs(),cs(5,"a",40),cs(6,"i",17),$s(7,"insert_drive_file"),hs(),cs(8,"span",41),cs(9,"uds-translate"),$s(10,"New"),hs(),hs(),cs(11,"i",17),$s(12,"arrow_drop_down"),hs(),hs(),ps()),2&t){var n=os(2),i=xs(3);Aa(1),ls("overlapTrigger",!1),Aa(2),ls("ngForOf",Ou(4,3,i.oTypes,"name")),Aa(2),ls("matMenuTriggerFor",n)}}function ZR(t,e){if(1&t&&(fs(0),as(1,YR,13,5,"ng-container",8),as(2,KR,13,6,"ng-container",8),ps()),2&t){var n=xs(2);Aa(1),ls("ngIf",n.newGrouped),Aa(1),ls("ngIf",!n.newGrouped)}}function $R(t,e){if(1&t){var n=vs();fs(0),cs(1,"a",47),_s("click",function(){nn(n);var t=xs(2);return t.newAction.emit({param:void 0,table:t})}),cs(2,"i",17),$s(3,"insert_drive_file"),hs(),cs(4,"span",41),cs(5,"uds-translate"),$s(6,"New"),hs(),hs(),hs(),ps()}}function XR(t,e){if(1&t&&(fs(0),as(1,ZR,3,2,"ng-container",8),as(2,$R,7,0,"ng-container",8),ps()),2&t){var n=xs();Aa(1),ls("ngIf",null!=n.oTypes&&0!=n.oTypes.length),Aa(1),ls("ngIf",null!=n.oTypes&&0==n.oTypes.length)}}function QR(t,e){if(1&t){var n=vs();fs(0),cs(1,"a",48),_s("click",function(){nn(n);var t=xs();return t.emitIfSelection(t.editAction)}),cs(2,"i",17),$s(3,"edit"),hs(),cs(4,"span",41),cs(5,"uds-translate"),$s(6,"Edit"),hs(),hs(),hs(),ps()}if(2&t){var i=xs();Aa(1),ls("disabled",1!=i.selection.selected.length)}}function JR(t,e){if(1&t){var n=vs();fs(0),cs(1,"a",48),_s("click",function(){return nn(n),xs().permissions()}),cs(2,"i",17),$s(3,"perm_identity"),hs(),cs(4,"span",41),cs(5,"uds-translate"),$s(6,"Permissions"),hs(),hs(),hs(),ps()}if(2&t){var i=xs();Aa(1),ls("disabled",1!=i.selection.selected.length)}}function tP(t,e){if(1&t){var n=vs();cs(0,"a",50),_s("click",function(){nn(n);var t=e.$implicit;return xs(2).emitCustom(t)}),hs()}if(2&t){var i=e.$implicit;ls("disabled",xs(2).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function eP(t,e){if(1&t&&(fs(0),as(1,tP,1,2,"a",49),ps()),2&t){var n=xs();Aa(1),ls("ngForOf",n.getcustomButtons())}}function nP(t,e){if(1&t){var n=vs();fs(0),cs(1,"a",51),_s("click",function(){return nn(n),xs().export()}),cs(2,"i",17),$s(3,"import_export"),hs(),cs(4,"span",41),cs(5,"uds-translate"),$s(6,"Export"),hs(),hs(),hs(),ps()}}function iP(t,e){if(1&t){var n=vs();fs(0),cs(1,"a",52),_s("click",function(){nn(n);var t=xs();return t.emitIfSelection(t.deleteAction,!0)}),cs(2,"i",17),$s(3,"delete_forever"),hs(),cs(4,"span",41),cs(5,"uds-translate"),$s(6,"Delete"),hs(),hs(),hs(),ps()}if(2&t){var i=xs();Aa(1),ls("disabled",i.selection.isEmpty())}}function rP(t,e){if(1&t){var n=vs();cs(0,"button",53),_s("click",function(){nn(n);var t=xs();return t.filterText="",t.applyFilter()}),cs(1,"i",17),$s(2,"close"),hs(),hs()}}function aP(t,e){1&t&&ds(0,"mat-header-cell")}function oP(t,e){1&t&&(cs(0,"i",17),$s(1,"check_box"),hs())}function sP(t,e){1&t&&(cs(0,"i",17),$s(1,"check_box_outline_blank"),hs())}function lP(t,e){if(1&t){var n=vs();cs(0,"mat-cell",56),_s("click",function(t){nn(n);var i=e.$implicit;return xs(2).clickRow(i,t)}),as(1,oP,2,0,"i",57),as(2,sP,2,0,"ng-template",null,58,ec),hs()}if(2&t){var i=e.$implicit,r=os(3),a=xs(2);Aa(1),ls("ngIf",a.selection.isSelected(i))("ngIfElse",r)}}function uP(t,e){1&t&&(fs(0,54),as(1,aP,1,0,"mat-header-cell",22),as(2,lP,4,2,"mat-cell",55),ps())}function cP(t,e){1&t&&ds(0,"mat-header-cell")}function hP(t,e){if(1&t){var n=vs();cs(0,"mat-cell"),cs(1,"div",59),_s("click",function(t){nn(n);var i=e.$implicit,r=xs();return r.detailAction.emit({param:i,table:r}),t.stopPropagation()}),cs(2,"i",17),$s(3,"subdirectory_arrow_right"),hs(),hs(),hs()}}function dP(t,e){if(1&t&&(cs(0,"mat-header-cell",63),$s(1),hs()),2&t){var n=xs().$implicit;Aa(1),Xs(n.title)}}function fP(t,e){if(1&t){var n=vs();cs(0,"mat-cell",64),_s("click",function(t){nn(n);var i=e.$implicit;return xs(2).clickRow(i,t)})("contextmenu",function(t){nn(n);var i=e.$implicit;return xs(2).onContextMenu(i,t)}),ds(1,"div",65),hs()}if(2&t){var i=e.$implicit,r=xs().$implicit,a=xs();Aa(1),ls("innerHtml",a.getRowColumn(i,r),Dr)}}function pP(t,e){1&t&&(fs(0,60),as(1,dP,2,1,"mat-header-cell",61),as(2,fP,2,1,"mat-cell",62),ps()),2&t&&Os("matColumnDef",e.$implicit.name)}function mP(t,e){1&t&&ds(0,"mat-header-row")}function vP(t,e){if(1&t&&ds(0,"mat-row",66),2&t){var n=e.$implicit;ls("ngClass",xs().rowClass(n))}}function gP(t,e){if(1&t&&(cs(0,"div",67),$s(1),cs(2,"uds-translate"),$s(3,"Selected items"),hs(),hs()),2&t){var n=xs();Aa(1),Qs(" ",n.selection.selected.length," ")}}function yP(t,e){if(1&t){var n=vs();cs(0,"button",71),_s("click",function(){nn(n);var t=xs().item,e=xs();return e.detailAction.emit({param:t,table:e})}),cs(1,"i",72),$s(2,"subdirectory_arrow_right"),hs(),cs(3,"uds-translate"),$s(4,"Detail"),hs(),hs()}}function _P(t,e){if(1&t){var n=vs();cs(0,"button",71),_s("click",function(){nn(n);var t=xs(2);return t.emitIfSelection(t.editAction)}),cs(1,"i",72),$s(2,"edit"),hs(),cs(3,"uds-translate"),$s(4,"Edit"),hs(),hs()}}function bP(t,e){if(1&t){var n=vs();cs(0,"button",71),_s("click",function(){return nn(n),xs(2).permissions()}),cs(1,"i",72),$s(2,"perm_identity"),hs(),cs(3,"uds-translate"),$s(4,"Permissions"),hs(),hs()}}function kP(t,e){if(1&t){var n=vs();cs(0,"button",73),_s("click",function(){nn(n);var t=e.$implicit;return xs(2).emitCustom(t)}),hs()}if(2&t){var i=e.$implicit;ls("disabled",xs(2).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function wP(t,e){if(1&t){var n=vs();cs(0,"button",74),_s("click",function(){nn(n);var t=xs(2);return t.emitIfSelection(t.deleteAction)}),cs(1,"i",72),$s(2,"delete_forever"),hs(),cs(3,"uds-translate"),$s(4,"Delete"),hs(),hs()}}function CP(t,e){if(1&t){var n=vs();cs(0,"button",73),_s("click",function(){nn(n);var t=e.$implicit;return xs(3).emitCustom(t)}),hs()}if(2&t){var i=e.$implicit;ls("disabled",xs(3).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function SP(t,e){if(1&t&&(fs(0),ds(1,"mat-divider"),as(2,CP,1,2,"button",69),ps()),2&t){var n=xs(2);Aa(2),ls("ngForOf",n.getCustomAccelerators())}}function xP(t,e){if(1&t&&(as(0,yP,5,0,"button",68),as(1,_P,5,0,"button",68),as(2,bP,5,0,"button",68),as(3,kP,1,2,"button",69),as(4,wP,5,0,"button",70),as(5,SP,3,1,"ng-container",8)),2&t){var n=xs();ls("ngIf",n.detailAction.observers.length>0),Aa(1),ls("ngIf",n.editAction.observers.length>0),Aa(1),ls("ngIf",!0===n.hasPermissions),Aa(1),ls("ngForOf",n.getCustomMenu()),Aa(1),ls("ngIf",n.deleteAction.observers.length>0),Aa(1),ls("ngIf",n.hasAccelerators)}}var EP=function(){return[5,10,25,100,1e3]},AP=function(){function t(t){this.api=t,this.title="",this.subtitle="",this.displayedColumns=[],this.columns=[],this.rowStyleInfo=null,this.dataSource=new wT([]),this.firstLoad=!0,this.loading=!1,this.lastClickInfo={time:0,x:-1e4,y:-1e4},this.contextMenuPosition={x:"0px",y:"0px"},this.filterText="",this.pageSize=10,this.newGrouped=!1,this.loaded=new Ru,this.rowSelected=new Ru,this.newAction=new Ru,this.editAction=new Ru,this.deleteAction=new Ru,this.customButtonAction=new Ru,this.detailAction=new Ru}return t.prototype.ngOnInit=function(){var t=this;this.hasCustomButtons=void 0!==this.customButtons&&0!==this.customButtons.length&&0!==this.customButtonAction.observers.length&&this.getcustomButtons().length>0,this.hasAccelerators=this.getCustomAccelerators().length>0,this.hasButtons=this.hasCustomButtons||0!==this.detailAction.observers.length||0!==this.editAction.observers.length||this.hasPermissions||0!==this.deleteAction.observers.length,this.hasActions=this.hasButtons||void 0!==this.customButtons&&this.customButtons.length>0,this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=function(t,e){if(!(e in t))return"";var n=t[e];return"number"==typeof n?n:"string"==typeof n?n.toLocaleLowerCase():(null===n&&(n=7226578800),n.changingThisBreaksApplicationSecurity&&(n=n.changingThisBreaksApplicationSecurity),(""+n).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase())},this.dataSource.filterPredicate=function(e,n){try{t.columns.forEach(function(t){if((""+e[t.name]).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase().includes(n))throw!0})}catch(i){return!0}return!1},this.dataSource.sort.active=this.api.getFromStorage(this.tableId+"sort-column")||"name",this.dataSource.sort.direction=this.api.getFromStorage(this.tableId+"sort-direction")||"asc",this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.selection=new uy(!0===this.multiSelect,[]);var e=this.rest.permision();0==(e&fD.MANAGEMENT)&&(this.newAction.observers.length=0,this.editAction.observers.length=0,this.deleteAction.observers.length=0,this.customButtonAction.observers.length=0),e!==fD.ALL&&(this.hasPermissions=!1),void 0!==this.icon&&(this.icon=this.api.staticURL("admin/img/icons/"+this.icon+".png")),this.rest.types().subscribe(function(e){t.rest.tableInfo().subscribe(function(n){t.initialize(n,e)})})},t.prototype.initialize=function(t,e){var n=this;this.oTypes=e,this.types=new Map,this.grpTypes=new Map,e.forEach(function(t){n.types.set(t.type,t),void 0!==t.group&&(n.grpTypes.has(t.group)||n.grpTypes.set(t.group,[]),n.grpTypes.get(t.group).push(t))}),this.rowStyleInfo=void 0!==t["row-style"]&&void 0!==t["row-style"].field?t["row-style"]:null,this.title=t.title,this.subtitle=t.subtitle||"",this.hasButtons&&this.displayedColumns.push("selection-column");var i=[];t.fields.forEach(function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];i.push({name:e,title:r.title,type:void 0===r.type?TA.ALPHANUMERIC:r.type,dict:r.dict}),(void 0===r.visible||r.visible)&&n.displayedColumns.push(e)}}),this.columns=i,this.detailAction.observers.length>0&&this.displayedColumns.push("detail-column"),this.overview()},t.prototype.overview=function(){var t=this;this.loading||(this.selection.clear(),this.dataSource.data=[],this.loading=!0,this.rest.overview().subscribe(function(e){t.loading=!1,void 0!==t.onItem&&e.forEach(function(e){t.onItem(e)}),t.dataSource.data=e,t.loaded.emit({param:t.firstLoad,table:t}),t.firstLoad=!1},function(e){t.loading=!1}))},t.prototype.getcustomButtons=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type!==RA.ONLY_MENU&&t.type!==RA.ACCELERATOR}):[]},t.prototype.getCustomMenu=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type!==RA.ACCELERATOR}):[]},t.prototype.getCustomAccelerators=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type===RA.ACCELERATOR}):[]},t.prototype.getRowColumn=function(t,e){var n=t[e.name];switch(e.type){case TA.IMAGE:return this.api.safeString(this.api.gui.icon(n,"48px"));case TA.DATE:n=uR("SHORT_DATE_FORMAT",n);break;case TA.DATETIME:n=uR("SHORT_DATETIME_FORMAT",n);break;case TA.TIME:n=uR("TIME_FORMAT",n);break;case TA.DATETIMESEC:n=uR("SHORT_DATE_FORMAT",n," H:i:s");break;case TA.ICON:try{n=this.api.gui.icon(this.types.get(t.type).icon)+n}catch(i){}return this.api.safeString(n);case TA.CALLBACK:break;case TA.DICTIONARY:try{n=e.dict[n]}catch(i){n=""}}return n},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage(this.tableId+"sort-column",t.active),this.api.putOnStorage(this.tableId+"sort-direction",t.direction)},t.prototype.rowClass=function(t){var e=[];return this.selection.isSelected(t)&&e.push("selected"),null!==this.rowStyleInfo&&e.push(this.rowStyleInfo.prefix+t[this.rowStyleInfo.field]),e},t.prototype.emitIfSelection=function(t,e){void 0===e&&(e=!1);var n=this.selection.selected.length;n>0&&(!0!==e&&1!==n||t.emit({table:this,param:n}))},t.prototype.isCustomDisabled=function(t){switch(t.type){case void 0:case RA.SINGLE_SELECT:return 1!==this.selection.selected.length||!0===t.disabled;case RA.MULTI_SELECT:return this.selection.isEmpty()||!0===t.disabled;default:return!1}},t.prototype.emitCustom=function(t){(this.selection.selected.length||t.type===RA.ALWAYS)&&(t.type===RA.ACCELERATOR?this.api.navigation.goto(t.id,this.selection.selected[0],t.acceleratorProperties):this.customButtonAction.emit({param:t,table:this}))},t.prototype.clickRow=function(t,e){var n=(new Date).getTime();if((this.detailAction.observers.length||this.editAction.observers.length)&&Math.abs(this.lastClickInfo.x-e.x)<16&&Math.abs(this.lastClickInfo.y-e.y)<16&&n-this.lastClickInfo.time<250)return this.selection.clear(),this.selection.select(t),void(this.detailAction.observers.length?this.detailAction.emit({param:t,table:this}):this.emitIfSelection(this.editAction,!1));this.lastClickInfo={time:n,x:e.x,y:e.y},this.doSelect(t,e)},t.prototype.doSelect=function(t,e){if(e.ctrlKey)this.lastSel=t,this.selection.toggle(t);else if(e.shiftKey){if(this.selection.isEmpty())this.selection.toggle(t);else if(this.selection.clear(),this.lastSel!==t)for(var n=!1,i=this.dataSource.sortData(this.dataSource.data,this.dataSource.sort),r=0;r0),Aa(1),ls("ngIf",e.editAction.observers.length>0),Aa(1),ls("ngIf",!0===e.hasPermissions),Aa(1),ls("ngIf",e.hasCustomButtons),Aa(1),ls("ngIf",1==e.allowExport),Aa(1),ls("ngIf",e.deleteAction.observers.length>0),Aa(7),ls("ngModel",e.filterText),Aa(1),ls("ngIf",e.filterText),Aa(2),ls("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",ku(27,EP))("showFirstLastButtons",!0),Aa(6),ls("dataSource",e.dataSource),Aa(1),ls("ngIf",e.hasButtons),Aa(4),ls("ngForOf",e.columns),Aa(1),ls("matHeaderRowDef",e.displayedColumns),Aa(1),ls("matRowDefColumns",e.displayedColumns),Aa(1),ls("hidden",!e.loading),Aa(5),ls("ngIf",e.hasButtons&&e.selection.selected.length>0),Aa(1),Vs("left",e.contextMenuPosition.x)("top",e.contextMenuPosition.y),ls("matMenuTriggerFor",n)}},directives:[Th,TS,fO,FT,YS,px,tE,iI,OS,tT,uI,oT,rT,nT,Oh,dT,pT,yR,LR,RR,xR,DR,DS,lO,lT,cT,vI,vT,yT,Ah,jR],pipes:[qh,zR],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.buttons[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.buttons[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-right:1em;margin-bottom:1em}.buttons[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{margin-right:.4rem}.buttons[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]:hover:not([disabled]){background-color:#000;color:#fff}button.mat-menu-item[_ngcontent-%COMP%]{height:32px;line-height:32px}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.footer[_ngcontent-%COMP%]{margin:1em;display:flex;justify-content:flex-end}mat-cell[_ngcontent-%COMP%]:first-of-type, mat-header-cell[_ngcontent-%COMP%]:first-of-type{padding-left:.5rem}mat-row[_ngcontent-%COMP%]:hover{background-color:#f0f8ff;cursor:pointer}mat-table[_ngcontent-%COMP%]{width:100%;font-weight:300}.mat-column-detail-column[_ngcontent-%COMP%]{max-width:1.5rem;justify-content:center;color:#000!important;padding-right:.5rem}.detail-launcher[_ngcontent-%COMP%]{display:none}.mat-row[_ngcontent-%COMP%]:hover .detail-launcher[_ngcontent-%COMP%]{display:block}.mat-column-selection-column[_ngcontent-%COMP%]{max-width:2rem;justify-content:center;color:#000!important}.menu-warn[_ngcontent-%COMP%]{color:red}.menu-link[_ngcontent-%COMP%]{color:#00f}.loading[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center} .mat-menu-panel{min-height:48px} .mat-paginator-range-label{min-width:6em}"]}),t}(),DP='pause'+django.gettext("Maintenance")+"",OP='pause'+django.gettext("Exit maintenance mode")+"",IP='pause'+django.gettext("Enter maintenance mode")+"",TP=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"maintenance",html:DP,type:RA.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New provider"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit provider"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete provider"))},t.prototype.onMaintenance=function(t){var e=this,n=t.table.selection.selected[0],i=n.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.yesno(django.gettext("Maintenance mode for")+" "+n.name,i).subscribe(function(i){i&&e.rest.providers.maintenance(n.id).subscribe(function(){t.table.overview()})})},t.prototype.onRowSelect=function(t){var e=t.table;this.customButtons[0].html=e.selection.selected.length>1||0===e.selection.selected.length?DP:e.selection.selected[0].maintenance_mode?OP:IP},t.prototype.onDetail=function(t){this.api.navigation.gotoService(t.param.id)},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("provider"))},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-services"]],decls:1,vars:7,consts:[["tableId","service-providers","icon","providers",3,"rest","onItem","multiSelect","allowExport","hasPermissions","customButtons","pageSize","customButtonAction","newAction","editAction","deleteAction","rowSelected","detailAction","loaded"]],template:function(t,e){1&t&&(cs(0,"uds-table",0),_s("customButtonAction",function(t){return e.onMaintenance(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("rowSelected",function(t){return e.onRowSelect(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),hs()),2&t&&ls("rest",e.rest.providers)("onItem",e.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[AP],styles:[".row-maintenance-true>mat-cell{color:orange!important} .mat-column-maintenance_state, .mat-column-services_count, .mat-column-user_services_count{max-width:7rem;justify-content:center}"]}),t}(),RP=n("MCLT"),PP=function(){function t(t,e,n,i){this.title=t,this.data=e,this.columns=n,this.id=i,this.columnsDefinition=Array.from(n,function(t){var e={};return e[t.field]={visible:!0,title:t.title,type:void 0===t.type?TA.ALPHANUMERIC:t.type},e})}return t.prototype.get=function(t){return xf},t.prototype.getLogs=function(t){return xf},t.prototype.overview=function(t){return Object(RP.isFunction)(this.data)?this.data():Od([])},t.prototype.summary=function(t){return this.overview()},t.prototype.put=function(t,e){return xf},t.prototype.create=function(t){return xf},t.prototype.save=function(t,e){return xf},t.prototype.test=function(t,e){return xf},t.prototype.delete=function(t){return xf},t.prototype.permision=function(){return fD.ALL},t.prototype.getPermissions=function(t){return xf},t.prototype.addPermission=function(t,e,n,i){return xf},t.prototype.revokePermission=function(t){return xf},t.prototype.types=function(){return Od([])},t.prototype.gui=function(t){return xf},t.prototype.callback=function(t,e){return xf},t.prototype.tableInfo=function(){return Od({fields:this.columnsDefinition,title:this.title})},t.prototype.detail=function(t,e){return null},t.prototype.invoke=function(t,e){return xf},t}();function MP(t,e){if(1&t){var n=vs();cs(0,"button",24),_s("click",function(){nn(n);var t=xs();return t.filterText="",t.applyFilter()}),cs(1,"i",8),$s(2,"close"),hs(),hs()}}function FP(t,e){if(1&t&&(cs(0,"mat-header-cell",28),$s(1),hs()),2&t){var n=xs().$implicit;Aa(1),Xs(n)}}function LP(t,e){if(1&t&&(cs(0,"mat-cell"),ds(1,"div",29),hs()),2&t){var n=e.$implicit,i=xs().$implicit,r=xs();Aa(1),ls("innerHtml",r.getRowColumn(n,i),Dr)}}function NP(t,e){1&t&&(fs(0,25),as(1,FP,2,1,"mat-header-cell",26),as(2,LP,2,1,"mat-cell",27),ps()),2&t&&ls("matColumnDef",e.$implicit)}function VP(t,e){1&t&&ds(0,"mat-header-row")}function jP(t,e){if(1&t&&ds(0,"mat-row",30),2&t){var n=e.$implicit;ls("ngClass",xs().rowClass(n))}}var BP=function(){return[5,10,25,100,1e3]},zP=function(){function t(t){this.api=t,this.filterText="",this.title="Logs",this.displayedColumns=["date","level","source","message"],this.columns=[],this.dataSource=new wT([]),this.selection=new uy,this.pageSize=10}return t.prototype.ngOnInit=function(){var t=this;this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sort.active=this.api.getFromStorage("logs-sort-column")||"date",this.dataSource.sort.direction=this.api.getFromStorage("logs-sort-direction")||"desc",this.displayedColumns.forEach(function(e){t.columns.push({name:e,title:e,type:"date"===e?TA.DATETIMESEC:TA.ALPHANUMERIC})}),this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.overview()},t.prototype.overview=function(){var t=this;this.rest.getLogs(this.itemId).subscribe(function(e){t.dataSource.data=e})},t.prototype.selectElement=function(t,e){},t.prototype.getRowColumn=function(t,e){var n=t[e];return"date"===e?n=uR("SHORT_DATE_FORMAT",n," H:i:s"):"level"===e&&(n={1e4:"OTHER",2e4:"DEBUG",3e4:"INFO",4e4:"WARN",5e4:"ERROR",6e4:"FATAL"}[n]||"OTHER"),n},t.prototype.rowClass=function(t){return["level-"+t.level]},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage("logs-sort-column",t.active),this.api.putOnStorage("logs-sort-direction",t.direction)},t.prototype.export=function(){fR(this)},t.prototype.keyDown=function(t){switch(t.keyCode){case Ry:this.paginator.firstPage(),t.preventDefault();break;case Ty:this.paginator.lastPage(),t.preventDefault();break;case Fy:this.paginator.nextPage(),t.preventDefault();break;case Py:this.paginator.previousPage(),t.preventDefault()}},t.\u0275fac=function(e){return new(e||t)(ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-logs-table"]],viewQuery:function(t,e){if(1&t&&(Wu(iI,!0),Wu(uI,!0)),2&t){var n=void 0;qu(n=Xu())&&(e.paginator=n.first),qu(n=Xu())&&(e.sort=n.first)}},inputs:{rest:"rest",itemId:"itemId",tableId:"tableId",pageSize:"pageSize"},decls:36,vars:12,consts:[[1,"card"],[1,"card-header"],[1,"card-title"],[3,"src"],[1,"card-content"],[1,"header"],[1,"buttons"],["mat-raised-button","",3,"click"],[1,"material-icons"],[1,"button-text"],[1,"navigation"],[1,"filter"],["matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"paginator"],[3,"pageSize","hidePageSize","pageSizeOptions","showFirstLastButtons"],[1,"reload"],["mat-icon-button","",3,"click"],["tabindex","0",1,"table",3,"keydown"],["matSort","",3,"dataSource","matSortChange"],[3,"matColumnDef",4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[3,"ngClass",4,"matRowDef","matRowDefColumns"],[1,"footer"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"matColumnDef"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["mat-sort-header",""],[3,"innerHtml"],[3,"ngClass"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"div",2),ds(3,"img",3),$s(4," \xa0"),cs(5,"uds-translate"),$s(6,"Logs"),hs(),hs(),hs(),cs(7,"div",4),cs(8,"div",5),cs(9,"div",6),cs(10,"a",7),_s("click",function(){return e.export()}),cs(11,"i",8),$s(12,"import_export"),hs(),cs(13,"span",9),cs(14,"uds-translate"),$s(15,"Export"),hs(),hs(),hs(),hs(),cs(16,"div",10),cs(17,"div",11),cs(18,"uds-translate"),$s(19,"Filter"),hs(),$s(20,"\xa0 "),cs(21,"mat-form-field"),cs(22,"input",12),_s("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.filterText=t}),hs(),as(23,MP,3,0,"button",13),hs(),hs(),cs(24,"div",14),ds(25,"mat-paginator",15),hs(),cs(26,"div",16),cs(27,"a",17),_s("click",function(){return e.overview()}),cs(28,"i",8),$s(29,"autorenew"),hs(),hs(),hs(),hs(),hs(),cs(30,"div",18),_s("keydown",function(t){return e.keyDown(t)}),cs(31,"mat-table",19),_s("matSortChange",function(t){return e.sortChanged(t)}),as(32,NP,3,1,"ng-container",20),as(33,VP,1,0,"mat-header-row",21),as(34,jP,1,1,"mat-row",22),hs(),hs(),ds(35,"div",23),hs(),hs()),2&t&&(Aa(3),ls("src",e.api.staticURL("admin/img/icons/logs.png"),Or),Aa(19),ls("ngModel",e.filterText),Aa(1),ls("ngIf",e.filterText),Aa(2),ls("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",ku(11,BP))("showFirstLastButtons",!0),Aa(6),ls("dataSource",e.dataSource),Aa(1),ls("ngForOf",e.displayedColumns),Aa(1),ls("matHeaderRowDef",e.displayedColumns),Aa(1),ls("matRowDefColumns",e.displayedColumns))},directives:[TS,OS,fO,FT,YS,px,tE,Th,iI,tT,uI,Oh,dT,pT,DS,lO,oT,rT,nT,lT,vI,cT,vT,yT,Ah],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.header[_ngcontent-%COMP%], .navigation[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.navigation[_ngcontent-%COMP%]{justify-content:flex-start}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.mat-column-date[_ngcontent-%COMP%]{max-width:160px}.mat-column-level[_ngcontent-%COMP%]{max-width:96px;text-align:center}.mat-column-source[_ngcontent-%COMP%]{max-width:128px} .level-50000>.mat-cell, .level-60000>.mat-cell{color:#ff1e1e!important} .level-40000>.mat-cell{color:#d65014!important}"]}),t}();function HP(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Services pools"),hs())}function UP(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Logs"),hs())}var qP=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],WP=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.customButtons=[UA.getGotoButton(FA,"id")],this.services=i.services,this.service=i.service}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{service:i,services:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.servicePools=new PP(django.gettext("Service pools"),function(){return t.services.invoke(t.service.id+"/servicesPools")},qP,this.service.id+"infopsls")},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-information"]],decls:17,vars:7,consts:[["mat-dialog-title",""],["mat-tab-label",""],["pageSize","6",3,"rest","customButtons"],[1,"content"],[3,"rest","itemId","tableId","pageSize"],["mat-raised-button","","mat-dialog-close","","color","primary"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Information for"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),cs(5,"mat-tab-group"),cs(6,"mat-tab"),as(7,HP,2,0,"ng-template",1),ds(8,"uds-table",2),hs(),cs(9,"mat-tab"),as(10,UP,2,0,"ng-template",1),cs(11,"div",3),ds(12,"uds-logs-table",4),hs(),hs(),hs(),hs(),cs(13,"mat-dialog-actions"),cs(14,"button",5),cs(15,"uds-translate"),$s(16,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.service.name,"\n"),Aa(5),ls("rest",e.servicePools)("customButtons",e.customButtons),Aa(4),ls("rest",e.services)("itemId",e.service.id)("tableId","serviceInfo-d-log"+e.service.id)("pageSize",5))},directives:[gS,TS,yS,XE,zE,NE,AP,zP,_S,DS,vS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.mat-column-count[_ngcontent-%COMP%], .mat-column-image[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{max-width:7rem;justify-content:center}.navigation[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:flex-end;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}"]}),t}();function YP(t,e){if(1&t&&(cs(0,"div",3),ds(1,"div",4),ds(2,"div",5),hs()),2&t){var n=e.$implicit;Aa(1),ls("innerHTML",n.gui.label,Dr),Aa(1),ls("innerHTML",n.value,Dr)}}var GP=function(){function t(t){this.api=t,this.displayables=null}return t.prototype.ngOnInit=function(){this.processFields()},t.prototype.processFields=function(){var t=this;if(!this.gui||!this.value)return[];var e=this.gui.filter(function(t){return t.gui.type!==VS.HIDDEN});e.forEach(function(e){var n=t.value[e.name];switch(e.gui.type){case VS.CHECKBOX:e.value=n?django.gettext("Yes"):django.gettext("No");break;case VS.PASSWORD:e.value=django.gettext("(hidden)");break;case VS.CHOICE:var i=jS.locateChoice(n,e);e.value=i.text;break;case VS.MULTI_CHOICE:e.value=django.gettext("Selected items :")+n.length;break;case VS.IMAGECHOICE:i=jS.locateChoice(n,e),e.value=t.api.safeString(t.api.gui.icon(i.img)+" "+i.text);break;default:e.value=n}""!==e.value&&null!=e.value||(e.value="(empty)")}),this.displayables=e},t.\u0275fac=function(e){return new(e||t)(ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-information"]],inputs:{value:"value",gui:"gui"},decls:4,vars:1,consts:[[1,"card"],[1,"card-content"],["class","item",4,"ngFor","ngForOf"],[1,"item"],[1,"label",3,"innerHTML"],[1,"value",3,"innerHTML"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),as(2,YP,3,2,"div",2),hs(),ds(3,"div"),hs()),2&t&&(Aa(2),ls("ngForOf",e.displayables))},directives:[Oh],styles:[".card-content[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column}.item[_ngcontent-%COMP%]{padding-bottom:.5rem;display:flex}.label[_ngcontent-%COMP%]{font-weight:700;width:32rem;overflow-x:hidden;text-overflow:ellipsis;text-align:end;margin-right:1rem;align-self:center}"]}),t}();function KP(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Summary"),hs())}function ZP(t,e){if(1&t&&ds(0,"uds-information",15),2&t){var n=xs(2);ls("value",n.provider)("gui",n.gui)}}function $P(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Services"),hs())}function XP(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Usage"),hs())}function QP(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Logs"),hs())}function JP(t,e){if(1&t){var n=vs();cs(0,"div",6),cs(1,"div",7),cs(2,"mat-tab-group",8),_s("selectedIndexChange",function(t){return nn(n),xs().selectedTab=t}),cs(3,"mat-tab"),as(4,KP,2,0,"ng-template",9),cs(5,"div",10),as(6,ZP,1,2,"uds-information",11),hs(),hs(),cs(7,"mat-tab"),as(8,$P,2,0,"ng-template",9),cs(9,"div",10),cs(10,"uds-table",12),_s("newAction",function(t){return nn(n),xs().onNewService(t)})("editAction",function(t){return nn(n),xs().onEditService(t)})("deleteAction",function(t){return nn(n),xs().onDeleteService(t)})("customButtonAction",function(t){return nn(n),xs().onInformation(t)})("loaded",function(t){return nn(n),xs().onLoad(t)}),hs(),hs(),hs(),cs(11,"mat-tab"),as(12,XP,2,0,"ng-template",9),cs(13,"div",10),cs(14,"uds-table",13),_s("deleteAction",function(t){return nn(n),xs().onDeleteUsage(t)}),hs(),hs(),hs(),cs(15,"mat-tab"),as(16,QP,2,0,"ng-template",9),cs(17,"div",10),ds(18,"uds-logs-table",14),hs(),hs(),hs(),hs(),hs()}if(2&t){var i=xs();Aa(2),ls("selectedIndex",i.selectedTab)("@.disabled",!0),Aa(4),ls("ngIf",i.provider&&i.gui),Aa(4),ls("rest",i.services)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-services"+i.provider.id),Aa(4),ls("rest",i.usage)("multiSelect",!0)("allowExport",!0)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-usage"+i.provider.id),Aa(4),ls("rest",i.services.parentModel)("itemId",i.provider.id)("tableId","providers-d-log"+i.provider.id)}}var tM=function(t){return["/providers",t]},eM=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:RA.ONLY_MENU}],this.provider=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("provider");this.services=this.rest.providers.detail(e,"services"),this.usage=this.rest.providers.detail(e,"usage"),this.services.parentModel.get(e).subscribe(function(e){t.provider=e,t.services.parentModel.gui(e.type).subscribe(function(e){t.gui=e})})},t.prototype.onInformation=function(t){WP.launch(this.api,this.services,t.table.selection.selected[0])},t.prototype.onNewService=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New service"),!1)},t.prototype.onEditService=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit service"),!1)},t.prototype.onDeleteService=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service"))},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user service"))},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("service");if(void 0!==e){this.selectedTab=1;var n=t.table;n.dataSource.data.forEach(function(t){t.id===e&&n.selection.select(t)})}}},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-services-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","providers",3,"rest","multiSelect","allowExport","customButtons","pageSize","tableId","newAction","editAction","deleteAction","customButtonAction","loaded"],["icon","usage",3,"rest","multiSelect","allowExport","pageSize","tableId","deleteAction"],[3,"rest","itemId","tableId"],[3,"value","gui"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"a",2),cs(3,"i",3),$s(4,"arrow_back"),hs(),hs(),$s(5," \xa0"),ds(6,"img",4),$s(7),hs(),as(8,JP,19,17,"div",5),hs()),2&t&&(Aa(2),ls("routerLink",wu(4,tM,e.services.parentId)),Aa(4),ls("src",e.api.staticURL("admin/img/icons/services.png"),Or),Aa(1),Qs(" \xa0",null==e.provider?null:e.provider.name," "),Aa(1),ls("ngIf",null!==e.provider))},directives:[Vv,Th,XE,zE,NE,AP,zP,TS,GP],styles:[""]}),t}(),nM=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("authenticator")},t.prototype.onDetail=function(t){this.api.navigation.gotoAuthenticatorDetail(t.param.id)},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Authenticator"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Authenticator"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Authenticator"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("authenticator"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible)},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-authenticators"]],decls:2,vars:6,consts:[["icon","authenticators",3,"rest","multiSelect","allowExport","hasPermissions","onItem","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(cs(0,"div"),cs(1,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),hs(),hs()),2&t&&(Aa(1),ls("rest",e.rest.authenticators)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[""]}),t}(),iM=["panel"];function rM(t,e){if(1&t&&(cs(0,"div",0,1),Ds(2),hs()),2&t){var n=e.id,i=xs();ls("id",i.id)("ngClass",i._classList),is("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(n))}}var aM=["*"],oM=0,sM=function t(e,n){g(this,t),this.source=e,this.option=n},lM=cC(function t(){g(this,t)}),uM=new bi("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),cM=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this))._changeDetectorRef=t,a._elementRef=i,a._activeOptionChanges=A.EMPTY,a.showPanel=!1,a._isOpen=!1,a.displayWith=null,a.optionSelected=new Ru,a.opened=new Ru,a.closed=new Ru,a.optionActivated=new Ru,a._classList={},a.id="mat-autocomplete-".concat(oM++),a._autoActiveFirstOption=!!r.autoActiveFirstOption,a}return v(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new F_(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(function(e){t.optionActivated.emit({source:t,option:t.options.toArray()[e]||null})}),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(t){var e=new sM(this,t);this.optionSelected.emit(e)}},{key:"_getPanelAriaLabelledby",value:function(t){return this.ariaLabel?null:this.ariaLabelledby?t+" "+this.ariaLabelledby:t}},{key:"_setVisibilityClasses",value:function(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}},{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=lg(t)}},{key:"classList",set:function(t){this._classList=t&&t.length?pg(t).reduce(function(t,e){return t[e]=!0,t},{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}}]),n}(lM);return t.\u0275fac=function(e){return new(e||t)(ss(Kl),ss(xl),ss(uM))},t.\u0275dir=de({type:t,viewQuery:function(t,e){var n;1&t&&(Wu(eu,!0),Yu(iM,!0)),2&t&&(qu(n=Xu())&&(e.template=n.first),qu(n=Xu())&&(e.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[qo]}),t}(),hM=function(){var t=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._visibleClass="mat-autocomplete-visible",t._hiddenClass="mat-autocomplete-hidden",t}return n}(cM);return t.\u0275fac=function(e){return dM(e||t)},t.\u0275cmp=oe({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,n){var i;1&t&&(Ku(n,WC,!0),Ku(n,$C,!0)),2&t&&(qu(i=Xu())&&(e.optionGroups=i),qu(i=Xu())&&(e.options=i))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[gl([{provide:KC,useExisting:t}]),qo],ngContentSelectors:aM,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(As(),as(0,rM,3,4,"ng-template"))},directives:[Ah],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"],encapsulation:2,changeDetection:0}),t}(),dM=vi(hM),fM=new bi("mat-autocomplete-scroll-strategy"),pM={provide:fM,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},mM={provide:zS,useExisting:xt(function(){return gM}),multi:!0},vM=function(){var t=function(){function t(e,n,i,r,a,o,s,l,u,c,d){var f=this;g(this,t),this._element=e,this._overlay=n,this._viewContainerRef=i,this._zone=r,this._changeDetectorRef=a,this._dir=s,this._formField=l,this._document=u,this._viewportRuler=c,this._defaults=d,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=A.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new q,this._windowBlurHandler=function(){f._canOpenOnNextFocus=f._document.activeElement!==f._element.nativeElement||f.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Af(function(){return f.autocomplete&&f.autocomplete.options?dt.apply(void 0,h(f.autocomplete.options.map(function(t){return t.onSelectionChange}))):f._zone.onStable.pipe(Rf(1),Df(function(){return f.optionSelections}))}),this._scrollStrategy=o}return v(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular(function(){return e.addEventListener("blur",t._windowBlurHandler)})}},{key:"ngOnChanges",value:function(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"_getOutsideClickStream",value:function(){var t=this;return dt(mg(this._document,"click"),mg(this._document,"auxclick"),mg(this._document,"touchend")).pipe(Td(function(e){var n=t._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=t._formField?t._formField._elementRef.nativeElement:null,r=t.connectedTo?t.connectedTo.elementRef.nativeElement:null;return t._overlayAttached&&n!==t._element.nativeElement&&(!i||!i.contains(n))&&(!r||!r.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)}))}},{key:"writeValue",value:function(t){var e=this;Promise.resolve(null).then(function(){return e._setTriggerValue(t)})}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this._element.nativeElement.disabled=t}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;if(e!==Oy||Ny(t)||t.preventDefault(),this.activeOption&&e===Dy&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,i=e===My||e===Ly;this.panelOpen||9===e?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var t=this;return dt(this._zone.onStable.pipe(Rf(1)),this.autocomplete.options.changes.pipe(tp(function(){return t._positionStrategy.reapplyLastPosition()}),ST(0))).pipe(Df(function(){var e=t.panelOpen;return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelOpen&&(t._overlayRef.updatePosition(),e!==t.panelOpen&&t.autocomplete.opened.emit()),t.panelClosingActions}),Rf(1)).subscribe(function(e){return t._setValueAndClose(e)})}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(t){this.autocomplete.options.forEach(function(e){e!==t&&e.selected&&e.deselect()})}},{key:"_attachOverlay",value:function(){var t,e=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!ny(this._element.nativeElement));var n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new gy(this.autocomplete.template,this._viewContainerRef,{id:null===(t=this._formField)||void 0===t?void 0:t._labelId}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,n.keydownEvents().subscribe(function(t){(t.keyCode===Oy&&!Ny(t)||t.keyCode===My&&Ny(t,"altKey"))&&(e._resetActiveItem(),e._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(function(){e.panelOpen&&n&&n.updateSize({width:e._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){var t;return new Yy({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(t=this._defaults)||void 0===t?void 0:t.overlayPanelClass})}},{key:"_getOverlayPosition",value:function(){var t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}},{key:"_setStrategyPositions",value:function(t){var e,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];e="above"===this.position?r:"below"===this.position?n:[].concat(n,r),t.withPositions(e)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}},{key:"_canOpen",value:function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_scrollToOption",value:function(t){var e=this.autocomplete,n=XC(t,e.options,e.optionGroups);if(0===t&&1===n)e._setScrollTop(0);else{var i=e.options.toArray()[t];if(i){var r=i._getHostElement(),a=QC(r.offsetTop,r.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(a)}}}},{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(t){this._autocompleteDisabled=lg(t)}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"panelClosingActions",get:function(){var t=this;return dt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Td(function(){return t._overlayAttached})),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Td(function(){return t._overlayAttached})):Od()).pipe(G(function(t){return t instanceof GC?t:null}))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(h_),ss(su),ss(Cc),ss(Kl),ss(fM),ss(ry,8),ss(dO,9),ss(ah,8),ss(dy),ss(uM,8))},t.\u0275dir=de({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[Ie]}),t}(),gM=function(){var t=function(t){y(n,t);var e=k(n);function n(){var t;return g(this,n),(t=e.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",t}return n}(vM);return t.\u0275fac=function(e){return yM(e||t)},t.\u0275dir=de({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&_s("focusin",function(){return e._handleFocus()})("blur",function(){return e._onTouched()})("input",function(t){return e._handleInput(t)})("keydown",function(t){return e._handleKeydown(t)}),2&t&&is("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[gl([mM]),qo]}),t}(),yM=vi(gM),_M=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[pM],imports:[[g_,JC,sC,Yh],fy,JC,sC]}),t}();function bM(t,e){if(1&t&&(cs(0,"div"),cs(1,"uds-translate"),$s(2,"Edit user"),hs(),$s(3),hs()),2&t){var n=xs();Aa(3),Qs(" ",n.user.name," ")}}function kM(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New user"),hs())}function wM(t,e){if(1&t){var n=vs();cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",18),_s("ngModelChange",function(t){return nn(n),xs().user.name=t}),hs(),hs()}if(2&t){var i=xs();Aa(2),Qs(" ",i.authenticator.type_info.userNameLabel," "),Aa(1),ls("ngModel",i.user.name)("disabled",i.user.id)}}function CM(t,e){if(1&t&&(cs(0,"mat-option",21),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Js(" ",n.id," (",n.name,") ")}}function SM(t,e){if(1&t){var n=vs();cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",19),_s("ngModelChange",function(t){return nn(n),xs().user.name=t})("input",function(t){return nn(n),xs().filterUser(t)}),hs(),cs(4,"mat-autocomplete",null,20),as(6,CM,2,3,"mat-option",15),hs(),hs()}if(2&t){var i=os(5),r=xs();Aa(2),Qs(" ",r.authenticator.type_info.userNameLabel," "),Aa(1),ls("ngModel",r.user.name)("matAutocomplete",i),Aa(3),ls("ngForOf",r.users)}}function xM(t,e){if(1&t){var n=vs();cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",22),_s("ngModelChange",function(t){return nn(n),xs().user.password=t}),hs(),hs()}if(2&t){var i=xs();Aa(2),Qs(" ",i.authenticator.type_info.passwordLabel," "),Aa(1),ls("ngModel",i.user.password)}}function EM(t,e){if(1&t&&(cs(0,"mat-option",21),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}var AM=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.users=[],this.authenticator=i.authenticator,this.user={id:void 0,name:"",real_name:"",comments:"",state:"A",is_admin:!1,staff_member:!1,password:"",role:"user",groups:[]},void 0!==i.user&&(this.user.id=i.user.id,this.user.name=i.user.name)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,user:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").overview().subscribe(function(e){t.groups=e}),this.user.id&&this.rest.authenticators.detail(this.authenticator.id,"users").get(this.user.id).subscribe(function(e){t.user=e,t.user.role=e.is_admin?"admin":e.staff_member?"staff":"user"},function(e){t.dialogRef.close()})},t.prototype.roleChanged=function(t){this.user.is_admin="admin"===t,this.user.staff_member="admin"===t||"staff"===t},t.prototype.filterUser=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"user",t.target.value,100).subscribe(function(t){e.users.length=0,t.forEach(function(t){e.users.push(t)})})},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"users").save(this.user).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-new-user"]],decls:60,vars:11,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["value","B"],[3,"ngModel","ngModelChange","valueChange"],["value","admin"],["value","staff"],["value","user"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value"],["type","password","matInput","",3,"ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(cs(0,"h4",0),as(1,bM,4,1,"div",1),as(2,kM,2,0,"ng-template",null,2,ec),hs(),cs(4,"mat-dialog-content"),cs(5,"div",3),as(6,wM,4,3,"mat-form-field",4),as(7,SM,7,4,"mat-form-field",4),cs(8,"mat-form-field"),cs(9,"mat-label"),cs(10,"uds-translate"),$s(11,"Real name"),hs(),hs(),cs(12,"input",5),_s("ngModelChange",function(t){return e.user.real_name=t}),hs(),hs(),cs(13,"mat-form-field"),cs(14,"mat-label"),cs(15,"uds-translate"),$s(16,"Comments"),hs(),hs(),cs(17,"input",5),_s("ngModelChange",function(t){return e.user.comments=t}),hs(),hs(),cs(18,"mat-form-field"),cs(19,"mat-label"),cs(20,"uds-translate"),$s(21,"State"),hs(),hs(),cs(22,"mat-select",6),_s("ngModelChange",function(t){return e.user.state=t}),cs(23,"mat-option",7),cs(24,"uds-translate"),$s(25,"Enabled"),hs(),hs(),cs(26,"mat-option",8),cs(27,"uds-translate"),$s(28,"Disabled"),hs(),hs(),cs(29,"mat-option",9),cs(30,"uds-translate"),$s(31,"Blocked"),hs(),hs(),hs(),hs(),cs(32,"mat-form-field"),cs(33,"mat-label"),cs(34,"uds-translate"),$s(35,"Role"),hs(),hs(),cs(36,"mat-select",10),_s("ngModelChange",function(t){return e.user.role=t})("valueChange",function(t){return e.roleChanged(t)}),cs(37,"mat-option",11),cs(38,"uds-translate"),$s(39,"Admin"),hs(),hs(),cs(40,"mat-option",12),cs(41,"uds-translate"),$s(42,"Staff member"),hs(),hs(),cs(43,"mat-option",13),cs(44,"uds-translate"),$s(45,"User"),hs(),hs(),hs(),hs(),as(46,xM,4,2,"mat-form-field",4),cs(47,"mat-form-field"),cs(48,"mat-label"),cs(49,"uds-translate"),$s(50,"Groups"),hs(),hs(),cs(51,"mat-select",14),_s("ngModelChange",function(t){return e.user.groups=t}),as(52,EM,2,2,"mat-option",15),hs(),hs(),hs(),hs(),cs(53,"mat-dialog-actions"),cs(54,"button",16),cs(55,"uds-translate"),$s(56,"Cancel"),hs(),hs(),cs(57,"button",17),_s("click",function(){return e.save()}),cs(58,"uds-translate"),$s(59,"Ok"),hs(),hs(),hs()),2&t){var n=os(3);Aa(1),ls("ngIf",e.user.id)("ngIfElse",n),Aa(5),ls("ngIf",!1===e.authenticator.type_info.canSearchUsers||e.user.id),Aa(1),ls("ngIf",!0===e.authenticator.type_info.canSearchUsers&&!e.user.id),Aa(5),ls("ngModel",e.user.real_name),Aa(5),ls("ngModel",e.user.comments),Aa(5),ls("ngModel",e.user.state),Aa(14),ls("ngModel",e.user.role),Aa(10),ls("ngIf",e.authenticator.type_info.needsPassword),Aa(5),ls("ngModel",e.user.groups),Aa(1),ls("ngForOf",e.groups)}},directives:[gS,Th,yS,fO,rO,TS,FT,YS,px,tE,FO,$C,Oh,_S,DS,vS,gM,hM],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),DM=["thumbContainer"],OM=["toggleBar"],IM=["input"],TM=function(){return{enterDuration:150}},RM=["*"],PM=new bi("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1}}}),MM=0,FM={provide:zS,useExisting:xt(function(){return VM}),multi:!0},LM=function t(e,n){g(this,t),this.source=e,this.checked=n},NM=hC(uC(cC(lC(function t(e){g(this,t),this._elementRef=e})),"accent")),VM=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s){var l;return g(this,n),(l=e.call(this,t))._focusMonitor=i,l._changeDetectorRef=r,l.defaults=o,l._animationMode=s,l._onChange=function(t){},l._onTouched=function(){},l._uniqueId="mat-slide-toggle-".concat(++MM),l._required=!1,l._checked=!1,l.name=null,l.id=l._uniqueId,l.labelPosition="after",l.ariaLabel=null,l.ariaLabelledby=null,l.change=new Ru,l.toggleChange=new Ru,l.tabIndex=parseInt(a)||0,l}return v(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){"keyboard"===e||"program"===e?t._inputElement.nativeElement.focus():e||Promise.resolve().then(function(){return t._onTouched()})})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new LM(this,this.checked))}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"required",get:function(){return this._required},set:function(t){this._required=lg(t)}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=lg(t),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}}]),n}(NM);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss($_),ss(Kl),gi("tabindex"),ss(PM),ss(Xw,8))},t.\u0275cmp=oe({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var n;1&t&&(Yu(DM,!0),Yu(OM,!0),Yu(IM,!0)),2&t&&(qu(n=Xu())&&(e._thumbEl=n.first),qu(n=Xu())&&(e._thumbBarEl=n.first),qu(n=Xu())&&(e._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(tl("id",e.id),is("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),js("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[gl([FM]),qo],ngContentSelectors:RM,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(As(),cs(0,"label",0,1),cs(2,"div",2,3),cs(4,"input",4,5),_s("change",function(t){return e._onChangeEvent(t)})("click",function(t){return e._onInputClick(t)}),hs(),cs(6,"div",6,7),ds(8,"div",8),cs(9,"div",9),ds(10,"div",10),hs(),hs(),hs(),cs(11,"span",11,12),_s("cdkObserveContent",function(){return e._onLabelTextChange()}),cs(13,"span",13),$s(14,"\xa0"),hs(),Ds(15),hs(),hs()),2&t){var n=os(1),i=os(12);is("for",e.inputId),Aa(2),js("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),Aa(2),ls("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),is("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Aa(5),ls("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",ku(17,TM))}},directives:[NC,S_],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t}(),jM={provide:ZS,useExisting:xt(function(){return BM}),multi:!0},BM=function(){var t=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return n}(lE);return t.\u0275fac=function(e){return zM(e||t)},t.\u0275dir=de({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[gl([jM]),qo]}),t}(),zM=vi(BM),HM=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),UM=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[HM,VC,sC,x_],HM,sC]}),t}();function qM(t,e){if(1&t&&(cs(0,"div"),cs(1,"uds-translate"),$s(2,"Edit group"),hs(),$s(3),hs()),2&t){var n=xs();Aa(3),Qs(" ",n.group.name," ")}}function WM(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New group"),hs())}function YM(t,e){if(1&t){var n=vs();cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",13),_s("ngModelChange",function(t){return nn(n),xs(2).group.name=t}),hs(),hs()}if(2&t){var i=xs(2);Aa(2),Qs(" ",i.authenticator.type_info.groupNameLabel," "),Aa(1),ls("ngModel",i.group.name)("disabled",i.group.id)}}function GM(t,e){if(1&t&&(cs(0,"mat-option",17),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Js(" ",n.id," (",n.name,") ")}}function KM(t,e){if(1&t){var n=vs();cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",14),_s("ngModelChange",function(t){return nn(n),xs(2).group.name=t})("input",function(t){return nn(n),xs(2).filterGroup(t)}),hs(),cs(4,"mat-autocomplete",null,15),as(6,GM,2,3,"mat-option",16),hs(),hs()}if(2&t){var i=os(5),r=xs(2);Aa(2),Qs(" ",r.authenticator.type_info.groupNameLabel," "),Aa(1),ls("ngModel",r.group.name)("matAutocomplete",i),Aa(3),ls("ngForOf",r.fltrGroup)}}function ZM(t,e){if(1&t&&(fs(0),as(1,YM,4,3,"mat-form-field",12),as(2,KM,7,4,"mat-form-field",12),ps()),2&t){var n=xs();Aa(1),ls("ngIf",!1===n.authenticator.type_info.canSearchGroups||n.group.id),Aa(1),ls("ngIf",!0===n.authenticator.type_info.canSearchGroups&&!n.group.id)}}function $M(t,e){if(1&t){var n=vs();cs(0,"mat-form-field"),cs(1,"mat-label"),cs(2,"uds-translate"),$s(3,"Meta group name"),hs(),hs(),cs(4,"input",13),_s("ngModelChange",function(t){return nn(n),xs().group.name=t}),hs(),hs()}if(2&t){var i=xs();Aa(4),ls("ngModel",i.group.name)("disabled",i.group.id)}}function XM(t,e){if(1&t&&(cs(0,"mat-option",17),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function QM(t,e){if(1&t){var n=vs();fs(0),cs(1,"mat-form-field"),cs(2,"mat-label"),cs(3,"uds-translate"),$s(4,"Service Pools"),hs(),hs(),cs(5,"mat-select",18),_s("ngModelChange",function(t){return nn(n),xs().group.pools=t}),as(6,XM,2,2,"mat-option",16),hs(),hs(),ps()}if(2&t){var i=xs();Aa(5),ls("ngModel",i.group.pools),Aa(1),ls("ngForOf",i.servicePools)}}function JM(t,e){if(1&t&&(cs(0,"mat-option",17),$s(1),hs()),2&t){var n=xs().$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function tF(t,e){if(1&t&&(fs(0),as(1,JM,2,2,"mat-option",22),ps()),2&t){var n=e.$implicit;Aa(1),ls("ngIf","group"===n.type)}}function eF(t,e){if(1&t){var n=vs();cs(0,"div",19),cs(1,"span",20),cs(2,"uds-translate"),$s(3,"Match mode"),hs(),hs(),cs(4,"mat-slide-toggle",6),_s("ngModelChange",function(t){return nn(n),xs().group.meta_if_any=t}),$s(5),hs(),hs(),cs(6,"mat-form-field"),cs(7,"mat-label"),cs(8,"uds-translate"),$s(9,"Selected Groups"),hs(),hs(),cs(10,"mat-select",18),_s("ngModelChange",function(t){return nn(n),xs().group.groups=t}),as(11,tF,2,1,"ng-container",21),hs(),hs()}if(2&t){var i=xs();Aa(4),ls("ngModel",i.group.meta_if_any),Aa(1),Qs(" ",i.getMatchValue()," "),Aa(5),ls("ngModel",i.group.groups),Aa(1),ls("ngForOf",i.groups)}}var nF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.fltrGroup=[],this.authenticator=i.authenticator,this.group={id:void 0,type:i.groupType,name:"",comments:"",meta_if_any:!1,state:"A",groups:[],pools:[]},void 0!==i.group&&(this.group.id=i.group.id,this.group.type=i.group.type,this.group.name=i.group.name)}return t.launch=function(e,n,i,r){var a=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,groupType:i,group:r},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.authenticator.id,"groups");void 0!==this.group.id&&e.get(this.group.id).subscribe(function(e){t.group=e},function(e){t.dialogRef.close()}),"meta"===this.group.type?e.summary().subscribe(function(e){return t.groups=e}):this.rest.servicesPools.summary().subscribe(function(e){return t.servicePools=e})},t.prototype.filterGroup=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"group",t.target.value,100).subscribe(function(t){e.fltrGroup.length=0,t.forEach(function(t){e.fltrGroup.push(t)})})},t.prototype.getMatchValue=function(){return this.group.meta_if_any?django.gettext("Any"):django.gettext("All")},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").save(this.group).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-new-group"]],decls:35,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],["metafirst",""],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["metasecond",""],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["multiple","",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-match"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"]],template:function(t,e){if(1&t&&(cs(0,"h4",0),as(1,qM,4,1,"div",1),as(2,WM,2,0,"ng-template",null,2,ec),hs(),cs(4,"mat-dialog-content"),cs(5,"div",3),as(6,ZM,3,2,"ng-container",1),as(7,$M,5,2,"ng-template",null,4,ec),cs(9,"mat-form-field"),cs(10,"mat-label"),cs(11,"uds-translate"),$s(12,"Comments"),hs(),hs(),cs(13,"input",5),_s("ngModelChange",function(t){return e.group.comments=t}),hs(),hs(),cs(14,"mat-form-field"),cs(15,"mat-label"),cs(16,"uds-translate"),$s(17,"State"),hs(),hs(),cs(18,"mat-select",6),_s("ngModelChange",function(t){return e.group.state=t}),cs(19,"mat-option",7),cs(20,"uds-translate"),$s(21,"Enabled"),hs(),hs(),cs(22,"mat-option",8),cs(23,"uds-translate"),$s(24,"Disabled"),hs(),hs(),hs(),hs(),as(25,QM,7,2,"ng-container",1),as(26,eF,12,4,"ng-template",null,9,ec),hs(),hs(),cs(28,"mat-dialog-actions"),cs(29,"button",10),cs(30,"uds-translate"),$s(31,"Cancel"),hs(),hs(),cs(32,"button",11),_s("click",function(){return e.save()}),cs(33,"uds-translate"),$s(34,"Ok"),hs(),hs(),hs()),2&t){var n=os(3),i=os(8),r=os(27);Aa(1),ls("ngIf",e.group.id)("ngIfElse",n),Aa(5),ls("ngIf","group"===e.group.type)("ngIfElse",i),Aa(7),ls("ngModel",e.group.comments),Aa(5),ls("ngModel",e.group.state),Aa(7),ls("ngIf","group"===e.group.type)("ngIfElse",r)}},directives:[gS,Th,yS,fO,rO,TS,FT,YS,px,tE,FO,$C,_S,DS,vS,gM,hM,Oh,VM],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-match[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function iF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Groups"),hs())}function rF(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,iF,2,0,"ng-template",3),ds(2,"uds-table",4),hs()),2&t){var n=xs();Aa(2),ls("rest",n.group)}}function aF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Services Pools"),hs())}function oF(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,aF,2,0,"ng-template",3),ds(2,"uds-table",4),hs()),2&t){var n=xs();Aa(2),ls("rest",n.servicesPools)}}function sF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Assigned Services"),hs())}function lF(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,sF,2,0,"ng-template",3),ds(2,"uds-table",4),hs()),2&t){var n=xs();Aa(2),ls("rest",n.userServices)}}var uF=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],cF=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],hF=[{field:"unique_id",title:django.gettext("Unique ID")},{field:"friendly_name",title:django.gettext("Friendly Name")},{field:"in_use",title:django.gettext("In Use")},{field:"ip",title:django.gettext("IP")},{field:"pool",title:django.gettext("Services Pool")}],dF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.users=i.users,this.user=i.user}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{users:n,user:i},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.users.parentId,"users").get(this.user.id).subscribe(function(e){t.group=new PP(django.gettext("Groups"),function(){return t.rest.authenticators.detail(t.users.parentId,"groups").overview().pipe(G(function(t){return t.filter(function(t){return e.groups.includes(t.id)})}))},uF,t.user.id+"infogrp"),t.servicesPools=new PP(django.gettext("Services Pools"),function(){return t.users.invoke(t.user.id+"/servicesPools")},cF,t.user.id+"infopool"),t.userServices=new PP(django.gettext("Assigned services"),function(){return t.users.invoke(t.user.id+"/userServices").pipe(G(function(e){return e.map(function(e){return e.in_use=t.api.yesno(e.in_use),e})}))},hF,t.user.id+"userservpool")})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-user-information"]],decls:13,vars:4,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],["pageSize","6",3,"rest"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Information for"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),cs(5,"mat-tab-group"),as(6,rF,3,1,"mat-tab",1),as(7,oF,3,1,"mat-tab",1),as(8,lF,3,1,"mat-tab",1),hs(),hs(),cs(9,"mat-dialog-actions"),cs(10,"button",2),cs(11,"uds-translate"),$s(12,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.user.name,"\n"),Aa(3),ls("ngIf",e.group),Aa(1),ls("ngIf",e.servicesPools),Aa(1),ls("ngIf",e.userServices))},directives:[gS,TS,yS,XE,Th,_S,DS,vS,zE,NE,AP],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function fF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Services Pools"),hs())}function pF(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,fF,2,0,"ng-template",3),ds(2,"uds-table",4),hs()),2&t){var n=xs();Aa(2),ls("rest",n.servicesPools)}}function mF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Users"),hs())}function vF(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,mF,2,0,"ng-template",3),ds(2,"uds-table",4),hs()),2&t){var n=xs();Aa(2),ls("rest",n.users)}}function gF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Groups"),hs())}function yF(t,e){if(1&t&&(cs(0,"mat-tab"),as(1,gF,2,0,"ng-template",3),ds(2,"uds-table",4),hs()),2&t){var n=xs();Aa(2),ls("rest",n.groups)}}var _F=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],bF=[{field:"name",title:django.gettext("Name")},{field:"real_name",title:django.gettext("Real Name")},{field:"state",title:django.gettext("state")},{field:"last_access",title:django.gettext("Last access"),type:TA.DATETIME}],kF=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],wF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{group:i,groups:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.data.groups.parentId,"groups");this.servicesPools=new PP(django.gettext("Service pools"),function(){return e.invoke(t.data.group.id+"/servicesPools")},_F,this.data.group.id+"infopls"),this.users=new PP(django.gettext("Users"),function(){return e.invoke(t.data.group.id+"/users").pipe(G(function(t){return t.map(function(t){return t.state="A"===t.state?django.gettext("Enabled"):"I"===t.state?django.gettext("Disabled"):django.gettext("Blocked"),t})}))},bF,this.data.group.id+"infousr"),"meta"===this.data.group.type&&(this.groups=new PP(django.gettext("Groups"),function(){return e.overview().pipe(G(function(e){return e.filter(function(e){return t.data.group.groups.includes(e.id)})}))},kF,this.data.group.id+"infogrps"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-group-information"]],decls:12,vars:3,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],["pageSize","6",3,"rest"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Information for"),hs(),hs(),cs(3,"mat-dialog-content"),cs(4,"mat-tab-group"),as(5,pF,3,1,"mat-tab",1),as(6,vF,3,1,"mat-tab",1),as(7,yF,3,1,"mat-tab",1),hs(),hs(),cs(8,"mat-dialog-actions"),cs(9,"button",2),cs(10,"uds-translate"),$s(11,"Ok"),hs(),hs(),hs()),2&t&&(Aa(5),ls("ngIf",e.servicesPools),Aa(1),ls("ngIf",e.users),Aa(1),ls("ngIf",e.groups))},directives:[gS,TS,yS,XE,Th,_S,DS,vS,zE,NE,AP],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function CF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Summary"),hs())}function SF(t,e){if(1&t&&ds(0,"uds-information",16),2&t){var n=xs(2);ls("value",n.authenticator)("gui",n.gui)}}function xF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Users"),hs())}function EF(t,e){if(1&t){var n=vs();cs(0,"uds-table",17),_s("loaded",function(t){return nn(n),xs(2).onLoad(t)})("newAction",function(t){return nn(n),xs(2).onNewUser(t)})("editAction",function(t){return nn(n),xs(2).onEditUser(t)})("deleteAction",function(t){return nn(n),xs(2).onDeleteUser(t)})("customButtonAction",function(t){return nn(n),xs(2).onUserInformation(t)}),hs()}if(2&t){var i=xs(2);ls("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function AF(t,e){if(1&t){var n=vs();cs(0,"uds-table",18),_s("loaded",function(t){return nn(n),xs(2).onLoad(t)})("editAction",function(t){return nn(n),xs(2).onEditUser(t)})("deleteAction",function(t){return nn(n),xs(2).onDeleteUser(t)})("customButtonAction",function(t){return nn(n),xs(2).onUserInformation(t)}),hs()}if(2&t){var i=xs(2);ls("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function DF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Groups"),hs())}function OF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Logs"),hs())}function IF(t,e){if(1&t){var n=vs();cs(0,"div",6),cs(1,"div",7),cs(2,"mat-tab-group",8),_s("selectedIndexChange",function(t){return nn(n),xs().selectedTab=t}),cs(3,"mat-tab"),as(4,CF,2,0,"ng-template",9),cs(5,"div",10),as(6,SF,1,2,"uds-information",11),hs(),hs(),cs(7,"mat-tab"),as(8,xF,2,0,"ng-template",9),cs(9,"div",10),as(10,EF,1,6,"uds-table",12),as(11,AF,1,6,"uds-table",13),hs(),hs(),cs(12,"mat-tab"),as(13,DF,2,0,"ng-template",9),cs(14,"div",10),cs(15,"uds-table",14),_s("loaded",function(t){return nn(n),xs().onLoad(t)})("newAction",function(t){return nn(n),xs().onNewGroup(t)})("editAction",function(t){return nn(n),xs().onEditGroup(t)})("deleteAction",function(t){return nn(n),xs().onDeleteGroup(t)})("customButtonAction",function(t){return nn(n),xs().onGroupInformation(t)}),hs(),hs(),hs(),cs(16,"mat-tab"),as(17,OF,2,0,"ng-template",9),cs(18,"div",10),ds(19,"uds-logs-table",15),hs(),hs(),hs(),hs(),hs()}if(2&t){var i=xs();Aa(2),ls("selectedIndex",i.selectedTab)("@.disabled",!0),Aa(4),ls("ngIf",i.authenticator&&i.gui),Aa(4),ls("ngIf",i.authenticator.type_info.canCreateUsers),Aa(1),ls("ngIf",!i.authenticator.type_info.canCreateUsers),Aa(4),ls("rest",i.groups)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("tableId","authenticators-d-groups"+i.authenticator.id)("pageSize",i.api.config.admin.page_size),Aa(4),ls("rest",i.rest.authenticators)("itemId",i.authenticator.id)("tableId","authenticators-d-log"+i.authenticator.id)}}var TF=function(t){return["/authenticators",t]},RF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:RA.ONLY_MENU}],this.authenticator=null,this.selectedTab=1,this.selectedTab=this.route.snapshot.paramMap.get("group")?2:1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("authenticator");this.users=this.rest.authenticators.detail(e,"users"),this.groups=this.rest.authenticators.detail(e,"groups"),this.rest.authenticators.get(e).subscribe(function(e){t.authenticator=e,t.rest.authenticators.gui(e.type).subscribe(function(e){t.gui=e})})},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("user"),n=this.route.snapshot.paramMap.get("group");t.table.selectElement("id",e||n)}},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onNewUser=function(t){AM.launch(this.api,this.authenticator).subscribe(function(e){return t.table.overview()})},t.prototype.onEditUser=function(t){AM.launch(this.api,this.authenticator,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteUser=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user"))},t.prototype.onNewGroup=function(t){nF.launch(this.api,this.authenticator,t.param.type).subscribe(function(e){return t.table.overview()})},t.prototype.onEditGroup=function(t){nF.launch(this.api,this.authenticator,t.param.type,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete group"))},t.prototype.onUserInformation=function(t){dF.launch(this.api,this.users,t.table.selection.selected[0])},t.prototype.onGroupInformation=function(t){wF.launch(this.api,this.groups,t.table.selection.selected[0])},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-authenticators-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],[3,"rest","itemId","tableId"],[3,"value","gui"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"a",2),cs(3,"i",3),$s(4,"arrow_back"),hs(),hs(),$s(5," \xa0"),ds(6,"img",4),$s(7),hs(),as(8,IF,20,14,"div",5),hs()),2&t&&(Aa(2),ls("routerLink",wu(4,TF,e.authenticator?e.authenticator.id:"")),Aa(4),ls("src",e.api.staticURL("admin/img/icons/services.png"),Or),Aa(1),Qs(" \xa0",null==e.authenticator?null:e.authenticator.name," "),Aa(1),ls("ngIf",e.authenticator))},directives:[Vv,Th,XE,zE,NE,AP,zP,TS,GP],styles:[""]}),t}(),PF=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("osmanager")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New OS Manager"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit OS Manager"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete OS Manager"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("osmanager"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-osmanagers"]],decls:2,vars:5,consts:[["icon","osmanagers",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"div"),cs(1,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs(),hs()),2&t&&(Aa(1),ls("rest",e.rest.osManagers)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[""]}),t}(),MF=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("transport")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Transport"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Transport"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Transport"))},t.prototype.processElement=function(t){try{t.allowed_oss=t.allowed_oss.map(function(t){return t.id}).join(", ")}catch(e){t.allowed_oss=""}},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("transport"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-transports"]],decls:2,vars:7,consts:[["icon","transports",3,"rest","multiSelect","allowExport","hasPermissions","newGrouped","onItem","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"div"),cs(1,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs(),hs()),2&t&&(Aa(1),ls("rest",e.rest.transports)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[".mat-column-priority{max-width:7rem;justify-content:center}"]}),t}(),FF=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("network")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Network"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Network"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Network"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("network"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-networks"]],decls:2,vars:5,consts:[["icon","networks",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"div"),cs(1,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs(),hs()),2&t&&(Aa(1),ls("rest",e.rest.networks)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[""]}),t}(),LF=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("proxy")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Proxy"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Proxy"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Proxy"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("proxy"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-proxies"]],decls:2,vars:5,consts:[["icon","proxy",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"div"),cs(1,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs(),hs()),2&t&&(Aa(1),ls("rest",e.rest.proxy)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[""]}),t}(),NF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[UA.getGotoButton(PA,"provider_id"),UA.getGotoButton(MA,"provider_id","service_id"),UA.getGotoButton(jA,"osmanager_id"),UA.getGotoButton(zA,"pool_group_id")],this.editing=!1}return t.prototype.ngOnInit=function(){},t.prototype.onChange=function(t){var e=this,n=["initial_srvs","cache_l1_srvs","max_srvs"];if(null===t.on||"service_id"===t.on.field.name){if(""===t.all.service_id.value)return t.all.osmanager_id.gui.values.length=0,void n.forEach(function(e){return t.all[e].gui.rdonly=!0});this.rest.providers.service(t.all.service_id.value).subscribe(function(i){t.all.allow_users_reset.gui.rdonly=!i.info.can_reset,t.all.osmanager_id.gui.values.length=0,e.editing||(t.all.osmanager_id.gui.rdonly=!i.info.needs_manager),!0===i.info.needs_manager?e.rest.osManagers.overview().subscribe(function(e){e.forEach(function(e){e.servicesTypes.forEach(function(n){i.info.servicesTypeProvided.includes(n)&&t.all.osmanager_id.gui.values.push({id:e.id,text:e.name})})}),t.all.osmanager_id.value=t.all.osmanager_id.gui.values.length>0?t.all.osmanager_id.value||t.all.osmanager_id.gui.values[0].id:""}):(t.all.osmanager_id.gui.values.push({id:"",text:django.gettext("(This service does not requires an OS Manager)")}),t.all.osmanager_id.value=""),n.forEach(function(e){return t.all[e].gui.rdonly=!i.info.uses_cache}),t.all.cache_l2_srvs.gui.rdonly=!1===i.info.uses_cache||!1===i.info.uses_cache_l2,t.all.publish_on_save&&(t.all.publish_on_save.gui.rdonly=!i.info.needs_publication)}),n.forEach(function(e){t.all[e].gui.rdonly=!0})}},t.prototype.onNew=function(t){var e=this;this.editing=!1,this.api.gui.forms.typedNewForm(t,django.gettext("New service Pool"),!1,[{name:"publish_on_save",value:!0,gui:{label:django.gettext("Publish on creation"),tooltip:django.gettext("If selected, will initiate the publication inmediatly after creation"),type:VS.CHECKBOX,order:150,defvalue:"true"}}]).subscribe(function(t){return e.onChange(t)})},t.prototype.onEdit=function(t){var e=this;this.editing=!0,this.api.gui.forms.typedEditForm(t,django.gettext("Edit Service Pool"),!1).subscribe(function(t){return e.onChange(t)})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service pool"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.show_transports=this.api.yesno(t.show_transports),t.restrained?(t.name='warning '+this.api.gui.icon(t.info.icon)+t.name,t.state="T"):(t.name=this.api.gui.icon(t.info.icon)+t.name,t.meta_member.length>0&&(t.state="V")),t.name=this.api.safeString(t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onDetail=function(t){this.api.navigation.gotoServicePoolDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("pool"))},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools"]],decls:1,vars:7,consts:[["icon","pools",3,"rest","multiSelect","allowExport","hasPermissions","onItem","customButtons","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(cs(0,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),hs()),2&t&&ls("rest",e.rest.servicesPools)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[AP],styles:[".mat-column-state, .mat-column-usage, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center} .mat-column-show_transports{max-width:10rem;justify-content:center} .mat-column-pool_group_name{max-width:12rem} .row-state-T>.mat-cell{color:#d65014!important}"]}),t}();function VF(t,e){if(1&t&&(cs(0,"mat-option",8),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function jF(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",9),_s("changed",function(t){return nn(n),xs().userFilter=t}),hs()}}function BF(t,e){if(1&t&&(cs(0,"mat-option",8),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}var zF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.auths=[],this.users=[],this.userFilter="",this.userService=i.userService,this.userServices=i.userServices}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,userServices:i},disableClose:!1}).componentInstance.onSave},t.prototype.authChanged=function(){var t=this;this.rest.authenticators.detail(this.authId,"users").summary().subscribe(function(e){t.users=e})},t.prototype.ngOnInit=function(){var t=this;this.authId=this.userService.owner_info.auth_id||"",this.userId=this.userService.owner_info.user_id||"",this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()})},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(""===this.userFilter)return this.users;var e=new Array;return this.users.forEach(function(n){(""===t.userFilter||n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase()))&&e.push(n)}),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.userServices.save({id:this.userService.id,auth_id:this.authId,user_id:this.userId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-change-assigned-service-owner"]],decls:25,vars:5,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Change owner of assigned service"),hs(),hs(),cs(3,"mat-dialog-content"),cs(4,"div",1),cs(5,"mat-form-field"),cs(6,"mat-label"),cs(7,"uds-translate"),$s(8,"Authenticator"),hs(),hs(),cs(9,"mat-select",2),_s("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),as(10,VF,2,2,"mat-option",3),hs(),hs(),cs(11,"mat-form-field"),cs(12,"mat-label"),cs(13,"uds-translate"),$s(14,"User"),hs(),hs(),cs(15,"mat-select",4),_s("ngModelChange",function(t){return e.userId=t}),as(16,jF,1,0,"uds-mat-select-search",5),as(17,BF,2,2,"mat-option",3),hs(),hs(),hs(),hs(),cs(18,"mat-dialog-actions"),cs(19,"button",6),cs(20,"uds-translate"),$s(21,"Cancel"),hs(),hs(),cs(22,"button",7),_s("click",function(){return e.save()}),cs(23,"uds-translate"),$s(24,"Ok"),hs(),hs(),hs()),2&t&&(Aa(9),ls("ngModel",e.authId),Aa(1),ls("ngForOf",e.auths),Aa(5),ls("ngModel",e.userId),Aa(1),ls("ngIf",e.users.length>10),Aa(1),ls("ngForOf",e.filteredUsers()))},directives:[gS,TS,yS,fO,rO,FO,px,tE,Oh,Th,_S,DS,vS,$C,zT],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function HF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New access rule for"),hs())}function UF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Edit access rule for"),hs())}function qF(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Default fallback access for"),hs())}function WF(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",11),_s("changed",function(t){return nn(n),xs(2).calendarsFilter=t}),hs()}}function YF(t,e){if(1&t&&(cs(0,"mat-option",12),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function GF(t,e){if(1&t){var n=vs();fs(0),cs(1,"mat-form-field"),cs(2,"mat-label"),cs(3,"uds-translate"),$s(4,"Priority"),hs(),hs(),cs(5,"input",8),_s("ngModelChange",function(t){return nn(n),xs().accessRule.priority=t}),hs(),hs(),cs(6,"mat-form-field"),cs(7,"mat-label"),cs(8,"uds-translate"),$s(9,"Calendar"),hs(),hs(),cs(10,"mat-select",3),_s("ngModelChange",function(t){return nn(n),xs().accessRule.calendarId=t}),as(11,WF,1,0,"uds-mat-select-search",9),as(12,YF,2,2,"mat-option",10),hs(),hs(),ps()}if(2&t){var i=xs();Aa(5),ls("ngModel",i.accessRule.priority),Aa(5),ls("ngModel",i.accessRule.calendarId),Aa(1),ls("ngIf",i.calendars.length>10),Aa(1),ls("ngForOf",i.filtered(i.calendars,i.calendarsFilter))}}var KF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.calendars=[],this.calendarsFilter="",this.pool=i.pool,this.model=i.model,this.accessRule={id:void 0,priority:0,access:"ALLOW",calendarId:""},i.accessRule&&(this.accessRule.id=i.accessRule.id)}return t.launch=function(e,n,i,r){var a=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i,accessRule:r},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.calendars.summary().subscribe(function(e){t.calendars=e}),void 0!==this.accessRule.id&&-1!==this.accessRule.id?this.model.get(this.accessRule.id).subscribe(function(e){t.accessRule=e}):-1===this.accessRule.id&&this.model.parentModel.getFallbackAccess(this.pool.id).subscribe(function(e){return t.accessRule.access=e})},t.prototype.filtered=function(t,e){return""===e?t:t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())})},t.prototype.save=function(){var t=this,e=function(){t.dialogRef.close(),t.onSave.emit(!0)};-1!==this.accessRule.id?this.model.save(this.accessRule).subscribe(e):this.model.parentModel.setFallbackAccess(this.pool.id,this.accessRule.access).subscribe(e)},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-access-calendars"]],decls:24,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],[3,"ngModel","ngModelChange"],["value","ALLOW"],["value","DENY"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(cs(0,"h4",0),as(1,HF,2,0,"uds-translate",1),as(2,UF,2,0,"uds-translate",1),as(3,qF,2,0,"uds-translate",1),$s(4),hs(),cs(5,"mat-dialog-content"),cs(6,"div",2),as(7,GF,13,4,"ng-container",1),cs(8,"mat-form-field"),cs(9,"mat-label"),cs(10,"uds-translate"),$s(11,"Action"),hs(),hs(),cs(12,"mat-select",3),_s("ngModelChange",function(t){return e.accessRule.access=t}),cs(13,"mat-option",4),$s(14," ALLOW "),hs(),cs(15,"mat-option",5),$s(16," DENY "),hs(),hs(),hs(),hs(),hs(),cs(17,"mat-dialog-actions"),cs(18,"button",6),cs(19,"uds-translate"),$s(20,"Cancel"),hs(),hs(),cs(21,"button",7),_s("click",function(){return e.save()}),cs(22,"uds-translate"),$s(23,"Ok"),hs(),hs(),hs()),2&t&&(Aa(1),ls("ngIf",void 0===e.accessRule.id),Aa(1),ls("ngIf",void 0!==e.accessRule.id&&-1!==e.accessRule.id),Aa(1),ls("ngIf",-1===e.accessRule.id),Aa(1),Qs(" ",e.pool.name,"\n"),Aa(3),ls("ngIf",-1!==e.accessRule.id),Aa(5),ls("ngModel",e.accessRule.access))},directives:[gS,Th,yS,fO,rO,TS,FO,px,tE,$C,_S,DS,vS,FT,gx,YS,Oh,zT],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function ZF(t,e){if(1&t&&(cs(0,"mat-option",8),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function $F(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",9),_s("changed",function(t){return nn(n),xs().groupFilter=t}),hs()}}function XF(t,e){if(1&t&&(fs(0),$s(1),ps()),2&t){var n=xs().$implicit;Aa(1),Qs(" (",n.comments,")")}}function QF(t,e){if(1&t&&(cs(0,"mat-option",8),$s(1),as(2,XF,2,1,"ng-container",10),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name,""),Aa(1),ls("ngIf",n.comments)}}var JF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.model=null,this.auths=[],this.groups=[],this.groupFilter="",this.authId="",this.groupId="",this.pool=i.pool,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i},disableClose:!1}).componentInstance.onSave},t.prototype.authChanged=function(){var t=this;""!==this.authId&&this.rest.authenticators.detail(this.authId,"groups").summary().subscribe(function(e){t.groups=e})},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()})},t.prototype.changeAuth=function(t){this.groupId="",this.authChanged()},t.prototype.filteredGroups=function(){var t=this;return""===this.groupFilter?this.groups:this.groups.filter(function(e){return e.name.toLocaleLowerCase().includes(t.groupFilter.toLocaleLowerCase())})},t.prototype.save=function(){var t=this;""!==this.groupId&&""!==this.authId?this.model.create({id:this.groupId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid group"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-add-group"]],decls:26,vars:6,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"],[4,"ngIf"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"New group for"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),cs(5,"div",1),cs(6,"mat-form-field"),cs(7,"mat-label"),cs(8,"uds-translate"),$s(9,"Authenticator"),hs(),hs(),cs(10,"mat-select",2),_s("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),as(11,ZF,2,2,"mat-option",3),hs(),hs(),cs(12,"mat-form-field"),cs(13,"mat-label"),cs(14,"uds-translate"),$s(15,"Group"),hs(),hs(),cs(16,"mat-select",4),_s("ngModelChange",function(t){return e.groupId=t}),as(17,$F,1,0,"uds-mat-select-search",5),as(18,QF,3,3,"mat-option",3),hs(),hs(),hs(),hs(),cs(19,"mat-dialog-actions"),cs(20,"button",6),cs(21,"uds-translate"),$s(22,"Cancel"),hs(),hs(),cs(23,"button",7),_s("click",function(){return e.save()}),cs(24,"uds-translate"),$s(25,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.pool.name,"\n"),Aa(7),ls("ngModel",e.authId),Aa(1),ls("ngForOf",e.auths),Aa(5),ls("ngModel",e.groupId),Aa(1),ls("ngIf",e.groups.length>10),Aa(1),ls("ngForOf",e.filteredGroups()))},directives:[gS,TS,yS,fO,rO,FO,px,tE,Oh,Th,_S,DS,vS,$C,zT],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function tL(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",7),_s("changed",function(t){return nn(n),xs().transportsFilter=t}),hs()}}function eL(t,e){if(1&t&&(fs(0),$s(1),ps()),2&t){var n=xs().$implicit;Aa(1),Qs(" (",n.comments,")")}}function nL(t,e){if(1&t&&(cs(0,"mat-option",8),$s(1),as(2,eL,2,1,"ng-container",9),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name,""),Aa(1),ls("ngIf",n.comments)}}var iL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.transports=[],this.transportsFilter="",this.transportId="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.transports.summary().subscribe(function(e){t.transports=e.filter(function(e){return t.servicePool.info.allowedProtocols.includes(e.protocol)})})},t.prototype.filteredTransports=function(){var t=this;return""===this.transportsFilter?this.transports:this.transports.filter(function(e){return e.name.toLocaleLowerCase().includes(t.transportsFilter.toLocaleLowerCase())})},t.prototype.save=function(){var t=this;""!==this.transportId?this.rest.servicesPools.detail(this.servicePool.id,"transports").create({id:this.transportId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid transport"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-add-transport"]],decls:20,vars:4,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[4,"ngIf"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"New transport for"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),cs(5,"div",1),cs(6,"mat-form-field"),cs(7,"mat-label"),cs(8,"uds-translate"),$s(9,"Transport"),hs(),hs(),cs(10,"mat-select",2),_s("ngModelChange",function(t){return e.transportId=t}),as(11,tL,1,0,"uds-mat-select-search",3),as(12,nL,3,3,"mat-option",4),hs(),hs(),hs(),hs(),cs(13,"mat-dialog-actions"),cs(14,"button",5),cs(15,"uds-translate"),$s(16,"Cancel"),hs(),hs(),cs(17,"button",6),_s("click",function(){return e.save()}),cs(18,"uds-translate"),$s(19,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.servicePool.name,"\n"),Aa(7),ls("ngModel",e.transportId),Aa(1),ls("ngIf",e.transports.length>10),Aa(1),ls("ngForOf",e.filteredTransports()))},directives:[gS,TS,yS,fO,rO,FO,px,tE,Th,Oh,_S,DS,vS,zT,$C],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),rL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.reason="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){},t.prototype.save=function(){var t=this;this.rest.servicesPools.detail(this.servicePool.id,"publications").invoke("publish","changelog="+encodeURIComponent(this.reason)).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-new-publication"]],decls:18,vars:2,consts:[["mat-dialog-title",""],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"New publication for"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),cs(5,"div",1),cs(6,"mat-form-field"),cs(7,"mat-label"),cs(8,"uds-translate"),$s(9,"Comments"),hs(),hs(),cs(10,"input",2),_s("ngModelChange",function(t){return e.reason=t}),hs(),hs(),hs(),hs(),cs(11,"mat-dialog-actions"),cs(12,"button",3),cs(13,"uds-translate"),$s(14,"Cancel"),hs(),hs(),cs(15,"button",4),_s("click",function(){return e.save()}),cs(16,"uds-translate"),$s(17,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.servicePool.name,"\n"),Aa(7),ls("ngModel",e.reason))},directives:[gS,TS,yS,fO,rO,FT,YS,px,tE,_S,DS,vS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),aL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1})},t.prototype.ngOnInit=function(){this.changeLogPubs=this.rest.servicesPools.detail(this.servicePool.id,"changelog")},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-publications-changelog"]],decls:11,vars:4,consts:[["mat-dialog-title",""],["icon","publications",3,"rest","allowExport","tableId"],["changeLog",""],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Changelog of"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),ds(5,"uds-table",1,2),hs(),cs(7,"mat-dialog-actions"),cs(8,"button",3),cs(9,"uds-translate"),$s(10,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.servicePool.name,"\n"),Aa(2),ls("rest",e.changeLogPubs)("allowExport",!0)("tableId","servicePools-d-changelog"+e.servicePool.id))},directives:[gS,TS,yS,AP,_S,DS,vS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function oL(t,e){1&t&&(fs(0),cs(1,"uds-translate"),$s(2,"Edit action for"),hs(),ps())}function sL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New action for"),hs())}function lL(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",14),_s("changed",function(t){return nn(n),xs().calendarsFilter=t}),hs()}}function uL(t,e){if(1&t&&(cs(0,"mat-option",15),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function cL(t,e){if(1&t&&(cs(0,"mat-option",15),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.description," ")}}function hL(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",14),_s("changed",function(t){return nn(n),xs(2).transportsFilter=t}),hs()}}function dL(t,e){if(1&t&&(cs(0,"mat-option",15),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function fL(t,e){if(1&t){var n=vs();fs(0),cs(1,"mat-form-field"),cs(2,"mat-label"),cs(3,"uds-translate"),$s(4,"Transport"),hs(),hs(),cs(5,"mat-select",4),_s("ngModelChange",function(t){return nn(n),xs().paramValue=t}),as(6,hL,1,0,"uds-mat-select-search",5),as(7,dL,2,2,"mat-option",6),hs(),hs(),ps()}if(2&t){var i=xs();Aa(5),ls("ngModel",i.paramValue),Aa(1),ls("ngIf",i.transports.length>10),Aa(1),ls("ngForOf",i.filtered(i.transports,i.transportsFilter))}}function pL(t,e){if(1&t&&(cs(0,"mat-option",15),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function mL(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",14),_s("changed",function(t){return nn(n),xs(2).groupsFilter=t}),hs()}}function vL(t,e){if(1&t&&(cs(0,"mat-option",15),$s(1),hs()),2&t){var n=e.$implicit;ls("value",xs(2).authenticator+"@"+n.id),Aa(1),Qs(" ",n.name," ")}}function gL(t,e){if(1&t){var n=vs();fs(0),cs(1,"mat-form-field"),cs(2,"mat-label"),cs(3,"uds-translate"),$s(4,"Authenticator"),hs(),hs(),cs(5,"mat-select",10),_s("ngModelChange",function(t){return nn(n),xs().authenticator=t})("valueChange",function(t){return nn(n),xs().changedAuthenticator(t)}),as(6,pL,2,2,"mat-option",6),hs(),hs(),cs(7,"mat-form-field"),cs(8,"mat-label"),cs(9,"uds-translate"),$s(10,"Group"),hs(),hs(),cs(11,"mat-select",4),_s("ngModelChange",function(t){return nn(n),xs().paramValue=t}),as(12,mL,1,0,"uds-mat-select-search",5),as(13,vL,2,2,"mat-option",6),hs(),hs(),ps()}if(2&t){var i=xs();Aa(5),ls("ngModel",i.authenticator),Aa(1),ls("ngForOf",i.authenticators),Aa(5),ls("ngModel",i.paramValue),Aa(1),ls("ngIf",i.groups.length>10),Aa(1),ls("ngForOf",i.filtered(i.groups,i.groupsFilter))}}function yL(t,e){if(1&t){var n=vs();fs(0),cs(1,"div",8),cs(2,"span",16),$s(3),hs(),$s(4,"\xa0 "),cs(5,"mat-slide-toggle",4),_s("ngModelChange",function(t){return nn(n),xs().paramValue=t}),hs(),hs(),ps()}if(2&t){var i=xs();Aa(3),Xs(i.parameter.description),Aa(2),ls("ngModel",i.paramValue)}}function _L(t,e){if(1&t){var n=vs();fs(0),cs(1,"mat-form-field"),cs(2,"mat-label"),$s(3),hs(),cs(4,"input",17),_s("ngModelChange",function(t){return nn(n),xs().paramValue=t}),hs(),hs(),ps()}if(2&t){var i=xs();Aa(3),Qs(" ",i.parameter.description," "),Aa(1),ls("type",i.parameter.type)("ngModel",i.paramValue)}}var bL=function(){return["transport","group","bool"]},kL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.calendars=[],this.actionList=[],this.authenticators=[],this.transports=[],this.groups=[],this.paramsDict={},this.calendarsFilter="",this.groupsFilter="",this.transportsFilter="",this.authenticator="",this.parameter={},this.paramValue="",this.servicePool=i.servicePool,this.scheduledAction={id:void 0,action:"",calendar:"",calendarId:"",atStart:!0,eventsOffset:0,params:{}},void 0!==i.scheduledAction&&(this.scheduledAction.id=i.scheduledAction.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n,scheduledAction:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){return t.authenticators=e}),this.rest.transports.summary().subscribe(function(e){return t.transports=e}),this.rest.calendars.summary().subscribe(function(e){return t.calendars=e}),this.rest.servicesPools.actionsList(this.servicePool.id).subscribe(function(e){t.actionList=e,t.actionList.forEach(function(e){t.paramsDict[e.id]=e.params[0]}),void 0!==t.scheduledAction.id&&t.rest.servicesPools.detail(t.servicePool.id,"actions").get(t.scheduledAction.id).subscribe(function(e){t.scheduledAction=e,t.changedAction(t.scheduledAction.action)})})},t.prototype.filtered=function(t,e){return""===e?t:t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())})},t.prototype.changedAction=function(t){if(this.parameter=this.paramsDict[t],void 0!==this.parameter&&(this.paramValue=this.scheduledAction.params[this.parameter.name],void 0===this.paramValue&&(this.paramValue=!1!==this.parameter.default&&(this.parameter.default||"")),"group"===this.parameter.type)){var e=this.paramValue.split("@");2!==e.length&&(e=["",""]),this.authenticator=e[0],this.changedAuthenticator(this.authenticator)}},t.prototype.changedAuthenticator=function(t){var e=this;t&&this.rest.authenticators.detail(t,"groups").summary().subscribe(function(t){return e.groups=t})},t.prototype.save=function(){var t=this;this.scheduledAction.params={},this.parameter&&(this.scheduledAction.params[this.parameter.name]=this.paramValue),this.rest.servicesPools.detail(this.servicePool.id,"actions").save(this.scheduledAction).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-scheduled-action"]],decls:42,vars:16,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["editTitle",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-atstart"],[3,"ngModel","ngModelChange","valueChange"],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[1,"label"],["matInput","",3,"type","ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(cs(0,"h4",0),as(1,oL,3,0,"ng-container",1),as(2,sL,2,0,"ng-template",null,2,ec),$s(4),hs(),cs(5,"mat-dialog-content"),cs(6,"div",3),cs(7,"mat-form-field"),cs(8,"mat-label"),cs(9,"uds-translate"),$s(10,"Calendar"),hs(),hs(),cs(11,"mat-select",4),_s("ngModelChange",function(t){return e.scheduledAction.calendarId=t}),as(12,lL,1,0,"uds-mat-select-search",5),as(13,uL,2,2,"mat-option",6),hs(),hs(),cs(14,"mat-form-field"),cs(15,"mat-label"),cs(16,"uds-translate"),$s(17,"Events offset (minutes)"),hs(),hs(),cs(18,"input",7),_s("ngModelChange",function(t){return e.scheduledAction.eventsOffset=t}),hs(),hs(),cs(19,"div",8),cs(20,"span",9),cs(21,"uds-translate"),$s(22,"At the beginning of the interval?"),hs(),hs(),cs(23,"mat-slide-toggle",4),_s("ngModelChange",function(t){return e.scheduledAction.atStart=t}),$s(24),hs(),hs(),cs(25,"mat-form-field"),cs(26,"mat-label"),cs(27,"uds-translate"),$s(28,"Action"),hs(),hs(),cs(29,"mat-select",10),_s("ngModelChange",function(t){return e.scheduledAction.action=t})("valueChange",function(t){return e.changedAction(t)}),as(30,cL,2,2,"mat-option",6),hs(),hs(),as(31,fL,8,3,"ng-container",11),as(32,gL,14,5,"ng-container",11),as(33,yL,6,2,"ng-container",11),as(34,_L,5,3,"ng-container",11),hs(),hs(),cs(35,"mat-dialog-actions"),cs(36,"button",12),cs(37,"uds-translate"),$s(38,"Cancel"),hs(),hs(),cs(39,"button",13),_s("click",function(){return e.save()}),cs(40,"uds-translate"),$s(41,"Ok"),hs(),hs(),hs()),2&t){var n=os(3);Aa(1),ls("ngIf",void 0!==e.scheduledAction.id)("ngIfElse",n),Aa(3),Qs(" ",e.servicePool.name,"\n"),Aa(7),ls("ngModel",e.scheduledAction.calendarId),Aa(1),ls("ngIf",e.calendars.length>10),Aa(1),ls("ngForOf",e.filtered(e.calendars,e.calendarsFilter)),Aa(5),ls("ngModel",e.scheduledAction.eventsOffset),Aa(5),ls("ngModel",e.scheduledAction.atStart),Aa(1),Qs(" ",e.api.yesno(e.scheduledAction.atStart)," "),Aa(5),ls("ngModel",e.scheduledAction.action),Aa(1),ls("ngForOf",e.actionList),Aa(1),ls("ngIf","transport"===(null==e.parameter?null:e.parameter.type)),Aa(1),ls("ngIf","group"===(null==e.parameter?null:e.parameter.type)),Aa(1),ls("ngIf","bool"===(null==e.parameter?null:e.parameter.type)),Aa(1),ls("ngIf",(null==e.parameter?null:e.parameter.type)&&!ku(15,bL).includes(e.parameter.type))}},directives:[gS,Th,yS,fO,rO,TS,FO,px,tE,Oh,FT,gx,YS,VM,_S,DS,vS,zT,$C],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-atstart[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}(),wL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.userService=i.userService,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,model:i},disableClose:!1})},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-userservices-log"]],decls:10,vars:4,consts:[["mat-dialog-title",""],[3,"rest","itemId","tableId"],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Logs of"),hs(),$s(3),hs(),cs(4,"mat-dialog-content"),ds(5,"uds-logs-table",1),hs(),cs(6,"mat-dialog-actions"),cs(7,"button",2),cs(8,"uds-translate"),$s(9,"Ok"),hs(),hs(),hs()),2&t&&(Aa(3),Qs(" ",e.userService.name,"\n"),Aa(2),ls("rest",e.model)("itemId",e.userService.id)("tableId","servicePools-d-uslog"+e.userService.id))},directives:[gS,TS,yS,zP,_S,DS,vS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function CL(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",8),_s("changed",function(t){return nn(n),xs().assignablesServicesFilter=t}),hs()}}function SL(t,e){if(1&t&&(cs(0,"mat-option",9),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.text," ")}}function xL(t,e){if(1&t&&(cs(0,"mat-option",9),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}function EL(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",8),_s("changed",function(t){return nn(n),xs().userFilter=t}),hs()}}function AL(t,e){if(1&t&&(cs(0,"mat-option",9),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}var DL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.auths=[],this.assignablesServices=[],this.assignablesServicesFilter="",this.users=[],this.userFilter="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.authChanged=function(){var t=this;this.authId&&this.rest.authenticators.detail(this.authId,"users").summary().subscribe(function(e){t.users=e})},t.prototype.ngOnInit=function(){var t=this;this.authId="",this.userId="",this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()}),this.rest.servicesPools.listAssignables(this.servicePool.id).subscribe(function(e){t.assignablesServices=e})},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(""===this.userFilter)return this.users;var e=new Array;return this.users.forEach(function(n){n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase())&&e.push(n)}),e},t.prototype.filteredAssignables=function(){var t=this;if(""===this.assignablesServicesFilter)return this.assignablesServices;var e=new Array;return this.assignablesServices.forEach(function(n){n.text.toLocaleLowerCase().includes(t.assignablesServicesFilter.toLocaleLowerCase())&&e.push(n)}),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.rest.servicesPools.createFromAssignable(this.servicePool.id,this.userId,this.serviceId).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-assign-service-to-owner"]],decls:32,vars:8,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","selectionChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(cs(0,"h4",0),cs(1,"uds-translate"),$s(2,"Assign service to user manually"),hs(),hs(),cs(3,"mat-dialog-content"),cs(4,"div",1),cs(5,"mat-form-field"),cs(6,"mat-label"),cs(7,"uds-translate"),$s(8,"Service"),hs(),hs(),cs(9,"mat-select",2),_s("ngModelChange",function(t){return e.serviceId=t}),as(10,CL,1,0,"uds-mat-select-search",3),as(11,SL,2,2,"mat-option",4),hs(),hs(),cs(12,"mat-form-field"),cs(13,"mat-label"),cs(14,"uds-translate"),$s(15,"Authenticator"),hs(),hs(),cs(16,"mat-select",5),_s("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),as(17,xL,2,2,"mat-option",4),hs(),hs(),cs(18,"mat-form-field"),cs(19,"mat-label"),cs(20,"uds-translate"),$s(21,"User"),hs(),hs(),cs(22,"mat-select",2),_s("ngModelChange",function(t){return e.userId=t}),as(23,EL,1,0,"uds-mat-select-search",3),as(24,AL,2,2,"mat-option",4),hs(),hs(),hs(),hs(),cs(25,"mat-dialog-actions"),cs(26,"button",6),cs(27,"uds-translate"),$s(28,"Cancel"),hs(),hs(),cs(29,"button",7),_s("click",function(){return e.save()}),cs(30,"uds-translate"),$s(31,"Ok"),hs(),hs(),hs()),2&t&&(Aa(9),ls("ngModel",e.serviceId),Aa(1),ls("ngIf",e.assignablesServices.length>10),Aa(1),ls("ngForOf",e.filteredAssignables()),Aa(5),ls("ngModel",e.authId),Aa(1),ls("ngForOf",e.auths),Aa(5),ls("ngModel",e.userId),Aa(1),ls("ngIf",e.users.length>10),Aa(1),ls("ngForOf",e.filteredUsers()))},directives:[gS,TS,yS,fO,rO,FO,px,tE,Th,Oh,_S,DS,vS,zT,$C],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function OL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Summary"),hs())}function IL(t,e){if(1&t&&ds(0,"uds-information",20),2&t){var n=xs(2);ls("value",n.servicePool)("gui",n.gui)}}function TL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Assigned services"),hs())}function RL(t,e){if(1&t){var n=vs();cs(0,"uds-table",21),_s("customButtonAction",function(t){return nn(n),xs(2).onCustomAssigned(t)})("deleteAction",function(t){return nn(n),xs(2).onDeleteAssigned(t)}),hs()}if(2&t){var i=xs(2);ls("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function PL(t,e){if(1&t){var n=vs();cs(0,"uds-table",22),_s("customButtonAction",function(t){return nn(n),xs(2).onCustomAssigned(t)})("newAction",function(t){return nn(n),xs(2).onNewAssigned(t)})("deleteAction",function(t){return nn(n),xs(2).onDeleteAssigned(t)}),hs()}if(2&t){var i=xs(2);ls("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function ML(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Cache"),hs())}function FL(t,e){if(1&t){var n=vs();cs(0,"mat-tab"),as(1,ML,2,0,"ng-template",9),cs(2,"div",10),cs(3,"uds-table",23),_s("customButtonAction",function(t){return nn(n),xs(2).onCustomCached(t)})("deleteAction",function(t){return nn(n),xs(2).onDeleteCache(t)}),hs(),hs(),hs()}if(2&t){var i=xs(2);Aa(3),ls("rest",i.cache)("multiSelect",!0)("allowExport",!0)("onItem",i.processsCacheElement)("tableId","servicePools-d-cache"+i.servicePool.id)("customButtons",i.customButtonsCachedServices)("pageSize",i.api.config.admin.page_size)}}function LL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Groups"),hs())}function NL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Transports"),hs())}function VL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Publications"),hs())}function jL(t,e){if(1&t){var n=vs();cs(0,"mat-tab"),as(1,VL,2,0,"ng-template",9),cs(2,"div",10),cs(3,"uds-table",24),_s("customButtonAction",function(t){return nn(n),xs(2).onCustomPublication(t)})("newAction",function(t){return nn(n),xs(2).onNewPublication(t)})("rowSelected",function(t){return nn(n),xs(2).onPublicationRowSelect(t)}),hs(),hs(),hs()}if(2&t){var i=xs(2);Aa(3),ls("rest",i.publications)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-publications"+i.servicePool.id)("customButtons",i.customButtonsPublication)("pageSize",i.api.config.admin.page_size)}}function BL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Scheduled actions"),hs())}function zL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Access calendars"),hs())}function HL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Logs"),hs())}function UL(t,e){if(1&t){var n=vs();cs(0,"div",6),cs(1,"div",7),cs(2,"mat-tab-group",8),_s("selectedIndexChange",function(t){return nn(n),xs().selectedTab=t}),cs(3,"mat-tab"),as(4,OL,2,0,"ng-template",9),cs(5,"div",10),as(6,IL,1,2,"uds-information",11),hs(),hs(),cs(7,"mat-tab"),as(8,TL,2,0,"ng-template",9),cs(9,"div",10),as(10,RL,1,7,"uds-table",12),as(11,PL,1,7,"ng-template",null,13,ec),hs(),hs(),as(13,FL,4,7,"mat-tab",14),cs(14,"mat-tab"),as(15,LL,2,0,"ng-template",9),cs(16,"div",10),cs(17,"uds-table",15),_s("newAction",function(t){return nn(n),xs().onNewGroup(t)})("deleteAction",function(t){return nn(n),xs().onDeleteGroup(t)}),hs(),hs(),hs(),cs(18,"mat-tab"),as(19,NL,2,0,"ng-template",9),cs(20,"div",10),cs(21,"uds-table",16),_s("newAction",function(t){return nn(n),xs().onNewTransport(t)})("deleteAction",function(t){return nn(n),xs().onDeleteTransport(t)}),hs(),hs(),hs(),as(22,jL,4,6,"mat-tab",14),cs(23,"mat-tab"),as(24,BL,2,0,"ng-template",9),cs(25,"div",10),cs(26,"uds-table",17),_s("customButtonAction",function(t){return nn(n),xs().onCustomScheduleAction(t)})("newAction",function(t){return nn(n),xs().onNewScheduledAction(t)})("editAction",function(t){return nn(n),xs().onEditScheduledAction(t)})("deleteAction",function(t){return nn(n),xs().onDeleteScheduledAction(t)}),hs(),hs(),hs(),cs(27,"mat-tab"),as(28,zL,2,0,"ng-template",9),cs(29,"div",10),cs(30,"uds-table",18),_s("newAction",function(t){return nn(n),xs().onNewAccessCalendar(t)})("editAction",function(t){return nn(n),xs().onEditAccessCalendar(t)})("deleteAction",function(t){return nn(n),xs().onDeleteAccessCalendar(t)})("loaded",function(t){return nn(n),xs().onAccessCalendarLoad(t)}),hs(),hs(),hs(),cs(31,"mat-tab"),as(32,HL,2,0,"ng-template",9),cs(33,"div",10),ds(34,"uds-logs-table",19),hs(),hs(),hs(),hs(),hs()}if(2&t){var i=os(12),r=xs();Aa(2),ls("selectedIndex",r.selectedTab)("@.disabled",!0),Aa(4),ls("ngIf",r.servicePool&&r.gui),Aa(4),ls("ngIf",!1===r.servicePool.info.must_assign_manually)("ngIfElse",i),Aa(3),ls("ngIf",r.cache),Aa(4),ls("rest",r.groups)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsGroups)("tableId","servicePools-d-groups"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Aa(4),ls("rest",r.transports)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsTransports)("tableId","servicePools-d-transports"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Aa(1),ls("ngIf",r.publications),Aa(4),ls("rest",r.scheduledActions)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-actions"+r.servicePool.id)("customButtons",r.customButtonsScheduledAction)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Aa(4),ls("rest",r.accessCalendars)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonAccessCalendars)("tableId","servicePools-d-access"+r.servicePool.id)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Aa(4),ls("rest",r.rest.servicesPools)("itemId",r.servicePool.id)("tableId","servicePools-d-log"+r.servicePool.id)("pageSize",r.api.config.admin.page_size)}}var qL=function(t){return["/pools","service-pools",t]},WL='event'+django.gettext("Logs")+"",YL='schedule'+django.gettext("Launch now")+"",GL='perm_identity'+django.gettext("Change owner")+"",KL='perm_identity'+django.gettext("Assign service")+"",ZL='cancel'+django.gettext("Cancel")+"",$L='event'+django.gettext("Changelog")+"",XL=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtonsScheduledAction=[{id:"launch-action",html:YL,type:RA.SINGLE_SELECT},UA.getGotoButton(BA,"calendarId")],this.customButtonAccessCalendars=[UA.getGotoButton(BA,"calendarId")],this.customButtonsAssignedServices=[{id:"change-owner",html:GL,type:RA.SINGLE_SELECT},{id:"log",html:WL,type:RA.SINGLE_SELECT},UA.getGotoButton(LA,"owner_info.auth_id","owner_info.user_id")],this.customButtonsCachedServices=[{id:"log",html:WL,type:RA.SINGLE_SELECT}],this.customButtonsPublication=[{id:"cancel-publication",html:ZL,type:RA.SINGLE_SELECT},{id:"changelog",html:$L,type:RA.ALWAYS}],this.customButtonsGroups=[UA.getGotoButton(NA,"auth_id","id")],this.customButtonsTransports=[UA.getGotoButton(VA,"id")],this.servicePool=null,this.gui=null,this.selectedTab=1}return t.cleanInvalidSelections=function(t){return t.table.selection.selected.filter(function(t){return["E","R","M","S","C"].includes(t.state)}).forEach(function(e){return t.table.selection.deselect(e)}),t.table.selection.isEmpty()},t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("pool");this.assignedServices=this.rest.servicesPools.detail(e,"services"),this.groups=this.rest.servicesPools.detail(e,"groups"),this.transports=this.rest.servicesPools.detail(e,"transports"),this.scheduledActions=this.rest.servicesPools.detail(e,"actions"),this.accessCalendars=this.rest.servicesPools.detail(e,"access"),this.rest.servicesPools.get(e).subscribe(function(n){t.servicePool=n,t.cache=t.servicePool.info.uses_cache?t.rest.servicesPools.detail(e,"cache"):null,t.publications=t.servicePool.info.needs_publication?t.rest.servicesPools.detail(e,"publications"):null,t.servicePool.info.can_list_assignables&&t.customButtonsAssignedServices.push({id:"assign-service",html:KL,type:RA.ALWAYS}),t.rest.servicesPools.gui().subscribe(function(e){t.gui=e.filter(function(e){return!(!1===t.servicePool.info.uses_cache&&["initial_srvs","cache_l1_srvs","cache_l2_srvs","max_srvs"].includes(e.name)||!1===t.servicePool.info.uses_cache_l2&&"cache_l2_srvs"===e.name||!1===t.servicePool.info.needs_manager&&"osmanager_id"===e.name)})})})},t.prototype.onNewAssigned=function(t){},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;zF.launch(this.api,e,this.assignedServices).subscribe(function(e){return t.table.overview()})}else"log"===t.param.id?wL.launch(this.api,e,this.assignedServices):"assign-service"===t.param.id&&DL.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onCustomCached=function(t){"log"===t.param.id&&wL.launch(this.api,t.table.selection.selected[0],this.cache)},t.prototype.processsAssignedElement=function(t){t.in_use=this.api.yesno(t.in_use),t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onDeleteAssigned=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete assigned service"))},t.prototype.onDeleteCache=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete cached service"))},t.prototype.processsCacheElement=function(t){t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onNewGroup=function(t){JF.launch(this.api,this.servicePool,this.groups).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewTransport=function(t){iL.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteTransport=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned transport"))},t.prototype.onNewPublication=function(t){rL.launch(this.api,this.servicePool).subscribe(function(e){t.table.overview()})},t.prototype.onPublicationRowSelect=function(t){1===t.table.selection.selected.length&&(this.customButtonsPublication[0].disabled=!["P","W","L","K"].includes(t.table.selection.selected[0].state))},t.prototype.onCustomPublication=function(t){var e=this;"cancel-publication"===t.param.id?this.api.gui.yesno(django.gettext("Publication"),django.gettext("Cancel publication?"),!0).subscribe(function(n){n&&e.publications.invoke(t.table.selection.selected[0].id+"/cancel").subscribe(function(n){e.api.gui.snackbar.open(django.gettext("Publication canceled"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})}):"changelog"===t.param.id&&aL.launch(this.api,this.servicePool)},t.prototype.onNewScheduledAction=function(t){kL.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onEditScheduledAction=function(t){kL.launch(this.api,this.servicePool,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteScheduledAction=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete scheduled action"))},t.prototype.onCustomScheduleAction=function(t){var e=this;this.api.gui.yesno(django.gettext("Execute scheduled action"),django.gettext("Execute scheduled action right now?")).subscribe(function(n){n&&e.scheduledActions.invoke(t.table.selection.selected[0].id+"/execute").subscribe(function(){e.api.gui.snackbar.open(django.gettext("Scheduled action executed"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})})},t.prototype.onNewAccessCalendar=function(t){KF.launch(this.api,this.servicePool,this.accessCalendars).subscribe(function(e){return t.table.overview()})},t.prototype.onEditAccessCalendar=function(t){KF.launch(this.api,this.servicePool,this.accessCalendars,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteAccessCalendar=function(t){-1!==t.table.selection.selected[0].id?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.servicesPools.getFallbackAccess(this.servicePool.id).subscribe(function(n){var i=t.table.dataSource.data.filter(function(t){return!0});i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i})},t.prototype.processsCalendarOrScheduledElement=function(t){t.name=t.calendar,t.atStart=this.api.yesno(t.atStart)},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-service-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction",4,"ngIf","ngIfElse"],["manually_assigned",""],[4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","transports",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","customButtons","onItem","pageSize","customButtonAction","newAction","editAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","customButtons","tableId","onItem","pageSize","newAction","editAction","deleteAction","loaded"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","newAction","deleteAction"],["icon","cached",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","publications",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","newAction","rowSelected"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"a",2),cs(3,"i",3),$s(4,"arrow_back"),hs(),hs(),$s(5," \xa0"),ds(6,"img",4),$s(7),hs(),as(8,UL,35,37,"div",5),hs()),2&t&&(Aa(2),ls("routerLink",wu(4,qL,e.servicePool?e.servicePool.id:"")),Aa(4),ls("src",e.api.staticURL("admin/img/icons/pools.png"),Or),Aa(1),Qs(" \xa0",null==e.servicePool?null:e.servicePool.name," "),Aa(1),ls("ngIf",null!==e.servicePool))},directives:[Vv,Th,XE,zE,NE,AP,zP,TS,GP],styles:[".mat-column-state{max-width:10rem;justify-content:center} .mat-column-cache_level, .mat-column-in_use, .mat-column-priority, .mat-column-revision{max-width:7rem;justify-content:center} .mat-column-access, .mat-column-creation_date, .mat-column-publish_date, .mat-column-state_date, .mat-column-trans_type{max-width:9rem} .mat-column-owner{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word}"]}),t}(),QL=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New meta pool"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit meta pool"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete meta pool"))},t.prototype.onDetail=function(t){this.api.navigation.gotoMetapoolDetail(t.param.id)},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.name=this.api.safeString(this.api.gui.icon(t.thumb)+t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("metapool"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-meta-pools"]],decls:2,vars:6,consts:[["icon","metas",3,"rest","multiSelect","allowExport","onItem","hasPermissions","pageSize","detailAction","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"div"),cs(1,"uds-table",0),_s("detailAction",function(t){return e.onDetail(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs(),hs()),2&t&&(Aa(1),ls("rest",e.rest.metaPools)("multiSelect",!0)("allowExport",!0)("onItem",e.processElement)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[".mat-column-pool_group_name, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center}"]}),t}();function JL(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New member pool"),hs())}function tN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Edit member pool"),hs())}function eN(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",11),_s("changed",function(t){return nn(n),xs().servicePoolsFilter=t}),hs()}}function nN(t,e){if(1&t&&(cs(0,"mat-option",12),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.name," ")}}var iN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.servicePools=[],this.servicePoolsFilter="",this.model=i.model,this.memberPool={id:void 0,priority:0,pool_id:"",enabled:!0},i.memberPool&&(this.memberPool.id=i.memberPool.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{memberPool:i,model:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.servicesPools.summary().subscribe(function(e){return t.servicePools=e}),this.memberPool.id&&this.model.get(this.memberPool.id).subscribe(function(e){return t.memberPool=e})},t.prototype.filtered=function(t,e){return""===e?t:t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())})},t.prototype.save=function(){var t=this;this.memberPool.pool_id?this.model.save(this.memberPool).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid service pool"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-meta-pools-service-pools"]],decls:30,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"mat-form-field-infix"],[1,"label-enabled"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(cs(0,"h4",0),as(1,JL,2,0,"uds-translate",1),as(2,tN,2,0,"uds-translate",1),hs(),cs(3,"mat-dialog-content"),cs(4,"div",2),cs(5,"mat-form-field"),cs(6,"mat-label"),cs(7,"uds-translate"),$s(8,"Priority"),hs(),hs(),cs(9,"input",3),_s("ngModelChange",function(t){return e.memberPool.priority=t}),hs(),hs(),cs(10,"mat-form-field"),cs(11,"mat-label"),cs(12,"uds-translate"),$s(13,"Service pool"),hs(),hs(),cs(14,"mat-select",4),_s("ngModelChange",function(t){return e.memberPool.pool_id=t}),as(15,eN,1,0,"uds-mat-select-search",5),as(16,nN,2,2,"mat-option",6),hs(),hs(),cs(17,"div",7),cs(18,"span",8),cs(19,"uds-translate"),$s(20,"Enabled?"),hs(),hs(),cs(21,"mat-slide-toggle",4),_s("ngModelChange",function(t){return e.memberPool.enabled=t}),$s(22),hs(),hs(),hs(),hs(),cs(23,"mat-dialog-actions"),cs(24,"button",9),cs(25,"uds-translate"),$s(26,"Cancel"),hs(),hs(),cs(27,"button",10),_s("click",function(){return e.save()}),cs(28,"uds-translate"),$s(29,"Ok"),hs(),hs(),hs()),2&t&&(Aa(1),ls("ngIf",!(null!=e.memberPool&&e.memberPool.id)),Aa(1),ls("ngIf",null==e.memberPool?null:e.memberPool.id),Aa(7),ls("ngModel",e.memberPool.priority),Aa(5),ls("ngModel",e.memberPool.pool_id),Aa(1),ls("ngIf",e.servicePools.length>10),Aa(1),ls("ngForOf",e.filtered(e.servicePools,e.servicePoolsFilter)),Aa(5),ls("ngModel",e.memberPool.enabled),Aa(1),Qs(" ",e.api.yesno(e.memberPool.enabled)," "))},directives:[gS,Th,yS,fO,rO,TS,FT,gx,YS,px,tE,FO,Oh,VM,_S,DS,vS,zT,$C],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-enabled[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function rN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Summary"),hs())}function aN(t,e){if(1&t&&ds(0,"uds-information",17),2&t){var n=xs(2);ls("value",n.metaPool)("gui",n.gui)}}function oN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Service pools"),hs())}function sN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Assigned services"),hs())}function lN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Groups"),hs())}function uN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Access calendars"),hs())}function cN(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Logs"),hs())}function hN(t,e){if(1&t){var n=vs();cs(0,"div",6),cs(1,"div",7),cs(2,"mat-tab-group",8),_s("selectedIndexChange",function(t){return nn(n),xs().selectedTab=t}),cs(3,"mat-tab"),as(4,rN,2,0,"ng-template",9),cs(5,"div",10),as(6,aN,1,2,"uds-information",11),hs(),hs(),cs(7,"mat-tab"),as(8,oN,2,0,"ng-template",9),cs(9,"div",10),cs(10,"uds-table",12),_s("newAction",function(t){return nn(n),xs().onNewMemberPool(t)})("editAction",function(t){return nn(n),xs().onEditMemberPool(t)})("deleteAction",function(t){return nn(n),xs().onDeleteMemberPool(t)}),hs(),hs(),hs(),cs(11,"mat-tab"),as(12,sN,2,0,"ng-template",9),cs(13,"div",10),cs(14,"uds-table",13),_s("customButtonAction",function(t){return nn(n),xs().onCustomAssigned(t)})("deleteAction",function(t){return nn(n),xs().onDeleteAssigned(t)}),hs(),hs(),hs(),cs(15,"mat-tab"),as(16,lN,2,0,"ng-template",9),cs(17,"div",10),cs(18,"uds-table",14),_s("newAction",function(t){return nn(n),xs().onNewGroup(t)})("deleteAction",function(t){return nn(n),xs().onDeleteGroup(t)}),hs(),hs(),hs(),cs(19,"mat-tab"),as(20,uN,2,0,"ng-template",9),cs(21,"div",10),cs(22,"uds-table",15),_s("newAction",function(t){return nn(n),xs().onNewAccessCalendar(t)})("editAction",function(t){return nn(n),xs().onEditAccessCalendar(t)})("deleteAction",function(t){return nn(n),xs().onDeleteAccessCalendar(t)})("loaded",function(t){return nn(n),xs().onAccessCalendarLoad(t)}),hs(),hs(),hs(),cs(23,"mat-tab"),as(24,cN,2,0,"ng-template",9),cs(25,"div",10),ds(26,"uds-logs-table",16),hs(),hs(),hs(),hs(),hs()}if(2&t){var i=xs();Aa(2),ls("selectedIndex",i.selectedTab)("@.disabled",!0),Aa(4),ls("ngIf",i.metaPool&&i.gui),Aa(4),ls("rest",i.memberPools)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("customButtons",i.customButtons)("tableId","metaPools-d-members"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Aa(4),ls("rest",i.memberUserServices)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-services"+i.metaPool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size),Aa(4),ls("rest",i.groups)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-groups"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Aa(4),ls("rest",i.accessCalendars)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-access"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Aa(4),ls("rest",i.rest.metaPools)("itemId",i.metaPool.id)("tableId","metaPools-d-log"+i.metaPool.id)("pageSize",i.api.config.admin.page_size)}}var dN=function(t){return["/pools","meta-pools",t]},fN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[UA.getGotoButton(FA,"pool_id")],this.customButtonsAssignedServices=[{id:"change-owner",html:GL,type:RA.SINGLE_SELECT},{id:"log",html:WL,type:RA.SINGLE_SELECT},UA.getGotoButton(LA,"owner_info.auth_id","owner_info.user_id")],this.metaPool=null,this.gui=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("metapool");this.rest.metaPools.get(e).subscribe(function(n){t.metaPool=n,t.rest.metaPools.gui().subscribe(function(e){t.gui=e}),t.memberPools=t.rest.metaPools.detail(e,"pools"),t.memberUserServices=t.rest.metaPools.detail(e,"services"),t.groups=t.rest.metaPools.detail(e,"groups"),t.accessCalendars=t.rest.metaPools.detail(e,"access")})},t.prototype.onNewMemberPool=function(t){iN.launch(this.api,this.memberPools).subscribe(function(){return t.table.overview()})},t.prototype.onEditMemberPool=function(t){iN.launch(this.api,this.memberPools,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDeleteMemberPool=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove member pool"))},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;zF.launch(this.api,e,this.memberUserServices).subscribe(function(e){return t.table.overview()})}else"log"===t.param.id&&wL.launch(this.api,e,this.memberUserServices)},t.prototype.onDeleteAssigned=function(t){XL.cleanInvalidSelections(t)||this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned service"))},t.prototype.onNewGroup=function(t){JF.launch(this.api,this.metaPool.id,this.groups).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewAccessCalendar=function(t){KF.launch(this.api,this.metaPool,this.accessCalendars).subscribe(function(e){return t.table.overview()})},t.prototype.onEditAccessCalendar=function(t){KF.launch(this.api,this.metaPool,this.accessCalendars,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteAccessCalendar=function(t){t.table.selection.selected[0].priority>0?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.metaPools.getFallbackAccess(this.metaPool.id).subscribe(function(n){var i=t.table.dataSource.data.filter(function(t){return!0});i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i})},t.prototype.processElement=function(t){t.enabled=this.api.yesno(t.enabled)},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-meta-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","customButtons","tableId","pageSize","newAction","editAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","groups",3,"rest","multiSelect","allowExport","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","pageSize","newAction","editAction","deleteAction","loaded"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"a",2),cs(3,"i",3),$s(4,"arrow_back"),hs(),hs(),$s(5," \xa0"),ds(6,"img",4),$s(7),hs(),as(8,hN,27,30,"div",5),hs()),2&t&&(Aa(2),ls("routerLink",wu(4,dN,e.metaPool?e.metaPool.id:"")),Aa(4),ls("src",e.api.staticURL("admin/img/icons/metas.png"),Or),Aa(1),Qs(" ",null==e.metaPool?null:e.metaPool.name," "),Aa(1),ls("ngIf",e.metaPool))},directives:[Vv,Th,XE,zE,NE,AP,zP,TS,GP],styles:[".mat-column-enabled, .mat-column-priority{max-width:8rem;justify-content:center}"]}),t}(),pN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New pool group"),!1).subscribe(function(e){return t.table.overview()})},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit pool group"),!1).subscribe(function(e){return t.table.overview()})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete pool group"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("poolgroup"))},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-pool-groups"]],decls:1,vars:5,consts:[["icon","spool-group",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs()),2&t&&ls("rest",e.rest.servicesPoolGroups)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[AP],styles:[".mat-column-priority, .mat-column-thumb{max-width:7rem;justify-content:center}"]}),t}(),mN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New calendar"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit calendar"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar"))},t.prototype.onDetail=function(t){this.api.navigation.gotoCalendarDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("calendar"))},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-calendars"]],decls:1,vars:5,consts:[["icon","calendars",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(cs(0,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),hs()),2&t&&ls("rest",e.rest.calendars)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size)},directives:[AP],styles:[""]}),t}(),vN=["mat-calendar-body",""];function gN(t,e){if(1&t&&(cs(0,"tr",2),cs(1,"td",3),$s(2),hs(),hs()),2&t){var n=xs();Aa(1),Vs("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),is("colspan",n.numCols),Aa(1),Qs(" ",n.label," ")}}function yN(t,e){if(1&t&&(cs(0,"td",7),$s(1),hs()),2&t){var n=xs(2);Vs("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),is("colspan",n._firstRowOffset),Aa(1),Qs(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function _N(t,e){if(1&t){var n=vs();cs(0,"td",8),_s("click",function(t){nn(n);var i=e.$implicit;return xs(2)._cellClicked(i,t)}),cs(1,"div",9),$s(2),hs(),ds(3,"div",10),hs()}if(2&t){var i=e.$implicit,r=e.index,a=xs().index,o=xs();Vs("width",o._cellWidth)("padding-top",o._cellPadding)("padding-bottom",o._cellPadding),js("mat-calendar-body-disabled",!i.enabled)("mat-calendar-body-active",o._isActiveCell(a,r))("mat-calendar-body-range-start",o._isRangeStart(i.compareValue))("mat-calendar-body-range-end",o._isRangeEnd(i.compareValue))("mat-calendar-body-in-range",o._isInRange(i.compareValue))("mat-calendar-body-comparison-bridge-start",o._isComparisonBridgeStart(i.compareValue,a,r))("mat-calendar-body-comparison-bridge-end",o._isComparisonBridgeEnd(i.compareValue,a,r))("mat-calendar-body-comparison-start",o._isComparisonStart(i.compareValue))("mat-calendar-body-comparison-end",o._isComparisonEnd(i.compareValue))("mat-calendar-body-in-comparison-range",o._isInComparisonRange(i.compareValue))("mat-calendar-body-preview-start",o._isPreviewStart(i.compareValue))("mat-calendar-body-preview-end",o._isPreviewEnd(i.compareValue))("mat-calendar-body-in-preview",o._isInPreview(i.compareValue)),ls("ngClass",i.cssClasses)("tabindex",o._isActiveCell(a,r)?0:-1),is("data-mat-row",a)("data-mat-col",r)("aria-label",i.ariaLabel)("aria-disabled",!i.enabled||null)("aria-selected",o._isSelected(i.compareValue)),Aa(1),js("mat-calendar-body-selected",o._isSelected(i.compareValue))("mat-calendar-body-comparison-identical",o._isComparisonIdentical(i.compareValue))("mat-calendar-body-today",o.todayValue===i.compareValue),Aa(1),Qs(" ",i.displayValue," ")}}function bN(t,e){if(1&t&&(cs(0,"tr",4),as(1,yN,2,6,"td",5),as(2,_N,4,46,"td",6),hs()),2&t){var n=e.$implicit,i=e.index,r=xs();Aa(1),ls("ngIf",0===i&&r._firstRowOffset),Aa(1),ls("ngForOf",n)}}function kN(t,e){if(1&t&&(cs(0,"th",5),$s(1),hs()),2&t){var n=e.$implicit;is("aria-label",n.long),Aa(1),Xs(n.narrow)}}var wN=["*"];function CN(t,e){}function SN(t,e){if(1&t){var n=vs();cs(0,"mat-month-view",5),_s("activeDateChange",function(t){return nn(n),xs().activeDate=t})("_userSelection",function(t){return nn(n),xs()._dateSelected(t)}),hs()}if(2&t){var i=xs();ls("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)("comparisonStart",i.comparisonStart)("comparisonEnd",i.comparisonEnd)}}function xN(t,e){if(1&t){var n=vs();cs(0,"mat-year-view",6),_s("activeDateChange",function(t){return nn(n),xs().activeDate=t})("monthSelected",function(t){return nn(n),xs()._monthSelectedInYearView(t)})("selectedChange",function(t){return nn(n),xs()._goToDateInView(t,"month")}),hs()}if(2&t){var i=xs();ls("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function EN(t,e){if(1&t){var n=vs();cs(0,"mat-multi-year-view",7),_s("activeDateChange",function(t){return nn(n),xs().activeDate=t})("yearSelected",function(t){return nn(n),xs()._yearSelectedInMultiYearView(t)})("selectedChange",function(t){return nn(n),xs()._goToDateInView(t,"year")}),hs()}if(2&t){var i=xs();ls("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}var AN=["button"];function DN(t,e){1&t&&(Tn(),cs(0,"svg",3),ds(1,"path",4),hs())}var ON=[[["","matDatepickerToggleIcon",""]]],IN=["[matDatepickerToggleIcon]"],TN=function(){var t=function(){function t(){g(this,t),this.changes=new q,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return v(t,[{key:"formatYearRange",value:function(t,e){return"".concat(t," \u2013 ").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Dt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),RN=function t(e,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6?arguments[6]:void 0;g(this,t),this.value=e,this.displayValue=n,this.ariaLabel=i,this.enabled=r,this.cssClasses=a,this.compareValue=o,this.rawValue=s},PN=function(){var t=function(){function t(e,n){var i=this;g(this,t),this._elementRef=e,this._ngZone=n,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new Ru,this.previewChange=new Ru,this._enterHandler=function(t){if(i._skipNextFocus&&"focus"===t.type)i._skipNextFocus=!1;else if(t.target&&i.isRange){var e=i._getCellFromElement(t.target);e&&i._ngZone.run(function(){return i.previewChange.emit({value:e.enabled?e:null,event:t})})}},this._leaveHandler=function(t){null!==i.previewEnd&&i.isRange&&t.target&&MN(t.target)&&i._ngZone.run(function(){return i.previewChange.emit({value:null,event:t})})},n.runOutsideAngular(function(){var t=e.nativeElement;t.addEventListener("mouseenter",i._enterHandler,!0),t.addEventListener("focus",i._enterHandler,!0),t.addEventListener("mouseleave",i._leaveHandler,!0),t.addEventListener("blur",i._leaveHandler,!0)})}return v(t,[{key:"_cellClicked",value:function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}},{key:"_isSelected",value:function(t){return this.startValue===t||this.endValue===t}},{key:"ngOnChanges",value:function(t){var e=t.numCols,n=this.rows,i=this.numCols;(t.rows||e)&&(this._firstRowOffset=n&&n.length&&n[0].length?i-n[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding="".concat(50*this.cellAspectRatio/i,"%")),!e&&this._cellWidth||(this._cellWidth="".concat(100/i,"%"))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}},{key:"_isActiveCell",value:function(t,e){var n=t*this.numCols+e;return t&&(n-=this._firstRowOffset),n==this.activeCell}},{key:"_focusActiveCell",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.pipe(Rf(1)).subscribe(function(){var n=t._elementRef.nativeElement.querySelector(".mat-calendar-body-active");n&&(e||(t._skipNextFocus=!0),n.focus())})})}},{key:"_isRangeStart",value:function(t){return FN(t,this.startValue,this.endValue)}},{key:"_isRangeEnd",value:function(t){return LN(t,this.startValue,this.endValue)}},{key:"_isInRange",value:function(t){return NN(t,this.startValue,this.endValue,this.isRange)}},{key:"_isComparisonStart",value:function(t){return FN(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isComparisonBridgeStart",value:function(t,e,n){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var i=this.rows[e][n-1];if(!i){var r=this.rows[e-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}},{key:"_isComparisonBridgeEnd",value:function(t,e,n){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var i=this.rows[e][n+1];if(!i){var r=this.rows[e+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}},{key:"_isComparisonEnd",value:function(t){return LN(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isInComparisonRange",value:function(t){return NN(t,this.comparisonStart,this.comparisonEnd,this.isRange)}},{key:"_isComparisonIdentical",value:function(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}},{key:"_isPreviewStart",value:function(t){return FN(t,this.previewStart,this.previewEnd)}},{key:"_isPreviewEnd",value:function(t){return LN(t,this.previewStart,this.previewEnd)}},{key:"_isInPreview",value:function(t){return NN(t,this.previewStart,this.previewEnd,this.isRange)}},{key:"_getCellFromElement",value:function(t){var e;if(MN(t)?e=t:MN(t.parentNode)&&(e=t.parentNode),e){var n=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(n&&i)return this.rows[parseInt(n)][parseInt(i)]}return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Cc))},t.\u0275cmp=oe({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[Ie],attrs:vN,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(as(0,gN,3,6,"tr",0),as(1,bN,3,2,"tr",1)),2&t&&(ls("ngIf",e._firstRowOffset.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t}();function MN(t){return"TD"===t.nodeName}function FN(t,e,n){return null!==n&&e!==n&&t=e&&t===n}function NN(t,e,n,i){return i&&null!==e&&null!==n&&e!==n&&t>=e&&t<=n}var VN=function t(e,n){g(this,t),this.start=e,this.end=n},jN=function(){var t=function(){function t(e,n){g(this,t),this.selection=e,this._adapter=n,this._selectionChanged=new q,this.selectionChanged=this._selectionChanged,this.selection=e}return v(t,[{key:"updateSelection",value:function(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}},{key:"ngOnDestroy",value:function(){this._selectionChanged.complete()}},{key:"_isValidDateInstance",value:function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(void 0),ss(vC))},t.\u0275dir=de({type:t}),t}(),BN=function(){var t=function(t){y(n,t);var e=k(n);function n(t){return g(this,n),e.call(this,null,t)}return v(n,[{key:"add",value:function(t){r(i(n.prototype),"updateSelection",this).call(this,t,this)}},{key:"isValid",value:function(){return null!=this.selection&&this._isValidDateInstance(this.selection)}},{key:"isComplete",value:function(){return null!=this.selection}}]),n}(jN);return t.\u0275fac=function(e){return new(e||t)(Ui(vC))},t.\u0275prov=Dt({token:t,factory:t.\u0275fac}),t}(),zN={provide:jN,deps:[[new Ri,new Mi,jN],vC],useFactory:function(t,e){return t||new BN(e)}},HN=new bi("MAT_DATE_RANGE_SELECTION_STRATEGY"),UN=function(){var t=function(){function t(e,n,i,r,a){g(this,t),this._changeDetectorRef=e,this._dateFormats=n,this._dateAdapter=i,this._dir=r,this._rangeStrategy=a,this._rerenderSubscription=A.EMPTY,this.selectedChange=new Ru,this._userSelection=new Ru,this.activeDateChange=new Ru,this._activeDate=this._dateAdapter.today()}return v(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Ff(null)).subscribe(function(){return t._init()})}},{key:"ngOnChanges",value:function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_dateSelected",value:function(t){var e,n,i=t.value,r=this._dateAdapter.getYear(this.activeDate),a=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.createDate(r,a,i);this._selected instanceof VN?(e=this._getDateInCurrentMonth(this._selected.start),n=this._getDateInCurrentMonth(this._selected.end)):e=n=this._getDateInCurrentMonth(this._selected),e===i&&n===i||this.selectedChange.emit(o),this._userSelection.emit({value:o,event:t.event})}},{key:"_handleCalendarBodyKeydown",value:function(t){var e=this._activeDate,n=this._isRtl();switch(t.keyCode){case Py:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case Fy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case My:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case Ly:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case Ry:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case Ty:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case Dy:case Iy:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case Oy:return void(null==this._previewEnd||Ny(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}},{key:"_init",value:function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(t){this._matCalendarBody._focusActiveCell(t)}},{key:"_previewChanged",value:function(t){var e=t.value;if(this._rangeStrategy){var n=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(n.start),this._previewEnd=this._getCellCompareValue(n.end),this._changeDetectorRef.detectChanges()}}},{key:"_initWeekdays",value:function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),n=this._dateAdapter.getDayOfWeekNames("long").map(function(t,n){return{long:t,narrow:e[n]}});this._weekdays=n.slice(t).concat(n.slice(0,t))}},{key:"_createWeekCells",value:function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,i=this._firstWeekOffset;n=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}},{key:"_getDateInCurrentMonth",value:function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}},{key:"_hasSameMonthAndYear",value:function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}},{key:"_getCellCompareValue",value:function(t){if(t){var e=this._dateAdapter.getYear(t),n=this._dateAdapter.getMonth(t),i=this._dateAdapter.getDate(t);return new Date(e,n,i).getTime()}return null}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setRanges",value:function(t){t instanceof VN?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}},{key:"activeDate",get:function(){return this._activeDate},set:function(t){var e=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t instanceof VN?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}},{key:"minDate",get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"maxDate",get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Kl),ss(gC,8),ss(vC,8),ss(ry,8),ss(HN,8))},t.\u0275cmp=oe({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var n;1&t&&Yu(PN,!0),2&t&&qu(n=Xu())&&(e._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[Ie],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(cs(0,"table",0),cs(1,"thead",1),cs(2,"tr"),as(3,kN,2,2,"th",2),hs(),cs(4,"tr"),ds(5,"th",3),hs(),hs(),cs(6,"tbody",4),_s("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),hs(),hs()),2&t&&(Aa(3),ls("ngForOf",e._weekdays),Aa(3),ls("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[Oh,PN],encapsulation:2,changeDetection:0}),t}(),qN=24,WN=function(){var t=function(){function t(e,n,i){g(this,t),this._changeDetectorRef=e,this._dateAdapter=n,this._dir=i,this._rerenderSubscription=A.EMPTY,this.selectedChange=new Ru,this.yearSelected=new Ru,this.activeDateChange=new Ru,this._activeDate=this._dateAdapter.today()}return v(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Ff(null)).subscribe(function(){return t._init()})}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_init",value:function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-GN(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var n=0,i=[];nthis._dateAdapter.getYear(this.maxDate)||this.minDate&&tn||t===n&&e>i}return!1}},{key:"_isYearAndMonthBeforeMinDate",value:function(t,e){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return t enter",ub("120ms cubic-bezier(0, 0, 0.2, 1)",hb({opacity:1,transform:"scale(1, 1)"}))),pb("* => void",ub("100ms linear",hb({opacity:0})))]),fadeInCalendar:lb("fadeInCalendar",[db("void",hb({opacity:0})),db("enter",hb({opacity:1})),pb("void => *",ub("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},tV=0,eV=new bi("mat-datepicker-scroll-strategy"),nV={provide:eV,deps:[h_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},iV=uC(function t(e){g(this,t),this._elementRef=e}),rV=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s){var l;return g(this,n),(l=e.call(this,t))._changeDetectorRef=i,l._model=r,l._dateAdapter=a,l._rangeSelectionStrategy=o,l._subscriptions=new A,l._animationState="enter",l._animationDone=new q,l._closeButtonText=(null==s?void 0:s.closeCalendarLabel)||"Close calendar",l}return v(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._subscriptions.add(this.datepicker._stateChanges.subscribe(function(){t._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}},{key:"ngOnDestroy",value:function(){this._subscriptions.unsubscribe(),this._animationDone.complete()}},{key:"_handleUserSelection",value:function(t){var e=this._model.selection,n=t.value,i=e instanceof VN;if(i&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(n,e,t.event);this._model.updateSelection(r,this)}else!n||!i&&this._dateAdapter.sameDate(n,e)||this._model.add(n);this._model&&!this._model.isComplete()||this.datepicker.close()}},{key:"_startExitAnimation",value:function(){this._animationState="void",this._changeDetectorRef.markForCheck()}},{key:"_getSelected",value:function(){return this._model.selection}}]),n}(iV);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(jN),ss(vC),ss(HN,8),ss(TN))},t.\u0275cmp=oe({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var n;1&t&&Yu(QN,!0),2&t&&qu(n=Xu())&&(e._calendar=n.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&bs("@transformPanel.done",function(){return e._animationDone.next()}),2&t&&(el("@transformPanel",e._animationState),js("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[qo],decls:4,vars:17,consts:[["cdkTrapFocus",""],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"mat-calendar",1),_s("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)})("viewChanged",function(t){return e.datepicker._viewChanged(t)})("_userSelection",function(t){return e._handleUserSelection(t)}),hs(),cs(2,"button",2),_s("focus",function(){return e._closeButtonFocused=!0})("blur",function(){return e._closeButtonFocused=!1})("click",function(){return e.datepicker.close()}),$s(3),hs(),hs()),2&t&&(Aa(1),ls("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter"),Aa(1),js("cdk-visually-hidden",!e._closeButtonFocused),ls("color",e.color||"primary"),Aa(1),Xs(e._closeButtonText))},directives:[H_,QN,Ah,DS],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[JN.transformPanel,JN.fadeInCalendar]},changeDetection:0}),t}(),aV=function(){var t=function(){function t(e,n,i,r,a,o,s,l,u){g(this,t),this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=r,this._dateAdapter=o,this._dir=s,this._document=l,this._model=u,this._inputStateChanges=A.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new Ru,this.monthSelected=new Ru,this.viewChanged=new Ru(!0),this.openedStream=new Ru,this.closedStream=new Ru,this._opened=!1,this.id="mat-datepicker-".concat(tV++),this._focusedElementBeforeOpen=null,this._backdropHarnessClass="".concat(this.id,"-backdrop"),this._stateChanges=new q,this._scrollStrategy=a}return v(t,[{key:"_getMinDate",value:function(){return this._datepickerInput&&this._datepickerInput.min}},{key:"_getMaxDate",value:function(){return this._datepickerInput&&this._datepickerInput.max}},{key:"_getDateFilter",value:function(){return this._datepickerInput&&this._datepickerInput.dateFilter}},{key:"ngOnChanges",value:function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()}},{key:"select",value:function(t){this._model.add(t)}},{key:"_selectYear",value:function(t){this.yearSelected.emit(t)}},{key:"_selectMonth",value:function(t){this.monthSelected.emit(t)}},{key:"_viewChanged",value:function(t){this.viewChanged.emit(t)}},{key:"_registerInput",value:function(t){var e=this;return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(function(){return e._stateChanges.next(void 0)}),this._model}},{key:"open",value:function(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}},{key:"close",value:function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(Rf(1)).subscribe(function(){return t._destroyPopup()})}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}}},{key:"_openAsDialog",value:function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(rV,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!1,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(function(){return t.close()}),this._forwardContentValues(this._dialogRef.componentInstance)}},{key:"_openAsPopup",value:function(){var t=this,e=new vy(rV,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Rf(1)).subscribe(function(){t._popupRef.updatePosition()})}},{key:"_forwardContentValues",value:function(t){t.datepicker=this,t.color=this.color}},{key:"_createPopup",value:function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new Yy({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),dt(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Td(function(e){return e.keyCode===Oy&&!Ny(e)||t._datepickerInput&&Ny(e,"altKey")&&e.keyCode===My}))).subscribe(function(e){e&&e.preventDefault(),t.close()})}},{key:"_destroyPopup",value:function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}},{key:"_setConnectedPositions",value:function(t){var e="end"===this.xPosition?"end":"start",n="start"===e?"end":"start",i="above"===this.yPosition?"bottom":"top",r="top"===i?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:i},{originX:e,originY:i,overlayX:e,overlayY:r},{originX:n,originY:r,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:r}])}},{key:"startAt",get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"color",get:function(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t}},{key:"touchUi",get:function(){return this._touchUi},set:function(t){this._touchUi=lg(t)}},{key:"disabled",get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(t){var e=lg(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))}},{key:"panelClass",get:function(){return this._panelClass},set:function(t){this._panelClass=pg(t)}},{key:"opened",get:function(){return this._opened},set:function(t){lg(t)?this.open():this.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(pS),ss(h_),ss(Cc),ss(su),ss(eV),ss(vC,8),ss(ry,8),ss(ah,8),ss(jN))},t.\u0275dir=de({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[Ie]}),t}(),oV=function(){var t=function(t){y(n,t);var e=k(n);function n(){return g(this,n),e.apply(this,arguments)}return n}(aV);return t.\u0275fac=function(e){return sV(e||t)},t.\u0275cmp=oe({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[gl([zN]),qo],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t}(),sV=vi(oV),lV=function t(e,n){g(this,t),this.target=e,this.targetElement=n,this.value=this.target.value},uV=function(){var t=function(){function t(e,n,i){var r=this;g(this,t),this._elementRef=e,this._dateAdapter=n,this._dateFormats=i,this.dateChange=new Ru,this.dateInput=new Ru,this._valueChange=new Ru,this.stateChanges=new q,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=A.EMPTY,this._localeSubscription=A.EMPTY,this._parseValidator=function(){return r._lastValueValid?null:{matDatepickerParse:{text:r._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value));return!e||r._matchesFilter(e)?null:{matDatepickerFilter:!0}},this._minValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMinDate();return!n||!e||r._dateAdapter.compareDate(n,e)<=0?null:{matDatepickerMin:{min:n,actual:e}}},this._maxValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMaxDate();return!n||!e||r._dateAdapter.compareDate(n,e)>=0?null:{matDatepickerMax:{max:n,actual:e}}},this._lastValueValid=!1,this._localeSubscription=n.localeChanges.subscribe(function(){r.value=r.value})}return v(t,[{key:"_getValidators",value:function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}},{key:"_registerModel",value:function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(function(t){if(t.source!==e){var n=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(n),e._cvaOnChange(n),e._onTouched(),e._formatValue(n),e._canEmitChangeEvent(t)&&(e.dateInput.emit(new lV(e,e._elementRef.nativeElement)),e.dateChange.emit(new lV(e,e._elementRef.nativeElement))),e._outsideValueChanged&&e._outsideValueChanged()}})}},{key:"ngAfterViewInit",value:function(){this._isInitialized=!0}},{key:"ngOnChanges",value:function(t){(function(t,e){for(var n=0,i=Object.keys(t);n2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):r=!0,r?Promise.resolve().then(function(){return n._updateModelValue(i)}):this._updateModelValue(i)}},{key:"_isSelected",value:function(t){return this._selectionModel&&this._selectionModel.isSelected(t)}},{key:"_isPrechecked",value:function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(function(e){return null!=t.value&&e===t.value}):t.value===this._rawValue)}},{key:"_setSelectionByValue",value:function(t){var e=this;this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(function(t){return e._selectValue(t)})):(this._clearSelection(),this._selectValue(t)))}},{key:"_clearSelection",value:function(){this._selectionModel.clear(),this._buttonToggles.forEach(function(t){return t.checked=!1})}},{key:"_selectValue",value:function(t){var e=this._buttonToggles.find(function(e){return null!=e.value&&e.value===t});e&&(e.checked=!0,this._selectionModel.select(e))}},{key:"_updateModelValue",value:function(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}},{key:"name",get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach(function(t){t.name=e._name,t._markForCheck()})}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=lg(t)}},{key:"value",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(function(t){return t.value}):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}},{key:"selected",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=lg(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=lg(t),this._buttonToggles&&this._buttonToggles.forEach(function(t){return t._markForCheck()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Kl),ss(yV,8))},t.\u0275dir=de({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;1&t&&Ku(n,xV,!0),2&t&&qu(i=Xu())&&(e._buttonToggles=i)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(is("aria-disabled",e.disabled),js("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[gl([bV,{provide:_V,useExisting:t}])]}),t}(),SV=cC(function t(){g(this,t)}),xV=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,a,o,s){var l;g(this,n),(l=e.call(this))._changeDetectorRef=i,l._elementRef=r,l._focusMonitor=a,l._isSingleSelector=!1,l._checked=!1,l.ariaLabelledby=null,l._disabled=!1,l.change=new Ru;var u=Number(o);return l.tabIndex=u||0===u?u:null,l.buttonToggleGroup=t,l.appearance=s&&s.appearance?s.appearance:"standard",l}return v(n,[{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-".concat(kV++),this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){var t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}},{key:"focus",value:function(t){this._buttonElement.nativeElement.focus(t)}},{key:"_onButtonClick",value:function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new wV(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}},{key:"buttonId",get:function(){return"".concat(this.id,"-button")}},{key:"appearance",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t}},{key:"checked",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=lg(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=lg(t)}}]),n}(SV);return t.\u0275fac=function(e){return new(e||t)(ss(_V,8),ss(Kl),ss(xl),ss($_),gi("tabindex"),ss(yV,8))},t.\u0275cmp=oe({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;1&t&&Yu(vV,!0),2&t&&qu(n=Xu())&&(e._buttonElement=n.first)},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(t,e){1&t&&_s("focus",function(){return e.focus()}),2&t&&(is("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),js("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[qo],ngContentSelectors:gV,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(As(),cs(0,"button",0,1),_s("click",function(){return e._onButtonClick()}),cs(2,"span",2),Ds(3),hs(),hs(),ds(4,"span",3),ds(5,"span",4)),2&t){var n=os(1);ls("id",e.buttonId)("disabled",e.disabled||null),is("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Aa(5),ls("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[NC],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t}(),EV=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[sC,VC],sC]}),t}();function AV(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Edit rule"),hs())}function DV(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New rule"),hs())}function OV(t,e){if(1&t&&(cs(0,"mat-option",22),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.value," ")}}function IV(t,e){if(1&t&&(cs(0,"mat-option",22),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.value," ")}}function TV(t,e){if(1&t&&(cs(0,"mat-button-toggle",22),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.value," ")}}function RV(t,e){if(1&t){var n=vs();cs(0,"div",23),cs(1,"span",24),cs(2,"uds-translate"),$s(3,"Weekdays"),hs(),hs(),cs(4,"mat-button-toggle-group",25),_s("ngModelChange",function(t){return nn(n),xs().wDays=t}),as(5,TV,2,2,"mat-button-toggle",8),hs(),hs()}if(2&t){var i=xs();Aa(4),ls("ngModel",i.wDays),Aa(1),ls("ngForOf",i.weekDays)}}function PV(t,e){if(1&t){var n=vs();cs(0,"mat-form-field",9),cs(1,"mat-label"),cs(2,"uds-translate"),$s(3,"Repeat every"),hs(),hs(),cs(4,"input",6),_s("ngModelChange",function(t){return nn(n),xs().rule.interval=t}),hs(),cs(5,"div",26),$s(6),hs(),hs()}if(2&t){var i=xs();Aa(4),ls("ngModel",i.rule.interval),Aa(2),Qs("\xa0",i.frequency(),"")}}var MV={DAILY:[django.gettext("day"),django.gettext("days"),django.gettext("Daily")],WEEKLY:[django.gettext("week"),django.gettext("weeks"),django.gettext("Weekly")],MONTHLY:[django.gettext("month"),django.gettext("months"),django.gettext("Monthly")],YEARLY:[django.gettext("year"),django.gettext("years"),django.gettext("Yearly")],WEEKDAYS:["","",django.gettext("Weekdays")]},FV={MINUTES:django.gettext("Minutes"),HOURS:django.gettext("Hours"),DAYS:django.gettext("Days"),WEEKS:django.gettext("Weeks")},LV=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")];function NV(t,e){void 0===e&&(e=!1);for(var n=new Array,i=0;i<7;i++)1&t&&n.push(LV[i].substr(0,e?100:3)),t>>=1;return n.length?n.join(", "):django.gettext("(no days)")}var VV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.dunits=Object.keys(FV).map(function(t){return{id:t,value:FV[t]}}),this.freqs=Object.keys(MV).map(function(t){return{id:t,value:MV[t][2]}}),this.weekDays=LV.map(function(t,e){return{id:1<0?" "+django.gettext("and every event will be active for")+" "+this.rule.duration+" "+FV[this.rule.duration_unit]:django.gettext("with no duration")}return t.replace("$FIELD",n)},t.prototype.save=function(){var t=this;this.rules.save(this.rule).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-calendar-rule"]],decls:73,vars:21,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],[1,"oneThird"],["matInput","","type","time",3,"ngModel","ngModelChange"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","ngModelChange"],["matSuffix","",3,"for"],["startDatePicker",""],["matInput","",3,"matDatepicker","ngModel","placeholder","ngModelChange"],["endDatePicker",""],[1,"weekdays"],[3,"ngModel","ngModelChange","valueChange"],["class","oneHalf mat-form-field-infix",4,"ngIf"],["class","oneHalf",4,"ngIf"],[1,"info"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"disabled","click"],[3,"value"],[1,"oneHalf","mat-form-field-infix"],[1,"label-weekdays"],["multiple","",3,"ngModel","ngModelChange"],["matSuffix",""]],template:function(t,e){if(1&t&&(cs(0,"h4",0),as(1,AV,2,0,"uds-translate",1),as(2,DV,2,0,"uds-translate",1),hs(),cs(3,"mat-dialog-content"),cs(4,"div",2),cs(5,"mat-form-field"),cs(6,"mat-label"),cs(7,"uds-translate"),$s(8,"Name"),hs(),hs(),cs(9,"input",3),_s("ngModelChange",function(t){return e.rule.name=t}),hs(),hs(),cs(10,"mat-form-field"),cs(11,"mat-label"),cs(12,"uds-translate"),$s(13,"Comments"),hs(),hs(),cs(14,"input",3),_s("ngModelChange",function(t){return e.rule.comments=t}),hs(),hs(),cs(15,"h3"),cs(16,"uds-translate"),$s(17,"Event"),hs(),hs(),cs(18,"mat-form-field",4),cs(19,"mat-label"),cs(20,"uds-translate"),$s(21,"Start time"),hs(),hs(),cs(22,"input",5),_s("ngModelChange",function(t){return e.startTime=t}),hs(),hs(),cs(23,"mat-form-field",4),cs(24,"mat-label"),cs(25,"uds-translate"),$s(26,"Duration"),hs(),hs(),cs(27,"input",6),_s("ngModelChange",function(t){return e.rule.duration=t}),hs(),hs(),cs(28,"mat-form-field",4),cs(29,"mat-label"),cs(30,"uds-translate"),$s(31,"Duration units"),hs(),hs(),cs(32,"mat-select",7),_s("ngModelChange",function(t){return e.rule.duration_unit=t}),as(33,OV,2,2,"mat-option",8),hs(),hs(),cs(34,"h3"),$s(35," Repetition "),hs(),cs(36,"mat-form-field",9),cs(37,"mat-label"),cs(38,"uds-translate"),$s(39," Start date "),hs(),hs(),cs(40,"input",10),_s("ngModelChange",function(t){return e.startDate=t}),hs(),ds(41,"mat-datepicker-toggle",11),ds(42,"mat-datepicker",null,12),hs(),cs(44,"mat-form-field",9),cs(45,"mat-label"),cs(46,"uds-translate"),$s(47," Repeat until date "),hs(),hs(),cs(48,"input",13),_s("ngModelChange",function(t){return e.endDate=t}),hs(),ds(49,"mat-datepicker-toggle",11),ds(50,"mat-datepicker",null,14),hs(),cs(52,"div",15),cs(53,"mat-form-field",9),cs(54,"mat-label"),cs(55,"uds-translate"),$s(56,"Frequency"),hs(),hs(),cs(57,"mat-select",16),_s("ngModelChange",function(t){return e.rule.frequency=t})("valueChange",function(){return e.rule.interval=1}),as(58,IV,2,2,"mat-option",8),hs(),hs(),as(59,RV,6,2,"div",17),as(60,PV,7,2,"mat-form-field",18),hs(),cs(61,"h3"),cs(62,"uds-translate"),$s(63,"Summary"),hs(),hs(),cs(64,"div",19),$s(65),hs(),hs(),hs(),cs(66,"mat-dialog-actions"),cs(67,"button",20),cs(68,"uds-translate"),$s(69,"Cancel"),hs(),hs(),cs(70,"button",21),_s("click",function(){return e.save()}),cs(71,"uds-translate"),$s(72,"Ok"),hs(),hs(),hs()),2&t){var n=os(43),i=os(51);Aa(1),ls("ngIf",e.rule.id),Aa(1),ls("ngIf",!e.rule.id),Aa(7),ls("ngModel",e.rule.name),Aa(5),ls("ngModel",e.rule.comments),Aa(8),ls("ngModel",e.startTime),Aa(5),ls("ngModel",e.rule.duration),Aa(5),ls("ngModel",e.rule.duration_unit),Aa(1),ls("ngForOf",e.dunits),Aa(7),ls("matDatepicker",n)("ngModel",e.startDate),Aa(1),ls("for",n),Aa(7),ls("matDatepicker",i)("ngModel",e.endDate)("placeholder",e.FOREVER_STRING),Aa(1),ls("for",i),Aa(8),ls("ngModel",e.rule.frequency),Aa(1),ls("ngForOf",e.freqs),Aa(1),ls("ngIf","WEEKDAYS"===e.rule.frequency),Aa(1),ls("ngIf","WEEKDAYS"!==e.rule.frequency),Aa(5),Qs(" ",e.summary()," "),Aa(5),ls("disabled",null!==e.updateRuleData()||""===e.rule.name)}},directives:[gS,Th,yS,fO,rO,TS,FT,YS,px,tE,gx,FO,Oh,dV,pV,lO,oV,_S,DS,vS,$C,CV,xV],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]:not(.oneThird):not(.oneHalf){width:100%}.mat-form-field.oneThird[_ngcontent-%COMP%]{width:31%;margin-right:2%}.mat-form-field.oneHalf[_ngcontent-%COMP%]{width:48%;margin-right:2%}h3[_ngcontent-%COMP%]{width:100%;margin-top:.3rem;margin-bottom:1rem}.weekdays[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end}.label-weekdays[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.mat-datepicker-toggle[_ngcontent-%COMP%]{color:#00f}.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:rgba(35,35,133,.5);color:#fff}"]}),t}();function jV(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Rules"),hs())}function BV(t,e){if(1&t){var n=vs();cs(0,"div",6),cs(1,"div",7),cs(2,"mat-tab-group",8),cs(3,"mat-tab"),as(4,jV,2,0,"ng-template",9),cs(5,"div",10),cs(6,"uds-table",11),_s("newAction",function(t){return nn(n),xs().onNewRule(t)})("editAction",function(t){return nn(n),xs().onEditRule(t)})("deleteAction",function(t){return nn(n),xs().onDeleteRule(t)}),hs(),hs(),hs(),hs(),hs(),hs()}if(2&t){var i=xs();Aa(2),ls("@.disabled",!0),Aa(4),ls("rest",i.calendarRules)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","calendars-d-rules"+i.calendar.id)("pageSize",i.api.config.admin.page_size)}}var zV=function(t){return["/pools","calendars",t]},HV=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("calendar");this.rest.calendars.get(e).subscribe(function(e){t.calendar=e,t.calendarRules=t.rest.calendars.detail(e.id,"rules")})},t.prototype.onNewRule=function(t){VV.launch(this.api,this.calendarRules).subscribe(function(){return t.table.overview()})},t.prototype.onEditRule=function(t){VV.launch(this.api,this.calendarRules,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDeleteRule=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar rule"))},t.prototype.processElement=function(t){!function(t){t.interval="WEEKDAYS"===t.frequency?NV(t.interval):t.interval+" "+MV[t.frequency][django.pluralidx(t.interval)],t.duration=t.duration+" "+FV[t.duration_unit]}(t)},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-calendars-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","pageSize","newAction","editAction","deleteAction"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"a",2),cs(3,"i",3),$s(4,"arrow_back"),hs(),hs(),$s(5," \xa0"),ds(6,"img",4),$s(7),hs(),as(8,BV,7,7,"div",5),hs()),2&t&&(Aa(2),ls("routerLink",wu(4,zV,e.calendar?e.calendar.id:"")),Aa(4),ls("src",e.api.staticURL("admin/img/icons/calendars.png"),Or),Aa(1),Qs(" ",null==e.calendar?null:e.calendar.name," "),Aa(1),ls("ngIf",e.calendar))},directives:[Vv,Th,XE,zE,NE,AP,TS],styles:[".mat-column-end, .mat-column-frequency, .mat-column-start{max-width:9rem} .mat-column-duration, .mat-column-interval{max-width:11rem}"]}),t}(),UV='event'+django.gettext("Set time mark")+"",qV=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"timemark",html:UV,type:RA.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New account"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit account"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account"))},t.prototype.onTimeMark=function(t){var e=this,n=t.table.selection.selected[0];this.api.gui.yesno(django.gettext("Time mark"),django.gettext("Set time mark for $NAME to current date/time?").replace("$NAME",n.name)).subscribe(function(i){i&&e.rest.accounts.timemark(n.id).subscribe(function(){e.api.gui.snackbar.open(django.gettext("Time mark stablished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})})},t.prototype.onDetail=function(t){this.api.navigation.gotoAccountDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("account"))},t.prototype.processElement=function(t){t.time_mark=78793200===t.time_mark?django.gettext("No time mark"):uR("SHORT_DATE_FORMAT",t.time_mark)},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-accounts"]],decls:1,vars:7,consts:[["icon","accounts",3,"rest","multiSelect","allowExport","hasPermissions","customButtons","pageSize","onItem","customButtonAction","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(cs(0,"uds-table",0),_s("customButtonAction",function(t){return e.onTimeMark(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),hs()),2&t&&ls("rest",e.rest.accounts)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("onItem",e.processElement)},directives:[AP],styles:[""]}),t}();function WV(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Account usage"),hs())}function YV(t,e){if(1&t){var n=vs();cs(0,"div",6),cs(1,"div",7),cs(2,"mat-tab-group",8),cs(3,"mat-tab"),as(4,WV,2,0,"ng-template",9),cs(5,"div",10),cs(6,"uds-table",11),_s("deleteAction",function(t){return nn(n),xs().onDeleteUsage(t)}),hs(),hs(),hs(),hs(),hs(),hs()}if(2&t){var i=xs();Aa(2),ls("@.disabled",!0),Aa(4),ls("rest",i.accountUsage)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","account-d-usage"+i.account.id)}}var GV=function(t){return["/pools","accounts",t]},KV=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("account");this.rest.accounts.get(e).subscribe(function(e){t.account=e,t.accountUsage=t.rest.accounts.detail(e.id,"usage")})},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account usage"))},t.prototype.processElement=function(t){t.running=this.api.yesno(t.running)},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-accounts-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","accounts",3,"rest","multiSelect","allowExport","onItem","tableId","deleteAction"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"div",1),cs(2,"a",2),cs(3,"i",3),$s(4,"arrow_back"),hs(),hs(),$s(5," \xa0"),ds(6,"img",4),$s(7),hs(),as(8,YV,7,6,"div",5),hs()),2&t&&(Aa(2),ls("routerLink",wu(4,GV,e.account?e.account.id:"")),Aa(4),ls("src",e.api.staticURL("admin/img/icons/accounts.png"),Or),Aa(1),Qs(" ",null==e.account?null:e.account.name," "),Aa(1),ls("ngIf",e.account))},directives:[Vv,Th,XE,zE,NE,AP,TS],styles:[""]}),t}();function ZV(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"New image for"),hs())}function $V(t,e){1&t&&(cs(0,"uds-translate"),$s(1,"Edit for"),hs())}var XV=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Ru(!0),this.preview="",this.image={id:void 0,data:"",name:""},i.image&&(this.image.id=i.image.id)}return t.launch=function(e,n){void 0===n&&(n=null);var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{image:n},disableClose:!0}).componentInstance.onSave},t.prototype.onFileChanged=function(t){var e=this,n=t.target.files[0];if(n.size>262144)this.api.gui.alert(django.gettext("Error"),django.gettext("Image is too big (max. upload size is 256Kb)"));else if(["image/jpeg","image/png","image/gif"].includes(n.type)){var i=new FileReader;i.onload=function(t){var r=i.result;e.preview=r,e.image.data=r.substr(r.indexOf("base64,")+7),e.image.name||(e.image.name=n.name)},i.readAsDataURL(n)}else this.api.gui.alert(django.gettext("Error"),django.gettext("Invalid image type (only supports JPEG, PNG and GIF"))},t.prototype.ngOnInit=function(){var t=this;this.image.id&&this.rest.gallery.get(this.image.id).subscribe(function(e){switch(t.image=e,t.image.data.substr(2)){case"iV":t.preview="data:image/png;base64,"+t.image.data;break;case"/9":t.preview="data:image/jpeg;base64,"+t.image.data;break;default:t.preview="data:image/gif;base64,"+t.image.data}})},t.prototype.background=function(){var t=this.api.config.image_size[0],e=this.api.config.image_size[1],n={"width.px":t,"height.px":e,"background-size":t+"px "+e+"px"};return this.preview&&(n["background-image"]="url("+this.preview+")"),n},t.prototype.save=function(){var t=this;this.image.name&&this.image.data?this.rest.gallery.save(this.image).subscribe(function(){t.api.gui.snackbar.open(django.gettext("Successfully saved"),django.gettext("dismiss"),{duration:2e3}),t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, provide a name and a image"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-gallery-image"]],decls:32,vars:7,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["type","file",2,"display","none",3,"change"],["fileInput",""],["matInput","","type","text",3,"hidden","click"],[1,"preview",3,"click"],[1,"image-preview",3,"ngStyle"],[1,"help"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){if(1&t){var n=vs();cs(0,"h4",0),as(1,ZV,2,0,"uds-translate",1),as(2,$V,2,0,"uds-translate",1),hs(),cs(3,"mat-dialog-content"),cs(4,"div",2),cs(5,"mat-form-field"),cs(6,"mat-label"),cs(7,"uds-translate"),$s(8,"Image name"),hs(),hs(),cs(9,"input",3),_s("ngModelChange",function(t){return e.image.name=t}),hs(),hs(),cs(10,"input",4,5),_s("change",function(t){return e.onFileChanged(t)}),hs(),cs(12,"mat-form-field"),cs(13,"mat-label"),cs(14,"uds-translate"),$s(15,"Image (click to change)"),hs(),hs(),cs(16,"input",6),_s("click",function(){return nn(n),os(11).click()}),hs(),cs(17,"div",7),_s("click",function(){return nn(n),os(11).click()}),ds(18,"div",8),hs(),hs(),cs(19,"div",9),cs(20,"uds-translate"),$s(21,' For optimal results, use "squared" images. '),hs(),cs(22,"uds-translate"),$s(23," The image will be resized on upload to "),hs(),$s(24),hs(),hs(),hs(),cs(25,"mat-dialog-actions"),cs(26,"button",10),cs(27,"uds-translate"),$s(28,"Cancel"),hs(),hs(),cs(29,"button",11),_s("click",function(){return e.save()}),cs(30,"uds-translate"),$s(31,"Ok"),hs(),hs(),hs()}2&t&&(Aa(1),ls("ngIf",!e.image.id),Aa(1),ls("ngIf",e.image.id),Aa(7),ls("ngModel",e.image.name),Aa(7),ls("hidden",!0),Aa(2),ls("ngStyle",e.background()),Aa(6),Js(" ",e.api.config.image_size[0],"x",e.api.config.image_size[1]," "))},directives:[gS,Th,yS,fO,rO,TS,FT,YS,px,tE,Vh,_S,DS,vS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%], .preview[_ngcontent-%COMP%]{width:100%}.preview[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.image-preview[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.3)}"]}),t}(),QV=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){XV.launch(this.api).subscribe(function(){return t.table.overview()})},t.prototype.onEdit=function(t){XV.launch(this.api,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete image"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("image"))},t.\u0275fac=function(e){return new(e||t)(ss(cm),ss(RD),ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-gallery"]],decls:1,vars:5,consts:[["icon","gallery",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(cs(0,"uds-table",0),_s("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),hs()),2&t&&ls("rest",e.rest.gallery)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[AP],styles:[".mat-column-thumb{max-width:7rem;justify-content:center} .mat-column-name{max-width:32rem}"]}),t}(),JV='assessment'+django.gettext("Generate report")+"",tj=function(){function t(t,e){this.rest=t,this.api=e,this.customButtons=[{id:"genreport",html:JV,type:RA.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},t.prototype.generateReport=function(t){var e=this,n=new Ru;n.subscribe(function(n){e.api.gui.snackbar.open(django.gettext("Generating report...")),e.rest.reports.save(n,t.table.selection.selected[0].id).subscribe(function(t){for(var n=t.encoded?window.atob(t.data):t.data,i=n.length,r=new Uint8Array(i),a=0;a div[_ngcontent-%COMP%]{width:50%}.mat-form-field[_ngcontent-%COMP%]{width:100%}input[readonly][_ngcontent-%COMP%]{background-color:#e0e0e0}.slider-label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.config-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;margin-top:2rem;margin-bottom:2rem}"]}),t}()},{path:"tools/actor_tokens",component:function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete actor token - USE WITH EXTREME CAUTION!!!"))},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(cm),ss(RD))},t.\u0275cmp=oe({type:t,selectors:[["uds-actor-tokens"]],decls:2,vars:4,consts:[["icon","maleta",3,"rest","multiSelect","allowExport","pageSize"]],template:function(t,e){1&t&&(cs(0,"div"),ds(1,"uds-table",0),hs()),2&t&&(Aa(1),ls("rest",e.rest.actorToken)("multiSelect",!0)("allowExport",!0)("pageSize",e.api.config.admin.page_size))},directives:[AP],styles:[""]}),t}()}]},{path:"**",redirectTo:"summary"}],yj=function(){function t(){}return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Xv.forRoot(gj,{relativeLinkResolution:"legacy"})],Xv]}),t}(),_j=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),bj=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[VC,sC,x_,_j],sC,_j]}),t}(),kj=["*"],wj=new bi("MatChipRemove"),Cj=new bi("MatChipAvatar"),Sj=new bi("MatChipTrailingIcon"),xj=hC(uC(cC(function t(e){g(this,t),this._elementRef=e}),"primary"),-1),Ej=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,o,s,l,u,c){var h;return g(this,n),(h=e.call(this,t))._elementRef=t,h._ngZone=i,h._changeDetectorRef=s,h._hasFocus=!1,h.chipListSelectable=!0,h._chipListMultiple=!1,h._chipListDisabled=!1,h._selected=!1,h._selectable=!0,h._disabled=!1,h._removable=!0,h._onFocus=new q,h._onBlur=new q,h.selectionChange=new Ru,h.destroyed=new Ru,h.removed=new Ru,h._addHostClassName(),h._chipRippleTarget=l.createElement("div"),h._chipRippleTarget.classList.add("mat-chip-ripple"),h._elementRef.nativeElement.appendChild(h._chipRippleTarget),h._chipRipple=new PC(a(h),i,h._chipRippleTarget,r),h._chipRipple.setupTriggerEvents(t),h.rippleConfig=o||{},h._animationsDisabled="NoopAnimations"===u,h.tabIndex=null!=c&&parseInt(c)||-1,h}return v(n,[{key:"_addHostClassName",value:function(){var t="mat-basic-chip",e=this._elementRef.nativeElement;e.hasAttribute(t)||e.tagName.toLowerCase()===t?e.classList.add(t):e.classList.add("mat-standard-chip")}},{key:"ngOnDestroy",value:function(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"selectViaInteraction",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}},{key:"toggleSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._selected=!this.selected,this._dispatchSelectionChange(t),this._changeDetectorRef.markForCheck(),this.selected}},{key:"focus",value:function(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}},{key:"remove",value:function(){this.removable&&this.removed.emit({chip:this})}},{key:"_handleClick",value:function(t){this.disabled?t.preventDefault():t.stopPropagation()}},{key:"_handleKeydown",value:function(t){if(!this.disabled)switch(t.keyCode){case 46:case 8:this.remove(),t.preventDefault();break;case Iy:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}},{key:"_blur",value:function(){var t=this;this._ngZone.onStable.pipe(Rf(1)).subscribe(function(){t._ngZone.run(function(){t._hasFocus=!1,t._onBlur.next({chip:t})})})}},{key:"_dispatchSelectionChange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}},{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}},{key:"selected",get:function(){return this._selected},set:function(t){var e=lg(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}},{key:"value",get:function(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t}},{key:"selectable",get:function(){return this._selectable&&this.chipListSelectable},set:function(t){this._selectable=lg(t)}},{key:"disabled",get:function(){return this._chipListDisabled||this._disabled},set:function(t){this._disabled=lg(t)}},{key:"removable",get:function(){return this._removable},set:function(t){this._removable=lg(t)}},{key:"ariaSelected",get:function(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}}]),n}(xj);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Cc),ss($g),ss(LC,8),ss(Kl),ss(ah),ss(Xw,8),gi("tabindex"))},t.\u0275dir=de({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,n){var i;1&t&&(Ku(n,Cj,!0),Ku(n,Sj,!0),Ku(n,wj,!0)),2&t&&(qu(i=Xu())&&(e.avatar=i.first),qu(i=Xu())&&(e.trailingIcon=i.first),qu(i=Xu())&&(e.removeIcon=i.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&_s("click",function(t){return e._handleClick(t)})("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e.focus()})("blur",function(){return e._blur()}),2&t&&(is("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),js("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[qo]}),t}(),Aj=function(){var t=function(){function t(e,n){g(this,t),this._parentChip=e,"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}return v(t,[{key:"_handleClick",value:function(t){var e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(Ej),ss(xl))},t.\u0275dir=de({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&_s("click",function(t){return e._handleClick(t)})},features:[gl([{provide:wj,useExisting:t}])]}),t}(),Dj=new bi("mat-chips-default-options"),Oj=dC(function t(e,n,i,r){g(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}),Ij=0,Tj=function t(e,n){g(this,t),this.source=e,this.value=n},Rj=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r,o,s,l,u){var c;return g(this,n),(c=e.call(this,l,o,s,u))._elementRef=t,c._changeDetectorRef=i,c._dir=r,c.ngControl=u,c.controlType="mat-chip-list",c._lastDestroyedChipIndex=null,c._destroyed=new q,c._uid="mat-chip-list-".concat(Ij++),c._tabIndex=0,c._userTabIndex=null,c._onTouched=function(){},c._onChange=function(){},c._multiple=!1,c._compareWith=function(t,e){return t===e},c._required=!1,c._disabled=!1,c.ariaOrientation="horizontal",c._selectable=!0,c.change=new Ru,c.valueChange=new Ru,c.ngControl&&(c.ngControl.valueAccessor=a(c)),c}return v(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new L_(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(jg(this._destroyed)).subscribe(function(e){return t._keyManager.withHorizontalOrientation(e)}),this._keyManager.tabOut.pipe(jg(this._destroyed)).subscribe(function(){t._allowFocusEscape()}),this.chips.changes.pipe(Ff(null),jg(this._destroyed)).subscribe(function(){t.disabled&&Promise.resolve().then(function(){t._syncChipsState()}),t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips(),t.stateChanges.next()})}},{key:"ngOnInit",value:function(){this._selectionModel=new uy(this.multiple,void 0,!1),this.stateChanges.next()}},{key:"ngDoCheck",value:function(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}},{key:"registerInput",value:function(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"writeValue",value:function(t){this.chips&&this._setSelectionByValue(t,!1)}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this.stateChanges.next()}},{key:"onContainerClick",value:function(t){this._originatesFromChip(t)||this.focus()}},{key:"focus",value:function(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}},{key:"_focusInput",value:function(t){this._chipInput&&this._chipInput.focus(t)}},{key:"_keydown",value:function(t){var e=t.target;8===t.keyCode&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}},{key:"_updateTabIndex",value:function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}},{key:"_updateFocusForDestroyedChips",value:function(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){var t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}},{key:"_isValidIndex",value:function(t){return t>=0&&t1&&void 0!==arguments[1])||arguments[1];if(this._clearSelection(),this.chips.forEach(function(t){return t.deselect()}),Array.isArray(t))t.forEach(function(t){return e._selectValue(t,n)}),this._sortValues();else{var i=this._selectValue(t,n);i&&n&&this._keyManager.setActiveItem(i)}}},{key:"_selectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.chips.find(function(n){return null!=n.value&&e._compareWith(n.value,t)});return i&&(n?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())})}},{key:"_clearSelection",value:function(t){this._selectionModel.clear(),this.chips.forEach(function(e){e!==t&&e.deselect()}),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach(function(e){e.selected&&t._selectionModel.select(e)}),this.stateChanges.next())}},{key:"_propagateChanges",value:function(t){var e;e=Array.isArray(this.selected)?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.change.emit(new Tj(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}},{key:"_blur",value:function(){var t=this;this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(function(){t.focused||t._markAsTouched()}):this._markAsTouched())}},{key:"_markAsTouched",value:function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_allowFocusEscape",value:function(){var t=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){t._tabIndex=t._userTabIndex||0,t._changeDetectorRef.markForCheck()}))}},{key:"_resetChips",value:function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}},{key:"_dropSubscriptions",value:function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}},{key:"_listenToChipsSelection",value:function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach(function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&t._propagateChanges()})}},{key:"_listenToChipsFocus",value:function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe(function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItem(n),t.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(function(){t._blur(),t.stateChanges.next()})}},{key:"_listenToChipsRemoved",value:function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(function(e){var n=e.chip,i=t.chips.toArray().indexOf(e.chip);t._isValidIndex(i)&&n._hasFocus&&(t._lastDestroyedChipIndex=i)})}},{key:"_originatesFromChip",value:function(t){for(var e=t.target;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}},{key:"_hasFocusedChip",value:function(){return this.chips&&this.chips.some(function(t){return t._hasFocus})}},{key:"_syncChipsState",value:function(){var t=this;this.chips&&this.chips.forEach(function(e){e._chipListDisabled=t._disabled,e._chipListMultiple=t.multiple})}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"role",get:function(){return this.empty?null:"listbox"}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=lg(t),this._syncChipsState()}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t}},{key:"id",get:function(){return this._chipInput?this._chipInput.id:this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=lg(t),this.stateChanges.next()}},{key:"placeholder",get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"focused",get:function(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}},{key:"empty",get:function(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}},{key:"shouldLabelFloat",get:function(){return!this.empty||this.focused}},{key:"disabled",get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=lg(t),this._syncChipsState()}},{key:"selectable",get:function(){return this._selectable},set:function(t){var e=this;this._selectable=lg(t),this.chips&&this.chips.forEach(function(t){return t.chipListSelectable=e._selectable})}},{key:"tabIndex",set:function(t){this._userTabIndex=t,this._tabIndex=t}},{key:"chipSelectionChanges",get:function(){return dt.apply(void 0,h(this.chips.map(function(t){return t.selectionChange})))}},{key:"chipFocusChanges",get:function(){return dt.apply(void 0,h(this.chips.map(function(t){return t._onFocus})))}},{key:"chipBlurChanges",get:function(){return dt.apply(void 0,h(this.chips.map(function(t){return t._onBlur})))}},{key:"chipRemoveChanges",get:function(){return dt.apply(void 0,h(this.chips.map(function(t){return t.destroyed})))}}]),n}(Oj);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Kl),ss(ry,8),ss(Xx,8),ss(rE,8),ss(AC),ss(dx,10))},t.\u0275cmp=oe({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,n){var i;1&t&&Ku(n,Ej,!0),2&t&&qu(i=Xu())&&(e.chips=i)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&_s("focus",function(){return e.focus()})("blur",function(){return e._blur()})("keydown",function(t){return e._keydown(t)}),2&t&&(tl("id",e._uid),is("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),js("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[gl([{provide:nO,useExisting:t}]),qo],ngContentSelectors:kj,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(As(),cs(0,"div",0),Ds(1),hs())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t}(),Pj=0,Mj=function(){var t=function(){function t(e,n){g(this,t),this._elementRef=e,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new Ru,this.placeholder="",this.id="mat-chip-list-input-".concat(Pj++),this._disabled=!1,this._inputElement=this._elementRef.nativeElement}return v(t,[{key:"ngOnChanges",value:function(){this._chipList.stateChanges.next()}},{key:"_keydown",value:function(t){t&&9===t.keyCode&&!Ny(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}},{key:"_blur",value:function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}},{key:"_focus",value:function(){this.focused=!0,this._chipList.stateChanges.next()}},{key:"_emitChipEnd",value:function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}},{key:"_onInput",value:function(){this._chipList.stateChanges.next()}},{key:"focus",value:function(t){this._inputElement.focus(t)}},{key:"_isSeparatorKey",value:function(t){return!Ny(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}},{key:"chipList",set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))}},{key:"addOnBlur",get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=lg(t)}},{key:"disabled",get:function(){return this._disabled||this._chipList&&this._chipList.disabled},set:function(t){this._disabled=lg(t)}},{key:"empty",get:function(){return!this._inputElement.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss(Dj))},t.\u0275dir=de({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&_s("keydown",function(t){return e._keydown(t)})("blur",function(){return e._blur()})("focus",function(){return e._focus()})("input",function(){return e._onInput()}),2&t&&(tl("id",e.id),is("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[Ie]}),t}(),Fj={separatorKeyCodes:[Dy]},Lj=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[AC,{provide:Dj,useValue:Fj}],imports:[[sC]]}),t}(),Nj=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)}}),t}(),Vj=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[Yh,sC,Nj,xy]]}),t}(),jj=["*",[["mat-toolbar-row"]]],Bj=["*","mat-toolbar-row"],zj=uC(function t(e){g(this,t),this._elementRef=e}),Hj=function(){var t=function t(){g(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=de({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t}(),Uj=function(){var t=function(t){y(n,t);var e=k(n);function n(t,i,r){var a;return g(this,n),(a=e.call(this,t))._platform=i,a._document=r,a}return v(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return t._checkToolbarMixedModes()}))}},{key:"_checkToolbarMixedModes",value:function(){}}]),n}(zj);return t.\u0275fac=function(e){return new(e||t)(ss(xl),ss($g),ss(ah))},t.\u0275cmp=oe({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,n){var i;1&t&&Ku(n,Hj,!0),2&t&&qu(i=Xu())&&(e._toolbarRows=i)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&js("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[qo],ngContentSelectors:Bj,decls:2,vars:0,template:function(t,e){1&t&&(As(jj),Ds(0),Ds(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t}(),qj=function(){var t=function t(){g(this,t)};return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},imports:[[sC],sC]}),t}(),Wj=function(){function t(){}return t.\u0275mod=ce({type:t}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[{provide:hO,useValue:{floatLabel:"always"}},{provide:mC,useValue:udsData.language}],imports:[Yh,mE,vE,qj,IS,VR,WO,Vj,kS,pO,LT,NO,mV,EC,bT,rI,gI,_R,bj,rA,Lj,EV,UM,_M,oD,BR]}),t}();function Yj(t,e){if(1&t){var n=vs();cs(0,"button",6),_s("click",function(){nn(n);var t=e.$implicit;return xs().changeLang(t)}),$s(1),hs()}if(2&t){var i=e.$implicit;Aa(1),Xs(i.name)}}function Gj(t,e){if(1&t&&(cs(0,"button",12),cs(1,"i",7),$s(2,"face"),hs(),$s(3),hs()),2&t){var n=xs();ls("matMenuTriggerFor",os(7)),Aa(3),Xs(n.api.user.user)}}function Kj(t,e){if(1&t&&(cs(0,"button",18),$s(1),cs(2,"i",7),$s(3,"arrow_drop_down"),hs(),hs()),2&t){var n=xs();ls("matMenuTriggerFor",os(7)),Aa(1),Qs("",n.api.user.user," ")}}var Zj=function(){function t(t){this.api=t,this.isNavbarCollapsed=!0;var e=t.config.language;this.langs=[];for(var n=0,i=t.config.available_languages;n .mat-button[_ngcontent-%COMP%]{padding-left:1.5rem}.icon[_ngcontent-%COMP%]{width:24px;margin:0 1em 0 0}"]}),t}();function tB(t,e){1&t&&ds(0,"div",1),2&t&&ls("innerHTML",xs().messages,Dr)}var eB=function(){function t(t){this.api=t,this.messages="",this.visible=!1}return t.prototype.ngOnInit=function(){var t=this;if(this.api.notices.length>0){var e='
';this.messages='
'+e+this.api.notices.map(function(t){return t.replace(/ /gm," ").replace(/([A-Z]+[A-Z]+)/gm,"$1").replace(/([0-9]+)/gm,"$1")}).join("
"+e)+"
",this.api.gui.alert("",this.messages,0,"80%").subscribe(function(){t.visible=!0})}},t.\u0275fac=function(e){return new(e||t)(ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-notices"]],decls:1,vars:1,consts:[["class","notice",3,"innerHTML",4,"ngIf"],[1,"notice",3,"innerHTML"]],template:function(t,e){1&t&&as(0,tB,1,1,"div",0),2&t&&ls("ngIf",e.visible)},directives:[Th],styles:[".notice[_ngcontent-%COMP%]{display:block} .warn-notice-container{background:#4682b4;border-radius:3px;box-shadow:0 4px 20px 0 rgba(0,0,0,.14),0 7px 10px -5px rgba(70,93,156,.4);box-sizing:border-box;color:#fff;margin:1rem 2rem 0;padding:15px;word-wrap:break-word;display:flex;flex-direction:column} .warn-notice{display:block;width:100%;text-align:center;font-size:1.1em;margin-bottom:.5rem}"]}),t}(),nB=function(){function t(){}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-footer"]],decls:4,vars:0,consts:[["href","https://www.udsenterprise.com"]],template:function(t,e){1&t&&(cs(0,"div"),$s(1,"\xa9 2012-2020 "),cs(2,"a",0),$s(3,"Virtual Cable S.L.U."),hs(),hs())},styles:[""]}),t}(),iB=function(){function t(){this.title="uds admin"}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-root"]],decls:8,vars:0,consts:[[1,"page"],[1,"content"],[1,"footer"]],template:function(t,e){1&t&&(ds(0,"uds-navbar"),ds(1,"uds-sidebar"),cs(2,"div",0),cs(3,"div",1),ds(4,"uds-notices"),ds(5,"router-outlet"),hs(),cs(6,"div",2),ds(7,"uds-footer"),hs(),hs())},directives:[Zj,Jj,eB,Bv,nB],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.footer[_ngcontent-%COMP%]{flex-shrink:0;margin:1em;height:1em;display:flex;flex-direction:row;justify-content:flex-end}.content[_ngcontent-%COMP%]{flex:1 0 auto;width:calc(100% - 56px - 8px);margin:4rem auto auto 56px;padding-left:8px;overflow-x:hidden}"]}),t}(),rB=function(t){function e(){var e=t.call(this)||this;return e.itemsPerPageLabel=django.gettext("Items per page"),e}return dD(e,t),e.\u0275prov=Dt({token:e,factory:e.\u0275fac=function(t){return new(t||e)}}),e}(QO),aB=function(){function t(){this.changed=new Ru}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-text"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:6,consts:[["appearance","standard"],["matInput","","type","text",3,"ngModel","placeholder","required","disabled","maxlength","ngModelChange","change"]],template:function(t,e){1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",1),_s("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("maxlength",e.field.gui.length||128))},directives:[fO,rO,FT,YS,px,tE,sE,hE],styles:[""]}),t}(),oB=function(){function t(){this.changed=new Ru}return t.prototype.ngOnInit=function(){this.field.value||0===this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-numeric"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","number",3,"ngModel","placeholder","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",1),_s("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly))},directives:[fO,rO,FT,gx,YS,px,tE,sE],styles:[""]}),t}(),sB=function(){function t(){this.passwordType="password",this.changed=new Ru}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-password"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[["appearance","standard","floatLabel","always"],["matInput","","autocomplete","off",3,"ngModel","placeholder","required","disabled","type","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],["matSuffix","",1,"material-icons"]],template:function(t,e){1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",1),_s("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),hs(),cs(4,"a",2),_s("click",function(){return e.passwordType="text"===e.passwordType?"password":"text"}),cs(5,"i",3),$s(6,"remove_red_eye"),hs(),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("type",e.passwordType))},directives:[fO,rO,FT,YS,px,tE,sE,OS,lO],styles:[""]}),t}(),lB=function(){function t(){}return t.prototype.ngOnInit=function(){""!==this.field.value&&void 0!==this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-hidden"]],inputs:{field:"field"},decls:0,vars:0,template:function(t,e){},styles:[""]}),t}(),uB=function(){function t(){}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-textbox"]],inputs:{field:"field",value:"value"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","auto"],["matInput","","type","text",3,"ngModel","placeholder","required","readonly","ngModelChange"]],template:function(t,e){1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"textarea",1),_s("ngModelChange",function(t){return e.field.value=t}),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",e.field.gui.required)("readonly",e.field.gui.rdonly))},directives:[fO,rO,FT,YS,px,tE,sE],styles:[""]}),t}();function cB(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",3),_s("changed",function(t){return nn(n),xs().filter=t}),hs()}}function hB(t,e){if(1&t&&(cs(0,"mat-option",4),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.text," ")}}var dB=function(){function t(){this.filter="",this.changed=new Ru}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>0&&(this.field.value=this.field.gui.values[0].id),this.field.value=""+this.field.value},t.prototype.filteredValues=function(){if(""===this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-choice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[[3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"mat-select",0),_s("ngModelChange",function(t){return e.field.value=t})("valueChange",function(){return e.changed.emit(e)}),as(4,cB,1,0,"uds-mat-select-search",1),as(5,hB,2,2,"mat-option",2),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Aa(1),ls("ngIf",e.field.gui.values.length>10),Aa(1),ls("ngForOf",e.filteredValues()))},directives:[fO,rO,FO,px,tE,sE,Th,Oh,zT,$C],styles:[""]}),t}();function fB(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",3),_s("changed",function(t){return nn(n),xs().filter=t}),hs()}}function pB(t,e){if(1&t&&(cs(0,"mat-option",4),$s(1),hs()),2&t){var n=e.$implicit;ls("value",n.id),Aa(1),Qs(" ",n.text," ")}}var mB=function(){function t(){this.filter="",this.changed=new Ru}return t.prototype.ngOnInit=function(){this.field.value=void 0,void 0!==this.field.values?this.field.values.forEach(function(t,e,n){n[e]=""+t.id}):this.field.values=new Array},t.prototype.filteredValues=function(){if(""===this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-multichoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[["multiple","",3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"mat-select",0),_s("ngModelChange",function(t){return e.field.values=t})("valueChange",function(){return e.changed.emit(e)}),as(4,fB,1,0,"uds-mat-select-search",1),as(5,pB,2,2,"mat-option",2),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("ngModel",e.field.values)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Aa(1),ls("ngIf",e.field.gui.values.length>10),Aa(1),ls("ngForOf",e.filteredValues()))},directives:[fO,rO,FO,px,tE,sE,Th,Oh,zT,$C],styles:[""]}),t}();function vB(t,e){if(1&t){var n=vs();cs(0,"div",12),cs(1,"div",13),$s(2),hs(),cs(3,"div",14),$s(4," \xa0"),cs(5,"a",15),_s("click",function(){nn(n);var t=e.index;return xs().removeElement(t)}),cs(6,"i",16),$s(7,"close"),hs(),hs(),hs(),hs()}if(2&t){var i=e.$implicit;Aa(2),Qs(" ",i," ")}}var gB=function(){function t(t,e,n,i){var r=this;this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.values=[],this.input="",this.onSave=new Ru(!0),this.data.values.forEach(function(t){return r.values.push(t)})}return t.launch=function(e,n,i){var r=window.innerWidth<800?"50%":"30%";return e.gui.dialog.open(t,{width:r,data:{title:n,values:i},disableClose:!0}).componentInstance.onSave},t.prototype.addElements=function(){var t=this;this.input.split(",").forEach(function(e){t.values.push(e)}),this.input=""},t.prototype.checkKey=function(t){"Enter"===t.code&&this.addElements()},t.prototype.removeAll=function(){this.values.length=0},t.prototype.removeElement=function(t){this.values.splice(t,1)},t.prototype.save=function(){var t=this;this.data.values.length=0,this.values.forEach(function(e){return t.data.values.push(e)}),this.onSave.emit(this.values),this.dialogRef.close()},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(ss(uD),ss(RD),ss(sS),ss(uS))},t.\u0275cmp=oe({type:t,selectors:[["uds-editlist-editor"]],decls:23,vars:3,consts:[["mat-dialog-title",""],[1,"content"],[1,"list"],["class","elem",4,"ngFor","ngForOf"],[1,"buttons"],["mat-raised-button","","color","warn",3,"click"],[1,"input"],[1,"example-full-width"],["type","text","matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","",1,"material-icons",3,"click"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[1,"elem"],[1,"val"],[1,"remove"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(cs(0,"h4",0),$s(1),hs(),cs(2,"mat-dialog-content"),cs(3,"div",1),cs(4,"div",2),as(5,vB,8,1,"div",3),hs(),cs(6,"div",4),cs(7,"button",5),_s("click",function(){return e.removeAll()}),cs(8,"uds-translate"),$s(9,"Remove all"),hs(),hs(),hs(),cs(10,"div",6),cs(11,"mat-form-field",7),cs(12,"input",8),_s("keyup",function(t){return e.checkKey(t)})("ngModelChange",function(t){return e.input=t}),hs(),cs(13,"button",9),_s("click",function(){return e.addElements()}),cs(14,"uds-translate"),$s(15,"Add"),hs(),hs(),hs(),hs(),hs(),hs(),cs(16,"mat-dialog-actions"),cs(17,"button",10),cs(18,"uds-translate"),$s(19,"Cancel"),hs(),hs(),cs(20,"button",11),_s("click",function(){return e.save()}),cs(21,"uds-translate"),$s(22,"Ok"),hs(),hs(),hs()),2&t&&(Aa(1),Qs(" ",e.data.title,"\n"),Aa(4),ls("ngForOf",e.values),Aa(7),ls("ngModel",e.input))},directives:[gS,yS,Oh,DS,TS,fO,FT,YS,px,tE,lO,_S,vS],styles:[".content[_ngcontent-%COMP%]{width:100%;justify-content:space-between;justify-self:center}.content[_ngcontent-%COMP%], .list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.list[_ngcontent-%COMP%]{margin:1rem;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);padding:.5rem}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:1rem}.input[_ngcontent-%COMP%]{margin:0 1rem}.elem[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.elem[_ngcontent-%COMP%]:hover{background-color:#333;color:#fff;cursor:default}.val[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),yB=function(){function t(t){this.api=t,this.changed=new Ru}return t.prototype.ngOnInit=function(){},t.prototype.launch=function(){var t=this;void 0===this.field.values&&(this.field.values=[]),gB.launch(this.api,this.field.gui.label,this.field.values).subscribe(function(e){t.changed.emit({field:t.field})})},t.prototype.getValue=function(){if(void 0===this.field.values)return"";var t=this.field.values.filter(function(t,e,n){return e<5}).join(", ");return this.field.values.length>5&&(t+=django.gettext(", (%i more items)").replace("%i",""+(this.field.values.length-5))),t},t.\u0275fac=function(e){return new(e||t)(ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-field-editlist"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","text",1,"editlist",3,"readonly","value","placeholder","disabled","click"]],template:function(t,e){1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",1),_s("click",function(){return e.launch()}),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("readonly",!0)("value",e.getValue())("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly))},directives:[fO,rO,FT],styles:[".editlist[_ngcontent-%COMP%]{cursor:pointer}"]}),t}(),_B=function(){function t(){this.changed=new Ru}return t.prototype.ngOnInit=function(){var t;this.field.value=cR(""===(t=this.field.value)||null==t?this.field.gui.defvalue:this.field.value)},t.prototype.getValue=function(){return cR(this.field.value)?django.gettext("Yes"):django.gettext("No")},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-checkbox"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:5,vars:5,consts:[[1,"mat-form-field-infix"],[1,"label"],[3,"ngModel","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(cs(0,"div",0),cs(1,"span",1),$s(2),hs(),cs(3,"mat-slide-toggle",2),_s("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),$s(4),hs(),hs()),2&t&&(Aa(2),Xs(e.field.gui.label),Aa(1),ls("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Aa(1),Qs(" ",e.getValue()," "))},directives:[VM,BM,px,tE,sE],styles:[".label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function bB(t,e){if(1&t&&ds(0,"div",5),2&t){var n=xs().$implicit;ls("innerHTML",xs().asIcon(n),Dr)}}function kB(t,e){if(1&t&&(cs(0,"div"),as(1,bB,1,1,"div",4),hs()),2&t){var n=e.$implicit,i=xs();Aa(1),ls("ngIf",n.id==i.field.value)}}function wB(t,e){if(1&t){var n=vs();cs(0,"uds-mat-select-search",6),_s("changed",function(t){return nn(n),xs().filter=t}),hs()}}function CB(t,e){if(1&t&&(cs(0,"mat-option",7),ds(1,"div",5),hs()),2&t){var n=e.$implicit,i=xs();ls("value",n.id),Aa(1),ls("innerHTML",i.asIcon(n),Dr)}}var SB=function(){function t(t){this.api=t,this.filter="",this.changed=new Ru}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>=0&&(this.field.value=this.field.gui.values[0].id)},t.prototype.asIcon=function(t){return this.api.safeString(this.api.gui.icon(t.img)+t.text)},t.prototype.filteredValues=function(){if(""===this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)(ss(uD))},t.\u0275cmp=oe({type:t,selectors:[["uds-field-imgchoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:8,vars:8,consts:[[3,"placeholder","ngModel","required","disabled","valueChange","ngModelChange"],[4,"ngFor","ngForOf"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(cs(0,"mat-form-field"),cs(1,"mat-label"),$s(2),hs(),cs(3,"mat-select",0),_s("valueChange",function(){return e.changed.emit(e)})("ngModelChange",function(t){return e.field.value=t}),cs(4,"mat-select-trigger"),as(5,kB,2,1,"div",1),hs(),as(6,wB,1,0,"uds-mat-select-search",2),as(7,CB,2,2,"mat-option",3),hs(),hs()),2&t&&(Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("placeholder",e.field.gui.tooltip)("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Aa(2),ls("ngForOf",e.field.gui.values),Aa(1),ls("ngIf",e.field.gui.values.length>10),Aa(1),ls("ngForOf",e.filteredValues()))},directives:[fO,rO,FO,px,tE,sE,PO,Oh,Th,zT,$C],styles:[""]}),t}(),xB=function(){function t(){this.changed=new Ru,this.value=new Date}return Object.defineProperty(t.prototype,"date",{get:function(){return this.value},set:function(t){this.value!==t&&(this.value=t,this.field.value=iR("%Y-%m-%d",this.value))},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,"2000-01-01"===this.field.value?this.field.value=iR("%Y-01-01"):"2000-01-01"===this.field.value&&(this.field.value=iR("%Y-12-31"));var t=this.field.value.split("-");3===t.length&&(this.value=new Date(+t[0],+t[1]-1,+t[2]))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-date"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","placeholder","disabled","ngModelChange"],["matSuffix","",3,"for"],["endDatePicker",""]],template:function(t,e){if(1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"input",1),_s("ngModelChange",function(t){return e.date=t}),hs(),ds(4,"mat-datepicker-toggle",2),ds(5,"mat-datepicker",null,3),hs()),2&t){var n=os(6);Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("matDatepicker",n)("ngModel",e.date)("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly),Aa(1),ls("for",n)}},directives:[fO,rO,FT,dV,YS,px,tE,pV,lO,oV],styles:[""]}),t}();function EB(t,e){if(1&t){var n=vs();cs(0,"mat-chip",5),_s("removed",function(){nn(n);var t=e.$implicit;return xs().remove(t)}),$s(1),cs(2,"i",6),$s(3,"cancel"),hs(),hs()}if(2&t){var i=e.$implicit,r=xs();ls("selectable",!1)("removable",!0!==r.field.gui.rdonly),Aa(1),Qs(" ",i," ")}}var AB,DB,OB,IB=function(){function t(){this.separatorKeysCodes=[Dy,188],this.changed=new Ru}return t.prototype.ngOnInit=function(){void 0===this.field.values&&(this.field.values=new Array,this.field.value=void 0),this.field.values.forEach(function(t,e,n){""===t.trim()&&n.splice(e,1)})},t.prototype.add=function(t){var e=t.input,n=t.value;(n||"").trim()&&this.field.values.push(n.trim()),e&&(e.value="")},t.prototype.remove=function(t){var e=this.field.values.indexOf(t);e>=0&&this.field.values.splice(e,1)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=oe({type:t,selectors:[["uds-field-tags"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:8,consts:[["appearance","standard","floatLabel","always"],[3,"selectable","disabled","change"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],[3,"placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matChipInputTokenEnd"],[3,"selectable","removable","removed"],["matChipRemove","",1,"material-icons"]],template:function(t,e){if(1&t&&(cs(0,"mat-form-field",0),cs(1,"mat-label"),$s(2),hs(),cs(3,"mat-chip-list",1,2),_s("change",function(){return e.changed.emit(e)}),as(5,EB,4,3,"mat-chip",3),cs(6,"input",4),_s("matChipInputTokenEnd",function(t){return e.add(t)}),hs(),hs(),hs()),2&t){var n=os(4);Aa(2),Qs(" ",e.field.gui.label," "),Aa(1),ls("selectable",!1)("disabled",!0===e.field.gui.rdonly),Aa(2),ls("ngForOf",e.field.values),Aa(1),ls("placeholder",e.field.gui.tooltip)("matChipInputFor",n)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",!0)}},directives:[fO,rO,Rj,Oh,Mj,Ej,Aj],styles:[".mat-chip-trailing-icon[_ngcontent-%COMP%]{position:relative;top:-4px;left:-4px}mat-form-field[_ngcontent-%COMP%]{width:99.5%}"]}),t}(),TB=function(){function t(){}return t.\u0275mod=ce({type:t,bootstrap:[iB]}),t.\u0275inj=Ot({factory:function(e){return new(e||t)},providers:[uD,RD,{provide:QO,useClass:rB}],imports:[[Dd,ff,yj,tC,Wj]]}),t}();AB=[Fh,UO,Lh,aB,uB,oB,sB,lB,dB,mB,yB,_B,SB,xB,IB],DB=[],(OB=gA.\u0275cmp).directiveDefs=function(){return AB.map(se)},OB.pipeDefs=function(){return DB.map(le)},function(){if(Fc)throw new Error("Cannot enable prod mode after platform setup.");Mc=!1}(),Ed().bootstrapModule(TB).catch(function(t){return console.log(t)})}},[[0,0]]]); \ No newline at end of file diff --git a/server/src/uds/static/admin/polyfills-es5.js b/server/src/uds/static/admin/polyfills-es5.js index 1b06eb91..db159d81 100644 --- a/server/src/uds/static/admin/polyfills-es5.js +++ b/server/src/uds/static/admin/polyfills-es5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+2oP":function(t,e,n){"use strict";var r=n("I+eb"),o=n("hh1v"),i=n("6LWA"),a=n("I8vh"),u=n("UMSQ"),c=n("/GqU"),s=n("hBjN"),f=n("tiKp"),l=n("Hd5f"),p=n("rkAj"),h=l("slice"),v=p("slice",{ACCESSORS:!0,0:0,1:2}),d=f("species"),g=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!h||!v},{slice:function(t,e){var n,r,f,l=c(this),p=u(l.length),h=a(t,p),v=a(void 0===e?p:e,p);if(i(l)&&("function"!=typeof(n=l.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[d])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(l,h,v);for(r=new(void 0===n?Array:n)(y(v-h,0)),f=0;h",this._properties=e&&e.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,e)}return e.assertZonePatched=function(){if(t.Promise!==I.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(e,"root",{get:function(){for(var t=e.current;t.parent;)t=t.parent;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"current",{get:function(){return R.zone},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return P},enumerable:!0,configurable:!0}),e.__load_patch=function(o,i){if(I.hasOwnProperty(o)){if(a)throw Error("Already loaded patch: "+o)}else if(!t["__Zone_disable_"+o]){var u="Zone:"+o;n(u),I[o]=i(t,e,M),r(u,u)}},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var e=this.getZoneWith(t);if(e)return e._properties[t]},e.prototype.getZoneWith=function(t){for(var e=this;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null},e.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},e.prototype.wrap=function(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}},e.prototype.run=function(t,e,n,r){R={parent:R,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{R=R.parent}},e.prototype.runGuarded=function(t,e,n,r){void 0===e&&(e=null),R={parent:R,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{R=R.parent}},e.prototype.runTask=function(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||b).name+"; Execution: "+this.name+")");if(t.state!==x||t.type!==A&&t.type!==O){var r=t.state!=k;r&&t._transitionTo(k,S),t.runCount++;var o=P;P=t,R={parent:R,zone:this};try{t.type==O&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{t.state!==x&&t.state!==_&&(t.type==A||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,k):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(x,k,x))),R=R.parent,P=o}}},e.prototype.scheduleTask=function(t){if(t.zone&&t.zone!==this)for(var e=this;e;){if(e===t.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+t.zone.name);e=e.parent}t._transitionTo(w,x);var n=[];t._zoneDelegates=n,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(r){throw t._transitionTo(_,w,x),this._zoneDelegate.handleError(this,r),r}return t._zoneDelegates===n&&this._updateTaskCount(t,1),t.state==w&&t._transitionTo(S,w),t},e.prototype.scheduleMicroTask=function(t,e,n,r){return this.scheduleTask(new l(T,t,e,n,r,void 0))},e.prototype.scheduleMacroTask=function(t,e,n,r,o){return this.scheduleTask(new l(O,t,e,n,r,o))},e.prototype.scheduleEventTask=function(t,e,n,r,o){return this.scheduleTask(new l(A,t,e,n,r,o))},e.prototype.cancelTask=function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||b).name+"; Execution: "+this.name+")");t._transitionTo(E,S,k);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(_,E),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(x,E),t.runCount=0,t},e.prototype._updateTaskCount=function(t,e){var n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(var r=0;r0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t})},t}(),l=function(){function e(n,r,o,i,a,u){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=u,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===A&&i&&i.useG?e.invokeTask:function(){return e.invokeTask.call(t,c,this,arguments)}}return e.invokeTask=function(t,e,n){t||(t=this),j++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==j&&m(),j--}},Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.cancelScheduleRequest=function(){this._transitionTo(x,w)},e.prototype._transitionTo=function(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+t+"', expecting state '"+e+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=t,t==x&&(this._zoneDelegates=null)},e.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},e.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},e}(),p=i("setTimeout"),h=i("Promise"),v=i("then"),d=[],g=!1;function y(e){if(0===j&&0===d.length)if(c||t[h]&&(c=t[h].resolve(0)),c){var n=c[v];n||(n=c.then),n.call(c,m)}else t[p](m,0);e&&d.push(e)}function m(){if(!g){for(g=!0;d.length;){var t=d;d=[];for(var e=0;e=0;n--)"function"==typeof t[n]&&(t[n]=p(t[n],e+"_"+n));return t}function x(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}var w="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,S=!("nw"in y)&&void 0!==y.process&&"[object process]"==={}.toString.call(y.process),k=!S&&!w&&!(!d||!g.HTMLElement),E=void 0!==y.process&&"[object process]"==={}.toString.call(y.process)&&!w&&!(!d||!g.HTMLElement),_={},T=function(t){if(t=t||y.event){var e=_[t.type];e||(e=_[t.type]=v("ON_PROPERTY"+t.type));var n,r=this||t.target||y,o=r[e];return k&&r===g&&"error"===t.type?!0===(n=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error))&&t.preventDefault():null==(n=o&&o.apply(this,arguments))||n||t.preventDefault(),n}};function O(n,r,o){var i=t(n,r);if(!i&&o&&t(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=v("on"+r+"patched");if(!n.hasOwnProperty(a)||!n[a]){delete i.writable,delete i.value;var u=i.get,c=i.set,s=r.substr(2),f=_[s];f||(f=_[s]=v("ON_PROPERTY"+s)),i.set=function(t){var e=this;e||n!==y||(e=y),e&&(e[f]&&e.removeEventListener(s,T),c&&c.apply(e,m),"function"==typeof t?(e[f]=t,e.addEventListener(s,T,!1)):e[f]=null)},i.get=function(){var t=this;if(t||n!==y||(t=y),!t)return null;var e=t[f];if(e)return e;if(u){var o=u&&u.call(this);if(o)return i.set.call(this,o),"function"==typeof t.removeAttribute&&t.removeAttribute(r),o}return null},e(n,r,i),n[a]=!0}}}function A(t,e,n){if(e)for(var r=0;r=0&&"function"==typeof r[i.cbIdx]?h(i.name,r[i.cbIdx],i,o):t.apply(e,r)}}))}function j(t,e){t[v("OriginalDelegate")]=e}var N=!1,D=!1;function C(){try{var t=g.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(e){}return!1}function L(){if(N)return D;N=!0;try{var t=g.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(D=!0)}catch(e){}return D}Zone.__load_patch("toString",(function(t){var e=Function.prototype.toString,n=v("OriginalDelegate"),r=v("Promise"),o=v("Error"),i=function(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?e.call(i):Object.prototype.toString.call(i);if(this===Promise){var a=t[r];if(a)return e.call(a)}if(this===Error){var u=t[o];if(u)return e.call(u)}}return e.call(this)};i[n]=e,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":a.call(this)}}));var F=!1;if("undefined"!=typeof window)try{var G=Object.defineProperty({},"passive",{get:function(){F=!0}});window.addEventListener("test",G,G),window.removeEventListener("test",G,G)}catch(Et){F=!1}var z={useG:!0},W={},U={},Z=new RegExp("^"+l+"(\\w+)(true|false)$"),B=v("propagationStopped");function H(t,e){var n=(e?e(t):t)+f,r=(e?e(t):t)+s,o=l+n,i=l+r;W[t]={},W[t].false=o,W[t].true=i}function q(t,e,r){var o=r&&r.add||i,u=r&&r.rm||a,c=r&&r.listeners||"eventListeners",p=r&&r.rmAll||"removeAllListeners",h=v(o),d="."+o+":",g=function(t,e,n){if(!t.isRemoved){var r=t.callback;"object"==typeof r&&r.handleEvent&&(t.callback=function(t){return r.handleEvent(t)},t.originalDelegate=r),t.invoke(t,e,[n]);var o=t.options;o&&"object"==typeof o&&o.once&&e[u].call(e,n.type,t.originalDelegate?t.originalDelegate:t.callback,o)}},y=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[W[e.type].false];if(r)if(1===r.length)g(r[0],n,e);else for(var o=r.slice(),i=0;i1?new i(e,n):new i(e),s=t.ObjectGetOwnPropertyDescriptor(c,"onmessage");return s&&!1===s.configurable?(a=t.ObjectCreate(c),u=c,[r,o,"send","close"].forEach((function(e){a[e]=function(){var n=t.ArraySlice.call(arguments);if(e===r||e===o){var i=n.length>0?n[0]:void 0;if(i){var u=Zone.__symbol__("ON_PROPERTY"+i);c[u]=a[u]}}return c[e].apply(c,n)}}))):a=c,t.patchOnProperties(a,["close","error","message","open"],u),a};var a=e.WebSocket;for(var u in i)a[u]=i[u]}(t,e),Zone[t.symbol("patchEvents")]=!0}}Zone.__load_patch("util",(function(n,u,c){c.patchOnProperties=A,c.patchMethod=R,c.bindArguments=b,c.patchMacroTask=P;var h=u.__symbol__("BLACK_LISTED_EVENTS"),v=u.__symbol__("UNPATCHED_EVENTS");n[v]&&(n[h]=n[v]),n[h]&&(u[h]=u[v]=n[h]),c.patchEventPrototype=Y,c.patchEventTarget=q,c.isIEOrEdge=L,c.ObjectDefineProperty=e,c.ObjectGetOwnPropertyDescriptor=t,c.ObjectCreate=r,c.ArraySlice=o,c.patchClass=M,c.wrapWithCurrentZone=p,c.filterProperties=lt,c.attachOriginToPatched=j,c._redefineProperty=Object.defineProperty,c.patchCallbacks=V,c.getGlobalObjects=function(){return{globalSources:U,zoneSymbolEventNames:W,eventNames:ft,isBrowser:k,isMix:E,isNode:S,TRUE_STR:s,FALSE_STR:f,ZONE_SYMBOL_PREFIX:l,ADD_EVENT_LISTENER_STR:i,REMOVE_EVENT_LISTENER_STR:a}}})),function(t){t[("legacyPatch",(t.__Zone_symbol_prefix||"__zone_symbol__")+"legacyPatch")]=function(){var e=t.Zone;e.__load_patch("defineProperty",(function(t,e,n){n._redefineProperty=dt,vt()})),e.__load_patch("registerElement",(function(t,e,n){!function(t,e){var n=e.getGlobalObjects();(n.isBrowser||n.isMix)&&"registerElement"in t.document&&e.patchCallbacks(e,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(t,n)})),e.__load_patch("EventTargetLegacy",(function(t,e,n){bt(t,n),xt(n,t)}))}}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});var wt=v("zoneTask");function St(t,e,n,r){var o=null,i=null;n+=r;var a={};function u(e){var n=e.data;return n.args[0]=function(){try{e.invoke.apply(this,arguments)}finally{e.data&&e.data.isPeriodic||("number"==typeof n.handleId?delete a[n.handleId]:n.handleId&&(n.handleId[wt]=null))}},n.handleId=o.apply(t,n.args),e}function c(t){return i(t.data.handleId)}o=R(t,e+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var s=h(e,i[0],{isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},u,c);if(!s)return s;var f=s.data.handleId;return"number"==typeof f?a[f]=s:f&&(f[wt]=s),f&&f.ref&&f.unref&&"function"==typeof f.ref&&"function"==typeof f.unref&&(s.ref=f.ref.bind(f),s.unref=f.unref.bind(f)),"number"==typeof f||f?f:s}return n.apply(t,i)}})),i=R(t,n,(function(e){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[wt])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[wt]=null),o.zone.cancelTask(o)):e.apply(t,r)}}))}function kt(t,e){if(!Zone[e.symbol("patchEventTarget")]){for(var n=e.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,i=n.TRUE_STR,a=n.FALSE_STR,u=n.ZONE_SYMBOL_PREFIX,c=0;c0){var o=t.invoke;t.invoke=function(){for(var n=a[e.__symbol__("loadfalse")],i=0;i")})),f="$0"==="a".replace(/./,"$0"),l=i("replace"),p=!!/./[l]&&""===/./[l]("a","$0"),h=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,l){var v=i(t),d=!o((function(){var e={};return e[v]=function(){return 7},7!=""[t](e)})),g=d&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[v]=/./[v]),n.exec=function(){return e=!0,null},n[v](""),!e}));if(!d||!g||"replace"===t&&(!s||!f||p)||"split"===t&&!h){var y=/./[v],m=n(v,""[t],(function(t,e,n,r,o){return e.exec===a?d&&!o?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[1];r(String.prototype,t,m[0]),r(RegExp.prototype,v,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}l&&u(RegExp.prototype[v],"sham",!0)}},"1E5z":function(t,e,n){var r=n("m/L8").f,o=n("UTVS"),i=n("tiKp")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"1Y/n":function(t,e,n){var r=n("HAuM"),o=n("ewvW"),i=n("RK3t"),a=n("UMSQ"),u=function(t){return function(e,n,u,c){r(n);var s=o(e),f=i(s),l=a(s.length),p=t?l-1:0,h=t?-1:1;if(u<2)for(;;){if(p in f){c=f[p],p+=h;break}if(p+=h,t?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:l>p;p+=h)p in f&&(c=n(c,f[p],p,s));return c}};t.exports={left:u(!1),right:u(!0)}},"1p6F":function(t,e,n){var r=n("6XUM"),o=n("ezU2"),i=n("m41k")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},"1t3B":function(t,e,n){var r=n("I+eb"),o=n("0GbY"),i=n("glrk");r({target:"Reflect",stat:!0,sham:!n("uy83")},{preventExtensions:function(t){i(t);try{var e=o("Object","preventExtensions");return e&&e(t),!0}catch(n){return!1}}})},"25bX":function(t,e,n){var r=n("I+eb"),o=n("glrk"),i=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(t){return o(t),!i||i(t)}})},"27RR":function(t,e,n){var r=n("I+eb"),o=n("g6v/"),i=n("Vu81"),a=n("/GqU"),u=n("Bs8V"),c=n("hBjN");r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(n=o(r,e=s[l++]))&&c(f,e,n);return f}})},"2A+d":function(t,e,n){var r=n("I+eb"),o=n("/GqU"),i=n("UMSQ");r({target:"String",stat:!0},{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u1?arguments[1]:void 0)}})},"2MGJ":function(t,e,n){var r=n("ocAm"),o=n("aJMj"),i=n("OG5q"),a=n("Fqhe"),u=n("6urC"),c=n("XH/I"),s=c.get,f=c.enforce,l=String(String).split("String");(t.exports=function(t,e,n,u){var c=!!u&&!!u.unsafe,s=!!u&&!!u.enumerable,p=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),f(n).source=l.join("string"==typeof e?e:"")),t!==r?(c?!p&&t[e]&&(s=!0):delete t[e],s?t[e]=n:o(t,e,n)):s?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||u(this)}))},"2RDa":function(t,e,n){var r,o=n("F26l"),i=n("5y2d"),a=n("aAjO"),u=n("yQMY"),c=n("149L"),s=n("qx7X"),f=n("/AsP")("IE_PROTO"),l=function(){},p=function(t){return" + diff --git a/server/src/uds/templates/uds/modern/index.html b/server/src/uds/templates/uds/modern/index.html index fe742b49..e20875a9 100644 --- a/server/src/uds/templates/uds/modern/index.html +++ b/server/src/uds/templates/uds/modern/index.html @@ -66,8 +66,8 @@ - - + + + diff --git a/server/src/uds/transports/NX/nxpassword.py b/server/src/uds/transports/NX/nxpassword.py index 9a524176..6699f3fa 100644 --- a/server/src/uds/transports/NX/nxpassword.py +++ b/server/src/uds/transports/NX/nxpassword.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2012-2019 Virtual Cable S.L. +# Copyright (c) 2012-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, diff --git a/server/src/uds/transports/NX/nxtunneltransport.py b/server/src/uds/transports/NX/nxtunneltransport.py index 54134653..09d0cd64 100644 --- a/server/src/uds/transports/NX/nxtunneltransport.py +++ b/server/src/uds/transports/NX/nxtunneltransport.py @@ -84,34 +84,23 @@ class TSNXTransport(BaseNXTransport): label=_('Tunnel wait time'), defvalue='30', minValue=5, - maxValue=65536, + maxValue=3600 * 24, order=2, tooltip=_('Maximum time to wait before closing the tunnel listener'), required=True, tab=gui.TUNNEL_TAB, ) - ticketValidity = gui.NumericField( - length=3, - label=_('Tunnel ticket validity time (seconds)'), - defvalue='7200', - minValue=60, # One minute as min - maxValue=7*60*60*24, # one week as max - order=3, - tooltip=_('Maximum validity time for user ticket to allow reconnection'), - required=True, - tab=gui.TUNNEL_TAB, - ) - verifyCertificate = gui.CheckBoxField( label=_('Force SSL certificate verification'), order=23, - tooltip=_('If enabled, the certificate of tunnel server will be verified (recommended).'), + tooltip=_( + 'If enabled, the certificate of tunnel server will be verified (recommended).' + ), defvalue=gui.TRUE, - tab=gui.TUNNEL_TAB + tab=gui.TUNNEL_TAB, ) - useEmptyCreds = gui.CheckBoxField( label=_('Empty creds'), order=3, @@ -217,7 +206,6 @@ class TSNXTransport(BaseNXTransport): _cacheMem: str = '' _screenSize: str = '' _tunnelWait: int = 30 - _ticketValidity: int = 60 _verifyCertificate: bool = False def initialize(self, values: 'Module.ValuesType'): @@ -228,7 +216,6 @@ class TSNXTransport(BaseNXTransport): ) self._tunnelServer = values['tunnelServer'] self._tunnelWait = int(values['tunnelWait']) - self._ticketValidity = int(values['ticketValidity']) self._verifyCertificate = gui.strToBool(values['verifyCertificate']) self._tunnelCheckServer = '' self._useEmptyCreds = gui.strToBool(values['useEmptyCreds']) @@ -240,7 +227,6 @@ class TSNXTransport(BaseNXTransport): self._cacheDisk = values['cacheDisk'] self._cacheMem = values['cacheMem'] self._screenSize = values['screenSize'] - def marshal(self) -> bytes: """ @@ -262,7 +248,6 @@ class TSNXTransport(BaseNXTransport): self._tunnelCheckServer, self._screenSize, str(self._tunnelWait), - str(self._ticketValidity), gui.boolToStr(self._verifyCertificate), ], ) @@ -288,10 +273,9 @@ class TSNXTransport(BaseNXTransport): values[11] if values[0] == 'v2' else CommonPrefs.SZ_FULLSCREEN ) if values[0] == 'v3': - self._tunnelWait, self._ticketValidity, self._verifyCertificate = ( + self._tunnelWait, self._verifyCertificate = ( int(values[12]), - int(values[13]), - gui.strToBool(values[14]) + gui.strToBool(values[13]), ) def valuesDict(self) -> gui.ValuesDictType: @@ -306,7 +290,6 @@ class TSNXTransport(BaseNXTransport): 'cacheMem': self._cacheMem, 'tunnelServer': self._tunnelServer, 'tunnelWait': str(self._tunnelWait), - 'ticketValidity': str(self._ticketValidity), 'verifyCertificate': gui.boolToStr(self._verifyCertificate), } @@ -334,8 +317,8 @@ class TSNXTransport(BaseNXTransport): ticket = TicketStore.create_for_tunnel( userService=userService, - port=3389, - validity=self.ticketValidity.num() + port=int(self._listenPort), + validity=self._tunnelWait + 60, # Ticket overtime ) tunHost, tunPort = self.tunnelServer.value.split(':') @@ -367,10 +350,9 @@ class TSNXTransport(BaseNXTransport): 'ip': ip, 'tunHost': tunHost, 'tunPort': tunPort, - 'tunWait': self.tunnelWait.num(), - 'tunChk': self.verifyCertificate.isTrue(), + 'tunWait': self._tunnelWait, + 'tunChk': self._verifyCertificate, 'ticket': ticket, - 'port': self._listenPort, 'as_file_for_format': r.as_file_for_format, } diff --git a/server/src/uds/transports/NX/scripts/linux/tunnel.py b/server/src/uds/transports/NX/scripts/linux/tunnel.py index 061bf3f8..787f3314 100644 --- a/server/src/uds/transports/NX/scripts/linux/tunnel.py +++ b/server/src/uds/transports/NX/scripts/linux/tunnel.py @@ -18,13 +18,13 @@ except Exception: ''') # Open tunnel -fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore # Check that tunnel works.. if fs.check() is False: raise Exception('

Could not connect to tunnel server.

Please, check your network settings.

') -theFile = sp['as_file_for_format'].format( +theFile = sp['as_file_for_format'].format( # type: ignore address='127.0.0.1', port=fs.server_address[1] ) diff --git a/server/src/uds/transports/NX/scripts/linux/tunnel.py.signature b/server/src/uds/transports/NX/scripts/linux/tunnel.py.signature index 124035d6..8750295f 100644 --- a/server/src/uds/transports/NX/scripts/linux/tunnel.py.signature +++ b/server/src/uds/transports/NX/scripts/linux/tunnel.py.signature @@ -1 +1 @@ -Jb61ZM6xlsxMLnk4a2X2INN3IyGp+ztSgjXV+AsbH2hKDtKANM9nqHXgI/4LfxAogM3Y17k2tHOnbf049mWNaDRNCqOY9tG/xL3am2HkOTb3L9YOpK60gk/0hF9y1qLN9Y/CM+TP6B3DvVW+fsSnVfmDoK/NyqR5nb+6iRs37nmr+ILcum8IYgT4BeoKUqcMjHBQFF1MGfD5arKJW1t9pFQZw9+BZUzyw1c++2mnajIe294gjUEqgRxKPX6ejYX9J/AfAvM8K+NruT23VcxbBkp6diRUHFzM0buqHxUVzCqyfnU+umS7FKLOLw8M1B0goYfK8B0p8lu8ICRA24yOPpnnbBBWBUjZm3OZUGt7fqanaPbsVvehibxOsPB2z/vktp6mVBx8tkjU8Uyli1RxMSdT8xjsCT3mkK521AasqfE5Vn/Plwe9ciBo5AfqVxkl9OFVgUCCDTug9oNx50u+eSj/XUCxlTu39OBWUV6HAUhWDIgRWoYpLCC5Xtb+ILkgYPtTU8CiQSS2EFk8uUqxCSCbJKwfQRHhcYItSZk6fP0TH1nfirR8DB/AW5ltbO8QPe4PIllAyQl827fy6vQTytSw1wWBkEf7OCBEfv1w3AwFOC35fKQoRk+ygbD5fLhFbQsDpaMVtabNL/zjlw51CtrQfQ1ru69bvKeHLbp265M= \ No newline at end of file +EFxcQ0pD5IdbGBhlBdULIIPckwR0BlC2XQpWmxUngQlK/qe2s9CleQBjTcGyp6SSzy7uc6osweHA1b9N4o4opodLI0mD5X3H5+cP/92HsKcBT1QPRh1S8i+hGyGa5WO/fxdpeIM0rco9OcFDx9iloRbxCN0op3GJe3X0DwtS89r0MwaMs3rz7A913geshVGmJ/5oZM+EXf/kD6oGTRVkRagqeNkpB+Aup0LxhVET5EO6tY5TBDd2TvgCSBOqOkcA5vtavcxxb5As20lgl5/UsYDpCXuz7gGyq4EKn0nDSYHYiFeqsyJgaXWqdWW9rVQpGl8qjbm/Ndc2bC3s/3Q8bDgEjev0EQjKQ6oMUtdOJNJ89fP9TEd8Y0UKocBZRsGMxvQdcFN4Q5jMzplPcP9F3VuaCvA9W+uLZ/b1EvFPFdLrDBLhUsgUiWNoEQCqpG7FG+qz3dy0oVkmAZs9ewI6/oOxE+KaTs7uJv1mIbWpJEWhvLwzMg6j6jPSsV4bu9kbtjr3dBFwTNI5EsaW9vP9NeEg2hqD6vBOrlw4PB9SWIPBdFX0tPsT4tAgJxaUx13OepO7DWTItzA6EjT/be3BIUSJPoJuCJA7nxGj/ZOFqN4grmAlMKa8JXq8L/6++Jtqf+iSNgZjD+5cxC5j9M4yRlsBTFQaQhf+OnawjxAd1a4= \ No newline at end of file diff --git a/server/src/uds/transports/NX/scripts/macosx/direct.py b/server/src/uds/transports/NX/scripts/macosx/direct.py index aa512143..2a22b0fd 100644 --- a/server/src/uds/transports/NX/scripts/macosx/direct.py +++ b/server/src/uds/transports/NX/scripts/macosx/direct.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import subprocess import os -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore cmd = '/Applications/OpenNX/OpenNX.app/Contents/MacOS/OpenNXapp' @@ -16,6 +16,6 @@ if os.path.isfile(cmd) is False: ''') -filename = tools.saveTempFile(sp['as_file']) # @UndefinedVariable -tools.addTaskToWait(subprocess.Popen([cmd, '--session={{}}'.format(filename), '--autologin', '--killerrors'])) +filename = tools.saveTempFile(sp['as_file']) # type: ignore +tools.addTaskToWait(subprocess.Popen([cmd, '--session={{}}'.format(filename), '--autologin', '--killerrors'])) # type: ignore tools.addFileToUnlink(filename) diff --git a/server/src/uds/transports/NX/scripts/macosx/direct.py.signature b/server/src/uds/transports/NX/scripts/macosx/direct.py.signature index c4cd32c7..1dfae0f1 100644 --- a/server/src/uds/transports/NX/scripts/macosx/direct.py.signature +++ b/server/src/uds/transports/NX/scripts/macosx/direct.py.signature @@ -1 +1 @@ -A4XL73+4BMMTm+pLNL5Ae4xqoZVasAxPc10CveDJFoSLNyierVIQRlNfbEP4ZuUSnpR/q01Y1KoRuYao5wQaNdW/4LKlnN4OFM01K04782Ug05JiSO1BZ8KBM5w8XmWyVqbmGveQiGVGWwyXwg0YqBmlSbMeFLDYZsO5ILq5F+FsY223C26P9XUiwzTSh58qb1OX6L6Yj5fhFVP3yLldy236SxBZAA7HmvoMvIGk8bKw4r+HRWtgfpUU5rxmFszNUikfcSSR45ci7qZYU/S6WuQ0RZD/5XV+jwTIQdZpn8qcFtXf5GSqSjdVV1vqUaRg04/cRpaFVZ8s+31Os00sZ7AWmBLFZAmRD8BRqks4Nz7RbjM2teH1+S67pvOPDzzYIiLpWeq0qQRKmJ6/DLprqBPfZ4uthqus2f6i6w2t+/CzI25K4Vrjaz0z3wp9k9O5bP7GFpFmfmwt0WW6jLJO43b4XVJ6N+yj02rvAGS2t1i/1S4IfK58/B6XMSchqUgPx1UiW/WHT7dujqiDDTMhLAncW7mwHs2ABwBlPfRxWkyHY8KZUpD9PWDypUf5JvOsNJgyNP/mXIDvCd2htscyfVkpZj5mAdeg9m3sMWNJivCHX0qa5KVcxyI2bn+MfBU9/khRTnOyhgikB8pHVnWqPIiSHL6BLdHiBFlJ7e8OYHw= \ No newline at end of file +hgPD0KnclF5OpaW4tIs+6pWX5tLeactCv1MGI1bk942nHoS4c/Nm87qd5dkHek51UMm1s8o2eB7xdrkJ6CVi/eOf2jnEs63luF+etmdwccHQU9BcQZjev1aId4q0q7HiQCXjXaS2vorIevH9uvf1NWl6AyPABynYhC7zvWb9nz/GTNBXO7TAqfVarGJLRXwY2KHpBXqUKEPB0H46+h3S9AWD2pHxfZnVBKdjoGgrD5/pt905aI2lrl1yCE14LFENkpssH/dBxYnaEMMYiWTuAe3lAP8MQEFlWmHBT63G7xMhDR3wc2sqC2eh8RQieEj1EoqCPLJFwMoxA1SZfS+JLhppskdJi06o+pqiJ4bzO0Is47plGn+KBodBAT+5/dOgOK/lKv+7Q8j3MS59TQUFty4TkybS6Ujk40SjlOlCwofVb6awKMSUSny853K20yKClt0gGhUjykstex3/eaXmU7hWLBBbDsFmY5W7Xhvxi1vPmrJ3uJ2M+R9WIeCM4xygLQPcMkZbY2k1bonv3NhK+AlapmY36y3IBbziL1Xv4agjRAykls3y+qrxMjE4Lx4ZUAI0OdX7COqdz7Ix7baYpMHrLgROjtkp/EJqVIfhvRSvJqMWLsZxbqCjoswNSI4zlyWFR980y4ITHhBsbP95X0yJnoRsgcN+wARNolxVL7o= \ No newline at end of file diff --git a/server/src/uds/transports/NX/scripts/macosx/tunnel.py b/server/src/uds/transports/NX/scripts/macosx/tunnel.py index b9567d66..72b32b18 100644 --- a/server/src/uds/transports/NX/scripts/macosx/tunnel.py +++ b/server/src/uds/transports/NX/scripts/macosx/tunnel.py @@ -17,13 +17,13 @@ if os.path.isfile(cmd) is False: ''') # Open tunnel -fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore # Check that tunnel works.. if fs.check() is False: raise Exception('

Could not connect to tunnel server.

Please, check your network settings.

') -theFile = sp['as_file_for_format'].format( +theFile = sp['as_file_for_format'].format( # type: ignore address='127.0.0.1', port=fs.server_address[1] ) diff --git a/server/src/uds/transports/NX/scripts/macosx/tunnel.py.signature b/server/src/uds/transports/NX/scripts/macosx/tunnel.py.signature index ad30181d..e6a5df95 100644 --- a/server/src/uds/transports/NX/scripts/macosx/tunnel.py.signature +++ b/server/src/uds/transports/NX/scripts/macosx/tunnel.py.signature @@ -1 +1 @@ -sNIIRiS5PiCdCSHQ0Uv5iS4gdYBcFEfI8KPfvD1V8ZTry/Hw8NqB0qzHW0D3YgKGPZMBBnHM+mYiZNXwPuSObRn12Iw/dSh1kmSgh/1S/UvummsdD1vq8T8WdupvI8z1AyQemNPzjA0vUPhDhGakMy5/dAuy7hlND+K9swSTBI3kz5Dcx+PfsnNLxcCtCtmBT/3RDEESJlEVQAbH0sjt9sAQpHap8lDDV2vO/8kahKM4Gpre+uloFbjiYR53qEiQkECJipq3WWQbMq/5IIyBqcruXrHen0jybpuHoWjI++deS6d1NI6A+u9+oUp0AacQOnRzMdKUiykyA14Zjb+Hws0s/fVjPpWDqQMD52Ii1O6goCtsRszJVIdU7UGCTHYctBd+iQ3Qxk5cLXs/vBZ22WIwF6/YN62Gt9aIxonTojUevL2cvCQ6YrMR+X6fAIuvD1Jso86X4Fr2jGPPbzSnfLSn4dLtf8T6XPOn4mPaivosn9eUtMptJiUl3++vYGcdnOhF8Amk7hGUI58ck+gg+vo/MfUFCHTW3XxJtsD4Hr8uelgQNPvFs6whZuUSGVCjyvo107ikqafkiCu4QgWqMfmWzs8DVYAZ3KgPKaqp62R5gIIDdjwH0XZ4DET2+h8gFs+K+T1xcbbHvo8q8i2PRCSbdX9JsupOLuqE78NXAfA= \ No newline at end of file +lsChjBOL2LNJeEjnFSXjK3y9F8uPfz/j6ZlHg511XyQxakyrxPKhEnrAJ9DT7X7Py99D1SQqrMmn+A9B/lH658LmXyCLaQMKFVNLZxc1WH/0Ytl4int6ZJA3uTrt/bHYMNh91OxMsS6WPWjN8g2aCkGhgZIKHehP4oKlQmxOnI4EXSoWtHwl/aN2JaWV6pltiVDKMiyVxMHCnRm0L1KSVaOsC5OxW76DvsUWcYELXiue+bMlBx96lQN0/g4xd9UJKJFqRmA+tPnUhKYdm/gt1804xsdGQ2v2IdPiJjhBvN4riFUffkls0T67HFOEedNdoV7ox/lz8RmamlAGbs36Qz84U/hYdeEwpOZfzHvVKuq8M1EZQciboqdlaRDPDbF+o7mZHQsOCSzRTp6qBqb46pzcELuXBH4/jod/tAX9iyvz7BBxrQsTmhivHIwu3VOdjClN3bw2GrNSyhKxSYsb7wq/YiABfHWHJkHzMZnwxGOpYuYSHNNew2liH3zE3gZPX6rGnyFn7rv80rIGvbLmQV9hJmAluyzU6hQivHYqZnpnfQN1cKT5SKbDiZVCnAC9c8uPGD7VsHJZpaGR3Hi4bB/J2qyVG+zbfVVsLyRh/wDfGfucCBxt9ecY/xcZ6aebzabrEnyluhEmrehu6Ovp1lsWJQPb3mUzSHC0muN4M3s= \ No newline at end of file diff --git a/server/src/uds/transports/NX/scripts/windows/direct.py b/server/src/uds/transports/NX/scripts/windows/direct.py index 8eb6bf16..9b52dbaf 100644 --- a/server/src/uds/transports/NX/scripts/windows/direct.py +++ b/server/src/uds/transports/NX/scripts/windows/direct.py @@ -3,21 +3,24 @@ from __future__ import unicode_literals # pylint: disable=import-error, no-name-in-module -import _winreg +try: + import winreg as wreg +except ImportError: # Python 2.7 fallback + import _winreg as wreg # type: ignore import subprocess -from uds import tools # @UnresolvedImport - +from uds import tools # type: ignore try: - k = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software\\Classes\\NXClient.session\\shell\\open\\command') # @UndefinedVariable - cmd = _winreg.QueryValue(k, '') # @UndefinedVariable + k = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\\Classes\\NXClient.session\\shell\\open\\command') # @UndefinedVariable + cmd = wreg.QueryValue(k, '') # type: ignore + wreg.CloseKey(k) except Exception: raise Exception('''

You need to have installed NX Client version 3.5 in order to connect to this UDS service.

Please, install appropriate package for your system.

''') -filename = tools.saveTempFile(sp['as_file']) # @UndefinedVariable +filename = tools.saveTempFile(sp['as_file']) # type: ignore cmd = cmd.replace('%1', filename) tools.addTaskToWait(subprocess.Popen(cmd)) tools.addFileToUnlink(filename) diff --git a/server/src/uds/transports/NX/scripts/windows/direct.py.signature b/server/src/uds/transports/NX/scripts/windows/direct.py.signature index e96085be..a6cc67e9 100644 --- a/server/src/uds/transports/NX/scripts/windows/direct.py.signature +++ b/server/src/uds/transports/NX/scripts/windows/direct.py.signature @@ -1 +1 @@ -jyAVq4zJ1QR0otsMsh2vIarVH2Jy2UPGHi3JfLZPlwR1NFlM67f6uDgZO4wJNeQzOkPOGgpoklkB5ROxHjdUQUdm23XANXDpIZA1ywhrjLQ6lh4HSkbZ0i3QZizDAH5x5XxwHSOIrFeiT75qxXY67lFEXE4DhfxBMJMLm3xQyyjBxTyB1K/3UG3Ryhf0ApFqpaERoLEPJGjLeVj6bIeRre7TlxJMgO+VosjKkbUKRDTZD85X/iwvyRzGHy3OpS8zTOWt/Wstcph9+DrlPkbx8Z6yMpuwNW/mMEWblMcYWdyApBpnLEt8nLKlSQb3rGu2j7QaxzWwtPwuxWcd1IQzxCt0R/pbMlyl75QfrumKKoZ+MnPL4kK5kI4RHoBqzNKpirXHm36URfW5+9oKTuIgbwK6YvOPXtLAsYTtaWEmO21Tb6g+4XCzC1eoOlXWaA6NQe3rr0JXQpwAWjzg+EkaW0G45amef7ta4wGQC8zCZ1cSsA8uFGe6Q11fS94Q+Rv6rl5KubCf6KxvmsYDqkQkdzdvN8tDVkVX9mPNMaquLWaDWmKVp3Hp6WxdUELtAt50KfmGbaD7eMyLgHtBrhCUr1aRG3DxxysDOPhZYiO7Z73BR7OAeVM/bH3rpZLRsZOwi6s6zifqmmV5K2I5aozwybAQgVoR7+ZjZn5irPPULBc= \ No newline at end of file +isXacHwak7jQEx9QFKLUaVUTG75t5ogtWFiV7m7eMDttzBTkkS1/0hVLX1avLdaMOBCY60JTfTrPcHcd8XESfSzR3w92i1BzfccHmpV3g67lbeESZqpjsJTWC3F9kCpZHsj6DHXQICQjPPeW++tchJj8bAoETc6MyH5IHSJ/KOmbgLOBM+2x9crnX1ZWHrwF2xQyMaLn5rgntklvSX2KmOS6z0WC0C5DLFpVzZvSsDwMyfhhxd4fGNWCxUW4v5f5S1GUCM1AfzXWZEPYAWbRFgOzG2MKB2dhHasxVt25VtjeKgrD+Q5A28ihQBUkh5vZRmOtAWjtneF6K6bOM59ZL0vzjGIL1/y/6oysjyeOAG4YvagekMRAZT0folf7d4prUb1tN+8jvabZszGCxjvb0kYjfiT6zN53lxDSExLuvjBEwHkWM3CPCTkPLJ7UWiRT6Fyd8c3vJw860WhnohPYg+4q2udjf/ZgdDiyVPEyOB5AKpDnHB3HfsQr7upw+WqWUH56ylF2myWyP0uSmOrLJnUyFX1FFVx2R+/Rc0AjPmM+VE9UwPUkSSpFaRdKPP2nJxDYrReZwk/kfFmRvIqLAUz+rwSIH2JJqEB6NT//tMdxRu4lAKrpX29nqDSWCiMvew3D21OQYafzGGJ9GTn2n+Mwki3cbKpxLXxLxlCh0S8= \ No newline at end of file diff --git a/server/src/uds/transports/NX/scripts/windows/tunnel.py b/server/src/uds/transports/NX/scripts/windows/tunnel.py index 66587c94..158ae366 100644 --- a/server/src/uds/transports/NX/scripts/windows/tunnel.py +++ b/server/src/uds/transports/NX/scripts/windows/tunnel.py @@ -13,23 +13,23 @@ from uds.tunnel import forward # type: ignore from uds import tools # type: ignore - try: - k = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\\Classes\\NXClient.session\\shell\\open\\command') # @UndefinedVariable + k = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\\Classes\\NXClient.session\\shell\\open\\command') cmd = wreg.QueryValue(k, '') + wreg.CloseKey(k) except Exception: raise Exception('''

You need to have installed NX Client version 3.5 in order to connect to this UDS service.

Please, install appropriate package for your system.

''') # Open tunnel -fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore # Check that tunnel works.. if fs.check() is False: raise Exception('

Could not connect to tunnel server.

Please, check your network settings.

') -theFile = sp['as_file_for_format'].format( +theFile = sp['as_file_for_format'].format( # type: ignore address='127.0.0.1', port=fs.server_address[1] ) diff --git a/server/src/uds/transports/NX/scripts/windows/tunnel.py.signature b/server/src/uds/transports/NX/scripts/windows/tunnel.py.signature index 045d2b23..18045c5f 100644 --- a/server/src/uds/transports/NX/scripts/windows/tunnel.py.signature +++ b/server/src/uds/transports/NX/scripts/windows/tunnel.py.signature @@ -1 +1 @@ -jR6BkXPX1vmZqU6AMnLXJNwHhdw+v6pt4DdqpF0bWorB7tFbxAJ7U47A2NjDPSHMVpe2qtUIpL2eBAgpQCcfEbQNyzqpJmtS2w2y2lCHfT0sb/TMjsMJLfLpwJiH4dkRfF/bP7rAw55DHj4Q0Mc/lzwxGZuTOd+sjp89WxBximdD9y2/BQF9IRlsVGQOU2pjB1Ko1Wg719gXfqBM/ezg1gC2M8vAqxRZq6jyaPIRs+Hl1GALR2gi0MiwYckopJMWGQHmgGIUt8S9bAR8M5wkmNK3Fbc7qoa+tGuthfkoVYYqhSC2Wdd9tmhcVyGSwDv77OnN4QK9MAFSJxQV2GejaOn1Dp96prtmkNn1350d8y5kjTNFV0h4Y5sGW0XtDROrg/fdbuxHf7cZhn+hThotZjNfWp7PXbc5mlwwc+gYTGIwNd7qV20WzdBodvc6X79pJP4Oy2fZbMGYPdHYjiC8yPV+SliqrhUBCYLZI0z667rGupnyu4qh0ciRrz33AKHuQZZGJfux4WFOfhB9mMUyL621ospkORGKaWwr/v7dePotGUSkUbDHBrliN/qOlgHXls9C6NDGvXr1z2nlo2VCgjQMAxkqh8Lc/DDOOBSbcZ4S8RczxBwevYdKVA+ZZ1FP+PuhA/x50JtctbjiltaBFeK8buuv25PMsFVsNuNp05k= \ No newline at end of file +o+152nwWH5xKg7nrK4ffYSeGjzitZS5LxvkC9Z0aa86J2D9gEIsUqDAQjh2ljuO+g4ik2s72T7Yb5HiZizhHfRfjwe22yjIj+NtK1Xoeh/VW3773bq5VCXAjfMbVU6GuGnNMndQOn4qrS/l12YLDhxXFKUkpwNU1TjRGo33ns1DFPNTf0dT7W/WpQkf/75Jlt6bMnGxFWDWYhc1wLySmwlVPj7GOKQTD9pS9MaB7eqpq/GO9gADNGWcTbz3GGs8iO8N5dxBHTnyHxO7P29aQL9bOvtrY0rxAopfy+TTcuE03qNDI6pCBjhYxCqL+GqiRrzmLJq9ZtvhNxvQ5+kvDDrw3ErFZbXoBOF4f7SeP6Tr9A6aOkLG579czsqNGSpHqkUPgvb38xXfSPv983pDvzhi3lo2GzNhAu4ZYM+/Z/Q32ssYBfst4joHAC9mcHmP37ZTKRiMfRz3hafkJlSmm2RQf5/OPYCz5ha8AAcs2CvqYMlOiJhP9Zx8AwtB9oxVlFPS+ZUJ9h/0waRVFBKQm1m70Z7odjJqT0ThTTJQEjuedfnNuxW1V5GtCi62NcwskulWOL2fXjmf9eh0u5PPn1tdqLIUmZXa9eqGU+LjZqA52w7V3sHHWoMYvfEC4SG9HXfZxd6YZdfPx12z6WYh4PnJLNUqd7bgfl4YswALJyaA= \ No newline at end of file diff --git a/server/src/uds/transports/RDP/rdptunnel.py b/server/src/uds/transports/RDP/rdptunnel.py index c13e21cb..dfbc75cc 100644 --- a/server/src/uds/transports/RDP/rdptunnel.py +++ b/server/src/uds/transports/RDP/rdptunnel.py @@ -74,7 +74,6 @@ class TRDPTransport(BaseRDPTransport): ), tab=gui.TUNNEL_TAB, ) - # tunnelCheckServer = gui.TextField(label=_('Tunnel host check'), order=2, tooltip=_('If not empty, this server will be used to check if service is running before assigning it to user. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB) tunnelWait = gui.NumericField( length=3, @@ -88,27 +87,16 @@ class TRDPTransport(BaseRDPTransport): tab=gui.TUNNEL_TAB, ) - ticketValidity = gui.NumericField( - length=3, - label=_('Tunnel ticket validity time (seconds)'), - defvalue='7200', - minValue=60, # One minute as min - maxValue=7*60*60*24, # one week as max - order=3, - tooltip=_('Maximum validity time for user ticket to allow reconnection'), - required=True, - tab=gui.TUNNEL_TAB, - ) - verifyCertificate = gui.CheckBoxField( label=_('Force SSL certificate verification'), order=23, - tooltip=_('If enabled, the certificate of tunnel server will be verified (recommended).'), + tooltip=_( + 'If enabled, the certificate of tunnel server will be verified (recommended).' + ), defvalue=gui.TRUE, - tab=gui.TUNNEL_TAB + tab=gui.TUNNEL_TAB, ) - useEmptyCreds = BaseRDPTransport.useEmptyCreds fixedName = BaseRDPTransport.fixedName fixedPassword = BaseRDPTransport.fixedPassword @@ -175,11 +163,10 @@ class TRDPTransport(BaseRDPTransport): ticket = TicketStore.create_for_tunnel( userService=userService, port=3389, - validity=self.ticketValidity.num() + validity=self.tunnelWait.num() + 60, # Ticket overtime ) tunHost, tunPort = self.tunnelServer.value.split(':') - r = RDPFile( width == '-1' or height == '-1', width, height, depth, target=os['OS'] diff --git a/server/src/uds/transports/RDP/scripts/linux/direct.py b/server/src/uds/transports/RDP/scripts/linux/direct.py index e1aa9a38..8645b516 100644 --- a/server/src/uds/transports/RDP/scripts/linux/direct.py +++ b/server/src/uds/transports/RDP/scripts/linux/direct.py @@ -2,24 +2,22 @@ # Saved as .py for easier editing from __future__ import unicode_literals -# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index import subprocess -import re -from uds import tools +from uds import tools # type: ignore # Inject local passed sp into globals for inner functions globals()['sp'] = sp # type: ignore # pylint: disable=undefined-variable def execUdsRdp(udsrdp): import subprocess # @Reimport - params = [udsrdp] + sp['as_new_xfreerdp_params'] + ['/v:{}'.format(sp['address'])] # @UndefinedVariable + params = [udsrdp] + sp['as_new_xfreerdp_params'] + ['/v:{}'.format(sp['address'])] # type: ignore tools.addTaskToWait(subprocess.Popen(params)) def execNewXFreeRdp(xfreerdp): import subprocess # @Reimport - params = [xfreerdp] + sp['as_new_xfreerdp_params'] + ['/v:{}'.format(sp['address'])] # @UndefinedVariable + params = [xfreerdp] + sp['as_new_xfreerdp_params'] + ['/v:{}'.format(sp['address'])] # type: ignore tools.addTaskToWait(subprocess.Popen(params)) # Try to locate a "valid" version of xfreerdp as first option (<1.1 does not allows drive redirections, so it will not be used if found) diff --git a/server/src/uds/transports/RDP/scripts/linux/direct.py.signature b/server/src/uds/transports/RDP/scripts/linux/direct.py.signature index a334ae1a..6921b2c9 100644 --- a/server/src/uds/transports/RDP/scripts/linux/direct.py.signature +++ b/server/src/uds/transports/RDP/scripts/linux/direct.py.signature @@ -1 +1 @@ -m7XY+kUSxXSqD276bNG7ChwBU06IOR75uTw9eXdSdBYqbvG4FhrUmL1OXRjfNRUh5kzUqkIggcJ5mj3b5Ws76QMWUjqcKS+SM2V5CGOzzPW+lFDeMLEnLCtsrmxZcCPacLce/utMlNf/AqLnraWAUCj8s+5CR68FeHE9fH3CRUryjHhvUPf51GDpMMXq+jnLotWn34xgZ2DI62Kp39qTdFYhmnZ3cGI3cHSks5Jo+uqeD1n0J+pF7vPM22aRknxW8XcLj+tXeUSw1QZVD0tXOI8RaUeD1jAH3bn0tBwP2spUfBwLFsxbWDULkuN89klfe1C/rardNJgIog7pUyyUD4HmeYQqd31Z5kfno3KD9NeAkEe8EaW99PAj3maLPrl8wZB6myYJfiq5k0LV0tzt5JNy20p61JOXFl4F04Ndb0m+IlcvYcknfecsF5RA6ID9U/0vX84y0OHtrEut1G5OBck95X2l0ksKHYcCqxhSKAAds227aeHI3FcWNsIpGpvtnQDrCrxM/lHO5mXk9+t4OVCG8dxawNrSoRmx1gUN/QvRiZvRFJ3WFZgo4OLc6ls62YBxm8FhWn+19NyVzXKI5U+Q5wJFAUkZ7+XnnHrvz75zvt/Ym5SvgMHSBMe7L+4njcEFq5UMfiTCEATorJXk03YDUrQI7uKiE0UTVwIJlGc= \ No newline at end of file +eY7ynpCTiB3Y0zGryBe7SAuc426LEi4+UbyAbMmZXi4I8uFA4KnO7lsQfdmfDjIzZqktTWaAQBGy0cRUEypa8fjbPc+TrkQmAJerLE5+DtH1RH2eHm9eH5uQHN7e4tn8vf3NrD5FCYdenOlVXtzCZhauATjy7VyjMha5RfPbuRDfHvNPcAwlE4Ty6Im8oKBa3kLmCczdI1eSKZgrXHrzDOyJYpIAlBE6RknVusGEcPnUbtoPxgBB3/YNIcy3AswToyElrmWeY0egpYm3skcTKtrrvKD5zc74ueTb5WZER0EzCfEZNHPwo6QnCbyo06U5u6dEkBg1kVFIXxEx/OoIXwpWWUWJn08cqVA/g7RNNdkXZ4iB9v4gRducZEpWGJbH8aq0tOSBOgTg7dxN1SGoayXQT0We3pCZL8Utl/gU5FqvCCGBeHE3dq/ELoAlFuq66AHV+stY08cUuURPObvgwrwA18HpmnppXgYY3RXmX8udfxwCCvOzya4iTuzC4mlQTj/QbYvKCtOgnP/upv7bEhu0+bGfTYSyLBKNFPItgIThc0ockn0BxSHuM0Ln2mK5COruhyYh3sNaQALFGST6pcBm2SvfP1HqWKzvB2V6a+xls5yqYtAR9RyHvZ1bc5QouwKNgqjzV9xSclf7QBwPjXTlOXvln6s4dj6LhLyt9kg= \ No newline at end of file diff --git a/server/src/uds/transports/RDP/scripts/linux/tunnel.py b/server/src/uds/transports/RDP/scripts/linux/tunnel.py index 1a395345..05bb72a8 100644 --- a/server/src/uds/transports/RDP/scripts/linux/tunnel.py +++ b/server/src/uds/transports/RDP/scripts/linux/tunnel.py @@ -2,9 +2,7 @@ # Saved as .py for easier editing from __future__ import unicode_literals -# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index import subprocess -import re from uds.tunnel import forward # type: ignore from uds import tools # type: ignore @@ -14,13 +12,13 @@ globals()['sp'] = sp # type: ignore # pylint: disable=undefined-variable def execUdsRdp(udsrdp, port): import subprocess # @Reimport - params = [udsrdp] + sp['as_new_xfreerdp_params'] + ['/v:127.0.0.1:{}'.format(port)] # @UndefinedVariable + params = [udsrdp] + sp['as_new_xfreerdp_params'] + ['/v:127.0.0.1:{}'.format(port)] # type: ignore tools.addTaskToWait(subprocess.Popen(params)) def execNewXFreeRdp(xfreerdp, port): import subprocess # @Reimport - params = [xfreerdp] + sp['as_new_xfreerdp_params'] + ['/v:127.0.0.1:{}'.format(port)] # @UndefinedVariable + params = [xfreerdp] + sp['as_new_xfreerdp_params'] + ['/v:127.0.0.1:{}'.format(port)] # type: ignore tools.addTaskToWait(subprocess.Popen(params)) # Try to locate a "valid" version of xfreerdp as first option (<1.1 does not allows drive redirections, so it will not be used if found) @@ -41,7 +39,7 @@ if app is None or fnc is None: ''') else: # Open tunnel - fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) + fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore # Check that tunnel works.. if fs.check() is False: diff --git a/server/src/uds/transports/RDP/scripts/linux/tunnel.py.signature b/server/src/uds/transports/RDP/scripts/linux/tunnel.py.signature index 31ecf5ce..463de057 100644 --- a/server/src/uds/transports/RDP/scripts/linux/tunnel.py.signature +++ b/server/src/uds/transports/RDP/scripts/linux/tunnel.py.signature @@ -1 +1 @@ -F12wItI+7Bo+mnANcC0IX3hdcr7d/V+XbnX7sH6zKpw7q/gEJBZW3xHaKpYDWBYYsR5pkCiJ+zawt7lHcc7+GmPJYIpFeXZeGlJWjrNN5FqqI02C+sRnuImX9DNggHGNW0hn3mGdE6U/wB1T6clXtoMK6um8cpLVQtfcVUKn1/gki4dMg+0NSJhQHfBpeQ1yffO/VLaTBWB2qnnQUjYNkqGo0x+nxJ4G67jqJU/sh0vM0OyT3JQwgIH+AidCqL694amngAprWzlOiABL3NoF/yJjn9bBfLHhHtsVp4v1YsYjTWXMegVRK8HWGvAaiGzRbOAdfjZl8GejaROSpLQTo5djBwuHN7ULtnNpk0ZCYJP00AKvQU6yW3omm5c2vZwVc1yUj5fzxnY4QY6VcpoSK15p8wR0FEWaY6kdE4bf2PWwaBGcNVGIe7itmwKv0n7AhZsJG68zmZOR45PNx1ljgFCco/Sg+rGnAxk09c0DtZNIs3BR7lhcUUHo16EFTHeUI8RwxyMKRBW75bTqrNMDUtwk7yxA58ec/mAkZmdlJ5MLYOAc1iL3U+qd8ZKxMOiwo9ZWZNsgLALXfKcg8/DGponnsrPXkmEY4CigW25t9fdooJ8WwrDTssYQJdmmOgXAkj5YyjcEryF73gXaGYL2j9tu6VKEfs9cY5WtGvfJUmA= \ No newline at end of file +qohDf0W4PxfiAn8RDcQrZcl3v/V6+B6Zj2Ba2FukDlm+XXEbrNE0dHONXJPd6zTZ+lWRvYrTHKWWyJVgRoN3gxhEghY+iw+4B4yX6uwxynb/DtHNVg8wG1tFzFfGnHCua9E7+iY+5Y6oDJo76tOmLGYZNGmOA0vwn5IDNqIKTqnAPzJnNbpHrePV5LO/xF59aZ2RthxhcBquSpkZA8Hm9z7Hw4oagOysqSknXTxdyeLBxQLc+KpGXhdo8jbD2In+21r/9V3pqFUM5AyL85tl5eunhDDyKt5KvN8vznMFCITxpJWQ8BSWtqOqNiJvhfqSXm3CVlATeLEDOeuVinF/P4AYzw9qybagKyxL0GQTSATXEmarevAKsZ5nvY5wPUx1BL6OloUWXHjlAvSDCBIRyde3ravDWtT+cajQGyinD8Mhb4emOutr/syirKZXDK8orP3L0gEMCqERKHrv0IpbIldyiyZ2Pt85lvtAQ0nYkPBUnA/kodBrESgJ0DVFqZLEx1YhzEEHEVGZuklt/hUpOzOhtTGhT2MHG2la8ANYJo8pQ+QZTaMtZHGH4uI3r6AxrI7DIBa1K5JZn66jC5pFik5Y7KcJR9d+D8QZU8QVFK4pz5oO6RI7xzka48MxhV3CFvRQ+wDeukfOWS1xThpabxPQbsrc0O/KLFkRrzsHHco= \ No newline at end of file diff --git a/server/src/uds/transports/RDP/scripts/macosx/direct.py b/server/src/uds/transports/RDP/scripts/macosx/direct.py index d093ba82..036b4007 100644 --- a/server/src/uds/transports/RDP/scripts/macosx/direct.py +++ b/server/src/uds/transports/RDP/scripts/macosx/direct.py @@ -7,7 +7,7 @@ import subprocess import shutil import os -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore # Inject local passed sp into globals for functions globals()['sp'] = sp # type: ignore # pylint: disable=undefined-variable @@ -20,18 +20,18 @@ def fixResolution(): import re import subprocess results = str(subprocess.Popen(['system_profiler SPDisplaysDataType'],stdout=subprocess.PIPE, shell=True).communicate()[0]) - res = re.search(': \d* x \d*', results).group(0).split(' ') + res = re.search(r': \d* x \d*', results).group(0).split(' ') width, height = str(int(res[1])-4), str(int(int(res[3])-128)) # Width and Height - return list(map(lambda x: x.replace('#WIDTH#', width).replace('#HEIGHT#', height), sp['as_new_xfreerdp_params'])) + return list(map(lambda x: x.replace('#WIDTH#', width).replace('#HEIGHT#', height), sp['as_new_xfreerdp_params'])) # type: ignore # Check first xfreerdp, allow password redir if os.path.isfile(xfreerdp): executable = xfreerdp -elif os.path.isfile(msrdc) and sp['as_file']: +elif os.path.isfile(msrdc) and sp['as_file']: # type: ignore executable = msrdc if executable is None: - if sp['as_file']: + if sp['as_file']: # type: ignore raise Exception('''

Microsoft Remote Desktop or xfreerdp not found

In order to connect to UDS RDP Sessions, you need to have a

    @@ -63,7 +63,7 @@ if executable is None:
''') elif executable == msrdc: - theFile = sp['as_file'] + theFile = sp['as_file'] # type: ignore filename = tools.saveTempFile(theFile) # Rename as .rdp, so open recognizes it shutil.move(filename, filename + '.rdp') @@ -75,8 +75,8 @@ elif executable == xfreerdp: try: xfparms = fixResolution() except Exception as e: - xfparms = list(map(lambda x: x.replace('#WIDTH#', '1400').replace('#HEIGHT#', '800'), sp['as_new_xfreerdp_params'])) + xfparms = list(map(lambda x: x.replace('#WIDTH#', '1400').replace('#HEIGHT#', '800'), sp['as_new_xfreerdp_params'])) # type: ignore - params = [executable] + xfparms + ['/v:{}'.format(sp['address'])] # @UndefinedVariable + params = [executable] + xfparms + ['/v:{}'.format(sp['address'])] # type: ignore subprocess.Popen(params) diff --git a/server/src/uds/transports/RDP/scripts/macosx/direct.py.signature b/server/src/uds/transports/RDP/scripts/macosx/direct.py.signature index ac47080a..d5e1fb52 100644 --- a/server/src/uds/transports/RDP/scripts/macosx/direct.py.signature +++ b/server/src/uds/transports/RDP/scripts/macosx/direct.py.signature @@ -1 +1 @@ -noBupbQ4cXphbjY5YyaiPhqdv7z47GKvj++IvZHyyyit+9wWgZGxaPx+bLmqvr6Rz+ZJrxXYcW4qk5+CN+AKDe2aoGzbusAziBdd0Oluik09Vl5EHq1+OPUp/VkdNHu3M6EB8SiwwHM0KGWz5PEvegp5V3xyaJutnr7JcEMrMxGL97iCbYtKT3G7BaZOY/gCO7BPTexJlyjZ66xb8+hmUTix12Cnwhxpn2xEuZ3N6raGtbmgOHAp6SHz4Y78GBnFhHrhu/EnkHZVgSIoQbyW9koB2tBYdQi3915sUvTLIdHuN3kjz9UKSH/tPJVL+CGrBE/+TXJe90xOTBbzRAgZcUtUjCNyDULhRCT87N1sRH5RFJNsvQv3cqYTgnVUBF5Oew8guTj0UdAAB6tGtUdZqFXz4NspA+f+PkzLmUzmd8y6hqwX4Ojbh0SL0N3Tb5SJw+uOcKTN/FNSEavWK62alPyA36VDf0IIJLV604DhxvOeUTWYz0H7TnrME4e5d9F82iYPCre71yNofzHihZ5SelKJUQ0AniZxQIY+7vYcZNRpcEkGnt0oTWHDvXeTqDwtAkvzwt3QvTsl7/i3yDQ2XYJInICLWaM81op/sVOSM+DSgEd0n+O3r1SE/dD72u0VhSMZYYKZw0ZApcFXMHBk7c9DcjVYMXoMFMKqsqnoe9A= \ No newline at end of file +Ro5JrmfPQnCaJAd5mc1x+wKPoB3ipy3ueRnbD00lUtKhTpLxNm2HGovfEk8CbL3VOzpDyvvavWGo+wiU1qpU1baF5/gGzGYuFQiFB4da+kwjSmd8Jr6p9p9KS3eTkRD5GiWV5zBCHNnlO9200+gw9tvMGllZ65chkEbCHaN1MGiP6Af3wi9hK9yi2QR8sqpxqJ06UgolK+HM2OFuZTf28BVNZACcL8rZmCpjVN27nv9WE7nYnICr5OXL9VV7uclZuLH9VjZkkxpJWH3o8E8ftO6MqbOBeLwlyZgQU+PlGHu4rXtSjH39h9tSLjbAkF4YrT2n6yO9BxrEwqasW+mwnMqm0uI4Cpj60nKrm9eTEIPMhsgZRGyCcA0l/ozzBKwtOfP2OLu1bPdUNdU7XlW6ctgjcfczukCU3/aEbVACkv+6nsg7EFoFkPW4RN+xbB5URaTlA7ddfbjKkCQjY5h/ZeEEm0Nj8e+uIYzOmA9/ftsQOWyhTkwRqK4o+bylQFWSQJhGWPB7hF4jY01yPo7sLY9H/YMci2ds1emys0K4tyyBDQOjcqRz6H0owvjPmWAPflJ6w+g39yklzPdegj4zHzbCtj0NFkWY0xGxhEclG/meTh1txl1SflU1k2E7LtLlV8x3Lgm1FF/QNFH/u0bBlXHg8AMik6Qi9fcf5NEveKY= \ No newline at end of file diff --git a/server/src/uds/transports/RDP/scripts/macosx/tunnel.py b/server/src/uds/transports/RDP/scripts/macosx/tunnel.py index 5528515e..d62e37d2 100644 --- a/server/src/uds/transports/RDP/scripts/macosx/tunnel.py +++ b/server/src/uds/transports/RDP/scripts/macosx/tunnel.py @@ -18,9 +18,9 @@ def fixResolution(): import re import subprocess results = str(subprocess.Popen(['system_profiler SPDisplaysDataType'],stdout=subprocess.PIPE, shell=True).communicate()[0]) - res = re.search(': \d* x \d*', results).group(0).split(' ') + res = re.search(r': \d* x \d*', results).group(0).split(' ') width, height = str(int(res[1])-4), str(int(int(res[3])-128)) # Width and Height - return list(map(lambda x: x.replace('#WIDTH#', width).replace('#HEIGHT#', height), sp['as_new_xfreerdp_params'])) + return list(map(lambda x: x.replace('#WIDTH#', width).replace('#HEIGHT#', height), sp['as_new_xfreerdp_params'])) # type: ignore msrdc = '/Applications/Microsoft Remote Desktop.app/Contents/MacOS/Microsoft Remote Desktop' @@ -30,11 +30,11 @@ executable = None # Check first xfreerdp, allow password redir if os.path.isfile(xfreerdp): executable = xfreerdp -elif os.path.isfile(msrdc) and sp['as_file']: +elif os.path.isfile(msrdc) and sp['as_file']: # type: ignore executable = msrdc if executable is None: - if sp['as_rdp_url']: + if sp['as_rdp_url']: # type: ignore raise Exception('''

Microsoft Remote Desktop or xfreerdp not found

In order to connect to UDS RDP Sessions, you need to have a

    @@ -67,15 +67,16 @@ if executable is None: ''') # Open tunnel -fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore +address = '127.0.0.1:{}'.format(fs.server_address[1]) # Check that tunnel works.. if fs.check() is False: raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') if executable == msrdc: - theFile = theFile = sp['as_file'].format( - address='127.0.0.1:{}'.format(fs.server_address[1]) + theFile = theFile = sp['as_file'].format( # type: ignore + address=address ) filename = tools.saveTempFile(theFile) @@ -89,7 +90,7 @@ elif executable == xfreerdp: try: xfparms = fixResolution() except Exception as e: - xfparms = list(map(lambda x: x.replace('#WIDTH#', '1400').replace('#HEIGHT#', '800'), sp['as_new_xfreerdp_params'])) + xfparms = list(map(lambda x: x.replace('#WIDTH#', '1400').replace('#HEIGHT#', '800'), sp['as_new_xfreerdp_params'])) # type: ignore params = [executable] + xfparms + ['/v:{}'.format(address)] subprocess.Popen(params) diff --git a/server/src/uds/transports/RDP/scripts/macosx/tunnel.py.signature b/server/src/uds/transports/RDP/scripts/macosx/tunnel.py.signature index c709db6a..df41d3db 100644 --- a/server/src/uds/transports/RDP/scripts/macosx/tunnel.py.signature +++ b/server/src/uds/transports/RDP/scripts/macosx/tunnel.py.signature @@ -1 +1 @@ -akjWk2TMZx4h/STESjRKWvyxDs4IKdIdX2e2bX2Os6wDhFm40THwJENyXzOjjvDwIv77WgdQJLbBAbKusVA+GA70slmA6W+cdG5pMFFtjgna3OxNo8ClSHHRKer6cwz4FJ70k2nihpTfsQOIlUBr60Gt4/3Il5c7AAUED4/IpekS3MwJfWvsxEpUujP+nsQSEeIvhpFD9oqfA3WnCGD+OOZlXfMe05fNaWKA2/UmtxQlo0rvRsPV4puGjWWHZxmdYVYIvSIcNkqGc6nIxmMmO5NwHXRY7JgoCBEAeLExVcn4ZUW+qPWQji+6tvsiycIfydT2A5ZOUcpbvIY8l1zLR4HaBs6+RiAa+fVEwIlnMl4qvZl2eP7ljo2RKZeaD/t4H+9wLa1kYVEE7/suVEny/Pap6I1BkDHXh6qEUn90pE8QPCFbutzWmbVXpiE+5UhPAp7L4DMc65Oh/qW8QZVzjpB4Np6LRnxMe5Qwb4+uFYNJH2H04Bmbgor+StvEnO/4rOAb1rCOjKDD1V8tzYvUAfizXBLP1ImiHHxJ6tg5s7ztUb+vyH1rD1U5OktpkzfIaBB7/sHG87DnF+e+PDb/mKY3IKyRGL4ndf7yE2TEbOgXqH6dJUuFh1V9JALWFcaB3fPN5FC0R/EB+3iBp/RsEv5ABrqGnOImMWLgNU1OXEo= \ No newline at end of file +eD97r30FTBTbnkNU3qWsqJoiB8jyrpXhN3LcjYILryptrOLhxY5uTw9wfXGkFeB8UIEJl/QMjH85t6E8pKPQdzs35qqH5DMgQWCg/QCmhTa8T8gqSqXT3ZWSTkzvyVXu5aVM8TYdLbsQqZ6o7Y4DO6vt5h2rm+jVLHg7GlhALDaV1WbQKqjMLekt6QLb3M3hN2YYA0j7XbeunplgpzyS9BeMvRtt4dRaPs6yrWP4AmopP+2oYk4qTDzKxiZBje0548n+wA3oYVQdOeYtAVawApg2Ve7Jst3pkG5qAMvzt08Iiu4wIKWJrvUTsapWm3iD1N8dVgheh054L6Nv3MpKvifwhJfY1XeATIFJkvCFw8VAuJBMko1cEcsjmPAEhLCnwBPnOvPDsrvt7CEX8sBiYbZX8M2PR/UHHmKvJ7RE8LEsmhK+5LqhbwnmUypFwuEYciQo0Yg26xIKTRpldQG491a8dGiqjcLI5Qw5F/xG7xzgIsq6puyNXW3Lmi3Iu/cYXmOdleQHWtjfUs4Je+X7f1MHkGduuy7S+b/TKRooa5diVPpmZzAk1jBZAFAaFu+AqaieotbM2Pu3QtPxtiG/2rQSQtgsWGGV+MGKDpBAcTUeKwt9ZYPpHkumyDsSrKy5pt4y2aU/9AcdYiu5Ry7HOev0PygMusSGA6EGzBkTWHA= \ No newline at end of file diff --git a/server/src/uds/transports/RDP/scripts/windows/direct.py b/server/src/uds/transports/RDP/scripts/windows/direct.py index 1ecfd0c8..17211194 100644 --- a/server/src/uds/transports/RDP/scripts/windows/direct.py +++ b/server/src/uds/transports/RDP/scripts/windows/direct.py @@ -17,23 +17,24 @@ from uds import tools # type: ignore import six +thePass = six.binary_type(sp['password'].encode('UTF-16LE')) # type: ignore + try: - thePass = six.binary_type(sp['password'].encode('UTF-16LE')) # type: ignore password = codecs.encode(win32crypt.CryptProtectData(thePass, None, None, None, None, 0x01), 'hex').decode() except Exception: # logger.info('Cannot encrypt for user, trying for machine') password = codecs.encode(win32crypt.CryptProtectData(thePass, None, None, None, None, 0x05), 'hex').decode() try: - key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Terminal Server Client\\LocalDevices', 0, wreg.KEY_SET_VALUE) # @UndefinedVariable - wreg.SetValueEx(key, sp['ip'], 0, wreg.REG_DWORD, 255) # @UndefinedVariable - wreg.CloseKey(key) # @UndefinedVariable + key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Terminal Server Client\\LocalDevices', 0, wreg.KEY_SET_VALUE) + wreg.SetValueEx(key, sp['ip'], 0, wreg.REG_DWORD, 255) # type: ignore + wreg.CloseKey(key) except Exception as e: # logger.warn('Exception fixing redirection dialog: %s', e) pass # Key does not exists, ok... # The password must be encoded, to be included in a .rdp file, as 'UTF-16LE' before protecting (CtrpyProtectData) it in order to work with mstsc -theFile = sp['as_file'].format(# @UndefinedVariable +theFile = sp['as_file'].format( # type: ignore password=password ) filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/RDP/scripts/windows/direct.py.signature b/server/src/uds/transports/RDP/scripts/windows/direct.py.signature index 0d244ec0..00d44bf3 100644 --- a/server/src/uds/transports/RDP/scripts/windows/direct.py.signature +++ b/server/src/uds/transports/RDP/scripts/windows/direct.py.signature @@ -1 +1 @@ -V8FP9WC6BBzo9NnAZNKznkQE5Xdrz1D4KDif+rw7x+0X8MMNbzhB2g/Ukjyvdc1KPBH1T0M89LLFw7XNHwHWLrNmnAppyBCnBgJuIReWPBKvtSqyYRapDydykx0Xv9s+vbaI+LO9vPnO4KSZbxgbfocGhNzV7kYE0pwlXV5N8Qe4dpr2GvnnXwMHv/UGBBRf+KnGIa+/h77+qrejW8dvlvo4od0enH12oh1zQJMZrd7LUx+1vds4/IDPs5seu1KVVNDHawcDg8Fg8RKh+K5kAK8O/kHalulbBcGu3woFxFqERTf65bCG5Cj/476b6JoCk1enyE1HN+0DzrNqvJakim/mAWYIkfkqmsLZ0bu3oFJHfFDixbdj+flMwZ7mv9qNjXFBEp2G6OTGn8I5vEgs0ZFKAQi4sNYyso92k5um3fady1jr+Xf9CMTJsmbEuAIafs44k/9BRpBKHfTaJudVGB3Y2l+/wW2ynh7/J9sO8AkHPrmxNmKpQGHLUpdoHATRKq1AJvZf/fb+cTu/VFF2qigbFk+oApOh6KTeWhU/2qOIWPCczQ/9hbExaTSCVlQ6coQbHBU+S0sHVlqq+zxf0sWhfXfduwM3dqRHKW/pm57gItbH7HgS+yG9o9SeLVaxB52p4019j6Da+DAfmrovYVqPxrykA6kKnka3sY7cCHE= \ No newline at end of file +EbLkCRb09VB7luaOpj43/F1tiPfnw8TPO3bCRqasEwWEi1S9BvK/hgpfTuCKFsKJ4q8+X1lGwPbIGquryzBaa+g+Q9o74ZMaP7hLZH2ko9G32Zd56B6XisHg7qfJC46pjwrHEI7jBec8Du6cBEfi3FCg3i1lHxUXPgZeLWrmuSv4x/HZKYGtXTSMI77ZL6zi8ZFkUk1pceyo9aNj9Zr3uok4Ddg/z/OSU+tD49tkJvIj8GTbpl0Wf4gu02ikrN+nF5+Yu5zac2nz26yPnAXJh1PecoKw/uuwDW5hpvSAwMfBIACezD1r5wfzjpMLqfbIq8VKca57USsi+1R4kwbV1dewTotwh6pHOj8bcVk78LTPqshdVud56390D3jV4C7fQtdA3+CWe6M6SScAwu7a0zDo2CNagmQJuBmlbmxjYgKFsUfjQTZehESCHBLpGiXPuIipU7A+F0iWYLUMKtrT1twfWDaxkCDSO5PGt+hNbt1Jie4qCQ97SvDx4cReaQomkVm4hAaAphS+/HOhZSTQ/+jfGmOYX8MgrM43c3o7r3Avg7heDn2r7CCMMeC5Kh8Clh3nzvM/F0QjvY9TibvlzO1qzyylt5U2OXrJ8agZ8Rpu4IJJQFL6DubVZAlPjlHAJ2d+8Vv8QNi42HEc967RDToaStoeofS6d4eft2SOUP4= \ No newline at end of file diff --git a/server/src/uds/transports/RDP/scripts/windows/tunnel.py b/server/src/uds/transports/RDP/scripts/windows/tunnel.py index 578d92bc..7bbac272 100644 --- a/server/src/uds/transports/RDP/scripts/windows/tunnel.py +++ b/server/src/uds/transports/RDP/scripts/windows/tunnel.py @@ -20,21 +20,22 @@ from uds import tools # type: ignore import six # Open tunnel -fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore # Check that tunnel works.. if fs.check() is False: raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') +thePass = six.binary_type(sp['password'].encode('UTF-16LE')) # type: ignore + try: - thePass = six.binary_type(sp['password'].encode('UTF-16LE')) # @UndefinedVariable password = codecs.encode(win32crypt.CryptProtectData(thePass, None, None, None, None, 0x01), 'hex').decode() except Exception: # Cannot encrypt for user, trying for machine password = codecs.encode(win32crypt.CryptProtectData(thePass, None, None, None, None, 0x05), 'hex').decode() # The password must be encoded, to be included in a .rdp file, as 'UTF-16LE' before protecting (CtrpyProtectData) it in order to work with mstsc -theFile = sp['as_file'].format(# @UndefinedVariable +theFile = sp['as_file'].format( # type: ignore password=password, address='127.0.0.1:{}'.format(fs.server_address[1]) ) @@ -45,9 +46,9 @@ if executable is None: raise Exception('Unable to find mstsc.exe. Check that path points to your SYSTEM32 folder') try: - key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\Microsoft\Terminal Server Client\LocalDevices', 0, wreg.KEY_SET_VALUE) # @UndefinedVariable - wreg.SetValueEx(key, '127.0.0.1', 0, wreg.REG_DWORD, 255) # @UndefinedVariable - wreg.CloseKey(key) # @UndefinedVariable + key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Terminal Server Client\\LocalDevices', 0, wreg.KEY_SET_VALUE) + wreg.SetValueEx(key, '127.0.0.1', 0, wreg.REG_DWORD, 255) # type: ignore + wreg.CloseKey(key) except Exception as e: # logger.warn('Exception fixing redirection dialog: %s', e) pass # Key does not exists, but it's ok diff --git a/server/src/uds/transports/RDP/scripts/windows/tunnel.py.signature b/server/src/uds/transports/RDP/scripts/windows/tunnel.py.signature index e271caaa..78e20320 100644 --- a/server/src/uds/transports/RDP/scripts/windows/tunnel.py.signature +++ b/server/src/uds/transports/RDP/scripts/windows/tunnel.py.signature @@ -1 +1 @@ -Jnc7MGVnKf5HG89jPUC/bdAebjCX9g6Afl9MX9d9vgpFvopcRmAw5pQrvGi+J9W8jLjg//kNoatGtZ7OCV6Umt7/UQjJyVUQ2bqGm3qBMagtr00v82vz5uUgald/kxvhHPdNYLP8ZKzSs5jESF+WeyKfF2mIhm4CpZLjmwwfQviG7V/Yr7NgENRz+gCaaGlTuz2JIxF7shZjw/zZqRzJQ6CtYozRXjJRTgO+BNNsN+k/dFKRZnRHsVIPQHooPCQ/5duDzWnqG3wEwOx4aibrOb1OSmhOtA0PQjt0pKUUveddRnKMbhqRGFA2+KbYE2pcDAaYCWTI27JEP+gPSoqjFX+8b4LnnM9qrnam5LMQ4EdURdb5/LZdAUyAm8MLglzNBhUbSzBC45PGG9Hs5lf6Hx8RCvZ5yzw17sJfAjJL8CbQoWE2/jy06hidvNDmUJbl/5NSuwAvXzB162qdGRSEpz0q1K6uYl+kmvrSgQEyu6V4P4ITbeHJmVmaaPXK5tPvf2SQhScUhz80Qclh0dE9ZZFJ46KjLohqBgRac0//MIVpuNVjvDuom/p84K3HiY0MUV8V/3KoBcDofR3T/jAwd/0ZgEkwoRNFBsBpseRXkacDq7j9zkpe0S8a5W4gQnay8tJmLmKjKd16OWhqpKLkJKVs1e87Gy1osswwU+f87AA= \ No newline at end of file +PxgUpszz7f/yliXrWhEzYUPd8D4bTMhI2Wq94xh8ZszcHVWwkwudtv7M9on3QJ9vDQ/E7YF9bFsuM+Vql4Fjcnk8sJMHiToXXJADIvNPUOWB24inPUxSkJGiZVITpfMhyNFzcykxcQ7U8U/UepK7ZRdIVQWJpR23XGTARmBDzxgYITS3LrIhpgtJ3jiQZov1K3Ub0oY3GUUK6UxidtRov70e/S1btHi7U6OvjT0Q/PhJBpxMBm0+xf7IF1t//dcGg591SOn1s97wjWhvSTVVFm/P1+7Xso6ZJuWVd5P+yTSH5v9xVTLcARkKRou+0I2syrSb6+zn2FyJgthp3PWYoepFJ+t946qDj//ew6fEBP4p4PcFeQ4Uuc/1F7/bKbNdHj6UzE06qmzbMpYl8QD2DXlL0zrUTlKFEUIKGSdmVmeWFgMrp/yJyUJaFceX0WMSC88Wj3MUW8qO0eTG/KtwgFRYldNt+l9xXl46pp/CsyIRnZQmWf2Lv3+YBU4okn6EPdS9V23Oy+jC4WkgOdHGwaP9weL8BLEIbvpPwgtAGJm9v6MuLT/VXf9sx5PidA+e1XUuvkR7yq7LtfbjdjTKvWtKtaPUiBnCQMc0uYGB0YnpaEj6WU/7yiahbEBZzbShbWMFXbV4RuV+lQsfHYwBNbAxbckhgEK2+ASpNb/7au8= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/scripts/linux/direct.py b/server/src/uds/transports/SPICE/scripts/linux/direct.py index 7ed5df50..d97b5131 100644 --- a/server/src/uds/transports/SPICE/scripts/linux/direct.py +++ b/server/src/uds/transports/SPICE/scripts/linux/direct.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals # pylint: disable=import-error, no-name-in-module import subprocess -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore executable = tools.findApp('remote-viewer') @@ -16,7 +16,7 @@ if executable is None:

    ''') -theFile = sp['as_file'] +theFile = sp['as_file'] # type: ignore filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/SPICE/scripts/linux/direct.py.signature b/server/src/uds/transports/SPICE/scripts/linux/direct.py.signature index 24ecd042..1900ce68 100644 --- a/server/src/uds/transports/SPICE/scripts/linux/direct.py.signature +++ b/server/src/uds/transports/SPICE/scripts/linux/direct.py.signature @@ -1 +1 @@ -KVdckBRbRq0iPwi9PwkkNDA7lLaopVALN+nNHanqrbNT6BT382WIx2aZQl542OOR6lr1y9A8nRDqpuqrWzwQvHESoetb/apvWKtM0H8qH3kygtN3jUwyr9854LQ3woaiykPOwBQC0w0JnSra1aeNM+rCbL035r40d7yYqHyul9fCkCuSMrnMamSBTqykKSGUOZ+dY4Wr9jYD2CEsyD3jgULlLTyTH0rVgE/1I2jiebzjgUMPHxdW1T43TXt4UQdPXb2AlUFRCgCxwxZ/0bE3bAOuxvaYG1oejT0lJPBswqlrQcYLDoAbd9hqotWqfTEB5qFEd2Xsr3TzO7ijfMlAE/UpU3Foybc8+FB90d0uGGjunsYyy+y4C5B6a/XkYfV25X2llSk21mOMGlzXDvY9FaH2CHIfiN7nUOuO1hl8p5aLr16sNMPibcRvx3bLvamexAAPMLB6r8hyQViZIHhMIT+DLXOWN3LyW4U+dR3QdG7KCF06r90OZ39Wf4p6ZXTJ0xK4NJHMRn3UznOhjmHSWGGrDdM5e3N8wrvCPOAHlP5JzWb4aVAFjTUGxxjVGTZk5qWm00o1JGTwVwViTsYfqyCvxXJ1oUq4xiOwjuiheTjD00rc1OUwkGYWwTs1qVVE/q5/V6MZSgiOlteh9bx5VADzGoIyhfR8GjIpi6wFNzk= \ No newline at end of file +Ke13liZe+UPqfKgJBONj0zbw3IaTUVMr5YA3fDbf7tnOf47E7CwFE5l8cBZhpHwg29o/KFZyCDaQ5fwIyT2fQHa4q1HN1I5ra+MG+EFM2wPxOD8y2ZE5QzlVNOt2NvZ4mPJI2RKHaTSd0+wtEUISuY84DAgu8mKG06N1+M2E3yjN6KA2tgZBWiURkaJMuzwDYFRE0kdWi23KdXp2m1EYRf8EBa5klkYAT/cwHgX5iM66Mc92/JirFs/9qZ4bww57fee59gnq1RErmfWbK+V0YX1ROZ4WWs+dYE1cK1zmY/oTtJlmeu6HOkPYEXZldeu+od5/bFdeQzPsVwTTraZsDjeIoyX23YLPUz2hf8vRUhI/JDw+QVsG1xUyKQBmkWYc2W6Gqd25kl2pIOacVy+fzMSrufcd3ekkFrxJbBe1Yc1I9WDwxuG7MaA3atycKZcjLS5hSYXoIwjw7nWlAOYdaxW6DjsmH96LP80IgwumOhrB11+LrYzN+tzBpU+jCpm+3T2Dhpm/FciidCrr0OE1kBC+y1H6eq6H7EFm0nvDG7gOoRw4RZVqdQrTjSs9D+clz8c2K3T16/8cekJhIA6unHHdh89ESmf5liK5cYUNPBZ0Jk07BGAUEHSs/sXXQLM2daUQxyKcuPlrkEawqUhK5aQSV96XCZ/J+PkPahShju8= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/scripts/linux/tunnel.py b/server/src/uds/transports/SPICE/scripts/linux/tunnel.py index 6bdd135f..6c879aae 100644 --- a/server/src/uds/transports/SPICE/scripts/linux/tunnel.py +++ b/server/src/uds/transports/SPICE/scripts/linux/tunnel.py @@ -5,8 +5,8 @@ from __future__ import unicode_literals # pylint: disable=import-error, no-name-in-module, undefined-variable import subprocess -from uds import tools # @UnresolvedImport -from uds.forward import forward # @UnresolvedImport +from uds import tools # type: ignore +from uds.tunnel import forward # type: ignore executable = tools.findApp('remote-viewer') @@ -21,31 +21,28 @@ if executable is None: ''') -theFile = sp['as_file_ns'] -if sp['port'] != '-1': - forwardThread1, port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['port']) +theFile = sp['as_file_ns'] # type: ignore +fs = None +if sp['ticket']: # type: ignore + # Open tunnel + fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore + # Check that tunnel works.. + if fs.check() is False: + raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') - if forwardThread1.status == 2: - raise Exception('Unable to open tunnel') -else: - port = -1 +fss = None +if sp['ticket_secure']: # type: ignore + # Open tunnel + fss = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket_secure'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore -if sp['secure_port'] != '-1': - theFile = sp['as_file'] - if port != -1: - forwardThread2, secure_port = forwardThread1.clone(sp['ip'], sp['secure_port']) - else: - forwardThread2, secure_port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['secure_port']) - - if forwardThread2.status == 2: - raise Exception('Unable to open tunnel') -else: - secure_port = -1 + # Check that tunnel works.. + if fss.check() is False: + raise Exception('

    Could not connect to tunnel server 2.

    Please, check your network settings.

    ') theFile = theFile.format( - secure_port=secure_port, - port=port + secure_port='-1' if not fss else fss.server_address[1], + port='-1' if not fs else fs.server_address[1] ) filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/SPICE/scripts/linux/tunnel.py.signature b/server/src/uds/transports/SPICE/scripts/linux/tunnel.py.signature index 9a012b64..70730d6d 100644 --- a/server/src/uds/transports/SPICE/scripts/linux/tunnel.py.signature +++ b/server/src/uds/transports/SPICE/scripts/linux/tunnel.py.signature @@ -1 +1 @@ -MwVxZsoxUK+gcMchgM9c3iYky6K7KZ+3z34uZCgpJzvad8dH7lwihqrJ+7tlk55mZU/ea+J4dqk4EgMX1LGzzm9SyE6/9Yz86lfNlj/bH4AtnwkWUHEtKUizTOCpZlhFjRs5Cif6LICeVzGLnPx27vpKzHhbre95kpsmCzJ33vmMnB0IsCrFBSmJw4BdxUcf/+n1CyA5WiUqzIXC1cIkJ212plpl6n+WP0tc40A7WVVcnMV7Kpel7xyihI+hSvpSwOubgXTbdS01IzCD6ecG35VPbuBoOK/rl7yfTVexo+grfiDtTN9kRkXzBkJIkYaPlIhEJNODcGv/23ni1Dx0+45TmFFdfthspZobEsA0b9YKpMZ5FhH1cx5sDQtZTEW9/YrA+cP8KC4UJ+uRuebbF96rKJL6l1OYX88aWoFtRNFf92QvSREwJFmA9MGnpHphdqo4bmwS06CEDn6KE3AxR76ICcJvoioBvO+F+X7CRll7KNJumIB60k74XNxKdBdlR8fV+PDY1kP0RvwQYii2z/40zRFB8l7BnvSs8OgSwACHoKDcsESAUvAwVSi6q9mmTZkKvrpDu0fZIstn4iLFgOS+PnwJYZv5dmW3SrE7DCnwn6ktZMqGCQoRZ2R+Ydi1mnH8+CTf1F03Vxn4UUwZ+G5gPMYk4iW0FhX543TdqBA= \ No newline at end of file +LGPWahJB3T+s8VzwosVugREQVNuBWpzHibiVGK/rHsiOfZFDWkWvErLCZsLQMdDF5VptZ8EeQL2iIUXN3170xaxzT9Nvi6dYah47vTfKPscZEj9MafzER5rchXEPZunBXnuAYBEamN6h2Y6RguEd6E12Mr3YQ0etxi82ZqaOM8iMGSLQJnFZM6rxmIbSNArXYszCnQgIfYfJV1yTKLKeTWCCw6b7hOgQSXalRaRVpx22aCawxInHMfGkH1O0B2ZBEClLeLP9XoD/K0LeKROe72ouyeeAjzeX3x+LHdsSemc/ql8DDQMJUNhTsrNJWfDPlhImD2CcvSyMOJhimPfUeztFjDNhSA7mpoSudMMjpROtz5E5l+VVTUHeFIoRL2F8pAqtN+9Sk544AXcsc+uXbGm6/Hwwc4Df9+jXUNoDgRwhZ1EAUDLeAcoV+lu5u2Kyb60p9K6GhbK8i1IIDcxxg3akR3/FIF/Dqv04TOrKaCO3lZKMI4UmT0btjmCrlxDTn9RsAO+n/lJ2AdcbsKuo6sCwyEvLge2i8F2yxlibA1pQh+v3ZD/agapWf7MUlQgM8RCtq1BD/Bm7FmnNFhbkKVzu8vAHdbKGooSqg64ZzIc5Ak6u9nRaupnn5DHGnKNcR4DRxmCYjLdHhzjzfE61ErQ8PnVI7Yc4j23hYEMd+TM= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/scripts/macosx/direct.py b/server/src/uds/transports/SPICE/scripts/macosx/direct.py index 0828af6b..a50dae5a 100644 --- a/server/src/uds/transports/SPICE/scripts/macosx/direct.py +++ b/server/src/uds/transports/SPICE/scripts/macosx/direct.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import os import subprocess -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore remoteViewer = '/Applications/RemoteViewer.app/Contents/MacOS/RemoteViewer' @@ -25,7 +25,7 @@ if not os.path.isfile(remoteViewer): ''') -theFile = sp['as_file'] +theFile = sp['as_file'] # type: ignore filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/SPICE/scripts/macosx/direct.py.signature b/server/src/uds/transports/SPICE/scripts/macosx/direct.py.signature index 6582b17a..f58eea1e 100644 --- a/server/src/uds/transports/SPICE/scripts/macosx/direct.py.signature +++ b/server/src/uds/transports/SPICE/scripts/macosx/direct.py.signature @@ -1 +1 @@ -omMUcXLu3wGpKRISFlcEG9j0GWbhkud++umoXOoAREnLPlqwxxlIiWEaB5fkTR2ZjPFIXB/lQzGN28PEDbCkxagXb8KA+zXWmYvwkj3uB0QpCkfk0I+5/0cy5p1njxaAyENGZQFVZorqWvtWzuaFsDZrDZvV0qygWK/a7TTwQOxr2xFElnG+u/HzSNx09VzAIeVNkIu/3xP3LA6fo5/uzswDDFmRSch02aFp7AL6PBroq2mdN4aopu/xsdSAEdRzSumPWRLNLVd/yttfW+OOvMX6liUQr0CkFP0BQrHeAJnZVHXVnUNYDqRvnb3m9DjVfjUbFRs5vljxgr9zlcmFRdUXOJMYgDZelMqY0MidOPStoxnx/VHNijurMyBF4rlra0jIAkojqwNMxe788A9WJwKmPxkgeBiqVrVNYgSUpGWixSp3UpNGOtyD6jbY0ghnABoED/3NQl2NZj93SUHliUV14shf6pkrcxk7I4AB0BSIvvLRX6B3sN5hk6wm5rgzLpPl1DlgRGLvCLuLyp8cqiXQalntWPThck9OZLL9MATRK5BkPqNx5M2eEl3gqNNYKwnm+cEFvwbUhSQKsnyqpKCdzQJzp6LkgO4XuSdP4GrNCjUObL4X6Ogq2kb/tc3//ouvES81M11aeS84jBV7+PRcibLXc0t7gcyAUuRxlnc= \ No newline at end of file +dqg89d/khZKFk2SUIrROrthcq22mzSffp2JwLDEMqt6RVwvpT9hHY3eajSauVFJXdAl/DfLnUB1W0mQHWp1FyFQsFzprQhvOxROmnsa+vju2TnwjJHpGFMGIT7AWs3pGlxs1399gGcTXoU09m2/qtHxGgzxTyLprdlqMD1WivN2T+8o1QjLvfPIkXX/A252zJ2GEgZPRW9eni4TjAPY7jUVyoFs3wXkAO5uqBZcB2tGnCkxQ9UuGIa2ladff6o00m9TgAuSvCikVDnknVWFIOguJ+WZ8TDfYVCmHLAH43JI+EWwPcn4OvIgdDc6E9GAn71Mnv33yI48/VTtzV/KFu9aQiAuPoUV1JPCP++jcfsZ7vs1Qe8PdI6gBeHM/3j48oREoQRGpn//q0xpwfbKvBm8qHQ+GI9tv9gDi4sva7tJPNELK4xzMBhCZcG3bHt0tq984oid6o3e8q6sgkVdUE7Jvh3gjlk6H8x596rX2f8hPvqzPEEB8JERl3iJTEGBYWl0l+d9LJiMQcSaMyKSoySoYT9btcdK6p3Dr1uurZxOjgjF/jHi/5yP3H8i5XspiEY/u4Dcehf8Y2rd7K3sFRh1GVSROCdUhBFXbvE4nDRxwUKehwmE769jLOWsq21L0TYtq3ErFahr5QxVjGP3yAmFWGjY2ToTKTqBveCb8DmU= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py b/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py index fd402709..ea87b1b1 100644 --- a/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py +++ b/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py @@ -6,8 +6,8 @@ from __future__ import unicode_literals import os import subprocess -from uds import tools # @UnresolvedImport -from uds.forward import forward # @UnresolvedImport +from uds import tools # type: ignore +from uds.tunnel import forward # type: ignore remoteViewer = '/Applications/RemoteViewer.app/Contents/MacOS/RemoteViewer' @@ -25,31 +25,28 @@ if not os.path.isfile(remoteViewer):

    ''') -theFile = sp['as_file_ns'] -if sp['port'] != '-1': - forwardThread1, port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['port']) +theFile = sp['as_file_ns'] # type: ignore +fs = None +if sp['ticket']: # type: ignore + # Open tunnel + fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore + # Check that tunnel works.. + if fs.check() is False: + raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') - if forwardThread1.status == 2: - raise Exception('Unable to open tunnel') -else: - port = -1 +fss = None +if sp['ticket_secure']: # type: ignore + # Open tunnel + fss = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket_secure'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore -if sp['secure_port'] != '-1': - theFile = sp['as_file'] - if port != -1: - forwardThread2, secure_port = forwardThread1.clone(sp['ip'], sp['secure_port']) - else: - forwardThread2, secure_port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['secure_port']) - - if forwardThread2.status == 2: - raise Exception('Unable to open tunnel') -else: - secure_port = -1 + # Check that tunnel works.. + if fss.check() is False: + raise Exception('

    Could not connect to tunnel server 2.

    Please, check your network settings.

    ') theFile = theFile.format( - secure_port=secure_port, - port=port + secure_port='-1' if not fss else fss.server_address[1], + port='-1' if not fs else fs.server_address[1] ) filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py.signature b/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py.signature index 8657b7da..c2fc0d8c 100644 --- a/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py.signature +++ b/server/src/uds/transports/SPICE/scripts/macosx/tunnel.py.signature @@ -1 +1 @@ -dR+uIC5WKTM3Iicua7Jv7YEksMy8gIf3U5MfYzh6pCNYkkdEywpuszoIxHqgn/ltIjuvY4s2kATXqQtuZ7BYCNhB7vGw/nA/PDGqpOPNDCAamRL+N15Ctjb1+olmhQgqR+D/lv7GaScO+5n579OSmrHPaZkDbRo3U9wRiMzg+FLaL6Rknz8Hirpeas4kAculg+s3BeCRmf0fghz6UI9/xf+At0sd6M76p1E/3oFiIBjBNw9yKkLiPgDzq5DrrxA0SLWBwl15IPYqNpBCGo/VMV2pBQsSWmFGS62C3R6KdjMHN9jmO+seWcfhcNF2eCk3ODcoFeZUTfvXT+GoN7u7z3Dt4CyWx9k01RqSMxXcnf+vv2MqgBZde5Lu75ZqIpYP4qBkO4h6CH5isg1KVZJW/tGWGgU3fyVAkY9oxt6B8R2xo3mQeTkY+AGH+7KQHsB9l/OU0R1jHllbEIo9wopb4/SzZLMrECDMgOscA69BFodoFt6suT+QimzPHcgCQLE8xGY9KUZ7rrEn82rr3O7bAKXlJIti+UaT+zbgOizekA5+9CJRNVsWTmFsZ+6ghqY6L/QdyWJhere3Rrzh/0mg36Jk4XEaI8GI/VI/TmtmTwgut6B5gH/6fg+yaVAqYexIcINVMSSdIZyBVeX1QXbzcgYc5QJo9+EOJrzP5U0K+pI= \ No newline at end of file +NCdcJPSAu3yby5d/PiANn+iTTGsOt/GF8Kp9XxhdE1hZKFsR2USQob6tGTdM0HIIuL6i0KDOOvSa5JiD4Tq4OPE4sYSmaK4eDNo+RO7Fa4qP91ksOc3EcUCBGCru9+BNBVrWmAmlaJIfywvowodv8cP70yQxWqz93VomWvVUfJXhF6ylomzYN+gtLqjueKATWznf2d8pQ63g6p9j7p5yVJUGGZQCbuepS1Y3WUhSkf1EHrA233O+ZRK3YP6XDS75WnGkBEr/d/LrkzyYxlHX1UNFYaOay1I5cRXPJ9n2AVkmmZX8wyKxoCvAjwVZWaHoQWSZxNaDQ4YaEh14JK1JBnkpDQUDmgwVq1M0iY+aNlLg4VIMlFz6pVk3jcLk/CZfxMpH7ZkzYkL41vFlzG4lpFnQYoCCb3dPTZdAzg0EdtMy/Sk0X3Bn3dJzz+S2S4RjcLRHgy9hI5YeSVhFksruirWsbryb1WXIWjkjUIlMc/WVN17457onNpNQI2u7bebtoRopIox3gx06Afb3u5f0r7fUus+/1jWwoI8H73ES/RqpL2zXwXh9Ks1+5gFD1TDNkQn98Ia717DKwWoqZtjiJ+thY5Q3rgfLhgzJxRXm+XWDDSIVFdviyFB6m8U7/51xKME7ll5Tx4lVrwhMjFkfJj1TbOlnuvEiVrn4/9XDqo8= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/scripts/windows/direct.py b/server/src/uds/transports/SPICE/scripts/windows/direct.py index 39d9047f..b76b8c41 100644 --- a/server/src/uds/transports/SPICE/scripts/windows/direct.py +++ b/server/src/uds/transports/SPICE/scripts/windows/direct.py @@ -7,14 +7,14 @@ import os import glob import subprocess -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore # Lets find remote viewer # There is a bug that when installed, the remote viewer (at least 64 bits version) does not store correctly its path, so lets find it "a las bravas" extraPaths = () for env in ('PROGRAMFILES', 'PROGRAMW6432'): if env in os.environ: - extraPaths += tuple(p + '\\bin' for p in glob.glob(os.environ[env] + '\\VirtViewer*')) + extraPaths += tuple(p + '\\bin' for p in glob.glob(os.environ[env] + '\\VirtViewer*')) # type: ignore executable = tools.findApp('remote-viewer.exe', extraPaths) @@ -28,7 +28,7 @@ if executable is None:

    ''') -theFile = sp['as_file'] +theFile = sp['as_file'] # type: ignore filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/SPICE/scripts/windows/direct.py.signature b/server/src/uds/transports/SPICE/scripts/windows/direct.py.signature index ad57f3c9..c97163a7 100644 --- a/server/src/uds/transports/SPICE/scripts/windows/direct.py.signature +++ b/server/src/uds/transports/SPICE/scripts/windows/direct.py.signature @@ -1 +1 @@ -CVmFltgXbShVc/gO64FfdFJU7BzxnSs+I6MjMpDk/dm3U+mdPNC/4uVe0ZX/+uc13dUSYzqTMKfuU3dnee8eh03WLIvOHlzs0k1ApQiIj6zaWYpQcjmyTzMbiADykN+JTzy37aQDu0kANuYWePqqNWGruWFwNul4kHCVjvRzvXnSxmLYAleIg4yMUABTRou3AIMAeAaW6oUBqKEvLdQz9z+Iu83DzX8l6MW/okR9DgaMiiqbamJKs4lyE/qXcIC5hegcV2/KcWWKt4FEoHbpnat23u6gg6Bmfri4kC66CiIrD5U2HmWK/6EkdmbrJxVglBF8RmHX7f6wpW20xD3rlw9SL+k01p1QN77Xu7kiHj+uoFi6jl7MYnA02/PVw6Ke/lBx0fFLAdd1KCj5VqEIhccU+k37VEcGPKW3GbTAinZ2yvkzo4rL8uFRnNTQ/ClWfaPV32BRfAoXCPO1yiZxy498uVa1QuKcCQnCrC7X2ZgwEacsePUY+0zHuaBCNqdlHRFsXCwNiwGjETuuCNJmVtzGfOrhaSlHWUdxWOCNpY10XwmIw2s3BL/5T5N0Adh08N5ozI9lbzHUHngj78B9kfTrZDIXR2lJBBQ7CQGN++3iLAd6IlVD8eNwRk39FUQyp/OxMyzrBS1R8O/nIgTK0j68fpU2y3vLxh9pELo2gCw= \ No newline at end of file +eziVaJ6nCWndvYbDpD483QpNFA375Y9FB4lSasUZxJocIW9zjbF4082o+XMPbz/SSO9/6KlSJnZfABVJNFoPWETkf55ryHvzPj6AwNUtWkR/UZQLT4k/RZ8DPz1/r1Boha4A3nxRpuwMbsSy7z4rmg7HKQpwsyD/0qu8Rc0+YmhT14N0Jqkhh4aIISIKiwdUD6+6y6yq9iRPDoL0UJXeEBLJNOJGJk0jBV5YNwcYVoabiTthh4vPnaSzWE45GqJrFe9fX92pnM/3wVDL0Wld67Br5SAwxlKEeucveZedbLwYbAnL/cv0WHkqWC6+o4ahPlXobVXIGtd3mHeiwrNn9SVBnk/fQpeMHN/wwqIs/9VArvOKRcuaMrGR2U3slRwIpWODGTN2DHIHwZ1s3ghIfgm/REC7Q33pz7/pAQ0LthjJ77H41rePMig6aaO8yWhTuEk4K0XHJVq5fHaDAWCTvUdUiuRQuEjjJOhC8wSE0uMjCJ9hARVk+66xbrgllgbQwnDlmLVeA61+DQo6ygOCpqrHDlRFyPjVUvBThSehYM/eyUXY+Rsf9YLNx8FfCZQxmyUvb4r97EtCKadyDecumS/KHgeyA8gbosJLu2nNeHDYgOAFX5fewOt0leUHsqNTMpVznSMOFjO8wIv/XAJsfjkCkct0HVYVW3erQ2FVWyE= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/scripts/windows/tunnel.py b/server/src/uds/transports/SPICE/scripts/windows/tunnel.py index 0277df67..3a5a487c 100644 --- a/server/src/uds/transports/SPICE/scripts/windows/tunnel.py +++ b/server/src/uds/transports/SPICE/scripts/windows/tunnel.py @@ -7,15 +7,15 @@ import os import glob import subprocess -from uds import tools # @UnresolvedImport -from uds.forward import forward # @UnresolvedImport +from uds import tools # type: ignore +from uds.tunnel import forward # type: ignore # Lets find remote viewer # There is a bug that when installed, the remote viewer (at least 64 bits version) does not store correctly its path, so lets find it "a las bravas" extraPaths = () for env in ('PROGRAMFILES', 'PROGRAMW6432'): if env in os.environ: - extraPaths += tuple(p + '\\bin' for p in glob.glob(os.environ[env] + '\\VirtViewer*')) + extraPaths += tuple(p + '\\bin' for p in glob.glob(os.environ[env] + '\\VirtViewer*')) # type: ignore executable = tools.findApp('remote-viewer.exe', extraPaths) @@ -28,31 +28,28 @@ if executable is None: Open download page

    ''') -theFile = sp['as_file_ns'] -if sp['port'] != '-1': - forwardThread1, port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['port']) +theFile = sp['as_file_ns'] # type: ignore +fs = None +if sp['ticket']: # type: ignore + # Open tunnel + fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore + # Check that tunnel works.. + if fs.check() is False: + raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') - if forwardThread1.status == 2: - raise Exception('Unable to open tunnel') -else: - port = -1 +fss = None +if sp['ticket_secure']: # type: ignore + # Open tunnel + fss = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket_secure'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore -if sp['secure_port'] != '-1': - theFile = sp['as_file'] - if port != -1: - forwardThread2, secure_port = forwardThread1.clone(sp['ip'], sp['secure_port']) - else: - forwardThread2, secure_port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['secure_port']) - - if forwardThread2.status == 2: - raise Exception('Unable to open tunnel') -else: - secure_port = -1 + # Check that tunnel works.. + if fss.check() is False: + raise Exception('

    Could not connect to tunnel server 2.

    Please, check your network settings.

    ') theFile = theFile.format( - secure_port=secure_port, - port=port + secure_port='-1' if not fss else fss.server_address[1], + port='-1' if not fs else fs.server_address[1] ) filename = tools.saveTempFile(theFile) diff --git a/server/src/uds/transports/SPICE/scripts/windows/tunnel.py.signature b/server/src/uds/transports/SPICE/scripts/windows/tunnel.py.signature index 88d4e94f..37291596 100644 --- a/server/src/uds/transports/SPICE/scripts/windows/tunnel.py.signature +++ b/server/src/uds/transports/SPICE/scripts/windows/tunnel.py.signature @@ -1 +1 @@ -WxhSxSYZISZNlj+Slprz8cdzstKFghx3zuQXdMmakzg5mLDyetwR9cSdWRkYd9vcP8j6aeufbK1io4rwvsdxu+7jRLSL9GVwB+MbIQYrBZ7RbiA2hqWhzQ/LCncSL73Jq9jZtt3i2pgWyA691z8UUbpts6wimsn6cDXQtEHda7MOFIi4Nzlzjf8AMpPTCkPldIDiXhyH+nuCXdzpOY32Gvrq8w6eTQrUWF8dswa1er0SQJENc2StEh9Tt1378QwTBtPQNgyop++sv/FhLdDB8hBQliX5LX7t9NxzZcvyFBYHqFnfXEsYc2bWWkt264CWfULREPLRQK11UWZ51ldvY1+xFOEg1eGAna8nWhapZ9R5DagSfehokpAov30Y0PwjTx5MGxiubd0gMeP4Vr2YZ77qBb5JnPKplEH2VsHS7TRgJyKNf2xI9Yw80iGSrO8LUC6L+9+cLDACyrmFINUA/2sFbRLjqdogY7CREIMzP07DUOluEcNgMnPLBKrTZ5U9nxnwgdgptLZgDNJHagitAiW5zMS10lEnJKRLZ0zVgWdiFna29SB7o75jO5M0LA+adIOzRH4G0C5vFYiiMVwsfLhqT3nUvaacTMLslFxWbr5T4QxWJkuLNjIMypw0cOzSaPsXW1tuZXwL0CjgnXDat7iNFQZCzEDQuoDaGDWvYpE= \ No newline at end of file +LNhHPgRKio48GqUpYgPIokcVEV6XHf/I17eSLSNabQ34QWiZybvlq2O7Gfztdag+1Zvig5urzFVbjuOfR3kIWAlt6hDRBo32cOveMngzUNnZfrpfehmMiFoCD91+/R/lXNm6x/fSpisbnThDejzk5vnG/xUZEls9qazSJLvpgRYR95IJxoArkhUMrAhkK7n0/0RDGQmhNJV50TYYYlnRcXCzeRaOJcReK1JkuovVHGFwTDDiLYa/irr5gWZqIhCgIzW7yGHeQGMAUoJkgPXexV9mWjMPIRbx3rBnPhtOJnywyILN+HQZ6SU2lsvGZMQQ2d/4WAZ+uP0k7CNS/81Cm6PZAL3LpnZ0zfszcWaAAF4rLbkimm1aKUXHoUwWkXfxjxodlQRXD3oE/jnTuMucl8WLUNnP7AwH5VQNxVTn33EoE8C3jRR5LcjL1ut7qSPno7Lf/UW2Yx1GGOCR0GLtuB5OPq0cIRjdqckibkL4jXRMX7QsXnh5uEYG+wih7gohzdcprFnhzQjFy4esQsKXqWTSaMgBVtUMOSGHylsQAps1j7Co6EGCMu/g7jrevk0f9T8moETA2fRPEmdV2Md/DFezsP2a042g8Git8llLGtibq329K/XAwC2mAwN768BHVu+WlZQmYcyz7iEU/tR9Dxq7y05ljiOCgAS4oK8ucQE= \ No newline at end of file diff --git a/server/src/uds/transports/SPICE/spice_tunnel.py b/server/src/uds/transports/SPICE/spice_tunnel.py index b66f4c97..672e0050 100644 --- a/server/src/uds/transports/SPICE/spice_tunnel.py +++ b/server/src/uds/transports/SPICE/spice_tunnel.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2012-2019 Virtual Cable S.L. +# Copyright (c) 2012-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -57,15 +56,44 @@ logger = logging.getLogger(__name__) class TSPICETransport(BaseSpiceTransport): """ Provides access via SPICE to service. - This transport can use an domain. If username processed by authenticator contains '@', it will split it and left-@-part will be username, and right password """ + typeName = _('SPICE') typeType = 'TSSPICETransport' typeDescription = _('SPICE Protocol. Tunneled connection.') protocol = transports.protocols.SPICE group: typing.ClassVar[str] = transports.TUNNELED_GROUP - tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB) + tunnelServer = gui.TextField( + label=_('Tunnel server'), + order=1, + tooltip=_( + 'IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)' + ), + tab=gui.TUNNEL_TAB, + ) + + tunnelWait = gui.NumericField( + length=3, + label=_('Tunnel wait time'), + defvalue='30', + minValue=5, + maxValue=65536, + order=2, + tooltip=_('Maximum time to wait before closing the tunnel listener'), + required=True, + tab=gui.TUNNEL_TAB, + ) + + verifyCertificate = gui.CheckBoxField( + label=_('Force SSL certificate verification'), + order=23, + tooltip=_( + 'If enabled, the certificate of tunnel server will be verified (recommended).' + ), + defvalue=gui.TRUE, + tab=gui.TUNNEL_TAB, + ) serverCertificate = BaseSpiceTransport.serverCertificate fullScreen = BaseSpiceTransport.fullScreen @@ -76,34 +104,52 @@ class TSPICETransport(BaseSpiceTransport): def initialize(self, values: 'Module.ValuesType'): if values: if values['tunnelServer'].count(':') != 1: - raise transports.Transport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field')) + raise transports.Transport.ValidationException( + _('Must use HOST:PORT in Tunnel Server Field') + ) def getUDSTransportScript( # pylint: disable=too-many-locals - self, - userService: 'models.UserService', - transport: 'models.Transport', - ip: str, - os: typing.Dict[str, str], - user: 'models.User', - password: str, - request: 'HttpRequest' - ) -> typing.Tuple[str, str, typing.Dict[str, typing.Any]]: + self, + userService: 'models.UserService', + transport: 'models.Transport', + ip: str, + os: typing.Dict[str, str], + user: 'models.User', + password: str, + request: 'HttpRequest', + ) -> typing.Tuple[str, str, typing.Dict[str, typing.Any]]: userServiceInstance: typing.Any = userService.getInstance() # Spice connection con = userServiceInstance.getConsoleConnection() - port: str = con['port'] or '-1' - secure_port: str = con['secure_port'] or '-1' - # Ticket - tunpass = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _i in range(12)) - tunuser = TicketStore.create(tunpass) + # We MAY need two tickets, one for 'insecure' port an one for secure + ticket = '' + if con['port']: + ticket = TicketStore.create_for_tunnel( + userService=userService, + port=int(con['port']), + validity=self.tunnelWait.num() + 60, # Ticket overtime + ) - sshHost, sshPort = self.tunnelServer.value.split(':') + ticket_secure = '' + if con['secure_port']: + ticket_secure = TicketStore.create_for_tunnel( + userService=userService, + port=int(con['secure_port']), + validity=self.tunnelWait.num() + 60, # Ticket overtime + ) + + tunHost, tunPort = self.tunnelServer.value.split(':') r = RemoteViewerFile( - '127.0.0.1', '{port}', '{secure_port}', con['ticket']['value'], - self.serverCertificate.value.strip(), con['cert_subject'], fullscreen=self.fullScreen.isTrue() + '127.0.0.1', + '{port}', + '{secure_port}', + con['ticket']['value'], # This is secure ticket from kvm, not UDS ticket + self.serverCertificate.value.strip(), + con['cert_subject'], + fullscreen=self.fullScreen.isTrue(), ) r.usb_auto_share = self.usbShare.isTrue() r.new_usb_auto_share = self.autoNewUsbShare.isTrue() @@ -112,11 +158,13 @@ class TSPICETransport(BaseSpiceTransport): osName = { OsDetector.Windows: 'windows', OsDetector.Linux: 'linux', - OsDetector.Macintosh: 'macosx' + OsDetector.Macintosh: 'macosx', }.get(os['OS']) if osName is None: - return super().getUDSTransportScript(userService, transport, ip, os, user, password, request) + return super().getUDSTransportScript( + userService, transport, ip, os, user, password, request + ) # if sso: # If SSO requested, and when supported by platform # userServiceInstance.desktopLogin(user, password, '') @@ -124,13 +172,12 @@ class TSPICETransport(BaseSpiceTransport): sp = { 'as_file': r.as_file, 'as_file_ns': r.as_file_ns, - 'tunUser': tunuser, - 'tunPass': tunpass, - 'tunHost': sshHost, - 'tunPort': sshPort, - 'ip': con['address'], - 'port': port, - 'secure_port': secure_port + 'tunHost': tunHost, + 'tunPort': tunPort, + 'tunWait': self.tunnelWait.num(), + 'tunChk': self.verifyCertificate.isTrue(), + 'ticket': ticket, + 'ticket_secure': ticket_secure, } return self.getScript('scripts/{}/tunnel.py', osName, sp) diff --git a/server/src/uds/transports/X2GO/scripts/linux/direct.py b/server/src/uds/transports/X2GO/scripts/linux/direct.py index 84587265..3bdaa088 100644 --- a/server/src/uds/transports/X2GO/scripts/linux/direct.py +++ b/server/src/uds/transports/X2GO/scripts/linux/direct.py @@ -6,11 +6,11 @@ from __future__ import unicode_literals import subprocess from os.path import expanduser -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore home = expanduser('~') + ':1;/media:1;' -keyFile = tools.saveTempFile(sp['key']) -theFile = sp['xf'].format(export=home, keyFile=keyFile.replace('\\', '/'), ip=sp['ip'], port=sp['port']) +keyFile = tools.saveTempFile(sp['key']) # type: ignore +theFile = sp['xf'].format(export=home, keyFile=keyFile.replace('\\', '/'), ip=sp['ip'], port=sp['port']) # type: ignore filename = tools.saveTempFile(theFile) # HOME=[temporal folder, where we create a .x2goclient folder and a sessions inside] pyhoca-cli -P UDS/test-session diff --git a/server/src/uds/transports/X2GO/scripts/linux/direct.py.signature b/server/src/uds/transports/X2GO/scripts/linux/direct.py.signature index b54fea1e..0668f966 100644 --- a/server/src/uds/transports/X2GO/scripts/linux/direct.py.signature +++ b/server/src/uds/transports/X2GO/scripts/linux/direct.py.signature @@ -1 +1 @@ -Td27A1n4tterDd2/pY/jMBlvZyucmhte0u8aj9KQ2zSGNFXWdKnqmyfes2QY38weBVHEiI71jMopKsrZ3NGefFkvHODTFmiyA6gtzNZkO3ux1QEioPfP8BrvY0IjMrrmvlAOb3OSF3hCqGcWbbM2F3U6wdGmWirRmThN2FUSgTaOW0ITffKcPE2Fc8CHXDMGgvjloyP01KXy3M72DMR5Ir/Yj5RmumfvHLhi8/nsXz/jHjCLYxoSi3rOHTterH41/axT3cFIE4nVZIFSegx85mJ0JZRFcTL6dUx1b9FC/7iw8H5fuutkcCi/3gEL1j1tsD0juWT+36QPpH7SrT/TM2H2T+dlaZ9DxlRn+EaWwcW8olfygtNjpqOOspGLMSnI3c1cZeS4QGegCaeYK6xeOpmsF0qh+1J4ctu/GA/0hMJ3Cv+mSQA5w4B9uGWj7p8K4Z2rMpIB+uZouijDNe8J+wj4AMttFUypkZBX+oa+33uQDasM2AZSG2247AqRqLcAfNj3m3I9LGqW85V45ytbcmqfQGTfE8mO3FAl0o2aivHi1KUgZQrze06pYJi/C1K9quqV9Pq2XntJPJsM8LzUuIWZrfesCge6h7w1i+CCos3L3MxHu8S9jU/uFeeXWHS1wwYkTghw3DFcZu0bGQilZa2XM6ITwxiVtyFaucHFPwU= \ No newline at end of file +FDUIODILNyuC5PSK/2BNLgcenZ3xdaMw1UPAvwWc1hG93v7MtKNptbSOkSsMEh9/0dlME0+icUvj46aUbuflemQ+36gUVELdd+7e8aP+J0jLhHpBKHl4QGYcRGJv8u9VnmfSIQGJfFRatyVMEFNCCl+81lmRwKYq+2qP0nS5ufbcjQLd4cfQEgXpiTJsW69jENIc5/TgifLhCsaoL3y2vln4pq5VXTWlBTNYAyNOV/BiBgdPvLlPmIdD+wLrZ1gJ+Bzk+QjENdeBfhZE8N6DthjCTn1FzLcG00q7rlL0qo37J1TKojXe+CkuWoOPXXuBfGfzWTnrF7CdVl9kPb4jb56FHUa69nFp5+3ISH3tKlVQjsXekv/XezQWRihRze9wXJAb1lP2qxRJrkMPmI1iRa3ie1YSuxzbnpuysFkuTg8rl23cYLFyWRy/zdokJAdX9FC5b1KsFZ3slGI4iy1Q9WEIrNuFTvgZCE44V4HgP7IwadfMceF/RKOUs3L8Y1JAktqhe6bWjt/7e+ZLz0hIgoRj+OqCEkfp7xqp9eYNGTscUfQRcrqjN73786l34NNqYeWBkTnJNBcgZrp5NnKF3avzNDnMHTRnCZSSuGzKcXDP+UXdI2EUlk2oWQ0cZpuXe4JKH6fvWqtZ9E+TpywVMp3JEtlFZOmao+KKIst8Wdw= \ No newline at end of file diff --git a/server/src/uds/transports/X2GO/scripts/linux/tunnel.py b/server/src/uds/transports/X2GO/scripts/linux/tunnel.py index d101f43d..3419f1cc 100644 --- a/server/src/uds/transports/X2GO/scripts/linux/tunnel.py +++ b/server/src/uds/transports/X2GO/scripts/linux/tunnel.py @@ -5,20 +5,21 @@ from __future__ import unicode_literals # pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable import subprocess -from uds.forward import forward # @UnresolvedImport +from uds.tunnel import forward # type: ignore from os.path import expanduser -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore -forwardThread, port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['port']) +# Open tunnel +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore -if forwardThread.status == 2: - raise Exception('Unable to open tunnel') +# Check that tunnel works.. +if fs.check() is False: + raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') -tools.addTaskToWait(forwardThread) home = expanduser('~') + ':1;/media:1;' -keyFile = tools.saveTempFile(sp['key']) -theFile = sp['xf'].format(export=home, keyFile=keyFile.replace('\\', '/'), ip='127.0.0.1', port=port) +keyFile = tools.saveTempFile(sp['key']) # type: ignore +theFile = sp['xf'].format(export=home, keyFile=keyFile.replace('\\', '/'), ip='127.0.0.1', port=fs.server_address[1]) # type: ignore filename = tools.saveTempFile(theFile) # HOME=[temporal folder, where we create a .x2goclient folder and a sessions inside] pyhoca-cli -P UDS/test-session diff --git a/server/src/uds/transports/X2GO/scripts/linux/tunnel.py.signature b/server/src/uds/transports/X2GO/scripts/linux/tunnel.py.signature index ec8f29ec..9d414085 100644 --- a/server/src/uds/transports/X2GO/scripts/linux/tunnel.py.signature +++ b/server/src/uds/transports/X2GO/scripts/linux/tunnel.py.signature @@ -1 +1 @@ -CnCqJRFLyii+jk4neecfXQ1tK3pKsdJ0b4z6XmLKPSLtzP+mMyrr5EK7RStN02KwvRhLwuXoH3lSp6ydGSwGtnRn44E6V2wIHkb/2dm09guR/KlTw21uBVabyYvH62yRjs54il0gL6YmTku3qWA7LeEEg7YuSxtXuNUgyEx28B1sTNBnW9E/FjIUSYF7vPgxiUaSbntmPvQehuqgaYKREtfVyB8cbTctqaJhz7sUtcetu461N9me4Lz7dxqAA3aAI2N1JV5QR/ATJAx29VuH0pG7iqhaXGe+K9oNbQyaS4sNIGHX+u/WR5a/ngr/m0llIcewHu/WxrAnSJLv6e+4+xpB5NQko0HR42cG6hy+IsaGMpid9Ubwilje1w+R0jWVZr3Xt14NnJKktysNhqLTEWw/hoCaJThJhzvEtM8B4H9Um65lPXGwTgvi2S71Hlql+IVJqxoj4DGdC7emU+MtwdHc3H4/YyCJC7X27PA1Hnmvr+BIjciQZC6BjuCyyppP3DozplmptAs0+FVZZs8BvJSsqm0pnFI5NM5Tf1WF/56JxBaAz0u4ugEwx4w/JnxorrydezOmP/xADIjFY3Xh7fkAGg1a48+WFGB+gpmXohbHnR8u4tnY30gnkCUqoJe/ZVJuK2Wyzs+8508+1A7ztTUGamZjhQPoXIrn0EDA5bs= \ No newline at end of file +OQ3g4Z39LoR6k8LseDP2Kktk3QCj14WeJ7RlqLcyXN5QXJTdu86lKQhLHapS4GUX9apcgcF1I+o5NyPeXoE8iXBQr0456Cz6k+O35jzlwrO1BXPby9bWEuUwlXvyQuHPY9wThQA++jWiKDV9UD5UC+BHP3BWWZVj1aVEunHJa2uqnMLQMVb63vIndclQXJcLXNuQk1v2jD6f2INxG0iojzfxJ95XrCN5OjgfhStimuFC3dCjm1shq1vSgpPVgampzMYO8ViJCzIk9dg6UKO+aWUmd617wRf0ZHJvez2Oerc8PDu/uYKSjPOChUapvkWRX84S8Ydn/4wUhUK9TKQt9iIBW4HOCVxB8gzX1fZwu5LqEii5f/LJWybFgrh33eJIBBJDyUU0Y+fp9IS8ayvOnEj1xONNTKpo0ZO407H1yTjcwoWAhT9Uob2BaMxCk90qy/OTN6mjtYbUvgKayUkV3OhbbSS8B/+t/wpyk2N6w74Qx2SqB5EqNIZT82raz4QM/Rggjq2im2F3gWwKUMkldt4u0Zf0qt6x8ov8qr/xeVuP+lUfnHJyYXvIOyUI6QZmdTem+lIATs/0a/Dp02yb+khW0TyDc3kc6F3Igf32PzleCiwXVkKfC/QZzKTLPPjaRZL+vEWu0tfh9qOZAutSRzs5nCuhIbvmnH19sbvBr4w= \ No newline at end of file diff --git a/server/src/uds/transports/X2GO/scripts/windows/direct.py b/server/src/uds/transports/X2GO/scripts/windows/direct.py index 20223156..0a7046fc 100644 --- a/server/src/uds/transports/X2GO/scripts/windows/direct.py +++ b/server/src/uds/transports/X2GO/scripts/windows/direct.py @@ -7,12 +7,12 @@ import os import subprocess from os.path import expanduser -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore home = expanduser('~').replace('\\', '\\\\') + '#1;' -keyFile = tools.saveTempFile(sp['key']) +keyFile = tools.saveTempFile(sp['key']) # type: ignore # On windows, the separator beween active and not is "#" -theFile = sp['xf'].format(export='c:\\\\#1;', keyFile=keyFile.replace('\\', '/'), ip=sp['ip'], port=sp['port']) +theFile = sp['xf'].format(export='c:\\\\#1;', keyFile=keyFile.replace('\\', '/'), ip=sp['ip'], port=sp['port']) # type: ignore filename = tools.saveTempFile(theFile) x2goPath = os.environ['PROGRAMFILES(X86)'] + '\\x2goclient' diff --git a/server/src/uds/transports/X2GO/scripts/windows/direct.py.signature b/server/src/uds/transports/X2GO/scripts/windows/direct.py.signature index 5cece95b..79ae0b9c 100644 --- a/server/src/uds/transports/X2GO/scripts/windows/direct.py.signature +++ b/server/src/uds/transports/X2GO/scripts/windows/direct.py.signature @@ -1 +1 @@ -LuB4norDe9e4uHcdO158ENqlTNC9Wyp3xE7p/usaTGkJiQ8xgEbojPpXlJcbL9ovhRdcbkM499iJ8+tpd2XNNPkq3kEa3yy8ZbfKQWvcoDArJsi3MaWsTBfL48BpsPAwpgFgXwTNYLldWJ2uOp1RJijfNce1zD3NdC6JEWsewwoR0H+BjfHGHHvFtXSx5No35onSGS3g3Y1igmkg9/6GEqmANHCNyfegyFHIfaDJZwynm19Fk4A7ZQIY3PTq/kxWq5PXaVcHB6nC0UJBXHsEXePBFek9zaKViWiA5ZFlGYiaqKp1dj87QDEuwJ7GWrktDBRrbt8ZARAV/odhozx14V0Uxh6IiSvNUECb1pJ76H/Nqm1oQW3eRnWXZHjgN2rfsL9+988AZymJluC9acNcPHZw6TjaWksGrCu2qSIYAc62dxHSOJlov6/4/AqDPdmj2VSO8yRrmLkjhmlAZ1mcH29s8E1tw0HpBjPPiFRN+Hw4PCXdI3Qm5TkTbpWWYX14rm5u+KoNviUi1G0r9S0ZVM0e/xtUa9WKuOwUs81D3vHrAzgjHRGL7MaUWgXNHb1dB7SpogGsPmV05r4FMrZ9ip4qdVgM6391oETGzc+kWrWn6U8/Hm/N7aiUF19ipDN3U5ICiOMfeQqwb3oHJyvyoZUR2+x0q95FFND7O/gx0mg= \ No newline at end of file +HW48ZI/UF5SKfE5vTqyfKKOm2CZDoRVPyrJrmL2z6B9kuBQMB+o4T6RYsOPYMNQaII7ynG2YTSwfrFC3vQ5qNcWQtYbED0oRxGVW8Vl+sxFW3AvIcxhC3LMcO6+sRr5MUA5E8gGAq01AWbIE/lXBF8n/jovqT6sv1mApBQ3qlBwPq+YgqsvKdOXsNKWcZCc7Ig9xPGvVAQwSyiQCUUfyw2zk4l1LlAEklKpOcjy4c19dmO6wiU4ZWB3UZdMbu1vFRVMHTcKe5r/I0yUgB/2OcylniCvqM4+10OJAZKIEsK+mHz7+hF1rbBdey4qlXgUGtnCd5YLfctp6+lpsqr/awgl0h3BPRz+uPUMEQWqPxnqKMsP6sLrz4WJYnqP4yFnlUJKNqt1XZShMrzCz7VkT91RWHrIi7Mzz+QVlpC+PZS+0c2APiU1yfTPeXaaLKOQYjcKwHtFc4wZOJquwRbYFQbf/g/33zkRcmRQEueli6AHqKwxhpOPyuunNgY6itoS+PNIvyHK/xURrsao3kO7RhDavBOIiWiaIpvsaDCYPdpGTtgD/yVjlAMQnvQMqPUhg8Gxjxc5h3KaNNMJrLjFjXicY9Xh5P3sx0SgJKUxvg3UdYgyJHlNNLa5dJBQSEUfiP6zzX88w2h73rMP+BE6u1Yv0YsSY3967ctLMRO2/fWA= \ No newline at end of file diff --git a/server/src/uds/transports/X2GO/scripts/windows/tunnel.py b/server/src/uds/transports/X2GO/scripts/windows/tunnel.py index fd7260fc..8dc404b4 100644 --- a/server/src/uds/transports/X2GO/scripts/windows/tunnel.py +++ b/server/src/uds/transports/X2GO/scripts/windows/tunnel.py @@ -6,22 +6,22 @@ import os import subprocess -from uds.forward import forward # @UnresolvedImport +from uds.tunnel import forward # type: ignore from os.path import expanduser -from uds import tools # @UnresolvedImport +from uds import tools # type: ignore +# Open tunnel +fs = forward(remote=(sp['tunHost'], int(sp['tunPort'])), ticket=sp['ticket'], timeout=sp['tunWait'], check_certificate=sp['tunChk']) # type: ignore -forwardThread, port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], sp['port']) +# Check that tunnel works.. +if fs.check() is False: + raise Exception('

    Could not connect to tunnel server.

    Please, check your network settings.

    ') -if forwardThread.status == 2: - raise Exception('Unable to open tunnel') - -tools.addTaskToWait(forwardThread) -# Care, expanduser is encoding using "mcbs", so treat it as bytes always +# Care, expanduser is encoding using "mcbs", so treat it as bytes on python 2.7 home = expanduser('~').replace('\\', '\\\\') + '#1;' -keyFile = tools.saveTempFile(sp['key']) -theFile = sp['xf'].format(export=home, keyFile=keyFile.replace('\\', '/'), ip='127.0.0.1', port=port) +keyFile = tools.saveTempFile(sp['key']) # type: ignore +theFile = sp['xf'].format(export=home, keyFile=keyFile.replace('\\', '/'), ip='127.0.0.1', port=fs.server_address[1]) # type: ignore filename = tools.saveTempFile(theFile) x2goPath = os.environ['PROGRAMFILES(X86)'] + '\\x2goclient' diff --git a/server/src/uds/transports/X2GO/scripts/windows/tunnel.py.signature b/server/src/uds/transports/X2GO/scripts/windows/tunnel.py.signature index c5ce2bc7..094b302b 100644 --- a/server/src/uds/transports/X2GO/scripts/windows/tunnel.py.signature +++ b/server/src/uds/transports/X2GO/scripts/windows/tunnel.py.signature @@ -1 +1 @@ -pKLTspUmlmfjY7Ei6aiNFtCh+8mQ8TkZztS7D/kjGRj25FxmfG5Y0HMOdlu8kouiLTAwkzpyj+J+GjebWwcPCJv7hFJ8kWFJ7XaX8b3uX8BREq+G1p4UYSiZDM7qSaPviM9VFoTLNwRa+yBknbyosLBRCpesKSbaUlis9tsAHByU98peQ0QSOrrUvfFBIl5EUzx+frgKTS67tCNGJ+L4POOnOakKNoqDYiJ0z4/S4vMC2w/JQ1OxZPgXsyPRAwM7KqCOA5zhzB1Pjucoj9lfZvJz8T7DDpX05eN8dUU0dsgUZHKbm92Tn6MnMDpNbUH/CIIeQMfbBThTNlr2vvYYzdAjbpNlg4R4s10RCfIWb0Tqfvu9jRs/8dUOMkfOZSbv3DVukXIadQt1ednzbagBXoMPE3jiLe5OKQqAg4LFcU9vm1HJB/EIenpeCo/Oxmytb6VLatl5RF4COwC0WfFAZoku9qXW6BFzTWhGMGkzuXYS0C8rnDb1m53DBXNp3aPkVJ8ktoDCQ4fWbb9YDFZ2GNDVt5QppyizkblvbQoy4gVxPXlo+aPc9b92/hKmMha9RA1FByhDB7Lzx4a0iYZicv3LjX3N/VPvrTGpmfeiSDovqMWfBR9au3qneNmndxM4LnXL6wbyVyfeJey6XRIshRAE+gWlz9Ew1vzD0llnfN8= \ No newline at end of file +mYksg6meXqkKrrIES6xDkYeWsb78ejjJqA7EV7H3OgExs3gpxYr35fJR5IpVKrxUu1uT3mZK8PqmQ2ZA4beZkB+1IqdOZk5OWBpm4a1IGzU+KsPsCw+F1auvizJioZtM2JaG5FSSuskzu/Gflm1/akq3F4Ttkv0+Jt6daiEOnXioO0I+Jiv/fgaaI2DVDl2kc6bcPP+A/oS/cLO7RVrjLf+rcIeK1sUrhLhwhtD/8NyN/5nP5Xfq4jjNxEl2SFQZC3SUyXDfWY2LhbSt24O6rkYG9WkX/eNUwGK0ojdX4jdPlRq3gsu2rlkhIW91IBOztGoWZRWOi0vkqWODQdd7uTHA0Wrbi+5YZb07gv4K4r1TFPTEVWjEiY/xox3fZIJYhSIbGxFZXd9LlVOhpZ8Q2tEME/18rjDxuEsr5AdBihv9JEvsYIwfjHoOY9a5LK7FExnTWwEHlzscQ7f3sq9CihT3QnAwKBhqp2hQbZxT/28SAQF+0JAehWCSAi6hCk3ZYs3US5SmPcm32jwsHxh93Ae64Vfm1R/HA/QH9J1EEVA0pVS0H9H3mCAaPz2qq/oLLnXh5qbsbrXKFl/2pi3haYhGR0FSxbG625d7ZoAVTFrF8BMFErWerQjx9X9UDftbf5moBJZiTyk2cwnCnG4Q3DDddukudKiLwPzEnHaN1Zo= \ No newline at end of file diff --git a/server/src/uds/transports/X2GO/x2go_tunnel.py b/server/src/uds/transports/X2GO/x2go_tunnel.py index 86d12d7d..2ba654bf 100644 --- a/server/src/uds/transports/X2GO/x2go_tunnel.py +++ b/server/src/uds/transports/X2GO/x2go_tunnel.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - # -# Copyright (c) 2016-2019 Virtual Cable S.L. +# Copyright (c) 2016-2021 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -60,12 +59,43 @@ class TX2GOTransport(BaseX2GOTransport): Provides access via X2GO to service. This transport can use an domain. If username processed by authenticator contains '@', it will split it and left-@-part will be username, and right password """ + typeName = _('X2Go') typeType = 'TX2GOTransport' typeDescription = _('X2Go access (Experimental). Tunneled connection.') group = transports.TUNNELED_GROUP - tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB) + tunnelServer = gui.TextField( + label=_('Tunnel server'), + order=1, + tooltip=_( + 'IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)' + ), + tab=gui.TUNNEL_TAB, + ) + + tunnelWait = gui.NumericField( + length=3, + label=_('Tunnel wait time'), + defvalue='30', + minValue=5, + maxValue=65536, + order=2, + tooltip=_('Maximum time to wait before closing the tunnel listener'), + required=True, + tab=gui.TUNNEL_TAB, + ) + + verifyCertificate = gui.CheckBoxField( + label=_('Force SSL certificate verification'), + order=23, + tooltip=_( + 'If enabled, the certificate of tunnel server will be verified (recommended).' + ), + defvalue=gui.TRUE, + tab=gui.TUNNEL_TAB, + ) + fixedName = BaseX2GOTransport.fixedName screenSize = BaseX2GOTransport.screenSize @@ -83,18 +113,20 @@ class TX2GOTransport(BaseX2GOTransport): def initialize(self, values: 'Module.ValuesType'): if values: if values['tunnelServer'].count(':') != 1: - raise BaseX2GOTransport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field')) + raise BaseX2GOTransport.ValidationException( + _('Must use HOST:PORT in Tunnel Server Field') + ) def getUDSTransportScript( # pylint: disable=too-many-locals - self, - userService: 'models.UserService', - transport: 'models.Transport', - ip: str, - os: typing.Dict[str, str], - user: 'models.User', - password: str, - request: 'HttpRequest' - ) -> typing.Tuple[str, str, typing.Dict[str, typing.Any]]: + self, + userService: 'models.UserService', + transport: 'models.Transport', + ip: str, + os: typing.Dict[str, str], + user: 'models.User', + password: str, + request: 'HttpRequest', + ) -> typing.Tuple[str, str, typing.Dict[str, typing.Any]]: ci = self.getConnectionInfo(userService, user, password) username = ci['username'] @@ -120,13 +152,16 @@ class TX2GOTransport(BaseX2GOTransport): rootless=rootless, width=width, height=height, - user=username + user=username, ) - tunpass = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _i in range(12)) - tunuser = TicketStore.create(tunpass) + ticket = TicketStore.create_for_tunnel( + userService=userService, + port=22, + validity=self.tunnelWait.num() + 60, # Ticket overtime + ) - sshHost, sshPort = self.tunnelServer.value.split(':') + tunHost, tunPort = self.tunnelServer.value.split(':') # data data = { @@ -140,7 +175,7 @@ class TX2GOTransport(BaseX2GOTransport): 'drives': self.exports.isTrue(), 'fullScreen': width == -1 or height == -1, 'this_server': request.build_absolute_uri('/'), - 'xf': xf + 'xf': xf, } m = tools.DictAsObj(data) @@ -152,17 +187,18 @@ class TX2GOTransport(BaseX2GOTransport): }.get(os['OS']) if osName is None: - return super().getUDSTransportScript(userService, transport, ip, os, user, password, request) + return super().getUDSTransportScript( + userService, transport, ip, os, user, password, request + ) sp = { - 'tunUser': tunuser, - 'tunPass': tunpass, - 'tunHost': sshHost, - 'tunPort': sshPort, - 'ip': ip, - 'port': '22', + 'tunHost': tunHost, + 'tunPort': tunPort, + 'tunWait': self.tunnelWait.num(), + 'tunChk': self.verifyCertificate.isTrue(), + 'ticket': ticket, 'key': priv, - 'xf': xf + 'xf': xf, } return self.getScript('scripts/{}/tunnel.py', osName, sp) diff --git a/server/templates/admin/.bowerrc b/server/templates/admin/.bowerrc deleted file mode 100644 index 69fad358..00000000 --- a/server/templates/admin/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "bower_components" -} diff --git a/server/templates/admin/.editorconfig b/server/templates/admin/.editorconfig deleted file mode 100644 index c2cdfb8a..00000000 --- a/server/templates/admin/.editorconfig +++ /dev/null @@ -1,21 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] - -# Change these settings to your own preference -indent_style = space -indent_size = 2 - -# We recommend you to keep these unchanged -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/server/templates/admin/.gitattributes b/server/templates/admin/.gitattributes deleted file mode 100644 index 21256661..00000000 --- a/server/templates/admin/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto \ No newline at end of file diff --git a/server/templates/admin/.gitignore b/server/templates/admin/.gitignore deleted file mode 100644 index af06da03..00000000 --- a/server/templates/admin/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.tmp -bower_components -dist diff --git a/server/templates/admin/.yo-rc.json b/server/templates/admin/.yo-rc.json deleted file mode 100644 index 7a213524..00000000 --- a/server/templates/admin/.yo-rc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "generator-mocha": {} -} \ No newline at end of file diff --git a/server/templates/admin/Gruntfile.js b/server/templates/admin/Gruntfile.js deleted file mode 100644 index 745247a8..00000000 --- a/server/templates/admin/Gruntfile.js +++ /dev/null @@ -1,428 +0,0 @@ -// Generated on 2015-09-21 using -// generator-webapp 1.1.0 -'use strict'; - -// # Globbing -// for performance reasons we're only matching one level down: -// 'test/spec/{,*/}*.js' -// If you want to recursively match all subfolders, use: -// 'test/spec/**/*.js' - -module.exports = function (grunt) { - - // Time how long tasks take. Can help when optimizing build times - require('time-grunt')(grunt); - - // Automatically load required grunt tasks - require('jit-grunt')(grunt, { - useminPrepare: 'grunt-usemin' - }); - - // Configurable paths - var config = { - app: 'app', - dist: 'dist' - }; - - // Define the configuration for all the tasks - grunt.initConfig({ - - // Project settings - config: config, - - // Watches files for changes and runs tasks based on the changed files - watch: { - bower: { - files: ['bower.json'], - tasks: ['wiredep'] - }, - babel: { - // files: ['<%= config.app %>/js/{,*/}*.js'], - files: [], - tasks: ['babel:dist'] - }, - babelTest: { - // files: ['test/spec/{,*/}*.js'], - files: [], - tasks: ['babel:test', 'test:watch'] - }, - gruntfile: { - files: ['Gruntfile.js'] - }, - sass: { - files: ['<%= config.app %>/css/{,*/}*.{scss,sass}'], - tasks: ['sass', 'postcss'] - }, - css: { - files: ['<%= config.app %>/css/{,*/}*.css'], - tasks: ['newer:copy:css', 'postcss'] - } - }, - - browserSync: { - options: { - notify: false, - background: true, - watchOptions: { - ignored: '' - } - }, - livereload: { - options: { - files: [ - '<%= config.app %>/{,*/}*.html', - '.tmp/css/{,*/}*.css', - '<%= config.app %>/img/{,*/}*', - '.tmp/js/{,*/}*.js' - ], - port: 9000, - server: { - baseDir: ['.tmp', config.app], - routes: { - '/bower_components': './bower_components' - } - } - } - }, - test: { - options: { - port: 9001, - open: false, - logLevel: 'silent', - host: 'localhost', - server: { - baseDir: ['.tmp', './test', config.app], - routes: { - '/bower_components': './bower_components' - } - } - } - }, - dist: { - options: { - background: false, - server: '<%= config.dist %>' - } - } - }, - - // Empties folders to start fresh - clean: { - dist: { - files: [{ - dot: true, - src: [ - '.tmp', - '<%= config.dist %>/*', - '!<%= config.dist %>/.git*' - ] - }] - }, - server: '.tmp' - }, - - // Make sure code css are up to par and there are no obvious mistakes - eslint: { - target: [ - 'Gruntfile.js', - // '<%= config.app %>/js/{,*/}*.js', - '!<%= config.app %>/js/vendor/*', - 'test/spec/{,*/}*.js' - ] - }, - - // Mocha testing framework configuration options - mocha: { - all: { - options: { - run: true, - urls: ['http://<%= browserSync.test.options.host %>:<%= browserSync.test.options.port %>/index.html'] - } - } - }, - - // Compiles ES6 with Babel - babel: { - options: { - sourceMap: true - }, - dist: { - files: [{ - expand: true, - cwd: '<%= config.app %>/js', - src: '{,*/}*.jss', - dest: '.tmp/js', - ext: '.jss' - }] - }, - test: { - files: [{ - expand: true, - cwd: 'test/spec', - src: '{,*/}*.jss', - dest: '.tmp/spec', - ext: '.jss' - }] - } - }, - - // Compiles Sass to CSS and generates necessary files if requested - sass: { - options: { - sourceMap: true, - sourceMapEmbed: true, - sourceMapContents: true, - includePaths: ['.'] - }, - dist: { - files: [{ - expand: true, - cwd: '<%= config.app %>/css', - src: ['*.{scss,sass}'], - dest: '.tmp/css', - ext: '.css' - }] - } - }, - - postcss: { - options: { - map: true, - processors: [ - // Add vendor prefixed css - require('autoprefixer')({ - browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'] - }) - ] - }, - dist: { - files: [{ - expand: true, - cwd: '.tmp/css/', - src: '{,*/}*.css', - dest: '.tmp/css/' - }] - } - }, - - // Automatically inject Bower components into the HTML file - wiredep: { - app: { - src: ['<%= config.app %>/index.html'], - exclude: ['bootstrap.js'], - ignorePath: /^(\.\.\/)*\.\./ - }, - sass: { - src: ['<%= config.app %>/css/{,*/}*.{scss,sass}'], - ignorePath: /^(\.\.\/)+/ - } - }, - - // Renames files for browser caching purposes - filerev: { - dist: { - src: [ - '<%= config.dist %>/js/{,*/}*.js', - '<%= config.dist %>/css/{,*/}*.css', - '<%= config.dist %>/img/{,*/}*.*', - '<%= config.dist %>/css/fonts/{,*/}*.*', - '<%= config.dist %>/*.{ico,png}' - ] - } - }, - - // Reads HTML for usemin blocks to enable smart builds that automatically - // concat, minify and revision files. Creates configurations in memory so - // additional tasks can operate on them - useminPrepare: { - options: { - dest: '<%= config.dist %>' - }, - html: '<%= config.app %>/index.html' - }, - - // Performs rewrites based on rev and the useminPrepare configuration - usemin: { - options: { - assetsDirs: [ - '<%= config.dist %>', - '<%= config.dist %>/img', - '<%= config.dist %>/css' - ] - }, - html: ['<%= config.dist %>/{,*/}*.html'], - css: ['<%= config.dist %>/css/{,*/}*.css'] - }, - - // The following *-min tasks produce minified files in the dist folder - imagemin: { - dist: { - files: [{ - expand: true, - cwd: '<%= config.app %>/img', - src: '{,*/}*.{gif,jpeg,jpg,png}', - dest: '<%= config.dist %>/img' - }] - } - }, - - svgmin: { - dist: { - files: [{ - expand: true, - cwd: '<%= config.app %>/img', - src: '{,*/}*.svg', - dest: '<%= config.dist %>/img' - }] - } - }, - - htmlmin: { - dist: { - options: { - collapseBooleanAttributes: true, - collapseWhitespace: true, - conservativeCollapse: true, - removeAttributeQuotes: true, - removeCommentsFromCDATA: true, - removeEmptyAttributes: true, - removeOptionalTags: true, - // true would impact css with attribute selectors - removeRedundantAttributes: false, - useShortDoctype: true - }, - files: [{ - expand: true, - cwd: '<%= config.dist %>', - src: '{,*/}*.html', - dest: '<%= config.dist %>' - }] - } - }, - - // By default, your `index.html`'s will take care - // of minification. These next options are pre-configured if you do not - // wish to use the Usemin blocks. - // cssmin: { - // dist: { - // files: { - // '<%= config.dist %>/css/main.css': [ - // '.tmp/css/{,*/}*.css', - // '<%= config.app %>/css/{,*/}*.css' - // ] - // } - // } - // }, - // uglify: { - // dist: { - // files: { - // '<%= config.dist %>/js/js.js': [ - // '<%= config.dist %>/js/js.js' - // ] - // } - // } - // }, - // concat: { - // dist: {} - // }, - - // Copies remaining files to places other tasks can use - copy: { - dist: { - files: [{ - expand: true, - dot: true, - cwd: '<%= config.app %>', - dest: '<%= config.dist %>', - src: [ - '*.{ico,png,txt}', - 'img/{,*/}*.webp', - '{,*/}*.html', - 'css/fonts/{,*/}*.*' - ] - }, { - expand: true, - dot: true, - cwd: '.', - src: 'bower_components/bootstrap-sass/assets/fonts/bootstrap/*', - dest: '<%= config.dist %>' - }] - } - }, - - // Run some tasks in parallel to speed up build process - concurrent: { - server: [ - // 'babel:dist', - 'sass' - ], - test: [ - //'babel' - ], - dist: [ - //'babel', - 'sass', - //'imagemin', - //'svgmin' - ] - } - }); - - - grunt.registerTask('serve', 'start the server and preview your app', function (target) { - - if (target === 'dist') { - return grunt.task.run(['build', 'browserSync:dist']); - } - - grunt.task.run([ - 'clean:server', - 'wiredep', - 'concurrent:server', - 'postcss', - 'browserSync:livereload', - 'watch' - ]); - }); - - grunt.registerTask('server', function (target) { - grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.'); - grunt.task.run([target ? ('serve:' + target) : 'serve']); - }); - - grunt.registerTask('test', function (target) { - if (target !== 'watch') { - grunt.task.run([ - 'clean:server', - 'concurrent:test', - 'postcss' - ]); - } - - grunt.task.run([ - 'browserSync:test', - 'mocha' - ]); - }); - - grunt.registerTask('build', [ - 'clean:dist', - 'wiredep', - 'useminPrepare', - 'concurrent:dist', - 'postcss', - 'concat', - 'cssmin', -// 'uglify', - 'copy:dist' -// 'filerev', -// 'usemin' -// 'htmlmin' - ]); - - grunt.registerTask('default', [ - 'newer:eslint', - 'test', - 'build' - ]); -}; diff --git a/server/templates/admin/app/apple-touch-icon.png b/server/templates/admin/app/apple-touch-icon.png deleted file mode 100644 index 52a7e254..00000000 Binary files a/server/templates/admin/app/apple-touch-icon.png and /dev/null differ diff --git a/server/templates/admin/app/css/_buttons.scss b/server/templates/admin/app/css/_buttons.scss deleted file mode 100644 index 55b719aa..00000000 --- a/server/templates/admin/app/css/_buttons.scss +++ /dev/null @@ -1,76 +0,0 @@ -$btn-margin: $font-size-base/2; - -.btn-alert { - //@include button-variant(complement($brand-danger), darken($brand-danger, 10%), darken($brand-danger, 20%)); - @include pretty-buttons(complement($brand-danger), darken($brand-danger, 10%)); - margin-right: $btn-margin; -} - -.btn-action { - //@include button-variant($btn-default-color, invert($btn-default-color), $btn-default-border); - @include pretty-buttons($btn-default-color, $btn-default-bg); - - margin-right: $font-size-base/2; -} - -.btn-export { - //@include button-variant($btn-default-color, $btn-default-bg, $btn-default-border); - @include pretty-buttons($btn-default-color, $btn-default-bg); - - margin-right: $font-size-base/2; -} - - -// Default buttons a bit more beautiful -.btn { - &.btn-default { - @include pretty-buttons($btn-default-color, $btn-default-bg); - } - &.btn-primary { - @include pretty-buttons($btn-primary-color, $btn-primary-bg); - } - &.btn-success { - @include pretty-buttons($btn-success-color, $btn-success-bg); - } - &.btn-info { - @include pretty-buttons($btn-info-color, $btn-info-bg); - } - &.btn-warning { - @include pretty-buttons($btn-warning-color, $btn-warning-bg); - } - &.btn-danger { - @include pretty-buttons($btn-danger-color, $btn-danger-bg); - } - &.btn-inverse { - @include pretty-buttons(white, #474949); - } -} - - -/*.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary, .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary { - background: #337ab7 none repeat scroll 0 0; - color: #fff; -}*/ - -.bootstrap-switch { - .bootstrap-switch-label { - @include pretty-buttons($btn-default-color, $btn-default-bg); - } - .bootstrap-switch-handle-on { - &.bootstrap-switch-default { - @include pretty-buttons($btn-default-color, $btn-default-bg); - } - &.bootstrap-switch-primary { - @include pretty-buttons($btn-primary-color, $btn-primary-bg); - } - } - - .bootstrap-switch-handle-off { - &.bootstrap-switch-default { - @include pretty-buttons($btn-warning-color, $btn-warning-bg); - } - &.bootstrap-switch-primary { - @include pretty-buttons($btn-warning-color, $btn-warning-bg); - } - } -} \ No newline at end of file diff --git a/server/templates/admin/app/css/_data-tables.scss b/server/templates/admin/app/css/_data-tables.scss deleted file mode 100644 index fe59602b..00000000 --- a/server/templates/admin/app/css/_data-tables.scss +++ /dev/null @@ -1,42 +0,0 @@ -.dataTables_wrapper { - overflow-x: hidden; -} - -table.dataTable thead .sorting { - background-image: url("../img/sort_both.png"); -} -table.dataTable thead .sorting_asc { - background-image: url("../img/sort_asc.png"); -} -table.dataTable thead .sorting_desc { - background-image: url("../img/sort_desc.png"); -} -table.dataTable thead .sorting_asc_disabled { - background-image: url("../img/sort_asc_disabled.png"); -} -table.dataTable thead .sorting_desc_disabled { - background-image: url("../img/sort_desc_disabled.png"); -} - -table.dataTable { - border-collapse: inherit; -} - -table.dataTable tbody > tr.selected, table.dataTable tbody > tr > .selected { - background-color: lighten($table-bg-active, 30%); - &:hover { - background-color: $table-bg-hover; - } -} - -tr.even:not(.selected):not(:hover) { - .sorting_1 { - background-color: darken(#FFFFFF, 5%); - } -} - -tr.odd:not(.selected):not(:hover) { - .sorting_1 { - background-color: darken($table-bg-accent, 5%); - } -} \ No newline at end of file diff --git a/server/templates/admin/app/css/_tables.scss b/server/templates/admin/app/css/_tables.scss deleted file mode 100644 index 76160ed6..00000000 --- a/server/templates/admin/app/css/_tables.scss +++ /dev/null @@ -1,89 +0,0 @@ -/* -This states displays as default -*/ - -.row-maintenance-true { - color: lighten($brand-danger, 20%); -} - -.log-WARN { - color: $brand-warning; -} - -.log-DEBUG { - color: $brand-success; -} - -.log-INFO, .log-OTHER { - color: $brand-info; -} - -.log-ERROR, &.log-FATAL { - color: $brand-danger; -} - -// To position correctly things -.btns-tables { - float: left; - margin-bottom: 16px; -} - -.dataTables_info { - float: left; -} - -.dataTables_paginate { - float: right; -} - -.table { - color: #00496b; - border: 1px solid $brand-primary; - // $font-family-monospace - // $font-family-serif - // $font-family-sans-serif - // font-family: $font-family-monospace; - // font-size: $font-size-large; - > tbody > tr { - cursor: pointer; - } - } - -/*.table tbody tr.selected { - background-color: $uds-color-blue; - color: $brand-warning; - &:hover { - background-color: $uds-color-blue-dark; - } -}*/ - -/*.table-striped > tbody > tr { - td.sorting_1 { - color: $uds-color-blue; - } -}*/ - - -.uds-table { - min-height: $uds-panel-min-height - 48px; - padding-right: 2px; -} - -.row-state-S { - color: gray; -} - -.row-running-Yes { - color: green; -} - -@media (max-width: 768px) { - .label-tbl-button { - display: none; - } - - .uds-table { - min-height: 0px; - } - -} diff --git a/server/templates/admin/app/css/_theme.scss b/server/templates/admin/app/css/_theme.scss deleted file mode 100644 index 1d155f8c..00000000 --- a/server/templates/admin/app/css/_theme.scss +++ /dev/null @@ -1,20 +0,0 @@ -// fixes breadcrumb for using -.breadcrumb { - > li { - + li:before { - content: "/ "; // Unicode space added since inline-block means non-collapsing white-space - } - } -} - -.bootstrap-timepicker-widget a.btn, .bootstrap-timepicker-widget input { - background: $input-bg; - border-color: $brand-primary; - border-radius: 0; - border-style: solid; - border-width: 1px; -} - -.bootstrap-timepicker-widget table td a { - color: $brand-primary; -} diff --git a/server/templates/admin/app/css/_tools.scss b/server/templates/admin/app/css/_tools.scss deleted file mode 100644 index 050c5bce..00000000 --- a/server/templates/admin/app/css/_tools.scss +++ /dev/null @@ -1,58 +0,0 @@ -@mixin pretty-buttons($color, $background, $text-shadow: none) { - -color: $color; -@include gradient-vertical(lighten($background, 5%), darken($background, 5%), 0%, 100%); -border-color: darken($background, 10%); -border-bottom-color: darken($background, 20%); -text-shadow: $text-shadow; -//@include box-shadow(inset 0 1px 0 rgba(255, 255, 255, .1)); - -&:hover, -&:focus, -&:active, -&.active { - @include gradient-vertical(darken($background, 0), darken($background, 10%), 0%, 100%); - border-color: darken($background, 20%); - color: $color; -} - -&.disabled, -&[disabled], -fieldset[disabled] & { - &, - &:hover, - &:focus, - &:active, - &.active { - background-color: $background; - border-color: darken($background, 5%); - } -} -} - - -/* -.btn { - &.btn-default { - @include pretty-buttons($btn-default-color, $btn-default-bg); - } - &.btn-primary { - @include pretty-buttons($btn-primary-color, $btn-primary-bg); - } - &.btn-success { - @include pretty-buttons($btn-success-color, $btn-success-bg); - } - &.btn-info { - @include pretty-buttons($btn-info-color, $btn-info-bg); - } - &.btn-warning { - @include pretty-buttons($btn-warning-color, $btn-warning-bg); - } - &.btn-danger { - @include pretty-buttons($btn-danger-color, $btn-danger-bg); - } - &.btn-inverse { - @include pretty-buttons(white, #474949); - } -} -*/ diff --git a/server/templates/admin/app/css/_udsvars-black.scss b/server/templates/admin/app/css/_udsvars-black.scss deleted file mode 100644 index c352ed8d..00000000 --- a/server/templates/admin/app/css/_udsvars-black.scss +++ /dev/null @@ -1,859 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. -$bg-color1: #252830; -$bg-color2: lighten($bg-color1, 14%); - -$gray-base: #FFFFFF; -$gray-darker: darken($gray-base, 13.5%); // #222 -$gray-dark: darken($gray-base, 20%); // #333 -$gray: darken($gray-base, 33.5%); // #555 -$gray-light: darken($gray-base, 46.7%); // #777 -$gray-lighter: darken($gray-base, 93.5%); // #eee - -$brand-primary: darken(#1CA8DD, 0%); // #337ab7 -$brand-success: #1BC98E; -$brand-info: #9F86FF; -$brand-warning: #E4D836; -$brand-danger: #E64759; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -$body-bg: $bg-color1; -//** Global text color on ``. -$text-color: $gray-darker; - -//** Global textual link color. -$link-color: $brand-primary; -//** Link hover color set via `darken()` function. -$link-hover-color: lighten($link-color, 15%); -//** Link hover decoration. -$link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; -$font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
    `.
    -$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
    -$font-family-base:        $font-family-sans-serif;
    -
    -$font-size-base:          14px;
    -$font-size-large:         ceil(($font-size-base * 1.25)); // ~18px
    -$font-size-small:         ceil(($font-size-base * 0.85)); // ~12px
    -
    -$font-size-h1:            floor(($font-size-base * 2.6)); // ~36px
    -$font-size-h2:            floor(($font-size-base * 2.15)); // ~30px
    -$font-size-h3:            ceil(($font-size-base * 1.7)); // ~24px
    -$font-size-h4:            ceil(($font-size-base * 1.25)); // ~18px
    -$font-size-h5:            $font-size-base;
    -$font-size-h6:            ceil(($font-size-base * 0.85)); // ~12px
    -
    -//** Unit-less `line-height` for use in components like buttons.
    -$line-height-base:        1.428571429; // 20/14
    -//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
    -$line-height-computed:    floor(($font-size-base * $line-height-base)); // ~20px
    -
    -//** By default, this inherits from the ``.
    -$headings-font-family:    inherit;
    -$headings-font-weight:    500;
    -$headings-line-height:    1.1;
    -$headings-color:          $brand-info;
    -
    -
    -//== Iconography
    -//
    -//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
    -
    -//** Load fonts from this directory.
    -$icon-font-path:          "../fonts/";
    -//** File name for all font files.
    -$icon-font-name:          "glyphicons-halflings-regular";
    -//** Element ID within SVG icon file.
    -$icon-font-svg-id:        "glyphicons_halflingsregular";
    -
    -
    -//== Components
    -//
    -//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
    -
    -$padding-base-vertical:     6px;
    -$padding-base-horizontal:   12px;
    -
    -$padding-large-vertical:    10px;
    -$padding-large-horizontal:  16px;
    -
    -$padding-small-vertical:    5px;
    -$padding-small-horizontal:  10px;
    -
    -$padding-xs-vertical:       1px;
    -$padding-xs-horizontal:     5px;
    -
    -$line-height-large:         1.33;
    -$line-height-small:         1.5;
    -
    -$border-radius-base:        0px;
    -$border-radius-large:       0px;
    -$border-radius-small:       0px;
    -
    -//** Global color for active items (e.g., navs or dropdowns).
    -$component-active-color:    #fff;
    -//** Global background color for active items (e.g., navs or dropdowns).
    -$component-active-bg:       $brand-primary;
    -
    -//** Width of the `border` for generating carets that indicator dropdowns.
    -$caret-width-base:          4px;
    -//** Carets increase slightly in size for larger components.
    -$caret-width-large:         5px;
    -
    -
    -//== Tables
    -//
    -//## Customizes the `.table` component with basic values, each used across all table variations.
    -
    -//** Padding for ``s and ``s.
    -$table-cell-padding:            8px;
    -//** Padding for cells in `.table-condensed`.
    -$table-condensed-cell-padding:  5px;
    -
    -//** Default background color used for all tables.
    -$table-bg:                      transparent;
    -//** Background color used for `.table-striped`.
    -$table-bg-accent:               lighten($body-bg, 10%);
    -//** Background color used for `.table-hover`.
    -$table-bg-hover:                $brand-primary;
    -$table-bg-active:               darken($brand-primary, 20%);
    -
    -//** Border color for table and cell borders.
    -$table-border-color:            darken($body-bg, 10%);
    -
    -
    -//== Buttons
    -//
    -//## For each of Bootstrap's buttons, define text, background and border color.
    -
    -$btn-font-weight:                normal;
    -
    -$btn-default-color:              $gray-base;
    -$btn-default-bg:                 lighten($body-bg, 20%);
    -$btn-default-border:             lighten($body-bg, 10%);
    -
    -$btn-primary-color:              $gray-base;
    -$btn-primary-bg:                 $brand-primary;
    -$btn-primary-border:             darken($btn-primary-bg, 5%);
    -
    -$btn-success-color:              $gray-base;
    -$btn-success-bg:                 $brand-success;
    -$btn-success-border:             darken($btn-success-bg, 5%);
    -
    -$btn-info-color:                 $gray-base;
    -$btn-info-bg:                    $brand-info;
    -$btn-info-border:                darken($btn-info-bg, 5%);
    -
    -$btn-warning-color:              $gray-base;
    -$btn-warning-bg:                 $brand-warning;
    -$btn-warning-border:             darken($btn-warning-bg, 5%);
    -
    -$btn-danger-color:               $gray-base;
    -$btn-danger-bg:                  $brand-danger;
    -$btn-danger-border:              darken($btn-danger-bg, 5%);
    -
    -$btn-link-disabled-color:        $gray-light;
    -
    -
    -//== Forms
    -//
    -//##
    -
    -//** `` background color
    -$input-bg:                       $body-bg;
    -//** `` background color
    -$input-bg-disabled:              lighten($body-bg, 15%);
    -
    -//** Text color for ``s
    -$input-color:                    $gray-base;
    -//** `` border color
    -$input-border:                   $brand-primary;
    -
    -// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
    -//** Default `.form-control` border radius
    -$input-border-radius:            $border-radius-base;
    -//** Large `.form-control` border radius
    -$input-border-radius-large:      $border-radius-large;
    -//** Small `.form-control` border radius
    -$input-border-radius-small:      $border-radius-small;
    -
    -//** Border color for inputs on focus
    -$input-border-focus:             $brand-info;
    -
    -//** Placeholder text color
    -$input-color-placeholder:        darken($brand-primary, 15%);
    -
    -//** Default `.form-control` height
    -$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2);
    -//** Large `.form-control` height
    -$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2);
    -//** Small `.form-control` height
    -$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2);
    -
    -$legend-color:                   $gray-dark;
    -$legend-border-color:            lighten($body-bg, 15%);
    -
    -//** Background color for textual input addons
    -$input-group-addon-bg:           $input-bg;
    -//** Border color for textual input addons
    -$input-group-addon-border-color: $input-border;
    -
    -//** Disabled cursor for form controls and buttons.
    -$cursor-disabled:                not-allowed;
    -
    -
    -//== Dropdowns
    -//
    -//## Dropdown menu container and contents.
    -
    -//** Background for the dropdown menu.
    -$dropdown-bg:                    lighten($body-bg, 15%);
    -//** Dropdown menu `border-color`.
    -$dropdown-border:                lighten($body-bg, 40%);
    -//** Dropdown menu `border-color` **for IE8**.
    -$dropdown-fallback-border:       lighten($body-bg, 40%);
    -//** Divider color for between dropdown items.
    -$dropdown-divider-bg:            lighten($body-bg, 40%);
    -
    -//** Dropdown link text color.
    -$dropdown-link-color:            $gray-dark;
    -//** Hover color for dropdown links.
    -$dropdown-link-hover-color:      darken($gray-dark, 5%);
    -//** Hover background for dropdown links.
    -$dropdown-link-hover-bg:         $gray-lighter;
    -
    -//** Active dropdown menu item text color.
    -$dropdown-link-active-color:     $component-active-color;
    -//** Active dropdown menu item background color.
    -$dropdown-link-active-bg:        $component-active-bg;
    -
    -//** Disabled dropdown menu item background color.
    -$dropdown-link-disabled-color:   $gray-light;
    -
    -//** Text color for headers within dropdown menus.
    -$dropdown-header-color:          $gray-light;
    -
    -//** Deprecated `$dropdown-caret-color` as of v3.1.0
    -$dropdown-caret-color:           $gray-light;
    -
    -
    -//-- Z-index master list
    -//
    -// Warning: Avoid customizing these values. They're used for a bird's eye view
    -// of components dependent on the z-axis and are designed to all work together.
    -//
    -// Note: These variables are not generated into the Customizer.
    -
    -$zindex-navbar:            1000;
    -$zindex-dropdown:          1000;
    -$zindex-popover:           1060;
    -$zindex-tooltip:           1070;
    -$zindex-navbar-fixed:      1030;
    -$zindex-modal:             1050;
    -$zindex-modal-background:  1040;
    -
    -
    -//== Media queries breakpoints
    -//
    -//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
    -
    -// Extra small screen / phone
    -//** Deprecated `$screen-xs` as of v3.0.1
    -$screen-xs:                  480px;
    -//** Deprecated `$screen-xs-min` as of v3.2.0
    -$screen-xs-min:              $screen-xs;
    -//** Deprecated `$screen-phone` as of v3.0.1
    -$screen-phone:               $screen-xs-min;
    -
    -// Small screen / tablet
    -//** Deprecated `$screen-sm` as of v3.0.1
    -$screen-sm:                  768px;
    -$screen-sm-min:              $screen-sm;
    -//** Deprecated `$screen-tablet` as of v3.0.1
    -$screen-tablet:              $screen-sm-min;
    -
    -// Medium screen / desktop
    -//** Deprecated `$screen-md` as of v3.0.1
    -$screen-md:                  992px;
    -$screen-md-min:              $screen-md;
    -//** Deprecated `$screen-desktop` as of v3.0.1
    -$screen-desktop:             $screen-md-min;
    -
    -// Large screen / wide desktop
    -//** Deprecated `$screen-lg` as of v3.0.1
    -$screen-lg:                  1200px;
    -$screen-lg-min:              $screen-lg;
    -//** Deprecated `$screen-lg-desktop` as of v3.0.1
    -$screen-lg-desktop:          $screen-lg-min;
    -
    -// So media queries don't overlap when required, provide a maximum
    -$screen-xs-max:              ($screen-sm-min - 1);
    -$screen-sm-max:              ($screen-md-min - 1);
    -$screen-md-max:              ($screen-lg-min - 1);
    -
    -
    -//== Grid system
    -//
    -//## Define your custom responsive grid.
    -
    -//** Number of columns in the grid.
    -$grid-columns:              12;
    -//** Padding between columns. Gets divided in half for the left and right.
    -$grid-gutter-width:         30px;
    -// Navbar collapse
    -//** Point at which the navbar becomes uncollapsed.
    -$grid-float-breakpoint:     $screen-sm-min;
    -//** Point at which the navbar begins collapsing.
    -$grid-float-breakpoint-max: ($grid-float-breakpoint - 1);
    -
    -
    -//== Container sizes
    -//
    -//## Define the maximum width of `.container` for different screen sizes.
    -
    -// Small screen / tablet
    -$container-tablet:             (720px + $grid-gutter-width);
    -//** For `$screen-sm-min` and up.
    -$container-sm:                 $container-tablet;
    -
    -// Medium screen / desktop
    -$container-desktop:            (940px + $grid-gutter-width);
    -//** For `$screen-md-min` and up.
    -$container-md:                 $container-desktop;
    -
    -// Large screen / wide desktop
    -$container-large-desktop:      (1140px + $grid-gutter-width);
    -//** For `$screen-lg-min` and up.
    -$container-lg:                 $container-large-desktop;
    -
    -
    -//== Navbar
    -//
    -//##
    -
    -// Basics of a navbar
    -$navbar-height:                    50px;
    -$navbar-margin-bottom:             $line-height-computed;
    -$navbar-border-radius:             $border-radius-base;
    -$navbar-padding-horizontal:        floor(($grid-gutter-width / 2));
    -$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2);
    -$navbar-collapse-max-height:       340px;
    -
    -$navbar-default-color:             #777;
    -$navbar-default-bg:                #f8f8f8;
    -$navbar-default-border:            darken($navbar-default-bg, 6.5%);
    -
    -// Navbar links
    -$navbar-default-link-color:                #777;
    -$navbar-default-link-hover-color:          #333;
    -$navbar-default-link-hover-bg:             transparent;
    -$navbar-default-link-active-color:         #555;
    -$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%);
    -$navbar-default-link-disabled-color:       #ccc;
    -$navbar-default-link-disabled-bg:          transparent;
    -
    -// Navbar brand label
    -$navbar-default-brand-color:               $navbar-default-link-color;
    -$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%);
    -$navbar-default-brand-hover-bg:            transparent;
    -
    -// Navbar toggle
    -$navbar-default-toggle-hover-bg:           #ddd;
    -$navbar-default-toggle-icon-bar-bg:        #888;
    -$navbar-default-toggle-border-color:       #ddd;
    -
    -
    -// Inverted navbar
    -// Reset inverted navbar basics
    -$navbar-inverse-color:                      lighten($gray-light, 15%);
    -$navbar-inverse-bg:                         darken($body-bg, 5%);
    -$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%);
    -
    -// Inverted navbar links
    -$navbar-inverse-link-color:                 lighten($gray-light, 15%);
    -$navbar-inverse-link-hover-color:           $gray-light;
    -$navbar-inverse-link-hover-bg:              darken($brand-primary, 30%);
    -$navbar-inverse-link-active-color:          $gray-lighter;
    -$navbar-inverse-link-active-bg:             $brand-primary;
    -$navbar-inverse-link-disabled-color:        #444;
    -$navbar-inverse-link-disabled-bg:           transparent;
    -
    -// Inverted navbar brand label
    -$navbar-inverse-brand-color:                $navbar-inverse-link-color;
    -$navbar-inverse-brand-hover-color:          $brand-primary;
    -$navbar-inverse-brand-hover-bg:             transparent;
    -
    -// Inverted navbar toggle
    -$navbar-inverse-toggle-hover-bg:            #333;
    -$navbar-inverse-toggle-icon-bar-bg:         #fff;
    -$navbar-inverse-toggle-border-color:        #333;
    -
    -
    -//== Navs
    -//
    -//##
    -
    -//=== Shared nav styles
    -$nav-link-padding:                          10px 15px;
    -$nav-link-hover-bg:                         $gray-lighter;
    -
    -$nav-disabled-link-color:                   $gray-light;
    -$nav-disabled-link-hover-color:             $gray-light;
    -
    -//== Tabs
    -$nav-tabs-border-color:                     #ddd;
    -
    -$nav-tabs-link-hover-border-color:          $gray-lighter;
    -
    -$nav-tabs-active-link-hover-bg:             $body-bg;
    -$nav-tabs-active-link-hover-color:          $gray;
    -$nav-tabs-active-link-hover-border-color:   #ddd;
    -
    -$nav-tabs-justified-link-border-color:            #ddd;
    -$nav-tabs-justified-active-link-border-color:     $body-bg;
    -
    -//== Pills
    -$nav-pills-border-radius:                   $border-radius-base;
    -$nav-pills-active-link-hover-bg:            $component-active-bg;
    -$nav-pills-active-link-hover-color:         $component-active-color;
    -
    -
    -//== Pagination
    -//
    -//##
    -
    -$pagination-color:                     $link-color;
    -$pagination-bg:                        $body-bg;
    -$pagination-border:                    $brand-primary;
    -
    -$pagination-hover-color:               $gray-base;
    -$pagination-hover-bg:                  $brand-primary;
    -$pagination-hover-border:              $pagination-border;
    -
    -$pagination-active-color:              $gray-lighter;
    -$pagination-active-bg:                 $brand-primary;
    -$pagination-active-border:             $brand-primary;
    -
    -$pagination-disabled-color:            darken($pagination-color, 30%);
    -$pagination-disabled-bg:               darken($pagination-bg, 30%);
    -$pagination-disabled-border:           darken($pagination-border, 0%);
    -
    -
    -//== Pager
    -//
    -//##
    -
    -$pager-bg:                             $pagination-bg;
    -$pager-border:                         $pagination-border;
    -$pager-border-radius:                  0px;
    -
    -$pager-hover-bg:                       $pagination-hover-bg;
    -
    -$pager-active-bg:                      $pagination-active-bg;
    -$pager-active-color:                   $pagination-active-color;
    -
    -$pager-disabled-color:                 $pagination-disabled-color;
    -
    -
    -//== Jumbotron
    -//
    -//##
    -
    -$jumbotron-padding:              30px;
    -$jumbotron-color:                inherit;
    -$jumbotron-bg:                   lighten($body-bg,30%);
    -$jumbotron-heading-color:        inherit;
    -$jumbotron-font-size:            ceil(($font-size-base * 1.5));
    -
    -
    -//== Form states and alerts
    -//
    -//## Define colors for form feedback states and, by default, alerts.
    -
    -$state-success-text:             $brand-success;
    -$state-success-bg:               darken($state-success-text, 50%);;
    -$state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%);
    -
    -$state-info-text:                $brand-info;
    -$state-info-bg:                  darken($state-info-text, 50%);;
    -$state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%);
    -
    -$state-warning-text:             $brand-warning;
    -$state-warning-bg:               darken($state-warning-text, 50%);
    -$state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%);
    -
    -$state-danger-text:              $brand-danger;
    -$state-danger-bg:                darken($state-danger-text, 50%);
    -$state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%);
    -
    -
    -//== Tooltips
    -//
    -//##
    -
    -//** Tooltip max width
    -$tooltip-max-width:           200px;
    -//** Tooltip text color
    -$tooltip-color:               $gray-base;
    -//** Tooltip background color
    -$tooltip-bg:                  lighten($body-bg, 25%);
    -$tooltip-opacity:             .9;
    -
    -//** Tooltip arrow width
    -$tooltip-arrow-width:         5px;
    -//** Tooltip arrow color
    -$tooltip-arrow-color:         $tooltip-bg;
    -
    -
    -//== Popovers
    -//
    -//##
    -
    -//** Popover body background color
    -$popover-bg:                          #fff;
    -//** Popover maximum width
    -$popover-max-width:                   276px;
    -//** Popover border color
    -$popover-border-color:                rgba(0,0,0,.2);
    -//** Popover fallback border color
    -$popover-fallback-border-color:       #ccc;
    -
    -//** Popover title background color
    -$popover-title-bg:                    darken($popover-bg, 3%);
    -
    -//** Popover arrow width
    -$popover-arrow-width:                 10px;
    -//** Popover arrow color
    -$popover-arrow-color:                 $popover-bg;
    -
    -//** Popover outer arrow width
    -$popover-arrow-outer-width:           ($popover-arrow-width + 1);
    -//** Popover outer arrow color
    -$popover-arrow-outer-color:           fadein($popover-border-color, 5%);
    -//** Popover outer arrow fallback color
    -$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%);
    -
    -
    -//== Labels
    -//
    -//##
    -
    -//** Default label background color
    -$label-default-bg:            lighten($body-bg, 15%);
    -//** Primary label background color
    -$label-primary-bg:            $brand-primary;
    -//** Success label background color
    -$label-success-bg:            $brand-success;
    -//** Info label background color
    -$label-info-bg:               $brand-info;
    -//** Warning label background color
    -$label-warning-bg:            $brand-warning;
    -//** Danger label background color
    -$label-danger-bg:             $brand-danger;
    -
    -//** Default label text color
    -$label-color:                 $gray-lighter;
    -//** Default text color of a linked label
    -$label-link-hover-color:      #fff;
    -
    -
    -//== Modals
    -//
    -//##
    -
    -//** Padding applied to the modal body
    -$modal-inner-padding:         15px;
    -
    -//** Padding applied to the modal title
    -$modal-title-padding:         15px;
    -//** Modal title line-height
    -$modal-title-line-height:     $line-height-base;
    -
    -//** Background color of modal content area
    -$modal-content-bg:                             lighten($body-bg, 15%);
    -//** Modal content border color
    -$modal-content-border-color:                   $brand-primary;
    -//** Modal content border color **for IE8**
    -$modal-content-fallback-border-color:          $brand-info;
    -
    -//** Modal backdrop background color
    -$modal-backdrop-bg:           #000;
    -//** Modal backdrop opacity
    -$modal-backdrop-opacity:      .4;
    -//** Modal header border color
    -$modal-header-border-color:   $brand-primary;
    -//** Modal footer border color
    -$modal-footer-border-color:   $modal-header-border-color;
    -
    -$modal-lg:                    900px;
    -$modal-md:                    600px;
    -$modal-sm:                    300px;
    -
    -
    -//== Alerts
    -//
    -//## Define alert colors, border radius, and padding.
    -
    -$alert-padding:               15px;
    -$alert-border-radius:         $border-radius-base;
    -$alert-link-font-weight:      bold;
    -
    -$alert-success-bg:            $state-success-bg;
    -$alert-success-text:          $state-success-text;
    -$alert-success-border:        $state-success-border;
    -
    -$alert-info-bg:               $state-info-bg;
    -$alert-info-text:             $state-info-text;
    -$alert-info-border:           $state-info-border;
    -
    -$alert-warning-bg:            $state-warning-bg;
    -$alert-warning-text:          $state-warning-text;
    -$alert-warning-border:        $state-warning-border;
    -
    -$alert-danger-bg:             $state-danger-bg;
    -$alert-danger-text:           $state-danger-text;
    -$alert-danger-border:         $state-danger-border;
    -
    -
    -//== Progress bars
    -//
    -//##
    -
    -//** Background color of the whole progress component
    -$progress-bg:                 lighten($body-bg, 15%);
    -//** Progress bar text color
    -$progress-bar-color:          #fff;
    -//** Variable for setting rounded corners on progress bar.
    -$progress-border-radius:      $border-radius-base;
    -
    -//** Default progress bar color
    -$progress-bar-bg:             $brand-primary;
    -//** Success progress bar color
    -$progress-bar-success-bg:     $brand-success;
    -//** Warning progress bar color
    -$progress-bar-warning-bg:     $brand-warning;
    -//** Danger progress bar color
    -$progress-bar-danger-bg:      $brand-danger;
    -//** Info progress bar color
    -$progress-bar-info-bg:        $brand-info;
    -
    -
    -//== List group
    -//
    -//##
    -
    -//** Background color on `.list-group-item`
    -$list-group-bg:                 lighten($body-bg, 15%);
    -//** `.list-group-item` border color
    -$list-group-border:             lighten($body-bg, 30%);
    -//** List group border radius
    -$list-group-border-radius:      $border-radius-base;
    -
    -//** Background color of single list items on hover
    -$list-group-hover-bg:           $gray-dark;
    -//** Text color of active list items
    -$list-group-active-color:       $gray-base;
    -//** Background color of active list items
    -$list-group-active-bg:          $gray-darker;
    -//** Border color of active list elements
    -$list-group-active-border:      $list-group-active-bg;
    -//** Text color for content within active list items
    -$list-group-active-text-color:  lighten($list-group-active-bg, 40%);
    -
    -//** Text color of disabled list items
    -$list-group-disabled-color:      $gray-darker;
    -//** Background color of disabled list items
    -$list-group-disabled-bg:         $gray-lighter;
    -//** Text color for content within disabled list items
    -$list-group-disabled-text-color: $list-group-disabled-color;
    -
    -$list-group-link-color:         $brand-primary;
    -$list-group-link-hover-color:   $list-group-link-color;
    -$list-group-link-heading-color: $gray-base;
    -
    -
    -//== Panels
    -//
    -//##
    -
    -$panel-bg:                    lighten($body-bg, 15%);
    -$panel-body-padding:          15px;
    -$panel-heading-padding:       10px 15px;
    -$panel-footer-padding:        $panel-heading-padding;
    -$panel-border-radius:         $border-radius-base;
    -
    -//** Border color for elements within panels
    -$panel-inner-border:          $brand-primary;
    -$panel-footer-bg:             lighten($body-bg,5%);
    -
    -$panel-default-text:          $gray-lighter;
    -$panel-default-border:        $brand-primary;
    -$panel-default-heading-bg:    lighten($body-bg, 45%);
    -
    -$panel-primary-text:          $gray-lighter;
    -$panel-primary-border:        $brand-primary;
    -$panel-primary-heading-bg:    $brand-primary;
    -
    -$panel-success-text:          $state-success-text;
    -$panel-success-border:        $state-success-border;
    -$panel-success-heading-bg:    $state-success-bg;
    -
    -$panel-info-text:             $state-info-text;
    -$panel-info-border:           $state-info-border;
    -$panel-info-heading-bg:       $state-info-bg;
    -
    -$panel-warning-text:          $state-warning-text;
    -$panel-warning-border:        $state-warning-border;
    -$panel-warning-heading-bg:    $state-warning-bg;
    -
    -$panel-danger-text:           $state-danger-text;
    -$panel-danger-border:         $state-danger-border;
    -$panel-danger-heading-bg:     $state-danger-bg;
    -
    -
    -//== Thumbnails
    -//
    -//##
    -
    -//** Padding around the thumbnail image
    -$thumbnail-padding:           4px;
    -//** Thumbnail background color
    -$thumbnail-bg:                $body-bg;
    -//** Thumbnail border color
    -$thumbnail-border:            #ddd;
    -//** Thumbnail border radius
    -$thumbnail-border-radius:     $border-radius-base;
    -
    -//** Custom text color for thumbnail captions
    -$thumbnail-caption-color:     $text-color;
    -//** Padding around the thumbnail caption
    -$thumbnail-caption-padding:   9px;
    -
    -
    -//== Wells
    -//
    -//##
    -
    -$well-bg:                     lighten($body-bg, 15%);
    -$well-border:                 darken($well-bg, 7%);
    -
    -
    -//== Badges
    -//
    -//##
    -
    -$badge-color:                 #fff;
    -//** Linked badge text color on hover
    -$badge-link-hover-color:      #fff;
    -$badge-bg:                    $gray-light;
    -
    -//** Badge text color in active nav link
    -$badge-active-color:          $link-color;
    -//** Badge background color in active nav link
    -$badge-active-bg:             #fff;
    -
    -$badge-font-weight:           bold;
    -$badge-line-height:           1;
    -$badge-border-radius:         10px;
    -
    -
    -//== Breadcrumbs
    -//
    -//##
    -
    -$breadcrumb-padding-vertical:   8px;
    -$breadcrumb-padding-horizontal: 15px;
    -//** Breadcrumb background color
    -$breadcrumb-bg:                 $body-bg;
    -//** Breadcrumb text color
    -$breadcrumb-color:              #ccc;
    -//** Text color of current page in the breadcrumb
    -$breadcrumb-active-color:       $gray-light;
    -//** Textual separator for between breadcrumb elements
    -$breadcrumb-separator:          "/ ";
    -
    -
    -//== Carousel
    -//
    -//##
    -
    -$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
    -
    -$carousel-control-color:                      #fff;
    -$carousel-control-width:                      15%;
    -$carousel-control-opacity:                    .5;
    -$carousel-control-font-size:                  20px;
    -
    -$carousel-indicator-active-bg:                #fff;
    -$carousel-indicator-border-color:             #fff;
    -
    -$carousel-caption-color:                      #fff;
    -
    -
    -//== Close
    -//
    -//##
    -
    -$close-font-weight:           bold;
    -$close-color:                 #000;
    -$close-text-shadow:           0 1px 0 #fff;
    -
    -
    -//== Code
    -//
    -//##
    -
    -$code-color:                  #c7254e;
    -$code-bg:                     #f9f2f4;
    -
    -$kbd-color:                   #fff;
    -$kbd-bg:                      #333;
    -
    -$pre-bg:                      #f5f5f5;
    -$pre-color:                   $gray-dark;
    -$pre-border-color:            #ccc;
    -$pre-scrollable-max-height:   340px;
    -
    -
    -//== Type
    -//
    -//##
    -
    -//** Horizontal offset for forms and lists.
    -$component-offset-horizontal: 180px;
    -//** Text muted color
    -$text-muted:                  $gray-light;
    -//** Abbreviations and acronyms border color
    -$abbr-border-color:           $gray-light;
    -//** Headings small color
    -$headings-small-color:        $gray-light;
    -//** Blockquote small color
    -$blockquote-small-color:      $gray-light;
    -//** Blockquote font size
    -$blockquote-font-size:        ($font-size-base * 1.25);
    -//** Blockquote border color
    -$blockquote-border-color:     $gray-lighter;
    -//** Page header border color
    -$page-header-border-color:    $gray-lighter;
    -//** Width of horizontal description list titles
    -$dl-horizontal-offset:        $component-offset-horizontal;
    -//** Horizontal line color.
    -$hr-border:                   $gray-lighter;
    \ No newline at end of file
    diff --git a/server/templates/admin/app/css/_udsvars.scss b/server/templates/admin/app/css/_udsvars.scss
    deleted file mode 100644
    index 67ec9354..00000000
    --- a/server/templates/admin/app/css/_udsvars.scss
    +++ /dev/null
    @@ -1,857 +0,0 @@
    -//
    -// Variables
    -// --------------------------------------------------
    -
    -
    -//== Colors
    -//
    -//## Gray and brand colors for use across Bootstrap.
    -
    -$gray-base:              #000;
    -$gray-darker:            lighten($gray-base, 13.5%); // #222
    -$gray-dark:              lighten($gray-base, 20%);   // #333
    -$gray:                   lighten($gray-base, 33.5%); // #555
    -$gray-light:             lighten($gray-base, 46.7%); // #777
    -$gray-lighter:           lighten($gray-base, 93.5%); // #eee
    -
    -$brand-primary:         darken(#428bca, 6.5%); // #337ab7
    -$brand-success:         #5cb85c;
    -$brand-info:            #5bc0de;
    -$brand-warning:         #f0ad4e;
    -$brand-danger:          #d9534f;
    -
    -
    -//== Scaffolding
    -//
    -//## Settings for some of the most global styles.
    -
    -//** Background color for ``.
    -$body-bg:               #fff;
    -//** Global text color on ``.
    -$text-color:            $gray-dark;
    -
    -//** Global textual link color.
    -$link-color:            $brand-primary;
    -//** Link hover color set via `darken()` function.
    -$link-hover-color:      darken($link-color, 15%);
    -//** Link hover decoration.
    -$link-hover-decoration: underline;
    -
    -
    -//== Typography
    -//
    -//## Font, line-height, and color for body text, headings, and more.
    -
    -$font-family-sans-serif:  "Helvetica Neue", Helvetica, Arial, sans-serif;
    -$font-family-serif:       Georgia, "Times New Roman", Times, serif;
    -//** Default monospace fonts for ``, ``, and `
    `.
    -$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
    -$font-family-base:        $font-family-sans-serif;
    -
    -$font-size-base:          14px;
    -$font-size-large:         ceil(($font-size-base * 1.25)); // ~18px
    -$font-size-small:         ceil(($font-size-base * 0.85)); // ~12px
    -
    -$font-size-h1:            floor(($font-size-base * 2.6)); // ~36px
    -$font-size-h2:            floor(($font-size-base * 2.15)); // ~30px
    -$font-size-h3:            ceil(($font-size-base * 1.7)); // ~24px
    -$font-size-h4:            ceil(($font-size-base * 1.25)); // ~18px
    -$font-size-h5:            $font-size-base;
    -$font-size-h6:            ceil(($font-size-base * 0.85)); // ~12px
    -
    -//** Unit-less `line-height` for use in components like buttons.
    -$line-height-base:        1.428571429; // 20/14
    -//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
    -$line-height-computed:    floor(($font-size-base * $line-height-base)); // ~20px
    -
    -//** By default, this inherits from the ``.
    -$headings-font-family:    inherit;
    -$headings-font-weight:    500;
    -$headings-line-height:    1.1;
    -$headings-color:          inherit;
    -
    -
    -//== Iconography
    -//
    -//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
    -
    -//** Load fonts from this directory.
    -$icon-font-path:          "../fonts/";
    -//** File name for all font files.
    -$icon-font-name:          "glyphicons-halflings-regular";
    -//** Element ID within SVG icon file.
    -$icon-font-svg-id:        "glyphicons_halflingsregular";
    -
    -
    -//== Components
    -//
    -//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
    -
    -$padding-base-vertical:     6px;
    -$padding-base-horizontal:   12px;
    -
    -$padding-large-vertical:    10px;
    -$padding-large-horizontal:  16px;
    -
    -$padding-small-vertical:    5px;
    -$padding-small-horizontal:  10px;
    -
    -$padding-xs-vertical:       1px;
    -$padding-xs-horizontal:     5px;
    -
    -$line-height-large:         1.33;
    -$line-height-small:         1.5;
    -
    -$border-radius-base:        0px;
    -$border-radius-large:       0px;
    -$border-radius-small:       0px;
    -
    -//** Global color for active items (e.g., navs or dropdowns).
    -$component-active-color:    #fff;
    -//** Global background color for active items (e.g., navs or dropdowns).
    -$component-active-bg:       $brand-primary;
    -
    -//** Width of the `border` for generating carets that indicator dropdowns.
    -$caret-width-base:          4px;
    -//** Carets increase slightly in size for larger components.
    -$caret-width-large:         5px;
    -
    -
    -//== Tables
    -//
    -//## Customizes the `.table` component with basic values, each used across all table variations.
    -
    -//** Padding for ``s and ``s.
    -$table-cell-padding:            8px;
    -//** Padding for cells in `.table-condensed`.
    -$table-condensed-cell-padding:  5px;
    -
    -//** Default background color used for all tables.
    -$table-bg:                      transparent;
    -//** Background color used for `.table-striped`.
    -$table-bg-accent:               #e1eef4;
    -//** Background color used for `.table-hover`.
    -$table-bg-hover:                lighten($brand-primary, 10%);
    -$table-bg-active:               $table-bg-hover;
    -
    -//** Border color for table and cell borders.
    -$table-border-color:            #ddd;
    -
    -
    -//== Buttons
    -//
    -//## For each of Bootstrap's buttons, define text, background and border color.
    -
    -$btn-font-weight:                normal;
    -
    -$btn-default-color:              #333;
    -$btn-default-bg:                 #fff;
    -$btn-default-border:             #ccc;
    -
    -$btn-primary-color:              #fff;
    -$btn-primary-bg:                 $brand-primary;
    -$btn-primary-border:             darken($btn-primary-bg, 5%);
    -
    -$btn-success-color:              #fff;
    -$btn-success-bg:                 $brand-success;
    -$btn-success-border:             darken($btn-success-bg, 5%);
    -
    -$btn-info-color:                 #fff;
    -$btn-info-bg:                    $brand-info;
    -$btn-info-border:                darken($btn-info-bg, 5%);
    -
    -$btn-warning-color:              #fff;
    -$btn-warning-bg:                 $brand-warning;
    -$btn-warning-border:             darken($btn-warning-bg, 5%);
    -
    -$btn-danger-color:               #fff;
    -$btn-danger-bg:                  $brand-danger;
    -$btn-danger-border:              darken($btn-danger-bg, 5%);
    -
    -$btn-link-disabled-color:        $gray-light;
    -
    -
    -//== Forms
    -//
    -//##
    -
    -//** `` background color
    -$input-bg:                       #fff;
    -//** `` background color
    -$input-bg-disabled:              $gray-lighter;
    -
    -//** Text color for ``s
    -$input-color:                    $gray;
    -//** `` border color
    -$input-border:                   #ccc;
    -
    -// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
    -//** Default `.form-control` border radius
    -$input-border-radius:            $border-radius-base;
    -//** Large `.form-control` border radius
    -$input-border-radius-large:      $border-radius-large;
    -//** Small `.form-control` border radius
    -$input-border-radius-small:      $border-radius-small;
    -
    -//** Border color for inputs on focus
    -$input-border-focus:             #66afe9;
    -
    -//** Placeholder text color
    -$input-color-placeholder:        #999;
    -
    -//** Default `.form-control` height
    -$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2);
    -//** Large `.form-control` height
    -$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2);
    -//** Small `.form-control` height
    -$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2);
    -
    -$legend-color:                   $gray-dark;
    -$legend-border-color:            #e5e5e5;
    -
    -//** Background color for textual input addons
    -$input-group-addon-bg:           $gray-lighter;
    -//** Border color for textual input addons
    -$input-group-addon-border-color: $input-border;
    -
    -//** Disabled cursor for form controls and buttons.
    -$cursor-disabled:                not-allowed;
    -
    -
    -//== Dropdowns
    -//
    -//## Dropdown menu container and contents.
    -
    -//** Background for the dropdown menu.
    -$dropdown-bg:                    #fff;
    -//** Dropdown menu `border-color`.
    -$dropdown-border:                rgba(0,0,0,.15);
    -//** Dropdown menu `border-color` **for IE8**.
    -$dropdown-fallback-border:       #ccc;
    -//** Divider color for between dropdown items.
    -$dropdown-divider-bg:            #e5e5e5;
    -
    -//** Dropdown link text color.
    -$dropdown-link-color:            $gray-dark;
    -//** Hover color for dropdown links.
    -$dropdown-link-hover-color:      darken($gray-dark, 5%);
    -//** Hover background for dropdown links.
    -$dropdown-link-hover-bg:         #f5f5f5;
    -
    -//** Active dropdown menu item text color.
    -$dropdown-link-active-color:     $component-active-color;
    -//** Active dropdown menu item background color.
    -$dropdown-link-active-bg:        $component-active-bg;
    -
    -//** Disabled dropdown menu item background color.
    -$dropdown-link-disabled-color:   $gray-light;
    -
    -//** Text color for headers within dropdown menus.
    -$dropdown-header-color:          $gray-light;
    -
    -//** Deprecated `$dropdown-caret-color` as of v3.1.0
    -$dropdown-caret-color:           #000;
    -
    -
    -//-- Z-index master list
    -//
    -// Warning: Avoid customizing these values. They're used for a bird's eye view
    -// of components dependent on the z-axis and are designed to all work together.
    -//
    -// Note: These variables are not generated into the Customizer.
    -
    -$zindex-navbar:            1000;
    -$zindex-dropdown:          1000;
    -$zindex-popover:           1060;
    -$zindex-tooltip:           1070;
    -$zindex-navbar-fixed:      1030;
    -$zindex-modal:             1050;
    -$zindex-modal-background:  1040;
    -
    -
    -//== Media queries breakpoints
    -//
    -//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
    -
    -// Extra small screen / phone
    -//** Deprecated `$screen-xs` as of v3.0.1
    -$screen-xs:                  480px;
    -//** Deprecated `$screen-xs-min` as of v3.2.0
    -$screen-xs-min:              $screen-xs;
    -//** Deprecated `$screen-phone` as of v3.0.1
    -$screen-phone:               $screen-xs-min;
    -
    -// Small screen / tablet
    -//** Deprecated `$screen-sm` as of v3.0.1
    -$screen-sm:                  768px;
    -$screen-sm-min:              $screen-sm;
    -//** Deprecated `$screen-tablet` as of v3.0.1
    -$screen-tablet:              $screen-sm-min;
    -
    -// Medium screen / desktop
    -//** Deprecated `$screen-md` as of v3.0.1
    -$screen-md:                  992px;
    -$screen-md-min:              $screen-md;
    -//** Deprecated `$screen-desktop` as of v3.0.1
    -$screen-desktop:             $screen-md-min;
    -
    -// Large screen / wide desktop
    -//** Deprecated `$screen-lg` as of v3.0.1
    -$screen-lg:                  1200px;
    -$screen-lg-min:              $screen-lg;
    -//** Deprecated `$screen-lg-desktop` as of v3.0.1
    -$screen-lg-desktop:          $screen-lg-min;
    -
    -// So media queries don't overlap when required, provide a maximum
    -$screen-xs-max:              ($screen-sm-min - 1);
    -$screen-sm-max:              ($screen-md-min - 1);
    -$screen-md-max:              ($screen-lg-min - 1);
    -
    -
    -//== Grid system
    -//
    -//## Define your custom responsive grid.
    -
    -//** Number of columns in the grid.
    -$grid-columns:              12;
    -//** Padding between columns. Gets divided in half for the left and right.
    -$grid-gutter-width:         30px;
    -// Navbar collapse
    -//** Point at which the navbar becomes uncollapsed.
    -$grid-float-breakpoint:     $screen-sm-min;
    -//** Point at which the navbar begins collapsing.
    -$grid-float-breakpoint-max: ($grid-float-breakpoint - 1);
    -
    -
    -//== Container sizes
    -//
    -//## Define the maximum width of `.container` for different screen sizes.
    -
    -// Small screen / tablet
    -$container-tablet:             (720px + $grid-gutter-width);
    -//** For `$screen-sm-min` and up.
    -$container-sm:                 $container-tablet;
    -
    -// Medium screen / desktop
    -$container-desktop:            (940px + $grid-gutter-width);
    -//** For `$screen-md-min` and up.
    -$container-md:                 $container-desktop;
    -
    -// Large screen / wide desktop
    -$container-large-desktop:      (1140px + $grid-gutter-width);
    -//** For `$screen-lg-min` and up.
    -$container-lg:                 $container-large-desktop;
    -
    -
    -//== Navbar
    -//
    -//##
    -
    -// Basics of a navbar
    -$navbar-height:                    50px;
    -$navbar-margin-bottom:             $line-height-computed;
    -$navbar-border-radius:             $border-radius-base;
    -$navbar-padding-horizontal:        floor(($grid-gutter-width / 2));
    -$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2);
    -$navbar-collapse-max-height:       340px;
    -
    -$navbar-default-color:             #777;
    -$navbar-default-bg:                #f8f8f8;
    -$navbar-default-border:            darken($navbar-default-bg, 6.5%);
    -
    -// Navbar links
    -$navbar-default-link-color:                #777;
    -$navbar-default-link-hover-color:          #333;
    -$navbar-default-link-hover-bg:             transparent;
    -$navbar-default-link-active-color:         #555;
    -$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%);
    -$navbar-default-link-disabled-color:       #ccc;
    -$navbar-default-link-disabled-bg:          transparent;
    -
    -// Navbar brand label
    -$navbar-default-brand-color:               $navbar-default-link-color;
    -$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%);
    -$navbar-default-brand-hover-bg:            transparent;
    -
    -// Navbar toggle
    -$navbar-default-toggle-hover-bg:           #ddd;
    -$navbar-default-toggle-icon-bar-bg:        #888;
    -$navbar-default-toggle-border-color:       #ddd;
    -
    -
    -// Inverted navbar
    -// Reset inverted navbar basics
    -$navbar-inverse-color:                      lighten($gray-light, 15%);
    -$navbar-inverse-bg:                         #222;
    -$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%);
    -
    -// Inverted navbar links
    -$navbar-inverse-link-color:                 lighten($gray-light, 15%);
    -$navbar-inverse-link-hover-color:           #fff;
    -$navbar-inverse-link-hover-bg:              transparent;
    -$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color;
    -$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%);
    -$navbar-inverse-link-disabled-color:        #444;
    -$navbar-inverse-link-disabled-bg:           transparent;
    -
    -// Inverted navbar brand label
    -$navbar-inverse-brand-color:                $navbar-inverse-link-color;
    -$navbar-inverse-brand-hover-color:          #fff;
    -$navbar-inverse-brand-hover-bg:             transparent;
    -
    -// Inverted navbar toggle
    -$navbar-inverse-toggle-hover-bg:            #333;
    -$navbar-inverse-toggle-icon-bar-bg:         #fff;
    -$navbar-inverse-toggle-border-color:        #333;
    -
    -
    -//== Navs
    -//
    -//##
    -
    -//=== Shared nav styles
    -$nav-link-padding:                          10px 15px;
    -$nav-link-hover-bg:                         $gray-lighter;
    -
    -$nav-disabled-link-color:                   $gray-light;
    -$nav-disabled-link-hover-color:             $gray-light;
    -
    -//== Tabs
    -$nav-tabs-border-color:                     #ddd;
    -
    -$nav-tabs-link-hover-border-color:          $gray-lighter;
    -
    -$nav-tabs-active-link-hover-bg:             $body-bg;
    -$nav-tabs-active-link-hover-color:          $gray;
    -$nav-tabs-active-link-hover-border-color:   #ddd;
    -
    -$nav-tabs-justified-link-border-color:            #ddd;
    -$nav-tabs-justified-active-link-border-color:     $body-bg;
    -
    -//== Pills
    -$nav-pills-border-radius:                   $border-radius-base;
    -$nav-pills-active-link-hover-bg:            $component-active-bg;
    -$nav-pills-active-link-hover-color:         $component-active-color;
    -
    -
    -//== Pagination
    -//
    -//##
    -
    -$pagination-color:                     $link-color;
    -$pagination-bg:                        #fff;
    -$pagination-border:                    #ddd;
    -
    -$pagination-hover-color:               $link-hover-color;
    -$pagination-hover-bg:                  $gray-lighter;
    -$pagination-hover-border:              #ddd;
    -
    -$pagination-active-color:              #fff;
    -$pagination-active-bg:                 $brand-primary;
    -$pagination-active-border:             $brand-primary;
    -
    -$pagination-disabled-color:            $gray-light;
    -$pagination-disabled-bg:               #fff;
    -$pagination-disabled-border:           #ddd;
    -
    -
    -//== Pager
    -//
    -//##
    -
    -$pager-bg:                             $pagination-bg;
    -$pager-border:                         $pagination-border;
    -$pager-border-radius:                  15px;
    -
    -$pager-hover-bg:                       $pagination-hover-bg;
    -
    -$pager-active-bg:                      $pagination-active-bg;
    -$pager-active-color:                   $pagination-active-color;
    -
    -$pager-disabled-color:                 $pagination-disabled-color;
    -
    -
    -//== Jumbotron
    -//
    -//##
    -
    -$jumbotron-padding:              30px;
    -$jumbotron-color:                inherit;
    -$jumbotron-bg:                   $gray-lighter;
    -$jumbotron-heading-color:        inherit;
    -$jumbotron-font-size:            ceil(($font-size-base * 1.5));
    -
    -
    -//== Form states and alerts
    -//
    -//## Define colors for form feedback states and, by default, alerts.
    -
    -$state-success-text:             #3c763d;
    -$state-success-bg:               #dff0d8;
    -$state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%);
    -
    -$state-info-text:                #31708f;
    -$state-info-bg:                  #d9edf7;
    -$state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%);
    -
    -$state-warning-text:             #8a6d3b;
    -$state-warning-bg:               #fcf8e3;
    -$state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%);
    -
    -$state-danger-text:              #a94442;
    -$state-danger-bg:                #f2dede;
    -$state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%);
    -
    -
    -//== Tooltips
    -//
    -//##
    -
    -//** Tooltip max width
    -$tooltip-max-width:           200px;
    -//** Tooltip text color
    -$tooltip-color:               #fff;
    -//** Tooltip background color
    -$tooltip-bg:                  #000;
    -$tooltip-opacity:             .9;
    -
    -//** Tooltip arrow width
    -$tooltip-arrow-width:         5px;
    -//** Tooltip arrow color
    -$tooltip-arrow-color:         $tooltip-bg;
    -
    -
    -//== Popovers
    -//
    -//##
    -
    -//** Popover body background color
    -$popover-bg:                          #fff;
    -//** Popover maximum width
    -$popover-max-width:                   276px;
    -//** Popover border color
    -$popover-border-color:                rgba(0,0,0,.2);
    -//** Popover fallback border color
    -$popover-fallback-border-color:       #ccc;
    -
    -//** Popover title background color
    -$popover-title-bg:                    darken($popover-bg, 3%);
    -
    -//** Popover arrow width
    -$popover-arrow-width:                 10px;
    -//** Popover arrow color
    -$popover-arrow-color:                 $popover-bg;
    -
    -//** Popover outer arrow width
    -$popover-arrow-outer-width:           ($popover-arrow-width + 1);
    -//** Popover outer arrow color
    -$popover-arrow-outer-color:           fadein($popover-border-color, 5%);
    -//** Popover outer arrow fallback color
    -$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%);
    -
    -
    -//== Labels
    -//
    -//##
    -
    -//** Default label background color
    -$label-default-bg:            $gray-light;
    -//** Primary label background color
    -$label-primary-bg:            $brand-primary;
    -//** Success label background color
    -$label-success-bg:            $brand-success;
    -//** Info label background color
    -$label-info-bg:               $brand-info;
    -//** Warning label background color
    -$label-warning-bg:            $brand-warning;
    -//** Danger label background color
    -$label-danger-bg:             $brand-danger;
    -
    -//** Default label text color
    -$label-color:                 #fff;
    -//** Default text color of a linked label
    -$label-link-hover-color:      #fff;
    -
    -
    -//== Modals
    -//
    -//##
    -
    -//** Padding applied to the modal body
    -$modal-inner-padding:         15px;
    -
    -//** Padding applied to the modal title
    -$modal-title-padding:         15px;
    -//** Modal title line-height
    -$modal-title-line-height:     $line-height-base;
    -
    -//** Background color of modal content area
    -$modal-content-bg:                             #fff;
    -//** Modal content border color
    -$modal-content-border-color:                   rgba(0,0,0,.2);
    -//** Modal content border color **for IE8**
    -$modal-content-fallback-border-color:          #999;
    -
    -//** Modal backdrop background color
    -$modal-backdrop-bg:           #000;
    -//** Modal backdrop opacity
    -$modal-backdrop-opacity:      .5;
    -//** Modal header border color
    -$modal-header-border-color:   #e5e5e5;
    -//** Modal footer border color
    -$modal-footer-border-color:   $modal-header-border-color;
    -
    -$modal-lg:                    900px;
    -$modal-md:                    600px;
    -$modal-sm:                    300px;
    -
    -
    -//== Alerts
    -//
    -//## Define alert colors, border radius, and padding.
    -
    -$alert-padding:               15px;
    -$alert-border-radius:         $border-radius-base;
    -$alert-link-font-weight:      bold;
    -
    -$alert-success-bg:            $state-success-bg;
    -$alert-success-text:          $state-success-text;
    -$alert-success-border:        $state-success-border;
    -
    -$alert-info-bg:               $state-info-bg;
    -$alert-info-text:             $state-info-text;
    -$alert-info-border:           $state-info-border;
    -
    -$alert-warning-bg:            $state-warning-bg;
    -$alert-warning-text:          $state-warning-text;
    -$alert-warning-border:        $state-warning-border;
    -
    -$alert-danger-bg:             $state-danger-bg;
    -$alert-danger-text:           $state-danger-text;
    -$alert-danger-border:         $state-danger-border;
    -
    -
    -//== Progress bars
    -//
    -//##
    -
    -//** Background color of the whole progress component
    -$progress-bg:                 #f5f5f5;
    -//** Progress bar text color
    -$progress-bar-color:          #fff;
    -//** Variable for setting rounded corners on progress bar.
    -$progress-border-radius:      $border-radius-base;
    -
    -//** Default progress bar color
    -$progress-bar-bg:             $brand-primary;
    -//** Success progress bar color
    -$progress-bar-success-bg:     $brand-success;
    -//** Warning progress bar color
    -$progress-bar-warning-bg:     $brand-warning;
    -//** Danger progress bar color
    -$progress-bar-danger-bg:      $brand-danger;
    -//** Info progress bar color
    -$progress-bar-info-bg:        $brand-info;
    -
    -
    -//== List group
    -//
    -//##
    -
    -//** Background color on `.list-group-item`
    -$list-group-bg:                 #fff;
    -//** `.list-group-item` border color
    -$list-group-border:             #ddd;
    -//** List group border radius
    -$list-group-border-radius:      $border-radius-base;
    -
    -//** Background color of single list items on hover
    -$list-group-hover-bg:           #f5f5f5;
    -//** Text color of active list items
    -$list-group-active-color:       $component-active-color;
    -//** Background color of active list items
    -$list-group-active-bg:          $component-active-bg;
    -//** Border color of active list elements
    -$list-group-active-border:      $list-group-active-bg;
    -//** Text color for content within active list items
    -$list-group-active-text-color:  lighten($list-group-active-bg, 40%);
    -
    -//** Text color of disabled list items
    -$list-group-disabled-color:      $gray-light;
    -//** Background color of disabled list items
    -$list-group-disabled-bg:         $gray-lighter;
    -//** Text color for content within disabled list items
    -$list-group-disabled-text-color: $list-group-disabled-color;
    -
    -$list-group-link-color:         #555;
    -$list-group-link-hover-color:   $list-group-link-color;
    -$list-group-link-heading-color: #333;
    -
    -
    -//== Panels
    -//
    -//##
    -
    -$panel-bg:                    #fff;
    -$panel-body-padding:          15px;
    -$panel-heading-padding:       10px 15px;
    -$panel-footer-padding:        $panel-heading-padding;
    -$panel-border-radius:         $border-radius-base;
    -
    -//** Border color for elements within panels
    -$panel-inner-border:          #ddd;
    -$panel-footer-bg:             #f5f5f5;
    -
    -$panel-default-text:          $gray-dark;
    -$panel-default-border:        #ddd;
    -$panel-default-heading-bg:    #f5f5f5;
    -
    -$panel-primary-text:          #fff;
    -$panel-primary-border:        $brand-primary;
    -$panel-primary-heading-bg:    $brand-primary;
    -
    -$panel-success-text:          $state-success-text;
    -$panel-success-border:        $state-success-border;
    -$panel-success-heading-bg:    $state-success-bg;
    -
    -$panel-info-text:             $state-info-text;
    -$panel-info-border:           $state-info-border;
    -$panel-info-heading-bg:       $state-info-bg;
    -
    -$panel-warning-text:          $state-warning-text;
    -$panel-warning-border:        $state-warning-border;
    -$panel-warning-heading-bg:    $state-warning-bg;
    -
    -$panel-danger-text:           $state-danger-text;
    -$panel-danger-border:         $state-danger-border;
    -$panel-danger-heading-bg:     $state-danger-bg;
    -
    -
    -//== Thumbnails
    -//
    -//##
    -
    -//** Padding around the thumbnail image
    -$thumbnail-padding:           4px;
    -//** Thumbnail background color
    -$thumbnail-bg:                $body-bg;
    -//** Thumbnail border color
    -$thumbnail-border:            #ddd;
    -//** Thumbnail border radius
    -$thumbnail-border-radius:     $border-radius-base;
    -
    -//** Custom text color for thumbnail captions
    -$thumbnail-caption-color:     $text-color;
    -//** Padding around the thumbnail caption
    -$thumbnail-caption-padding:   9px;
    -
    -
    -//== Wells
    -//
    -//##
    -
    -$well-bg:                     #f5f5f5;
    -$well-border:                 darken($well-bg, 7%);
    -
    -
    -//== Badges
    -//
    -//##
    -
    -$badge-color:                 #fff;
    -//** Linked badge text color on hover
    -$badge-link-hover-color:      #fff;
    -$badge-bg:                    $gray-light;
    -
    -//** Badge text color in active nav link
    -$badge-active-color:          $link-color;
    -//** Badge background color in active nav link
    -$badge-active-bg:             #fff;
    -
    -$badge-font-weight:           bold;
    -$badge-line-height:           1;
    -$badge-border-radius:         10px;
    -
    -
    -//== Breadcrumbs
    -//
    -//##
    -
    -$breadcrumb-padding-vertical:   8px;
    -$breadcrumb-padding-horizontal: 15px;
    -//** Breadcrumb background color
    -$breadcrumb-bg:                 #f5f5f5;
    -//** Breadcrumb text color
    -$breadcrumb-color:              #ccc;
    -//** Text color of current page in the breadcrumb
    -$breadcrumb-active-color:       $gray-light;
    -//** Textual separator for between breadcrumb elements
    -$breadcrumb-separator:          "/";
    -
    -
    -//== Carousel
    -//
    -//##
    -
    -$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
    -
    -$carousel-control-color:                      #fff;
    -$carousel-control-width:                      15%;
    -$carousel-control-opacity:                    .5;
    -$carousel-control-font-size:                  20px;
    -
    -$carousel-indicator-active-bg:                #fff;
    -$carousel-indicator-border-color:             #fff;
    -
    -$carousel-caption-color:                      #fff;
    -
    -
    -//== Close
    -//
    -//##
    -
    -$close-font-weight:           bold;
    -$close-color:                 #000;
    -$close-text-shadow:           0 1px 0 #fff;
    -
    -
    -//== Code
    -//
    -//##
    -
    -$code-color:                  #c7254e;
    -$code-bg:                     #f9f2f4;
    -
    -$kbd-color:                   #fff;
    -$kbd-bg:                      #333;
    -
    -$pre-bg:                      #f5f5f5;
    -$pre-color:                   $gray-dark;
    -$pre-border-color:            #ccc;
    -$pre-scrollable-max-height:   340px;
    -
    -
    -//== Type
    -//
    -//##
    -
    -//** Horizontal offset for forms and lists.
    -$component-offset-horizontal: 180px;
    -//** Text muted color
    -$text-muted:                  $gray-light;
    -//** Abbreviations and acronyms border color
    -$abbr-border-color:           $gray-light;
    -//** Headings small color
    -$headings-small-color:        $gray-light;
    -//** Blockquote small color
    -$blockquote-small-color:      $gray-light;
    -//** Blockquote font size
    -$blockquote-font-size:        ($font-size-base * 1.25);
    -//** Blockquote border color
    -$blockquote-border-color:     $gray-lighter;
    -//** Page header border color
    -$page-header-border-color:    $gray-lighter;
    -//** Width of horizontal description list titles
    -$dl-horizontal-offset:        $component-offset-horizontal;
    -//** Horizontal line color.
    -$hr-border:                   $gray-lighter;
    diff --git a/server/templates/admin/app/css/_widgets.scss b/server/templates/admin/app/css/_widgets.scss
    deleted file mode 100644
    index 2670a6c9..00000000
    --- a/server/templates/admin/app/css/_widgets.scss
    +++ /dev/null
    @@ -1,361 +0,0 @@
    -// Widgets
    -
    -$widget-head-bg-start: darken($body-bg, 10%);
    -$widget-head-bg-end: darken($body-bg, 15%);
    -
    -$widget-body-bg: transparent;
    -$widget-border-color: darken($body-bg, 25%);
    -
    -
    -.widget {
    -  background: $widget-body-bg;
    -  border: 1px solid $widget-border-color;
    -  margin: 0 auto 20px;
    -  position: static;
    -
    -  .tab-content {
    -    padding: 0;
    -  }
    -
    -  .widget-head {
    -    background-color: $widget-head-bg-start;
    -    background-image: linear-gradient(to bottom, $widget-head-bg-start, $widget-head-bg-end);
    -    background-image: -moz-linear-gradient(top, $widget-head-bg-start, $widget-head-bg-end);
    -    background-image: -o-linear-gradient(top, $widget-head-bg-start, $widget-head-bg-end);
    -    background-image: -webkit-gradient(linear, 0 0, 0 100%, from($widget-head-bg-start), to($widget-head-bg-end));
    -    background-image: -webkit-linear-gradient(top, $widget-head-bg-start, $widget-head-bg-end);
    -    background-repeat: repeat-x;
    -    border-bottom: 1px solid $widget-border-color;
    -    color: $text-color;
    -    height: 40px;
    -    line-height: 40px;
    -    padding: 0 15px 0 0;
    -    position: relative;
    -    // text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    -
    -    &.progress {
    -      border-radius: 0 0 0 0;
    -      margin: 0;
    -      moz-border-radius: 0 0 0 0;
    -      padding: 0;
    -      webkit-border-radius: 0 0 0 0;
    -    }
    -
    -    .glyphicons {
    -      height: 40px;
    -      padding: 0;
    -      width: 30px;
    -    }
    -
    -    .fai:before {
    -      color: rgba(255, 255, 255, 0.5);
    -      font-size: 16px;
    -      height: 40px;
    -      line-height: 31px;
    -      text-align: center;
    -      width: 30px;
    -    }
    -
    -    .heading {
    -      color: $text-color;
    -      float: left;
    -      font-size: 14px;
    -      height: 40px;
    -      line-height: 40px;
    -      margin: 0;
    -      padding: 0 15px;
    -
    -      &.glyphicons {
    -        display: block;
    -        padding: 0 0 0 35px;
    -        width: auto;
    -      }
    -
    -      &.fai:before {
    -        color: #45484d;
    -        font-size: 16px;
    -        font-weight: normal;
    -        height: 40px;
    -        left: 0;
    -        line-height: 40px;
    -        margin: 0;
    -        padding: 0;
    -        text-align: center;
    -        text-shadow: none;
    -        top: 0;
    -        width: 35px;
    -      }
    -    }
    -
    -    a {
    -      text-shadow: none;
    -    }
    -
    -    .dropdown-menu li > a {
    -      &:hover, &:focus {
    -        background-color: $body-bg;
    -        background-image: linear-gradient(to bottom, $body-bg, #d24343);
    -        background-image: -moz-linear-gradient(top, $body-bg, #d24343);
    -        background-image: -o-linear-gradient(top, $body-bg, #d24343);
    -        background-image: -webkit-gradient(linear, 0 0, 0 100%, from($body-bg), to(#d24343));
    -        background-image: -webkit-linear-gradient(top, $body-bg, #d24343);
    -        background-repeat: repeat-x;
    -        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffda4c4c', endColorstr='#ffd24343', GradientType=0);
    -      }
    -    }
    -
    -    .dropdown-submenu:hover > a {
    -      background-color: $body-bg;
    -      background-image: linear-gradient(to bottom, $body-bg, #d24343);
    -      background-image: -moz-linear-gradient(top, $body-bg, #d24343);
    -      background-image: -o-linear-gradient(top, $body-bg, #d24343);
    -      background-image: -webkit-gradient(linear, 0 0, 0 100%, from($body-bg), to(#d24343));
    -      background-image: -webkit-linear-gradient(top, $body-bg, #d24343);
    -      background-repeat: repeat-x;
    -      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffda4c4c', endColorstr='#ffd24343', GradientType=0);
    -    }
    -  }
    -
    -  .details {
    -    color: $text-color;
    -    font-size: 8pt;
    -  }
    -
    -  .widget-body {
    -    padding: 20px 15px;
    -    background-color: $widget-body-bg;
    -
    -    form {
    -      margin: 0;
    -    }
    -
    -    .count {
    -      font-size: 15pt;
    -      font-weight: 400;
    -    }
    -
    -    > p:last-child {
    -      margin: 0;
    -    }
    -
    -    &.list {
    -      color: #575655;
    -      padding: 0;
    -
    -      ul {
    -        list-style: none;
    -        margin: 0;
    -
    -        li {
    -          border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    -          clear: both;
    -          height: 39px;
    -          line-height: 39px;
    -          padding: 0 10px;
    -          text-align: left;
    -
    -          &:first-child {
    -            border-top: none;
    -          }
    -
    -          &:last-child {
    -            border-bottom: none;
    -          }
    -
    -          .count {
    -            color: $body-bg;
    -            float: right;
    -          }
    -
    -          .sparkline {
    -            margin-left: 5px;
    -            position: relative;
    -            top: 5px;
    -          }
    -        }
    -      }
    -
    -      &.products {
    -        li {
    -          height: 60px;
    -          line-height: 60px;
    -        }
    -
    -        .img {
    -          background: #272729;
    -          border-radius: 3px 3px 3px 3px;
    -          color: #818181;
    -          cursor: pointer;
    -          display: inline-block;
    -          float: left;
    -          font-size: 10pt;
    -          font-weight: 600;
    -          height: 44px;
    -          line-height: 44px;
    -          margin: 8px 8px 0 0;
    -          moz-border-radius: 3px 3px 3px 3px;
    -          text-align: center;
    -          webkit-border-radius: 3px 3px 3px 3px;
    -          width: 48px;
    -        }
    -
    -        .title {
    -          display: inline-block;
    -          font-family: "Raleway",sans-serif;
    -          line-height: normal;
    -          padding: 13px 0 0;
    -          text-transform: uppercase;
    -
    -          strong {
    -            font-family: "Open Sans",sans-serif;
    -            text-transform: none;
    -          }
    -        }
    -      }
    -
    -      &.fluid ul li {
    -        height: auto;
    -        line-height: normal;
    -        padding: 10px;
    -      }
    -
    -      &.list-2 ul li {
    -        background: #f8f8f8;
    -        border-bottom: 1px solid #d8d9da;
    -        border-top: none;
    -
    -        &.active {
    -          background: #fff;
    -          border-color: #dddddd;
    -
    -          i:before {
    -            background: $body-bg;
    -            color: #fff;
    -            font-weight: normal;
    -            text-shadow: none;
    -          }
    -
    -          a {
    -            color: $body-bg;
    -          }
    -        }
    -
    -        &:last-child {
    -          border-bottom: none;
    -        }
    -
    -        a {
    -          color: #222;
    -          display: block;
    -          padding: 0 0 0 30px;
    -
    -          i:before {
    -            background: #dddddd;
    -            border: 1px solid #ccc;
    -            color: #555;
    -            font-size: 14px;
    -            height: 17px;
    -            left: 0;
    -            padding-top: 3px;
    -            text-align: center;
    -            text-shadow: 0 1px 0 #fff;
    -            top: 9px;
    -            vertical-align: middle;
    -            width: 20px;
    -          }
    -        }
    -
    -        &.hasSubmenu {
    -          height: auto;
    -
    -          ul {
    -            padding: 0 0 10px;
    -
    -            li {
    -              background: none;
    -              border: none;
    -              height: auto;
    -              line-height: 20px;
    -              line-height: normal;
    -
    -              a {
    -                color: #333;
    -                padding: 0 0 0 20px;
    -              }
    -
    -              &.active a {
    -                font-weight: bold;
    -              }
    -            }
    -          }
    -        }
    -      }
    -    }
    -  }
    -
    -  .widget-footer {
    -    background: $body-bg;
    -    // border-bottom: 1px solid $widget-border-color;
    -    border-top: 1px solid $widget-border-color;
    -    height: 25px;
    -    line-height: 25px;
    -
    -    .fa {
    -      float: right;
    -      height: 25px;
    -      line-height: 25px;
    -      padding: 0;
    -      width: 25px;
    -
    -      i:before {
    -        color: #c3c3c3;
    -        font-size: 16px;
    -        height: 25px;
    -        line-height: 25px;
    -        text-align: center;
    -        text-shadow: 0 1px 0 #fff;
    -        width: 20px;
    -      }
    -
    -      &:hover i:before {
    -        color: rgba(0, 0, 0, 0.5);
    -      }
    -    }
    -  }
    -
    -  &.margin-bottom-none {
    -    margin-bottom: 0;
    -  }
    -
    -  &.widget-gray {
    -    background: #f5f5f5;
    -
    -    .widget-head {
    -      background: #e9e9e9;
    -      border-color: #d1d2d3;
    -      box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.6), inset -1px -1px 1px rgba(0, 0, 0, 0);
    -      moz-box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.6), inset -1px -1px 1px rgba(0, 0, 0, 0);
    -      webkit-box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.6), inset -1px -1px 1px rgba(0, 0, 0, 0);
    -
    -      .heading {
    -        color: #555555;
    -        text-shadow: 0 1px 0 #fff;
    -
    -        &.fai:before {
    -          background: none;
    -          border-color: rgba(0, 0, 0, 0.1);
    -          color: #555;
    -        }
    -      }
    -    }
    -  }
    -
    -  &.widget-body-white .widget-body {
    -    background: $body-bg;
    -  }
    -}
    -
    -.widget-icon {
    -  margin-left: 0.6em !important;
    -  cursor: pointer;
    -}
    diff --git a/server/templates/admin/app/css/bootstrap-switch.css b/server/templates/admin/app/css/bootstrap-switch.css
    deleted file mode 100644
    index 6c0cc1dd..00000000
    --- a/server/templates/admin/app/css/bootstrap-switch.css
    +++ /dev/null
    @@ -1,195 +0,0 @@
    -/* ========================================================================
    - * bootstrap-switch - v3.3.2
    - * http://www.bootstrap-switch.org
    - * ========================================================================
    - * Copyright 2012-2013 Mattia Larentis
    - *
    - * ========================================================================
    - * Licensed under the Apache License, Version 2.0 (the "License");
    - * you may not use this file except in compliance with the License.
    - * You may obtain a copy of the License at
    - *
    - *     http://www.apache.org/licenses/LICENSE-2.0
    - *
    - * Unless required by applicable law or agreed to in writing, software
    - * distributed under the License is distributed on an "AS IS" BASIS,
    - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    - * See the License for the specific language governing permissions and
    - * limitations under the License.
    - * ========================================================================
    - */
    -
    -.bootstrap-switch {
    -  display: inline-block;
    -  direction: ltr;
    -  cursor: pointer;
    -  border-radius: 4px;
    -  border: 1px solid;
    -  border-color: #cccccc;
    -  position: relative;
    -  text-align: left;
    -  overflow: hidden;
    -  line-height: 8px;
    -  z-index: 0;
    -  -webkit-user-select: none;
    -  -moz-user-select: none;
    -  -ms-user-select: none;
    -  user-select: none;
    -  vertical-align: middle;
    -  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -}
    -.bootstrap-switch .bootstrap-switch-container {
    -  display: inline-block;
    -  top: 0;
    -  border-radius: 4px;
    -  -webkit-transform: translate3d(0, 0, 0);
    -  transform: translate3d(0, 0, 0);
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on,
    -.bootstrap-switch .bootstrap-switch-handle-off,
    -.bootstrap-switch .bootstrap-switch-label {
    -  -webkit-box-sizing: border-box;
    -  -moz-box-sizing: border-box;
    -  box-sizing: border-box;
    -  cursor: pointer;
    -  display: inline-block !important;
    -  height: 100%;
    -  padding: 6px 12px;
    -  font-size: 14px;
    -  line-height: 20px;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on,
    -.bootstrap-switch .bootstrap-switch-handle-off {
    -  text-align: center;
    -  z-index: 1;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
    -.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
    -  color: #fff;
    -  background: #337ab7;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
    -.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
    -  color: #fff;
    -  background: #5bc0de;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
    -.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
    -  color: #fff;
    -  background: #5cb85c;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
    -.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
    -  background: #f0ad4e;
    -  color: #fff;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
    -.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
    -  color: #fff;
    -  background: #d9534f;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
    -.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
    -  color: #000;
    -  background: #eeeeee;
    -}
    -.bootstrap-switch .bootstrap-switch-label {
    -  text-align: center;
    -  margin-top: -1px;
    -  margin-bottom: -1px;
    -  z-index: 100;
    -  color: #333333;
    -  background: #ffffff;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-on {
    -  border-bottom-left-radius: 3px;
    -  border-top-left-radius: 3px;
    -}
    -.bootstrap-switch .bootstrap-switch-handle-off {
    -  border-bottom-right-radius: 3px;
    -  border-top-right-radius: 3px;
    -}
    -.bootstrap-switch input[type='radio'],
    -.bootstrap-switch input[type='checkbox'] {
    -  position: absolute !important;
    -  top: 0;
    -  left: 0;
    -  margin: 0;
    -  z-index: -1;
    -  opacity: 0;
    -  filter: alpha(opacity=0);
    -}
    -.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
    -.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
    -.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
    -  padding: 1px 5px;
    -  font-size: 12px;
    -  line-height: 1.5;
    -}
    -.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
    -.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
    -.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
    -  padding: 5px 10px;
    -  font-size: 12px;
    -  line-height: 1.5;
    -}
    -.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
    -.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
    -.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
    -  padding: 6px 16px;
    -  font-size: 18px;
    -  line-height: 1.3333333;
    -}
    -.bootstrap-switch.bootstrap-switch-disabled,
    -.bootstrap-switch.bootstrap-switch-readonly,
    -.bootstrap-switch.bootstrap-switch-indeterminate {
    -  cursor: default !important;
    -}
    -.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
    -.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
    -.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
    -.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
    -.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
    -.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
    -.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
    -.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
    -.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
    -  opacity: 0.5;
    -  filter: alpha(opacity=50);
    -  cursor: default !important;
    -}
    -.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
    -  -webkit-transition: margin-left 0.5s;
    -  -o-transition: margin-left 0.5s;
    -  transition: margin-left 0.5s;
    -}
    -.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
    -  border-bottom-left-radius: 0;
    -  border-top-left-radius: 0;
    -  border-bottom-right-radius: 3px;
    -  border-top-right-radius: 3px;
    -}
    -.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
    -  border-bottom-right-radius: 0;
    -  border-top-right-radius: 0;
    -  border-bottom-left-radius: 3px;
    -  border-top-left-radius: 3px;
    -}
    -.bootstrap-switch.bootstrap-switch-focused {
    -  border-color: #66afe9;
    -  outline: 0;
    -  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
    -  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
    -}
    -.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
    -.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
    -  border-bottom-right-radius: 3px;
    -  border-top-right-radius: 3px;
    -}
    -.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
    -.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
    -  border-bottom-left-radius: 3px;
    -  border-top-left-radius: 3px;
    -}
    diff --git a/server/templates/admin/app/css/datatables.css b/server/templates/admin/app/css/datatables.css
    deleted file mode 100644
    index 4f51af84..00000000
    --- a/server/templates/admin/app/css/datatables.css
    +++ /dev/null
    @@ -1,809 +0,0 @@
    -/*
    - * This combined file was created by the DataTables downloader builder:
    - *   https://datatables.net/download
    - *
    - * To rebuild or modify this file with the latest versions of the included
    - * software please visit:
    - *   https://datatables.net/download/#dt/dt-1.10.11,cr-1.3.1,fh-3.1.1,r-2.0.2,rr-1.1.1,se-1.1.2
    - *
    - * Included libraries:
    - *   DataTables 1.10.11, ColReorder 1.3.1, FixedHeader 3.1.1, Responsive 2.0.2, RowReorder 1.1.1, Select 1.1.2
    - */
    -
    -/*
    - * Table styles
    - */
    -table.dataTable {
    -  width: 100%;
    -  margin: 0 auto;
    -  clear: both;
    -  border-collapse: separate;
    -  border-spacing: 0;
    -  /*
    -   * Header and footer styles
    -   */
    -  /*
    -   * Body styles
    -   */
    -}
    -table.dataTable thead th,
    -table.dataTable tfoot th {
    -  font-weight: bold;
    -}
    -table.dataTable thead th,
    -table.dataTable thead td {
    -  padding: 10px 18px;
    -  border-bottom: 1px solid #111;
    -}
    -table.dataTable thead th:active,
    -table.dataTable thead td:active {
    -  outline: none;
    -}
    -table.dataTable tfoot th,
    -table.dataTable tfoot td {
    -  padding: 10px 18px 6px 18px;
    -  border-top: 1px solid #111;
    -}
    -table.dataTable thead .sorting,
    -table.dataTable thead .sorting_asc,
    -table.dataTable thead .sorting_desc {
    -  cursor: pointer;
    -  *cursor: hand;
    -}
    -table.dataTable thead .sorting,
    -table.dataTable thead .sorting_asc,
    -table.dataTable thead .sorting_desc,
    -table.dataTable thead .sorting_asc_disabled,
    -table.dataTable thead .sorting_desc_disabled {
    -  background-repeat: no-repeat;
    -  background-position: center right;
    -}
    -table.dataTable thead .sorting {
    -  background-image: url("DataTables-1.10.11/images/sort_both.png");
    -}
    -table.dataTable thead .sorting_asc {
    -  background-image: url("DataTables-1.10.11/images/sort_asc.png");
    -}
    -table.dataTable thead .sorting_desc {
    -  background-image: url("DataTables-1.10.11/images/sort_desc.png");
    -}
    -table.dataTable thead .sorting_asc_disabled {
    -  background-image: url("DataTables-1.10.11/images/sort_asc_disabled.png");
    -}
    -table.dataTable thead .sorting_desc_disabled {
    -  background-image: url("DataTables-1.10.11/images/sort_desc_disabled.png");
    -}
    -table.dataTable tbody tr {
    -  background-color: #ffffff;
    -}
    -table.dataTable tbody tr.selected {
    -  background-color: #B0BED9;
    -}
    -table.dataTable tbody th,
    -table.dataTable tbody td {
    -  padding: 8px 10px;
    -}
    -table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
    -  border-top: 1px solid #ddd;
    -}
    -table.dataTable.row-border tbody tr:first-child th,
    -table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
    -table.dataTable.display tbody tr:first-child td {
    -  border-top: none;
    -}
    -table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
    -  border-top: 1px solid #ddd;
    -  border-right: 1px solid #ddd;
    -}
    -table.dataTable.cell-border tbody tr th:first-child,
    -table.dataTable.cell-border tbody tr td:first-child {
    -  border-left: 1px solid #ddd;
    -}
    -table.dataTable.cell-border tbody tr:first-child th,
    -table.dataTable.cell-border tbody tr:first-child td {
    -  border-top: none;
    -}
    -table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
    -  background-color: #f9f9f9;
    -}
    -table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
    -  background-color: #acbad4;
    -}
    -table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
    -  background-color: #f6f6f6;
    -}
    -table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
    -  background-color: #aab7d1;
    -}
    -table.dataTable.order-column tbody tr > .sorting_1,
    -table.dataTable.order-column tbody tr > .sorting_2,
    -table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
    -table.dataTable.display tbody tr > .sorting_2,
    -table.dataTable.display tbody tr > .sorting_3 {
    -  background-color: #fafafa;
    -}
    -table.dataTable.order-column tbody tr.selected > .sorting_1,
    -table.dataTable.order-column tbody tr.selected > .sorting_2,
    -table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
    -table.dataTable.display tbody tr.selected > .sorting_2,
    -table.dataTable.display tbody tr.selected > .sorting_3 {
    -  background-color: #acbad5;
    -}
    -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
    -  background-color: #f1f1f1;
    -}
    -table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
    -  background-color: #f3f3f3;
    -}
    -table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
    -  background-color: whitesmoke;
    -}
    -table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
    -  background-color: #a6b4cd;
    -}
    -table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
    -  background-color: #a8b5cf;
    -}
    -table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
    -  background-color: #a9b7d1;
    -}
    -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
    -  background-color: #fafafa;
    -}
    -table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
    -  background-color: #fcfcfc;
    -}
    -table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
    -  background-color: #fefefe;
    -}
    -table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
    -  background-color: #acbad5;
    -}
    -table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
    -  background-color: #aebcd6;
    -}
    -table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
    -  background-color: #afbdd8;
    -}
    -table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
    -  background-color: #eaeaea;
    -}
    -table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
    -  background-color: #ececec;
    -}
    -table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
    -  background-color: #efefef;
    -}
    -table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
    -  background-color: #a2aec7;
    -}
    -table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
    -  background-color: #a3b0c9;
    -}
    -table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
    -  background-color: #a5b2cb;
    -}
    -table.dataTable.no-footer {
    -  border-bottom: 1px solid #111;
    -}
    -table.dataTable.nowrap th, table.dataTable.nowrap td {
    -  white-space: nowrap;
    -}
    -table.dataTable.compact thead th,
    -table.dataTable.compact thead td {
    -  padding: 4px 17px 4px 4px;
    -}
    -table.dataTable.compact tfoot th,
    -table.dataTable.compact tfoot td {
    -  padding: 4px;
    -}
    -table.dataTable.compact tbody th,
    -table.dataTable.compact tbody td {
    -  padding: 4px;
    -}
    -table.dataTable th.dt-left,
    -table.dataTable td.dt-left {
    -  text-align: left;
    -}
    -table.dataTable th.dt-center,
    -table.dataTable td.dt-center,
    -table.dataTable td.dataTables_empty {
    -  text-align: center;
    -}
    -table.dataTable th.dt-right,
    -table.dataTable td.dt-right {
    -  text-align: right;
    -}
    -table.dataTable th.dt-justify,
    -table.dataTable td.dt-justify {
    -  text-align: justify;
    -}
    -table.dataTable th.dt-nowrap,
    -table.dataTable td.dt-nowrap {
    -  white-space: nowrap;
    -}
    -table.dataTable thead th.dt-head-left,
    -table.dataTable thead td.dt-head-left,
    -table.dataTable tfoot th.dt-head-left,
    -table.dataTable tfoot td.dt-head-left {
    -  text-align: left;
    -}
    -table.dataTable thead th.dt-head-center,
    -table.dataTable thead td.dt-head-center,
    -table.dataTable tfoot th.dt-head-center,
    -table.dataTable tfoot td.dt-head-center {
    -  text-align: center;
    -}
    -table.dataTable thead th.dt-head-right,
    -table.dataTable thead td.dt-head-right,
    -table.dataTable tfoot th.dt-head-right,
    -table.dataTable tfoot td.dt-head-right {
    -  text-align: right;
    -}
    -table.dataTable thead th.dt-head-justify,
    -table.dataTable thead td.dt-head-justify,
    -table.dataTable tfoot th.dt-head-justify,
    -table.dataTable tfoot td.dt-head-justify {
    -  text-align: justify;
    -}
    -table.dataTable thead th.dt-head-nowrap,
    -table.dataTable thead td.dt-head-nowrap,
    -table.dataTable tfoot th.dt-head-nowrap,
    -table.dataTable tfoot td.dt-head-nowrap {
    -  white-space: nowrap;
    -}
    -table.dataTable tbody th.dt-body-left,
    -table.dataTable tbody td.dt-body-left {
    -  text-align: left;
    -}
    -table.dataTable tbody th.dt-body-center,
    -table.dataTable tbody td.dt-body-center {
    -  text-align: center;
    -}
    -table.dataTable tbody th.dt-body-right,
    -table.dataTable tbody td.dt-body-right {
    -  text-align: right;
    -}
    -table.dataTable tbody th.dt-body-justify,
    -table.dataTable tbody td.dt-body-justify {
    -  text-align: justify;
    -}
    -table.dataTable tbody th.dt-body-nowrap,
    -table.dataTable tbody td.dt-body-nowrap {
    -  white-space: nowrap;
    -}
    -
    -table.dataTable,
    -table.dataTable th,
    -table.dataTable td {
    -  -webkit-box-sizing: content-box;
    -  -moz-box-sizing: content-box;
    -  box-sizing: content-box;
    -}
    -
    -/*
    - * Control feature layout
    - */
    -.dataTables_wrapper {
    -  position: relative;
    -  clear: both;
    -  *zoom: 1;
    -  zoom: 1;
    -}
    -.dataTables_wrapper .dataTables_length {
    -  float: left;
    -}
    -.dataTables_wrapper .dataTables_filter {
    -  float: right;
    -  text-align: right;
    -}
    -.dataTables_wrapper .dataTables_filter input {
    -  margin-left: 0.5em;
    -}
    -.dataTables_wrapper .dataTables_info {
    -  clear: both;
    -  float: left;
    -  padding-top: 0.755em;
    -}
    -.dataTables_wrapper .dataTables_paginate {
    -  float: right;
    -  text-align: right;
    -  padding-top: 0.25em;
    -}
    -.dataTables_wrapper .dataTables_paginate .paginate_button {
    -  box-sizing: border-box;
    -  display: inline-block;
    -  min-width: 1.5em;
    -  padding: 0.5em 1em;
    -  margin-left: 2px;
    -  text-align: center;
    -  text-decoration: none !important;
    -  cursor: pointer;
    -  *cursor: hand;
    -  color: #333 !important;
    -  border: 1px solid transparent;
    -  border-radius: 2px;
    -}
    -.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    -  color: #333 !important;
    -  border: 1px solid #979797;
    -  background-color: white;
    -  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
    -  /* Chrome,Safari4+ */
    -  background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
    -  /* Chrome10+,Safari5.1+ */
    -  background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
    -  /* FF3.6+ */
    -  background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
    -  /* IE10+ */
    -  background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
    -  /* Opera 11.10+ */
    -  background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
    -  /* W3C */
    -}
    -.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    -  cursor: default;
    -  color: #666 !important;
    -  border: 1px solid transparent;
    -  background: transparent;
    -  box-shadow: none;
    -}
    -.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    -  color: white !important;
    -  border: 1px solid #111;
    -  background-color: #585858;
    -  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
    -  /* Chrome,Safari4+ */
    -  background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
    -  /* Chrome10+,Safari5.1+ */
    -  background: -moz-linear-gradient(top, #585858 0%, #111 100%);
    -  /* FF3.6+ */
    -  background: -ms-linear-gradient(top, #585858 0%, #111 100%);
    -  /* IE10+ */
    -  background: -o-linear-gradient(top, #585858 0%, #111 100%);
    -  /* Opera 11.10+ */
    -  background: linear-gradient(to bottom, #585858 0%, #111 100%);
    -  /* W3C */
    -}
    -.dataTables_wrapper .dataTables_paginate .paginate_button:active {
    -  outline: none;
    -  background-color: #2b2b2b;
    -  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
    -  /* Chrome,Safari4+ */
    -  background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
    -  /* Chrome10+,Safari5.1+ */
    -  background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
    -  /* FF3.6+ */
    -  background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
    -  /* IE10+ */
    -  background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
    -  /* Opera 11.10+ */
    -  background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
    -  /* W3C */
    -  box-shadow: inset 0 0 3px #111;
    -}
    -.dataTables_wrapper .dataTables_paginate .ellipsis {
    -  padding: 0 1em;
    -}
    -.dataTables_wrapper .dataTables_processing {
    -  position: absolute;
    -  top: 50%;
    -  left: 50%;
    -  width: 100%;
    -  height: 40px;
    -  margin-left: -50%;
    -  margin-top: -25px;
    -  padding-top: 20px;
    -  text-align: center;
    -  font-size: 1.2em;
    -  background-color: white;
    -  background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
    -  background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
    -  background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
    -  background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
    -  background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
    -  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
    -}
    -.dataTables_wrapper .dataTables_length,
    -.dataTables_wrapper .dataTables_filter,
    -.dataTables_wrapper .dataTables_info,
    -.dataTables_wrapper .dataTables_processing,
    -.dataTables_wrapper .dataTables_paginate {
    -  color: #333;
    -}
    -.dataTables_wrapper .dataTables_scroll {
    -  clear: both;
    -}
    -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
    -  *margin-top: -1px;
    -  -webkit-overflow-scrolling: touch;
    -}
    -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td {
    -  vertical-align: middle;
    -}
    -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing,
    -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing {
    -  height: 0;
    -  overflow: hidden;
    -  margin: 0 !important;
    -  padding: 0 !important;
    -}
    -.dataTables_wrapper.no-footer .dataTables_scrollBody {
    -  border-bottom: 1px solid #111;
    -}
    -.dataTables_wrapper.no-footer div.dataTables_scrollHead table,
    -.dataTables_wrapper.no-footer div.dataTables_scrollBody table {
    -  border-bottom: none;
    -}
    -.dataTables_wrapper:after {
    -  visibility: hidden;
    -  display: block;
    -  content: "";
    -  clear: both;
    -  height: 0;
    -}
    -
    -@media screen and (max-width: 767px) {
    -  .dataTables_wrapper .dataTables_info,
    -  .dataTables_wrapper .dataTables_paginate {
    -    float: none;
    -    text-align: center;
    -  }
    -  .dataTables_wrapper .dataTables_paginate {
    -    margin-top: 0.5em;
    -  }
    -}
    -@media screen and (max-width: 640px) {
    -  .dataTables_wrapper .dataTables_length,
    -  .dataTables_wrapper .dataTables_filter {
    -    float: none;
    -    text-align: center;
    -  }
    -  .dataTables_wrapper .dataTables_filter {
    -    margin-top: 0.5em;
    -  }
    -}
    -
    -
    -table.DTCR_clonedTable.dataTable {
    -  position: absolute !important;
    -  background-color: rgba(255, 255, 255, 0.7);
    -  z-index: 202;
    -}
    -
    -div.DTCR_pointer {
    -  width: 1px;
    -  background-color: #0259C4;
    -  z-index: 201;
    -}
    -
    -
    -table.fixedHeader-floating {
    -  position: fixed !important;
    -  background-color: white;
    -}
    -
    -table.fixedHeader-floating.no-footer {
    -  border-bottom-width: 0;
    -}
    -
    -table.fixedHeader-locked {
    -  position: absolute !important;
    -  background-color: white;
    -}
    -
    -@media print {
    -  table.fixedHeader-floating {
    -    display: none;
    -  }
    -}
    -
    -
    -table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
    -table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
    -table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
    -  cursor: default !important;
    -}
    -table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
    -table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
    -table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
    -  display: none !important;
    -}
    -table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
    -table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
    -  position: relative;
    -  padding-left: 30px;
    -  cursor: pointer;
    -}
    -table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
    -table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
    -  top: 8px;
    -  left: 4px;
    -  height: 16px;
    -  width: 16px;
    -  display: block;
    -  position: absolute;
    -  color: white;
    -  border: 2px solid white;
    -  border-radius: 16px;
    -  box-shadow: 0 0 3px #444;
    -  box-sizing: content-box;
    -  text-align: left;
    -  font-family: 'Courier New', Courier, monospace;
    -  text-indent: 4px;
    -  line-height: 16px;
    -  content: '+';
    -  background-color: #31b131;
    -}
    -table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
    -table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
    -  content: '-';
    -  background-color: #d33333;
    -}
    -table.dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
    -  display: none;
    -}
    -table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
    -table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
    -  padding-left: 27px;
    -}
    -table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child:before,
    -table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:before {
    -  top: 5px;
    -  left: 4px;
    -  height: 14px;
    -  width: 14px;
    -  border-radius: 14px;
    -  line-height: 14px;
    -  text-indent: 3px;
    -}
    -table.dataTable.dtr-column > tbody > tr > td.control,
    -table.dataTable.dtr-column > tbody > tr > th.control {
    -  position: relative;
    -  cursor: pointer;
    -}
    -table.dataTable.dtr-column > tbody > tr > td.control:before,
    -table.dataTable.dtr-column > tbody > tr > th.control:before {
    -  top: 50%;
    -  left: 50%;
    -  height: 16px;
    -  width: 16px;
    -  margin-top: -10px;
    -  margin-left: -10px;
    -  display: block;
    -  position: absolute;
    -  color: white;
    -  border: 2px solid white;
    -  border-radius: 16px;
    -  box-shadow: 0 0 3px #444;
    -  box-sizing: content-box;
    -  text-align: left;
    -  font-family: 'Courier New', Courier, monospace;
    -  text-indent: 4px;
    -  line-height: 16px;
    -  content: '+';
    -  background-color: #31b131;
    -}
    -table.dataTable.dtr-column > tbody > tr.parent td.control:before,
    -table.dataTable.dtr-column > tbody > tr.parent th.control:before {
    -  content: '-';
    -  background-color: #d33333;
    -}
    -table.dataTable > tbody > tr.child {
    -  padding: 0.5em 1em;
    -}
    -table.dataTable > tbody > tr.child:hover {
    -  background: transparent !important;
    -}
    -table.dataTable > tbody > tr.child ul {
    -  display: inline-block;
    -  list-style-type: none;
    -  margin: 0;
    -  padding: 0;
    -}
    -table.dataTable > tbody > tr.child ul li {
    -  border-bottom: 1px solid #efefef;
    -  padding: 0.5em 0;
    -}
    -table.dataTable > tbody > tr.child ul li:first-child {
    -  padding-top: 0;
    -}
    -table.dataTable > tbody > tr.child ul li:last-child {
    -  border-bottom: none;
    -}
    -table.dataTable > tbody > tr.child span.dtr-title {
    -  display: inline-block;
    -  min-width: 75px;
    -  font-weight: bold;
    -}
    -
    -div.dtr-modal {
    -  position: fixed;
    -  box-sizing: border-box;
    -  top: 0;
    -  left: 0;
    -  height: 100%;
    -  width: 100%;
    -  z-index: 100;
    -  padding: 10em 1em;
    -}
    -div.dtr-modal div.dtr-modal-display {
    -  position: absolute;
    -  top: 0;
    -  left: 0;
    -  bottom: 0;
    -  right: 0;
    -  width: 50%;
    -  height: 50%;
    -  overflow: auto;
    -  margin: auto;
    -  z-index: 102;
    -  overflow: auto;
    -  background-color: #f5f5f7;
    -  border: 1px solid black;
    -  border-radius: 0.5em;
    -  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    -}
    -div.dtr-modal div.dtr-modal-content {
    -  position: relative;
    -  padding: 1em;
    -}
    -div.dtr-modal div.dtr-modal-close {
    -  position: absolute;
    -  top: 6px;
    -  right: 6px;
    -  width: 22px;
    -  height: 22px;
    -  border: 1px solid #eaeaea;
    -  background-color: #f9f9f9;
    -  text-align: center;
    -  border-radius: 3px;
    -  cursor: pointer;
    -  z-index: 12;
    -}
    -div.dtr-modal div.dtr-modal-close:hover {
    -  background-color: #eaeaea;
    -}
    -div.dtr-modal div.dtr-modal-background {
    -  position: fixed;
    -  top: 0;
    -  left: 0;
    -  right: 0;
    -  bottom: 0;
    -  z-index: 101;
    -  background: rgba(0, 0, 0, 0.6);
    -}
    -
    -@media screen and (max-width: 767px) {
    -  div.dtr-modal div.dtr-modal-display {
    -    width: 95%;
    -  }
    -}
    -
    -
    -table.dt-rowReorder-float {
    -  position: absolute !important;
    -  opacity: 0.8;
    -  table-layout: static;
    -  outline: 2px solid #888;
    -  outline-offset: -2px;
    -  z-index: 2001;
    -}
    -
    -tr.dt-rowReorder-moving {
    -  outline: 2px solid #555;
    -  outline-offset: -2px;
    -}
    -
    -body.dt-rowReorder-noOverflow {
    -  overflow-x: hidden;
    -}
    -
    -table.dataTable td.reorder {
    -  text-align: center;
    -  cursor: move;
    -}
    -
    -
    -table.dataTable tbody > tr.selected,
    -table.dataTable tbody > tr > .selected {
    -  background-color: #B0BED9;
    -}
    -table.dataTable.stripe tbody > tr.odd.selected,
    -table.dataTable.stripe tbody > tr.odd > .selected, table.dataTable.display tbody > tr.odd.selected,
    -table.dataTable.display tbody > tr.odd > .selected {
    -  background-color: #acbad4;
    -}
    -table.dataTable.hover tbody > tr.selected:hover,
    -table.dataTable.hover tbody > tr > .selected:hover, table.dataTable.display tbody > tr.selected:hover,
    -table.dataTable.display tbody > tr > .selected:hover {
    -  background-color: #aab7d1;
    -}
    -table.dataTable.order-column tbody > tr.selected > .sorting_1,
    -table.dataTable.order-column tbody > tr.selected > .sorting_2,
    -table.dataTable.order-column tbody > tr.selected > .sorting_3,
    -table.dataTable.order-column tbody > tr > .selected, table.dataTable.display tbody > tr.selected > .sorting_1,
    -table.dataTable.display tbody > tr.selected > .sorting_2,
    -table.dataTable.display tbody > tr.selected > .sorting_3,
    -table.dataTable.display tbody > tr > .selected {
    -  background-color: #acbad5;
    -}
    -table.dataTable.display tbody > tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody > tr.odd.selected > .sorting_1 {
    -  background-color: #a6b4cd;
    -}
    -table.dataTable.display tbody > tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody > tr.odd.selected > .sorting_2 {
    -  background-color: #a8b5cf;
    -}
    -table.dataTable.display tbody > tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody > tr.odd.selected > .sorting_3 {
    -  background-color: #a9b7d1;
    -}
    -table.dataTable.display tbody > tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody > tr.even.selected > .sorting_1 {
    -  background-color: #acbad5;
    -}
    -table.dataTable.display tbody > tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody > tr.even.selected > .sorting_2 {
    -  background-color: #aebcd6;
    -}
    -table.dataTable.display tbody > tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody > tr.even.selected > .sorting_3 {
    -  background-color: #afbdd8;
    -}
    -table.dataTable.display tbody > tr.odd > .selected, table.dataTable.order-column.stripe tbody > tr.odd > .selected {
    -  background-color: #a6b4cd;
    -}
    -table.dataTable.display tbody > tr.even > .selected, table.dataTable.order-column.stripe tbody > tr.even > .selected {
    -  background-color: #acbad5;
    -}
    -table.dataTable.display tbody > tr.selected:hover > .sorting_1, table.dataTable.order-column.hover tbody > tr.selected:hover > .sorting_1 {
    -  background-color: #a2aec7;
    -}
    -table.dataTable.display tbody > tr.selected:hover > .sorting_2, table.dataTable.order-column.hover tbody > tr.selected:hover > .sorting_2 {
    -  background-color: #a3b0c9;
    -}
    -table.dataTable.display tbody > tr.selected:hover > .sorting_3, table.dataTable.order-column.hover tbody > tr.selected:hover > .sorting_3 {
    -  background-color: #a5b2cb;
    -}
    -table.dataTable.display tbody > tr:hover > .selected,
    -table.dataTable.display tbody > tr > .selected:hover, table.dataTable.order-column.hover tbody > tr:hover > .selected,
    -table.dataTable.order-column.hover tbody > tr > .selected:hover {
    -  background-color: #a2aec7;
    -}
    -table.dataTable td.select-checkbox {
    -  position: relative;
    -}
    -table.dataTable td.select-checkbox:before, table.dataTable td.select-checkbox:after {
    -  display: block;
    -  position: absolute;
    -  top: 1.2em;
    -  left: 50%;
    -  width: 12px;
    -  height: 12px;
    -  box-sizing: border-box;
    -}
    -table.dataTable td.select-checkbox:before {
    -  content: ' ';
    -  margin-top: -6px;
    -  margin-left: -6px;
    -  border: 1px solid black;
    -  border-radius: 3px;
    -}
    -table.dataTable tr.selected td.select-checkbox:after {
    -  content: '\2714';
    -  margin-top: -11px;
    -  margin-left: -4px;
    -  text-align: center;
    -  text-shadow: 1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9;
    -}
    -
    -div.dataTables_wrapper span.select-info,
    -div.dataTables_wrapper span.select-item {
    -  margin-left: 0.5em;
    -}
    -
    -@media screen and (max-width: 640px) {
    -  div.dataTables_wrapper span.select-info,
    -  div.dataTables_wrapper span.select-item {
    -    margin-left: 0;
    -    display: block;
    -  }
    -}
    -
    -
    diff --git a/server/templates/admin/app/css/font-awesome.min.css b/server/templates/admin/app/css/font-awesome.min.css
    deleted file mode 100644
    index ec53d4d6..00000000
    --- a/server/templates/admin/app/css/font-awesome.min.css
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -/*!
    - *  Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
    - *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
    - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}
    \ No newline at end of file
    diff --git a/server/templates/admin/app/css/jquery.bootstrap-touchspin.css b/server/templates/admin/app/css/jquery.bootstrap-touchspin.css
    deleted file mode 100644
    index 18e9626e..00000000
    --- a/server/templates/admin/app/css/jquery.bootstrap-touchspin.css
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -/*
    - *  Bootstrap TouchSpin - v3.0.1
    - *  A mobile and touch friendly input spinner component for Bootstrap 3.
    - *  http://www.virtuosoft.eu/code/bootstrap-touchspin/
    - *
    - *  Made by István Ujj-Mészáros
    - *  Under Apache License v2.0 License
    - */
    -
    -.bootstrap-touchspin .input-group-btn-vertical {
    -  position: relative;
    -  white-space: nowrap;
    -  width: 1%;
    -  vertical-align: middle;
    -  display: table-cell;
    -}
    -
    -.bootstrap-touchspin .input-group-btn-vertical > .btn {
    -  display: block;
    -  float: none;
    -  width: 100%;
    -  max-width: 100%;
    -  padding: 8px 10px;
    -  margin-left: -1px;
    -  position: relative;
    -}
    -
    -.bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-up {
    -  border-radius: 0;
    -  border-top-right-radius: 0px;
    -}
    -
    -.bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-down {
    -  margin-top: -2px;
    -  border-radius: 0;
    -  border-bottom-right-radius: 0px;
    -}
    -
    -.bootstrap-touchspin .input-group-btn-vertical i {
    -  position: absolute;
    -  top: 3px;
    -  left: 5px;
    -  font-size: 9px;
    -  font-weight: normal;
    -}
    diff --git a/server/templates/admin/app/css/main.scss b/server/templates/admin/app/css/main.scss
    deleted file mode 100644
    index 7ca95941..00000000
    --- a/server/templates/admin/app/css/main.scss
    +++ /dev/null
    @@ -1,428 +0,0 @@
    -// Bootstrap
    -$icon-font-path: "../fonts/";
    -
    -@import "_tools";
    -@import "_udsvars";
    -
    -// Own variables
    -$sidebar-icon-width: 24px;
    -$sidebar-icon-width-collapsed: 24px;
    -
    -$sidebar-size: 225px;  // 225 px
    -$sidebar-size-collapsed: $sidebar-icon-width-collapsed + 2*$font-size-base; // 40px;
    -$sidebar-top: 50px;
    -
    -
    -$sidebar-switcher-size: 14px;
    -$sizebar-switcher-font-size: $sidebar-switcher-size - 2px;
    -$sidebar-switcher-pos: $sidebar-size - $sidebar-switcher-size;
    -$sidebar-switcher-pos-collapsed: $sidebar-size-collapsed - $sidebar-switcher-size;
    -
    -
    -$uds-panel-min-height: 500px;
    -
    -
    -// bower:scss
    -@import "bower_components/bootstrap-sass/assets/stylesheets/_bootstrap.scss";
    -// endbower
    -
    -
    -@font-face {
    -  font-family: 'Droid Sans Mono';
    -  font-style: normal;
    -  font-weight: 400;
    -  src: local('Droid Sans Mono'), local('DroidSansMono'), url(#{$icon-font-path}/DroidSansMono.woff2) format('woff2');
    -}
    -
    -// Fix for firefox for fieldsets
    -@-moz-document url-prefix() {
    -  fieldset {
    -    display: table-cell;
    -  }
    -}
    -
    -body {
    -  font-family: 'Droid Sans Mono', sans-serif;
    -  background-color: $body-bg;
    -  margin-top: 50px;
    -}
    -
    -#wrapper {
    -  padding-left: 0;
    -}
    -
    -#page-wrapper {
    -  width: 100%;
    -  padding: 5px 15px;
    -}
    -
    -/* collapsable && closeable pannels */
    -
    -.chevron {
    -  &:before {
    -    content: "\f139";
    -  }
    -
    -  &.collapsed:before {
    -    content: "\f13a";
    -  }
    -}
    -
    -.widget-icon.fa-refresh {
    -  &:hover {
    -    animation: 2s linear 0s normal none infinite running fa-spin;
    -  }
    -}
    -
    -.panel-icon {
    -  margin-left: 0.6em !important;
    -  cursor: pointer;
    -}
    -
    -.table-icon {
    -  width: 1.2em;
    -  padding-bottom: 3px;
    -}
    -
    -.info-img {
    -  width: 5em;
    -}
    -
    -.navbar-img {
    -  width: 2em;
    -  margin-top: -8px;
    -}
    -
    -.side-nav > .navbar-nav > li > a {
    -  padding-bottom: $font-size-base/2;
    -  padding-top: $font-size-base/2;
    -}
    -
    -.cursor-pointer {
    -  cursor: pointer !important;
    -}
    -
    -#minimized {
    -  margin-top: 0.6em;
    -  margin-bottom: 0.3em;
    -}
    -
    -/* modal dialogs & related*/
    -
    -.modal-dialog {
    -  /* new custom width */
    -  width: 90%;
    -}
    -
    -/*.modal-backdrop {
    -  background-color: gray;
    -}*/
    -
    -.modal {
    -  overflow-y: auto;
    -}
    -
    -.tab-pane {
    -  margin-top: 24px;
    -}
    -
    -.tooltip {
    -  z-index: 2014;
    -}
    -
    -/* Tables */
    -
    -/* Logs */
    -
    -.chart-big {
    -  display: block;
    -  height: 400px;
    -}
    -
    -.chart-medium {
    -  display: block;
    -  height: 250px;
    -}
    -
    -.chart-small {
    -  display: block;
    -  height: 100px;
    -}
    -
    -/* End tables styling */
    -/* Charts */
    -
    -.chart-content {
    -  width: 100%;
    -  height: 100%;
    -}
    -
    -// Hides switcher on small devices, so menu displays correctly
    -.side-nav {
    -  padding-top: 0px;
    -  .switcher {
    -    visibility: hidden;
    -    width: 0px;
    -    height: 0px;
    -  }
    -  .icon {
    -    width: 24px;
    -    vertical-align: center;
    -    padding-bottom: 3px;
    -  }
    -}
    -
    -/* Edit Below to Customize Widths > 768px */
    -@media (min-width: 768px) {
    -  /* Wrappers */
    -
    -  #wrapper {
    -    padding-left: $sidebar-size;
    -    -webkit-transition: padding 0.3s; /* For Safari 3.1 to 6.0 */
    -    transition: padding 0.3s;
    -
    -    &.full {
    -      padding-left: $sidebar-size-collapsed;
    -    }
    -  }
    -
    -  #page-wrapper {
    -    padding: 15px 25px;
    -  }
    -
    -  /* Side Nav */
    -  .side-nav {
    -    position: fixed;
    -    top: 0px;
    -    margin-top: $sidebar-top;
    -    height: 100%;
    -    overflow-y: auto;
    -    border-radius: 0;
    -    border-color: $navbar-default-border;
    -    border-style: solid;
    -    border-width: 0 1px 0 0;
    -    background-color: $navbar-default-bg;
    -    -webkit-transition: width 0.3s; /* For Safari 3.1 to 6.0 */
    -    transition: width 0.3s;
    -
    -    margin-left: -$sidebar-size-collapsed;
    -    padding-top: $sidebar-switcher-size;
    -    left: $sidebar-size-collapsed;
    -    width: $sidebar-size-collapsed;
    -
    -    .icon {
    -      width: $sidebar-icon-width-collapsed;
    -      -webkit-transition: all 0.3s; /* For Safari 3.1 to 6.0 */
    -      transition: all 0.3s;
    -
    -    }
    -
    -    .menu-lnk {
    -      display: none;
    -      overflow-x: hidden;
    -    }
    -
    -    > ul {
    -        // border-top: 1px solid $navbar-default-border;
    -      > li {
    -        width: $sidebar-size;
    -        overflow-x: hidden;
    -        // border-bottom: 1px solid $navbar-default-border;
    -
    -        &:hover, &.active, &:focus {
    -          color: $brand-primary;
    -          background-color: darken($navbar-default-bg, 15%);
    -        }
    -
    -        &.dropdown > ul.dropdown-menu {
    -          width: $sidebar-size;
    -          position: relative;
    -          margin: 0;
    -          padding: 0;
    -          border: none;
    -          border-radius: 0;
    -          background-color: transparent;
    -          box-shadow: none;
    -          -webkit-box-shadow: none;
    -
    -
    -          > li > a {
    -            color: inherit;
    -            padding: $font-size-base/2 $font-size-base/2 $font-size-base/2 32px;
    -
    -            &:hover, &.active, &:focus {
    -              color: #fff;
    -              background-color: #080808;
    -            }
    -          }
    -        }
    -      }
    -    }
    -
    -
    -    &.full {
    -      margin-left: -$sidebar-size;
    -      left: $sidebar-size;
    -      width: $sidebar-size;
    -
    -      .icon {
    -        width: $sidebar-icon-width;
    -      }
    -
    -      .menu-lnk {
    -        display: inline;
    -        opacity: 1.0;
    -        width: 100%;
    -      }
    -
    -      > ul > li {
    -        // border-bottom: none;
    -        //border-bottom: none;
    -      }
    -
    -    }
    -
    -    /*&:hover {
    -      width: $sidebar-size;
    -    }
    -
    -
    -    > li {
    -      &.dropdown > ul.dropdown-menu {
    -        position: relative;
    -        min-width: $sidebar-size;
    -        margin: 0;
    -        padding: 0;
    -        border: none;
    -        border-radius: 0;
    -        background-color: transparent;
    -        box-shadow: none;
    -        -webkit-box-shadow: none;
    -
    -        > li > a {
    -          color: #999999;
    -          padding: 15px 15px 15px 15px;
    -
    -          &:hover, &.active, &:focus {
    -            color: #fff;
    -            background-color: #080808;
    -          }
    -        }
    -      }
    -
    -      > a {
    -        border-bottom: 1px solid darken($body-bg, 50%);
    -        color: $text-color;
    -        display: block;
    -        font-size: 10px;
    -        min-height: 60px;
    -        padding-top: 12px;
    -        text-align: center;
    -        width: $sidebar-size-collapsed;
    -        > img {
    -          min-width: 32px;
    -        }
    -
    -      }
    -      //> a {
    -      //  width: $sidebar-size;
    -      //}
    -    }*/
    -  }
    -
    -  /* Bootstrap Default Overrides - Customized Dropdowns for the Side Nav */
    -
    -  /*.navbar-inverse .navbar-nav > li > a {
    -    &:hover, &:focus {
    -      background-color: #080808;
    -    }
    -  }*/
    -
    -  .modal-dialog {
    -    /* new custom width */
    -    width: 60%;
    -  }
    -}
    -
    -// closeable
    -.closeable {
    -  &:hover {
    -    cursor: pointer;
    -    color: red;
    -  }
    -}
    -
    -// Tag add
    -.tagadder {
    -  &:hover {
    -    cursor: pointer;
    -  }
    -}
    -
    -span.tag {
    -  float: left;
    -  margin-bottom: 4px;
    -  margin-right: 4px;
    -  padding-bottom: 4px;
    -}
    -
    -/* submenus */
    -.dropdown-submenu {
    -        position: relative;
    -        >.dropdown-menu {
    -                top: 0;
    -                left: 100%;
    -                margin-top: -6px;
    -                margin-left: -1px;
    -                -webkit-border-radius: 0 6px 6px 6px;
    -                -moz-border-radius: 0 6px 6px 6px;
    -                border-radius: 0 6px 6px 6px;
    -        }
    -        &:hover {
    -                >.dropdown-menu {
    -                        display: block;
    -                }
    -                >a {
    -                        &:after {
    -                                border-left-color: #ffffff;
    -                        }
    -                }
    -        }
    -        >a {
    -                &:after {
    -                        display: block;
    -                        content: " ";
    -                        float: right;
    -                        width: 0;
    -                        height: 0;
    -                        border-color: transparent;
    -                        border-style: solid;
    -                        border-width: 5px 0 5px 5px;
    -                        border-left-color: #cccccc;
    -                        margin-top: 5px;
    -                        margin-right: -10px;
    -                }
    -        }
    -}
    -.dropdown-submenu.pull-left {
    -        float: none;
    -        >.dropdown-menu {
    -                left: -100%;
    -                margin-left: 10px;
    -                -webkit-border-radius: 6px 0 6px 6px;
    -                -moz-border-radius: 6px 0 6px 6px;
    -                border-radius: 6px 0 6px 6px;
    -        }
    -}
    -
    -li.selected {
    -    background-color: #5094CE;
    -}
    -
    -/* theme */
    -
    -@import "_theme";
    -@import "_widgets";
    -@import "_buttons";
    -@import "_data-tables";
    -@import "_tables";
    diff --git a/server/templates/admin/app/favicon.ico b/server/templates/admin/app/favicon.ico
    deleted file mode 100644
    index 65279053..00000000
    Binary files a/server/templates/admin/app/favicon.ico and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/DroidSansMono.woff2 b/server/templates/admin/app/fonts/DroidSansMono.woff2
    deleted file mode 100644
    index 63ed4ffa..00000000
    Binary files a/server/templates/admin/app/fonts/DroidSansMono.woff2 and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/FontAwesome.otf b/server/templates/admin/app/fonts/FontAwesome.otf
    deleted file mode 100644
    index 81c9ad94..00000000
    Binary files a/server/templates/admin/app/fonts/FontAwesome.otf and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/fontawesome-webfont.eot b/server/templates/admin/app/fonts/fontawesome-webfont.eot
    deleted file mode 100644
    index 84677bc0..00000000
    Binary files a/server/templates/admin/app/fonts/fontawesome-webfont.eot and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/fontawesome-webfont.svg b/server/templates/admin/app/fonts/fontawesome-webfont.svg
    deleted file mode 100644
    index d907b25a..00000000
    --- a/server/templates/admin/app/fonts/fontawesome-webfont.svg
    +++ /dev/null
    @@ -1,520 +0,0 @@
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - 
    \ No newline at end of file
    diff --git a/server/templates/admin/app/fonts/fontawesome-webfont.ttf b/server/templates/admin/app/fonts/fontawesome-webfont.ttf
    deleted file mode 100644
    index 96a3639c..00000000
    Binary files a/server/templates/admin/app/fonts/fontawesome-webfont.ttf and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/fontawesome-webfont.woff b/server/templates/admin/app/fonts/fontawesome-webfont.woff
    deleted file mode 100644
    index 628b6a52..00000000
    Binary files a/server/templates/admin/app/fonts/fontawesome-webfont.woff and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/glyphicons-halflings-regular.eot b/server/templates/admin/app/fonts/glyphicons-halflings-regular.eot
    deleted file mode 100644
    index b93a4953..00000000
    Binary files a/server/templates/admin/app/fonts/glyphicons-halflings-regular.eot and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/glyphicons-halflings-regular.svg b/server/templates/admin/app/fonts/glyphicons-halflings-regular.svg
    deleted file mode 100644
    index 94fb5490..00000000
    --- a/server/templates/admin/app/fonts/glyphicons-halflings-regular.svg
    +++ /dev/null
    @@ -1,288 +0,0 @@
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - 
    \ No newline at end of file
    diff --git a/server/templates/admin/app/fonts/glyphicons-halflings-regular.ttf b/server/templates/admin/app/fonts/glyphicons-halflings-regular.ttf
    deleted file mode 100644
    index 1413fc60..00000000
    Binary files a/server/templates/admin/app/fonts/glyphicons-halflings-regular.ttf and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/glyphicons-halflings-regular.woff b/server/templates/admin/app/fonts/glyphicons-halflings-regular.woff
    deleted file mode 100644
    index 9e612858..00000000
    Binary files a/server/templates/admin/app/fonts/glyphicons-halflings-regular.woff and /dev/null differ
    diff --git a/server/templates/admin/app/fonts/glyphicons-halflings-regular.woff2 b/server/templates/admin/app/fonts/glyphicons-halflings-regular.woff2
    deleted file mode 100644
    index 64539b54..00000000
    Binary files a/server/templates/admin/app/fonts/glyphicons-halflings-regular.woff2 and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/assigned.png b/server/templates/admin/app/img/icons/assigned.png
    deleted file mode 100644
    index fa64f049..00000000
    Binary files a/server/templates/admin/app/img/icons/assigned.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/authenticators.png b/server/templates/admin/app/img/icons/authenticators.png
    deleted file mode 100644
    index 7da6b059..00000000
    Binary files a/server/templates/admin/app/img/icons/authenticators.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/cached.png b/server/templates/admin/app/img/icons/cached.png
    deleted file mode 100644
    index b90c7a22..00000000
    Binary files a/server/templates/admin/app/img/icons/cached.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/calendars.png b/server/templates/admin/app/img/icons/calendars.png
    deleted file mode 100644
    index 62ac9d70..00000000
    Binary files a/server/templates/admin/app/img/icons/calendars.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/configuration.png b/server/templates/admin/app/img/icons/configuration.png
    deleted file mode 100644
    index 935510b6..00000000
    Binary files a/server/templates/admin/app/img/icons/configuration.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/dashboard-monitor.png b/server/templates/admin/app/img/icons/dashboard-monitor.png
    deleted file mode 100644
    index 973c7568..00000000
    Binary files a/server/templates/admin/app/img/icons/dashboard-monitor.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/flush-cache.png b/server/templates/admin/app/img/icons/flush-cache.png
    deleted file mode 100644
    index bd8a0002..00000000
    Binary files a/server/templates/admin/app/img/icons/flush-cache.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/gallery.png b/server/templates/admin/app/img/icons/gallery.png
    deleted file mode 100644
    index 2ec93946..00000000
    Binary files a/server/templates/admin/app/img/icons/gallery.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/groups.png b/server/templates/admin/app/img/icons/groups.png
    deleted file mode 100644
    index bb7c47e9..00000000
    Binary files a/server/templates/admin/app/img/icons/groups.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/logs.png b/server/templates/admin/app/img/icons/logs.png
    deleted file mode 100644
    index dd16b93e..00000000
    Binary files a/server/templates/admin/app/img/icons/logs.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/maleta.png b/server/templates/admin/app/img/icons/maleta.png
    deleted file mode 100644
    index 239e44cd..00000000
    Binary files a/server/templates/admin/app/img/icons/maleta.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/networks.png b/server/templates/admin/app/img/icons/networks.png
    deleted file mode 100644
    index c3965a27..00000000
    Binary files a/server/templates/admin/app/img/icons/networks.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/osmanagers.png b/server/templates/admin/app/img/icons/osmanagers.png
    deleted file mode 100644
    index f0af6329..00000000
    Binary files a/server/templates/admin/app/img/icons/osmanagers.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/pools.png b/server/templates/admin/app/img/icons/pools.png
    deleted file mode 100644
    index 352bf8bb..00000000
    Binary files a/server/templates/admin/app/img/icons/pools.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/providers.png b/server/templates/admin/app/img/icons/providers.png
    deleted file mode 100644
    index 5dcdb9f8..00000000
    Binary files a/server/templates/admin/app/img/icons/providers.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/publications.png b/server/templates/admin/app/img/icons/publications.png
    deleted file mode 100644
    index 8aa378c9..00000000
    Binary files a/server/templates/admin/app/img/icons/publications.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/reports.png b/server/templates/admin/app/img/icons/reports.png
    deleted file mode 100644
    index 79ce66a9..00000000
    Binary files a/server/templates/admin/app/img/icons/reports.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/services.png b/server/templates/admin/app/img/icons/services.png
    deleted file mode 100644
    index 36ee3bb7..00000000
    Binary files a/server/templates/admin/app/img/icons/services.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/tools.png b/server/templates/admin/app/img/icons/tools.png
    deleted file mode 100644
    index 484d057f..00000000
    Binary files a/server/templates/admin/app/img/icons/tools.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/transports.png b/server/templates/admin/app/img/icons/transports.png
    deleted file mode 100644
    index 867863d0..00000000
    Binary files a/server/templates/admin/app/img/icons/transports.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/icons/users.png b/server/templates/admin/app/img/icons/users.png
    deleted file mode 100644
    index e645f9e5..00000000
    Binary files a/server/templates/admin/app/img/icons/users.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/sort_asc.png b/server/templates/admin/app/img/sort_asc.png
    deleted file mode 100644
    index e1ba61a8..00000000
    Binary files a/server/templates/admin/app/img/sort_asc.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/sort_asc_disabled.png b/server/templates/admin/app/img/sort_asc_disabled.png
    deleted file mode 100644
    index fb11dfe2..00000000
    Binary files a/server/templates/admin/app/img/sort_asc_disabled.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/sort_both.png b/server/templates/admin/app/img/sort_both.png
    deleted file mode 100644
    index af5bc7c5..00000000
    Binary files a/server/templates/admin/app/img/sort_both.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/sort_desc.png b/server/templates/admin/app/img/sort_desc.png
    deleted file mode 100644
    index 0e156deb..00000000
    Binary files a/server/templates/admin/app/img/sort_desc.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/sort_desc_disabled.png b/server/templates/admin/app/img/sort_desc_disabled.png
    deleted file mode 100644
    index c9fdd8a1..00000000
    Binary files a/server/templates/admin/app/img/sort_desc_disabled.png and /dev/null differ
    diff --git a/server/templates/admin/app/img/udsicon.png b/server/templates/admin/app/img/udsicon.png
    deleted file mode 100644
    index bccfd99d..00000000
    Binary files a/server/templates/admin/app/img/udsicon.png and /dev/null differ
    diff --git a/server/templates/admin/app/index-bars.html b/server/templates/admin/app/index-bars.html
    deleted file mode 100644
    index 22dd37db..00000000
    --- a/server/templates/admin/app/index-bars.html
    +++ /dev/null
    @@ -1,159 +0,0 @@
    -
    -
    -  
    -    
    -    admin
    -    
    -    
    -
    -    
    -    
    -    
    -    
    -    
    -    
    -    
    -    
    -    
    -    
    -
    -
    -    
    -    
    -    
    -    
    -  
    -  
    -    
    -    
    - - - - - - -
    -
    - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server/templates/admin/app/index.html b/server/templates/admin/app/index.html deleted file mode 100644 index 8d71369d..00000000 --- a/server/templates/admin/app/index.html +++ /dev/null @@ -1,1777 +0,0 @@ - - - - - admin - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - -
    -
    - - - -

    Bootstrap 3 Preview

    - - -
    -
    -
    - - -
    - - - - -
    - -
    -
    -
    - - - -
    - - -
    -
    - -
    -

    - - - -

    - - - -

    -
    - -
    -

    - - - -

    - - - -

    -
    - - - - -
    -

    - -

    - - -

    -
    - -
    -
    - -
    -

    - -

    -
    - - -
    -
    - Left - Right - Middle -
    -
    - -
    -
    -
    - - - - -
    -
    - - - -
    -
    - - -
    - - -
    -
    -
    -
    - -
    -
    - - - - -
    -
    - -
    -
    -
    - - -
    -
    -
    - -
    -
    - - - -
    -
    -
    -

    Heading 1

    -

    Heading 2

    -

    Heading 3

    -

    Heading 4

    -
    Heading 5
    -
    Heading 6
    -
    -
    -

    Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

    -
    -
    -
    -
    -

    Example body text

    -

    Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

    -

    This line of text is meant to be treated as fine print.

    -

    The following snippet of text is rendered as bold text.

    -

    The following snippet of text is rendered as italicized text.

    -

    An abbreviation of the word attribute is attr.

    -
    - -
    -
    - -

    Emphasis classes

    -
    -

    Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

    -

    Nullam id dolor id nibh ultricies vehicula ut id elit.

    -

    Etiam porta sem malesuada magna mollis euismod.

    -

    Donec ullamcorper nulla non metus auctor fringilla.

    -

    Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

    -

    Maecenas sed diam eget risus varius blandit sit amet non magna.

    -
    - -
    -
    - - - -
    -
    -

    Blockquotes

    -
    -
    -
    -
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    - Someone famous in Source Title -
    -
    -
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    - Someone famous in Source Title -
    -
    -
    -
    - - -
    - -
    -
    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #Column headingColumn headingColumn heading
    1Column contentColumn contentColumn content
    2Column contentColumn contentColumn content
    3Column contentColumn contentColumn content
    4Column contentColumn contentColumn content
    5Column contentColumn contentColumn content
    6Column contentColumn contentColumn content
    7Column contentColumn contentColumn content
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LoremIpsumDolorAmet
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LoremIpsumDolorAmet
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    LoremIpsumDolorAmet
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet.
    -
    - -
    -
    -
    - - -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
    - Legend -
    - -
    - -
    -
    -
    - -
    - -
    - -
    -
    -
    -
    - -
    - - A longer block of help text that breaks onto a new line and may extend beyond one line. -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    - -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    - $ - - - - -
    -
    -
    - -
    -
    -
    - - -
    - -
    -
    - -
    -
    - -
    -
    - -
    - -
    -
    -

    Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

    -
    -
    -

    Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit.

    -
    - - -
    -
    -
    - -
    - -
    - - - -
    - -
    -
    - - -
    -
    -

    Pagination

    -
    - - - -
    -
    -
    -

    Pager

    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - - -
    - -
    -
    - -
    -
    - - -
    -
    -

    Alerts

    -
    -
    - -

    Warning!

    -

    Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

    -
    -
    -
    -
    -
    -
    -
    - - Oh snap! Change a few things up and try submitting again. -
    -
    -
    -
    - - Well done! You successfully read this important alert message. -
    -
    -
    -
    - - Heads up! This alert needs your attention, but it's not super important. -
    -
    -
    -
    -
    -

    Labels

    -
    - Default - Primary - Success - Warning - Danger - Info -
    -
    -
    -

    Badges

    - -
    -
    -
    - - -
    - -
    -
    - - - -

    Basic

    -
    -
    -
    -
    -
    - -

    Contextual alternatives

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Striped

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Animated

    -
    -
    -
    -
    -
    - -

    Stacked

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - -
    - -
    -
    - -
    -
    -

    Jumbotron

    -

    This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

    -

    Learn more

    -
    -
    -
    -
    - - -
    -
    -

    List groups

    -
    -
    - - - -
    -
    -

    Panels

    -
    -
    -
    -
    -
    -
    - Basic panel -
    -
    -
    -
    Panel heading
    -
    - Panel content -
    -
    -
    -
    - Panel content -
    - -
    -
    -
    -
    -
    -

    Panel primary

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel success

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel warning

    -
    -
    - Panel content -
    -
    -
    -
    -
    -
    -

    Panel danger

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel info

    -
    -
    - Panel content -
    -
    -
    -
    - -
    -
    -

    Wells

    -
    -
    -
    -
    -
    - Look, I'm in a well! -
    -
    -
    -
    - Look, I'm in a small well! -
    -
    -
    -
    - Look, I'm in a large well! -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Service providers

    - - - - -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - -
    - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - -
    - - -
    -
    - -
    - -
    - - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - -
    - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - -
    - -
    - - - - - - -
    -
    - - -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server/templates/admin/app/js/bootstrap-switch.min.js b/server/templates/admin/app/js/bootstrap-switch.min.js deleted file mode 100644 index 9849658b..00000000 --- a/server/templates/admin/app/js/bootstrap-switch.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/* ======================================================================== - * bootstrap-switch - v3.3.2 - * http://www.bootstrap-switch.org - * ======================================================================== - * Copyright 2012-2013 Mattia Larentis - * - * ======================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== - */ - -(function(){var t=[].slice;!function(e,i){"use strict";var n;return n=function(){function t(t,i){null==i&&(i={}),this.$element=e(t),this.options=e.extend({},e.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")},i),this.prevOptions={},this.$wrapper=e("
    ",{"class":function(t){return function(){var e;return e=[""+t.options.baseClass].concat(t._getClasses(t.options.wrapperClass)),e.push(t.options.state?t.options.baseClass+"-on":t.options.baseClass+"-off"),null!=t.options.size&&e.push(t.options.baseClass+"-"+t.options.size),t.options.disabled&&e.push(t.options.baseClass+"-disabled"),t.options.readonly&&e.push(t.options.baseClass+"-readonly"),t.options.indeterminate&&e.push(t.options.baseClass+"-indeterminate"),t.options.inverse&&e.push(t.options.baseClass+"-inverse"),t.$element.attr("id")&&e.push(t.options.baseClass+"-id-"+t.$element.attr("id")),e.join(" ")}}(this)()}),this.$container=e("
    ",{"class":this.options.baseClass+"-container"}),this.$on=e("",{html:this.options.onText,"class":this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=e("",{html:this.options.offText,"class":this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=e("",{html:this.options.labelText,"class":this.options.baseClass+"-label"}),this.$element.on("init.bootstrapSwitch",function(e){return function(){return e.options.onInit.apply(t,arguments)}}(this)),this.$element.on("switchChange.bootstrapSwitch",function(i){return function(n){return!1===i.options.onSwitchChange.apply(t,arguments)?i.$element.is(":radio")?e("[name='"+i.$element.attr("name")+"']").trigger("previousState.bootstrapSwitch",!0):i.$element.trigger("previousState.bootstrapSwitch",!0):void 0}}(this)),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return t.prototype._constructor=t,t.prototype.setPrevOptions=function(){return this.prevOptions=e.extend(!0,{},this.options)},t.prototype.state=function(t,i){return"undefined"==typeof t?this.options.state:this.options.disabled||this.options.readonly?this.$element:this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?e("[name='"+this.$element.attr("name")+"']").trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),t=!!t,this.$element.prop("checked",t).trigger("change.bootstrapSwitch",i),this.$element)},t.prototype.toggleState=function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)},t.prototype.size=function(t){return"undefined"==typeof t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this.options.baseClass+"-"+this.options.size),t&&this.$wrapper.addClass(this.options.baseClass+"-"+t),this._width(),this._containerPosition(),this.options.size=t,this.$element)},t.prototype.animate=function(t){return"undefined"==typeof t?this.options.animate:(t=!!t,t===this.options.animate?this.$element:this.toggleAnimate())},t.prototype.toggleAnimate=function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this.options.baseClass+"-animate"),this.$element},t.prototype.disabled=function(t){return"undefined"==typeof t?this.options.disabled:(t=!!t,t===this.options.disabled?this.$element:this.toggleDisabled())},t.prototype.toggleDisabled=function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this.options.baseClass+"-disabled"),this.$element},t.prototype.readonly=function(t){return"undefined"==typeof t?this.options.readonly:(t=!!t,t===this.options.readonly?this.$element:this.toggleReadonly())},t.prototype.toggleReadonly=function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this.options.baseClass+"-readonly"),this.$element},t.prototype.indeterminate=function(t){return"undefined"==typeof t?this.options.indeterminate:(t=!!t,t===this.options.indeterminate?this.$element:this.toggleIndeterminate())},t.prototype.toggleIndeterminate=function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this.options.baseClass+"-indeterminate"),this._containerPosition(),this.$element},t.prototype.inverse=function(t){return"undefined"==typeof t?this.options.inverse:(t=!!t,t===this.options.inverse?this.$element:this.toggleInverse())},t.prototype.toggleInverse=function(){var t,e;return this.$wrapper.toggleClass(this.options.baseClass+"-inverse"),e=this.$on.clone(!0),t=this.$off.clone(!0),this.$on.replaceWith(t),this.$off.replaceWith(e),this.$on=t,this.$off=e,this.options.inverse=!this.options.inverse,this.$element},t.prototype.onColor=function(t){var e;return e=this.options.onColor,"undefined"==typeof t?e:(null!=e&&this.$on.removeClass(this.options.baseClass+"-"+e),this.$on.addClass(this.options.baseClass+"-"+t),this.options.onColor=t,this.$element)},t.prototype.offColor=function(t){var e;return e=this.options.offColor,"undefined"==typeof t?e:(null!=e&&this.$off.removeClass(this.options.baseClass+"-"+e),this.$off.addClass(this.options.baseClass+"-"+t),this.options.offColor=t,this.$element)},t.prototype.onText=function(t){return"undefined"==typeof t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)},t.prototype.offText=function(t){return"undefined"==typeof t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)},t.prototype.labelText=function(t){return"undefined"==typeof t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)},t.prototype.handleWidth=function(t){return"undefined"==typeof t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.labelWidth=function(t){return"undefined"==typeof t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.baseClass=function(t){return this.options.baseClass},t.prototype.wrapperClass=function(t){return"undefined"==typeof t?this.options.wrapperClass:(t||(t=e.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)},t.prototype.radioAllOff=function(t){return"undefined"==typeof t?this.options.radioAllOff:(t=!!t,t===this.options.radioAllOff?this.$element:(this.options.radioAllOff=t,this.$element))},t.prototype.onInit=function(t){return"undefined"==typeof t?this.options.onInit:(t||(t=e.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)},t.prototype.onSwitchChange=function(t){return"undefined"==typeof t?this.options.onSwitchChange:(t||(t=e.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)},t.prototype.destroy=function(){var t;return t=this.$element.closest("form"),t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},t.prototype._width=function(){var t,e;return t=this.$on.add(this.$off),t.add(this.$label).css("width",""),e="auto"===this.options.handleWidth?Math.max(this.$on.width(),this.$off.width()):this.options.handleWidth,t.width(e),this.$label.width(function(t){return function(i,n){return"auto"!==t.options.labelWidth?t.options.labelWidth:e>n?e:n}}(this)),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)},t.prototype._containerPosition=function(t,e){return null==t&&(t=this.options.state),this.$container.css("margin-left",function(e){return function(){var i;return i=[0,"-"+e._handleWidth+"px"],e.options.indeterminate?"-"+e._handleWidth/2+"px":t?e.options.inverse?i[1]:i[0]:e.options.inverse?i[0]:i[1]}}(this)),e?setTimeout(function(){return e()},50):void 0},t.prototype._init=function(){var t,e;return t=function(t){return function(){return t.setPrevOptions(),t._width(),t._containerPosition(null,function(){return t.options.animate?t.$wrapper.addClass(t.options.baseClass+"-animate"):void 0})}}(this),this.$wrapper.is(":visible")?t():e=i.setInterval(function(n){return function(){return n.$wrapper.is(":visible")?(t(),i.clearInterval(e)):void 0}}(this),50)},t.prototype._elementHandlers=function(){return this.$element.on({"setPreviousOptions.bootstrapSwitch":function(t){return function(e){return t.setPrevOptions()}}(this),"previousState.bootstrapSwitch":function(t){return function(e){return t.options=t.prevOptions,t.options.indeterminate&&t.$wrapper.addClass(t.options.baseClass+"-indeterminate"),t.$element.prop("checked",t.options.state).trigger("change.bootstrapSwitch",!0)}}(this),"change.bootstrapSwitch":function(t){return function(i,n){var o;return i.preventDefault(),i.stopImmediatePropagation(),o=t.$element.is(":checked"),t._containerPosition(o),o!==t.options.state?(t.options.state=o,t.$wrapper.toggleClass(t.options.baseClass+"-off").toggleClass(t.options.baseClass+"-on"),n?void 0:(t.$element.is(":radio")&&e("[name='"+t.$element.attr("name")+"']").not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[o]))):void 0}}(this),"focus.bootstrapSwitch":function(t){return function(e){return e.preventDefault(),t.$wrapper.addClass(t.options.baseClass+"-focused")}}(this),"blur.bootstrapSwitch":function(t){return function(e){return e.preventDefault(),t.$wrapper.removeClass(t.options.baseClass+"-focused")}}(this),"keydown.bootstrapSwitch":function(t){return function(e){if(e.which&&!t.options.disabled&&!t.options.readonly)switch(e.which){case 37:return e.preventDefault(),e.stopImmediatePropagation(),t.state(!1);case 39:return e.preventDefault(),e.stopImmediatePropagation(),t.state(!0)}}}(this)})},t.prototype._handleHandlers=function(){return this.$on.on("click.bootstrapSwitch",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}}(this)),this.$off.on("click.bootstrapSwitch",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")}}(this))},t.prototype._labelHandlers=function(){return this.$label.on({click:function(t){return t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(t){return function(e){return t._dragStart||t.options.disabled||t.options.readonly?void 0:(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(t.options.baseClass+"-animate"),t.$element.trigger("focus.bootstrapSwitch"))}}(this),"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(t){return function(e){var i;if(null!=t._dragStart&&(e.preventDefault(),i=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart,!(i<-t._handleWidth||i>0)))return t._dragEnd=i,t.$container.css("margin-left",t._dragEnd+"px")}}(this),"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(t){return function(e){var i;if(t._dragStart)return e.preventDefault(),t.options.animate&&t.$wrapper.addClass(t.options.baseClass+"-animate"),t._dragEnd?(i=t._dragEnd>-(t._handleWidth/2),t._dragEnd=!1,t.state(t.options.inverse?!i:i)):t.state(!t.options.state),t._dragStart=!1}}(this),"mouseleave.bootstrapSwitch":function(t){return function(e){return t.$label.trigger("mouseup.bootstrapSwitch")}}(this)})},t.prototype._externalLabelHandler=function(){var t;return t=this.$element.closest("label"),t.on("click",function(e){return function(i){return i.preventDefault(),i.stopImmediatePropagation(),i.target===t[0]?e.toggleState():void 0}}(this))},t.prototype._formHandler=function(){var t;return t=this.$element.closest("form"),t.data("bootstrap-switch")?void 0:t.on("reset.bootstrapSwitch",function(){return i.setTimeout(function(){return t.find("input").filter(function(){return e(this).data("bootstrap-switch")}).each(function(){return e(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},t.prototype._getClasses=function(t){var i,n,o,s;if(!e.isArray(t))return[this.options.baseClass+"-"+t];for(n=[],o=0,s=t.length;s>o;o++)i=t[o],n.push(this.options.baseClass+"-"+i);return n},t}(),e.fn.bootstrapSwitch=function(){var i,o,s;return o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],s=this,this.each(function(){var t,a;return t=e(this),a=t.data("bootstrap-switch"),a||t.data("bootstrap-switch",a=new n(this,o)),"string"==typeof o?s=a[o].apply(a,i):void 0}),s},e.fn.bootstrapSwitch.Constructor=n,e.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}(window.jQuery,window)}).call(this); \ No newline at end of file diff --git a/server/templates/admin/app/js/datatables.min.js b/server/templates/admin/app/js/datatables.min.js deleted file mode 100644 index 8dead978..00000000 --- a/server/templates/admin/app/js/datatables.min.js +++ /dev/null @@ -1,300 +0,0 @@ -/* - * This combined file was created by the DataTables downloader builder: - * https://datatables.net/download - * - * To rebuild or modify this file with the latest versions of the included - * software please visit: - * https://datatables.net/download/#dt/dt-1.10.11,cr-1.3.1,fh-3.1.1,r-2.0.2,rr-1.1.1,se-1.1.2 - * - * Included libraries: - * DataTables 1.10.11, ColReorder 1.3.1, FixedHeader 3.1.1, Responsive 2.0.2, RowReorder 1.1.1, Select 1.1.2 - */ - -/*! - DataTables 1.10.11 - ©2008-2015 SpryMedia Ltd - datatables.net/license -*/ -(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(D){return h(D,window,document)}):"object"===typeof exports?module.exports=function(D,I){D||(D=window);I||(I="undefined"!==typeof window?require("jquery"):require("jquery")(D));return h(I,D,D.document)}:h(jQuery,window,document)})(function(h,D,I,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()), -d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function K(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),K(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords"); -a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX= -a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("
    ").css({position:"absolute",top:1,left:1, -width:100,overflow:"scroll"}).append(h("
    ").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&& -(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:I.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f= -(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),K(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&& -(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed): -!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;cq[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;jb&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild); -c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c").appendTo(g));b=0;for(c=l.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH); -if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart= --1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j",{"class":e?d[0]:""}).append(h("",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ma(a),g,n,i]);u(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ma(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));u(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter; -c.bSort&&mb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold=!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("
    ").insertBefore(c),d=a.oFeatures,e=h("
    ",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,t=0;t")[0]; -n=f[t+1];if("'"==n||'"'==n){l="";for(q=2;f[t+q]!=n;)l+=f[t+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;t+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&&d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"== -j&&d.bPaginate)g=tb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("
    ",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("
    ").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());O(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)}, -b=h("
    ").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;lf&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display", -b?"block":"none");u(a,null,"processing",[a,b])}function rb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("
    ",{"class":f.sScrollWrapper}).append(h("
    ",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:x(d):"100%"}).append(h("
    ", -{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("
    ",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:x(d)}).append(b));l&&i.append(h("
    ",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:x(d):"100%"}).append(h("
    ",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left", -0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:ka,sName:"scrolling"});return i[0]}function ka(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"), -j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),m=t.children("table"),o=h(a.nTHead),G=h(a.nTable),p=G[0],r=p.style,u=a.nTFoot?h(a.nTFoot):null,Eb=a.oBrowser,Ua=Eb.bScrollOversize,s=F(a.aoColumns,"nTh"),P,v,w,y,z=[],A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};v=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==v&&a.scrollBarVis!==k)a.scrollBarVis=v,U(a);else{a.scrollBarVis=v;G.children("thead, tfoot").remove(); -u&&(w=u.clone().prependTo(G),P=u.find("tr"),w=w.find("tr"));y=o.clone().prependTo(G);o=o.find("tr");v=y.find("tr");y.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(qa(a,y),function(b,c){D=Z(a,b);c.style.width=a.aoColumns[D].sWidth});u&&J(function(a){a.style.width=""},w);f=G.outerWidth();if(""===c){r.width="100%";if(Ua&&(G.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(G.outerWidth()-b);f=G.outerWidth()}else""!==d&&(r.width= -x(d),f=G.outerWidth());J(E,v);J(function(a){B.push(a.innerHTML);z.push(x(h(a).css("width")))},v);J(function(a,b){if(h.inArray(a,s)!==-1)a.style.width=z[b]},o);h(v).height(0);u&&(J(E,w),J(function(a){C.push(a.innerHTML);A.push(x(h(a).css("width")))},w),J(function(a,b){a.style.width=A[b]},P),h(w).height(0));J(function(a,b){a.innerHTML='
    '+B[b]+"
    ";a.style.width=z[b]},v);u&&J(function(a,b){a.innerHTML='
    '+ -C[b]+"
    ";a.style.width=A[b]},w);if(G.outerWidth()j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(Ua&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(P-b);(""===c||""!==d)&&L(a,1,"Possible column misalignment",6)}else P="100%";q.width=x(P);g.width=x(P);u&&(a.nScrollFoot.style.width=x(P));!e&&Ua&&(q.height=x(p.offsetHeight+b));c=G.outerWidth();n[0].style.width=x(c);i.width=x(c);d=G.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+ -(Eb.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=x(c),t[0].style.width=x(c),t[0].style[e]=d?b+"px":"0px");G.children("colgroup").insertBefore(G.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function J(a,b,c){for(var d=0,e=0,f=b.length,g,j;e").appendTo(j.find("tbody")); -j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=qa(a,j.find("thead")[0]);for(m=0;m").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()").css("width",x(a)).appendTo(b||I.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d= -a.aoData[c];return!d.nTr?h("").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;fd&&(d=c.length,e=f);return e}function x(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function W(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n, -a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;ae?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return ce?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;jg?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=W(a),a=a.oLanguage.oAria,f=0,g=d.length;f/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0e?e+1:3));e=0;for(f=d.length;ee?e+1:3))}a.aLastSort=d}function Ib(a, -b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j=d.length?[0,c[1]]:c)}));e.search!==k&&h.extend(a.oPreviousSearch,Bb(e.search));b=0;for(c=e.columns.length;b=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide? -"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Aa(a,b){var c=[],c=Mb.numbers_length,d=Math.floor(c/2);b<=c?c=X(0,b):a<=d?(c=X(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=X(b-(c-2),b):(c=X(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Ba(b,a)},"num-fmt":function(b){return Ba(b,a,Xa)},"html-num":function(b){return Ba(b,a,Ca)},"html-num-fmt":function(b){return Ba(b,a,Ca,Xa)}},function(b, -c){v.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(v.type.search[b+a]=v.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,v,r,p,s,Ya={},Ob=/[\r\n]/g,Ca=/<.*?>/g,bc=/^[\w\+\-]/,cc=/[\w\+\-]$/,Zb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Xa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1}, -Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Qb(a,b));c&&d&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:Za(a.replace(Ca,""),b,c)?!0:null},F=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e< -f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e")[0],$b=wa.textContent!==k,ac=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new r(za(this[v.iApiIndex])):new r(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()}; -this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ka(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)}; -this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition= -function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()}; -this.fnSettings=function(){return za(this[v.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=v.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=v.internal;for(var e in m.ext.internal)e&&(this[e]= -Nb(e));this.each(function(){var e={},e=1t<"F"ip>'),o.renderer)?h.isPlainObject(o.renderer)&&!o.renderer.header&&(o.renderer.header="jqueryui"):o.renderer="jqueryui":h.extend(i,m.ext.classes,e.oClasses);q.addClass(i.sTable);o.iInitDisplayStart===k&&(o.iInitDisplayStart=e.iDisplayStart,o._iDisplayStart=e.iDisplayStart);null!==e.iDeferLoading&&(o.bDeferLoading=!0,g=h.isArray(e.iDeferLoading),o._iRecordsDisplay=g?e.iDeferLoading[0]:e.iDeferLoading,o._iRecordsTotal=g?e.iDeferLoading[1]:e.iDeferLoading);var r=o.oLanguage;h.extend(!0, -r,e.oLanguage);""!==r.sUrl&&(h.ajax({dataType:"json",url:r.sUrl,success:function(a){Fa(a);K(l.oLanguage,a);h.extend(true,r,a);ga(o)},error:function(){ga(o)}}),n=!0);null===e.asStripeClasses&&(o.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=o.asStripeClasses,v=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return v.hasClass(a)}))&&(h("tbody tr",this).removeClass(g.join(" ")),o.asDestroyStripes=g.slice());t=[];g=this.getElementsByTagName("thead");0!==g.length&&(da(o.aoHeader, -g[0]),t=qa(o));if(null===e.aoColumns){p=[];g=0;for(j=t.length;g").appendTo(this));o.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("").appendTo(this));o.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0").appendTo(this);0===j.length||0===j.children().length?q.addClass(i.sNoFooter):0a?new r(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=aa(d),e.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});p(["row().child.show()","row().child().show()"],function(){Vb(this, -!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});p(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var ec=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d=0?b:g.length+b];if(typeof a==="function"){var e=Da(c,f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(ec):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null}); -return[m[m.length+b]]}return[Z(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});s("columns().header()","column().header()",function(){return this.iterator("column", -function(a,b){return a.aoColumns[b].nTh},1)});s("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});s("columns().data()","column().data()",function(){return this.iterator("column-rows",Wb,1)});s("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});s("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b, -c,d,e,f){return ha(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});s("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ha(a.aoData,e,"anCells",b)},1)});s("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,d){if(a===k)return c.aoColumns[d].bVisible;var e=c.aoColumns,f=e[d],g=c.aoData,j,i,n;if(a!==k&&f.bVisible!==a){if(a){var l=h.inArray(!0,F(e,"bVisible"),d+1);j=0;for(i=g.length;j< -i;j++)n=g[j].nTr,e=g[j].anCells,n&&n.insertBefore(e[d],e[l]||null)}else h(F(c.aoData,"anCells",d)).detach();f.bVisible=a;ea(c,c.aoHeader);ea(c,c.aoFooter);(b===k||b)&&U(c);u(c,null,"column-visibility",[c,d,a,b]);ya(c)}})});s("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});p("columns.adjust()",function(){return this.iterator("table",function(a){U(a)},1)});p("column.index()",function(a,b){if(0!==this.context.length){var c= -this.context[0];if("fromVisible"===a||"toData"===a)return Z(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});p("column()",function(a,b){return bb(this.columns(a,b))});p("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=ab(c),f=b.aoData,g=Da(b,e),j=Sb(ha(f,g,"anCells")),i=h([].concat.apply([],j)),l,n=b.aoColumns.length,m,p,r,u,v,s;return $a("cell",d,function(a){var c= -typeof a==="function";if(a===null||a===k||c){m=[];p=0;for(r=g.length;pd;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a|| -a&&h(b.nTable).is(":visible"))return b.nTable});return b?new r(c):c};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=K;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table", -function(a){na(a)})});p("settings()",function(){return new r(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return F(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}), -p;b.bDestroying=!0;u(b,"aoDestroyCallback","destroy",[b]);a||(new r(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(D).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];xa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+ -d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column", -"row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,n){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,n)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.11";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null, -_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults= -{aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, -this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+ -"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries", -sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"}; -Y(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};Y(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null, -bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[], -aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null, -aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a= -this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=v={buttons:{},classes:{},build:"dt/dt-1.10.11,cr-1.3.1,fh-3.1.1,r-2.0.2,rr-1.1.1,se-1.1.2",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{}, -header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(v,{afnFiltering:v.search,aTypes:v.type.detect,ofnSearch:v.type.search,oSort:v.type.order,afnSortData:v.order,aoFeatures:v.feature,oApi:v.internal,oStdClasses:v.classes,oPagination:v.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd", -sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead", -sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ea="",Ea="",H=Ea+"ui-state-default",ia=Ea+"css_right ui-icon ui-icon-",Xb=Ea+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses, -m.ext.classes,{sPageButton:"fg-button ui-button "+H,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:H+" sorting_asc",sSortDesc:H+" sorting_desc",sSortable:H+" sorting",sSortableAsc:H+" sorting_asc_disabled",sSortableDesc:H+" sorting_desc_disabled",sSortableNone:H+" sorting_disabled",sSortJUIAsc:ia+"triangle-1-n",sSortJUIDesc:ia+"triangle-1-s",sSortJUI:ia+"carat-2-n-s", -sSortJUIAscAllowed:ia+"carat-1-n",sSortJUIDescAllowed:ia+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+H,sScrollFoot:"dataTables_scrollFoot "+H,sHeaderTH:H,sFooterTH:H,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[Aa(a, -b)]},simple_numbers:function(a,b){return["previous",Aa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Aa(a,b),"next","last"]},_numbers:Aa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},k,l,m=0,p=function(b,d){var o,r,u,s,v=function(b){Ta(a,b.data.action,true)};o=0;for(r=d.length;o").appendTo(b);p(u,s)}else{k=null; -l="";switch(s){case "ellipsis":b.append('');break;case "first":k=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":k=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":k=j.sNext;l=s+(e",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[s], -"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(k).appendTo(b);Wa(u,{action:s},v);m++}}}},r;try{r=h(b).find(I.activeElement).data("dt-idx")}catch(o){}p(h(b).empty(),d);r&&h(b).find("[data-dt-idx="+r+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!bc.test(a)||!cc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date": -null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ca,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob, -" "):a}});var Ba=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(v.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a, -b){return ab?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("
    ").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e, -f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Yb=function(a){return"string"===typeof a?a.replace(//g,">").replace(/"/g,"""):a};m.render={number:function(a, -b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Yb(f);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Yb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:sa,_fnAddColumn:Ga,_fnColumnOptions:ja, -_fnAdjustColumnSizing:U,_fnVisibleToColumnIndex:Z,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:la,_fnColumnTypes:Ia,_fnApplyColumnDefs:ib,_fnHungarianMap:Y,_fnCamelToHungarian:K,_fnLanguageCompat:Fa,_fnBrowserDetect:gb,_fnAddData:N,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:La,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R, -_fnGetDataMaster:Ma,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:Ka,_fnCreateTr:Ja,_fnBuildHead:kb,_fnDrawHead:ea,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:da,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:pb,_fnFilterComplete:fa,_fnFilterCustom:yb,_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Qa,_fnEscapeRegex:va,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ga,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob, -_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:ka,_fnApplyToChildren:J,_fnCalculateColumnWidths:Ha,_fnThrottle:ua,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:x,_fnSortFlatten:W,_fnSort:mb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:L,_fnMap:E,_fnBindAction:Wa,_fnCallbackReg:z, -_fnCallbackFire:u,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:y,_fnRowAttributes:Na,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable}); - - -/*! - ColReorder 1.3.1 - ©2010-2015 SpryMedia Ltd - datatables.net/license -*/ -(function(f){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(n){return f(n,window,document)}):"object"===typeof exports?module.exports=function(n,k){n||(n=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(n,k).$;return f(k,n,n.document)}:f(jQuery,window,document)})(function(f,n,k,r){function p(a){for(var c=[],d=0,e=a.length;dc||c>=k)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+c);else if(0>d||d>=k)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+ -d);else{i=[];b=0;for(g=k;bthis.s.fixed-1&&eMath.pow(Math.pow(a.pageX-this.s.mouse.startX,2)+Math.pow(a.pageY-this.s.mouse.startY,2),0.5))return;this._fnCreateDragNode()}this.dom.drag.css({left:a.pageX-this.s.mouse.offsetX,top:a.pageY-this.s.mouse.offsetY});for(var c=!1,d=this.s.mouse.toIndex,e=1,b=this.s.aoTargets.length;e
    ").addClass("DTCR_pointer").css({position:"absolute",top:a?f("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top:f(this.s.dt.nTable).offset().top,height:a?f("div.dataTables_scroll", -this.s.dt.nTableWrapper).height():f(this.s.dt.nTable).height()}).appendTo("body")},_fnSetColumnIndexes:function(){f.each(this.s.dt.aoColumns,function(a,c){f(c.nTh).attr("data-column-index",a)})}});h.defaults={aiOrder:null,bRealtime:!0,iFixedColumnsLeft:0,iFixedColumnsRight:0,fnReorderCallback:null};h.version="1.3.1";f.fn.dataTable.ColReorder=h;f.fn.DataTable.ColReorder=h;"function"==typeof f.fn.dataTable&&"function"==typeof f.fn.dataTableExt.fnVersionCheck&&f.fn.dataTableExt.fnVersionCheck("1.10.8")? -f.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var c=a.oInstance;a._colReorder?c.oApi._fnLog(a,1,"ColReorder attempted to initialise twice. Ignoring second"):(c=a.oInit,new h(a,c.colReorder||c.oColReorder||{}));return null},cFeature:"R",sFeature:"ColReorder"}):alert("Warning: ColReorder requires DataTables 1.10.8 or greater - www.datatables.net/download");f(k).on("preInit.dt.colReorder",function(a,c){if("dt"===a.namespace){var d=c.oInit.colReorder,e=s.defaults.colReorder;if(d||e)e=f.extend({}, -d,e),!1!==d&&new h(c,e)}});f.fn.dataTable.Api.register("colReorder.reset()",function(){return this.iterator("table",function(a){a._colReorder.fnReset()})});f.fn.dataTable.Api.register("colReorder.order()",function(a,c){return a?this.iterator("table",function(d){d._colReorder.fnOrder(a,c)}):this.context.length?this.context[0]._colReorder.fnOrder():null});f.fn.dataTable.Api.register("colReorder.transpose()",function(a,c){return this.context.length&&this.context[0]._colReorder?this.context[0]._colReorder.fnTranspose(a, -c):a});return h}); - - -/*! - FixedHeader 3.1.1 - ©2009-2016 SpryMedia Ltd - datatables.net/license -*/ -(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(g){return d(g,window,document)}):"object"===typeof exports?module.exports=function(g,h){g||(g=window);if(!h||!h.fn.dataTable)h=require("datatables.net")(g,h).$;return d(h,g,g.document)}:d(jQuery,window,document)})(function(d,g,h,k){var j=d.fn.dataTable,l=0,i=function(b,a){if(!(this instanceof i))throw"FixedHeader must be initialised with the 'new' keyword.";!0===a&&(a={});b=new j.Api(b);this.c=d.extend(!0, -{},i.defaults,a);this.s={dt:b,position:{theadTop:0,tbodyTop:0,tfootTop:0,tfootBottom:0,width:0,left:0,tfootHeight:0,theadHeight:0,windowHeight:d(g).height(),visible:!0},headerMode:null,footerMode:null,autoWidth:b.settings()[0].oFeatures.bAutoWidth,namespace:".dtfc"+l++,scrollLeft:{header:-1,footer:-1},enable:!0};this.dom={floatingHeader:null,thead:d(b.table().header()),tbody:d(b.table().body()),tfoot:d(b.table().footer()),header:{host:null,floating:null,placeholder:null},footer:{host:null,floating:null, -placeholder:null}};this.dom.header.host=this.dom.thead.parent();this.dom.footer.host=this.dom.tfoot.parent();var e=b.settings()[0];if(e._fixedHeader)throw"FixedHeader already initialised on table "+e.nTable.id;e._fixedHeader=this;this._constructor()};d.extend(i.prototype,{enable:function(b){this.s.enable=b;this.c.header&&this._modeChange("in-place","header",!0);this.c.footer&&this.dom.tfoot.length&&this._modeChange("in-place","footer",!0);this.update()},headerOffset:function(b){b!==k&&(this.c.headerOffset= -b,this.update());return this.c.headerOffset},footerOffset:function(b){b!==k&&(this.c.footerOffset=b,this.update());return this.c.footerOffset},update:function(){this._positions();this._scroll(!0)},_constructor:function(){var b=this,a=this.s.dt;d(g).on("scroll"+this.s.namespace,function(){b._scroll()}).on("resize"+this.s.namespace,function(){b.s.position.windowHeight=d(g).height();b.update()});a.on("column-reorder.dt.dtfc column-visibility.dt.dtfc draw.dt.dtfc column-sizing.dt.dtfc",function(){b.update()}); -a.on("destroy.dtfc",function(){a.off(".dtfc");d(g).off(b.s.namespace)});this._positions();this._scroll()},_clone:function(b,a){var e=this.s.dt,c=this.dom[b],f="header"===b?this.dom.thead:this.dom.tfoot;!a&&c.floating?c.floating.removeClass("fixedHeader-floating fixedHeader-locked"):(c.floating&&(c.placeholder.remove(),this._unsize(b),c.floating.children().detach(),c.floating.remove()),c.floating=d(e.table().node().cloneNode(!1)).css("table-layout","fixed").removeAttr("id").append(f).appendTo("body"), -c.placeholder=f.clone(!1),c.host.prepend(c.placeholder),this._matchWidths(c.placeholder,c.floating))},_matchWidths:function(b,a){var e=function(a){return d(a,b).map(function(){return d(this).width()}).toArray()},c=function(b,c){d(b,a).each(function(a){d(this).css({width:c[a],minWidth:c[a]})})},f=e("th"),e=e("td");c("th",f);c("td",e)},_unsize:function(b){var a=this.dom[b].floating;a&&("footer"===b||"header"===b&&!this.s.autoWidth)?d("th, td",a).css({width:"",minWidth:""}):a&&"header"===b&&d("th, td", -a).css("min-width","")},_horizontal:function(b,a){var e=this.dom[b],c=this.s.position,d=this.s.scrollLeft;e.floating&&d[b]!==a&&(e.floating.css("left",c.left-a),d[b]=a)},_modeChange:function(b,a,d){var c=this.dom[a],f=this.s.position;if("in-place"===b){if(c.placeholder&&(c.placeholder.remove(),c.placeholder=null),this._unsize(a),"header"===a?c.host.prepend(this.dom.thead):c.host.append(this.dom.tfoot),c.floating)c.floating.remove(),c.floating=null}else"in"===b?(this._clone(a,d),c.floating.addClass("fixedHeader-floating").css("header"=== -a?"top":"bottom",this.c[a+"Offset"]).css("left",f.left+"px").css("width",f.width+"px"),"footer"===a&&c.floating.css("top","")):"below"===b?(this._clone(a,d),c.floating.addClass("fixedHeader-locked").css("top",f.tfootTop-f.theadHeight).css("left",f.left+"px").css("width",f.width+"px")):"above"===b&&(this._clone(a,d),c.floating.addClass("fixedHeader-locked").css("top",f.tbodyTop).css("left",f.left+"px").css("width",f.width+"px"));this.s.scrollLeft.header=-1;this.s.scrollLeft.footer=-1;this.s[a+"Mode"]= -b},_positions:function(){var b=this.s.dt.table(),a=this.s.position,e=this.dom,b=d(b.node()),c=b.children("thead"),f=b.children("tfoot"),e=e.tbody;a.visible=b.is(":visible");a.width=b.outerWidth();a.left=b.offset().left;a.theadTop=c.offset().top;a.tbodyTop=e.offset().top;a.theadHeight=a.tbodyTop-a.theadTop;f.length?(a.tfootTop=f.offset().top,a.tfootBottom=a.tfootTop+f.outerHeight(),a.tfootHeight=a.tfootBottom-a.tfootTop):(a.tfootTop=a.tbodyTop+e.outerHeight(),a.tfootBottom=a.tfootTop,a.tfootHeight= -a.tfootTop)},_scroll:function(b){var a=d(h).scrollTop(),e=d(h).scrollLeft(),c=this.s.position,f;if(this.s.enable&&(this.c.header&&(f=!c.visible||a<=c.theadTop-this.c.headerOffset?"in-place":a<=c.tfootTop-c.theadHeight-this.c.headerOffset?"in":"below",(b||f!==this.s.headerMode)&&this._modeChange(f,"header",b),this._horizontal("header",e)),this.c.footer&&this.dom.tfoot.length))a=!c.visible||a+c.windowHeight>=c.tfootBottom+this.c.footerOffset?"in-place":c.windowHeight+a>c.tbodyTop+c.tfootHeight+this.c.footerOffset? -"in":"above",(b||a!==this.s.footerMode)&&this._modeChange(a,"footer",b),this._horizontal("footer",e)}});i.version="3.1.1";i.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};d.fn.dataTable.FixedHeader=i;d.fn.DataTable.FixedHeader=i;d(h).on("init.dt.dtfh",function(b,a){if("dt"===b.namespace){var e=a.oInit.fixedHeader,c=j.defaults.fixedHeader;if((e||c)&&!a._fixedHeader)c=d.extend({},c,e),!1!==e&&new i(a,c)}});j.Api.register("fixedHeader()",function(){});j.Api.register("fixedHeader.adjust()", -function(){return this.iterator("table",function(b){(b=b._fixedHeader)&&b.update()})});j.Api.register("fixedHeader.enable()",function(b){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.enable(b!==k?b:!0)})});j.Api.register("fixedHeader.disable()",function(){return this.iterator("table",function(b){(b=b._fixedHeader)&&b.enable(!1)})});d.each(["header","footer"],function(b,a){j.Api.register("fixedHeader."+a+"Offset()",function(b){var c=this.context;return b===k?c.length&&c[0]._fixedHeader? -c[0]._fixedHeader[a+"Offset"]():k:this.iterator("table",function(c){if(c=c._fixedHeader)c[a+"Offset"](b)})})});return i}); - - -/*! - Responsive 2.0.2 - 2014-2016 SpryMedia Ltd - datatables.net/license -*/ -(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(j){return c(j,window,document)}):"object"===typeof exports?module.exports=function(j,k){j||(j=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(j,k).$;return c(k,j,j.document)}:c(jQuery,window,document)})(function(c,j,k,p){var n=c.fn.dataTable,l=function(a,b){if(!n.versionCheck||!n.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new n.Api(a),columns:[], -current:[]};this.s.dt.settings()[0].responsive||(b&&"string"===typeof b.details?b.details={type:b.details}:b&&!1===b.details?b.details={type:!1}:b&&!0===b.details&&(b.details={type:"inline"}),this.c=c.extend(!0,{},l.defaults,n.defaults.responsive,b),a.responsive=this,this._constructor())};c.extend(l.prototype,{_constructor:function(){var a=this,b=this.s.dt,d=b.settings()[0],e=c(j).width();b.settings()[0]._responsive=this;c(j).on("resize.dtr orientationchange.dtr",n.util.throttle(function(){var b= -c(j).width();b!==e&&(a._resize(),e=b)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(e){-1!==c.inArray(!1,a.s.current)&&c("td, th",e).each(function(e){e=b.column.index("toData",e);!1===a.s.current[e]&&c(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");c(b.table().body()).off(".dtr");c(j).off("resize.dtr orientationchange.dtr");c.each(a.s.current,function(b,e){!1===e&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.width -b.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!==d.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._classLogic();a._resizeAuto();a._resize()}),b.on("draw.dtr",function(){a._redrawChildren()}),c(b.table().node()).addClass("dtr-"+d.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize()});b.on("column-sizing.dtr",function(){a._resize()});b.on("init.dtr",function(){a._resizeAuto();a._resize();c.inArray(false,a.s.current)&&b.columns.adjust()}); -this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,d=this.s.columns,e,f,g=d.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=c.map(d,function(b){return b.auto&&null===b.minWidth?!1:!0===b.auto?"-":-1!==c.inArray(a,b.includeIn)}),m=0;e=0;for(f=h.length;eb-d[i].minWidth?(m=!0,h[i]=!1):h[i]=!0,b-=d[i].minWidth)}g=!1;e=0;for(f=d.length;e= -g&&f(c,b[d].name)}else{if("not-"===i){d=0;for(i=b.length;d").append(h).appendTo(f)}c("").append(g).appendTo(e);"inline"===this.c.details.type&&c(d).addClass("dtr-inline collapsed");d=c("
    ").css({width:1,height:1,overflow:"hidden"}).append(d);d.insertBefore(a.table().node()); -g.each(function(c){c=a.column.index("fromVisible",c);b[c].minWidth=this.offsetWidth||0});d.remove()}},_setColumnVis:function(a,b){var d=this.s.dt,e=b?"":"none";c(d.column(a).header()).css("display",e);c(d.column(a).footer()).css("display",e);d.column(a).nodes().to$().css("display",e)},_tabIndexes:function(){var a=this.s.dt,b=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");c("number"===typeof e?":eq("+ -e+")":e,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1)}});l.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];l.display={childRow:function(a,b,d){if(b){if(c(a.node()).hasClass("parent"))return a.child(d(),"child").show(),!0}else{if(a.child.isShown())return a.child(!1),c(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();c(a.node()).addClass("parent"); -return!0}},childRowImmediate:function(a,b,d){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),c(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();c(a.node()).addClass("parent");return!0},modal:function(a){return function(b,d,e){if(d)c("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();c(k).off("keypress.dtr")},g=c('
    ').append(c('
    ').append(c('
    ').append(e())).append(c('
    ×
    ').click(function(){f()}))).append(c('
    ').click(function(){f()})).appendTo("body"); -c(k).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&c("div.dtr-modal-content").prepend("

    "+a.header(b)+"

    ")}}};l.defaults={breakpoints:l.breakpoints,auto:!0,details:{display:l.display.childRow,renderer:function(a,b,d){return(a=c.map(d,function(a){return a.hidden?'
  • '+a.title+' '+a.data+"
  • ": -""}).join(""))?c('
      ').append(a):!1},target:0,type:"inline"},orthogonal:"display"};var o=c.fn.dataTable.Api;o.register("responsive()",function(){return this});o.register("responsive.index()",function(a){a=c(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});o.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});o.register("responsive.recalc()",function(){return this.iterator("table", -function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});o.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==c.inArray(!1,a._responsive.s.current):!1});l.version="2.0.2";c.fn.dataTable.Responsive=l;c.fn.DataTable.Responsive=l;c(k).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(c(b.nTable).hasClass("responsive")||c(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||n.defaults.responsive)){var d=b.oInit.responsive; -!1!==d&&new l(b,c.isPlainObject(d)?d:{})}});return l}); - - -/*! - RowReorder 1.1.1 - 2015-2016 SpryMedia Ltd - datatables.net/license -*/ -(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(f){return e(f,window,document)}):"object"===typeof exports?module.exports=function(f,g){f||(f=window);if(!g||!g.fn.dataTable)g=require("datatables.net")(f,g).$;return e(g,f,f.document)}:e(jQuery,window,document)})(function(e,f,g){var j=e.fn.dataTable,i=function(b,a){if(!j.versionCheck||!j.versionCheck("1.10.8"))throw"DataTables RowReorder requires DataTables 1.10.8 or newer";this.c=e.extend(!0,{},j.defaults.rowReorder, -i.defaults,a);this.s={bodyTop:null,dt:new j.Api(b),getDataFn:j.ext.oApi._fnGetObjectDataFn(this.c.dataSrc),middles:null,scroll:{},scrollInterval:null,setDataFn:j.ext.oApi._fnSetObjectDataFn(this.c.dataSrc),start:{top:0,left:0,offsetTop:0,offsetLeft:0,nodes:[]},windowHeight:0};this.dom={clone:null,dtScroll:e("div.dataTables_scrollBody",this.s.dt.table().container())};var c=this.s.dt.settings()[0],d=c.rowreorder;if(d)return d;c.rowreorder=this;this._constructor()};e.extend(i.prototype,{_constructor:function(){var b= -this,a=this.s.dt,c=e(a.table().node());"static"===c.css("position")&&c.css("position","relative");e(a.table().container()).on("mousedown.rowReorder touchstart.rowReorder",this.c.selector,function(d){var c=e(this).closest("tr");if(a.row(c).any())return b._mouseDown(d,c),!1});a.on("destroy.rowReorder",function(){e(a.table().container()).off(".rowReorder");a.off(".rowReorder")})},_cachePositions:function(){var b=this.s.dt,a=e(b.table().node()).find("thead").outerHeight(),c=e.unique(b.rows({page:"current"}).nodes().toArray()), -d=e.map(c,function(b){return e(b).position().top-a}),c=e.map(d,function(a,c){return d.length").append(b.clone(!1)),c=b.outerWidth(),d=b.outerHeight(),h=b.children().map(function(){return e(this).width()});a.width(c).height(d).find("tr").children().each(function(a){this.style.width= -h[a]+"px"});a.appendTo("body");this.dom.clone=a},_clonePosition:function(b){var a=this.s.start,c=this._eventToPage(b,"Y")-a.top,b=this._eventToPage(b,"X")-a.left,d=this.c.snapX;this.dom.clone.css({top:c+a.offsetTop,left:!0===d?a.offsetLeft:"number"===typeof d?a.offsetLeft+d:b+a.offsetLeft})},_emitEvent:function(b,a){this.s.dt.iterator("table",function(c){e(c.nTable).triggerHandler(b+".dt",a)})},_eventToPage:function(b,a){return-1!==b.type.indexOf("touch")?b.originalEvent.touches[0]["page"+a]:b["page"+ -a]},_mouseDown:function(b,a){var c=this,d=this.s.dt,h=this.s.start,k=a.offset();h.top=this._eventToPage(b,"Y");h.left=this._eventToPage(b,"X");h.offsetTop=k.top;h.offsetLeft=k.left;h.nodes=e.unique(d.rows({page:"current"}).nodes().toArray());this._cachePositions();this._clone(a);this._clonePosition(b);this.dom.target=a;a.addClass("dt-rowReorder-moving");e(g).on("mouseup.rowReorder touchend.rowReorder",function(a){c._mouseUp(a)}).on("mousemove.rowReorder touchmove.rowReorder",function(a){c._mouseMove(a)}); -e(f).width()===e(g).width()&&e(g.body).addClass("dt-rowReorder-noOverflow");d=this.dom.dtScroll;this.s.scroll={windowHeight:e(f).height(),windowWidth:e(f).width(),dtTop:d.length?d.offset().top:null,dtLeft:d.length?d.offset().left:null,dtHeight:d.length?d.outerHeight():null,dtWidth:d.length?d.outerWidth():null}},_mouseMove:function(b){this._clonePosition(b);for(var a=this._eventToPage(b,"Y")-this.s.bodyTop,c=this.s.middles,d=null,h=this.s.dt,k=h.table().body(),g=0,f=c.length;gthis.s.lastInsert?this.dom.target.insertAfter(a[d-1]):this.dom.target.insertBefore(a[d])),this._cachePositions(),this.s.lastInsert=d;this._shiftScroll(b)},_mouseUp:function(){var b=this.s.dt,a,c,d=this.c.dataSrc;this.dom.clone.remove();this.dom.clone=null;this.dom.target.removeClass("dt-rowReorder-moving");e(g).off(".rowReorder"); -e(g.body).removeClass("dt-rowReorder-noOverflow");clearInterval(this.s.scrollInterval);this.s.scrollInterval=null;var h=this.s.start.nodes,k=e.unique(b.rows({page:"current"}).nodes().toArray()),f={},l=[],i=[],j=this.s.getDataFn,o=this.s.setDataFn;a=0;for(c=h.length;ae?f=-5:e>c.windowHeight- -65&&(f=5);null!==c.dtTop&&b.pageYc.dtTop+c.dtHeight-65&&(i=5);f||i?(c.windowVert=f,c.dtVert=i,d=!0):this.s.scrollInterval&&(clearInterval(this.s.scrollInterval),this.s.scrollInterval=null);!this.s.scrollInterval&&d&&(this.s.scrollInterval=setInterval(function(){if(c.windowVert)g.body.scrollTop=g.body.scrollTop+c.windowVert;if(c.dtVert){var b=a.dom.dtScroll[0];if(c.dtVert)b.scrollTop=b.scrollTop+c.dtVert}},20))}});i.defaults={dataSrc:0,editor:null,selector:"td:first-child", -snapX:!1,update:!0};i.version="1.1.1";e.fn.dataTable.RowReorder=i;e.fn.DataTable.RowReorder=i;e(g).on("init.dt.dtr",function(b,a){if("dt"===b.namespace){var c=a.oInit.rowReorder,d=j.defaults.rowReorder;if(c||d)d=e.extend({},c,d),!1!==c&&new i(a,d)}});return i}); - - -/*! - Select for DataTables 1.1.2 - 2015-2016 SpryMedia Ltd - datatables.net/license/mit -*/ -(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(j){return e(j,window,document)}):"object"===typeof exports?module.exports=function(j,l){j||(j=window);if(!l||!l.fn.dataTable)l=require("datatables.net")(j,l).$;return e(l,j,j.document)}:e(jQuery,window,document)})(function(e,j,l,i){function s(a){var b=a.settings()[0]._select.selector;e(a.table().body()).off("mousedown.dtSelect",b).off("mouseup.dtSelect",b).off("click.dtSelect",b);e("body").off("click.dtSelect")} -function u(a){var b=e(a.table().body()),c=a.settings()[0],d=c._select.selector;b.on("mousedown.dtSelect",d,function(c){if(c.shiftKey)b.css("-moz-user-select","none").one("selectstart.dtSelect",d,function(){return!1})}).on("mouseup.dtSelect",d,function(){b.css("-moz-user-select","")}).on("click.dtSelect",d,function(c){var b=a.select.items();if(!j.getSelection||!j.getSelection().toString()){var d=a.settings()[0];if(e(c.target).closest("div.dataTables_wrapper")[0]==a.table().container()){var m=e(c.target).closest("td, th"), -h=a.cell(m).index();a.cell(m).any()&&("row"===b?(b=h.row,t(c,a,d,"row",b)):"column"===b?(b=a.cell(m).index().column,t(c,a,d,"column",b)):"cell"===b&&(b=a.cell(m).index(),t(c,a,d,"cell",b)),d._select_lastCell=h)}}});e("body").on("click.dtSelect",function(b){c._select.blurable&&!e(b.target).parents().filter(a.table().container()).length&&(e(b.target).parents("div.DTE").length||q(c,!0))})}function k(a,b,c,d){if(!d||a.flatten().length)c.unshift(a),e(a.table().node()).triggerHandler(b+".dt",c)}function v(a){var b= -a.settings()[0];if(b._select.info&&b.aanFeatures.i){var c=e(''),d=function(b,d){c.append(e('').append(a.i18n("select."+b+"s",{_:"%d "+b+"s selected","0":"",1:"1 "+b+" selected"},d)))};d("row",a.rows({selected:!0}).flatten().length);d("column",a.columns({selected:!0}).flatten().length);d("cell",a.cells({selected:!0}).flatten().length);e.each(b.aanFeatures.i,function(b,a){var a=e(a),d=a.children("span.select-info");d.length&&d.remove();""!==c.text()&& -a.append(c)})}}function q(a,b){if(b||"single"===a._select.style){var c=new h.Api(a);c.rows({selected:!0}).deselect();c.columns({selected:!0}).deselect();c.cells({selected:!0}).deselect()}}function t(a,b,c,d,f){var n=b.select.style(),g=b[d](f,{selected:!0}).any();"os"===n?a.ctrlKey||a.metaKey?b[d](f).select(!g):a.shiftKey?"cell"===d?(d=c._select_lastCell||null,g=function(c,a){if(c>a)var d=a,a=c,c=d;var f=!1;return b.columns(":visible").indexes().filter(function(b){b===c&&(f=!0);return b===a?(f=!1, -!0):f})},a=function(c,a){var d=b.rows({search:"applied"}).indexes();if(d.indexOf(c)>d.indexOf(a))var f=a,a=c,c=f;var g=!1;return d.filter(function(b){b===c&&(g=!0);return b===a?(g=!1,!0):g})},!b.cells({selected:!0}).any()&&!d?(g=g(0,f.column),d=a(0,f.row)):(g=g(d.column,f.column),d=a(d.row,f.row)),d=b.cells(d,g).flatten(),b.cells(f,{selected:!0}).any()?b.cells(d).deselect():b.cells(d).select()):(a=c._select_lastCell?c._select_lastCell[d]:null,g=b[d+"s"]({search:"applied"}).indexes(),a=e.inArray(a, -g),c=e.inArray(f,g),!b[d+"s"]({selected:!0}).any()&&-1===a?g.splice(e.inArray(f,g)+1,g.length):(a>c&&(n=c,c=a,a=n),g.splice(c+1,g.length),g.splice(0,a)),b[d](f,{selected:!0}).any())?(g.splice(e.inArray(f,g),1),b[d+"s"](g).deselect()):b[d+"s"](g).select():(a=b[d+"s"]({selected:!0}),g&&1===a.flatten().length?b[d](f).deselect():(a.deselect(),b[d](f).select())):b[d](f).select(!g)}function r(a,b){return function(c){return c.i18n("buttons."+a,b)}}var h=e.fn.dataTable;h.select={};h.select.version="1.1.2"; -h.select.init=function(a){var b=a.settings()[0],c=b.oInit.select,d=h.defaults.select,c=c===i?d:c,d="row",f="api",n=!1,g=!0,m="td, th",j="selected";b._select={};if(!0===c)f="os";else if("string"===typeof c)f=c;else if(e.isPlainObject(c)&&(c.blurable!==i&&(n=c.blurable),c.info!==i&&(g=c.info),c.items!==i&&(d=c.items),c.style!==i&&(f=c.style),c.selector!==i&&(m=c.selector),c.className!==i))j=c.className;a.select.selector(m);a.select.items(d);a.select.style(f);a.select.blurable(n);a.select.info(g);b._select.className= -j;e.fn.dataTable.ext.order["select-checkbox"]=function(b,c){return this.api().column(c,{order:"index"}).nodes().map(function(c){return"row"===b._select.items?e(c).parent().hasClass(b._select.className):"cell"===b._select.items?e(c).hasClass(b._select.className):!1})};e(a.table().node()).hasClass("selectable")&&a.select.style("os")};e.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(a,b){h.ext.selector[b.type].push(function(c,a,f){var a=a.selected,e,g=[];if(a===i)return f; -for(var h=0,j=f.length;h', - postfixhtml = '' + settings.postfix + ''; - - if (prev.hasClass('input-group-btn')) { - downhtml = ''; - prev.append(downhtml); - } - else { - downhtml = ''; - $(downhtml).insertBefore(originalinput); - } - - if (next.hasClass('input-group-btn')) { - uphtml = ''; - next.prepend(uphtml); - } - else { - uphtml = ''; - $(uphtml).insertAfter(originalinput); - } - - $(prefixhtml).insertBefore(originalinput); - $(postfixhtml).insertAfter(originalinput); - - container = parentelement; - } - - function _buildInputGroup() { - var html; - - if (settings.verticalbuttons) { - html = '
      ' + settings.prefix + '' + settings.postfix + '
      '; - } - else { - html = '
      ' + settings.prefix + '' + settings.postfix + '
      '; - } - - container = $(html).insertBefore(originalinput); - - $('.bootstrap-touchspin-prefix', container).after(originalinput); - - if (originalinput.hasClass('input-sm')) { - container.addClass('input-group-sm'); - } - else if (originalinput.hasClass('input-lg')) { - container.addClass('input-group-lg'); - } - } - - function _initElements() { - elements = { - down: $('.bootstrap-touchspin-down', container), - up: $('.bootstrap-touchspin-up', container), - input: $('input', container), - prefix: $('.bootstrap-touchspin-prefix', container).addClass(settings.prefix_extraclass), - postfix: $('.bootstrap-touchspin-postfix', container).addClass(settings.postfix_extraclass) - }; - } - - function _hideEmptyPrefixPostfix() { - if (settings.prefix === '') { - elements.prefix.hide(); - } - - if (settings.postfix === '') { - elements.postfix.hide(); - } - } - - function _bindEvents() { - originalinput.on('keydown', function(ev) { - var code = ev.keyCode || ev.which; - - if (code === 38) { - if (spinning !== 'up') { - upOnce(); - startUpSpin(); - } - ev.preventDefault(); - } - else if (code === 40) { - if (spinning !== 'down') { - downOnce(); - startDownSpin(); - } - ev.preventDefault(); - } - }); - - originalinput.on('keyup', function(ev) { - var code = ev.keyCode || ev.which; - - if (code === 38) { - stopSpin(); - } - else if (code === 40) { - stopSpin(); - } - }); - - originalinput.on('blur', function() { - _checkValue(); - }); - - elements.down.on('keydown', function(ev) { - var code = ev.keyCode || ev.which; - - if (code === 32 || code === 13) { - if (spinning !== 'down') { - downOnce(); - startDownSpin(); - } - ev.preventDefault(); - } - }); - - elements.down.on('keyup', function(ev) { - var code = ev.keyCode || ev.which; - - if (code === 32 || code === 13) { - stopSpin(); - } - }); - - elements.up.on('keydown', function(ev) { - var code = ev.keyCode || ev.which; - - if (code === 32 || code === 13) { - if (spinning !== 'up') { - upOnce(); - startUpSpin(); - } - ev.preventDefault(); - } - }); - - elements.up.on('keyup', function(ev) { - var code = ev.keyCode || ev.which; - - if (code === 32 || code === 13) { - stopSpin(); - } - }); - - elements.down.on('mousedown.touchspin', function(ev) { - elements.down.off('touchstart.touchspin'); // android 4 workaround - - if (originalinput.is(':disabled')) { - return; - } - - downOnce(); - startDownSpin(); - - ev.preventDefault(); - ev.stopPropagation(); - }); - - elements.down.on('touchstart.touchspin', function(ev) { - elements.down.off('mousedown.touchspin'); // android 4 workaround - - if (originalinput.is(':disabled')) { - return; - } - - downOnce(); - startDownSpin(); - - ev.preventDefault(); - ev.stopPropagation(); - }); - - elements.up.on('mousedown.touchspin', function(ev) { - elements.up.off('touchstart.touchspin'); // android 4 workaround - - if (originalinput.is(':disabled')) { - return; - } - - upOnce(); - startUpSpin(); - - ev.preventDefault(); - ev.stopPropagation(); - }); - - elements.up.on('touchstart.touchspin', function(ev) { - elements.up.off('mousedown.touchspin'); // android 4 workaround - - if (originalinput.is(':disabled')) { - return; - } - - upOnce(); - startUpSpin(); - - ev.preventDefault(); - ev.stopPropagation(); - }); - - elements.up.on('mouseout touchleave touchend touchcancel', function(ev) { - if (!spinning) { - return; - } - - ev.stopPropagation(); - stopSpin(); - }); - - elements.down.on('mouseout touchleave touchend touchcancel', function(ev) { - if (!spinning) { - return; - } - - ev.stopPropagation(); - stopSpin(); - }); - - elements.down.on('mousemove touchmove', function(ev) { - if (!spinning) { - return; - } - - ev.stopPropagation(); - ev.preventDefault(); - }); - - elements.up.on('mousemove touchmove', function(ev) { - if (!spinning) { - return; - } - - ev.stopPropagation(); - ev.preventDefault(); - }); - - $(document).on(_scopeEventNames(['mouseup', 'touchend', 'touchcancel'], _currentSpinnerId).join(' '), function(ev) { - if (!spinning) { - return; - } - - ev.preventDefault(); - stopSpin(); - }); - - $(document).on(_scopeEventNames(['mousemove', 'touchmove', 'scroll', 'scrollstart'], _currentSpinnerId).join(' '), function(ev) { - if (!spinning) { - return; - } - - ev.preventDefault(); - stopSpin(); - }); - - originalinput.on('mousewheel DOMMouseScroll', function(ev) { - if (!settings.mousewheel || !originalinput.is(':focus')) { - return; - } - - var delta = ev.originalEvent.wheelDelta || -ev.originalEvent.deltaY || -ev.originalEvent.detail; - - ev.stopPropagation(); - ev.preventDefault(); - - if (delta < 0) { - downOnce(); - } - else { - upOnce(); - } - }); - } - - function _bindEventsInterface() { - originalinput.on('touchspin.uponce', function() { - stopSpin(); - upOnce(); - }); - - originalinput.on('touchspin.downonce', function() { - stopSpin(); - downOnce(); - }); - - originalinput.on('touchspin.startupspin', function() { - startUpSpin(); - }); - - originalinput.on('touchspin.startdownspin', function() { - startDownSpin(); - }); - - originalinput.on('touchspin.stopspin', function() { - stopSpin(); - }); - - originalinput.on('touchspin.updatesettings', function(e, newsettings) { - changeSettings(newsettings); - }); - } - - function _forcestepdivisibility(value) { - switch (settings.forcestepdivisibility) { - case 'round': - return (Math.round(value / settings.step) * settings.step).toFixed(settings.decimals); - case 'floor': - return (Math.floor(value / settings.step) * settings.step).toFixed(settings.decimals); - case 'ceil': - return (Math.ceil(value / settings.step) * settings.step).toFixed(settings.decimals); - default: - return value; - } - } - - function _checkValue() { - var val, parsedval, returnval; - - val = originalinput.val(); - - if (val === '') { - return; - } - - if (settings.decimals > 0 && val === '.') { - return; - } - - parsedval = parseFloat(val); - - if (isNaN(parsedval)) { - parsedval = 0; - } - - returnval = parsedval; - - if (parsedval.toString() !== val) { - returnval = parsedval; - } - - if (parsedval < settings.min) { - returnval = settings.min; - } - - if (parsedval > settings.max) { - returnval = settings.max; - } - - returnval = _forcestepdivisibility(returnval); - - if (Number(val).toString() !== returnval.toString()) { - originalinput.val(returnval); - originalinput.trigger('change'); - } - } - - function _getBoostedStep() { - if (!settings.booster) { - return settings.step; - } - else { - var boosted = Math.pow(2, Math.floor(spincount / settings.boostat)) * settings.step; - - if (settings.maxboostedstep) { - if (boosted > settings.maxboostedstep) { - boosted = settings.maxboostedstep; - value = Math.round((value / boosted)) * boosted; - } - } - - return Math.max(settings.step, boosted); - } - } - - function upOnce() { - _checkValue(); - - value = parseFloat(elements.input.val()); - if (isNaN(value)) { - value = 0; - } - - var initvalue = value, - boostedstep = _getBoostedStep(); - - value = value + boostedstep; - - if (value > settings.max) { - value = settings.max; - originalinput.trigger('touchspin.on.max'); - stopSpin(); - } - - elements.input.val(Number(value).toFixed(settings.decimals)); - - if (initvalue !== value) { - originalinput.trigger('change'); - } - } - - function downOnce() { - _checkValue(); - - value = parseFloat(elements.input.val()); - if (isNaN(value)) { - value = 0; - } - - var initvalue = value, - boostedstep = _getBoostedStep(); - - value = value - boostedstep; - - if (value < settings.min) { - value = settings.min; - originalinput.trigger('touchspin.on.min'); - stopSpin(); - } - - elements.input.val(value.toFixed(settings.decimals)); - - if (initvalue !== value) { - originalinput.trigger('change'); - } - } - - function startDownSpin() { - stopSpin(); - - spincount = 0; - spinning = 'down'; - - originalinput.trigger('touchspin.on.startspin'); - originalinput.trigger('touchspin.on.startdownspin'); - - downDelayTimeout = setTimeout(function() { - downSpinTimer = setInterval(function() { - spincount++; - downOnce(); - }, settings.stepinterval); - }, settings.stepintervaldelay); - } - - function startUpSpin() { - stopSpin(); - - spincount = 0; - spinning = 'up'; - - originalinput.trigger('touchspin.on.startspin'); - originalinput.trigger('touchspin.on.startupspin'); - - upDelayTimeout = setTimeout(function() { - upSpinTimer = setInterval(function() { - spincount++; - upOnce(); - }, settings.stepinterval); - }, settings.stepintervaldelay); - } - - function stopSpin() { - clearTimeout(downDelayTimeout); - clearTimeout(upDelayTimeout); - clearInterval(downSpinTimer); - clearInterval(upSpinTimer); - - switch (spinning) { - case 'up': - originalinput.trigger('touchspin.on.stopupspin'); - originalinput.trigger('touchspin.on.stopspin'); - break; - case 'down': - originalinput.trigger('touchspin.on.stopdownspin'); - originalinput.trigger('touchspin.on.stopspin'); - break; - } - - spincount = 0; - spinning = false; - } - - }); - - }; - -})(jQuery); diff --git a/server/templates/admin/app/js/jquery.hoverIntent.minified.js b/server/templates/admin/app/js/jquery.hoverIntent.minified.js deleted file mode 100644 index 653a0a65..00000000 --- a/server/templates/admin/app/js/jquery.hoverIntent.minified.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+ - * http://cherne.net/brian/resources/jquery.hoverIntent.html - * - * You may use hoverIntent under the terms of the MIT license. Basically that - * means you are free to use hoverIntent as long as this header is left intact. - * Copyright 2007, 2014 Brian Cherne - */ -(function($){$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var cfg={interval:100,sensitivity:6,timeout:0};if(typeof handlerIn==="object"){cfg=$.extend(cfg,handlerIn)}else{if($.isFunction(handlerOut)){cfg=$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector})}else{cfg=$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut})}}var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(Math.sqrt((pX-cX)*(pX-cX)+(pY-cY)*(pY-cY))frti', - dom: '<"table-tbar btns-tables">fr<"uds-table"t>ip', - responsive: true, - colReorder: true, - stateSave: true, - paging: true, - info: true, - autoWidth: true, - lengthChange: false, - pageLength: 10, - - deferRender: true, - paging: true, - // pagingType: 'full', - info: true, - - columnDefs: [ { - orderable: false, - className: 'select-checkbox', - targets: 0 - } ], - - select: { - style: 'os', - items: 'row' - }, - - ordering: [[ 1, "asc" ]] - - } - - $('#table1').DataTable(options); - $('#table2').DataTable(options); - - $('.table-tbar').html( - ''+ - ''+ - '' + - ''+ - ''+ - '') -}); diff --git a/server/templates/admin/app/robots.txt b/server/templates/admin/app/robots.txt deleted file mode 100644 index b5566484..00000000 --- a/server/templates/admin/app/robots.txt +++ /dev/null @@ -1,4 +0,0 @@ -# robotstxt.org/ - -User-agent: * -Disallow: diff --git a/server/templates/admin/bower.json b/server/templates/admin/bower.json deleted file mode 100644 index 1e64cc4d..00000000 --- a/server/templates/admin/bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "admin", - "private": true, - "dependencies": { - "bootstrap-sass": ">=3.3.5" - }, - "overrides": { - "bootstrap-sass": { - "main": [ - "assets/stylesheets/_bootstrap.scss", - "assets/fonts/bootstrap/*", - "assets/javascripts/bootstrap.js" - ] - } - }, - "devDependencies": { - "chai": "~3.3.0", - "mocha": "~2.3.3" - } -} diff --git a/server/templates/admin/copy.sh b/server/templates/admin/copy.sh deleted file mode 100755 index b121d99a..00000000 --- a/server/templates/admin/copy.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -grunt build -cp dist/css/main.css ../../src/uds/static/adm/css/uds.css diff --git a/server/templates/admin/package.json b/server/templates/admin/package.json deleted file mode 100644 index c786e236..00000000 --- a/server/templates/admin/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "private": true, - "devDependencies": { - "autoprefixer": "^6.7.7", - "grunt": "^0.4.5", - "grunt-babel": "^5.0.0", - "grunt-browser-sync": "^2.2.0", - "grunt-concurrent": "^1.0.0", - "grunt-contrib-clean": "^0.6.0", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-copy": "^0.8.2", - "grunt-contrib-cssmin": "^0.12.2", - "grunt-contrib-htmlmin": "^0.4.0", - "grunt-contrib-imagemin": "^0.9.3", - "grunt-contrib-uglify": "^0.8.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-eslint": "^17.3.2", - "grunt-filerev": "^2.2.0", - "grunt-mocha": "^0.4.15", - "grunt-modernizr": "^0.6.1", - "grunt-newer": "^1.3.0", - "grunt-postcss": "^0.6.0", - "grunt-sass": "^1.2.1", - "grunt-svgmin": "^2.0.1", - "grunt-usemin": "^3.0.0", - "grunt-wiredep": "^2.0.0", - "jit-grunt": "^0.9.1", - "time-grunt": "^1.4.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "grunt test" - }, - "eslintConfig": { - "extends": [ - "eslint:recommended" - ], - "env": { - "node": true, - "browser": true, - "es6": true, - "jquery": true, - "mocha": true - }, - "rules": { - "quotes": [ - 2, - "single" - ], - "indent": [ - 2, - 2 - ] - } - } -} diff --git a/server/templates/admin/test/index.html b/server/templates/admin/test/index.html deleted file mode 100644 index 6498d5fc..00000000 --- a/server/templates/admin/test/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Mocha Spec Runner - - - -
      - - - - - - - - - - - - diff --git a/server/templates/admin/test/spec/test.js b/server/templates/admin/test/spec/test.js deleted file mode 100644 index 0fca0fb5..00000000 --- a/server/templates/admin/test/spec/test.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - 'use strict'; - - describe('Give it some context', function () { - describe('maybe a bit more context here', function () { - it('should run here few assertions', function () { - - }); - }); - }); -})(); diff --git a/tunnel-server/src/forwarder/udstunnel.py b/tunnel-server/src/forwarder/udstunnel.py index 452bfb0b..d9b79c36 100644 --- a/tunnel-server/src/forwarder/udstunnel.py +++ b/tunnel-server/src/forwarder/udstunnel.py @@ -57,6 +57,7 @@ class ForwardServer(socketserver.ThreadingTCPServer): remote: typing.Tuple[str, int] ticket: str stop_flag: threading.Event + can_stop: bool timeout: int timer: typing.Optional[threading.Timer] check_certificate: bool @@ -79,20 +80,22 @@ class ForwardServer(socketserver.ThreadingTCPServer): ) self.remote = remote self.ticket = ticket - self.timeout = int(time.time()) + timeout if timeout else 0 + # Negative values for timeout, means "accept always connections" + # "but if no connection is stablished on timeout (positive)" + # "stop the listener" + self.timeout = int(time.time()) + timeout if timeout > 0 else 0 self.check_certificate = check_certificate self.stop_flag = threading.Event() # False initial self.current_connections = 0 self.status = TUNNEL_LISTENING + self.can_stop = False - if timeout: - self.timer = threading.Timer( - timeout, ForwardServer.__checkStarted, args=(self,) - ) - self.timer.start() - else: - self.timer = None + timeout = abs(timeout) or 60 + self.timer = threading.Timer( + abs(timeout), ForwardServer.__checkStarted, args=(self,) + ) + self.timer.start() def stop(self) -> None: if not self.stop_flag.is_set(): @@ -120,6 +123,9 @@ class ForwardServer(socketserver.ThreadingTCPServer): return context.wrap_socket(rsocket, server_hostname=self.remote[0]) def check(self) -> bool: + if self.status == TUNNEL_ERROR: + return False + try: with self.connect() as ssl_socket: ssl_socket.sendall(HANDSHAKE_V1 + b'TEST') @@ -135,11 +141,14 @@ class ForwardServer(socketserver.ThreadingTCPServer): @property def stoppable(self) -> bool: - return self.timeout != 0 and int(time.time()) > self.timeout + logger.debug('Is stoppable: %s', self.can_stop) + return self.can_stop or (self.timeout != 0 and int(time.time()) > self.timeout) @staticmethod def __checkStarted(fs: 'ForwardServer') -> None: + logger.debug('New connection limit reached') fs.timer = None + fs.can_stop = True if fs.current_connections <= 0: fs.stop() @@ -150,15 +159,17 @@ class Handler(socketserver.BaseRequestHandler): # server: ForwardServer def handle(self) -> None: - self.server.current_connections += 1 self.server.status = TUNNEL_OPENING # If server processing is over time if self.server.stoppable: - logger.info('Rejected timedout connection try') + self.server.status = TUNNEL_ERROR + logger.info('Rejected timedout connection') self.request.close() # End connection without processing it return + self.server.current_connections += 1 + # Open remote connection try: logger.debug('Ticket %s', self.server.ticket) @@ -169,7 +180,9 @@ class Handler(socketserver.BaseRequestHandler): data = ssl_socket.recv(2) if data != b'OK': data += ssl_socket.recv(128) - raise Exception(f'Error received: {data.decode(errors="ignore")}') # Notify error + raise Exception( + f'Error received: {data.decode(errors="ignore")}' + ) # Notify error # All is fine, now we can tunnel data self.process(remote=ssl_socket) @@ -251,15 +264,12 @@ if __name__ == "__main__": handler.setFormatter(formatter) log.addHandler(handler) - ticket = 'qcdn2jax6tx4nljdyed61hm3iqbld5nf44zxbh9gf355ofw2' + ticket = 'mffqg7q4s61fvx0ck2pe0zke6k0c5ipb34clhbkbs4dasb4g' fs = forward( ('172.27.0.1', 7777), ticket, local_port=49999, - timeout=60, + timeout=-20, check_certificate=False, ) - - print(fs.check()) - fs.stop()