import{a as Ot}from"./chunk-P7XQ2A6N.js";import"./chunk-C7K6NHIV.js";import"./chunk-ZTPSCNCV.js";import{a as _t}from"./chunk-DIZBRRGC.js";import"./chunk-TOMSDEUO.js";import{a as Rt,c as Pt}from"./chunk-ZDEKLPKE.js";import{a as de,b as St}from"./chunk-ZBRKSVZT.js";import{d as Et}from"./chunk-PLS4K4KY.js";import"./chunk-JN2ZUHXX.js";import"./chunk-NLCRYDJ4.js";import"./chunk-RB5TOXJE.js";import"./chunk-7GYHTWED.js";import"./chunk-XOY5UTVP.js";import{a as yt,b as It}from"./chunk-5DQKN4SL.js";import"./chunk-G7OJYPNY.js";import"./chunk-3GSDFESG.js";import"./chunk-7QEXVS2A.js";import{a as Tt}from"./chunk-D4RZOGGF.js";import"./chunk-MNVOJIXC.js";import{a as pe,b as ue,c as fe}from"./chunk-UZB7YFT6.js";import"./chunk-5KCUTXXV.js";import{a as At}from"./chunk-JUDWAYYT.js";import"./chunk-LAJI7RPC.js";import{a as F}from"./chunk-WFZJP5WR.js";import"./chunk-F6KLNSUK.js";import{b as kt,c as wt,d as Nt}from"./chunk-YOJ4KGSB.js";import"./chunk-CO3X7TQN.js";import{a as J}from"./chunk-VSFNMVXJ.js";import"./chunk-WQ6DP4JQ.js";import{Db as vt,Fb as bt,Ob as K,Qb as Ct,Rb as xt,X as nt,a as An,c as L,nb as ht,qb as gt,sb as v,wb as X}from"./chunk-YSQLW2JA.js";import{Hd as at,Jd as rt,Kd as c,Ld as C,Md as st,Nd as U,Od as lt,Pd as le,Qc as se,Qd as ct,Rc as z,Rd as mt,Sd as ce,Td as dt,U as tt,_d as pt,ae as ut,be as me,ce as De,de as ft,kb as ot,ya as it}from"./chunk-NVJ2ZZFT.js";import{Aa as l,Ba as h,Cb as Be,Dc as Fe,E as x,Fb as qe,He as m,Jg as et,Mb as $e,Nc as S,Ng as H,Pd as re,Qf as g,Rd as R,Sc as Je,Sd as _,Se as j,Te as k,Ue as B,W as ze,Yg as Y,_a as A,ab as I,ad as Ze,af as q,bb as u,bc as He,bh as Q,cb as V,cc as Ye,cd as W,cg as $,db as G,dc as ne,dd as p,dg as ie,ea as Ue,eg as oe,fb as ae,g as Nn,gb as M,gc as Qe,ha as f,hd as E,ic as Me,jb as We,kg as D,lg as O,mc as Xe,ng as T,rb as je,s as Le,va as Ve,wc as Ke,xa as Ge,ya as d}from"./chunk-SKPDQO4E.js";var Lt=`<div class="h-100">
	<side-navigation>
		<ng-template side-navigation-nav>
			<div class="row">
				<div class="col-12 mb-2">
					<label class="report-form-label">{{'TERMINAL.FILTER_NAME' | translate}}</label>
					<armon-search-text-input [(ngModel)]="filter.name" (ngModelChange)="onFilterChanged($event)"
						placeholder="COMMON.SEARCH"></armon-search-text-input>
				</div>
				<div class="col-12">
					<label class="report-form-label">{{'TERMINAL.FILTER_BRAND' | translate}}</label>
					<armon-select-search query="terminalbrand" [allowMulti]="false" [(ngModel)]="filter.brand"
						[allowClear]="true" (ngModelChange)="onFilterChanged($event)">
					</armon-select-search>
				</div>
				<div class="col-12 mb-2">
					<label class="report-form-label">{{'TERMINAL.FILTER_MODEL' | translate}}</label>
					<armon-search-text-input [(ngModel)]="filter.model" (ngModelChange)="onFilterChanged($event)"
						placeholder="COMMON.SEARCH"></armon-search-text-input>
				</div>
				<div class="col-12">
					<label class="report-form-label">{{'TERMINAL.FILTER_CONNECTION_STATUS' | translate}}</label>
					<select [(ngModel)]="filter.connectionStatus" (ngModelChange)="onFilterChanged($event)"
						class="form-select form-select-sm">
						<option *ngFor="let connectionStatus of connectionStatusList" [ngValue]="connectionStatus.type">
							{{connectionStatus.description |
							translate}}</option>
					</select>
				</div>
				<div class="col-12">
					<label class="report-form-label">{{'TERMINAL.FILTER_WARNING_STATUS' | translate}}</label>
					<select [(ngModel)]="filter.warningLevel" (ngModelChange)="onFilterChanged($event)"
						class="form-select form-select-sm">
						<option *ngFor="let option of warningLevels" [ngValue]="option.type">{{option.description |
							translate}}</option>
					</select>
				</div>
			</div>
			<div class="centered filterButtons">
				<button class="btn btn-success btn-sm" [disabled]="!terminals || terminals.length==0"
					(click)="onGetExcelClicked($event)">{{'BUTTON.EXCEL' | translate}}</button>
			</div>
		</ng-template>
		<ng-template side-navigation-content>
			<div class="row mb-3" *ngIf="permissionSystemWrite">
				<div class="col-12 d-flex">
					<button class="btn btn-sm btn-outline-primary ms-auto"
						(click)="onGeneralSettingsClicked($event)">{{'COMMON.GENERAL_SETTINGS' |
						translate}}</button>
				</div>
			</div>
			<div class="row pt-2 pb-2" *ngIf="limitedMode">
				<div class="col-12">
					<div class="alert alert-warning alert-sm passive-alert">
						<div class="alert-items">
							<div class="alert-item static">
								<div class="alert-text">
									{{"TERMINAL.LIST_LIMITED"|translate}}<button class="ms-3 btn btn-sm btn-link"
										(click)="onExitLimitedModeClicked($event)">{{'BUTTON.SHOW_ALL'|translate}}</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row pt-2 pb-2" *ngIf="terminals && terminals.length==0">
				<div class="col-12">
					<nz-empty [nzNotFoundContent]="contentTpl"
						[nzNotFoundImage]="'./assets/images/empty/empty_list.png'">
						<ng-template #contentTpl>
							<span>{{'TERMINAL.FILTER_NO_ITEMS'|translate}}</span>
						</ng-template>
					</nz-empty>
				</div>
			</div>
			<!-- <button class="btn btn-primary my-2" (click)="onInitialConfigClicked($event)">Initial Config</button> -->
			<div class="row" *ngIf="terminals" [@listAnimation]="terminals.length">
				<div class="col-xxxl-4 col-lg-6 col-md-12" *ngFor="let terminal of terminals">
					<armon-terminal-card [terminal]="terminal" (userRightsUpdated)="onUserRightsUpdated($event)"
						(terminalUpdated)="onTerminalUpdated($event)"></armon-terminal-card>
				</div>
			</div>

			<div class="row pb-3 pt-3">
				<div class="col-12">
					<armon-pagination [paginationResponse]="paginationResponse" (pageChanged)="pageChanged($event)">
					</armon-pagination>
				</div>
			</div>
		</ng-template>
	</side-navigation>
</div>`;var Mt=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.filterHeader{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}.filterHeader .btn{margin-left:auto;margin-right:0;padding-right:.1rem}.filterHeader>p{margin-top:6px}
`;var wn=Nn(An());var Ft=[{type:le.Medium,description:"SYSTEMHEALTH.WARNING_MEDIUM"},{type:le.High,description:"SYSTEMHEALTH.WARNING_HIGH"},{type:le.Critical,description:"SYSTEMHEALTH.WARNING_CRITICAL"}];var Dt=[{type:U.Connected,description:"SYSTEMHEALTH.STATUS_CONNECTED"},{type:U.Disconnected,description:"SYSTEMHEALTH.STATUS_DISCONNECTED"}];var zt=`<ng-container *ngIf="visible">
	<div class="modal-header">
		<div class="w-100 d-flex align-items-center">
			<div class="d-flex flex-column">
				<span class="text-lg">{{'TERMINAL.CONFIG_INITIAL'|translate}}</span>
				<!-- <span class="text-md">{{feedbackDetailed.title}}</span> -->
			</div>
			<cds-icon shape="warning-standard" solid class="text-danger ms-auto" size="md" *ngIf="disabledSaveButton"
				nz-tooltip nzTooltipTitle="{{'TERMINAL.CONFIG_INITIAL_INVALID'|translate}}"></cds-icon>
		</div>
	</div>
	<div class="modal-body mx-3">
		<ng-container *ngIf="hasNetworkForm">
			<!-- ETHERNET -->
			<div class="row" *ngIf="hasNetworkEthernetForm">
				<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
					<div class="px-2 py-2 w-100 d-flex align-items-center"
						[ngClass]="{'b-b-1 mb-3': enableNetworkEthernetForm}">
						<cds-icon shape="ethernet" class="me-3 text-primary opa" style="width: 20px; height: 20px;"
							[ngClass]="{'opacity-25': !enableNetworkEthernetForm}"></cds-icon>
						<span class="text-md fw-medium text-primary cursor-pointer"
							[ngClass]="{'opacity-50': !enableNetworkEthernetForm}"
							(click)="enableNetworkEthernetForm =!enableNetworkEthernetForm">{{'TERMINAL.CONFIG_ETHERNET'|translate}}</span>
						<ng-template
							*ngTemplateOutlet="formValidationTemplate; context: {$implicit: networkEthernetForm, enabled:enableNetworkEthernetForm}">
						</ng-template>
						<nz-switch [(ngModel)]="enableNetworkEthernetForm"
							(ngModelChange)="onEnableEthernetFormChanged($event)" class="ms-auto"></nz-switch>
					</div>
					<div class="w-100 px-2" *ngIf="enableNetworkEthernetForm">
						<!-- <pre>{{networkEthernetForm.valid}}</pre> -->
						<form [formGroup]="networkEthernetForm">
							<div class="form-row">
								<div class="form-group col-12">
									<div class="form-check">
										<input type="checkbox" class="form-check-input" id="eth-dhcp"
											formControlName="dhcp">
										<label class="form-check-label"
											for="eth-dhcp">{{'TERMINAL.CONFIG_DHCP'|translate}}</label>
									</div>
								</div>
							</div>
							<div class="form-row" [hidden]="networkEthernetForm.get('dhcp').value">
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_ADDRESS'|translate}}</label>
									<input type="text" name="eth-address" id="eth-address" formControlName="address"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkEthernetForm.get('address').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkEthernetForm, control:'address'}">
									</ng-template>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_NETMASK'|translate}}</label>
									<select id="eth-metmask" formControlName="netmask"
										class="form-select form-select-sm">
										<option [ngValue]="netmask.value" *ngFor="let netmask of netmaskList">
											{{netmask.label}} ({{netmask.value}})
										</option>
									</select>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_GATEWAY'|translate}}</label>
									<input type="text" name="eth-gateway" id="eth-gateway" formControlName="gateway"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkEthernetForm.get('gateway').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkEthernetForm, control:'gateway'}">
									</ng-template>
								</div>
							</div>
							<div class="form-row" [hidden]="networkEthernetForm.get('dhcp').value">
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_DNS1'|translate}}</label>
									<input type="text" name="eth-dns1" id="eth-dns1" formControlName="dns1"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkEthernetForm.get('dns1').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkEthernetForm, control:'dns1'}">
									</ng-template>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_DNS2'|translate}}</label>
									<input type="text" name="eth-dns2" id="eth-dns2" formControlName="dns2"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkEthernetForm.get('dns2').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkEthernetForm, control:'dns2'}">
									</ng-template>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- WIFI -->
			<div class="row" *ngIf="hasNetworkWifiForm">
				<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
					<div class="px-2 py-2 w-100 d-flex align-items-center"
						[ngClass]="{'b-b-1 mb-3': enableNetworkWifiForm}">
						<cds-icon shape="wifi" solid class="me-3 text-primary" style="width: 20px; height: 20px;"
							[ngClass]="{'opacity-25': !enableNetworkWifiForm}"></cds-icon>
						<span class="text-md fw-medium text-primary cursor-pointer"
							[ngClass]="{'opacity-50': !enableNetworkWifiForm}"
							(click)="enableNetworkWifiForm =!enableNetworkWifiForm">{{'TERMINAL.CONFIG_WIFI'|translate}}</span>
						<ng-template
							*ngTemplateOutlet="formValidationTemplate; context: {$implicit: networkWifiForm, enabled:enableNetworkWifiForm}">
						</ng-template>
						<nz-switch [(ngModel)]="enableNetworkWifiForm" (ngModelChange)="onEnableWifiFormChanged($event)"
							class="ms-auto"></nz-switch>
					</div>
					<div class="w-100 px-2" *ngIf="enableNetworkWifiForm">
						<!-- <pre>{{networkEthernetForm.valid}}</pre> -->
						<form [formGroup]="networkWifiForm">
							<div class="form-row">
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_SSID'|translate}}</label>
									<input type="text" name="wifi-ssid" id="wifi-ssid" formControlName="ssid"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkWifiForm.get('ssid').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkWifiForm, control:'ssid'}">
									</ng-template>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_WIFI_PASSWORD'|translate}}</label>
									<input type="password" name="wifi-password" id="wifi-password" autocomplete="off"
										formControlName="password" maxlength="5" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkWifiForm.get('password').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkWifiForm, control:'password'}">
									</ng-template>
								</div>
							</div>
							<div class="form-row">
								<div class="form-group col-12">
									<div class="form-check">
										<input type="checkbox" class="form-check-input" id="wifi-dhcp"
											formControlName="dhcp">
										<label class="form-check-label"
											for="wifi-dhcp">{{'TERMINAL.CONFIG_DHCP'|translate}}</label>
									</div>
								</div>
							</div>
							<div class="form-row" [hidden]="networkWifiForm.get('dhcp').value">
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_ADDRESS'|translate}}</label>
									<input type="text" name="wifi-address" id="wifi-address" formControlName="address"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkWifiForm.get('address').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkWifiForm, control:'address'}">
									</ng-template>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_NETMASK'|translate}}</label>
									<select id="wifi-metmask" formControlName="netmask"
										class="form-select form-select-sm">
										<option [ngValue]="netmask.value" *ngFor="let netmask of netmaskList">
											{{netmask.label}} ({{netmask.value}})
										</option>
									</select>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_GATEWAY'|translate}}</label>
									<input type="text" name="wifi-gateway" id="wifi-gateway" formControlName="gateway"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkWifiForm.get('gateway').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkWifiForm, control:'gateway'}">
									</ng-template>
								</div>
							</div>
							<div class="form-row" [hidden]="networkWifiForm.get('dhcp').value">
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_DNS1'|translate}}</label>
									<input type="text" name="wifi-dns1" id="wifi-dns1" formControlName="dns1"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkWifiForm.get('dns1').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkWifiForm, control:'dns1'}">
									</ng-template>
								</div>
								<div class="form-group col-md-4">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_DNS2'|translate}}</label>
									<input type="text" name="wifi-dns2" id="wifi-dns2" formControlName="dns2"
										maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkWifiForm.get('dns2').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkWifiForm, control:'dns2'}">
									</ng-template>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- LTE -->
			<div class="row" *ngIf="hasNetworkLteForm">
				<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
					<div class="px-2 py-2 w-100 d-flex align-items-center"
						[ngClass]="{'b-b-1 mb-3': enableNetworkLteForm}">
						<cds-icon shape="lte" class="me-3 text-primary" style="width: 20px; height: 20px;"
							[ngClass]="{'opacity-25': !enableNetworkLteForm}"></cds-icon>
						<span class="text-md fw-medium text-primary cursor-pointer"
							[ngClass]="{'opacity-50': !enableNetworkLteForm}"
							(click)="enableNetworkLteForm =!enableNetworkLteForm">{{'TERMINAL.CONFIG_LTE'|translate}}</span>
						<ng-template
							*ngTemplateOutlet="formValidationTemplate; context: {$implicit: networkLteForm, enabled:enableNetworkLteForm}">
						</ng-template>
						<nz-switch [(ngModel)]="enableNetworkLteForm" (ngModelChange)="onEnableLteFormChanged($event)"
							class="ms-auto"></nz-switch>
					</div>
					<div class="w-100 px-2" *ngIf="enableNetworkLteForm">
						<form [formGroup]="networkLteForm">
							<div class="form-row">
								<div class="form-group col-md-3">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_NETWORK'|translate}}</label>
									<input type="text" name="lte-apn" id="lte-apn" formControlName="apn" maxlength="512"
										class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkLteForm.get('apn').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkLteForm, control:'apn'}">
									</ng-template>
								</div>
								<div class="form-group col-md-3">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_PIN_CODE'|translate}}</label>
									<input type="number" name="lte-pin" id="lte-pin" formControlName="pin" maxlength="3"
										class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkLteForm.get('pin').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkLteForm, control:'pin'}">
									</ng-template>
								</div>
								<div class="form-group col-md-3">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_USERNAME'|translate}}</label>
									<input type="text" name="lte-username" id="lte-username" formControlName="username"
										autocomplete="off" maxlength="60" class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkLteForm.get('username').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkLteForm, control:'username'}">
									</ng-template>
								</div>
								<div class="form-group col-md-3">
									<label
										class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_PASSWORD'|translate}}</label>
									<input type="password" name="lte-password" id="lte-password"
										formControlName="password" autocomplete="off" maxlength="60"
										class="form-control form-control-sm"
										[ngClass]="{'is-invalid': networkLteForm.get('password').invalid}">
									<ng-template
										*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: networkLteForm, control:'password'}">
									</ng-template>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</ng-container>

		<!-- MAPPINGS -->
		<div class="row" *ngIf="hasNetworkMappingsForm">
			<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
				<div class="px-2 py-2 w-100 d-flex align-items-center"
					[ngClass]="{'b-b-1 mb-3':  maps.controls.length>0}">
					<cds-icon shape="link" class="me-3 text-primary" style="width: 20px; height: 20px;"></cds-icon>
					<span class="text-md fw-medium text-primary">{{'TERMINAL.CONFIG_MAPPINGS'|translate}}</span>
					<ng-template
						*ngTemplateOutlet="formValidationTemplate; context: {$implicit: networkMappingsForm, enabled:true}">
					</ng-template>
					<button class="btn btn-sm btn-outline-primary ms-auto" (click)="onAddMapClicked($event)">
						<cds-icon shape="plus-circle" solid class="me-1"></cds-icon>{{'BUTTON.ADD'|translate}}
					</button>
				</div>
				<div class="w-100 px-2">
					<form [formGroup]="networkMappingsForm">
						<div formArrayName="maps">
							<ng-container *ngFor="let map of maps.controls; let index = index;">
								<div class="form-row" [formGroupName]="index">
									<div class="form-group col-md-4">
										<label
											class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_ADDRESS'|translate}}</label>
										<div class="input-group input-group-sm">
												<button class="btn btn-sm btn-outline-danger"
													(click)="onRemoveMapClicked($event, index)">{{'BUTTON.DELETE'|translate}}</button>
											<input type="text" name="map-name-{{index}}" id="map-name-{{index}}"
												formControlName="name" maxlength="512"
												class="form-control form-control-sm"
												[ngClass]="{'is-invalid': map.get('name').invalid}">
											<ng-template
												*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: map, control:'name'}">
											</ng-template>
										</div>
									</div>
									<div class="form-group col-md-4">
										<label
											class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_IP_ADDRESS'|translate}}</label>
										<input type="text" name="map-address-{{index}}" id="map-address-{{index}}"
											formControlName="address" maxlength="128"
											class="form-control form-control-sm"
											[ngClass]="{'is-invalid': map.get('address').invalid}">
										<ng-template
											*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: map, control:'address'}">
										</ng-template>
									</div>
								</div>
							</ng-container>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- END MAPPINGS -->
		<!-- NTP -->
		<div class="row" *ngIf="hasNetworkNtpForm">
			<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
				<div class="px-2 py-2 w-100 d-flex align-items-center"
					[ngClass]="{'b-b-1 mb-3': !collapseNetworkNtpForm}">
					<cds-icon shape="clock" class="me-3 text-primary" style="width: 20px; height: 20px;"></cds-icon>
					<span class="text-md fw-medium text-primary">{{'TERMINAL.CONFIG_NTP'|translate}}</span>
					<ng-template
						*ngTemplateOutlet="formValidationTemplate; context: {$implicit: ntpForm, enabled:true}">
					</ng-template>
					<button class="btn btn-sm btn-outline-primary ms-auto"
						(click)="collapseNetworkNtpForm=!collapseNetworkNtpForm">
						{{(collapseNetworkNtpForm ? 'BUTTON.EDIT' : 'BUTTON.HIDE')|translate}}
					</button>
				</div>
				<div class="w-100 px-2" [hidden]="collapseNetworkNtpForm">
					<form [formGroup]="ntpForm">
						<div class="form-row">
							<div class="form-group col-md-4">
								<label
									class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_ADDRESS'|translate}}</label>
								<input type="text" name="ntp-server" id="ntp-server" formControlName="server"
									maxlength="512" class="form-control form-control-sm"
									[ngClass]="{'is-invalid': ntpForm.get('server').invalid}">
								<ng-template
									*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: ntpForm, control:'server'}">
								</ng-template>
							</div>
							<div class="form-group col-md-2">
								<label
									class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_PORT'|translate}}</label>
								<input type="number" name="ntp-port" id="ntp-port" formControlName="port" maxlength="3"
									class="form-control form-control-sm"
									[ngClass]="{'is-invalid': ntpForm.get('port').invalid}">
								<ng-template
									*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: ntpForm, control:'port'}">
								</ng-template>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- END NTP -->
		<!-- HUB -->
		<div class="row">
			<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
				<div class="px-2 py-2 w-100 d-flex align-items-center" [ngClass]="{'b-b-1 mb-3': !collapseHubForm}">
					<cds-icon shape="rack-server" class="me-3 text-primary" style="width: 20px; height: 20px;">
					</cds-icon>
					<span class="text-md fw-medium text-primary">{{'TERMINAL.CONFIG_HUB'|translate}}</span>
					<ng-template
						*ngTemplateOutlet="formValidationTemplate; context: {$implicit: hubForm, enabled:true}">
					</ng-template>
					<button class="btn btn-sm btn-outline-primary ms-auto" (click)="collapseHubForm=!collapseHubForm">
						{{(collapseHubForm ? 'BUTTON.EDIT' : 'BUTTON.HIDE')|translate}}
					</button>
				</div>
				<div class="w-100 px-2" [hidden]="collapseHubForm">
					<form [formGroup]="hubForm">
						<div class="form-row">
							<div class="form-group col-md-4">
								<label
									class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_ADDRESS'|translate}}</label>
								<input type="text" name="hub-url" id="hub-url" formControlName="url" maxlength="512"
									class="form-control form-control-sm"
									[ngClass]="{'is-invalid': hubForm.get('url').invalid}">
								<ng-template
									*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: hubForm, control:'url'}">
								</ng-template>
							</div>
							<div class="form-group col-md-3">
								<label
									class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_TIMEOUT'|translate}}</label>
								<input type="number" name="hub-timeout" id="hub-timeout" formControlName="timeout"
									maxlength="60" class="form-control form-control-sm"
									[ngClass]="{'is-invalid': hubForm.get('timeout').invalid}">
								<ng-template
									*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: hubForm, control:'timeout'}">
								</ng-template>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- AMQP -->
		<div class="row">
			<div class="col-12 rnd-1 shadow-box-1 py-1 mb-4 d-flex flex-column">
				<div class="px-2 py-2 w-100 d-flex align-items-center" [ngClass]="{'b-b-1 mb-3': !collapseAmqpForm}">
					<cds-icon shape="switch" class="me-3 text-primary" style="width: 20px; height: 20px;"></cds-icon>
					<span class="text-md fw-medium text-primary">{{'TERMINAL.CONFIG_AMQP'|translate}}</span>
					<ng-template
						*ngTemplateOutlet="formValidationTemplate; context: {$implicit: amqpForm, enabled:true}">
					</ng-template>
					<button class="btn btn-sm btn-outline-primary ms-auto" (click)="collapseAmqpForm=!collapseAmqpForm">
						{{(collapseAmqpForm ? 'BUTTON.EDIT' : 'BUTTON.HIDE')|translate}}
					</button>
				</div>
				<div class="w-100 px-2" [hidden]="collapseAmqpForm">
					<form [formGroup]="amqpForm">
						<div class="form-row">
							<div class="form-group col-md-4">
								<label
									class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_ADDRESS'|translate}}</label>
								<input type="text" name="amqp-url" id="amqp-url" formControlName="url" maxlength="512"
									class="form-control form-control-sm"
									[ngClass]="{'is-invalid': amqpForm.get('url').invalid}">
								<ng-template
									*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: amqpForm, control:'url'}">
								</ng-template>
							</div>
							<div class="form-group col-md-3">
								<label
									class="col-form-label col-form-label-sm">{{'TERMINAL.CONFIG_HEARTBEAT'|translate}}</label>
								<input type="number" name="amqp-heartbeat" id="amqp-heartbeat"
									formControlName="heartbeat" maxlength="60" class="form-control form-control-sm"
									[ngClass]="{'is-invalid': amqpForm.get('heartbeat').invalid}">
								<ng-template
									*ngTemplateOutlet="controlValidationTemplate; context: {$implicit: amqpForm, control:'heartbeat'}">
								</ng-template>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>

	</div>
	<div class="modal-footer">
		<button class="btn btn-outline-primary" (click)="onCancelClicked($event)">{{'BUTTON.CLOSE' |
			translate}}</button>
		<button class="btn btn-success" (click)="onSaveClicked($event)" [disabled]="disabledSaveButton">{{'BUTTON.SAVE'
			| translate}}</button>
	</div>
</ng-container>

<ng-template #controlValidationTemplate let-form let-control="control">
	<ng-container *ngIf="form.get(control).errors">
		<div class="invalid-feedback">
			<!-- <pre>{{form.get(control).errors|json}}</pre> -->
			<span *ngIf="form.get(control).errors.required">{{'VALIDATION.REQUIRED'|translate}}</span>
			<span *ngIf="form.get(control).errors.ip">{{'VALIDATION.IP_V4_OR_V6'|translate}}</span>
			<span *ngIf="form.get(control).errors.numeric">{{'VALIDATION.POSITIVE_NUMBER'|translate}}</span>
			<span
				*ngIf="form.get(control).errors.max">{{'VALIDATION.MAX_VALUE'|translate:form.get(control).errors.max}}</span>
			<span *ngIf="form.get(control).errors.unique">{{'VALIDATION.UNIQUE'|translate}}</span>
		</div>
	</ng-container>
</ng-template>

<ng-template #formValidationTemplate let-form let-enabled="enabled">
	<ng-container *ngIf="enabled">
		<cds-icon shape="warning-standard" solid class="cds-icon-18 text-danger ms-2" *ngIf="form.invalid" nz-tooltip
			nzTooltipTitle="{{'VALIDATION.FORM_NOT_VALID'|translate}}"></cds-icon>
		<cds-icon shape="success-standard" solid class="cds-icon-18 text-success ms-2" *ngIf="form.valid" nz-tooltip
			nzTooltipTitle="{{'VALIDATION.FORM_VALID'|translate}}"></cds-icon>
	</ng-container>
</ng-template>`;var Ut=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var Mn=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},he=class extends _{formBuilder;visible=!1;config;hubForm;amqpForm;ntpForm;enableNetworkEthernetForm=!0;enableNetworkWifiForm=!1;enableNetworkLteForm=!1;networkEthernetForm;networkWifiForm;networkLteForm;networkMappingsForm;hasNetworkForm=!0;hasNetworkEthernetForm=!0;hasNetworkWifiForm=!0;hasNetworkLteForm=!0;hasNetworkMappingsForm=!0;hasNetworkNtpForm=!0;collapseNetworkNtpForm=!0;collapseHubForm=!0;collapseAmqpForm=!0;disabledSaveButton=!0;netmaskList=[{label:"255.255.255.252",value:30},{label:"255.255.255.248",value:29},{label:"255.255.255.240",value:28},{label:"255.255.255.224",value:27},{label:"255.255.255.192",value:26},{label:"255.255.255.128",value:25},{label:"255.255.255.0",value:24},{label:"255.255.254.0",value:23},{label:"255.255.252.0",value:22},{label:"255.255.248.0",value:21},{label:"255.255.240.0",value:20},{label:"255.255.224.0",value:19},{label:"255.255.192.0",value:18},{label:"255.255.128.0",value:17},{label:"255.255.0.0",value:16}];constructor(e){super(),this.formBuilder=e}ngOnInit(){this.config={network:{eth:{dhcp:!0},wifi:{dhcp:!0,ssid:null},lte:{apn:null},defaultDomainNameMappings:{},ntp:{server:"http://google.com",port:80}},server:{tls:{cert:null,ca:null,key:null},hub:{url:"http://google.com",timeout:80},amqp:{url:"http://google.com",heartbeat:20}}},this.createFormGroups(),this.visible=!0}ngOnDestroy(){}createFormGroups(){this.createHubForm(),this.createAmqpForm(),this.createNtpForm(),this.createEthernetForm(),this.createWifiForm(),this.createLteForm(),this.createMappingsForm(),this.checkConfigValidation()}createHubForm(){this.hubForm=this.formBuilder.group({url:[this.config.server.hub.url?this.config.server.hub.url:null,[m.required,T.url()]],timeout:[this.config.server.hub.timeout?this.config.server.hub.timeout:null,[T.numeric({acceptValue:D.PositiveNumber,allowDecimal:!1}),m.max(100)]]}),this.hubForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}get isHubFormValid(){return this.hubForm.valid}patchHubFormConfig(){this.config.server.hub=this.hubForm.value}createAmqpForm(){this.amqpForm=this.formBuilder.group({url:[this.config.server.amqp.url?this.config.server.amqp.url:null,[m.required,T.url()]],heartbeat:[this.config.server.amqp.heartbeat?this.config.server.amqp.heartbeat:null,[T.numeric({acceptValue:D.PositiveNumber,allowDecimal:!1}),m.max(100)]]}),this.amqpForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}get isAmqpFormValid(){return this.amqpForm.valid}patchAmqpFormConfig(){this.config.server.amqp=this.amqpForm.value}createNtpForm(){this.ntpForm=this.formBuilder.group({server:[this.config.network.ntp.server?this.config.network.ntp.server:null,[m.required,T.ip({version:O.AnyOne})]],port:[this.config.network.ntp.port?this.config.network.ntp.port:null,[m.required,T.numeric({acceptValue:D.PositiveNumber,allowDecimal:!1})]]}),this.ntpForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}get isNtpFormValid(){return this.hasNetworkNtpForm==!0?this.ntpForm.valid:!0}patchNtpFormConfig(){this.config.network.ntp=this.ntpForm.value}createEthernetForm(){this.networkEthernetForm=this.formBuilder.group({dhcp:[this.config.network.eth.dhcp?this.config.network.eth.dhcp:!0,[m.required]],gateway:[this.config.network.eth.gateway?this.config.network.eth.gateway:null],netmask:[this.config.network.eth.netmask?this.config.network.eth.netmask:this.netmaskList[6].value],address:[this.config.network.eth.address?this.config.network.eth.address:null],dns1:[this.config.network.eth.dns1?this.config.network.eth.dns1:null],dns2:[this.config.network.eth.dns2?this.config.network.eth.dns2:null]}),this.setEthernetFormValidators(),this.networkEthernetForm.get("dhcp").valueChanges.subscribe(e=>{this.setEthernetFormValidators()}),this.networkEthernetForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}setEthernetFormValidators(){this.networkEthernetForm.controls.dhcp.value?(this.networkEthernetForm.get("gateway").clearValidators(),this.networkEthernetForm.get("netmask").clearValidators(),this.networkEthernetForm.get("address").clearValidators(),this.networkEthernetForm.get("dns1").clearValidators(),this.networkEthernetForm.get("dns2").clearValidators()):(this.networkEthernetForm.get("gateway").setValidators([m.required,T.ip({version:O.AnyOne})]),this.networkEthernetForm.get("netmask").setValidators([m.required,T.numeric({acceptValue:D.PositiveNumber,allowDecimal:!1})]),this.networkEthernetForm.get("address").setValidators([m.required,T.ip({version:O.AnyOne})]),this.networkEthernetForm.get("dns1").setValidators([m.required,T.ip({version:O.AnyOne})]),this.networkEthernetForm.get("dns2").setValidators([m.required,T.ip({version:O.AnyOne})])),this.networkEthernetForm.get("gateway").updateValueAndValidity(),this.networkEthernetForm.get("netmask").updateValueAndValidity(),this.networkEthernetForm.get("address").updateValueAndValidity(),this.networkEthernetForm.get("dns1").updateValueAndValidity(),this.networkEthernetForm.get("dns2").updateValueAndValidity()}get isEthernetFormValid(){return this.hasNetworkEthernetForm==!0&&this.enableNetworkEthernetForm?this.networkEthernetForm.valid:!0}onEnableEthernetFormChanged(e){this.checkConfigValidation()}patchNetworkEthernetFormConfig(){this.hasNetworkEthernetForm&&this.enableNetworkEthernetForm?(this.config.network.eth={dhcp:this.networkEthernetForm.get("dhcp").value},this.config.network.eth.dhcp==!1&&(this.config.network.eth=this.networkEthernetForm.value)):delete this.config.network.eth}createWifiForm(){this.networkWifiForm=this.formBuilder.group({ssid:[this.config.network.wifi.ssid?this.config.network.wifi.ssid:null,[m.required]],password:[this.config.network.wifi.password?this.config.network.wifi.password:null],dhcp:[this.config.network.wifi.dhcp?this.config.network.wifi.dhcp:!0,[m.required]],gateway:[this.config.network.wifi.gateway?this.config.network.wifi.gateway:null],netmask:[this.config.network.wifi.netmask?this.config.network.wifi.netmask:this.netmaskList[6].value],address:[this.config.network.wifi.address?this.config.network.wifi.address:null],dns1:[this.config.network.wifi.dns1?this.config.network.wifi.dns1:null],dns2:[this.config.network.wifi.dns2?this.config.network.wifi.dns2:null]}),this.setWifiFormValidators(),this.networkWifiForm.get("dhcp").valueChanges.subscribe(e=>{this.setWifiFormValidators()}),this.networkWifiForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}setWifiFormValidators(){this.networkWifiForm.controls.dhcp.value?(this.networkWifiForm.get("gateway").clearValidators(),this.networkWifiForm.get("netmask").clearValidators(),this.networkWifiForm.get("address").clearValidators(),this.networkWifiForm.get("dns1").clearValidators(),this.networkWifiForm.get("dns2").clearValidators()):(this.networkWifiForm.get("gateway").setValidators([m.required,T.ip({version:O.AnyOne})]),this.networkWifiForm.get("netmask").setValidators([m.required,T.numeric({acceptValue:D.PositiveNumber,allowDecimal:!1})]),this.networkWifiForm.get("address").setValidators([m.required,T.ip({version:O.AnyOne})]),this.networkWifiForm.get("dns1").setValidators([m.required,T.ip({version:O.AnyOne})]),this.networkWifiForm.get("dns2").setValidators([m.required,T.ip({version:O.AnyOne})])),this.networkWifiForm.get("gateway").updateValueAndValidity(),this.networkWifiForm.get("netmask").updateValueAndValidity(),this.networkWifiForm.get("address").updateValueAndValidity(),this.networkWifiForm.get("dns1").updateValueAndValidity(),this.networkWifiForm.get("dns2").updateValueAndValidity()}get isWifiFormValid(){return this.hasNetworkWifiForm==!0&&this.enableNetworkWifiForm?this.networkWifiForm.valid:!0}onEnableWifiFormChanged(e){this.checkConfigValidation()}patchNetworkWifiFormConfig(){this.hasNetworkWifiForm&&this.enableNetworkWifiForm?(this.config.network.wifi={ssid:this.networkWifiForm.get("ssid").value,dhcp:this.networkWifiForm.get("dhcp").value},this.config.network.wifi.dhcp==!1&&(this.config.network.wifi=this.networkWifiForm.value)):delete this.config.network.wifi}createLteForm(){this.networkLteForm=this.formBuilder.group({apn:[this.config.network.lte.apn?this.config.network.lte.apn:null,[m.required]],pin:[this.config.network.lte.pin?this.config.network.lte.pin:null,[T.numeric({acceptValue:D.PositiveNumber,allowDecimal:!1})]],username:[this.config.network.lte.username?this.config.network.lte.username:null],password:[this.config.network.lte.password?this.config.network.lte.password:null]}),this.networkLteForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}get isLteFormValid(){return this.hasNetworkLteForm==!0&&this.enableNetworkLteForm?this.networkLteForm.valid:!0}onEnableLteFormChanged(e){this.checkConfigValidation()}patchNetworkLteFormConfig(){this.hasNetworkLteForm&&this.enableNetworkLteForm?this.config.network.lte=this.networkLteForm.value:delete this.config.network.lte}createMappingsForm(){this.networkMappingsForm=this.formBuilder.group({maps:this.formBuilder.array([])}),this.networkMappingsForm.valueChanges.subscribe(e=>{this.checkConfigValidation()})}get maps(){return this.networkMappingsForm.get("maps")}onAddMapClicked(e){this.networkMappingsForm.get("maps").push(this.formBuilder.group({name:[null,[m.required,T.unique()]],address:[null,[m.required,T.ip({version:O.AnyOne})]]})),this.networkMappingsForm.updateValueAndValidity(),this.checkConfigValidation()}onRemoveMapClicked(e,t){this.maps.removeAt(t),this.networkMappingsForm.updateValueAndValidity(),this.checkConfigValidation()}get isNetworkMappingsFormValid(){return this.hasNetworkMappingsForm==!0?this.networkMappingsForm.valid:!0}patchNetworkMappingsFormConfig(){this.hasNetworkMappingsForm?this.maps.controls.length>0?(this.config.network.defaultDomainNameMappings={},this.maps.controls.forEach(e=>{this.config.network.defaultDomainNameMappings[e.value.name]=e.value.address})):delete this.config.network.defaultDomainNameMappings:delete this.config.network.defaultDomainNameMappings}checkConfigValidation(){let e=!0;this.hasNetworkForm&&(e=this.enableNetworkEthernetForm||this.enableNetworkWifiForm||this.enableNetworkLteForm),e==!0&&(e=this.isEthernetFormValid&&this.isWifiFormValid&&this.isLteFormValid&&this.isNetworkMappingsFormValid&&this.isNtpFormValid&&this.isAmqpFormValid&&this.isHubFormValid),this.disabledSaveButton=!e}onSaveClicked(e){this.patchHubFormConfig(),this.patchAmqpFormConfig(),this.patchNtpFormConfig(),this.patchNetworkEthernetFormConfig(),this.patchNetworkWifiFormConfig(),this.patchNetworkLteFormConfig(),this.patchNetworkMappingsFormConfig(),console.log(this.config)}static ctorParameters=()=>[{type:j}]};he=Mn([d({selector:"armon-terminal-initial-configuration",template:zt,standalone:!0,imports:[u,Y,A,M,bt,k,B,I,p],styles:[Ut]})],he);var Vt=`<ng-container *ngIf="visible">
    <div class="row mb-4">
        <div class="col-12">
            <span class="text-lg">{{'COMMON.GENERAL_SETTINGS'|translate}}</span>
        </div>
    </div>
    <form class="form" [formGroup]="syncForm">
        <div class="row my-3">
            <div class="col-12">
                <span class="text-base fw-medium color-gray-darkest">{{'TERMINAL.SYNC_WITH_SERVER'|translate}}</span>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <div class="form-group">
                    <div class="form-check">
                        <input class="form-check-input" id="applyToAllInput" type="checkbox"
                            [formControl]="syncForm.get('applyToAll')" name="applyToAllInput">
                        <label class="form-check-label" for="applyToAllInput">
                            <span>{{'TERMINAL.SYNC_WITH_SERVER_ALL' | translate}}</span>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label>{{'REPORT.TERMINALS'| translate}}</label>
                    <armon-select-search query="terminal" [allowMulti]="true" formControlName="terminalIds"
                        [invalid]="syncForm.get('terminalIds').touched && syncForm.get('terminalIds').invalid">
                    </armon-select-search>
                    <ng-template
                        *ngTemplateOutlet="controlValidationTemplate; context: {$implicit: syncForm, control:syncForm.get('terminalIds'), isArray:true}">
                    </ng-template>
                </div>

            </div>
        </div>
    </form>
    <div class="row mt-3">
        <div class="col-12 d-flex justify-content-end">
            <button class="btn btn-sm btn-success" [disabled]="syncForm.invalid"
                (click)="onStartSyncClicked($event)">{{'BUTTON.START'|translate}}</button>
        </div>
    </div>
    <div class="row mt-5">
        <div class="col-12 d-flex py-4 justify-content-end border-top">
            <button class="btn btn-sm btn-outline-primary" *ngIf="drawerRef"
                (click)="onCancelClicked($event)">{{'BUTTON.CLOSE'|translate}}</button>
        </div>
    </div>
</ng-container>

<!-- FORM FIELD VALIDATION -->
<ng-template #controlValidationTemplate let-form let-control="control" let-isArray="isArray">
    <ng-container *ngIf="control.errors">
        <div class="invalid-feedback" style="display: initial;">
            <span
                *ngIf="control.errors.required">{{(isArray?'VALIDATION.MIN_ONE_SELECTED':'VALIDATION.REQUIRED')|translate}}</span>
        </div>
    </ng-container>
</ng-template>`;var Gt=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var zn=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},ge=class{notificationJobService;interactionService;languageService;systemService;drawerRef;formBuilder;visible=!1;syncForm;constructor(e,t,i,o,n,a){this.notificationJobService=e,this.interactionService=t,this.languageService=i,this.systemService=o,this.drawerRef=n,this.formBuilder=a}ngOnInit(){this.createForms(),this.visible=!0}ngOnDestroy(){}startTerminalSync(){let e=me.getEmptyModel();e.applyToAll=this.syncForm.get("applyToAll").value,this.syncForm.get("applyToAll").value==!1&&(e.terminalIds=this.syncForm.get("terminalIds").value),this.systemService.startTerminalSync(e).subscribe(t=>{this.interactionService.showMessage("TERMINAL.SYNC_WITH_SERVER_STARTED",null,S.Success),this.drawerRef&&this.drawerRef.close()})}createForms(){this.syncForm=this.formBuilder.group({applyToAll:[!0],terminalIds:{value:null,disabled:!0}}),this.syncForm.get("applyToAll").valueChanges.subscribe(e=>{e?(this.syncForm.get("terminalIds").disable(),this.syncForm.get("terminalIds").clearValidators()):(this.syncForm.get("terminalIds").enable(),this.syncForm.get("terminalIds").setValidators(m.required)),this.syncForm.get("terminalIds").updateValueAndValidity()})}onStartSyncClicked(e){this.startTerminalSync()}onCancelClicked(e){this.drawerRef&&this.drawerRef.close()}static ctorParameters=()=>[{type:nt},{type:g},{type:q},{type:v},{type:yt,decorators:[{type:ze}]},{type:j}]};ge=zn([d({selector:"armon-terminal-general-settings",template:Vt,standalone:!0,imports:[u,k,B,X,M,p],styles:[Gt]})],ge);var Wt=`<div class="card mb-3">

	<div class="card-body mhs-20" [ngClass]="{'emergency-container': terminal.isEmergency}">

		<!-- Status messages -->
		<ng-container *ngIf="terminal">
			<div class="alert alert-danger" role="alert" *ngFor="let warning of terminal.warningMessages">
				{{warning.message | translate:terminal}}
			</div>
		</ng-container>

		<div class="d-flex mt-2 mb-3">
			<!-- Name of terminal -->
			<span class="text-lg text-primary flex-grow-1 fw-medium">{{terminal.name}}</span>
			<cds-icon shape="emergency" style="width: 18px; height: 18px;" nz-tooltip
				nzTooltipTitle="{{'TERMINAL.EMERGENCY'| translate}}" class="blink ms-2" *ngIf="terminal.isEmergency">
			</cds-icon>
			<div (click)="onChangesClicked($event)" class="ms-2 cursor-pointer"
				*ngIf="terminal.changeCount && terminal.changeCount>0">
				<cds-icon shape="sync" style="width: 18px; height: 18px;" nz-tooltip class="color-error"
					nzTooltipTitle="{{'TERMINAL.SYNC_WAITING' | translate:terminal}}">
				</cds-icon>
			</div>
			<cds-icon shape="ethernet" style="width: 18px; height: 18px;" [ngClass]="connectionClass" nz-tooltip
				class="ms-2"
				nzTooltipTitle="{{(terminal.isConnected ? 'SYSTEMHEALTH.STATUS_CONNECTED' : 'SYSTEMHEALTH.STATUS_DISCONNECTED') | translate}}">
			</cds-icon>
		</div>

		<!-- Location -->
		<span class="text-sm">{{terminal.location}}</span>

		<!-- Health data -->
		<div class="d-flex flex-column row-gap-1">

			<!-- Last update time of health data -->
			<div class="text-sm" *ngIf="terminal.lastUpdateUtc">{{terminal.updateTimeFormatted}}</div>

			<!-- Ip address of terminal -->
			<div class="d-flex ipAddressContainer" *ngIf="terminal.ip">
				<div class="text-sm" *ngFor="let ipAddress of terminal.ipAddressList" ngxClipboard
					[cdkCopyToClipboard]="terminal.getSshAddress(ipAddress)"
					(cdkCopyToClipboardCopied)="onSshAddressCopied($event)">
					{{ipAddress}}</div>
			</div>

			<div class="row healthDataContainer mt-3">

				<!-- Temperature -->
				<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-12 health-temp-container"
					[attr.critical]="terminal.isTemperatureCritical" [attr.nodata]="!terminal.temperature">

					<cds-icon shape="thermometer" style="width: 28px; height: 28px;"></cds-icon>

					<div class="healthDataDetail">
						<div>{{terminal.temperature || '--'}} &deg;C</div>
						<div>{{'TERMINAL.TEMPERATURE' | translate}}</div>
					</div>

				</div>

				<!-- Power mode -->
				<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-12">

					<cds-icon [attr.shape]="terminal.powerIcon" style="width: 26px; height: 26px;"
						class="me-2"></cds-icon>
					<div class="d-flex text-sm align-items-center">{{terminal.powerStatus | translate}}
					</div>

				</div>

				<!-- Storage -->
				<div class="col-xl-4 col-lg-12 col-md-12 col-sm-12 col-xs-12">

					<cds-icon shape="storage" style="width: 28px; height: 28px;"></cds-icon>

					<div class="healthDataDetail">
						<div>{{'TERMINAL.STORAGE_USED' | translate:terminal}}</div>
						<div>{{'TERMINAL.STORAGE_TOTAL' | translate:terminal}}</div>
					</div>

				</div>

			</div>

		</div>

		<!-- Storage progress -->
		<div class="mt-3">
			<nz-progress [nzPercent]="terminal.diskUsagePercentage" [nzShowInfo]="false" nz-tooltip
				[nzStrokeColor]="{ '0%': '#0ea5e9', '100%': '#06b6d4' }"
				nzTooltipTitle="{{'%'+terminal.diskUsagePercentage}} - {{'TERMINAL.STORAGE_USED' | translate:terminal}} {{'TERMINAL.STORAGE_TOTAL' | translate:terminal}}">
			</nz-progress>
		</div>
	</div>

	<div class="card-footer">
		<button class="btn btn-sm btn-link" *ngIf="visibleDetailButton"
			(click)="onShowDetailsClicked($event)">{{'BUTTON.DETAILS' | translate}}</button>
		<button class="btn btn-sm btn-link" (click)="onCommandsClicked($event)" *ngIf="visibleActionsButton"
			[ngClass]="{'no-connection': !terminal.isConnected}">{{'BUTTON.ACTIONS' | translate}}</button>
		<button class="btn btn-sm btn-link" (click)="onManagersClicked($event)">{{'COMMON.MANAGERS' |
			translate}}</button>
	</div>

</div>`;var jt=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.ipAddressContainer p{margin:4px}.ipAddressContainer p:first-child{margin-left:0}.ipAddressContainer p:hover{cursor:pointer;color:#0a2a5a}.healthDataContainer{color:#666}.healthDataContainer>div{padding:0 6px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex}.healthDataContainer>div:last-child{padding-right:0}.health-temp-container[critical=true]{color:#c82602}.health-temp-container[nodata=true]{color:#ebebeb}.healthDataDetail{margin-left:8px}.healthDataDetail>div:first-child{font-size:16px;line-height:18px}.healthDataDetail>div:last-child{font-size:9px;line-height:9px}@media screen and (max-width: 1200px){.healthDataContainer>div:last-child{margin-top:4px}}@media screen and (max-width: 768px){.healthDataContainer>div:nth-child(2){margin-top:4px}}.no-connection{color:#aaa!important}.emergency-container{background-color:#fdf8f7}
`;var Bt=`<div class="modal-header" *ngIf="controlPanelTitle">
  <span class="text-lg">{{controlPanelTitle}}</span>
</div>

<div class="modal-body">
  <div class="row h-100">
    <div class="col-lg-7 col-md-12">
      <nz-tabset [nzAnimated]="false">
        <nz-tab (nzSelect)="onTabChanged($event)"
          nzTitle="{{'CONTROLPANEL.MATCHED_ACCESS_CONTROL_POINTS' | translate}}">
          <div class="d-flex align-items-center" *ngIf="selectionUnmapping.length > 0">
            <button type="button" class="btn btn-primary btn-sm me-2"
              (click)="onUnmapSelectionRequested($event)">{{'CONTROLPANEL.SELECTION_UNMAP' | translate}}</button>
            <button type="button" class="btn btn-outline-primary btn-sm"
              (click)="onCancelSelectionRequested(false)">{{'CONTROLPANEL.SELECTION_CLEAR' | translate}}</button>
          </div>
          <div class="row" *ngIf="mainControlPanel && mainControlPanel.matches">
            <!-- Matched Access Control Points -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.matches">
              <armon-terminal-control-panel-access-control-point-matching [matching]="item"
                (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-access-control-point-matching>
            </div>
          </div>
        </nz-tab>
        <nz-tab (nzSelect)="onTabChanged($event)"
          nzTitle="{{'CONTROLPANEL.NON_MATCHED_ACCESS_CONTROL_POINTS' | translate}}">
          <div class="row mt-2" *ngIf="selectionMapping.length > 0">
            <div class="col-xl-12">
              <button type="button" class="btn btn-primary btn-sm me-2"
                (click)="onMapSelectionRequested($event)">{{'CONTROLPANEL.SELECTION_MAP' | translate}}</button>
              <button type="button" class="btn btn-outline-primary btn-sm"
                (click)="onCancelSelectionRequested(true)">{{'CONTROLPANEL.SELECTION_CLEAR' | translate}}</button>
            </div>
          </div>
          <div class="row mt-2" *ngIf="mainControlPanel && mainControlPanel.unmatches">

            <!-- Unmathced Relays -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.relays">
              <armon-terminal-control-panel-item [item]="item" [type]="0" [title]="item.name"
                [inputNumber]="item.number" [showBorder]="true" [selectable]="true" [infoField]="'infoList'"
                [mappingItem]="false" (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-item>
            </div>

            <!-- Unmathced Readers -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.readers">
              <armon-terminal-control-panel-item [item]="item" [type]="2" [title]="item.name"
                [inputNumber]="item.number" [showBorder]="true" [selectable]="true" [infoField]="'infoList'"
                [mappingItem]="false" (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-item>
            </div>

            <!-- Unmathced Exit Buttons -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.exitButtons">
              <armon-terminal-control-panel-item [item]="item" [type]="4" [inputNumber]="item.number"
                [showBorder]="true" [selectable]="true" [infoField]="'infoList'" [mappingItem]="false"
                (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>
            </div>

            <!-- Unmathced Status Sensors -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.statusSensors">
              <armon-terminal-control-panel-item [item]="item" [type]="1" [title]="item.name"
                [inputNumber]="item.number" [showBorder]="true" [selectable]="true" [infoField]="'infoList'"
                [mappingItem]="false" (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-item>
            </div>

            <!-- Unmathced Counter Sensors -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.counterSensors">
              <armon-terminal-control-panel-item [item]="item" [type]="3" [title]="item.name"
                [inputNumber]="item.number" [showBorder]="true" [selectable]="true" [infoField]="'infoList'"
                [mappingItem]="false" (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-item>
            </div>

            <!-- Unmathced Plate Reader Lanes -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.plateReaderLanes">
              <armon-terminal-control-panel-item [item]="item" [type]="5" [title]="item.name"
                [inputNumber]="item.number" [showBorder]="true" [selectable]="true" [infoField]="'infoList'"
                [mappingItem]="false" (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-item>
            </div>

            <!-- Unmathced Gateaway Antennas -->
            <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.unmatches.gateWayAntennas">
              <armon-terminal-control-panel-item [item]="item" [type]="6" [title]="item.name"
                [inputNumber]="item.number" [showBorder]="true" [selectable]="true" [infoField]="'infoList'"
                [mappingItem]="false" (showOnPanelRequested)="onShowOnPanelRequested($event)">
              </armon-terminal-control-panel-item>
            </div>

          </div>
        </nz-tab>
        <ng-container *ngIf="mainControlPanel && mainControlPanel.integrations.length > 0">
          <nz-tab (nzSelect)="onTabChanged($event)" nzTitle="{{'CONTROLPANEL.INTEGRATIONS' | translate}}">
            <div class="row mt-2">
              <!-- List of integrations -->
              <div class="col-md-6 col-sm-12" *ngFor="let item of mainControlPanel.integrations">
                <armon-terminal-control-panel-integration-item [item]="item">
                </armon-terminal-control-panel-integration-item>
              </div>
            </div>
          </nz-tab>
        </ng-container>
      </nz-tabset>
    </div>

    <div class="col-lg-5 col-md-12 b-l-1 px-4">
      <div class="input-group mb-3">
        <select [(ngModel)]="currentControlPanel" class="form-select form-select-sm"
          [disabled]="controlPanelList.length == 0">
          <option *ngFor="let controlPanel of controlPanelList" [ngValue]="controlPanel">
            {{controlPanel.description | translate:controlPanel}}</option>
        </select>
        <button class="btn btn-outline-primary btn-sm" (click)="onEditClicked($event)">{{'BUTTON.EDIT' |
          translate}}</button>
      </div>

      <div class="row" *ngIf="currentControlPanel">
        <div class="col-lg-6 col-md-12">
          <div class=" mb-2"
            *ngIf="currentControlPanel.isGateWay && currentControlPanel.configuration.isConnected!=undefined && currentControlPanel.configuration.isConnected!=null">
            <span class="text-md"
              [ngStyle]="{'color': (currentControlPanel.configuration.isConnected ? '#62A325' : '#C82602')}">
              <cds-icon shape="ethernet" class="me-2"></cds-icon>
              {{(currentControlPanel.configuration.isConnected ? 'SYSTEMHEALTH.STATUS_CONNECTED' :
              'SYSTEMHEALTH.STATUS_DISCONNECTED') | translate}}
            </span>
          </div>
          <div class="d-flex flex-column mb-2"
            *ngIf="currentControlPanel.isGateWay && currentControlPanel.settings.name">
            <span class="text-sm">{{'CONTROLPANEL.NAME' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.settings.name}}</span>
          </div>
          <div class="d-flex flex-column mb-2"
            *ngIf="currentControlPanel.isGateWay && currentControlPanel.configuration.caption">
            <span class="text-sm">{{'CONTROLPANEL.CAPTION' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.caption}}</span>
          </div>
          <div class="d-flex flex-column mb-2"
            *ngIf="currentControlPanel.isGateWay && currentControlPanel.settings.location">
            <span class="text-sm">{{'CONTROLPANEL.LOCATION' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.settings.location}}</span>
          </div>
          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.serialNumber">
            <span class="text-sm">{{'CONTROLPANEL.SERIALNUMBER' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.serialNumber}}</span>
          </div>
          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.ip">
            <span class="text-sm">{{'CONTROLPANEL.NETWORK_IP' | translate}}</span>
            <span class="text-sm text-bold" ngxClipboard
              [cdkCopyToClipboard]="currentControlPanel.configuration.ip">{{currentControlPanel.configuration.ip}}</span>
          </div>
          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.mac">
            <span class="text-sm">{{'CONTROLPANEL.NETWORK_MAC' | translate}}</span>
            <span class="text-sm text-bold" ngxClipboard
              [cdkCopyToClipboard]="currentControlPanel.configuration.mac">{{currentControlPanel.configuration.mac}}</span>
          </div>
          <div class="d-flex flex-column mb-4" *ngIf="currentControlPanel.configuration.needsAdapterService">
            <span class="text-md">{{'CONTROLPANEL.NEEDS_ADAPTER_SERVICE' | translate}}</span>
          </div>

          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.model">
            <span class="text-sm">{{'CONTROLPANEL.PANEL_MODEL' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.model}}</span>
          </div>
          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.hardwareVersion">
            <span class="text-sm">{{'CONTROLPANEL.PANEL_HW_VERSION' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.hardwareVersion}}</span>
          </div>
          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.softwareVersion">
            <span class="text-sm">{{'CONTROLPANEL.PANEL_SW_VERSION' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.softwareVersion}}</span>
          </div>
          <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.serviceVersion">
            <span class="text-sm">{{'CONTROLPANEL.SERVICE_VERSION' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.serviceVersion}}</span>
          </div>
          <div class="d-flex flex-column mb-3" *ngIf="currentControlPanel.configuration.libAccessVersion">
            <span class="text-sm">{{'CONTROLPANEL.LIB_ACCESS_VERSION' | translate}}</span>
            <span class="text-sm text-bold">{{currentControlPanel.configuration.libAccessVersion}}</span>
          </div>

          <ng-container *ngIf="currentControlPanel.isGateWay && currentControlPanel.configuration.onBoardComputerModel">
            <div class="d-flex mb-2">
              <cds-icon shape="rack-server" class="me-1"></cds-icon>
              <span class="text-md">{{'CONTROLPANEL.TITLE_COMPUTER' | translate}}</span>
            </div>

            <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.onBoardComputerModel">
              <span class="text-sm">{{'CONTROLPANEL.COMPUTER_MODEL' | translate}}</span>
              <span class="text-sm text-bold">{{currentControlPanel.configuration.onBoardComputerModel}}</span>
            </div>
            <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.onBoardComputerVersion">
              <span class="text-sm">{{'CONTROLPANEL.COMPUTER_VERSION' | translate}}</span>
              <span class="text-sm text-bold">{{currentControlPanel.configuration.onBoardComputerVersion}}</span>
            </div>
            <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.onBoardComputerOs">
              <span class="text-sm">{{'CONTROLPANEL.COMPUTER_OS' | translate}}</span>
              <span class="text-sm text-bold">{{currentControlPanel.configuration.onBoardComputerOs}}</span>
            </div>
            <div class="d-flex flex-column mb-2" *ngIf="currentControlPanel.configuration.onBoardComputerTotalStorage">
              <span class="text-sm">{{'CONTROLPANEL.COMPUTER_STORAGE' | translate}}</span>
              <span class="text-sm text-bold">{{currentControlPanel.configuration.onBoardComputerTotalStorage}}
                GB</span>
            </div>
          </ng-container>
        </div>
        <div class="col-lg-6 col-md-12">
          <div class="d-flex flex-column mb-4">
            <span class="d-flex mb-2">
              <cds-icon shape="disconnect"></cds-icon>
              <span class="text-md">{{'CONTROLPANEL.TITLE_CONNECTIONS' | translate}}</span>
            </span>
            <span class="text-sm" *ngIf="currentControlPanel.configuration.relayCount">
              {{'CONTROLPANEL.CONNECTIONS_RELAYS' | translate:currentControlPanel.configuration}}</span>
            <span class="text-sm" *ngIf="currentControlPanel.configuration.readerCount">
              {{'CONTROLPANEL.CONNECTIONS_READERS' | translate:currentControlPanel.configuration}}</span>
            <span class="text-sm" *ngIf="currentControlPanel.configuration.dryContactInputCount">
              {{'CONTROLPANEL.CONNECTIONS_DIRECTINPUTS' | translate:currentControlPanel.configuration}}</span>
            <span class="text-sm" *ngIf="currentControlPanel.configuration.analogInputCount">
              {{'CONTROLPANEL.CONNECTIONS_ANALOGINPUTS' | translate:currentControlPanel.configuration}}</span>
            <span class="text-sm" *ngIf="currentControlPanel.configuration.isolatedInputCount">
              {{'CONTROLPANEL.CONNECTIONS_ISOLATEDINPUTS' | translate:currentControlPanel.configuration}}</span>
            <span class="text-sm" *ngIf="currentControlPanel.configuration.maxLockCount">
              {{'CONTROLPANEL.CONNECTIONS_MAX_LOCK_COUNT' | translate:currentControlPanel.configuration}}</span>
            <span class="text-sm" *ngIf="currentControlPanel.io.emergencyInputPlugged">
              {{'CONTROLPANEL.CONNECTIONS_EMERGENCY' | translate}}</span>
          </div>

          <div class="d-flex mb-4"
            *ngIf="currentControlPanel.configuration.hasBatteryInput !== null && currentControlPanel.configuration.hasBatteryInput !== undefined">
            <cds-icon shape="battery"></cds-icon>
            <span class="text-md">
              {{(currentControlPanel.configuration.hasBatteryInput ? 'CONTROLPANEL.BATTERY_EXISTS' :
              'CONTROLPANEL.BATTERY_NOT_EXISTS') | translate}}
            </span>
          </div>

          <div class="d-flex mb-4"
            *ngIf="currentControlPanel.tamperSwitchs !== null && currentControlPanel.tamperSwitchs !== undefined && currentControlPanel.tamperSwitchs.length > 0">
            <cds-icon shape="collapse-card"></cds-icon>
            <span class="text-sm">{{'CONTROLPANEL.TAMPER_SWITCH_EXISTS' | translate}}
            </span>
          </div>

          <div *ngIf="currentControlPanel && currentControlPanel.isGateWay && terminalTemperature">
            <div class="d-flex mb-2">
              <cds-icon shape="thermometer"></cds-icon>
              <span class="text-md">{{'CONTROLPANEL.WORKING_TEMPERATURE' | translate}}</span>
            </div>
            <armon-terminal-control-panel-temperature [controlPanelDetails]="currentControlPanel"
              [currentTemperature]="terminalTemperature">
            </armon-terminal-control-panel-temperature>
          </div>
          <br />
          <armon-board *ngIf="visibleBoard"></armon-board>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="modal-footer">
  <button type="button" class="btn btn-outline-primary" (click)="onCancelClicked($event)">{{'BUTTON.CLOSE' |
    translate}}</button>
</div>`;var qt=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.controlPanelInfo p{margin-top:0}.controlPanelInfoWithIcon{align-items:center}.controlPanelInfoWithIcon>cds-icon{margin-right:2px}
`;var jn=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Z=class extends Je{http;configurationService;interactionService;systemService;sessionService;apiSystem;storedMainControlPanels;constructor(e,t,i,o,n){super(i,n),this.http=e,this.configurationService=t,this.interactionService=i,this.systemService=o,this.sessionService=n,this.apiSystem=new gt(this.http,this.sessionService,this.configurationService,this.interactionService)}resetStoredData(){super.resetStoredData(),this.storedMainControlPanels=null}getMainControlPanels(e){if(this.storedMainControlPanels&&!e)return Le(this.storedMainControlPanels);{let t=[];return this.systemService.getCurrentSystemHealthData().devices.forEach(i=>{let o=new at;o.caption=i.caption,o.name=i.name,o.location=i.location,o.id=i.id,t.push(o)}),this.storedMainControlPanels=t,Le(this.storedMainControlPanels)}}getDetailsOfControlPanel(e){return this.apiSystem.getControlPanelDetails(e).pipe(x(t=>this.handleError(t,[])))}getDetailsOfControlPanelV2(e){return this.apiSystem.getControlPanelDetailsV2(e).pipe(x(t=>this.handleError(t,[])))}getDetailsOfAperioAH40(e){return this.apiSystem.getDetailsOfAperioAH40(e).pipe(x(t=>this.handleError(t,[])))}getDetailsOfHikVision(e){return this.apiSystem.getDetailsOfHikVision(e).pipe(x(t=>this.handleError(t,[])))}getDetailsOfArmonOne(e){return this.apiSystem.getDetailsOfArmonOne(e).pipe(x(t=>this.handleError(t,[])))}getDetailsOfDevice(e){return this.apiSystem.getDetailsOfDevice(e).pipe(x(t=>this.handleError(t,[])))}updateWiegandReaderDetails(e,t,i){return this.apiSystem.updateWiegandReaderDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateStatusSensorDetails(e,t,i){return this.apiSystem.updateStatusSensorDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateCounterSensorDetails(e,t,i){return this.apiSystem.updateCounterSensorDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateRelayDetails(e,t,i){return this.apiSystem.updateRelayDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateControlPanelDetails(e,t){return this.apiSystem.updateControlPanelDetails(e,t).pipe(x(i=>this.handleError(i,[])))}updateAccessControlPointMapping(e){return this.apiSystem.updateArmonControlPanelMapping(e.accessControlPointId,e).pipe(x(t=>this.handleError(t,[])))}updateArmonControlPanelDetails(e,t){return this.apiSystem.updateArmonControlPanelDetails(e,t).pipe(x(i=>this.handleError(i,[])))}updateArmonControlPanelWiegandReaderDetails(e,t,i){return this.apiSystem.updateArmonControlPanelWiegandReaderDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateArmonControlPanelStatusSensorDetails(e,t,i){return this.apiSystem.updateArmonControlPanelStatusSensorDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateArmonControlPanelCounterSensorDetails(e,t,i){return this.apiSystem.updateArmonControlPanelCounterSensorDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateArmonControlPanelRelayDetails(e,t,i){return this.apiSystem.updateArmonControlPanelRelayDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateArmonControlPanelLicensePlateLaneDetails(e,t,i){return this.apiSystem.updateArmonControlPanelLicensePlateLaneDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}updateArmonControlPanelGatewayAntennaDetails(e,t,i){return this.apiSystem.updateArmonControlPanelGatewayAntennaDetails(e,t,i).pipe(x(o=>this.handleError(o,[])))}exportSystemConfigurationDetails(){return this.apiSystem.getSystemDetailsAsExcel().pipe(x(e=>this.handleError(e,[])))}static ctorParameters=()=>[{type:je},{type:Ze},{type:g},{type:v},{type:re}]};Z=jn([Ue({providedIn:"root"})],Z);var $t=`<div class="modal-header" *ngIf="title">\r
  <span class="text-lg">{{title | translate:controlPanel}}</span>\r
</div>\r
\r
<div class="modal-body">\r
  <div class="row">\r
    <div class="col-xl-12">\r
      <form [formGroup]="form" class="my-3">\r
        <ng-container [ngSwitch]="type">\r
          <!-- CONTROL PANEL -->\r
          <ng-container *ngSwitchCase="1">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'CONTROLPANEL.NAME' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="location-input" class="required">{{'CONTROLPANEL.LOCATION' | translate}}</label>\r
              <input type="text" id="location-input" formControlName="location" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('location')}">\r
              <div class="invalid-feedback" *ngIf="controls.location.errors && controls.location.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.location.errors && controls.location.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
          <!-- CONTROL PANEL RELAY-->\r
          <ng-container *ngSwitchCase="2">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'CONTROLPANEL.RELAY_MANAGES_TO' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="driveDuration-input">{{'CONTROLPANEL.RELAY_DRIVE_DURATION' | translate}}</label>\r
              <input type="number" id="driveDuration-input" formControlName="driveDuration"\r
                class="form-control form-control-sm" min="1" max="1155"\r
                [ngClass]="{'is-invalid': isFormFieldInvalid('driveDuration')}">\r
              <div class="invalid-feedback" *ngIf="controls.driveDuration.errors && controls.driveDuration.errors.min">\r
                <span [translate]="'VALIDATION.MIN_VALUE'" [translateParams]="{min: 1}"></span>\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.driveDuration.errors && controls.driveDuration.errors.max">\r
                <span [translate]="'VALIDATION.MAX_VALUE'" [translateParams]="{max: 1155}"></span>\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
          <!-- CONTROL PANEL READER -->\r
          <ng-container *ngSwitchCase="3">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'CONTROLPANEL.WIEGAND_READER_NAME' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="location-input">{{'CONTROLPANEL.WIEGAND_READER_LOCATION' | translate}}</label>\r
              <input type="text" id="location-input" formControlName="location" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('location')}">\r
              <div class="invalid-feedback" *ngIf="controls.location.errors && controls.location.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="recurrentAttemptTimeout-input" class="required">{{'CONTROLPANEL.WIEGANG_ATTEMPT_TIMEOUT' |\r
                translate}}</label>\r
              <input type="number" id="recurrentAttemptTimeout-input" formControlName="recurrentAttemptTimeout"\r
                class="form-control form-control-sm"\r
                [ngClass]="{'is-invalid': isFormFieldInvalid('recurrentAttemptTimeout')}">\r
              <div class="invalid-feedback"\r
                *ngIf="controls.recurrentAttemptTimeout.errors && controls.recurrentAttemptTimeout.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
          <!-- CONTROL PANEL STATUS SENSOR-->\r
          <ng-container *ngSwitchCase="4">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'CONTROLPANEL.STATUS_SENSOR_SENSE_TO' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="timeOut-input">{{'CONTROLPANEL.STATUS_SENSOR_TIMEOUT' | translate}}</label>\r
              <input type="number" id="timeOut-input" formControlName="timeOut" class="form-control form-control-sm"\r
                min="1" max="3600" [ngClass]="{'is-invalid': isFormFieldInvalid('timeOut')}">\r
              <div class="invalid-feedback" *ngIf="controls.timeOut.errors && controls.timeOut.errors.min">\r
                <span [translate]="'VALIDATION.MIN_VALUE'" [translateParams]="{min: 1}"></span>\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.timeOut.errors && controls.timeOut.errors.max">\r
                <span [translate]="'VALIDATION.MAX_VALUE'" [translateParams]="{max: 3600}"></span>\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
          <!-- CONTROL PANEL COUNTER SENSOR-->\r
          <ng-container *ngSwitchCase="5">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'CONTROLPANEL.COUNTER_SENSOR_COUNTS_TO' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
          <!-- CONTROL PANEL LICENSE PLATE LANE-->\r
          <ng-container *ngSwitchCase="6">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'TERMINAL.LICENSE_PLATE_LANE_NAME' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="number-input" class="required">{{'TERMINAL.LICENSE_PLATE_LANE_NUMBER' | translate}}</label>\r
              <input type="number" id="number-input" formControlName="number" class="form-control form-control-sm"\r
                [ngClass]="{'is-invalid': isFormFieldInvalid('number')}">\r
              <div class="invalid-feedback" *ngIf="controls.number.errors && controls.number.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="recurrentAttemptTimeout-input" class="required">{{'TERMINAL.LICENSE_PLATE_ATTEMPT_TIMEOUT' |\r
                translate}}</label>\r
              <input type="number" id="recurrentAttemptTimeout-input" formControlName="recurrentAttemptTimeout"\r
                class="form-control form-control-sm"\r
                [ngClass]="{'is-invalid': isFormFieldInvalid('recurrentAttemptTimeout')}">\r
              <div class="invalid-feedback"\r
                *ngIf="controls.recurrentAttemptTimeout.errors && controls.recurrentAttemptTimeout.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
          <!-- CONTROL PANEL GATEWAY ANTENNA-->\r
          <ng-container *ngSwitchCase="7">\r
            <div class="form-group">\r
              <label for="name-input" class="required">{{'TERMINAL.GATEWAY_ANTENNA_NAME' | translate}}</label>\r
              <input type="text" id="name-input" formControlName="name" maxlength="255"\r
                class="form-control form-control-sm" [ngClass]="{'is-invalid': isFormFieldInvalid('name')}">\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
              <div class="invalid-feedback" *ngIf="controls.name.errors && controls.name.errors.maxlength">\r
                <span [translate]="'VALIDATION.MAX_LENGTH'" [translateParams]="{max: 255}"></span>\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="number-input" class="required">{{'TERMINAL.GATEWAY_ANTENNA_NUMBER' | translate}}</label>\r
              <input type="number" id="number-input" formControlName="number" class="form-control form-control-sm"\r
                [ngClass]="{'is-invalid': isFormFieldInvalid('number')}">\r
              <div class="invalid-feedback" *ngIf="controls.number.errors && controls.number.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
            </div>\r
            <div class="form-group">\r
              <label for="recurrentAttemptTimeout-input" class="required">{{'TERMINAL.GATEWAY_ANTENNA_TIMEOUT' |\r
                translate}}</label>\r
              <input type="number" id="recurrentAttemptTimeout-input" formControlName="recurrentAttemptTimeout"\r
                class="form-control form-control-sm"\r
                [ngClass]="{'is-invalid': isFormFieldInvalid('recurrentAttemptTimeout')}">\r
              <div class="invalid-feedback"\r
                *ngIf="controls.recurrentAttemptTimeout.errors && controls.recurrentAttemptTimeout.errors.required">\r
                {{'VALIDATION.REQUIRED' | translate}}\r
              </div>\r
            </div>\r
          </ng-container>\r
          <!-- END -->\r
\r
        </ng-container>\r
      </form>\r
    </div>\r
  </div>\r
</div>\r
<div class="modal-footer">\r
  <button type="button" class="btn btn-outline-primary" (click)="onCancelClicked($event)">{{'BUTTON.CANCEL' |\r
    translate}}</button>\r
  <button type="button" class="btn btn-success" (click)="onSaveClicked($event)"\r
    [disabled]="form.invalid">{{'BUTTON.SAVE' | translate}}</button>\r
</div>`;var Ht="";var $n=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},ee=class extends _{formBuilder;controlPanelService;type;controlPanel;title;form;constructor(e,t){super(),this.formBuilder=e,this.controlPanelService=t}onModalInitialized(){super.onModalInitialized(),this.initializeForm()}onSaveClicked(e){switch(this.type){case C.ControlPanel:this.saveControlPanel();break;case C.ControlPanelRelay:this.saveControlPanelRelay();break;case C.ControlPanelWiegandReader:this.saveControlPanelWiegandReader();break;case C.ControlPanelStatusSensor:this.saveControlPanelStatusSensor();break;case C.ControlPanelCounterSensor:this.saveControlPanelCounterSensor();break;case C.ControlPanelPlateReaderLane:this.saveControlPanelLicensePlateLane();break;case C.ControlPanelGateWayAntenna:this.saveControlPanelGatewayAntenna();break}}initializeForm(){switch(this.type){case C.ControlPanel:this.form=this.formBuilder.group({name:[this.controlPanel.name,[m.required,m.maxLength(255)]],location:[this.controlPanel.location,[m.required,m.maxLength(255)]]});break;case C.ControlPanelRelay:this.form=this.formBuilder.group({name:[this.controlPanel.name,m.required],driveDuration:[this.controlPanel.driveDuration,[m.min(1),m.max(1155)]]});break;case C.ControlPanelWiegandReader:this.form=this.formBuilder.group({name:[this.controlPanel.name,[m.required,m.maxLength(255)]],location:[this.controlPanel.location,[m.maxLength(255)]],recurrentAttemptTimeout:[this.controlPanel.recurrentAttemptTimeout,m.required]});break;case C.ControlPanelStatusSensor:this.form=this.formBuilder.group({name:[this.controlPanel.name,m.required],timeOut:[this.controlPanel.timeOut,[m.min(1),m.max(3600)]]});break;case C.ControlPanelStatusSensor:this.form=this.formBuilder.group({name:[this.controlPanel.name,m.required]});break;case C.ControlPanelPlateReaderLane:this.form=this.formBuilder.group({name:[this.controlPanel.name,m.required],number:[this.controlPanel.name,m.required],recurrentAttemptTimeout:[this.controlPanel.name,m.required]});break;case C.ControlPanelGateWayAntenna:this.form=this.formBuilder.group({name:[this.controlPanel.name,m.required],number:[this.controlPanel.name,m.required],recurrentAttemptTimeout:[this.controlPanel.name,m.required]});break}}get controls(){return this.form.controls}isFormFieldInvalid(e){return He(this.form,e)}getRequestInstance(e){let t=new ft[e];return Object.keys(this.form.value).forEach(i=>{t[i]=this.form.value[i]}),t}saveControlPanel(){this.controlPanelService.updateArmonControlPanelDetails(this.controlPanel.deviceId,this.getRequestInstance("DeviceArmonControlPanelUpdateControlPanelRequest")).subscribe(()=>{this.controlPanel.settings=this.getRequestInstance("DeviceArmonControlPanelUpdateControlPanelRequest"),this.informControlPanelUpdated()})}saveControlPanelRelay(){this.controlPanelService.updateArmonControlPanelRelayDetails(this.controlPanel.deviceId,this.controlPanel.id,this.getRequestInstance("DeviceArmonControlPanelUpdateRelayRequest")).subscribe(()=>{this.informControlPanelItemUpdated()})}saveControlPanelWiegandReader(){this.controlPanelService.updateArmonControlPanelWiegandReaderDetails(this.controlPanel.deviceId,this.controlPanel.id,this.getRequestInstance("DeviceArmonControlPanelUpdateWiegandReaderRequest")).subscribe(()=>{this.informControlPanelItemUpdated()})}saveControlPanelStatusSensor(){this.controlPanelService.updateArmonControlPanelStatusSensorDetails(this.controlPanel.deviceId,this.controlPanel.id,this.getRequestInstance("DeviceArmonControlPanelUpdateStatusSensorRequest")).subscribe(()=>{this.informControlPanelItemUpdated()})}saveControlPanelCounterSensor(){this.controlPanelService.updateArmonControlPanelCounterSensorDetails(this.controlPanel.deviceId,this.controlPanel.id,this.getRequestInstance("DeviceArmonControlPanelUpdateCounterSensorRequest")).subscribe(()=>{this.informControlPanelItemUpdated()})}saveControlPanelLicensePlateLane(){this.controlPanelService.updateArmonControlPanelLicensePlateLaneDetails(this.controlPanel.controlPanelId,this.controlPanel.id,this.getRequestInstance("DeviceArmonControlPanelUpdateLicensePlateLaneRequest")).subscribe(()=>{this.informControlPanelItemUpdated()})}saveControlPanelGatewayAntenna(){this.controlPanelService.updateArmonControlPanelGatewayAntennaDetails(this.controlPanel.controlPanelId,this.controlPanel.id,this.getRequestInstance("DeviceArmonControlPanelUpdateGatewayAntennaRequest")).subscribe(()=>{this.informControlPanelItemUpdated()})}informControlPanelUpdated(){this.closeModal(this.controlPanel)}informControlPanelItemUpdated(){Object.keys(this.form.value).forEach(e=>{this.controlPanel[e]=this.form.value[e]}),this.closeModal(this.controlPanel)}static ctorParameters=()=>[{type:j},{type:Z}];static propDecorators={type:[{type:l}],controlPanel:[{type:l}],title:[{type:l}]}};ee=$n([d({selector:"armon-terminal-control-panel-edit-modal",template:$t,standalone:!0,imports:[u,k,B,V,G,A,p],styles:[Ht]})],ee);var Yt=`<!-- TODO Check this <h3 class="modal-title" *ngIf="mainControlPanel">{{mainControlPanel.nameWithCaption | translate:mainControlPanel}}</h3> -->

<div class="modal-body">

  <span>

    <div *ngFor="let item of accessControlPoints" class="selectionItem" (click)="onAccessControlPointSelected(item)"
      [ngClass]="{'selectionItemSelected': selectedAccessControlPoint && selectedAccessControlPoint.id === item.id}">
      {{item.name}}
    </div>


    <div class="selectionItemNew mt-4" (click)="onAddNewClicked($event)">
      <cds-icon shape="plus-circle" solid class="me-2"></cds-icon>{{'ACCESSCONTROLPOINT.ADD_NEW' | translate}}
    </div>

  </span>

</div>

<div class="modal-footer">
  <button type="button" class="btn btn-primary" [disabled]="!selectedAccessControlPoint"
    (click)="onMatchClicked($event)">{{'ACCESSCONTROLPOINT.BUTTON_MATCH' | translate}}</button>
  <button type="button" class="btn btn-outline-primary"
    (click)="onCancelClicked($event)">{{'BUTTON.CLOSE' | translate}}</button>
</div>`;var Qt=`.selectionItem,.selectionItemNew{padding:8px;margin:8px 0;border:1px solid rgb(235,235,235);border-radius:4px;cursor:pointer}.selectionItemNew{color:#0a2a5a;border:1px solid #0a2a5a;background-color:#d8f1fe}.selectionItemSelected{border-color:#eb8d00!important}
`;var Qn=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},ve=class extends _{accessControlPointService;sessionService;modalService;controlPanel;accessControlPoints=[];selectedAccessControlPoint;newAccessControlPointForm;newAccessControlPointFields=[];accessControlPointDefaultValues={remoteAvailable:!1,isRemoteDefault:!1};relatedControlPanel;constructor(e,t,i){super(),this.accessControlPointService=e,this.sessionService=t,this.modalService=i}onModalInitialized(){super.onModalInitialized(),this.setCurrentValues(this.controlPanel),this.clearCurrentValues()}set modalData(e){}onAccessControlPointSelected(e){this.selectedAccessControlPoint=e}onAddNewClicked(e){this.selectedAccessControlPoint=null,this.modalService.open(Ot,{settings:{size:"lg"},props:{controlPanel:this.relatedControlPanel}}).result.then(t=>{this.closeModal(t)}).catch(t=>{})}onReturnToSelectionClicked(e){this.clearCurrentValues()}onMatchClicked(e){this.sendAccessControlPointSelection()}onAddAndMatchClicked(e){let t=new it;Qe(this.newAccessControlPointForm,this.newAccessControlPointFields,t),t.isRemoteDefault=t.isRemoteDefault&&t.remoteAvailable,t.deviceId=this.relatedControlPanel.deviceId,this.accessControlPointService.addAccessControlPoint(t).subscribe(i=>{this.selectedAccessControlPoint=i,this.sendAccessControlPointSelection()})}sendAccessControlPointSelection(){this.closeModal(this.selectedAccessControlPoint)}setCurrentValues(e){this.accessControlPoints=e.allAccessControlPoints||[],this.relatedControlPanel=e}clearCurrentValues(){this.selectedAccessControlPoint=null,this.newAccessControlPointForm.reset(this.accessControlPointDefaultValues)}static ctorParameters=()=>[{type:xt},{type:re},{type:R}];static propDecorators={controlPanel:[{type:l}]}};ve=Qn([d({selector:"armon-terminal-control-panel-access-control-point-selection-modal",template:Yt,standalone:!0,imports:[I,A,p],styles:[Qt]})],ve);var Xt=`<svg version="1.1" width="36" height="20" viewBox="0 0 36 20" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <filter id="svg_2_blur">
      <feGaussianBlur stdDeviation="0" in="SourceGraphic" />
    </filter>
  </defs>
  <g>
    <title>background</title>
    <rect fill="none" id="canvas_background" height="22" width="38" y="-1" x="-1" />
    <g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
      <rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%" />
    </g>
  </g>
  <g>
    <title>Layer 1</title>
    <rect class="clr-i-outline clr-i-outline-path-1" stroke="#000" rx="0.1" id="svg_1" height="16.764902" width="34.015341" y="1.734954"
      x="0.9504" stroke-width="0.3" fill="none" />
    <rect class="clr-i-outline clr-i-outline-path-1" stroke="#000" rx="0.1" filter="url(#svg_2_blur)" id="svg_2" height="10.915183"
      width="33.811793" y="4.659814" x="1.052172" fill-opacity="null" stroke-opacity="null" stroke-width="0.2" fill="none"
    />
    <rect class="clr-i-outline clr-i-outline-path-1" stroke="#000" rx="0.1" id="svg_3" height="6.491506" width="31.877977" y="6.871652"
      x="2.019084" stroke-opacity="null" stroke-width="0.15" fill="none" />
    <text font-style="normal" stroke="#000" font-weight="normal" xml:space="preserve" text-anchor="start" font-family="Helvetica, Arial, sans-serif"
      font-size="2.5" id="svg_4" y="12.176205" x="25.622197" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#000000">armon</text>
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_1" cy="3.429777" cx="2.654095" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_1')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_2" cy="3.429777" cx="3.78617" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_2')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_3" cy="3.429777" cx="4.918245" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_3')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_4" cy="3.429777" cx="6.05032" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_4')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_5" cy="3.429777" cx="7.182394" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_5')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_6" cy="3.429777" cx="8.314469" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_6')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_7" cy="3.429777" cx="9.446544" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_7')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_8" cy="3.429777" cx="10.53669" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_8')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_9" cy="3.429777" cx="11.668765" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_9')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_10" cy="3.429777" cx="12.80084" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_10')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_11" cy="3.429777" cx="13.932915" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_11')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_12" cy="3.429777" cx="15.06499" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_12')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_13" cy="3.429777" cx="16.197064" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_13')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_14" cy="3.429777" cx="17.329139" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_14')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_15" cy="3.429777" cx="18.419285" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_15')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_16" cy="3.429777" cx="19.55136" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_16')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_17" cy="3.429777" cx="20.683435" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_17')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_18" cy="3.429777" cx="21.81551" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_18')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_19" cy="3.429777" cx="22.947585" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_19')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_20" cy="3.429777" cx="24.079659" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_20')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_21" cy="3.429777" cx="25.211734" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_21')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_22" cy="3.429777" cx="26.343809" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_22')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_23" cy="3.429777" cx="27.475884" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_23')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_24" cy="3.429777" cx="28.607959" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_24')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_25" cy="3.429777" cx="29.740034" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_25')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_26" cy="3.429777" cx="30.872108" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_26')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_27" cy="3.429777" cx="32.004183" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_27')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_top_28" cy="3.429777" cx="33.136258" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_top_28')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_1" cy="16.88889" cx="2.654095" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_1')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_2" cy="16.88889" cx="3.78617" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_2')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_3" cy="16.88889" cx="4.918245" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_3')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_4" cy="16.88889" cx="6.05032" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_4')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_5" cy="16.88889" cx="7.182394" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_5')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_6" cy="16.88889" cx="8.314469" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_6')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_7" cy="16.88889" cx="9.446544" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_7')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_8" cy="16.88889" cx="10.53669" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_8')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_9" cy="16.88889" cx="11.668765" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_9')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_10" cy="16.88889" cx="12.80084" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_10')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_11" cy="16.88889" cx="13.932915" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_11')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_12" cy="16.88889" cx="15.06499" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_12')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_13" cy="16.88889" cx="16.197064" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_13')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_14" cy="16.88889" cx="17.329139" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_14')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_15" cy="16.88889" cx="18.419285" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_15')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_16" cy="16.88889" cx="19.55136" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_16')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_17" cy="16.88889" cx="20.683435" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_17')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_18" cy="16.88889" cx="21.81551" fill-opacity="null" stroke-opacity="null"
      stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_18')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_19" cy="16.88889" cx="22.947585" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_19')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_20" cy="16.88889" cx="24.079659" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_20')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_21" cy="16.88889" cx="25.211734" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_21')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_22" cy="16.88889" cx="26.343809" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_22')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_23" cy="16.88889" cx="27.475884" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_23')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_24" cy="16.88889" cx="28.607959" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_24')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_25" cy="16.88889" cx="29.740034" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_25')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_26" cy="16.88889" cx="30.872108" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_26')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_27" cy="16.88889" cx="32.004183" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_27')" />
    <ellipse stroke="#000" ry="0.440251" rx="0.433963" id="input_bottom_28" cy="16.88889" cx="33.136258" fill-opacity="null"
      stroke-opacity="null" stroke-width="0.15" fill="none"  [attr.class]="checkInput('input_bottom_28')" />
  </g>
</svg>`;var Kt=`svg{width:90%;height:auto;max-width:215px;max-height:105px}.activeInput{fill:#006a91;-webkit-animation:flash linear 1s infinite;animation:flash linear 1s infinite}@-webkit-keyframes flash{0%{fill:#006a91}50%{fill:#eb8d00}to{fill:#006a91}}@keyframes flash{0%{fill:#006a91}50%{fill:#eb8d00}to{fill:#006a91}}
`;var Jn=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},be=class{interactionService;activeInputIds=[];subscriptionShowOnPanel;keyMain="main";keyExtension="extension";keyWiegandReader="WiegandReader";keyRelay="Relay";keyDryContact="DryContact";mainWiegandReader1=["input_bottom_1","input_bottom_2","input_bottom_3","input_bottom_4","input_bottom_5","input_bottom_6"];mainWiegandReader2=["input_bottom_7","input_bottom_8","input_bottom_9","input_bottom_10","input_bottom_11","input_bottom_12"];mainWiegandReader3=["input_bottom_13","input_bottom_14","input_bottom_15","input_bottom_16","input_bottom_17","input_bottom_18"];mainRelay1=["input_bottom_26","input_bottom_27","input_bottom_28"];mainRelay2=["input_bottom_23","input_bottom_24","input_bottom_25"];mainRelay3=["input_bottom_20","input_bottom_21","input_bottom_22"];mainDryContact1=["input_top_12","input_top_13"];mainDryContact2=["input_top_14","input_top_15"];mainDryContact3=["input_top_16","input_top_17"];mainDryContact4=["input_top_18","input_top_19"];mainDryContact5=["input_top_20","input_top_21"];mainDryContact6=["input_top_22","input_top_23"];mainDryContact7=["input_top_24","input_top_25"];extensionWiegandReader1=["input_top_6","input_top_7","input_top_8","input_top_9","input_top_10","input_top_11"];extensionWiegandReader2=["input_top_16","input_top_17","input_top_18","input_top_19","input_top_20","input_top_21"];extensionWiegandReader3=["input_bottom_1","input_bottom_2","input_bottom_3","input_bottom_4","input_bottom_5","input_bottom_6"];extensionWiegandReader4=["input_bottom_9","input_bottom_10","input_bottom_11","input_bottom_12","input_bottom_13","input_bottom_14"];extensionRelay1=["input_bottom_26","input_bottom_27","input_bottom_28"];extensionRelay2=["input_bottom_23","input_bottom_24","input_bottom_25"];extensionRelay3=["input_bottom_20","input_bottom_21","input_bottom_22"];extensionRelay4=["input_bottom_17","input_bottom_18","input_bottom_19"];extensionDryContact1=["input_top_12","input_top_13"];extensionDryContact2=["input_top_14","input_top_15"];extensionDryContact3=["input_top_22","input_top_23"];extensionDryContact4=["input_top_24","input_top_25"];extensionDryContact5=["input_bottom_7","input_bottom_8"];extensionDryContact6=["input_bottom_15","input_bottom_16"];constructor(e){this.interactionService=e}ngOnInit(){this.initializeSubscriptions()}ngOnDestroy(){this.subscriptionShowOnPanel.unsubscribe()}checkInput(e){return this.activeInputIds&&this.activeInputIds.indexOf(e)>=0?"activeInput":""}initializeSubscriptions(){this.subscriptionShowOnPanel=this.interactionService.onShowOnControlPanelRequested.subscribe(e=>{this.setActiveInputs(e)})}setActiveInputs(e){if(e){let t=e.controlPanelIsGateway?this.keyMain:this.keyExtension;e.inputType===c.Relay?t+=this.keyRelay:e.inputType===c.WiegandReader?t+=this.keyWiegandReader:t+=this.keyDryContact,t+=e.inputNumber,this.activeInputIds=this[t]||[]}else this.activeInputIds=[]}static ctorParameters=()=>[{type:g}]};be=Jn([d({selector:"armon-board",template:Xt,standalone:!0,styles:[Kt]})],be);var Jt=`<div *ngIf="visibleComponent" class="temperature-container">\r
<svg\r
   xmlns:svg="http://www.w3.org/2000/svg"\r
   xmlns="http://www.w3.org/2000/svg"\r
   height="48"\r
   width="82.710678"\r
   id="svg1061"\r
   preserveAspectRatio="xMidYMid meet"\r
   viewBox="0 0 82.710678 48"\r
   version="1.1">\r
  <defs\r
     id="defs1065" />\r
  <g\r
     id="g1041"\r
     transform="translate(41.355339,52)">\r
    <path\r
       style="fill:#26c6d6"\r
       id="path961"\r
       d="m -33.234019,-33.234019 a 47,47 0 0 1 1.330384,-1.279139 l 4.751605,5.140258 a 40,40 0 0 0 -1.132241,1.088629 z" />\r
    <path\r
       style="fill:#2fc6d1"\r
       id="path963"\r
       d="m -32.203601,-34.233436 a 47,47 0 0 1 1.679543,-1.505644 l 4.546136,5.322841 a 40,40 0 0 0 -1.429398,1.2814 z" />\r
    <path\r
       style="fill:#38c6c8"\r
       id="path965"\r
       d="m -30.834774,-35.47135 a 47,47 0 0 1 1.737358,-1.438546 l 4.333658,5.497219 a 40,40 0 0 0 -1.478603,1.224294 z" />\r
    <path\r
       style="fill:#41c6c0"\r
       id="path967"\r
       d="m -29.418403,-36.654571 a 47,47 0 0 1 1.792496,-1.369228 l 4.114497,5.663119 a 40,40 0 0 0 -1.525529,1.165301 z" />\r
    <path\r
       style="fill:#4ac6b7"\r
       id="path969"\r
       d="m -27.956671,-37.781272 a 47,47 0 0 1 1.84487,-1.2978 l 3.888992,5.820288 a 40,40 0 0 0 -1.570102,1.10451 z" />\r
    <path\r
       style="fill:#53c6af"\r
       id="path971"\r
       d="m -26.451832,-38.849718 a 47,47 0 0 1 1.894399,-1.22437 l 3.65749,5.968481 a 40,40 0 0 0 -1.612254,1.042017 z" />\r
    <path\r
       style="fill:#5cc6a6"\r
       id="path973"\r
       d="m -24.906205,-39.858261 a 47,47 0 0 1 1.941007,-1.149051 l 3.420348,6.107472 a 40,40 0 0 0 -1.651921,0.977916 z" />\r
    <path\r
       style="fill:#65c69d"\r
       id="path975"\r
       d="m -23.322176,-40.805344 a 47,47 0 0 1 1.984623,-1.071963 l 3.177933,6.237046 a 40,40 0 0 0 -1.68904,0.912308 z" />\r
    <path\r
       style="fill:#6ec695"\r
       id="path977"\r
       d="m -21.702185,-41.689509 a 47,47 0 0 1 2.025177,-0.99322 l 2.930618,6.357002 a 40,40 0 0 0 -1.723555,0.845294 z" />\r
    <path\r
       style="fill:#77c68c"\r
       id="path979"\r
       d="m -20.048731,-42.509392 a 47,47 0 0 1 2.06261,-0.912946 l 2.678784,6.467157 a 40,40 0 0 0 -1.755413,0.776975 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path981"\r
       d="m -18.364363,-43.263728 a 47,47 0 0 1 2.096861,-0.831265 l 2.42282,6.56734 a 40,40 0 0 0 -1.784563,0.707459 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path983"\r
       d="m -16.651679,-43.951355 a 47,47 0 0 1 2.12788,-0.748301 l 2.163119,6.657395 a 40,40 0 0 0 -1.810962,0.636853 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path985"\r
       d="m -14.913319,-44.571212 a 47,47 0 0 1 2.155618,-0.664184 l 1.900083,6.737187 a 40,40 0 0 0 -1.834568,0.565263 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path987"\r
       d="m -13.151964,-45.122343 a 47,47 0 0 1 2.180032,-0.579043 l 1.6341174,6.806589 a 40,40 0 0 0 -1.8553464,0.492803 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path989"\r
       d="m -11.370329,-45.603899 a 47,47 0 0 1 2.2010839,-0.493009 l 1.3656322,6.865497 a 40,40 0 0 0 -1.8732629,0.419582 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path991"\r
       d="m -9.5711623,-46.015137 a 47,47 0 0 1 2.2187424,-0.406215 l 1.0950413,6.913818 a 40,40 0 0 0 -1.8882914,0.345715 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path993"\r
       d="m -7.7572375,-46.355423 a 47,47 0 0 1 2.2329798,-0.318794 l 0.8227618,6.951479 a 40,40 0 0 0 -1.9004083,0.271314 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path995"\r
       d="m -5.9313515,-46.624233 a 47,47 0 0 1 2.243774,-0.230882 l 0.5492137,6.978422 a 40,40 0 0 0 -1.909595,0.196495 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path997"\r
       d="m -4.0963199,-46.821151 a 47,47 0 0 1 2.2511086,-0.142614 l 0.2748187,6.994604 a 40,40 0 0 0 -1.9158371,0.121373 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path999"\r
       d="M -2.254972,-46.945874 A 47,47 0 0 1 0,-47 v 7 a 40,40 0 0 0 -1.9191251,0.04606 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1001"\r
       d="m -0.41014717,-46.99821 a 47,47 0 0 1 2.25535847,0.03444 l -0.2748187,6.994604 a 40,40 0 0 0 -1.91945402,-0.02932 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1003"\r
       d="m 1.4353101,-46.978079 a 47,47 0 0 1 2.2522674,0.122964 l -0.5492137,6.978422 a 40,40 0 0 0 -1.9168233,-0.104651 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1005"\r
       d="m 3.2785543,-46.88551 a 47,47 0 0 1 2.2457034,0.211293 l -0.8227618,6.951479 a 40,40 0 0 0 -1.911237,-0.179824 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1007"\r
       d="m 5.1167431,-46.720648 a 47,47 0 0 1 2.2356768,0.299296 l -1.0950413,6.913818 a 40,40 0 0 0 -1.9027036,-0.25472 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1009"\r
       d="m 6.9470423,-46.483746 a 47,47 0 0 1 2.2222028,0.386838 l -1.3656322,6.865497 a 40,40 0 0 0 -1.8912365,-0.329224 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1011"\r
       d="m 8.7666297,-46.175169 a 47,47 0 0 1 2.2053023,0.473783 l -1.6341174,6.806589 a 40,40 0 0 0 -1.8768532,-0.403219 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1013"\r
       d="m 10.5727,-45.795393 a 47,47 0 0 1 2.185001,0.559997 l -1.900083,6.737187 a 40,40 0 0 0 -1.8595758,-0.476594 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1015"\r
       d="m 12.362467,-45.345004 a 47,47 0 0 1 2.161332,0.645348 l -2.163119,6.657395 a 40,40 0 0 0 -1.839431,-0.549232 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1017"\r
       d="m 14.133173,-44.824697 a 47,47 0 0 1 2.134329,0.729704 l -2.42282,6.56734 a 40,40 0 0 0 -1.81645,-0.621025 z" />\r
    <path\r
       style="fill:#81c784"\r
       id="path1019"\r
       d="m 15.882086,-44.235273 a 47,47 0 0 1 2.104035,0.812935 l -2.678784,6.467157 a 40,40 0 0 0 -1.790668,-0.69186 z" />\r
    <path\r
       style="fill:#8cbb7e"\r
       id="path1021"\r
       d="m 17.60651,-43.577641 a 47,47 0 0 1 2.070498,0.894912 l -2.930618,6.357002 a 40,40 0 0 0 -1.762126,-0.761627 z" />\r
    <path\r
       style="fill:#97af79"\r
       id="path1023"\r
       d="m 19.303786,-42.852816 a 47,47 0 0 1 2.033767,0.975509 l -3.177933,6.237046 a 40,40 0 0 0 -1.730866,-0.830221 z" />\r
    <path\r
       style="fill:#a2a474"\r
       id="path1025"\r
       d="m 20.971297,-42.061915 a 47,47 0 0 1 1.993901,1.054603 l -3.420348,6.107472 a 40,40 0 0 0 -1.696937,-0.897534 z" />\r
    <path\r
       style="fill:#ad986f"\r
       id="path1027"\r
       d="m 22.606472,-41.206158 a 47,47 0 0 1 1.950961,1.13207 l -3.65749,5.968481 a 40,40 0 0 0 -1.660392,-0.963463 z" />\r
    <path\r
       style="fill:#b88d6a"\r
       id="path1029"\r
       d="m 24.20679,-40.286863 a 47,47 0 0 1 1.905011,1.207791 l -3.888992,5.820288 a 40,40 0 0 0 -1.621286,-1.027908 z" />\r
    <path\r
       style="fill:#c38164"\r
       id="path1031"\r
       d="m 25.769782,-39.305449 a 47,47 0 0 1 1.856125,1.28165 l -4.114497,5.663119 a 40,40 0 0 0 -1.579681,-1.090766 z" />\r
    <path\r
       style="fill:#ce755f"\r
       id="path1033"\r
       d="m 27.293039,-38.263429 a 47,47 0 0 1 1.804377,1.353533 l -4.333658,5.497219 a 40,40 0 0 0 -1.53564,-1.151944 z" />\r
    <path\r
       style="fill:#d96a5a"\r
       id="path1035"\r
       d="m 28.774212,-37.16241 a 47,47 0 0 1 1.749846,1.42333 l -4.546136,5.322841 a 40,40 0 0 0 -1.489231,-1.211344 z" />\r
    <path\r
       style="fill:#e45e55"\r
       id="path1037"\r
       d="m 30.211018,-36.004089 a 47,47 0 0 1 1.692617,1.490931 L 27.15203,-29.3729 a 40,40 0 0 0 -1.440526,-1.268878 z" />\r
    <path\r
       style="fill:#ef5350"\r
       id="path1039"\r
       d="m 31.60124,-34.790252 a 47,47 0 0 1 1.632779,1.556233 l -4.949748,4.949748 a 40,40 0 0 0 -1.389599,-1.324454 z" />\r
  </g>\r
  <g\r
     id="g1059"\r
     transform="translate(41.355339,52)">\r
    <g\r
       id="g1045"\r
       transform="rotate(-45,-60.355339,25)">\r
      <text\r
         id="text1043"\r
         class="temperature">{{controlPanelDetails.configuration.operatingFreeAirTemperatureLimitLow}}</text>\r
    </g>\r
    <g\r
       id="g1049"\r
       transform="rotate(-22.5,-125.68349,25)">\r
      <text\r
         id="text1047"\r
         class="temperature">{{controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalLow}}</text>\r
    </g>\r
    <g\r
       id="g1053"\r
       transform="rotate(22.5,125.68349,25)">\r
      <text\r
         id="text1051"\r
         class="temperature">{{controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalHigh}}</text>\r
    </g>\r
    <g\r
       id="g1057"\r
       transform="rotate(45,60.355339,25)">\r
      <text\r
         id="text1055"\r
         class="temperature">{{controlPanelDetails.configuration.operatingFreeAirTemperatureLimitHigh}}</text>\r
    </g>\r
  </g>\r
  <path class="gauge-needle" *ngIf="rotateValue"\r
     id="rect1069" [ngStyle]="{'transform':'rotate('+rotateValue+'deg)'}"\r
     d="m 41.414529,7.0017912 0.894152,37.9855318 c -0.366465,0.987318 -1.520664,1.005328 -1.906683,-0.08165 z"\r
     style="fill:#0A2A5A;fill-opacity:1;stroke-width:1.35598433" />\r
</svg>\r
<div class="temperature-value">{{degreeValue || 'NaN'}}<span>&deg;C</span></div>\r
</div>`;var Zt=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .temperature-container{position:relative}:host .temperature-container svg{width:90%;height:auto;max-width:215px;max-height:100px}:host .temperature-container svg .gauge-needle{transform-origin:50% 100%}:host .temperature-container .temperature{text-anchor:middle;font-weight:500;font-size:5px}:host .temperature-container .temperature-value{position:absolute;font-size:1.2rem;bottom:0rem;left:0}:host .temperature-container .temperature-value span{font-size:.672rem}
`;var ti=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Ce=class{systemService;controlPanelDetails;currentTemperature;visibleComponent=!1;degreeValue=0;rotateValue=0;criticDegree=25;limitDegree=48;constructor(e){this.systemService=e}ngOnInit(){this.updateTemperature()}ngOnChanges(e){e.currentTemperature&&this.updateTemperature()}updateTemperature(){if(this.currentTemperature!==null&&this.currentTemperature!==void 0){let e,t,i;this.degreeValue=this.currentTemperature,this.currentTemperature>this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalLow&&this.currentTemperature<this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalHigh?(e=this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalHigh-this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalLow,t=2*this.criticDegree/e,i=(this.currentTemperature-this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalLow)*t-this.criticDegree):this.currentTemperature>this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalHigh?(e=this.controlPanelDetails.configuration.operatingFreeAirTemperatureLimitHigh-this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalHigh,t=(this.limitDegree-this.criticDegree)/e,i=(this.currentTemperature-this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalHigh)*t+this.criticDegree):this.currentTemperature>this.controlPanelDetails.configuration.operatingFreeAirTemperatureLimitLow&&(e=this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalLow-this.controlPanelDetails.configuration.operatingFreeAirTemperatureLimitLow,t=(this.limitDegree-this.criticDegree)/e,i=((this.controlPanelDetails.configuration.operatingFreeAirTemperatureCriticalLow-this.currentTemperature)*t+this.criticDegree)*-1),i>this.limitDegree&&(i=this.limitDegree),i<this.limitDegree*-1&&(i=this.limitDegree*-1),this.rotateValue=i,this.visibleComponent=!0}else this.visibleComponent=!1}static ctorParameters=()=>[{type:v}];static propDecorators={controlPanelDetails:[{type:l}],currentTemperature:[{type:l}]}};Ce=ti([d({selector:"armon-terminal-control-panel-temperature",template:Jt,standalone:!0,imports:[u,ae],styles:[Zt]})],Ce);var en=`<div class="card mb-3">\r
	<ng-container [ngSwitch]="viewState">\r
		<ng-container *ngSwitchCase="1">\r
			<div class="card-block p-2">\r
\r
				<div class="card-title mb-4">{{item.name}}</div>\r
\r
				<div class="d-flex flex-column mb-2">\r
					<span class="text-sm">{{'TERMINAL.INTEGRATION_LOCATION' |\xA0translate}}</span>\r
					<span class="text-sm text-bold">{{item.location}}</span>\r
				</div>\r
				<div class="d-flex flex-column mb-2">\r
					<span class="text-sm">{{'TERMINAL.INTEGRATION_MODEL' |\xA0translate}}</span>\r
					<span class="text-sm text-bold">{{item.model}}</span>\r
				</div>\r
				<div class="d-flex flex-column mb-2">\r
					<span class="text-sm">{{'TERMINAL.INTEGRATION_SERIALNUMBER' |\xA0translate}}</span>\r
					<span class="text-sm text-bold">{{item.serialNumber}}</span>\r
				</div>\r
				<div class="d-flex flex-column mb-2">\r
					<span class="text-sm">{{'TERMINAL.INTEGRATION_TYPE' |\xA0translate}}</span>\r
					<span class="text-sm text-bold">{{item.typeName}}</span>\r
				</div>\r
\r
				<span *ngIf="item.hikvisionSettings">\r
\r
					<div class="d-flex flex-column mb-2">\r
						<span class="text-sm">{{'TERMINAL.INTEGRATION_HIKVISION_ADDRESS' |\xA0translate}}</span>\r
						<span class="text-sm text-bold">{{item.hikvisionAddress}}</span>\r
					</div>\r
\r
					<div class="d-flex flex-column mb-2">\r
						<span class="text-sm">{{'TERMINAL.INTEGRATION_HIKVISION_IMAGE_SIZE' |\xA0translate}}</span>\r
						<span class="text-sm text-bold">{{item.hikvisionImageSize |\xA0translate}}</span>\r
					</div>\r
\r
					<div class="d-flex flex-column mb-2">\r
						<span class="text-sm">{{'TERMINAL.INTEGRATION_HIKVISION_UPLOAD_IMAGE' |\xA0translate}}</span>\r
						<span class="text-sm text-bold">\r
							{{(item.hikvisionSettings.uploadImage ? 'TERMINAL.INTEGRATION_HIKVISION_UPLOAD_ACTIVE' : 'TERMINAL.INTEGRATION_HIKVISION_UPLOAD_PASSIVE') |\xA0translate}}\r
						</span>\r
					</div>\r
				</span>\r
\r
			</div>\r
		</ng-container>\r
		<ng-container *ngSwitchCase="2">\r
			<div class="card-block p-2">\r
				<div class="card-title mb-4">{{'CAMERA.ACTION_MAPPING'|translate}}</div>\r
				<ng-container *ngFor="let action of item.cameraActions">\r
					<div class="d-flex flex-column mb-2">\r
						<span class="text-sm">{{'CAMERA.ACTION_TYPE' |\xA0translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.type==1">{{'CAMERA.AUTHENTICATION'|translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.type==2">{{'CAMERA.SENSOR'|translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.type==3">{{'CAMERA.REMOTE_ACCESS'|translate}}</span>\r
					</div>\r
					<div class="d-flex flex-column mb-2" *ngIf="action.direction || action.direction==0">\r
						<span class="text-sm">{{'CAMERA.DIRECTION' |\xA0translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.direction==0">{{'DIRECTIONTYPE.BOTH' | translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.direction==1">{{'DIRECTIONTYPE.ENTRANCE' | translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.direction==2">{{'DIRECTIONTYPE.EXIT' | translate}}</span>\r
					</div>\r
					<div class="d-flex flex-column mb-2" *ngIf="action.result">\r
						<span class="text-sm">{{'CAMERA.ACCESS_RESULT' |\xA0translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.result==1">{{'REPORT.ACCESS_LOGS_STATUS_ALL' | translate}}</span>\r
						<span class="text-sm text-bold" *ngIf="action.result==2">{{'REPORT.ACCESS_LOGS_STATUS_SUCCESSFUL' | translate}}\r
						</span>\r
						<span class="text-sm text-bold" *ngIf="action.result==3">{{'REPORT.ACCESS_LOGS_STATUS_FAILED' | translate}}</span>\r
					</div>\r
				</ng-container>\r
			</div>\r
		</ng-container>\r
	</ng-container>\r
</div>`;var tn="";var oi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},xe=class{item;viewState=1;constructor(){}ngOnInit(){this.item.cameraActions?this.viewState=2:this.viewState=1}ngOnDestroy(){}static ctorParameters=()=>[];static propDecorators={item:[{type:l}]}};xe=oi([d({selector:"armon-terminal-control-panel-integration-item",template:en,standalone:!0,imports:[V,G,u,I,p],styles:[tn]})],xe);var nn=`<div [ngClass]="{'itemBorder': showBorder}" class="p-2">

  <div class="d-flex flex-column">
    <div class="d-flex" [ngClass]="{'mainItem': item.controlPanelIsGateWay}">
      <cds-icon shape="pencil" style="width: 12px; height: 12px;" class="editIcon" *ngIf="isEditable" (click)="onEditClicked($event)"></cds-icon>
      <div class="flex-grow-1"><span class="text-sm text -bold">{{typeDefinition | translate}}</span></div>
      <div class="d-flex">
        <span *ngIf="!isIntegrationItem" class="extensionItem cursor-pointer" [ngClass]="{'mainItem': item.controlPanelIsGateWay}"
          (click)="onShowOnPanelRequested($event)">
          <cds-icon shape="eye" size="sm" class="me-1"></cds-icon>
          <span class="text-sm me-1">#{{inputNumber}}</span>
        </span>
        <input type="checkbox" [(ngModel)]="selected" />
      </div>
    </div>

    <div class="d-flex flex-column">
      <span *ngIf="isIntegrationItem" class="extensionItem" [ngClass]="{'mainItem': item.controlPanelIsGateWay}">
        <span nz-tooltip
          nzTooltipTitle="{{integrationTooltipKey | translate:integrationTooltipData}}">#{{inputNumber}}</span>
      </span>
    </div>
  </div>
  <div class="d-flex flex-column mb-4">
    <span class="text-sm text-bold" *ngIf="title">{{title | translate:item}}</span>
    <span class="text-sm" *ngFor="let info of infoList">{{info}}</span>
  </div>

  <span class="subItemsOfRelay">
    <div *ngFor="let item of readersOfRelay">
      <armon-terminal-control-panel-item [item]="item" [type]="2" [title]="item.name" [inputNumber]="item.number"
        [infoField]="'infoList'" (showOnPanelRequested)="sendShowOnPanelRequest($event)">
      </armon-terminal-control-panel-item>
    </div>

    <div *ngFor="let item of exitButtonsOfRelay">
      <armon-terminal-control-panel-item [item]="item" [type]="4" [inputNumber]="item.number" [infoField]="'infoList'"
        (showOnPanelRequested)="sendShowOnPanelRequest($event)"></armon-terminal-control-panel-item>
    </div>

    <div *ngFor="let item of counterSensorsOfRelay">
      <armon-terminal-control-panel-item [item]="item" [title]="item.name" [type]="3" [inputNumber]="item.number"
        [infoField]="'infoList'" (showOnPanelRequested)="sendShowOnPanelRequest($event)">
      </armon-terminal-control-panel-item>
    </div>

    <div *ngFor="let item of statusSensorsOfRelay">
      <armon-terminal-control-panel-item [item]="item" [title]="item.name" [type]="1" [inputNumber]="item.number"
        [infoField]="'infoList'" (showOnPanelRequested)="sendShowOnPanelRequest($event)">
      </armon-terminal-control-panel-item>
    </div>

    <div *ngFor="let item of plateReaderLanes">
      <armon-terminal-control-panel-item [item]="item" [title]="item.name" [type]="5" [inputNumber]="item.number"
        [infoField]="'infoList'" (showOnPanelRequested)="onShowOnPanelRequested($event)">
      </armon-terminal-control-panel-item>
    </div>

    <div *ngFor="let item of gateWayAntennas">
      <armon-terminal-control-panel-item [item]="item" [title]="item.name" [type]="6" [inputNumber]="item.number"
        [infoField]="'infoList'" (showOnPanelRequested)="onShowOnPanelRequested($event)">
      </armon-terminal-control-panel-item>
    </div>
  </span>

</div>`;var on=`.itemBorder{border:1px solid rgb(235,235,235);border-radius:9px}.mainItem{color:#0a2a5a!important}.extensionItem{color:#4caf50}.editIcon{margin-right:4px;cursor:pointer}.subItemsOfRelay>div{margin-left:12px}
`;var si=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},te=class{translate;modalService;interactionService;item;type;title;inputNumber;mappingItem;selectable;showBorder;infoField;showOnPanelRequested=new f;infoList=[];checkboxSelection;subscriptionSelectionCancelled;get selected(){return this.checkboxSelection}set selected(e){this.checkboxSelection=e,this.checkChangeOnSelection()}get isIntegrationItem(){return this.type===c.PlateReaderLane||this.type===c.GateWayAntenna}get integrationTooltipKey(){switch(this.type){case c.GateWayAntenna:return"CONNECTIONS.TYPE_GATEWAY_ANTENNA_INPUT_TOOLTIP";case c.PlateReaderLane:return"CONNECTIONS.TYPE_PLATE_READER_LANE_INPUT_TOOLTIP";default:return""}}get integrationTooltipData(){return{number:this.inputNumber}}constructor(e,t,i){this.translate=e,this.modalService=t,this.interactionService=i}get typeDefinition(){switch(this.type){case c.Relay:return"CONNECTIONS.TYPE_RELAY";case c.WiegandReader:return"CONNECTIONS.TYPE_WIEGAND_READER";case c.ExitButton:return"CONNECTIONS.TYPE_EXIT_BUTTON";case c.StatusSensor:return"CONNECTIONS.TYPE_STATUS_SENSOR";case c.CounterSensor:return"CONNECTIONS.TYPE_COUNTER_SENSOR";case c.PlateReaderLane:return"CONNECTIONS.TYPE_PLATE_READER_LANE";case c.GateWayAntenna:return"CONNECTIONS.TYPE_GATEWAY_ANTENNA";default:break}}get readersOfRelay(){return this.type===c.Relay?this.item.readers||[]:[]}get exitButtonsOfRelay(){return this.type===c.Relay?this.item.exitButtons||[]:[]}get counterSensorsOfRelay(){return this.type===c.Relay?this.item.counterSensors||[]:[]}get statusSensorsOfRelay(){return this.type===c.Relay?this.item.statusSensors||[]:[]}get plateReaderLanes(){return this.type===c.Relay?this.item.plateReaderLanes||[]:[]}get gateWayAntennas(){return this.type===c.Relay?this.item.gateWayAntennas||[]:[]}get isEditable(){return this.type!==c.ExitButton}ngOnInit(){this.initializeSubscriptions(),this.updateInfoList()}ngOnDestroy(){this.subscriptionSelectionCancelled.unsubscribe()}onShowOnPanelRequested(e){this.sendShowOnPanelRequest({type:this.type,number:this.inputNumber,item:this.item})}onEditClicked(e){let t;switch(this.type){case c.Relay:t=C.ControlPanelRelay;break;case c.WiegandReader:t=C.ControlPanelWiegandReader;break;case c.StatusSensor:t=C.ControlPanelStatusSensor;break;case c.CounterSensor:t=C.ControlPanelCounterSensor;break;case c.PlateReaderLane:t=C.ControlPanelPlateReaderLane;break;case c.GateWayAntenna:t=C.ControlPanelGateWayAntenna;break;default:break}this.modalService.open(ee,{settings:{size:"md"},props:{controlPanel:this.item,title:this.title,type:t}}).result.then(i=>{i&&this.item&&this.item.id===i.id&&(Ye(i,this.item),this.updateInfoList())}).catch(i=>{})}initializeSubscriptions(){this.subscriptionSelectionCancelled=this.interactionService.onControlPanelMappingSelectionCancelled.subscribe(e=>{e.findIndex(t=>t===this.item.id)>=0&&(this.selected=!1)})}sendShowOnPanelRequest(e){this.showOnPanelRequested.emit(e)}checkChangeOnSelection(){this.selected!==null&&this.selected!==void 0&&this.item&&(this.sendSelectionChangedInfo(this.item.id,this.type),this.type===c.Relay&&(this.item.readers&&this.item.readers.forEach(e=>{this.sendSelectionChangedInfo(e.id,c.WiegandReader)}),this.item.exitButtons&&this.item.exitButtons.forEach(e=>{this.sendSelectionChangedInfo(e.id,c.ExitButton)}),this.item.counterSensors&&this.item.counterSensors.forEach(e=>{this.sendSelectionChangedInfo(e.id,c.CounterSensor)}),this.item.statusSensors&&this.item.statusSensors.forEach(e=>{this.sendSelectionChangedInfo(e.id,c.StatusSensor)}),this.item.plateReaderLanes&&this.item.plateReaderLanes.forEach(e=>{this.sendSelectionChangedInfo(e.id,c.PlateReaderLane)}),this.item.gateWayAntennas&&this.item.gateWayAntennas.forEach(e=>{this.sendSelectionChangedInfo(e.id,c.GateWayAntenna)})))}sendSelectionChangedInfo(e,t){let i=this.item.accessControlPointBasic!==null&&this.item.accessControlPointBasic!==void 0&&this.item.accessControlPointBasic.id;this.interactionService.informMappingSelectionChanged(i?this.item.accessControlPointBasic.id:null,i?this.item.accessControlPointBasic.name:"",e,t,this.selected,!this.mappingItem)}updateInfoList(){this.item&&this.item[this.infoField]&&this.translate.get(this.item[this.infoField],this.item).subscribe(e=>{this.infoList=[],this.item[this.infoField].forEach(t=>{this.infoList.push(e[t]||"")})})}static ctorParameters=()=>[{type:W},{type:R},{type:g}];static propDecorators={item:[{type:l}],type:[{type:l}],title:[{type:l}],inputNumber:[{type:l}],mappingItem:[{type:l}],selectable:[{type:l}],showBorder:[{type:l}],infoField:[{type:l}],showOnPanelRequested:[{type:h}]}};te=si([d({selector:"armon-terminal-control-panel-item",template:nn,standalone:!0,imports:[A,u,k,Y,I,p],styles:[on]})],te);var an=`<div class="card mt-3">\r
\r
  <div class="card-header ps-3 pe-3 pt-2 pb-2">\r
    {{matching.accessControlPointName}}\r
  </div>\r
\r
  <div class="card-block">\r
\r
    <!-- Relays -->\r
    <div *ngFor="let item of matching.relays">\r
      <armon-terminal-control-panel-item [item]="item" [type]="0" [title]="item.name" [inputNumber]="item.number"\r
        [selectable]="true" [infoField]="'infoList'" [mappingItem]="true"\r
        (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>\r
    </div>\r
\r
    <!-- Wiegand Readers -->\r
    <div *ngFor="let item of matching.readers">\r
      <armon-terminal-control-panel-item [item]="item" [type]="2" [title]="item.name"\r
        [inputNumber]="item.number" [selectable]="true" [infoField]="'infoList'" [mappingItem]="true"\r
        (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>\r
    </div>\r
\r
    <!-- Exit Buttons -->\r
    <div *ngFor="let item of matching.exitButtons">\r
      <armon-terminal-control-panel-item [item]="item" [type]="4" [inputNumber]="item.number" [selectable]="true"\r
        [infoField]="'infoList'" [mappingItem]="true" (showOnPanelRequested)="onShowOnPanelRequested($event)">\r
      </armon-terminal-control-panel-item>\r
    </div>\r
\r
    <!-- Status Sensors -->\r
    <div *ngFor="let item of matching.statusSensors">\r
      <armon-terminal-control-panel-item [item]="item" [type]="1" [title]="item.name"\r
        [inputNumber]="item.number" [selectable]="true" [infoField]="'infoList'" [mappingItem]="true"\r
        (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>\r
    </div>\r
\r
    <!-- Counter Sensors -->\r
    <div *ngFor="let item of matching.counterSensors">\r
      <armon-terminal-control-panel-item [item]="item" [type]="3" [title]="item.name"\r
        [inputNumber]="item.number" [selectable]="true" [infoField]="'infoList'" [mappingItem]="true"\r
        (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>\r
    </div>\r
\r
    <!-- Plate Reader Lanes -->\r
    <div *ngFor="let item of matching.plateReaderLanes">\r
      <armon-terminal-control-panel-item [item]="item" [type]="5" [title]="item.name" [inputNumber]="item.number"\r
        [selectable]="true" [infoField]="'infoList'" [mappingItem]="true"\r
        (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>\r
    </div>\r
\r
    <!-- Gateaway Antennas -->\r
    <div *ngFor="let item of matching.gateWayAntennas">\r
      <armon-terminal-control-panel-item [item]="item" [type]="6" [title]="item.name" [inputNumber]="item.number"\r
        [selectable]="true" [infoField]="'infoList'" [mappingItem]="true"\r
        (showOnPanelRequested)="onShowOnPanelRequested($event)"></armon-terminal-control-panel-item>\r
    </div>\r
\r
  </div>\r
\r
</div>`;var rn="";var mi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},ye=class{matching;showOnPanelRequested=new f;constructor(){}ngOnInit(){}onShowOnPanelRequested(e){this.showOnPanelRequested.emit(e)}static ctorParameters=()=>[];static propDecorators={matching:[{type:l}],showOnPanelRequested:[{type:h}]}};ye=mi([d({selector:"armon-terminal-control-panel-access-control-point-matching",template:an,standalone:!0,imports:[I,te],styles:[rn]})],ye);var di=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Ie=class extends _{translate;controlPanelService;interactionService;modalService;terminal;controlPanelList=[];controlPanelTitle;selectionMapping=[];selectionUnmapping=[];mainControlPanel;selectedControlPanel;tabMatchedControlPoints=!0;tabUnmatchedControlPoints=!1;tabIntegrationSettings=!1;terminalTemperature;subscriptionMappingSelection;visibleBoard=!1;constructor(e,t,i,o){super(),this.translate=e,this.controlPanelService=t,this.interactionService=i,this.modalService=o}get currentControlPanel(){return this.selectedControlPanel}set currentControlPanel(e){this.selectedControlPanel=e,this.interactionService.cancelShowInputOnControlPanel()}onTabChanged(e){this.clearMappingSelections()}onModalInitialized(){super.onModalInitialized(),this.setSubscriptions(),this.getDetails(this.terminal)}onModalDestroyed(){super.onModalDestroyed(),this.subscriptionMappingSelection.unsubscribe()}onCancelClicked(e){e&&e.stopPropagation(),this.closeModal(this.mainControlPanel)}onShowOnPanelRequested(e){if(e)try{let t=this.controlPanelList.find(i=>i.deviceId===e.item.controlPanelId);t&&(this.currentControlPanel=t,this.interactionService.showInputOnControlPanel(e.type,e.number,e.item.controlPanelId,e.item.controlPanelIsGateWay))}catch{}}onEditClicked(e){this.translate.get(this.mainControlPanel.nameWithCaption,{name:this.mainControlPanel.settings.name,caption:this.mainControlPanel.configuration.caption}).subscribe(t=>{this.modalService.open(ee,{settings:{size:"md"},props:{controlPanel:this.mainControlPanel,title:t,type:C.ControlPanel}}).result.then(i=>{this.mainControlPanel&&this.mainControlPanel.deviceId===i.deviceId&&(this.mainControlPanel.settings.name=i.settings.name,this.mainControlPanel.settings.location=i.settings.location,this.updateTitle())}).catch(i=>{})})}onMapSelectionRequested(e){this.selectionMapping&&this.selectionMapping.length>0&&this.modalService.open(ve,{settings:{size:"md"},props:{controlPanel:this.mainControlPanel}}).result.then(t=>{let i=this.createMappingRequest(this.selectionMapping,t.id,t.name);this.sendMappingRequest(i,!0)}).catch(t=>{})}onUnmapSelectionRequested(e){if(this.selectionUnmapping&&this.selectionUnmapping.length>0){let t=this.createMappingRequest(this.selectionUnmapping);this.sendMappingRequest(t,!1)}}onCancelSelectionRequested(e){this.interactionService.informMappingSelectionCancelled(e?this.selectionMapping.map(t=>t.itemId):this.selectionUnmapping.map(t=>t.itemId))}setSubscriptions(){this.subscriptionMappingSelection=this.interactionService.onControlPanelMappingChanged.subscribe(e=>{this.updateMappings(e)})}getDetails(e){switch(e.brand){case se.Armon:switch(e.model){case z.ArmonV10:case z.ArmonV6:case z.ArmonV7:case z.ArmonVPass:this.controlPanelService.getDetailsOfArmonOne(e.id).subscribe(t=>{this.detailsLoaded(t,e)});break;default:this.visibleBoard=!0,e.backendApiVersion=="v2"?this.controlPanelService.getDetailsOfControlPanel(e.id).subscribe(t=>{this.detailsLoaded(t,e)}):this.controlPanelService.getDetailsOfControlPanelV2(e.id).subscribe(t=>{this.detailsLoaded(t,e)});break}break;case se.AssaAbloy:switch(e.model){case z.AssaAbloyAH40:this.controlPanelService.getDetailsOfAperioAH40(e.id).subscribe(t=>{this.detailsLoaded(t,e)});break}case se.HikVision:switch(e.model){case z.HikVisionDSK1T606MF:this.controlPanelService.getDetailsOfHikVision(e.id).subscribe(t=>{this.detailsLoaded(t,e)});break}}}detailsLoaded(e,t){this.mainControlPanel=e,this.setControlPanelList(),this.updateTitle(),this.currentControlPanel=this.mainControlPanel,this.terminalTemperature=t.temperature}setControlPanelList(){let e=[];if(this.mainControlPanel){if(e.push(this.mainControlPanel),this.mainControlPanel.extensionControlPanels){for(let t of this.mainControlPanel.extensionControlPanels)t.isGateWay=!1,t.description="CONTROLPANEL.EXTENSION";Xe(this.mainControlPanel.extensionControlPanels,"number"),e.push(...this.mainControlPanel.extensionControlPanels)}this.mainControlPanel.locks&&(this.mainControlPanel.locks.forEach((t,i)=>{t.isGateWay=!1,t.number=i+1,t.description="CONTROLPANEL.LOCK"}),e.push(...this.mainControlPanel.locks))}this.controlPanelList=e}updateTitle(){this.mainControlPanel&&this.translate.get(this.mainControlPanel.nameWithCaption,{name:this.mainControlPanel.settings.name,caption:this.mainControlPanel.configuration.caption?this.mainControlPanel.configuration.caption:""}).subscribe(e=>{this.controlPanelTitle=e})}updateMappings(e){let t=e.forMapping?this.selectionMapping:this.selectionUnmapping;e.isSelected?t.push(e):Me(t,"itemId",e.itemId),e.forMapping?this.selectionMapping=t:this.selectionUnmapping=t}clearMappingSelections(){this.selectionMapping=[],this.selectionUnmapping=[]}createMappingRequest(e,t,i){let o=[];return e.forEach(n=>{let a=n.accessControlPointId||t,s=n.accessControlPointName||i,N=o.findIndex(b=>b.accessControlPointId===a);if(N<0){let b=new st;b.accessControlPointId=a,b.accessControlPointName=s,o.push(b),N=o.length-1}n.forMapping?o[N].addToMappingList(n.itemId,n.type):o[N].addToUnmappingList(n.itemId,n.type)}),o}sendMappingRequest(e,t){e.forEach(i=>{this.controlPanelService.updateAccessControlPointMapping(i).subscribe(()=>{t?this.mappingRequestCompleted(i):this.unmappingRequestCompleted(i)})})}mappingRequestCompleted(e){let t=this.mainControlPanel.matches.find(y=>y.accessControlPointId===e.accessControlPointId);if(!t){let y=new rt;y.accessControlPointId=e.accessControlPointId,y.accessControlPointName=e.accessControlPointName,this.mainControlPanel.matches.push(y),t=this.mainControlPanel.matches[this.mainControlPanel.matches.length-1]}let i=this.moveMatchingItems(e.mappedRelayIds,e,this.mainControlPanel.unmatches.relays,t.relays,!1,c.Relay);this.mainControlPanel.unmatches.relays=i.source,t.relays=i.target;let o=this.moveMatchingItems(e.mappedWiegandReaderIds,e,this.mainControlPanel.unmatches.readers,t.readers,!1,c.WiegandReader);this.mainControlPanel.unmatches.readers=o.source,t.readers=o.target;let n=this.moveMatchingItems(e.mappedExitButtonIds,e,this.mainControlPanel.unmatches.exitButtons,t.exitButtons,!1,c.ExitButton);this.mainControlPanel.unmatches.exitButtons=n.source,t.exitButtons=n.target;let a=this.moveMatchingItems(e.mappedStatusSensorIds,e,this.mainControlPanel.unmatches.statusSensors,t.statusSensors,!1,c.StatusSensor);this.mainControlPanel.unmatches.statusSensors=a.source,t.statusSensors=a.target;let s=this.moveMatchingItems(e.mappedCounterSensorIds,e,this.mainControlPanel.unmatches.counterSensors,t.counterSensors,!1,c.CounterSensor);this.mainControlPanel.unmatches.counterSensors=s.source,t.counterSensors=s.target;let N=this.moveMatchingItems(e.mappedHikVisionLicencePlateReaderLaneId,e,this.mainControlPanel.unmatches.plateReaderLanes,t.plateReaderLanes,!1,c.PlateReaderLane);this.mainControlPanel.unmatches.plateReaderLanes=N.source,t.plateReaderLanes=N.target;let b=this.moveMatchingItems(e.mappedImpinjSpeedWayGateWayAntennaId,e,this.mainControlPanel.unmatches.gateWayAntennas,t.gateWayAntennas,!1,c.GateWayAntenna);this.mainControlPanel.unmatches.gateWayAntennas=b.source,t.gateWayAntennas=b.target,this.clearMappingSelections()}unmappingRequestCompleted(e){let t=this.mainControlPanel.matches.find(i=>i.accessControlPointId===e.accessControlPointId);if(t){let i=this.moveMatchingItems(e.unmappedRelayIds,e,t.relays,this.mainControlPanel.unmatches.relays,!0,c.Relay);t.relays=i.source,this.mainControlPanel.unmatches.relays=i.target;let o=this.moveMatchingItems(e.unmappedWiegandReaderIds,e,t.readers,this.mainControlPanel.unmatches.readers,!0,c.WiegandReader);t.readers=o.source,this.mainControlPanel.unmatches.readers=o.target;let n=this.moveMatchingItems(e.unmappedExitButtonIds,e,t.exitButtons,this.mainControlPanel.unmatches.exitButtons,!0,c.ExitButton);t.exitButtons=n.source,this.mainControlPanel.unmatches.exitButtons=n.target;let a=this.moveMatchingItems(e.unmappedStatusSensorIds,e,t.statusSensors,this.mainControlPanel.unmatches.statusSensors,!0,c.StatusSensor);t.statusSensors=a.source,this.mainControlPanel.unmatches.statusSensors=a.target;let s=this.moveMatchingItems(e.unmappedCounterSensorIds,e,t.counterSensors,this.mainControlPanel.unmatches.counterSensors,!0,c.CounterSensor);t.counterSensors=s.source,this.mainControlPanel.unmatches.counterSensors=s.target;let N=this.moveMatchingItems(e.unmappedHikVisionLicencePlateReaderLaneId,e,t.plateReaderLanes,this.mainControlPanel.unmatches.plateReaderLanes,!0,c.PlateReaderLane);t.plateReaderLanes=N.source,this.mainControlPanel.unmatches.plateReaderLanes=N.target;let b=this.moveMatchingItems(e.unmappedImpinjSpeedWayGateWayAntennaId,e,t.gateWayAntennas,this.mainControlPanel.unmatches.gateWayAntennas,!0,c.GateWayAntenna);t.gateWayAntennas=b.source,this.mainControlPanel.unmatches.gateWayAntennas=b.target,t.relays.length===0&&t.readers.length===0&&t.exitButtons.length===0&&t.statusSensors.length===0&&t.counterSensors.length===0&&t.plateReaderLanes.length===0&&t.gateWayAntennas.length===0&&Me(this.mainControlPanel.matches,"accessControlPointId",t.accessControlPointId)}this.clearMappingSelections()}moveMatchingItems(e,t,i,o,n,a){return e&&e.length>0&&e.forEach(s=>{let N=i.findIndex(b=>b.id===s);if(N>=0){let b=null;n||(b=new tt,b.id=t.accessControlPointId,b.name=t.accessControlPointName);let y=i.splice(N,1)[0];y.accessControlPointBasic=b,a===c.Relay&&(y.readers&&y.readers.forEach(P=>{P.accessControlPointBasic=b}),y.exitButtons&&y.exitButtons.forEach(P=>{P.accessControlPointBasic=b}),y.counterSensors&&y.counterSensors.forEach(P=>{P.accessControlPointBasic=b}),y.statusSensors&&y.statusSensors.forEach(P=>{P.accessControlPointBasic=b}),y.plateReaderLanes&&y.plateReaderLanes.forEach(P=>{P.accessControlPointBasic=b}),y.gateWayAntennas&&y.gateWayAntennas.forEach(P=>{P.accessControlPointBasic=b})),o.push(y)}}),{source:i,target:o}}static ctorParameters=()=>[{type:W},{type:Z},{type:g},{type:R}];static propDecorators={terminal:[{type:l}]}};Ie=di([d({selector:"armon-terminal-control-panel-detailed-modal",template:Bt,standalone:!0,imports:[u,vt,I,ye,te,xe,k,ae,de,Ce,be,p],styles:[qt]})],Ie);var sn=`<div class="modal-header">\r
	<span class="text-lg">{{terminal.name}}</span>\r
</div>\r
\r
<div class="modal-body mhs-20">\r
	<!-- FINGER PRINT -->\r
	<armon-terminal-action-finger-print #terminalAction (actionStateChanged)="onActionStateChanged($event)"\r
		(controlsClicked)="onControlsClicked($event)" (navigationStarted)="onNavigationStarted($event)"\r
		*ngIf="fingerPrintAction" [action]="fingerPrintAction" [terminalId]="terminal.id" />\r
\r
	<!-- EMERGENCY -->\r
	<armon-terminal-action-emergency #terminalAction (actionStateChanged)="onActionStateChanged($event)"\r
		(controlsClicked)="onControlsClicked($event)" (settingsChanged)="onSettingsChanged($event)" *ngIf="emergency"\r
		[action]="emergency" [terminalId]="terminal.id" [isEmergency]="terminal.isEmergency" />\r
\r
	<!-- RESTART -->\r
	<armon-terminal-action-restart #terminalAction (actionStateChanged)="onActionStateChanged($event)"\r
		(controlsClicked)="onControlsClicked($event)" (navigationStarted)="onNavigationStarted($event)"\r
		*ngIf="restartAction" [action]="restartAction" [terminalId]="terminal.id" />\r
\r
	<!-- SOFTWARE UPDATE -->\r
	<armon-terminal-action-software-update #terminalAction (actionStateChanged)="onActionStateChanged($event)"\r
		(controlsClicked)="onControlsClicked($event)" (navigationStarted)="onSettingsChanged($event)"\r
		*ngIf="softwareUpdateInterfaceAction" [action]="softwareUpdateInterfaceAction" [terminal]="terminal" />\r
\r
	<!-- SERVER CONNECTION -->\r
	<armon-terminal-action-server-connection #terminalAction (actionStateChanged)="onActionStateChanged($event)"\r
		(controlsClicked)="onControlsClicked($event)" (navigationStarted)="onSettingsChanged($event)"\r
		*ngIf="serverConnectionAction" [action]="serverConnectionAction" [terminal]="terminal" />\r
\r
	<!-- SYNC TERMINAL, not action -->\r
	<armon-terminal-action-sync #terminalAction (actionStateChanged)="onActionStateChanged($event)"\r
		(controlsClicked)="onControlsClicked($event)" (navigationStarted)="onSettingsChanged($event)"\r
		[terminalId]="terminal.id" />\r
</div>\r
<div class="modal-footer">\r
	<button class="btn btn-primary" (click)="onCancelClicked($event)" [disabled]="disabledClose">{{'BUTTON.CLOSE' |\r
		translate}}</button>\r
</div>`;var ln="";var cn=`<div class="terminal-action-container">
	<div class="terminal-action-icon">
		<cds-icon shape="download-cloud" size="md"></cds-icon>
	</div>
	<div class="terminal-action-controls" [attr.controls]="visibleControls" (click)="onControlsClicked($event)">
		<span class="terminal-action-title">{{'TERMINAL.SYNC_WITH_SERVER'|translate}}</span>
		<div [hidden]="!visibleControls">
			<div class="text-45rem my-3">{{'TERMINAL.SYNC_WITH_SERVER_DIRECTION'|translate}}</div>
			<div>
				<button class="btn btn-sm btn-primary" (click)="onStartClicked($event)">{{'BUTTON.START' |
					translate}}</button>
			</div>
		</div>
	</div>
</div>`;var mn=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .disabled-control{pointer-events:none;opacity:.7}:host .info-area{padding:12px;background-color:#fafafa;text-align:center;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}
`;var gi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},w=class{controlsClicked=new f;terminalAction;visibleControls=!1;onControlsClicked(e){this.visibleControls==!1&&(this.visibleControls=!0,this.controlsClicked.emit(this.terminalAction))}hideControls(){this.visibleControls=!1}static propDecorators={controlsClicked:[{type:h}]}};w=gi([Ge()],w);var vi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Te=class extends w{interactionService;systemService;terminalId;action;actionStateChanged=new f;navigationStarted=new f;constructor(e,t){super(),this.interactionService=e,this.systemService=t}ngOnInit(){this.terminalAction=this.action.type}ngOnDestroy(){}onStartClicked(e){this.actionStateChanged.emit(!0),this.startAction()}afterProcess(){this.actionStateChanged.emit(!1)}startAction(){let e=me.getEmptyModel();e.applyToAll=!1,e.terminalIds=[this.terminalId],this.systemService.startTerminalSync(e).subscribe({next:t=>{this.interactionService.showMessage("TERMINAL.SYNC_WITH_SERVER_STARTED",null,S.Success),this.afterProcess(),this.navigationStarted.emit()},error:t=>{this.afterProcess()}})}static ctorParameters=()=>[{type:g},{type:v}];static propDecorators={terminalId:[{type:l}],action:[{type:l}],actionStateChanged:[{type:h}],navigationStarted:[{type:h}]}};Te=vi([d({selector:"armon-terminal-action-sync",template:cn,standalone:!0,imports:[p],styles:[mn]})],Te);var dn=`<div class="terminal-action-container">
	<div class="terminal-action-icon">
		<cds-icon shape="network-settings" size="md"></cds-icon>
	</div>
	<div class="terminal-action-controls" [attr.controls]="visibleControls" (click)="onControlsClicked($event)">
		<div class="d-flex justify-content-between align-items-center">
			<span class="terminal-action-title">{{'TERMINAL.SERVER_CONNECTION'|translate}}</span>
			<armon-icon-label [colorCode]="7" *ngIf="terminal.serverConnectionState==serverConnectionCommand.Connect">
				<ng-template icon-label-icon>
					<cds-icon shape="network-settings"></cds-icon>
				</ng-template>
				<ng-template icon-label-content>
					<span>{{'TERMINAL.SERVER_CONNECTION_OPENED'|translate}}</span>
				</ng-template>
			</armon-icon-label>
			<armon-icon-label [colorCode]="6"
				*ngIf="terminal.serverConnectionState==serverConnectionCommand.Disconnect">
				<ng-template icon-label-icon>
					<cds-icon shape="network-settings"></cds-icon>
				</ng-template>
				<ng-template icon-label-content>
					<span>{{'TERMINAL.SERVER_CONNECTION_CLOSED'|translate}}</span>
				</ng-template>
			</armon-icon-label>
		</div>
		<div [hidden]="!visibleControls">
			<div class="text-45rem my-3">{{'TERMINAL.SERVER_CONNECTION_DIRECTION'|translate}}</div>
			<div>
				<button class="btn btn-sm btn-primary"
					(click)="onActionClicked($event)">{{(terminal.serverConnectionState==serverConnectionCommand.Connect?'TERMINAL.SERVER_CONNECTION_CLOSE':
					'TERMINAL.SERVER_CONNECTION_OPEN') |
					translate}}</button>
			</div>
		</div>
	</div>
</div>`;var pn=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .disabled-control{pointer-events:none;opacity:.7}:host .info-area{padding:12px;background-color:#fafafa;text-align:center;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}
`;var xi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Ee=class extends w{interactionService;systemService;terminal;action;actionStateChanged=new f;navigationStarted=new f;serverConnectionCommand=oe;constructor(e,t){super(),this.interactionService=e,this.systemService=t}ngOnInit(){this.terminalAction=this.action.type}ngOnDestroy(){}onActionClicked(e){this.actionStateChanged.emit(!0),this.startAction()}afterProcess(){this.actionStateChanged.emit(!1)}startAction(){this.systemService.actionChangeServerConnection(this.terminal.id,this.terminal.serverConnectionState==oe.Connect?oe.Disconnect:oe.Connect).subscribe({next:e=>{this.interactionService.showMessage("TERMINAL.SERVER_CONNECTION_CHANGED",null,S.Success),this.afterProcess(),this.navigationStarted.emit()},error:e=>{this.afterProcess()}})}static ctorParameters=()=>[{type:g},{type:v}];static propDecorators={terminal:[{type:l}],action:[{type:l}],actionStateChanged:[{type:h}],navigationStarted:[{type:h}]}};Ee=xi([d({selector:"armon-terminal-action-server-connection",template:dn,standalone:!0,imports:[u,fe,pe,ue,p],styles:[pn]})],Ee);var un=`<div class="terminal-action-container">
	<div class="terminal-action-icon">
		<cds-icon shape="display" size="md"></cds-icon>
	</div>
	<div class="terminal-action-controls" [attr.controls]="visibleControls" (click)="onControlsClicked($event)">
		<div class="d-flex justify-content-between align-items-center">
			<span class="terminal-action-title">{{'TERMINAL.SOFTWARE_UPDATE'|translate}}</span>
			<armon-icon-label [colorCode]="7"
				*ngIf="terminal.softwareUpdateInterfaceState==softwareUpdateInterfaceState.Enable">
				<ng-template icon-label-icon>
					<cds-icon shape="display"></cds-icon>
				</ng-template>
				<ng-template icon-label-content>
					<span>{{'TERMINAL.SOFTWARE_UPDATE_CONNECTED'|translate}}</span>
				</ng-template>
			</armon-icon-label>
			<armon-icon-label [colorCode]="6"
				*ngIf="terminal.softwareUpdateInterfaceState==softwareUpdateInterfaceState.Disable">
				<ng-template icon-label-icon>
					<cds-icon shape="display"></cds-icon>
				</ng-template>
				<ng-template icon-label-content>
					<span>{{'TERMINAL.SOFTWARE_UPDATE_DISCONNECTED'|translate}}</span>
				</ng-template>
			</armon-icon-label>
		</div>
		<div [hidden]="!visibleControls">
			<div class="text-45rem my-3">{{'TERMINAL.SOFTWARE_UPDATE_DIRECTION'|translate}}</div>
			<div>
				<button class="btn btn-sm btn-primary"
					(click)="onActionClicked($event)">{{(terminal.softwareUpdateInterfaceState==softwareUpdateInterfaceState.Enable?'TERMINAL.SOFTWARE_UPDATE_DISCONNECT':
					'TERMINAL.SOFTWARE_UPDATE_CONNECT') |
					translate}}</button>
			</div>
		</div>
	</div>
</div>`;var fn=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .disabled-control{pointer-events:none;opacity:.7}:host .info-area{padding:12px;background-color:#fafafa;text-align:center;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}
`;var Ti=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Se=class extends w{interactionService;systemService;terminal;action;actionStateChanged=new f;navigationStarted=new f;softwareUpdateInterfaceState=ie;constructor(e,t){super(),this.interactionService=e,this.systemService=t}ngOnInit(){this.terminalAction=this.action.type}ngOnDestroy(){}onActionClicked(e){this.actionStateChanged.emit(!0),this.startAction()}afterProcess(){this.actionStateChanged.emit(!1)}startAction(){this.systemService.actionChangeSoftwareUpdate(this.terminal.id,this.terminal.softwareUpdateInterfaceState==ie.Enable?ie.Disable:ie.Enable).subscribe({next:e=>{this.interactionService.showMessage("TERMINAL.SOFTWARE_UPDATE_CHANGED",null,S.Success),this.afterProcess(),this.navigationStarted.emit()},error:e=>{this.afterProcess()}})}static ctorParameters=()=>[{type:g},{type:v}];static propDecorators={terminal:[{type:l}],action:[{type:l}],actionStateChanged:[{type:h}],navigationStarted:[{type:h}]}};Se=Ti([d({selector:"armon-terminal-action-software-update",template:un,standalone:!0,imports:[u,fe,pe,ue,p],styles:[fn]})],Se);var hn=`<div class="terminal-action-container">
	<div class="terminal-action-icon">
		<cds-icon shape="sync" size="md"></cds-icon>
	</div>
	<div class="terminal-action-controls" [attr.controls]="visibleControls" (click)="onControlsClicked($event)">
		<span class="terminal-action-title">{{'TERMINAL.RESTART'|translate}}</span>
		<div [hidden]="!visibleControls">
			<div class="text-45rem my-3">{{'TERMINAL.RESTART_DIRECTION'|translate}}</div>
			<div>
				<button class="btn btn-sm btn-danger"
					(click)="onStartClicked($event)">{{'TERMINAL.RESTART_BUTTON' | translate}}</button>
			</div>
		</div>
	</div>
</div>`;var gn=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .disabled-control{pointer-events:none;opacity:.7}:host .info-area{padding:12px;background-color:#fafafa;text-align:center;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}
`;var _i=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},_e=class extends w{interactionService;systemService;terminalId;action;actionStateChanged=new f;navigationStarted=new f;constructor(e,t){super(),this.interactionService=e,this.systemService=t}ngOnInit(){this.terminalAction=this.action.type}ngOnDestroy(){}onStartClicked(e){this.interactionService.showDialog("TERMINAL.RESTART","TERMINAL.RESTART_CONFIRMATION",null,null,!0,"TERMINAL.RESTART_BUTTON","",!0,()=>{this.actionStateChanged.emit(!0),this.startAction()})}afterProcess(){this.actionStateChanged.emit(!1)}startAction(){this.systemService.actionRestart(this.terminalId).subscribe(e=>{this.interactionService.showMessage("TERMINAL.RESTART_STARTED",null,S.Success),this.afterProcess(),this.navigationStarted.emit()},e=>{this.afterProcess()})}static ctorParameters=()=>[{type:g},{type:v}];static propDecorators={terminalId:[{type:l}],action:[{type:l}],actionStateChanged:[{type:h}],navigationStarted:[{type:h}]}};_e=_i([d({selector:"armon-terminal-action-restart",template:hn,standalone:!0,imports:[p],styles:[gn]})],_e);var vn=`<div class="terminal-action-container">
	<div class="terminal-action-icon">
		<cds-icon shape="emergency" size="md"></cds-icon>
	</div>
	<div class="terminal-action-controls" [attr.controls]="visibleControls" (click)="onControlsClicked($event)">
		<span class="terminal-action-title">{{'TERMINAL.EMERGENCY'|translate}}</span>
		<div [hidden]="!visibleControls">
			<div class="text-45rem my-3">{{'TERMINAL.EMERGENCY_DIRECTION'|translate}}</div>
			<div>
				<button class="btn btn-sm btn-danger" *ngIf="!isEmergency"
					(click)="onStartClicked($event)">{{'TERMINAL.EMERGENCY_START_BUTTON' | translate}}</button>
				<button class="btn btn-sm btn-danger" *ngIf="isEmergency"
					(click)="onEndClicked($event)">{{'TERMINAL.EMERGENCY_END_BUTTON' | translate}}</button>
			</div>
		</div>
	</div>
</div>`;var bn=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .disabled-control{pointer-events:none;opacity:.7}:host .info-area{padding:12px;background-color:#fafafa;text-align:center;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}
`;var Ni=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},ke=class extends w{interactionService;systemService;terminalId;isEmergency;action;actionStateChanged=new f;settingsChanged=new f;constructor(e,t){super(),this.interactionService=e,this.systemService=t}ngOnInit(){this.terminalAction=this.action.type}ngOnDestroy(){}onStartClicked(e){this.interactionService.showDialog("TERMINAL.EMERGENCY","TERMINAL.EMERGENCY_START_CONFIRMATION",null,null,!0,"TERMINAL.EMERGENCY_START_BUTTON","",!0,()=>{this.actionStateChanged.emit(!0),this.startAction()})}onEndClicked(e){this.interactionService.showDialog("TERMINAL.EMERGENCY","TERMINAL.EMERGENCY_END_CONFIRMATION",null,null,!0,"TERMINAL.EMERGENCY_END_BUTTON","",!0,()=>{this.actionStateChanged.emit(!0),this.endAction()})}startAction(){this.systemService.actionStartEmergency(this.terminalId).subscribe(e=>{this.afterProcess(),this.settingsChanged.emit()},e=>{this.afterProcess()})}endAction(){this.systemService.actionEndEmergency(this.terminalId).subscribe(e=>{this.afterProcess(),this.settingsChanged.emit()},e=>{this.afterProcess()})}afterProcess(){this.actionStateChanged.emit(!1)}static ctorParameters=()=>[{type:g},{type:v}];static propDecorators={terminalId:[{type:l}],isEmergency:[{type:l}],action:[{type:l}],actionStateChanged:[{type:h}],settingsChanged:[{type:h}]}};ke=Ni([d({selector:"armon-terminal-action-emergency",template:vn,standalone:!0,imports:[u,p],styles:[bn]})],ke);var Cn=`<div class="terminal-action-container">
	<div class="terminal-action-icon">
		<cds-icon shape="credential_fingerprint" size="md"></cds-icon>
	</div>
	<div class="terminal-action-controls" [attr.controls]="visibleControls" (click)="onControlsClicked($event)">
		<span class="terminal-action-title">{{'CREDENTIALTYPE.ADD_FINGER_PRINT'|translate}}</span>
		<div [hidden]="!visibleControls">
			<div class="form-group">
				<label class="required">{{'IDENTITY.TITLE' | translate : languageService.userTranslate}}</label>
				<armon-identity-search #searchIdentity class="custom-item" [multiselect]="false"
					[ngClass]="{'disabled-control': viewState==2}" (itemSelected)="onUserSelected($event)"
					(itemRemoved)="onUserRemoved()">
				</armon-identity-search>
			</div>
			<div class="form-group">
				<label class="required">{{'CREDENTIAL.TITLE_FINGER_PRINT_SELECTION'|translate}}</label>
				<armon-finger-selection-input id="finger-input" class="custom-item"
					style="max-width: 160px; width: 160px;" [ngClass]="{'disabled-control': viewState==2}"
					[(ngModel)]="selectedFinger" [activeFingers]="userFingers"
					(ngModelChange)="onFingerChanged($event)">
				</armon-finger-selection-input>
			</div>
			<div class="info-area">
				<ng-container [ngSwitch]="viewState">
					<!-- INITIAL STATE -->
					<ng-container *ngSwitchCase="1">
						<cds-icon shape="info-circle" class="mb-2" size="md"></cds-icon>
						<span
							class="text-45rem my-2">{{'CREDENTIALTYPE.ADD_FINGER_PRINT_INFO'|translate}}</span>
						<button class="btn btn-sm btn-primary me-0" (click)="onStartClicked($event)"
							[disabled]="disabledStart">{{'BUTTON.START' | translate}}</button>
					</ng-container>

					<!-- PROGRESS STATE -->
					<ng-container *ngSwitchCase="2">
						<div class="result-area">
							<div>
								<img class="result-image" *ngIf="imageSource" [src]="imageSource">
							</div>
							<div class="result-info-area">
								<span class="spinner-border spinner-border-sm mb-3"></span>
								<span class="text-55rem mb-2"
									*ngIf="selectedIdentity">{{selectedIdentity.fullname}}</span>
								<span
									class="text-45rem my-2">{{'CREDENTIALTYPE.ADD_FINGER_PRINT_PROGRESS'|translate:selectedIdentity}}</span>
							</div>
						</div>
					</ng-container>

					<!-- RESPONSE STATE -->

					<ng-container *ngSwitchCase="3">
						<div class="result-area">
							<div>
								<img class="result-image" *ngIf="imageSource" [src]="imageSource">
							</div>
							<div class="result-info-area">
								<cds-icon shape="success-standard" solid class="color-success mb-2" size="md">
								</cds-icon>
								<span
									class="text-45rem my-2">{{'CREDENTIALTYPE.ADD_COMPLETED'|translate}}</span>
								<armon-captionlines *ngIf="response && response.userCaptions" [showBorder]="false"
									[captionlines]="response.userCaptions"></armon-captionlines>
								<button class="btn btn-sm btn-link"
									(click)="onACPPermissionsClicked($event)">{{'IDENTITY.EDIT_ACCESS_RIGHTS' | translate}}</button>
							</div>
						</div>
					</ng-container>
					<ng-container *ngSwitchCase="4">
						<cds-icon shape="error-standard" solid class="color-error mb-2" size="md"></cds-icon>
						<span class="text-55rem color-error">{{'CREDENTIALTYPE.ADD_FAILED'|translate}}</span>
						<span class="text-45rem mt-2 mb-2 color-error"
							*ngIf="errorText">{{errorText|translate}}</span>
						<button class="btn btn-sm btn-primary me-0"
							(click)="onResetClicked($event)">{{'BUTTON.OK' | translate}}</button>
					</ng-container>
				</ng-container>
			</div>
		</div>
	</div>
</div>`;var xn=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .disabled-control{pointer-events:none;opacity:.7}:host .info-area{padding:12px;min-height:150px;background-color:#fafafa;text-align:center;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}:host .info-area .result-area{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 768px){:host .info-area .result-area{-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}}:host .info-area .result-area .result-image{height:120px;min-height:120px;width:auto;background-color:#999;border:2px solid #999}@media screen and (max-width: 768px){:host .info-area .result-area .result-image{height:60px;min-height:60px}}:host .info-area .result-area .result-info-area{padding:12px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-grow:1;-webkit-box-flex:1;-moz-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}
`;var Pi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},we=class extends w{interactionService;systemService;credentialService;languageService;sanitizer;modalService;terminalId;action;actionStateChanged=new f;navigationStarted=new f;viewState=1;selectedIdentity;selectedFinger=null;userFingers;response;imageSource;errorText;snapshotTimer;disabledStart=!0;constructor(e,t,i,o,n,a){super(),this.interactionService=e,this.systemService=t,this.credentialService=i,this.languageService=o,this.sanitizer=n,this.modalService=a}ngOnInit(){this.terminalAction=this.action.type}ngOnDestroy(){this.stopSnapShotTimer()}validate(){this.disabledStart=this.selectedIdentity==null||this.selectedFinger==null}checkCredentials(){let e=De.getEmptyModel();e.userIds=[this.selectedIdentity.id],e.pagination.skip=0,e.pagination.take=100,this.credentialService.list(De.getRequestModel(e),!1).subscribe(t=>{let i=[];t.items.forEach(o=>{et.getCredentialIsFingerPrint(o.credentialType)&&i.push(o.data)}),this.userFingers=i})}onUserSelected(e){this.selectedIdentity=e,this.checkCredentials(),this.validate()}onUserRemoved(){this.selectedIdentity=null,this.userFingers=[],this.resetView(),this.validate()}onFingerChanged(e){this.validate(),this.resetView()}onStartClicked(e){this.actionStateChanged.emit(!0),this.userFingers.findIndex(t=>t==this.selectedFinger)>-1?this.interactionService.showDialog("CREDENTIALTYPE.ADD_FINGER_PRINT","CREDENTIALTYPE.ADD_FINGER_PRINT_CONFIRMATION",null,null,!0,"BUTTON.START","",!1,()=>{this.startAction()},()=>{this.actionStateChanged.emit(!1)}):this.startAction()}afterProcess(){this.actionStateChanged.emit(!1),this.stopSnapShotTimer()}resetView(){this.viewState=1,this.response=null,this.stopSnapShotTimer(),this.imageSource=null}captureSnapshot(){this.systemService.captureSnapshot(this.terminalId).subscribe(e=>{this.imageSource=this.sanitizer.bypassSecurityTrustResourceUrl("data:image/jpeg;base64,"+e)},e=>{})}stopSnapShotTimer(){this.snapshotTimer&&clearInterval(this.snapshotTimer)}startAction(){this.viewState=2,this.captureSnapshot(),this.snapshotTimer=setInterval(this.captureSnapshot.bind(this),5e3);let e=pt.getEmptyModel();e.userId=this.selectedIdentity.id,e.finger=this.selectedFinger,e.credentialType=$e.FingerPrintISO19794,this.systemService.actionFingerPrint(this.terminalId,e,!1).subscribe(t=>{t&&t.success?(this.interactionService.showMessage("CREDENTIALTYPE.ADD_COMPLETED",null,S.Success),this.response=t,this.viewState=3):(this.interactionService.showMessage("CREDENTIALTYPE.ADD_FAILED",null,S.Error),this.errorText="CREDENTIALTYPE.ADD_FINGER_PRINT_ERROR_"+t.failReason,this.viewState=4),this.afterProcess()},t=>{this.interactionService.showMessage("CREDENTIALTYPE.ADD_FAILED",null,S.Error),this.viewState=4,this.afterProcess()})}onACPPermissionsClicked(e){this.modalService.open(St,{settings:{size:"xl",scrollable:!0,centered:!1},props:{identityId:this.selectedIdentity.id,page:"accessrights"}}),this.navigationStarted.emit()}onResetClicked(e){this.resetView()}static ctorParameters=()=>[{type:g},{type:v},{type:_t},{type:q},{type:Be},{type:R}];static propDecorators={terminalId:[{type:l}],action:[{type:l}],actionStateChanged:[{type:h}],navigationStarted:[{type:h}]}};we=Pi([d({selector:"armon-terminal-action-finger-print",template:Cn,standalone:!0,imports:[Rt,A,Et,k,V,G,u,F,p],styles:[xn]})],we);var Oi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Ne=class extends _{authService;terminal;terminalActions;disabledClose=!1;fingerPrintAction;restartAction;emergency;softwareUpdateInterfaceAction;serverConnectionAction;constructor(e){super(),this.authService=e}onModalInitialized(){super.onModalInitialized(),this.fingerPrintAction=this.terminal.availableActions.find(e=>e.type==$.FingerPrintCapture),this.restartAction=this.terminal.availableActions.find(e=>e.type==$.Restart),this.authService.checkPermission(E.SYSTEM.getEmergency())&&(this.emergency=this.terminal.availableActions.find(e=>e.type==$.Emergency)),this.softwareUpdateInterfaceAction=this.terminal.availableActions.find(e=>e.type==$.SoftwareUpdateInterface),this.serverConnectionAction=this.terminal.availableActions.find(e=>e.type==$.ServerConnection)}onActionStateChanged(e){this.disabledClose=e}onNavigationStarted(e){this.onCancelClicked(e)}onSettingsChanged(e){this.closeModal()}onControlsClicked(e){this.terminalActions.forEach(t=>{e!=t.terminalAction&&t.hideControls()})}static ctorParameters=()=>[{type:K}];static propDecorators={terminal:[{type:l}],terminalActions:[{type:Ve,args:["terminalAction"]}]}};Ne=Oi([d({selector:"armon-terminal-action-modal",template:sn,standalone:!0,imports:[u,we,ke,_e,Se,Ee,Te,p],styles:[ln]})],Ne);var yn=`<div class="modal-header">
	<div class="d-flex flex-column">
		<span class="text-lg">{{'COMMON.MANAGERS'|translate}}</span>
		<span class="text-sm fw-medium" *ngIf="terminal && terminal.name">{{terminal.name}}</span>
	</div>
</div>
<div class="modal-body d-flex flex-column mhs-25 bg-color-background">
	<div class="mb-1" *ngIf="hasUserRightWrite">
		<button class="btn btn-sm btn-primary"
			(click)="onAddManagerClicked($event)">{{'COMMON.ADD_MANAGER'|translate}}</button>
	</div>
	<div class="terminal-managers-items px-1 my-1 modal-scroll-area-40 overflow-y-auto">
		<ng-container *ngIf="managers">
			<ng-container *ngFor="let manager of managers">
				<ng-template *ngTemplateOutlet="managerTemplate;context: {$implicit:manager}">
				</ng-template>
			</ng-container>
			<div *ngIf="isLoading==false && managers.length == 0" class="d-flex flex-column">
				<nz-empty [nzNotFoundContent]="contentTpl" [nzNotFoundImage]="'./assets/images/empty/search_user.png'"
					class="my-5">
					<ng-template #contentTpl>
						<span>{{'TERMINAL.NO_MANAGER_INFO'|translate}}</span>
					</ng-template>
				</nz-empty>
				<div class="alert alert-warning mt-5 text-center" role="alert">
					<span>{{'TERMINAL.NO_MANAGER_ALERT' | translate}}</span><span class="ms-1"
						*ngIf="hasUserRightWrite">{{'TERMINAL.ADD_MANAGER_ALERT'|translate}}</span>
				</div>
			</div>
		</ng-container>
	</div>
	<div>
		<armon-pagination [paginationResponse]="paginationResponse" [scrollDomId]="'terminal-managers-items'"
			(pageChanged)="pageChanged($event)"></armon-pagination>
	</div>
</div>
<div class="modal-footer">
	<button class="btn btn-outline-primary" (click)="onCloseClicked($event)">{{'BUTTON.CLOSE' | translate}}</button>
</div>

<!-- TEMPLATES -->
<ng-template #managerTemplate let-manager>
	<div class="row rounded-2 bg-white border border-1 my-3 mx-0">
		<div class="col-12 p-3">
			<armon-captionlines *ngIf="manager.userCaptions" [showBorder]="false" [captionlines]="manager.userCaptions">
			</armon-captionlines>
		</div>
		<div class="col-12 b-t-1 px-4 py-2">
			<span class="text-md">{{'TERMINAL.USER_RIGHTS' | translate}}</span>
			<div class="d-flex text-sm">
				<span class="comma me-1" *ngIf="manager.userRights.read">{{'TERMINAL.USER_RIGHT_READ'|translate}}</span>
				<span class="comma me-1"
					*ngIf="manager.userRights.write">{{'TERMINAL.USER_RIGHT_WRITE'|translate}}</span>
				<span class="comma me-1"
					*ngIf="manager.userRights.notify">{{'TERMINAL.USER_RIGHT_NOTIFY'|translate}}</span>
			</div>
		</div>
		<div class="col-12 p-3 d-flex justify-content-end" *ngIf="hasUserRightWrite">
			<button class="btn btn-sm btn-outline-danger me-2"
				(click)="onDeleteManagerClicked(manager)">{{'BUTTON.DELETE' | translate}}</button>
			<button class="btn btn-sm btn-outline-primary" (click)="onEditManagerClicked(manager)">{{'BUTTON.EDIT' |
				translate}}</button>
		</div>
	</div>
</ng-template>`;var In=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var Tn=`<div class="modal-header">
	<div class="d-flex flex-column">
		<span class="text-lg">{{(isEdit ? 'COMMON.EDIT_MANAGER' : 'COMMON.ADD_MANAGER') | translate}}</span>
		<span class="text-sm fw-medium" *ngIf="terminal?.name">{{terminal.name}}</span>
	</div>
</div>
<div class="modal-body">
	<div class="row">
		<div class="col-12">
			<ng-container *ngIf="isEdit">
				<armon-captionlines *ngIf="manager.userCaptions" [showBorder]="false"
					[captionlines]="manager.userCaptions"></armon-captionlines>
			</ng-container>
			<ng-container *ngIf="!isEdit">
				<div class="form-group">
					<label>{{'IDENTITY.TITLE' | translate : languageService.userTranslate}}</label>
					<armon-select-search query="identity" [(ngModel)]="manager.userId" [searchFilters]="searchFilters"
						(ngModelChange)="onModalChanged($event)">
					</armon-select-search>
					<div class="invalid-feedback d-block" *ngIf="!manager.userId">
						{{'VALIDATION.REQUIRED'|translate}}
					</div>
				</div>
			</ng-container>
		</div>
		<div class="col-12 my-3">
			<label>{{'TERMINAL.USER_RIGHTS' | translate}}</label>
			<div class="invalid-feedback d-block"
				*ngIf="manager.userRights.read==false && manager.userRights.write==false && manager.userRights.notify==false">
				{{'VALIDATION.MIN_ONE_SELECTED'|translate}}
			</div>
		</div>
		<div class="col-12">
			<div class="form-group">
				<div class="form-check">
					<input id="readInput" type="checkbox" [(ngModel)]="manager.userRights.read" name="readInput"
						(ngModelChange)="onModalChanged($event)" class="form-check-input"
						[disabled]="manager.userRights.write==true || manager.userRights.notify==true">
					<label class="form-check-label cursor-pointer" for="readInput">{{'TERMINAL.USER_RIGHT_READ' |
						translate}}</label>
				</div>
			</div>
		</div>
		<div class="col-12">
			<div class="form-group">
				<div class="form-check">
					<input id="writeInput" type="checkbox" [(ngModel)]="manager.userRights.write" name="writeInput"
						(ngModelChange)="onModalChanged($event)" class="form-check-input"
						[disabled]="mustWrite || !hasSystemWrite">
					<label class="form-check-label cursor-pointer" for="writeInput">{{'TERMINAL.USER_RIGHT_WRITE' |
						translate}}</label>
				</div>
				<small *ngIf="mustWrite" class="text-xs text-italic">
					{{'TERMINAL.FIRST_MANAGER_WRITE'|translate}}
				</small>
				<small *ngIf="!hasSystemWrite && manager.userId" class="text-xs text-italic">
					{{'TERMINAL.SYSTEM_WRITE_REQUIRED'|translate}}
				</small>
			</div>
		</div>
		<div class="col-12">
			<div class="form-group">
				<div class="form-check">
					<input id="notifyInput" type="checkbox" [(ngModel)]="manager.userRights.notify" name="notifyInput"
						(ngModelChange)="onModalChanged($event)" class="form-check-input">
					<label class="form-check-label cursor-pointer" for="notifyInput">{{'TERMINAL.USER_RIGHT_NOTIFY'
						| translate}}</label>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="modal-footer">
	<button class="btn btn-outline-primary me-2" (click)="onCancelClicked($event)">{{'BUTTON.CANCEL' |
		translate}}</button>
	<button class="btn btn-primary" (click)="onSaveClicked($event)" [disabled]="disableSaveButton">{{'BUTTON.SAVE' |
		translate}}</button>
</div>`;var En=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var zi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Ae=class extends _{languageService;identityService;systemService;terminal;manager;mustWrite;isEdit;disableSaveButton=!0;hasSystemWrite=!1;hasSystemRead=!1;searchFilters={permissions:[E.SYSTEM.getRead(),E.SYSTEM.getWrite()]};constructor(e,t,i){super(),this.languageService=e,this.identityService=t,this.systemService=i}onModalInitialized(){super.onModalInitialized(),this.isEdit=this.manager.userId&&this.manager.userId!="",this.mustWrite==!0?(this.manager.userRights.write=!0,this.searchFilters={permissions:[E.SYSTEM.getWrite()]}):this.searchFilters={permissionsOr:[E.SYSTEM.getRead(),E.SYSTEM.getWrite()]},this.isEdit&&this.onIdentityChanged(null),this.validate()}validate(){return(this.manager.userRights.write||this.manager.userRights.notify)&&(this.manager.userRights.read=!0),this.disableSaveButton=!this.manager.userId||this.manager.userId==""||this.manager.userRights.read==!1&&this.manager.userRights.write==!1&&this.manager.userRights.notify==!1,!this.disableSaveButton}upsertManager(){let e=mt.getEmptyModel(this.manager.userId);e.userRights=this.manager.userRights,this.systemService.upsertTerminalManager(this.terminal.id,e).subscribe(t=>{this.closeModal(t)})}onModalChanged(e){this.onIdentityChanged(null)}onIdentityChanged(e){if(this.manager.userId){let t=new ot;t.permissions=[E.SYSTEM.getRead(),E.SYSTEM.getWrite()],this.identityService.queryIdentityPermissions(this.manager.userId,t).subscribe(i=>{this.hasSystemRead=i.permissions[E.SYSTEM.getRead()]?i.permissions[E.SYSTEM.getRead()]:!1,this.hasSystemWrite=i.permissions[E.SYSTEM.getWrite()]?i.permissions[E.SYSTEM.getWrite()]:!1,this.hasSystemWrite==!1&&(this.manager.userRights.write=!1),this.validate()})}}onSaveClicked(e){this.validate&&this.upsertManager()}static ctorParameters=()=>[{type:q},{type:ht},{type:v}];static propDecorators={terminal:[{type:l}],manager:[{type:l}],mustWrite:[{type:l}]}};Ae=zi([d({selector:"armon-terminal-manager-upsert-modal",template:Tn,standalone:!0,imports:[u,F,X,k,p],styles:[En]})],Ae);var Ui=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Re=class extends _{systemService;authService;interactionService;terminal;request;paginationResponse=new H;isLoading=!0;managers;hasUserRightWrite=!1;constructor(e,t,i){super(),this.systemService=e,this.authService=t,this.interactionService=i}onModalInitialized(){super.onModalInitialized(),this.hasUserRightWrite=this.terminal&&this.terminal.userRights&&this.terminal.userRights.write&&this.authService.checkPermission(E.IDENTITY.getReadBasic()),this.request=ct.getEmptyModel(),this.getManagers()}getManagers(){this.isLoading=!0,this.managers=[],this.systemService.getTerminalManagerList(this.terminal.id,this.request).subscribe(e=>{this.managers=e.items,this.paginationResponse=e.pagination,this.isLoading=!1})}pageChanged(e){this.request.pagination=e,this.getManagers()}showUpsertModal(e,t=!1){this.hasUserRightWrite&&this.modalService.open(Ae,{settings:{size:"md"},props:{terminal:this.terminal,manager:e,mustWrite:this.managers.length==0}}).result.then(i=>{this.getManagers(),i.userId==this.sessionService.currentUserId&&i.userRights.write==!1&&this.closeModal()}).catch(i=>{})}onAddManagerClicked(e){this.hasUserRightWrite&&this.showUpsertModal(ce.getEmptyModel())}onEditManagerClicked(e){if(!this.hasUserRightWrite)return;let t=ce.getEmptyModel();t.createInstance(ne(e),ce,t),this.showUpsertModal(t,!0)}onDeleteManagerClicked(e){this.hasUserRightWrite&&this.interactionService.showDialog("COMMON.DELETE_MANAGER","TERMINAL.DELETE_MANAGER_INFO",null,null,!0,"BUTTON.DELETE","BUTTON.CANCEL",!0,()=>{this.systemService.deleteTerminalManager(e.userTerminalRightId).subscribe(t=>{e.userId==this.sessionService.currentUserId?this.closeModal():this.getManagers()})})}onCloseClicked(e){this.closeModal()}static ctorParameters=()=>[{type:v},{type:K},{type:g}];static propDecorators={terminal:[{type:l}]}};Re=Ui([d({selector:"armon-terminal-managers-modal",template:yn,standalone:!0,imports:[u,I,M,Q,J,F,p],styles:[In]})],Re);var Sn=`<div class="modal-header">
	<div class="d-flex flex-column">
		<span class="text-lg">{{'TERMINAL.CHANGES'|translate}}</span>
		<span class="text-sm fw-medium" *ngIf="terminal && terminal.name">{{terminal.name}}</span>
	</div>
</div>
<div class="modal-body d-flex flex-column mhs-25 mxh-vh-70" id="terminal-changes-items">
	<div class="px-1">
		<ng-container *ngIf="changes">
			<ng-container *ngFor="let change of changes">
				<ng-template *ngTemplateOutlet="changeTemplate;context: {$implicit:change}">
				</ng-template>
			</ng-container>
			<div *ngIf="changes && changes.length == 0" class="d-flex flex-column">
				<nz-empty [nzNotFoundContent]="contentTpl" class="my-5">
					<ng-template #contentTpl>
						<span>{{'TERMINAL.NO_CHANGES_INFO'|translate}}</span>
					</ng-template>
				</nz-empty>
			</div>
		</ng-container>
	</div>
	<div class="mt-3">
		<armon-pagination [paginationResponse]="paginationResponse" [scrollDomId]="'terminal-changes-items'"
			(pageChanged)="pageChanged($event)"></armon-pagination>
	</div>
</div>
<div class="modal-footer">
	<button class="btn btn-outline-primary" (click)="onCloseClicked($event)">{{'BUTTON.CLOSE' | translate}}</button>
</div>

<!-- TEMPLATES -->
<ng-template #changeTemplate let-change>
	<div class="row shadow-box-1 rnd-1 my-3 mx-0">
		<div class="col-12 px-2 py-2 d-flex align-items-stretch">
			<div class="d-flex justify-content-center p-2 me-2 b-r-1">
				<cds-icon shape="sync" class="color-gray"></cds-icon>
			</div>
			<div class="d-flex flex-column flex-grow-1 justify-content-center mx-2">
				<div class="d-flex flex-md-row flex-column align-items-center">
					<span class="text-sm color-primary">{{change.typeDefinition.description | translate}}</span>
					<span class="text-xs text-italic ms-auto">{{change.actiondate | date:'medium'}}</span>
				</div>
				<ng-container *ngIf="change.data">
					<div class="d-flex flex-column mt-2 b-t-1 py-2">
						<!-- Credential -->
						<div class="d-flex align-items-center mb-2" *ngIf="change.data.type">
							<cds-icon [attr.shape]="change.data.icon" class="me-2 color-gray"></cds-icon>
							<span class="text-sm">{{change.data.name|translate}}</span>
							<span class="text-sm ms-2">({{change.data.data}})</span>
						</div>
						<!-- Access Control Point -->
						<div class="d-flex align-items-center mb-2" *ngIf="change.data.accessPointName">
							<cds-icon shape="login" class="me-2 color-gray"></cds-icon>
							<span class="text-sm">{{change.data.accessPointName}}</span>
						</div>
						<!-- Group -->
						<div class="d-flex align-items-center mb-2" *ngIf="change.data.groupName">
							<cds-icon shape="users" class="me-2 color-gray"></cds-icon>
							<span class="text-sm">{{change.data.groupName}}</span>
						</div>
						<!-- Region -->
						<div class="d-flex align-items-center mb-2" *ngIf="change.data.regionName">
							<cds-icon shape="region" class="me-2 color-gray"></cds-icon>
							<span class="text-sm">{{change.data.regionName}}</span>
						</div>
						<!-- User Caption Lines -->
						<armon-captionlines *ngIf="change.data.user" [showBorder]="false"
							[captionlines]="change.data.user">
						</armon-captionlines>
					</div>
				</ng-container>
			</div>
		</div>
	</div>
</ng-template>`;var _n=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var Wi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Pe=class extends _{systemService;terminal;request;paginationResponse=new H;changes;hasUserRightWrite=!1;constructor(e){super(),this.systemService=e}ngOnInit(){this.request=ut.getEmptyModel(),this.getChanges()}getChanges(){this.systemService.getTerminalChangesList(this.terminal.id,this.request).subscribe(e=>{this.changes=e.items,this.paginationResponse=e.pagination})}pageChanged(e){this.request.pagination=e,this.getChanges()}onCloseClicked(e){this.closeModal(this.paginationResponse?this.paginationResponse.total:null)}static ctorParameters=()=>[{type:v}];static propDecorators={terminal:[{type:l}]}};Pe=Wi([d({selector:"armon-terminal-changes-modal",template:Sn,standalone:!0,imports:[u,I,M,Q,J,F,We,p],styles:[_n]})],Pe);var ji=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Oe=class{interactionService;socketService;modalService;terminal;terminalUpdated=new f;userRightsUpdated=new f;subscriptionTerminalEmergencyState;visibleActionsButton=!1;visibleDetailButton=!1;constructor(e,t,i){this.interactionService=e,this.socketService=t,this.modalService=i}ngOnInit(){this.subscriptionTerminalEmergencyState=this.socketService.onTerminalEmergencyStateReceived.subscribe(e=>{e&&e.did==this.terminal.id&&(this.terminal.emergencyStatus=e.s,this.terminal.isEmergency=dt.getIsEmergency(this.terminal.emergencyStatus))}),this.setLayout()}ngOnDestroy(){this.subscriptionTerminalEmergencyState&&this.subscriptionTerminalEmergencyState.unsubscribe()}setLayout(){this.terminal&&this.terminal.userRights&&this.terminal.userRights.write?(this.visibleDetailButton=!0,this.visibleActionsButton=this.terminal.availableActions&&this.terminal.availableActions.length>0):(this.visibleDetailButton=!1,this.visibleActionsButton=!1)}get connectionClass(){return this.terminal.isConnected?"text-success":"text-danger"}onSshAddressCopied(e){this.interactionService.showMessage("CONTROLPANEL.SSH_ADDRESS_COPIED",null,S.Info)}onShowDetailsClicked(e){this.modalService.open(Ie,{settings:{size:"xl",scrollable:!0,centered:!1},props:{terminal:this.terminal}}).result.then(t=>{this.terminal&&t.deviceId===this.terminal.id&&(this.terminal.name=t.settings.name,this.terminal.location=t.settings.location)}).catch(t=>{})}onCommandsClicked(e){this.terminal.isConnected?this.modalService.open(Ne,{settings:{size:"lg"},props:{terminal:this.terminal}}).result.then(t=>{this.terminalUpdated.emit()}).catch(t=>{}):this.interactionService.showMessage("TERMINAL.WARNING_ACTIONS_NO_CONNECTION",null,S.Warning)}onManagersClicked(e){this.modalService.open(Re,{settings:{size:"lg",scrollable:!0},props:{terminal:this.terminal}}).result.then(t=>{this.userRightsUpdated.emit()}).catch(t=>{})}onChangesClicked(e){this.modalService.open(Pe,{settings:{size:"lg",scrollable:!0},props:{terminal:this.terminal}}).result.then(t=>{t&&t!=this.terminal.changeCount&&(this.terminal.changeCount=t)}).catch(t=>{})}static ctorParameters=()=>[{type:g},{type:Ct},{type:R}];static propDecorators={terminal:[{type:l}],terminalUpdated:[{type:h}],userRightsUpdated:[{type:h}]}};Oe=ji([d({selector:"armon-terminal-card",template:Wt,standalone:!0,imports:[A,u,I,Y,de,Pt,p],styles:[jt]})],Oe);var Bi=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(n=(o<3?a(n):o>3?a(e,t,n):a(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},kn=class{systemService;route;translate;authService;drawerService;modalService;terminals=null;paginationResponse=new H;filter;limitedMode=!1;subscriptionTerminalHealthData;warningLevels;connectionStatusList;permissionSystemWrite;constructor(e,t,i,o,n,a){this.systemService=e,this.route=t,this.translate=i,this.authService=o,this.drawerService=n,this.modalService=a,this.initializeSubscriptions()}ngOnInit(){this.warningLevels=ne(Ft),this.warningLevels.unshift({type:null,description:"SYSTEMHEALTH.WARNING_ALL"}),this.connectionStatusList=ne(Dt),this.connectionStatusList.unshift({type:U.All,description:"COMMON.ALL"}),this.filter=lt.getEmptyModel(),this.filter.connectionStatus=U.All,this.filter.warningLevel=null,this.route.queryParams.subscribe(e=>{e&&e[L.TerminalId]&&e[L.TerminalId]!==""&&(this.filter.deviceIds=[e[L.TerminalId]],this.limitedMode=!0),e&&e[L.WarningLevel]&&e[L.WarningLevel]!==""&&(this.filter.warningLevel=+e[L.WarningLevel],this.limitedMode=!0),e&&e[L.ConnectionStatus]&&e[L.ConnectionStatus]!==""&&(this.filter.connectionStatus=+e[L.ConnectionStatus],this.limitedMode=!0),this.getTerminals()}),this.permissionSystemWrite=this.authService.checkPermission(E.SYSTEM.getWrite())}ngOnDestroy(){this.subscriptionTerminalHealthData.unsubscribe()}onExitLimitedModeClicked(){this.limitedMode=!1,this.filter.name=null,this.filter.model=null,this.filter.warningLevel=null,this.filter.connectionStatus=U.All,this.refreshFilter()}onFilterChanged(e){this.refreshFilter()}pageChanged(e){this.filter.pagination=e,this.getTerminals()}initializeSubscriptions(){this.subscriptionTerminalHealthData=this.systemService.onTerminalSystemHealthChanged.subscribe(e=>{e&&(!e.did||this.terminals.findIndex(t=>t.id===e.did)>=0)&&this.getTerminals()})}getTerminals(){this.systemService.getTerminals(this.filter).subscribe(e=>{this.terminals=e.items||[],this.paginationResponse=e.pagination})}getTerminalsAsExcel(){this.systemService.getTerminalsAsExcel(this.filter).subscribe(e=>{this.translate.get(["PAGES.MANAGE_TERMINALS"]).subscribe(t=>{wn.default.saveAs(e,t["PAGES.MANAGE_TERMINALS"]+" "+Fe.local().toLocaleString(Fe.DATETIME_MED)+".xlsx")})})}refreshFilter(){this.filter.deviceIds&&(delete this.filter.deviceIds,this.limitedMode=!1),this.filter.pagination.skip=0,this.getTerminals()}onGetExcelClicked(e){this.getTerminalsAsExcel()}onUserRightsUpdated(e){this.getTerminals()}onTerminalUpdated(e){this.getTerminals()}onInitialConfigClicked(e){this.modalService.open(he,{settings:{size:"xxl",scrollable:!0},props:{}}).result.then(t=>{}).catch(t=>{})}onGeneralSettingsClicked(){let e=this.drawerService.create({nzContent:ge,nzClosable:!1,nzWidth:Ke(!1),nzContentParams:{}})}static ctorParameters=()=>[{type:v},{type:qe},{type:W},{type:K},{type:It},{type:R}]};kn=Bi([d({selector:"armon-manage-terminals",template:Lt,animations:Tt,standalone:!0,imports:[Nt,kt,At,k,X,I,wt,u,Q,Oe,J,p],styles:[Mt]})],kn);export{kn as ManageTerminalsComponent};
