diff --git a/application/src/main/data/resources/js_modules/gateway-management-extension.js b/application/src/main/data/resources/js_modules/gateway-management-extension.js new file mode 100644 index 0000000000..76693b0890 --- /dev/null +++ b/application/src/main/data/resources/js_modules/gateway-management-extension.js @@ -0,0 +1 @@ +System.register(["@angular/core","@angular/material/sort","@angular/material/table","@angular/material/paginator","@shared/public-api","@angular/common","@angular/material/divider","@angular/material/tabs","@angular/flex-layout/flex","@angular/flex-layout/extended","@ngx-translate/core","@core/public-api","@angular/forms","@angular/material/button","@angular/material/card","@angular/material/input","@angular/material/form-field","@angular/material/select","@angular/material/core","rxjs","rxjs/operators","tslib","@angular/material/tooltip","@angular/cdk/collections","@angular/material/icon","@angular/material/expansion","@shared/directives/truncate-with-tooltip.directive","@shared/components/dialog/json-object-edit-dialog.component","@angular/material/dialog","@shared/components/directives/tb-json-to-string.directive","@angular/material/slide-toggle","@shared/components/button/toggle-password.component","@shared/components/toggle-header.component","@shared/components/toggle-select.component","@ngrx/store","@angular/router","@angular/material/toolbar","@shared/components/json-content.component","@shared/import-export/import-export.service","@shared/components/toast.directive","@angular/material/checkbox","@shared/components/entity/entity-gateway-select.component","@shared/components/help.component","@shared/components/hint-tooltip-icon.component","@shared/components/help-popup.component","@shared/components/popover.service","@angular/material/chips","@shared/components/icon.component","@angular/material/menu","@shared/decorators/coercion","@shared/components/json-object-edit.component","@shared/components/markdown.component","@shared/components/tb-error.component","@shared/components/file-input.component","@shared/components/button/copy-button.component"],(function(e){"use strict";var t,n,a,o,i,r,s,l,c,p,m,d,u,g,f,y,b,h,x,v,w,C,T,S,k,L,F,I,A,N,M,E,q,D,P,G,O,R,V,B,U,_,H,z,W,j,K,Y,Q,J,X,Z,ee,te,ne,ae,oe,ie,re,se,le,ce,pe,me,de,ue,ge,fe,ye,be,he,xe,ve,we,Ce,Te,Se,ke,Le,Fe,Ie,Ae,Ne,Me,Ee,qe,De,Pe,Ge,Oe,Re,Ve,Be,Ue,_e,He,ze,We,je,Ke,$e,Ye,Qe,Je,Xe,Ze,et,tt,nt,at,ot,it,rt,st,lt,ct,pt,mt,dt,ut,gt,ft,yt,bt,ht,xt,vt,wt,Ct,Tt,St;return{setters:[function(e){t=e,n=e.Component,a=e.Input,o=e.ViewChild,i=e.EventEmitter,r=e.inject,s=e.Directive,l=e.Output,c=e.Pipe,p=e.Inject,m=e.forwardRef,d=e.ChangeDetectionStrategy,u=e.NgModule},function(e){g=e.MatSort,f=e},function(e){y=e.MatTableDataSource,b=e},function(e){h=e.MatPaginator,x=e},function(e){v=e.helpBaseUrl,w=e.Direction,C=e.PageLink,T=e.DataKeyType,S=e.LegendPosition,k=e.NULL_UUID,L=e.AttributeScope,F=e.DatasourceType,I=e.EntityType,A=e.widgetType,N=e.coerceBoolean,M=e.emptyPageData,E=e.isClientSideTelemetryType,q=e.TelemetrySubscriber,D=e.SharedModule,P=e.DialogComponent,G=e.ContentType,O=e.PageComponent,R=e.TbTableDatasource,V=e.HOUR,B=e.coerceNumber,U=e.DeviceCredentialsType},function(e){_=e,H=e.CommonModule},function(e){z=e},function(e){W=e},function(e){j=e},function(e){K=e},function(e){Y=e,Q=e.TranslateModule},function(e){J=e.deepClone,X=e,Z=e.deleteNullProperties,ee=e.isEqual,te=e.isNumber,ne=e.isString,ae=e.WINDOW,oe=e.isLiteralObject,ie=e.isDefinedAndNotNull,re=e.isUndefinedOrNull,se=e.generateSecret,le=e.isObject,ce=e.camelCase,pe=e.deepTrim},function(e){me=e,de=e.FormBuilder,ue=e.Validators,ge=e.NG_VALUE_ACCESSOR,fe=e.NG_VALIDATORS,ye=e.FormControl},function(e){be=e},function(e){he=e},function(e){xe=e},function(e){ve=e},function(e){we=e},function(e){Ce=e,Te=e.ErrorStateMatcher},function(e){Se=e.Subject,ke=e.fromEvent,Le=e.BehaviorSubject,Fe=e.ReplaySubject,Ie=e.of,Ae=e.forkJoin},function(e){Ne=e.takeUntil,Me=e.filter,Ee=e.tap,qe=e.catchError,De=e.map,Pe=e.publishReplay,Ge=e.refCount,Oe=e.take,Re=e.startWith,Ve=e.debounceTime,Be=e.distinctUntilChanged,Ue=e.switchMap,_e=e.mergeMap},function(e){He=e.__decorate},function(e){ze=e,We=e.MatTooltip},function(e){je=e.SelectionModel},function(e){Ke=e},function(e){$e=e},function(e){Ye=e},function(e){Qe=e.JsonObjectEditDialogComponent},function(e){Je=e,Xe=e.MAT_DIALOG_DATA},function(e){Ze=e},function(e){et=e},function(e){tt=e},function(e){nt=e},function(e){at=e},function(e){ot=e},function(e){it=e},function(e){rt=e},function(e){st=e},function(e){lt=e},function(e){ct=e},function(e){pt=e},function(e){mt=e},function(e){dt=e},function(e){ut=e},function(e){gt=e},function(e){ft=e},function(e){yt=e},function(e){bt=e},function(e){ht=e},function(e){xt=e.coerceBoolean},function(e){vt=e},function(e){wt=e},function(e){Ct=e},function(e){Tt=e},function(e){St=e}],execute:function(){const kt=e("noLeadTrailSpacesRegex",/^\S+(?: \S+)*$/),Lt=e("integerRegex",/^[-+]?\d+$/),Ft=e("nonZeroFloat",/^-?(?!0(\.0+)?$)\d+(\.\d+)?$/),It=e("jsonRequired",(e=>e.value?null:{required:!0}));var At,Nt,Mt,Et;e("StorageTypes",At),function(e){e.MEMORY="memory",e.FILE="file",e.SQLITE="sqlite"}(At||e("StorageTypes",At={})),e("DeviceGatewayStatus",Nt),function(e){e.EXCEPTION="EXCEPTION"}(Nt||e("DeviceGatewayStatus",Nt={})),e("GatewayLogLevel",Mt),function(e){e.NONE="NONE",e.CRITICAL="CRITICAL",e.ERROR="ERROR",e.WARNING="WARNING",e.INFO="INFO",e.DEBUG="DEBUG",e.TRACE="TRACE"}(Mt||e("GatewayLogLevel",Mt={})),e("PortLimits",Et),function(e){e[e.MIN=1]="MIN",e[e.MAX=65535]="MAX"}(Et||e("PortLimits",Et={}));const qt=e("GatewayStatus",{...Mt,...Nt});var Dt,Pt;e("LogSavingPeriod",Dt),function(e){e.days="D",e.hours="H",e.minutes="M",e.seconds="S"}(Dt||e("LogSavingPeriod",Dt={})),e("LocalLogsConfigs",Pt),function(e){e.service="service",e.connector="connector",e.converter="converter",e.tb_connection="tb_connection",e.storage="storage",e.extension="extension"}(Pt||e("LocalLogsConfigs",Pt={}));const Gt=e("LocalLogsConfigTranslateMap",new Map([[Pt.service,"Service"],[Pt.connector,"Connector"],[Pt.converter,"Converter"],[Pt.tb_connection,"TB Connection"],[Pt.storage,"Storage"],[Pt.extension,"Extension"]])),Ot=e("LogSavingPeriodTranslations",new Map([[Dt.days,"gateway.logs.days"],[Dt.hours,"gateway.logs.hours"],[Dt.minutes,"gateway.logs.minutes"],[Dt.seconds,"gateway.logs.seconds"]])),Rt=e("StorageTypesTranslationMap",new Map([[At.MEMORY,"gateway.storage-types.memory-storage"],[At.FILE,"gateway.storage-types.file-storage"],[At.SQLITE,"gateway.storage-types.sqlite"]]));var Vt;e("SecurityTypes",Vt),function(e){e.ACCESS_TOKEN="accessToken",e.USERNAME_PASSWORD="usernamePassword",e.TLS_ACCESS_TOKEN="tlsAccessToken",e.TLS_PRIVATE_KEY="tlsPrivateKey"}(Vt||e("SecurityTypes",Vt={}));const Bt=e("GecurityTypesTranslationsMap",new Map([[Vt.ACCESS_TOKEN,"gateway.security-types.access-token"],[Vt.USERNAME_PASSWORD,"gateway.security-types.username-password"],[Vt.TLS_ACCESS_TOKEN,"gateway.security-types.tls-access-token"]]));var Ut,_t;e("GatewayVersion",Ut),function(e){e.Current="3.5.2",e.Legacy="legacy"}(Ut||e("GatewayVersion",Ut={})),e("ConnectorType",_t),function(e){e.MQTT="mqtt",e.MODBUS="modbus",e.GRPC="grpc",e.OPCUA="opcua",e.BLE="ble",e.REQUEST="request",e.CAN="can",e.BACNET="bacnet",e.ODBC="odbc",e.REST="rest",e.SNMP="snmp",e.FTP="ftp",e.SOCKET="socket",e.XMPP="xmpp",e.OCPP="ocpp",e.CUSTOM="custom"}(_t||e("ConnectorType",_t={}));const Ht=e("GatewayConnectorDefaultTypesTranslatesMap",new Map([[_t.MQTT,"MQTT"],[_t.MODBUS,"MODBUS"],[_t.GRPC,"GRPC"],[_t.OPCUA,"OPCUA"],[_t.BLE,"BLE"],[_t.REQUEST,"REQUEST"],[_t.CAN,"CAN"],[_t.BACNET,"BACNET"],[_t.ODBC,"ODBC"],[_t.REST,"REST"],[_t.SNMP,"SNMP"],[_t.FTP,"FTP"],[_t.SOCKET,"SOCKET"],[_t.XMPP,"XMPP"],[_t.OCPP,"OCPP"],[_t.CUSTOM,"CUSTOM"]])),zt=e("ModbusFunctionCodeTranslationsMap",new Map([[1,"gateway.function-codes.read-coils"],[2,"gateway.function-codes.read-discrete-inputs"],[3,"gateway.function-codes.read-multiple-holding-registers"],[4,"gateway.function-codes.read-input-registers"],[5,"gateway.function-codes.write-single-coil"],[6,"gateway.function-codes.write-single-holding-register"],[15,"gateway.function-codes.write-multiple-coils"],[16,"gateway.function-codes.write-multiple-holding-registers"]]));var Wt;e("BACnetRequestTypes",Wt),function(e){e.WriteProperty="writeProperty",e.ReadProperty="readProperty"}(Wt||e("BACnetRequestTypes",Wt={}));const jt=e("BACnetRequestTypesTranslates",new Map([[Wt.WriteProperty,"gateway.rpc.write-property"],[Wt.ReadProperty,"gateway.rpc.read-property"]]));var Kt;e("BACnetObjectTypes",Kt),function(e){e.BinaryInput="binaryInput",e.BinaryOutput="binaryOutput",e.AnalogInput="analogInput",e.AnalogOutput="analogOutput",e.BinaryValue="binaryValue",e.AnalogValue="analogValue"}(Kt||e("BACnetObjectTypes",Kt={}));const $t=e("BACnetObjectTypesTranslates",new Map([[Kt.AnalogOutput,"gateway.rpc.analog-output"],[Kt.AnalogInput,"gateway.rpc.analog-input"],[Kt.BinaryOutput,"gateway.rpc.binary-output"],[Kt.BinaryInput,"gateway.rpc.binary-input"],[Kt.BinaryValue,"gateway.rpc.binary-value"],[Kt.AnalogValue,"gateway.rpc.analog-value"]]));var Yt;e("BLEMethods",Yt),function(e){e.WRITE="write",e.READ="read",e.SCAN="scan"}(Yt||e("BLEMethods",Yt={}));const Qt=e("BLEMethodsTranslates",new Map([[Yt.WRITE,"gateway.rpc.write"],[Yt.READ,"gateway.rpc.read"],[Yt.SCAN,"gateway.rpc.scan"]]));var Jt,Xt;e("CANByteOrders",Jt),function(e){e.LITTLE="LITTLE",e.BIG="BIG"}(Jt||e("CANByteOrders",Jt={})),e("SocketMethodProcessings",Xt),function(e){e.WRITE="write"}(Xt||e("SocketMethodProcessings",Xt={}));const Zt=e("SocketMethodProcessingsTranslates",new Map([[Xt.WRITE,"gateway.rpc.write"]]));var en;e("SNMPMethods",en),function(e){e.SET="set",e.MULTISET="multiset",e.GET="get",e.BULKWALK="bulkwalk",e.TABLE="table",e.MULTIGET="multiget",e.GETNEXT="getnext",e.BULKGET="bulkget",e.WALKS="walk"}(en||e("SNMPMethods",en={}));const tn=e("SNMPMethodsTranslations",new Map([[en.SET,"gateway.rpc.set"],[en.MULTISET,"gateway.rpc.multiset"],[en.GET,"gateway.rpc.get"],[en.BULKWALK,"gateway.rpc.bulk-walk"],[en.TABLE,"gateway.rpc.table"],[en.MULTIGET,"gateway.rpc.multi-get"],[en.GETNEXT,"gateway.rpc.get-next"],[en.BULKGET,"gateway.rpc.bulk-get"],[en.WALKS,"gateway.rpc.walk"]]));var nn,an,on,rn,sn,ln;e("HTTPMethods",nn),function(e){e.CONNECT="CONNECT",e.DELETE="DELETE",e.GET="GET",e.HEAD="HEAD",e.OPTIONS="OPTIONS",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.TRACE="TRACE"}(nn||e("HTTPMethods",nn={})),e("SocketEncodings",an),function(e){e.UTF_8="utf-8"}(an||e("SocketEncodings",an={})),e("ConfigurationModes",on),function(e){e.BASIC="basic",e.ADVANCED="advanced"}(on||e("ConfigurationModes",on={})),e("SecurityType",rn),function(e){e.ANONYMOUS="anonymous",e.BASIC="basic",e.CERTIFICATES="certificates"}(rn||e("SecurityType",rn={})),e("ReportStrategyType",sn),function(e){e.OnChange="ON_CHANGE",e.OnReportPeriod="ON_REPORT_PERIOD",e.OnChangeOrReportPeriod="ON_CHANGE_OR_REPORT_PERIOD"}(sn||e("ReportStrategyType",sn={})),e("ReportStrategyDefaultValue",ln),function(e){e[e.Connector=6e4]="Connector",e[e.Device=3e4]="Device",e[e.Key=15e3]="Key"}(ln||e("ReportStrategyDefaultValue",ln={}));const cn=e("ReportStrategyTypeTranslationsMap",new Map([[sn.OnChange,"gateway.report-strategy.on-change"],[sn.OnReportPeriod,"gateway.report-strategy.on-report-period"],[sn.OnChangeOrReportPeriod,"gateway.report-strategy.on-change-or-report-period"]]));var pn;e("ModeType",pn),function(e){e.NONE="None",e.SIGN="Sign",e.SIGNANDENCRYPT="SignAndEncrypt"}(pn||e("ModeType",pn={}));const mn=e("SecurityTypeTranslationsMap",new Map([[rn.ANONYMOUS,"gateway.broker.security-types.anonymous"],[rn.BASIC,"gateway.broker.security-types.basic"],[rn.CERTIFICATES,"gateway.broker.security-types.certificates"]]));var dn;e("RestSecurityType",dn),function(e){e.ANONYMOUS="anonymous",e.BASIC="basic"}(dn||e("RestSecurityType",dn={}));const un=e("RestSecurityTypeTranslationsMap",new Map([[dn.ANONYMOUS,"gateway.broker.security-types.anonymous"],[dn.BASIC,"gateway.broker.security-types.basic"]])),gn=e("MqttVersions",[{name:3.1,value:3},{name:3.11,value:4},{name:5,value:5}]);var fn;e("MappingType",fn),function(e){e.DATA="data",e.REQUESTS="requests",e.OPCUA="OPCua"}(fn||e("MappingType",fn={}));const yn=e("MappingTypeTranslationsMap",new Map([[fn.DATA,"gateway.data-mapping"],[fn.REQUESTS,"gateway.requests-mapping"],[fn.OPCUA,"gateway.data-mapping"]])),bn=e("MappingHintTranslationsMap",new Map([[fn.DATA,"gateway.data-mapping-hint"],[fn.OPCUA,"gateway.opcua-data-mapping-hint"],[fn.REQUESTS,"gateway.requests-mapping-hint"]])),hn=e("HelpLinkByMappingTypeMap",new Map([[fn.DATA,v+"/docs/iot-gateway/config/mqtt/#section-mapping"],[fn.OPCUA,v+"/docs/iot-gateway/config/opc-ua/#section-mapping"],[fn.REQUESTS,v+"/docs/iot-gateway/config/mqtt/#requests-mapping"]])),xn=e("QualityTypes",[0,1,2]),vn=e("QualityTypeTranslationsMap",new Map([[0,"gateway.qos.at-most-once"],[1,"gateway.qos.at-least-once"],[2,"gateway.qos.exactly-once"]]));var wn;e("ConvertorType",wn),function(e){e.JSON="json",e.BYTES="bytes",e.CUSTOM="custom"}(wn||e("ConvertorType",wn={}));const Cn=e("ConvertorTypeTranslationsMap",new Map([[wn.JSON,"gateway.JSON"],[wn.BYTES,"gateway.bytes"],[wn.CUSTOM,"gateway.custom"]]));var Tn,Sn,kn;e("SourceType",Tn),function(e){e.MSG="message",e.TOPIC="topic",e.CONST="constant"}(Tn||e("SourceType",Tn={})),e("OPCUaSourceType",Sn),function(e){e.PATH="path",e.IDENTIFIER="identifier",e.CONST="constant"}(Sn||e("OPCUaSourceType",Sn={})),e("DeviceInfoType",kn),function(e){e.FULL="full",e.PARTIAL="partial"}(kn||e("DeviceInfoType",kn={}));const Ln=e("SourceTypeTranslationsMap",new Map([[Tn.MSG,"gateway.source-type.msg"],[Tn.TOPIC,"gateway.source-type.topic"],[Tn.CONST,"gateway.source-type.const"],[Sn.PATH,"gateway.source-type.path"],[Sn.IDENTIFIER,"gateway.source-type.identifier"],[Sn.CONST,"gateway.source-type.const"]]));var Fn,In;e("ServerSideRpcType",Fn),function(e){e.WithResponse="twoWay",e.WithoutResponse="oneWay"}(Fn||e("ServerSideRpcType",Fn={})),e("RequestType",In),function(e){e.CONNECT_REQUEST="connectRequests",e.DISCONNECT_REQUEST="disconnectRequests",e.ATTRIBUTE_REQUEST="attributeRequests",e.ATTRIBUTE_UPDATE="attributeUpdates",e.SERVER_SIDE_RPC="serverSideRpc"}(In||e("RequestType",In={}));const An=e("RequestTypesTranslationsMap",new Map([[In.CONNECT_REQUEST,"gateway.request.connect-request"],[In.DISCONNECT_REQUEST,"gateway.request.disconnect-request"],[In.ATTRIBUTE_REQUEST,"gateway.request.attribute-request"],[In.ATTRIBUTE_UPDATE,"gateway.request.attribute-update"],[In.SERVER_SIDE_RPC,"gateway.request.rpc-connection"]]));var Nn;e("MappingKeysType",Nn),function(e){e.ATTRIBUTES="attributes",e.TIMESERIES="timeseries",e.CUSTOM="extensionConfig",e.RPC_METHODS="rpc_methods",e.ATTRIBUTES_UPDATES="attributes_updates"}(Nn||e("MappingKeysType",Nn={}));const Mn=e("MappingKeysPanelTitleTranslationsMap",new Map([[Nn.ATTRIBUTES,"gateway.attributes"],[Nn.TIMESERIES,"gateway.timeseries"],[Nn.CUSTOM,"gateway.keys"],[Nn.ATTRIBUTES_UPDATES,"gateway.attribute-updates"],[Nn.RPC_METHODS,"gateway.rpc-methods"]])),En=e("MappingKeysAddKeyTranslationsMap",new Map([[Nn.ATTRIBUTES,"gateway.add-attribute"],[Nn.TIMESERIES,"gateway.add-timeseries"],[Nn.CUSTOM,"gateway.add-key"],[Nn.ATTRIBUTES_UPDATES,"gateway.add-attribute-update"],[Nn.RPC_METHODS,"gateway.add-rpc-method"]])),qn=e("MappingKeysDeleteKeyTranslationsMap",new Map([[Nn.ATTRIBUTES,"gateway.delete-attribute"],[Nn.TIMESERIES,"gateway.delete-timeseries"],[Nn.CUSTOM,"gateway.delete-key"],[Nn.ATTRIBUTES_UPDATES,"gateway.delete-attribute-update"],[Nn.RPC_METHODS,"gateway.delete-rpc-method"]])),Dn=e("MappingKeysNoKeysTextTranslationsMap",new Map([[Nn.ATTRIBUTES,"gateway.no-attributes"],[Nn.TIMESERIES,"gateway.no-timeseries"],[Nn.CUSTOM,"gateway.no-keys"],[Nn.ATTRIBUTES_UPDATES,"gateway.no-attribute-updates"],[Nn.RPC_METHODS,"gateway.no-rpc-methods"]]));var Pn,Gn,On;e("ServerSideRPCType",Pn),function(e){e.ONE_WAY="oneWay",e.TWO_WAY="twoWay"}(Pn||e("ServerSideRPCType",Pn={})),e("MappingValueType",Gn),function(e){e.STRING="string",e.INTEGER="integer",e.DOUBLE="double",e.BOOLEAN="boolean"}(Gn||e("MappingValueType",Gn={})),e("ModifierType",On),function(e){e.DIVIDER="divider",e.MULTIPLIER="multiplier"}(On||e("ModifierType",On={}));const Rn=e("ModifierTypesMap",new Map([[On.DIVIDER,{name:"gateway.divider",icon:"mdi:division"}],[On.MULTIPLIER,{name:"gateway.multiplier",icon:"mdi:multiplication"}]])),Vn=e("mappingValueTypesMap",new Map([[Gn.STRING,{name:"value.string",icon:"mdi:format-text"}],[Gn.INTEGER,{name:"value.integer",icon:"mdi:numeric"}],[Gn.DOUBLE,{name:"value.double",icon:"mdi:numeric"}],[Gn.BOOLEAN,{name:"value.boolean",icon:"mdi:checkbox-marked-outline"}]])),Bn=e("DataConversionTranslationsMap",new Map([[wn.JSON,"gateway.JSON-hint"],[wn.BYTES,"gateway.bytes-hint"],[wn.CUSTOM,"gateway.custom-hint"]]));var Un;e("SecurityPolicy",Un),function(e){e.BASIC128="Basic128Rsa15",e.BASIC256="Basic256",e.BASIC256SHA="Basic256Sha256"}(Un||e("SecurityPolicy",Un={}));const _n=e("SecurityPolicyTypes",[{value:Un.BASIC128,name:"Basic128RSA15"},{value:Un.BASIC256,name:"Basic256"},{value:Un.BASIC256SHA,name:"Basic256SHA256"}]);var Hn;e("ModbusProtocolType",Hn),function(e){e.TCP="tcp",e.UDP="udp",e.Serial="serial"}(Hn||e("ModbusProtocolType",Hn={}));const zn=e("ModbusProtocolLabelsMap",new Map([[Hn.TCP,"TCP"],[Hn.UDP,"UDP"],[Hn.Serial,"Serial"]]));var Wn,jn;e("ModbusMethodType",Wn),function(e){e.SOCKET="socket",e.RTU="rtu"}(Wn||e("ModbusMethodType",Wn={})),e("ModbusSerialMethodType",jn),function(e){e.RTU="rtu",e.ASCII="ascii"}(jn||e("ModbusSerialMethodType",jn={}));const Kn=e("ModbusMethodLabelsMap",new Map([[Wn.SOCKET,"Socket"],[Wn.RTU,"RTU"],[jn.ASCII,"ASCII"]])),$n=e("ModbusByteSizes",[5,6,7,8]);var Yn;e("ModbusParity",Yn),function(e){e.Even="E",e.Odd="O",e.None="N"}(Yn||e("ModbusParity",Yn={}));const Qn=e("ModbusParityLabelsMap",new Map([[Yn.Even,"Even"],[Yn.Odd,"Odd"],[Yn.None,"None"]]));var Jn,Xn;e("ModbusOrderType",Jn),function(e){e.BIG="BIG",e.LITTLE="LITTLE"}(Jn||e("ModbusOrderType",Jn={})),e("ModbusRegisterType",Xn),function(e){e.HoldingRegisters="holding_registers",e.CoilsInitializer="coils_initializer",e.InputRegisters="input_registers",e.DiscreteInputs="discrete_inputs"}(Xn||e("ModbusRegisterType",Xn={}));const Zn=e("ModbusRegisterTranslationsMap",new Map([[Xn.HoldingRegisters,"gateway.holding_registers"],[Xn.CoilsInitializer,"gateway.coils_initializer"],[Xn.InputRegisters,"gateway.input_registers"],[Xn.DiscreteInputs,"gateway.discrete_inputs"]]));var ea;e("ModbusDataType",ea),function(e){e.STRING="string",e.BYTES="bytes",e.BITS="bits",e.INT8="8int",e.UINT8="8uint",e.FLOAT8="8float",e.INT16="16int",e.UINT16="16uint",e.FLOAT16="16float",e.INT32="32int",e.UINT32="32uint",e.FLOAT32="32float",e.INT64="64int",e.UINT64="64uint",e.FLOAT64="64float"}(ea||e("ModbusDataType",ea={}));const ta=e("ModbusEditableDataTypes",[ea.BYTES,ea.BITS,ea.STRING]);var na,aa;e("ModbusObjectCountByDataType",na),function(e){e[e["8int"]=1]="8int",e[e["8uint"]=1]="8uint",e[e["8float"]=1]="8float",e[e["16int"]=1]="16int",e[e["16uint"]=1]="16uint",e[e["16float"]=1]="16float",e[e["32int"]=2]="32int",e[e["32uint"]=2]="32uint",e[e["32float"]=2]="32float",e[e["64int"]=4]="64int",e[e["64uint"]=4]="64uint",e[e["64float"]=4]="64float"}(na||e("ModbusObjectCountByDataType",na={})),e("ModbusValueKey",aa),function(e){e.ATTRIBUTES="attributes",e.TIMESERIES="timeseries",e.ATTRIBUTES_UPDATES="attributeUpdates",e.RPC_REQUESTS="rpc"}(aa||e("ModbusValueKey",aa={}));const oa=e("ModbusKeysPanelTitleTranslationsMap",new Map([[aa.ATTRIBUTES,"gateway.attributes"],[aa.TIMESERIES,"gateway.timeseries"],[aa.ATTRIBUTES_UPDATES,"gateway.attribute-updates"],[aa.RPC_REQUESTS,"gateway.rpc-requests"]])),ia=e("ModbusKeysAddKeyTranslationsMap",new Map([[aa.ATTRIBUTES,"gateway.add-attribute"],[aa.TIMESERIES,"gateway.add-timeseries"],[aa.ATTRIBUTES_UPDATES,"gateway.add-attribute-update"],[aa.RPC_REQUESTS,"gateway.add-rpc-request"]])),ra=e("ModbusKeysDeleteKeyTranslationsMap",new Map([[aa.ATTRIBUTES,"gateway.delete-attribute"],[aa.TIMESERIES,"gateway.delete-timeseries"],[aa.ATTRIBUTES_UPDATES,"gateway.delete-attribute-update"],[aa.RPC_REQUESTS,"gateway.delete-rpc-request"]])),sa=e("ModbusKeysNoKeysTextTranslationsMap",new Map([[aa.ATTRIBUTES,"gateway.no-attributes"],[aa.TIMESERIES,"gateway.no-timeseries"],[aa.ATTRIBUTES_UPDATES,"gateway.no-attribute-updates"],[aa.RPC_REQUESTS,"gateway.no-rpc-requests"]])),la=e("ModbusBaudrates",[4800,9600,19200,38400,57600,115200,230400,460800,921600]);class ca{constructor(){this.displayedColumns=["ts","status","message"],this.gatewayLogLinks=[{name:"General",key:"LOGS"},{name:"Service",key:"SERVICE_LOGS"},{name:"Connection",key:"CONNECTION_LOGS"},{name:"Storage",key:"STORAGE_LOGS"},{key:"EXTENSIONS_LOGS",name:"Extension"}];const e={property:"ts",direction:w.DESC};this.pageLink=new C(10,0,null,e),this.dataSource=new y([])}ngOnInit(){this.updateWidgetTitle()}ngAfterViewInit(){if(this.dataSource.sort=this.sort,this.dataSource.paginator=this.paginator,this.ctx.defaultSubscription.onTimewindowChangeFunction=e=>(this.ctx.defaultSubscription.options.timeWindowConfig=e,this.ctx.defaultSubscription.updateDataSubscriptions(),e),this.ctx.settings.isConnectorLog&&this.ctx.settings.connectorLogState){const e=this.ctx.stateController.getStateParams()[this.ctx.settings.connectorLogState];this.logLinks=[{key:`${e.key}_LOGS`,name:"Connector",filterFn:e=>!e.message.includes("_converter.py")},{key:`${e.key}_LOGS`,name:"Converter",filterFn:e=>e.message.includes("_converter.py")}]}else this.logLinks=this.gatewayLogLinks;this.activeLink=this.logLinks[0],this.changeSubscription()}updateWidgetTitle(){if(this.ctx.settings.isConnectorLog&&this.ctx.settings.connectorLogState){const e=this.ctx.widgetConfig.title,t="${connectorName}";if(e.includes(t)){const n=this.ctx.stateController.getStateParams()[this.ctx.settings.connectorLogState];this.ctx.widgetTitle=e.replace(t,n.key)}}}updateData(){if(this.ctx.defaultSubscription.data.length&&this.ctx.defaultSubscription.data[0]){let e=this.ctx.defaultSubscription.data[0].data.map((e=>{const t={ts:e[0],key:this.activeLink.key,message:e[1],status:"INVALID LOG FORMAT"};try{t.message=/\[(.*)/.exec(e[1])[0]}catch(n){t.message=e[1]}try{t.status=e[1].match(/\|(\w+)\|/)[1]}catch(e){t.status="INVALID LOG FORMAT"}return t}));this.activeLink.filterFn&&(e=e.filter((e=>this.activeLink.filterFn(e)))),this.dataSource.data=e}}onTabChanged(e){this.activeLink=e,this.changeSubscription()}statusClass(e){switch(e){case qt.DEBUG:return"status status-debug";case qt.WARNING:return"status status-warning";case qt.ERROR:case qt.EXCEPTION:return"status status-error";default:return"status status-info"}}statusClassMsg(e){if(e===qt.EXCEPTION)return"msg-status-exception"}trackByLogTs(e,t){return t.ts}changeSubscription(){this.ctx.datasources&&this.ctx.datasources[0].entity&&this.ctx.defaultSubscription.options.datasources&&(this.ctx.defaultSubscription.options.datasources[0].dataKeys=[{name:this.activeLink.key,type:T.timeseries,settings:{}}],this.ctx.defaultSubscription.unsubscribe(),this.ctx.defaultSubscription.updateDataSubscriptions(),this.ctx.defaultSubscription.callbacks.onDataUpdated=()=>{this.updateData()})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ca,deps:[],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:ca,selector:"tb-gateway-logs",inputs:{ctx:"ctx",dialogRef:"dialogRef"},viewQueries:[{propertyName:"searchInputField",first:!0,predicate:["searchInput"],descendants:!0},{propertyName:"sort",first:!0,predicate:g,descendants:!0},{propertyName:"paginator",first:!0,predicate:h,descendants:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n\n\n \n {{ \'widgets.gateway.created-time\' | translate }}\n \n {{ attribute.ts | date:\'yyyy-MM-dd HH:mm:ss\' }}\n \n \n \n {{ \'widgets.gateway.level\' | translate }}\n \n {{ attribute.status }}\n \n \n \n {{ \'widgets.gateway.message\' | translate }}\n \n {{ attribute.message }}\n \n \n \n \n
\n{{ \'attribute.no-telemetry-text\' | translate }}\n\n\n\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;overflow-x:auto;padding:0}:host .status{border-radius:20px;font-weight:500;padding:5px 15px}:host .status-debug{color:green;background:#0080001a}:host .status-warning{color:orange;background:#ffa5001a}:host .status-error{color:red;background:#ff00001a}:host .status-info{color:#00f;background:#0000801a}:host .msg-status-exception{color:red}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"component",type:b.MatTable,selector:"mat-table, table[mat-table]",exportAs:["matTable"]},{kind:"directive",type:b.MatHeaderCellDef,selector:"[matHeaderCellDef]"},{kind:"directive",type:b.MatHeaderRowDef,selector:"[matHeaderRowDef]",inputs:["matHeaderRowDef","matHeaderRowDefSticky"]},{kind:"directive",type:b.MatColumnDef,selector:"[matColumnDef]",inputs:["matColumnDef"]},{kind:"directive",type:b.MatCellDef,selector:"[matCellDef]"},{kind:"directive",type:b.MatRowDef,selector:"[matRowDef]",inputs:["matRowDefColumns","matRowDefWhen"]},{kind:"directive",type:b.MatHeaderCell,selector:"mat-header-cell, th[mat-header-cell]"},{kind:"directive",type:b.MatCell,selector:"mat-cell, td[mat-cell]"},{kind:"component",type:b.MatHeaderRow,selector:"mat-header-row, tr[mat-header-row]",exportAs:["matHeaderRow"]},{kind:"component",type:b.MatRow,selector:"mat-row, tr[mat-row]",exportAs:["matRow"]},{kind:"component",type:x.MatPaginator,selector:"mat-paginator",inputs:["color","pageIndex","length","pageSize","pageSizeOptions","hidePageSize","showFirstLastButtons","selectConfig","disabled"],outputs:["page"],exportAs:["matPaginator"]},{kind:"directive",type:f.MatSort,selector:"[matSort]",inputs:["matSortActive","matSortStart","matSortDirection","matSortDisableClear","matSortDisabled"],outputs:["matSortChange"],exportAs:["matSort"]},{kind:"component",type:f.MatSortHeader,selector:"[mat-sort-header]",inputs:["mat-sort-header","arrowPosition","start","disabled","sortActionDescription","disableClear"],exportAs:["matSortHeader"]},{kind:"component",type:z.MatDivider,selector:"mat-divider",inputs:["vertical","inset"]},{kind:"component",type:W.MatTabNav,selector:"[mat-tab-nav-bar]",inputs:["fitInkBarToContent","mat-stretch-tabs","animationDuration","backgroundColor","disableRipple","color","tabPanel"],exportAs:["matTabNavBar","matTabNav"]},{kind:"component",type:W.MatTabNavPanel,selector:"mat-tab-nav-panel",inputs:["id"],exportAs:["matTabNavPanel"]},{kind:"component",type:W.MatTabLink,selector:"[mat-tab-link], [matTabLink]",inputs:["active","disabled","disableRipple","tabIndex","id"],exportAs:["matTabLink"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultShowHideDirective,selector:" [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]",inputs:["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"]},{kind:"pipe",type:_.DatePipe,name:"date"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayLogsComponent",ca),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ca,decorators:[{type:n,args:[{selector:"tb-gateway-logs",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n\n\n \n {{ \'widgets.gateway.created-time\' | translate }}\n \n {{ attribute.ts | date:\'yyyy-MM-dd HH:mm:ss\' }}\n \n \n \n {{ \'widgets.gateway.level\' | translate }}\n \n {{ attribute.status }}\n \n \n \n {{ \'widgets.gateway.message\' | translate }}\n \n {{ attribute.message }}\n \n \n \n \n
\n{{ \'attribute.no-telemetry-text\' | translate }}\n\n\n\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;overflow-x:auto;padding:0}:host .status{border-radius:20px;font-weight:500;padding:5px 15px}:host .status-debug{color:green;background:#0080001a}:host .status-warning{color:orange;background:#ffa5001a}:host .status-error{color:red;background:#ff00001a}:host .status-info{color:#00f;background:#0000801a}:host .msg-status-exception{color:red}\n']}]}],ctorParameters:()=>[],propDecorators:{ctx:[{type:a}],dialogRef:[{type:a}],searchInputField:[{type:o,args:["searchInput"]}],sort:[{type:o,args:[g]}],paginator:[{type:o,args:[h]}]}});class pa{constructor(e,t,n){this.fb=e,this.attributeService=t,this.utils=n,this.isNumericData=!1,this.dataTypeDefined=!1,this.statisticsKeys=[],this.commands=[],this.subscriptionOptions={callbacks:{onDataUpdated:()=>this.ctx.ngZone.run((()=>{this.onDataUpdated()})),onDataUpdateError:(e,t)=>this.ctx.ngZone.run((()=>{this.onDataUpdateError(t)}))},useDashboardTimewindow:!1,legendConfig:{position:S.bottom}},this.init=()=>{this.flotCtx={$scope:this.ctx.$scope,$injector:this.ctx.$injector,utils:this.ctx.utils,isMobile:this.ctx.isMobile,isEdit:this.ctx.isEdit,subscriptionApi:this.ctx.subscriptionApi,detectChanges:this.ctx.detectChanges,settings:this.ctx.settings}},this.updateChart=()=>{},this.resize=()=>{};const a={property:"0",direction:w.DESC};this.pageLink=new C(Number.POSITIVE_INFINITY,0,null,a),this.displayedColumns=["0","1"],this.dataSource=new y([]),this.statisticForm=this.fb.group({statisticKey:[null,[]]}),this.statisticForm.get("statisticKey").valueChanges.subscribe((e=>{this.commandObj=null,this.commands.length&&(this.commandObj=this.commands.find((t=>t.attributeOnGateway===e))),this.subscriptionInfo&&this.createChartsSubscription(this.ctx.defaultSubscription.datasources[0].entity,e)}))}ngAfterViewInit(){if(this.dataSource.sort=this.sort,this.sort.sortChange.subscribe((()=>this.sortData())),this.init(),this.ctx.defaultSubscription.datasources.length){const e=this.ctx.defaultSubscription.datasources[0].entity;if(e.id.id===k)return;this.general?this.attributeService.getEntityTimeseriesLatest(e.id).subscribe((t=>{const n=Object.keys(t).filter((e=>e.includes("ConnectorEventsProduced")||e.includes("ConnectorEventsSent")));this.createGeneralChartsSubscription(e,n)})):this.attributeService.getEntityAttributes(e.id,L.SHARED_SCOPE,["general_configuration"]).subscribe((t=>{t&&t.length&&(this.commands=t[0].value.statistics.commands,!this.statisticForm.get("statisticKey").value&&this.commands&&this.commands.length&&(this.statisticForm.get("statisticKey").setValue(this.commands[0].attributeOnGateway),this.createChartsSubscription(e,this.commands[0].attributeOnGateway)))}))}}navigateToStatistics(){const e=J(this.ctx.stateController.getStateParams());this.ctx.stateController.openState("configuration",e)}sortData(){this.dataSource.sortData(this.dataSource.data,this.sort)}onLegendKeyHiddenChange(e){this.legendData.keys[e].dataKey.hidden=!this.legendData.keys[e].dataKey.hidden,this.subscription.updateDataVisibility(e)}createChartsSubscription(e,t){const n=[{type:F.entity,entityType:I.DEVICE,entityId:e.id.id,entityName:e.name,timeseries:[]}];n[0].timeseries=[{name:t,label:t}],this.subscriptionInfo=n,this.changeSubscription(n),this.ctx.defaultSubscription.unsubscribe()}createGeneralChartsSubscription(e,t){const n=[{type:F.entity,entityType:I.DEVICE,entityId:e.id.id,entityName:e.name,timeseries:[]}];n[0].timeseries=[],t?.length&&t.forEach((e=>{n[0].timeseries.push({name:e,label:e})})),this.ctx.defaultSubscription.datasources[0].dataKeys.forEach((e=>{n[0].timeseries.push({name:e.name,label:e.label})})),this.changeSubscription(n),this.ctx.defaultSubscription.unsubscribe()}reset(){this.resize$&&this.resize$.disconnect(),this.subscription&&this.subscription.unsubscribe()}onDataUpdateError(e){const t=this.utils.parseException(e);let n=t.name;t.message&&(n+=": "+t.message),console.error(n)}onDataUpdated(){this.isDataOnlyNumbers(),this.isNumericData&&(this.chartInited||this.initChart())}initChart(){this.chartInited=!0,this.flotCtx.$container=$(this.statisticChart.nativeElement),this.resize$.observe(this.statisticChart.nativeElement)}isDataOnlyNumbers(){this.general?this.isNumericData=!0:(this.dataSource.data=this.subscription.data.length?this.subscription.data[0].data:[],this.dataSource.data.length&&!this.dataTypeDefined&&(this.dataTypeDefined=!0,this.isNumericData=this.dataSource.data.every((e=>!isNaN(+e[1])))))}changeSubscription(e){this.subscription&&this.reset(),this.ctx.datasources[0].entity&&this.ctx.subscriptionApi.createSubscriptionFromInfo(A.timeseries,e,this.subscriptionOptions,!1,!0).subscribe((e=>{this.dataTypeDefined=!1,this.subscription=e,this.isDataOnlyNumbers(),this.legendData=this.subscription.legendData,this.flotCtx.defaultSubscription=e,this.resize$=new ResizeObserver((()=>{this.resize()})),this.ctx.detectChanges(),this.isNumericData&&this.initChart()}))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:pa,deps:[{token:me.FormBuilder},{token:X.AttributeService},{token:X.UtilsService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:pa,selector:"tb-gateway-statistics",inputs:{ctx:"ctx",general:"general"},viewQueries:[{propertyName:"sort",first:!0,predicate:g,descendants:!0},{propertyName:"statisticChart",first:!0,predicate:["statisticChart"],descendants:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n \n {{ \'gateway.statistics.statistic\' | translate }}\n \n \n {{ key }}\n \n \n {{ command.attributeOnGateway }}\n \n \n \n \n {{ \'gateway.statistics.statistic-commands-empty\' | translate }}\n \n
\n \n
\n \n {{ \'gateway.statistics.command\' | translate }}\n \n \n
\n
\n
\n \n \n {{ \'widgets.gateway.created-time\' | translate }}\n \n \n {{ row[0]| date:\'yyyy-MM-dd HH:mm:ss\' }}\n \n \n \n {{ \'widgets.gateway.message\' | translate }}\n \n \n {{ row[1] }}\n \n \n \n \n
\n {{ \'attribute.no-telemetry-text\' | translate }}\n
\n
\n \n
\n
\n
\n
\n
\n
\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;padding:0}:host .statistics-container{height:100%;overflow-y:auto}:host .statistics-container mat-card{width:40%;height:100%;margin-right:35px;padding:15px;gap:22px}@media only screen and (max-width: 750px){:host .statistics-container mat-card{width:100%}}:host .statistics-container .chart-box,:host .statistics-container .chart-container{height:100%;flex-grow:1}:host .statistics-container .chart-box{overflow:auto}:host .statistics-container>*{height:100%}:host .legend{flex-wrap:wrap;width:100%;padding-top:8px;padding-bottom:4px;margin-top:15px}:host .legend .legend-keys .legend-label{padding:2px 20px 2px 10px;white-space:nowrap}:host .legend .legend-keys .legend-label.hidden-label{text-decoration:line-through;opacity:.6}:host .legend .legend-keys .legend-label:focus{outline:none}:host .legend .legend-keys .legend-line{display:inline-block;width:15px;height:3px;text-align:left;vertical-align:middle;outline:none}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:he.MatCard,selector:"mat-card",inputs:["appearance"],exportAs:["matCard"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"component",type:b.MatTable,selector:"mat-table, table[mat-table]",exportAs:["matTable"]},{kind:"directive",type:b.MatHeaderCellDef,selector:"[matHeaderCellDef]"},{kind:"directive",type:b.MatHeaderRowDef,selector:"[matHeaderRowDef]",inputs:["matHeaderRowDef","matHeaderRowDefSticky"]},{kind:"directive",type:b.MatColumnDef,selector:"[matColumnDef]",inputs:["matColumnDef"]},{kind:"directive",type:b.MatCellDef,selector:"[matCellDef]"},{kind:"directive",type:b.MatRowDef,selector:"[matRowDef]",inputs:["matRowDefColumns","matRowDefWhen"]},{kind:"directive",type:b.MatHeaderCell,selector:"mat-header-cell, th[mat-header-cell]"},{kind:"directive",type:b.MatCell,selector:"mat-cell, td[mat-cell]"},{kind:"component",type:b.MatHeaderRow,selector:"mat-header-row, tr[mat-header-row]",exportAs:["matHeaderRow"]},{kind:"component",type:b.MatRow,selector:"mat-row, tr[mat-row]",exportAs:["matRow"]},{kind:"directive",type:f.MatSort,selector:"[matSort]",inputs:["matSortActive","matSortStart","matSortDirection","matSortDisableClear","matSortDisabled"],outputs:["matSortChange"],exportAs:["matSort"]},{kind:"component",type:f.MatSortHeader,selector:"[mat-sort-header]",inputs:["mat-sort-header","arrowPosition","start","disabled","sortActionDescription","disableClear"],exportAs:["matSortHeader"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultShowHideDirective,selector:" [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]",inputs:["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:_.DatePipe,name:"date"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayStatisticsComponent",pa),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:pa,decorators:[{type:n,args:[{selector:"tb-gateway-statistics",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n \n {{ \'gateway.statistics.statistic\' | translate }}\n \n \n {{ key }}\n \n \n {{ command.attributeOnGateway }}\n \n \n \n \n {{ \'gateway.statistics.statistic-commands-empty\' | translate }}\n \n
\n \n
\n \n {{ \'gateway.statistics.command\' | translate }}\n \n \n
\n
\n
\n \n \n {{ \'widgets.gateway.created-time\' | translate }}\n \n \n {{ row[0]| date:\'yyyy-MM-dd HH:mm:ss\' }}\n \n \n \n {{ \'widgets.gateway.message\' | translate }}\n \n \n {{ row[1] }}\n \n \n \n \n
\n {{ \'attribute.no-telemetry-text\' | translate }}\n
\n
\n \n
\n
\n
\n
\n
\n
\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;padding:0}:host .statistics-container{height:100%;overflow-y:auto}:host .statistics-container mat-card{width:40%;height:100%;margin-right:35px;padding:15px;gap:22px}@media only screen and (max-width: 750px){:host .statistics-container mat-card{width:100%}}:host .statistics-container .chart-box,:host .statistics-container .chart-container{height:100%;flex-grow:1}:host .statistics-container .chart-box{overflow:auto}:host .statistics-container>*{height:100%}:host .legend{flex-wrap:wrap;width:100%;padding-top:8px;padding-bottom:4px;margin-top:15px}:host .legend .legend-keys .legend-label{padding:2px 20px 2px 10px;white-space:nowrap}:host .legend .legend-keys .legend-label.hidden-label{text-decoration:line-through;opacity:.6}:host .legend .legend-keys .legend-label:focus{outline:none}:host .legend .legend-keys .legend-line{display:inline-block;width:15px;height:3px;text-align:left;vertical-align:middle;outline:none}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:X.AttributeService},{type:X.UtilsService}],propDecorators:{sort:[{type:o,args:[g]}],statisticChart:[{type:o,args:["statisticChart"]}],ctx:[{type:a}],general:[{type:a}]}});class ma{static{this.mqttRequestTypeKeys=Object.values(In)}static{this.mqttRequestMappingOldFields=["attributeNameJsonExpression","deviceNameJsonExpression","deviceNameTopicExpression","extension-config"]}static{this.mqttRequestMappingNewFields=["attributeNameExpressionSource","responseTopicQoS","extensionConfig"]}static mapMappingToUpgradedVersion(e){return e?.map((({converter:e,topicFilter:t,subscriptionQos:n=1})=>{const a=e.deviceInfo??this.extractConverterDeviceInfo(e),o={...e,deviceInfo:a,extensionConfig:e.extensionConfig||e["extension-config"]||null};return this.cleanUpOldFields(o),{converter:o,topicFilter:t,subscriptionQos:n}}))}static mapRequestsToUpgradedVersion(e){return this.mqttRequestTypeKeys.reduce(((t,n)=>e[n]?(t[n]=e[n].map((e=>{const t=this.mapRequestToUpgradedVersion(e,n);return this.cleanUpOldFields(t),t})),t):t),{})}static mapRequestsToDowngradedVersion(e){return this.mqttRequestTypeKeys.reduce(((t,n)=>e[n]?(t[n]=e[n].map((e=>{n===In.SERVER_SIDE_RPC&&delete e.type;const{attributeNameExpression:t,deviceInfo:a,...o}=e,i={...o,attributeNameJsonExpression:t||null,deviceNameJsonExpression:a?.deviceNameExpressionSource!==Tn.TOPIC?a?.deviceNameExpression:null,deviceNameTopicExpression:a?.deviceNameExpressionSource===Tn.TOPIC?a?.deviceNameExpression:null};return this.cleanUpNewFields(i),i})),t):t),{})}static mapMappingToDowngradedVersion(e){return e?.map((e=>{const t=this.mapConverterToDowngradedVersion(e.converter);return this.cleanUpNewFields(t),{converter:t,topicFilter:e.topicFilter}}))}static mapConverterToDowngradedVersion(e){const{deviceInfo:t,...n}=e;return e.type!==wn.BYTES?{...n,deviceNameJsonExpression:t?.deviceNameExpressionSource===Tn.MSG?t.deviceNameExpression:null,deviceTypeJsonExpression:t?.deviceProfileExpressionSource===Tn.MSG?t.deviceProfileExpression:null,deviceNameTopicExpression:t?.deviceNameExpressionSource!==Tn.MSG?t?.deviceNameExpression:null,deviceTypeTopicExpression:t?.deviceProfileExpressionSource!==Tn.MSG?t?.deviceProfileExpression:null}:{...n,deviceNameExpression:t.deviceNameExpression,deviceTypeExpression:t.deviceProfileExpression,"extension-config":e.extensionConfig}}static cleanUpOldFields(e){this.mqttRequestMappingOldFields.forEach((t=>delete e[t])),Z(e)}static cleanUpNewFields(e){this.mqttRequestMappingNewFields.forEach((t=>delete e[t])),Z(e)}static getTypeSourceByValue(e){return e.includes("${")?Tn.MSG:e.includes("/")?Tn.TOPIC:Tn.CONST}static extractConverterDeviceInfo(e){const t=e.deviceNameExpression||e.deviceNameJsonExpression||e.deviceNameTopicExpression||null,n=e.deviceNameExpressionSource?e.deviceNameExpressionSource:t?this.getTypeSourceByValue(t):null,a=e.deviceProfileExpression||e.deviceTypeTopicExpression||e.deviceTypeJsonExpression||"default",o=e.deviceProfileExpressionSource?e.deviceProfileExpressionSource:a?this.getTypeSourceByValue(a):null;return t||a?{deviceNameExpression:t,deviceNameExpressionSource:n,deviceProfileExpression:a,deviceProfileExpressionSource:o}:null}static mapRequestToUpgradedVersion(e,t){const n=e.deviceNameJsonExpression||e.deviceNameTopicExpression||null,a=e.deviceTypeTopicExpression||e.deviceTypeJsonExpression||"default",o=a?this.getTypeSourceByValue(a):null,i=e.attributeNameExpressionSource||e.attributeNameJsonExpression||null,r=t===In.SERVER_SIDE_RPC?1:null,s=t===In.SERVER_SIDE_RPC?e.responseTopicExpression?Fn.WithResponse:Fn.WithoutResponse:null;return{...e,attributeNameExpression:i,attributeNameExpressionSource:i?this.getTypeSourceByValue(i):null,deviceInfo:e.deviceInfo?e.deviceInfo:n?{deviceNameExpression:n,deviceNameExpressionSource:this.getTypeSourceByValue(n),deviceProfileExpression:a,deviceProfileExpressionSource:o}:null,responseTopicQoS:r,type:s}}}e("MqttVersionMappingUtil",ma);class da{constructor(e,t){this.gatewayVersionIn=e,this.connector=t,this.gatewayVersion=ba.parseVersion(this.gatewayVersionIn),this.configVersion=ba.parseVersion(this.connector.configVersion)}getProcessedByVersion(){return this.isVersionUpdateNeeded()?this.processVersionUpdate():this.connector}processVersionUpdate(){return this.isVersionUpgradeNeeded()?this.getUpgradedVersion():this.isVersionDowngradeNeeded()?this.getDowngradedVersion():this.connector}isVersionUpdateNeeded(){return!!this.gatewayVersion&&this.configVersion!==this.gatewayVersion}isVersionUpgradeNeeded(){return this.gatewayVersion>=ba.parseVersion(Ut.Current)&&(!this.configVersion||this.configVersion=ba.parseVersion(Ut.Current)&&this.configVersion>this.gatewayVersion}}e("GatewayConnectorVersionProcessor",da);class ua extends da{constructor(e,t){super(e,t),this.gatewayVersionIn=e,this.connector=t,this.mqttRequestTypeKeys=Object.values(In)}getUpgradedVersion(){const{connectRequests:e,disconnectRequests:t,attributeRequests:n,attributeUpdates:a,serverSideRpc:o}=this.connector.configurationJson;let i={...this.connector.configurationJson,requestsMapping:ma.mapRequestsToUpgradedVersion({connectRequests:e,disconnectRequests:t,attributeRequests:n,attributeUpdates:a,serverSideRpc:o}),mapping:ma.mapMappingToUpgradedVersion(this.connector.configurationJson.mapping)};return this.mqttRequestTypeKeys.forEach((e=>{const{[e]:t,...n}=i;i={...n}})),this.cleanUpConfigJson(i),{...this.connector,configurationJson:i,configVersion:this.gatewayVersionIn}}getDowngradedVersion(){const{requestsMapping:e,mapping:t,...n}=this.connector.configurationJson,a=e?ma.mapRequestsToDowngradedVersion(e):{},o=ma.mapMappingToDowngradedVersion(t);return{...this.connector,configurationJson:{...n,...a,mapping:o},configVersion:this.gatewayVersionIn}}cleanUpConfigJson(e){ee(e.requestsMapping,{})&&delete e.requestsMapping,ee(e.mapping,[])&&delete e.mapping}}e("MqttVersionProcessor",ua);class ga extends da{constructor(e,t){super(e,t),this.gatewayVersionIn=e,this.connector=t}getUpgradedVersion(){const e=this.connector.configurationJson;return{...this.connector,configurationJson:{master:e.master?.slaves?ha.mapMasterToUpgradedVersion(e.master):{slaves:[]},slave:e.slave?ha.mapSlaveToUpgradedVersion(e.slave):{}},configVersion:this.gatewayVersionIn}}getDowngradedVersion(){const e=this.connector.configurationJson;return{...this.connector,configurationJson:{...e,slave:e.slave?ha.mapSlaveToDowngradedVersion(e.slave):{},master:e.master?.slaves?ha.mapMasterToDowngradedVersion(e.master):{slaves:[]}},configVersion:this.gatewayVersionIn}}}e("ModbusVersionProcessor",ga);class fa extends da{constructor(e,t){super(e,t),this.gatewayVersionIn=e,this.connector=t}getUpgradedVersion(){const e=this.connector.configurationJson.server;return{...this.connector,configurationJson:{server:e?xa.mapServerToUpgradedVersion(e):{},mapping:e?.mapping?xa.mapMappingToUpgradedVersion(e.mapping):[]},configVersion:this.gatewayVersionIn}}getDowngradedVersion(){return{...this.connector,configurationJson:{server:xa.mapServerToDowngradedVersion(this.connector.configurationJson)},configVersion:this.gatewayVersionIn}}}e("OpcVersionProcessor",fa);class ya{constructor(){this.initialized=new i,this.fb=r(de),this.destroy$=new Se,this.basicFormGroup=this.initBasicFormGroup(),this.basicFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.onBasicFormGroupChange(e)))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.initialized.emit()}validate(){return this.basicFormGroup.valid?null:{basicFormGroup:{valid:!1}}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){this.basicFormGroup.setValue(this.mapConfigToFormValue(e),{emitEvent:!1})}onBasicFormGroupChange(e){this.onChange(this.getMappedValue(e)),this.onTouched()}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ya,deps:[],target:t.ɵɵFactoryTarget.Directive})}static{this.ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"18.2.6",type:ya,inputs:{generalTabContent:"generalTabContent"},outputs:{initialized:"initialized"},ngImport:t})}}e("GatewayConnectorBasicConfigDirective",ya),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ya,decorators:[{type:s}],ctorParameters:()=>[],propDecorators:{generalTabContent:[{type:a}],initialized:[{type:l}]}});class ba{static getConfig(e,t){switch(e.type){case _t.MQTT:return new ua(t,e).getProcessedByVersion();case _t.OPCUA:return new fa(t,e).getProcessedByVersion();case _t.MODBUS:return new ga(t,e).getProcessedByVersion();default:return e}}static parseVersion(e){return te(e)?e:ne(e)?parseFloat(e.replace(/\./g,"").slice(0,3))/100:0}}e("GatewayConnectorVersionMappingUtil",ba);class ha{static mapMasterToUpgradedVersion(e){return{slaves:e.slaves.map((e=>{const{sendDataOnlyOnChange:t,...n}=e;return{...n,deviceType:e.deviceType??"default",reportStrategy:t?{type:sn.OnChange}:{type:sn.OnReportPeriod,reportPeriod:e.pollPeriod}}}))}}static mapMasterToDowngradedVersion(e){return{slaves:e.slaves.map((e=>{const{reportStrategy:t,...n}=e;return{...n,sendDataOnlyOnChange:t?.type!==sn.OnReportPeriod}}))}}static mapSlaveToDowngradedVersion(e){if(!e?.values)return e;const t=Object.keys(e.values).reduce(((t,n)=>t={...t,[n]:[e.values[n]]}),{});return{...e,values:t}}static mapSlaveToUpgradedVersion(e){if(!e?.values)return e;const t=Object.keys(e.values).reduce(((t,n)=>t={...t,[n]:this.mapValuesToUpgradedVersion(e.values[n][0])}),{});return{...e,values:t}}static mapValuesToUpgradedVersion(e){return Object.keys(e).reduce(((t,n)=>t={...t,[n]:e[n].map((e=>({...e,type:"int"===e.type?ea.INT16:e.type})))}),{})}}e("ModbusVersionMappingUtil",ha);class xa{static mapServerToUpgradedVersion(e){const{mapping:t,disableSubscriptions:n,pollPeriodInMillis:a,...o}=e;return{...o,pollPeriodInMillis:a??5e3,enableSubscriptions:!n}}static mapServerToDowngradedVersion(e){const{mapping:t,server:n}=e,{enableSubscriptions:a,...o}=n??{};return{...o,mapping:t?this.mapMappingToDowngradedVersion(t):[],disableSubscriptions:!a}}static mapMappingToUpgradedVersion(e){return e.map((e=>({...e,deviceNodeSource:this.getDeviceNodeSourceByValue(e.deviceNodePattern),deviceInfo:{deviceNameExpression:e.deviceNamePattern,deviceNameExpressionSource:this.getTypeSourceByValue(e.deviceNamePattern),deviceProfileExpression:e.deviceTypePattern??"default",deviceProfileExpressionSource:this.getTypeSourceByValue(e.deviceTypePattern??"default")},attributes:e.attributes.map((e=>({key:e.key,type:this.getTypeSourceByValue(e.path),value:e.path}))),attributes_updates:e.attributes_updates.map((e=>({key:e.attributeOnThingsBoard,type:this.getTypeSourceByValue(e.attributeOnDevice),value:e.attributeOnDevice}))),timeseries:e.timeseries.map((e=>({key:e.key,type:this.getTypeSourceByValue(e.path),value:e.path}))),rpc_methods:e.rpc_methods.map((e=>({method:e.method,arguments:e.arguments.map((e=>({value:e,type:this.getArgumentType(e)})))})))})))}static mapMappingToDowngradedVersion(e){return e.map((e=>({...e,deviceNamePattern:e.deviceInfo.deviceNameExpression,deviceTypePattern:e.deviceInfo.deviceProfileExpression,attributes:e.attributes.map((e=>({key:e.key,path:e.value}))),attributes_updates:e.attributes_updates.map((e=>({attributeOnThingsBoard:e.key,attributeOnDevice:e.value}))),timeseries:e.timeseries.map((e=>({key:e.key,path:e.value}))),rpc_methods:e.rpc_methods.map((e=>({method:e.method,arguments:e.arguments.map((e=>e.value))})))})))}static getTypeSourceByValue(e){return e.includes("${")?Sn.IDENTIFIER:e.includes("/")||e.includes("\\")?Sn.PATH:Sn.CONST}static getDeviceNodeSourceByValue(e){return e.includes("${")?Sn.IDENTIFIER:Sn.PATH}static getArgumentType(e){switch(typeof e){case"boolean":return"boolean";case"number":return Number.isInteger(e)?"integer":"float";default:return"string"}}}e("OpcVersionMappingUtil",xa);class va{transform(e){return ba.parseVersion(e)>=ba.parseVersion(Ut.Current)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:va,deps:[],target:t.ɵɵFactoryTarget.Pipe})}static{this.ɵpipe=t.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"18.2.6",ngImport:t,type:va,isStandalone:!0,name:"isLatestVersionConfig"})}}e("LatestVersionConfigPipe",va),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:va,decorators:[{type:c,args:[{name:"isLatestVersionConfig",standalone:!0}]}]});class wa{constructor(e){this.translate=e}transform(e){return e.hasError("required")?this.translate.instant("gateway.port-required"):e.hasError("min")||e.hasError("max")?this.translate.instant("gateway.port-limits-error",{min:Et.MIN,max:Et.MAX}):""}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:wa,deps:[{token:Y.TranslateService}],target:t.ɵɵFactoryTarget.Pipe})}static{this.ɵpipe=t.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"18.2.6",ngImport:t,type:wa,isStandalone:!0,name:"getGatewayPortTooltip"})}}e("GatewayPortTooltipPipe",wa),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:wa,decorators:[{type:c,args:[{name:"getGatewayPortTooltip",standalone:!0}]}],ctorParameters:()=>[{type:Y.TranslateService}]});class Ca{transform(e){return e.map((({value:e})=>e.toString())).join(", ")}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ca,deps:[],target:t.ɵɵFactoryTarget.Pipe})}static{this.ɵpipe=t.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"18.2.6",ngImport:t,type:Ca,isStandalone:!0,name:"getRpcTemplateArrayView"})}}e("RpcTemplateArrayViewPipe",Ca),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ca,decorators:[{type:c,args:[{name:"getRpcTemplateArrayView",standalone:!0}]}]});class Ta{transform(e,t,n){return!n||n?.includes(Sn.PATH)?t!==Sn.CONST?`widget/lib/gateway/${e}-${t}_fn`:void 0:"attributes"===e||"timeseries"===e?"widget/lib/gateway/attributes_timeseries_expressions_fn":"widget/lib/gateway/expressions_fn"}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ta,deps:[],target:t.ɵɵFactoryTarget.Pipe})}static{this.ɵpipe=t.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"18.2.6",ngImport:t,type:Ta,isStandalone:!0,name:"getGatewayHelpLink"})}}e("GatewayHelpLinkPipe",Ta),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ta,decorators:[{type:c,args:[{name:"getGatewayHelpLink",standalone:!0}]}]});class Sa{constructor(e,t,n){this.elementRef=e,this.renderer=t,this.tooltip=n,this.tooltipEnabled=!0,this.position="above",this.destroy$=new Se}ngOnInit(){this.observeMouseEvents(),this.applyTruncationStyles()}ngAfterViewInit(){this.tooltip.position=this.position}ngOnDestroy(){this.tooltip._isTooltipVisible()&&this.hideTooltip(),this.destroy$.next(),this.destroy$.complete()}observeMouseEvents(){ke(this.elementRef.nativeElement,"mouseenter").pipe(Me((()=>this.tooltipEnabled)),Me((()=>this.isOverflown(this.elementRef.nativeElement))),Ee((()=>this.showTooltip())),Ne(this.destroy$)).subscribe(),ke(this.elementRef.nativeElement,"mouseleave").pipe(Me((()=>this.tooltipEnabled)),Me((()=>this.tooltip._isTooltipVisible())),Ee((()=>this.hideTooltip())),Ne(this.destroy$)).subscribe()}applyTruncationStyles(){this.renderer.setStyle(this.elementRef.nativeElement,"white-space","nowrap"),this.renderer.setStyle(this.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.elementRef.nativeElement,"text-overflow","ellipsis")}isOverflown(e){return e.clientWidth[{type:t.ElementRef},{type:t.Renderer2},{type:ze.MatTooltip}],propDecorators:{text:[{type:a,args:["tbTruncateWithTooltip"]}],tooltipEnabled:[{type:a}],position:[{type:a}]}});class ka{set chips(e){ee(this.chipsValue,e)||(this.chipsValue=e,setTimeout((()=>{this.adjustChips()}),0))}constructor(e,t,n,a){this.el=e,this.renderer=t,this.translate=n,this.window=a,this.destroy$=new Se,this.renderer.setStyle(this.el.nativeElement,"max-height","48px"),this.renderer.setStyle(this.el.nativeElement,"overflow","auto"),ke(a,"resize").pipe(Ne(this.destroy$)).subscribe((()=>{this.adjustChips()})),this.observeIntersection()}observeIntersection(){this.intersectionObserver=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&this.adjustChips()}))})),this.intersectionObserver.observe(this.el.nativeElement)}adjustChips(){const e=this.el.nativeElement,t=this.el.nativeElement.querySelector(".ellipsis-chip"),n=parseFloat(this.window.getComputedStyle(t).marginLeft)||0,a=e.querySelectorAll("mat-chip:not(.ellipsis-chip)");if(this.chipsValue.length>1){const o=this.el.nativeElement.querySelector(".ellipsis-text");this.renderer.setStyle(t,"display","inline-flex"),o.innerHTML=this.translate.instant("gateway.ellipsis-chips-text",{count:this.chipsValue.length});const i=e.offsetWidth-(t.offsetWidth+n);let r=0,s=0;a.forEach((e=>{this.renderer.setStyle(e,"display","inline-flex");const t=e.querySelector(".mdc-evolution-chip__text-label");this.applyMaxChipTextWidth(t,i/3),r+(e.offsetWidth+n)<=i&&s[{type:t.ElementRef},{type:t.Renderer2},{type:Y.TranslateService},{type:Window,decorators:[{type:p,args:[ae]}]}],propDecorators:{chips:[{type:a,args:["tb-ellipsis-chip-list"]}]}});class La{constructor(e,t,n,a){this.attributeService=e,this.telemetryWsService=t,this.zone=n,this.translate=a,this.attributesSubject=new Le([]),this.pageDataSubject=new Le(M()),this.pageData$=this.pageDataSubject.asObservable(),this.selection=new je(!0,[])}connect(e){return this.attributesSubject.asObservable()}disconnect(e){this.attributesSubject.complete(),this.pageDataSubject.complete(),this.telemetrySubscriber&&(this.telemetrySubscriber.unsubscribe(),this.telemetrySubscriber=null)}loadAttributes(e,t,n,a=!1){a&&(this.allAttributes=null,this.telemetrySubscriber&&(this.telemetrySubscriber.unsubscribe(),this.telemetrySubscriber=null)),this.selection.clear();const o=new Fe;return this.fetchAttributes(e,t,n).pipe(qe((()=>Ie(M())))).subscribe((e=>{this.attributesSubject.next(e.data),this.pageDataSubject.next(e),o.next(e)})),o}fetchAttributes(e,t,n){return this.getAllAttributes(e,t).pipe(De((e=>{const t=e.filter((e=>0!==e.lastUpdateTs));return n.filterData(t)})))}getAllAttributes(e,t){if(!this.allAttributes){let n;E.get(t)?(this.telemetrySubscriber=q.createEntityAttributesSubscription(this.telemetryWsService,e,t,this.zone),this.telemetrySubscriber.subscribe(),n=this.telemetrySubscriber.attributeData$()):n=this.attributeService.getEntityAttributes(e,t),this.allAttributes=n.pipe(Pe(1),Ge())}return this.allAttributes}isAllSelected(){const e=this.selection.selected.length;return this.attributesSubject.pipe(De((t=>e===t.length)))}isEmpty(){return this.attributesSubject.pipe(De((e=>!e.length)))}total(){return this.pageDataSubject.pipe(De((e=>e.totalElements)))}masterToggle(){this.attributesSubject.pipe(Ee((e=>{this.selection.selected.length===e.length?this.selection.clear():e.forEach((e=>{this.selection.select(e)}))})),Oe(1)).subscribe()}}e("AttributeDatasource",La);class Fa{constructor(e){this.attributeService=e,this.saveTemplate=new i,this.useTemplate=new i,this.originalOrder=()=>0,this.isObject=e=>oe(e),this.isArray=e=>Array.isArray(e),this.SNMPMethodsTranslations=tn}ngOnInit(){}applyTemplate(e,t){e.stopPropagation(),this.useTemplate.emit(t)}deleteTemplate(e,t){e.stopPropagation();const n=this.rpcTemplates.findIndex((e=>e.name==t.name));this.rpcTemplates.splice(n,1);const a=`${this.connectorType}_template`;this.attributeService.saveEntityAttributes({id:this.ctx.defaultSubscription.targetDeviceId,entityType:I.DEVICE},L.SERVER_SCOPE,[{key:a,value:this.rpcTemplates}]).subscribe((()=>{}))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Fa,deps:[{token:X.AttributeService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Fa,selector:"tb-gateway-service-rpc-connector-templates",inputs:{connectorType:"connectorType",ctx:"ctx",rpcTemplates:"rpcTemplates"},outputs:{saveTemplate:"saveTemplate",useTemplate:"useTemplate"},ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
{{ \'gateway.rpc.templates-title\' | translate }}
\n\n \n \n {{template.name}}\n \n \n \n \n \n \n\n \n \n \n
\n
\n {{!innerValue ? (\'gateway.rpc.\' + config.key | translate) : config.key}}\n
\n
\n {{ config.value | getRpcTemplateArrayView }}\n
\n \n
\n \n
\n {{ config.value }}\n {{ SNMPMethodsTranslations.get(config.value) | translate }}\n \n \n \n \n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;padding:0}:host .title{font-weight:500}:host .template-key{color:#00000061;height:32px;line-height:32px}:host .boolean-true,:host .boolean-false{border-radius:3px;height:32px;line-height:32px;padding:0 12px;width:fit-content;font-size:14px;text-transform:capitalize}:host .boolean-false{color:#d12730;background-color:#d1273014}:host .boolean-true{color:#198038;background-color:#19803814}:host mat-expansion-panel{margin-top:10px;overflow:visible}:host .mat-expansion-panel-header-description{flex-direction:row-reverse;align-items:center;margin-right:0;flex:0}:host .mat-expansion-panel-header-description>mat-icon{margin-left:15px;color:#00000061}:host .mat-expansion-panel-header{padding:0 0 0 12px}:host .mat-expansion-panel-header.mat-expansion-panel-header.mat-expanded{height:48px}:host .mat-expansion-panel-header .mat-content.mat-content-hide-toggle{margin-right:0}:host .rpc-params-row{overflow:hidden;white-space:nowrap}:host .rpc-params-row :not(:first-child){white-space:pre;overflow:hidden;text-overflow:ellipsis}:host .template-name{overflow:hidden;text-overflow:ellipsis;display:block}:host ::ng-deep .mat-content{align-items:center}:host .mat-expansion-panel-header-title{flex:1;margin:0}:host .array-value{margin-left:10px}\n'],dependencies:[{kind:"directive",type:_.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:_.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:$e.MatExpansionPanelDescription,selector:"mat-panel-description"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:K.DefaultClassDirective,selector:" [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]",inputs:["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"]},{kind:"directive",type:K.DefaultStyleDirective,selector:" [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]",inputs:["ngStyle","ngStyle.xs","ngStyle.sm","ngStyle.md","ngStyle.lg","ngStyle.xl","ngStyle.lt-sm","ngStyle.lt-md","ngStyle.lt-lg","ngStyle.lt-xl","ngStyle.gt-xs","ngStyle.gt-sm","ngStyle.gt-md","ngStyle.gt-lg"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:_.KeyValuePipe,name:"keyvalue"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"pipe",type:Ca,name:"getRpcTemplateArrayView"}]})}}e("GatewayServiceRPCConnectorTemplatesComponent",Fa),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Fa,decorators:[{type:n,args:[{selector:"tb-gateway-service-rpc-connector-templates",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
{{ \'gateway.rpc.templates-title\' | translate }}
\n\n \n \n {{template.name}}\n \n \n \n \n \n \n\n \n \n \n
\n
\n {{!innerValue ? (\'gateway.rpc.\' + config.key | translate) : config.key}}\n
\n
\n {{ config.value | getRpcTemplateArrayView }}\n
\n \n
\n \n
\n {{ config.value }}\n {{ SNMPMethodsTranslations.get(config.value) | translate }}\n \n \n \n \n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;padding:0}:host .title{font-weight:500}:host .template-key{color:#00000061;height:32px;line-height:32px}:host .boolean-true,:host .boolean-false{border-radius:3px;height:32px;line-height:32px;padding:0 12px;width:fit-content;font-size:14px;text-transform:capitalize}:host .boolean-false{color:#d12730;background-color:#d1273014}:host .boolean-true{color:#198038;background-color:#19803814}:host mat-expansion-panel{margin-top:10px;overflow:visible}:host .mat-expansion-panel-header-description{flex-direction:row-reverse;align-items:center;margin-right:0;flex:0}:host .mat-expansion-panel-header-description>mat-icon{margin-left:15px;color:#00000061}:host .mat-expansion-panel-header{padding:0 0 0 12px}:host .mat-expansion-panel-header.mat-expansion-panel-header.mat-expanded{height:48px}:host .mat-expansion-panel-header .mat-content.mat-content-hide-toggle{margin-right:0}:host .rpc-params-row{overflow:hidden;white-space:nowrap}:host .rpc-params-row :not(:first-child){white-space:pre;overflow:hidden;text-overflow:ellipsis}:host .template-name{overflow:hidden;text-overflow:ellipsis;display:block}:host ::ng-deep .mat-content{align-items:center}:host .mat-expansion-panel-header-title{flex:1;margin:0}:host .array-value{margin-left:10px}\n']}]}],ctorParameters:()=>[{type:X.AttributeService}],propDecorators:{connectorType:[{type:a}],ctx:[{type:a}],saveTemplate:[{type:l}],useTemplate:[{type:l}],rpcTemplates:[{type:a}]}});class Ia{constructor(e){this.fb=e,this.BrokerSecurityType=dn,this.securityTypes=Object.values(dn),this.SecurityTypeTranslationsMap=un,this.destroy$=new Se,this.propagateChange=e=>{},this.securityFormGroup=this.fb.group({type:[dn.ANONYMOUS,[]],username:["",[ue.required,ue.pattern(kt)]],password:["",[ue.required,ue.pattern(kt)]]}),this.observeSecurityForm()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){e.type||(e.type=dn.ANONYMOUS),this.securityFormGroup.reset(e),this.updateView(e)}validate(){return this.securityFormGroup.valid?null:{securityForm:{valid:!1}}}updateView(e){this.propagateChange(e)}updateValidators(e){e===dn.BASIC?(this.securityFormGroup.get("username").enable({emitEvent:!1}),this.securityFormGroup.get("password").enable({emitEvent:!1})):(this.securityFormGroup.get("username").disable({emitEvent:!1}),this.securityFormGroup.get("password").disable({emitEvent:!1}))}observeSecurityForm(){this.securityFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.updateView(e))),this.securityFormGroup.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.updateValidators(e)))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ia,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Ia,isStandalone:!0,selector:"tb-rest-connector-security",providers:[{provide:ge,useExisting:m((()=>Ia)),multi:!0},{provide:fe,useExisting:m((()=>Ia)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
gateway.security
\n \n \n {{ SecurityTypeTranslationsMap.get(type) | translate }}\n \n \n
\n \n
\n
gateway.username
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n \n warning\n \n
\n \n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block;margin-bottom:10px}:host .fields-label{font-weight:500}:host .hide-toggle{display:none}\n'],dependencies:[{kind:"ngmodule",type:D},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:tt.TogglePasswordComponent,selector:"tb-toggle-password"},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ia,decorators:[{type:n,args:[{selector:"tb-rest-connector-security",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>Ia)),multi:!0},{provide:fe,useExisting:m((()=>Ia)),multi:!0}],standalone:!0,imports:[D,H],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
gateway.security
\n \n \n {{ SecurityTypeTranslationsMap.get(type) | translate }}\n \n \n
\n \n
\n
gateway.username
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n \n warning\n \n
\n \n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block;margin-bottom:10px}:host .fields-label{font-weight:500}:host .hide-toggle{display:none}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder}]});class Aa{constructor(e,t){this.fb=e,this.dialog=t,this.sendCommand=new i,this.saveTemplate=new i,this.ConnectorType=_t,this.bACnetRequestTypes=Object.values(Wt),this.bACnetObjectTypes=Object.values(Kt),this.bLEMethods=Object.values(Yt),this.cANByteOrders=Object.values(Jt),this.socketMethodProcessings=Object.values(Xt),this.socketEncodings=Object.values(an),this.sNMPMethods=Object.values(en),this.hTTPMethods=Object.values(nn),this.bACnetRequestTypesTranslates=jt,this.bACnetObjectTypesTranslates=$t,this.bLEMethodsTranslates=Qt,this.SocketMethodProcessingsTranslates=Zt,this.SNMPMethodsTranslations=tn,this.gatewayConnectorDefaultTypesTranslates=Ht,this.urlPattern=/^[-a-zA-Zd_$:{}?~+=\/.0-9-]*$/,this.numbersOnlyPattern=/^[0-9]*$/,this.hexOnlyPattern=/^[0-9A-Fa-f ]+$/,this.propagateChange=e=>{},this.destroy$=new Se}ngOnInit(){this.commandForm=this.connectorParamsFormGroupByType(this.connectorType),this.commandForm.valueChanges.subscribe((e=>{const t={};switch(this.connectorType){case _t.REST:case _t.REQUEST:e.httpHeaders.forEach((e=>{t[e.headerName]=e.value})),e.httpHeaders=t}this.commandForm.valid&&this.propagateChange({...this.commandForm.value,...e})}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}connectorParamsFormGroupByType(e){let t;switch(e){case _t.BACNET:t=this.fb.group({method:[null,[ue.required,ue.pattern(kt)]],requestType:[null,[ue.required,ue.pattern(kt)]],requestTimeout:[null,[ue.required,ue.min(10),ue.pattern(this.numbersOnlyPattern)]],objectType:[null,[]],identifier:[null,[ue.required,ue.min(1),ue.pattern(this.numbersOnlyPattern)]],propertyId:[null,[ue.required,ue.pattern(kt)]]});break;case _t.BLE:t=this.fb.group({methodRPC:[null,[ue.required,ue.pattern(kt)]],characteristicUUID:["00002A00-0000-1000-8000-00805F9B34FB",[ue.required,ue.pattern(kt)]],methodProcessing:[null,[ue.required]],withResponse:[!1,[]]});break;case _t.CAN:t=this.fb.group({method:[null,[ue.required,ue.pattern(kt)]],nodeID:[null,[ue.required,ue.min(0),ue.pattern(this.numbersOnlyPattern)]],isExtendedID:[!1,[]],isFD:[!1,[]],bitrateSwitch:[!1,[]],dataLength:[null,[ue.min(1),ue.pattern(this.numbersOnlyPattern)]],dataByteorder:[null,[]],dataBefore:[null,[ue.pattern(kt),ue.pattern(this.hexOnlyPattern)]],dataAfter:[null,[ue.pattern(kt),ue.pattern(this.hexOnlyPattern)]],dataInHEX:[null,[ue.pattern(kt),ue.pattern(this.hexOnlyPattern)]],dataExpression:[null,[ue.pattern(kt)]]});break;case _t.FTP:t=this.fb.group({methodFilter:[null,[ue.required,ue.pattern(kt)]],valueExpression:[null,[ue.required,ue.pattern(kt)]]});break;case _t.OCPP:t=this.fb.group({methodRPC:[null,[ue.required,ue.pattern(kt)]],valueExpression:[null,[ue.required,ue.pattern(kt)]],withResponse:[!1,[]]});break;case _t.SOCKET:t=this.fb.group({methodRPC:[null,[ue.required,ue.pattern(kt)]],methodProcessing:[null,[ue.required]],encoding:[an.UTF_8,[ue.required,ue.pattern(kt)]],withResponse:[!1,[]]});break;case _t.XMPP:t=this.fb.group({methodRPC:[null,[ue.required,ue.pattern(kt)]],valueExpression:[null,[ue.required,ue.pattern(kt)]],withResponse:[!1,[]]});break;case _t.SNMP:t=this.fb.group({requestFilter:[null,[ue.required,ue.pattern(kt)]],method:[null,[ue.required]],withResponse:[!1,[]],oid:this.fb.array([],[ue.required])});break;case _t.REST:t=this.fb.group({methodFilter:[null,[ue.required,ue.pattern(kt)]],httpMethod:[null,[ue.required]],requestUrlExpression:[null,[ue.required,ue.pattern(this.urlPattern)]],responseTimeout:[null,[ue.required,ue.min(10),ue.pattern(this.numbersOnlyPattern)]],timeout:[null,[ue.required,ue.min(10),ue.pattern(this.numbersOnlyPattern)]],tries:[null,[ue.required,ue.min(1),ue.pattern(this.numbersOnlyPattern)]],valueExpression:[null,[ue.required,ue.pattern(kt)]],httpHeaders:this.fb.array([]),security:[{},[ue.required]]});break;case _t.REQUEST:t=this.fb.group({methodFilter:[null,[ue.required,ue.pattern(kt)]],httpMethod:[null,[ue.required]],requestUrlExpression:[null,[ue.required,ue.pattern(this.urlPattern)]],responseTimeout:[null,[ue.required,ue.min(10),ue.pattern(this.numbersOnlyPattern)]],timeout:[null,[ue.required,ue.min(10),ue.pattern(this.numbersOnlyPattern)]],tries:[null,[ue.required,ue.min(1),ue.pattern(this.numbersOnlyPattern)]],requestValueExpression:[null,[ue.required,ue.pattern(kt)]],responseValueExpression:[null,[ue.pattern(kt)]],httpHeaders:this.fb.array([])});break;default:t=this.fb.group({command:[null,[ue.required,ue.pattern(kt)]],params:[{},[It]]})}return t}addSNMPoid(e=null){const t=this.commandForm.get("oid");t&&t.push(this.fb.control(e,[ue.required,ue.pattern(kt)]),{emitEvent:!1})}removeSNMPoid(e){this.commandForm.get("oid").removeAt(e)}addHTTPHeader(e={headerName:null,value:null}){const t=this.commandForm.get("httpHeaders"),n=this.fb.group({headerName:[e.headerName,[ue.required,ue.pattern(kt)]],value:[e.value,[ue.required,ue.pattern(kt)]]});t&&t.push(n,{emitEvent:!1})}removeHTTPHeader(e){this.commandForm.get("httpHeaders").removeAt(e)}getFormArrayControls(e){return this.commandForm.get(e).controls}openEditJSONDialog(e){e&&e.stopPropagation(),this.dialog.open(Qe,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{jsonValue:this.commandForm.get("params").value,required:!0}}).afterClosed().subscribe((e=>{e&&this.commandForm.get("params").setValue(e)}))}save(){this.saveTemplate.emit()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}clearFromArrayByName(e){const t=this.commandForm.get(e);for(;0!==t.length;)t.removeAt(0)}writeValue(e){if("object"==typeof e){switch(e=J(e),this.connectorType){case _t.SNMP:this.clearFromArrayByName("oid"),e.oid.forEach((e=>{this.addSNMPoid(e)})),delete e.oid;break;case _t.REQUEST:case _t.REST:this.clearFromArrayByName("httpHeaders"),e.httpHeaders&&Object.entries(e.httpHeaders).forEach((e=>{this.addHTTPHeader({headerName:e[0],value:e[1]})})),delete e.httpHeaders}this.commandForm.patchValue(e,{onlySelf:!1})}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Aa,deps:[{token:me.FormBuilder},{token:Je.MatDialog}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Aa,selector:"tb-gateway-service-rpc-connector",inputs:{connectorType:"connectorType"},outputs:{sendCommand:"sendCommand",saveTemplate:"saveTemplate"},providers:[{provide:ge,useExisting:m((()=>Aa)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n {{ \'gateway.rpc.title\' | translate: {type: gatewayConnectorDefaultTypesTranslates.get(connectorType)} }}
\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.requestType\' | translate }}\n \n \n {{bACnetRequestTypesTranslates.get(type) | translate}}\n \n \n \n \n {{ \'gateway.rpc.requestTimeout\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.objectType\' | translate }}\n \n \n {{bACnetObjectTypesTranslates.get(type) | translate}}\n \n \n \n \n {{ \'gateway.rpc.identifier\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.propertyId\' | translate }}\n \n \n
\n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.characteristicUUID\' | translate }}\n \n \n \n {{ \'gateway.rpc.methodProcessing\' | translate }}\n \n \n {{bLEMethodsTranslates.get(type) | translate}}\n \n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.nodeID\' | translate }}\n \n \n \n {{ \'gateway.rpc.isExtendedID\' | translate }}\n \n \n {{ \'gateway.rpc.isFD\' | translate }}\n \n \n {{ \'gateway.rpc.bitrateSwitch\' | translate }}\n \n
\n \n {{ \'gateway.rpc.dataLength\' | translate }}\n \n \n \n {{ \'gateway.rpc.dataByteorder\' | translate }}\n \n \n {{ order | translate }}\n \n \n \n
\n
\n \n {{ \'gateway.rpc.dataBefore\' | translate }}\n \n \n \n {{ \'gateway.rpc.dataAfter\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.dataInHEX\' | translate }}\n \n \n \n {{ \'gateway.rpc.dataExpression\' | translate }}\n \n \n
\n \n \n {{ \'gateway.rpc.methodFilter\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.methodProcessing\' | translate }}\n \n \n {{ SocketMethodProcessingsTranslates.get(method) | translate }}\n \n \n \n \n {{ \'gateway.rpc.encoding\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.requestFilter\' | translate }}\n \n \n \n {{ \'gateway.rpc.method\' | translate }}\n \n \n {{ SNMPMethodsTranslations.get(method) | translate }}\n \n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n
\n {{ \'gateway.rpc.oids\' | translate }}*\n
\n \n \n \n delete\n \n
\n \n
\n
\n \n \n {{ \'gateway.rpc.methodFilter\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.httpMethod\' | translate }}\n \n \n {{ method }}\n \n \n \n \n {{ \'gateway.rpc.requestUrlExpression\' | translate }}\n \n \n
\n
\n \n {{ \'gateway.rpc.responseTimeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.timeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.tries\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n
\n {{ \'gateway.rpc.httpHeaders\' | translate }}\n
\n
\n {{ \'gateway.rpc.header-name\' | translate }}\n {{ \'gateway.rpc.value\' | translate }}\n \n
\n \n
\n \n \n \n \n \n \n \n delete\n \n \n
\n
\n \n
\n \n
\n \n \n {{ \'gateway.rpc.methodFilter\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.httpMethod\' | translate }}\n \n \n {{ method }}\n \n \n \n \n {{ \'gateway.rpc.requestUrlExpression\' | translate }}\n \n \n
\n
\n \n {{ \'gateway.rpc.responseTimeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.timeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.tries\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.requestValueExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.responseValueExpression\' | translate }}\n \n \n
\n {{ \'gateway.rpc.httpHeaders\' | translate }}\n
\n
\n {{ \'gateway.rpc.header-name\' | translate }}\n {{ \'gateway.rpc.value\' | translate }}\n \n
\n \n
\n \n \n \n \n \n \n \n delete\n \n \n
\n
\n \n
\n
\n \n \n {{ \'gateway.statistics.command\' | translate }}\n \n \n \n {{ \'widget-config.datasource-parameters\' | translate }}\n \n edit\n \n \n {{ \'gateway.rpc.json-value-invalid\' | translate }}\n \n \n \n
\n
\n
\n \n \n
\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;padding:0}:host .title{font-weight:500}:host .command-form{flex-wrap:nowrap}:host .command-form>button{margin-top:10px}:host .mat-mdc-slide-toggle.margin{margin-bottom:10px;margin-left:10px}:host .fields .fields-label{font-weight:500}:host .border{padding:16px;margin-bottom:10px;box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}:host .border .title{color:#0000008a}:host .border .mat-icon{color:#00000061}:host .border .mat-divider{margin-left:-16px;margin-right:-16px;margin-bottom:16px}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"directive",type:_.NgSwitchDefault,selector:"[ngSwitchDefault]"},{kind:"directive",type:Ze.TbJsonToStringDirective,selector:"[tb-json-to-string]"},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:z.MatDivider,selector:"mat-divider",inputs:["vertical","inset"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutGapDirective,selector:" [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]",inputs:["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexAlignDirective,selector:" [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]",inputs:["fxFlexAlign","fxFlexAlign.xs","fxFlexAlign.sm","fxFlexAlign.md","fxFlexAlign.lg","fxFlexAlign.xl","fxFlexAlign.lt-sm","fxFlexAlign.lt-md","fxFlexAlign.lt-lg","fxFlexAlign.lt-xl","fxFlexAlign.gt-xs","fxFlexAlign.gt-sm","fxFlexAlign.gt-md","fxFlexAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:me.FormGroupName,selector:"[formGroupName]",inputs:["formGroupName"]},{kind:"directive",type:me.FormArrayName,selector:"[formArrayName]",inputs:["formArrayName"]},{kind:"component",type:Ia,selector:"tb-rest-connector-security"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayServiceRPCConnectorComponent",Aa),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Aa,decorators:[{type:n,args:[{selector:"tb-gateway-service-rpc-connector",providers:[{provide:ge,useExisting:m((()=>Aa)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n {{ \'gateway.rpc.title\' | translate: {type: gatewayConnectorDefaultTypesTranslates.get(connectorType)} }}
\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.requestType\' | translate }}\n \n \n {{bACnetRequestTypesTranslates.get(type) | translate}}\n \n \n \n \n {{ \'gateway.rpc.requestTimeout\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.objectType\' | translate }}\n \n \n {{bACnetObjectTypesTranslates.get(type) | translate}}\n \n \n \n \n {{ \'gateway.rpc.identifier\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.propertyId\' | translate }}\n \n \n
\n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.characteristicUUID\' | translate }}\n \n \n \n {{ \'gateway.rpc.methodProcessing\' | translate }}\n \n \n {{bLEMethodsTranslates.get(type) | translate}}\n \n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.nodeID\' | translate }}\n \n \n \n {{ \'gateway.rpc.isExtendedID\' | translate }}\n \n \n {{ \'gateway.rpc.isFD\' | translate }}\n \n \n {{ \'gateway.rpc.bitrateSwitch\' | translate }}\n \n
\n \n {{ \'gateway.rpc.dataLength\' | translate }}\n \n \n \n {{ \'gateway.rpc.dataByteorder\' | translate }}\n \n \n {{ order | translate }}\n \n \n \n
\n
\n \n {{ \'gateway.rpc.dataBefore\' | translate }}\n \n \n \n {{ \'gateway.rpc.dataAfter\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.dataInHEX\' | translate }}\n \n \n \n {{ \'gateway.rpc.dataExpression\' | translate }}\n \n \n
\n \n \n {{ \'gateway.rpc.methodFilter\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.methodProcessing\' | translate }}\n \n \n {{ SocketMethodProcessingsTranslates.get(method) | translate }}\n \n \n \n \n {{ \'gateway.rpc.encoding\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.methodRPC\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n \n \n {{ \'gateway.rpc.requestFilter\' | translate }}\n \n \n \n {{ \'gateway.rpc.method\' | translate }}\n \n \n {{ SNMPMethodsTranslations.get(method) | translate }}\n \n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n
\n {{ \'gateway.rpc.oids\' | translate }}*\n
\n \n \n \n delete\n \n
\n \n
\n
\n \n \n {{ \'gateway.rpc.methodFilter\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.httpMethod\' | translate }}\n \n \n {{ method }}\n \n \n \n \n {{ \'gateway.rpc.requestUrlExpression\' | translate }}\n \n \n
\n
\n \n {{ \'gateway.rpc.responseTimeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.timeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.tries\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n
\n {{ \'gateway.rpc.httpHeaders\' | translate }}\n
\n
\n {{ \'gateway.rpc.header-name\' | translate }}\n {{ \'gateway.rpc.value\' | translate }}\n \n
\n \n
\n \n \n \n \n \n \n \n delete\n \n \n
\n
\n \n
\n \n
\n \n \n {{ \'gateway.rpc.methodFilter\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.httpMethod\' | translate }}\n \n \n {{ method }}\n \n \n \n \n {{ \'gateway.rpc.requestUrlExpression\' | translate }}\n \n \n
\n
\n \n {{ \'gateway.rpc.responseTimeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.timeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.tries\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.requestValueExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.responseValueExpression\' | translate }}\n \n \n
\n {{ \'gateway.rpc.httpHeaders\' | translate }}\n
\n
\n {{ \'gateway.rpc.header-name\' | translate }}\n {{ \'gateway.rpc.value\' | translate }}\n \n
\n \n
\n \n \n \n \n \n \n \n delete\n \n \n
\n
\n \n
\n
\n \n \n {{ \'gateway.statistics.command\' | translate }}\n \n \n \n {{ \'widget-config.datasource-parameters\' | translate }}\n \n edit\n \n \n {{ \'gateway.rpc.json-value-invalid\' | translate }}\n \n \n \n
\n
\n
\n \n \n
\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;padding:0}:host .title{font-weight:500}:host .command-form{flex-wrap:nowrap}:host .command-form>button{margin-top:10px}:host .mat-mdc-slide-toggle.margin{margin-bottom:10px;margin-left:10px}:host .fields .fields-label{font-weight:500}:host .border{padding:16px;margin-bottom:10px;box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}:host .border .title{color:#0000008a}:host .border .mat-icon{color:#00000061}:host .border .mat-divider{margin-left:-16px;margin-right:-16px;margin-bottom:16px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:Je.MatDialog}],propDecorators:{connectorType:[{type:a}],sendCommand:[{type:l}],saveTemplate:[{type:l}]}});class Na extends P{constructor(e,t,n,a,o){super(e,t,a),this.store=e,this.router=t,this.data=n,this.dialogRef=a,this.fb=o,this.config=this.data.config,this.templates=this.data.templates,this.templateNameCtrl=this.fb.control("",[ue.required])}validateDuplicateName(e){const t=e.value.trim();return!!this.templates.find((e=>e.name===t))}close(){this.dialogRef.close()}save(){this.templateNameCtrl.setValue(this.templateNameCtrl.value.trim()),this.templateNameCtrl.valid&&this.dialogRef.close(this.templateNameCtrl.value)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Na,deps:[{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef},{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Na,selector:"tb-gateway-service-rpc-connector-template-dialog",usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n

gateway.rpc.save-template

\n \n \n
\n
\n \n gateway.rpc.template-name\n \n \n {{ \'gateway.rpc.template-name-required\' | translate }}\n \n \n
\n {{ \'gateway.rpc.template-name-duplicate\' | translate }}\n
\n
\n
\n \n \n
\n',dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:Je.MatDialogActions,selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",inputs:["align"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayServiceRPCConnectorTemplateDialogComponent",Na),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Na,decorators:[{type:n,args:[{selector:"tb-gateway-service-rpc-connector-template-dialog",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n

gateway.rpc.save-template

\n \n \n
\n
\n \n gateway.rpc.template-name\n \n \n {{ \'gateway.rpc.template-name-required\' | translate }}\n \n \n
\n {{ \'gateway.rpc.template-name-duplicate\' | translate }}\n
\n
\n
\n \n \n
\n'}]}],ctorParameters:()=>[{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef},{type:me.FormBuilder}]});class Ma{constructor(e,t){this.fb=e,this.cdr=t,this.valueTypeKeys=Object.values(Gn),this.MappingValueType=Gn,this.valueTypes=Vn,this.onChange=e=>{},this.onTouched=()=>{},this.destroy$=new Se,this.rpcParametersFormGroup=this.fb.group({method:[null,[ue.required,ue.pattern(kt)]],arguments:this.fb.array([])}),this.observeValueChanges()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.rpcParametersFormGroup.valid?null:{rpcParametersFormGroup:{valid:!1}}}writeValue(e){this.clearArguments(),e.arguments?.map((({type:e,value:t})=>({type:e,[e]:t}))).forEach((e=>this.addArgument(e))),this.cdr.markForCheck(),this.rpcParametersFormGroup.get("method").patchValue(e.method)}observeValueChanges(){this.rpcParametersFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{const t=e.arguments.map((({type:e,...t})=>({type:e,value:t[e]})));this.onChange({method:e.method,arguments:t}),this.onTouched()}))}removeArgument(e){this.rpcParametersFormGroup.get("arguments").removeAt(e)}addArgument(e={}){const t=this.fb.group({type:[e.type??Gn.STRING],string:[e.string??{value:"",disabled:!(ee(e,{})||e.string)},[ue.required,ue.pattern(kt)]],integer:[{value:e.integer??0,disabled:!ie(e.integer)},[ue.required,ue.pattern(Lt)]],double:[{value:e.double??0,disabled:!ie(e.double)},[ue.required]],boolean:[{value:e.boolean??!1,disabled:!ie(e.boolean)},[ue.required]]});this.observeTypeChange(t),this.rpcParametersFormGroup.get("arguments").push(t,{emitEvent:!1})}clearArguments(){const e=this.rpcParametersFormGroup.get("arguments");for(;0!==e.length;)e.removeAt(0)}observeTypeChange(e){e.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{e.disable({emitEvent:!1}),e.get("type").enable({emitEvent:!1}),e.get(t).enable({emitEvent:!1})}))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ma,deps:[{token:me.FormBuilder},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Ma,isStandalone:!0,selector:"tb-gateway-opc-rpc-parameters",providers:[{provide:ge,useExisting:m((()=>Ma)),multi:!0},{provide:fe,useExisting:m((()=>Ma)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n {{ \'gateway.rpc.hint.opc-method\' | translate }}\n
\n \n {{ \'gateway.rpc.method\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.arguments\' | translate }}\n \n
\n
\n
gateway.type
\n
\n \n \n \n
\n \n \n {{ valueTypes.get(argumentFormGroup.get(\'type\').value)?.name | translate }}\n
\n
\n \n \n \n {{ valueTypes.get(valueType).name | translate }}\n \n
\n
\n
\n
\n
\n
gateway.value
\n \n \n \n \n \n \n true\n false\n \n \n \n warning\n \n \n
\n \n
\n \n
\n
\n\n',styles:['@charset "UTF-8";:host .arguments-container{margin-bottom:10px}:host .type-container{width:40%}:host .value-container{width:50%}:host .hint-container{margin-bottom:12px}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"ngmodule",type:D},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"directive",type:we.MatSelectTrigger,selector:"mat-select-trigger"},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutGapDirective,selector:" [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]",inputs:["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexAlignDirective,selector:" [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]",inputs:["fxFlexAlign","fxFlexAlign.xs","fxFlexAlign.sm","fxFlexAlign.md","fxFlexAlign.lg","fxFlexAlign.xl","fxFlexAlign.lt-sm","fxFlexAlign.lt-md","fxFlexAlign.lt-lg","fxFlexAlign.lt-xl","fxFlexAlign.gt-xs","fxFlexAlign.gt-sm","fxFlexAlign.gt-md","fxFlexAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:me.FormArrayName,selector:"[formArrayName]",inputs:["formArrayName"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ma,decorators:[{type:n,args:[{selector:"tb-gateway-opc-rpc-parameters",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>Ma)),multi:!0},{provide:fe,useExisting:m((()=>Ma)),multi:!0}],standalone:!0,imports:[H,D],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n {{ \'gateway.rpc.hint.opc-method\' | translate }}\n
\n \n {{ \'gateway.rpc.method\' | translate }}\n \n \n
\n \n {{ \'gateway.rpc.arguments\' | translate }}\n \n
\n
\n
gateway.type
\n
\n \n \n \n
\n \n \n {{ valueTypes.get(argumentFormGroup.get(\'type\').value)?.name | translate }}\n
\n
\n \n \n \n {{ valueTypes.get(valueType).name | translate }}\n \n
\n
\n
\n
\n
\n
gateway.value
\n \n \n \n \n \n \n true\n false\n \n \n \n warning\n \n \n
\n \n
\n \n
\n
\n\n',styles:['@charset "UTF-8";:host .arguments-container{margin-bottom:10px}:host .type-container{width:40%}:host .value-container{width:50%}:host .hint-container{margin-bottom:12px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:t.ChangeDetectorRef}]});class Ea{constructor(e){this.fb=e,this.onChange=e=>{},this.onTouched=()=>{},this.destroy$=new Se,this.rpcParametersFormGroup=this.fb.group({methodFilter:[null,[ue.required,ue.pattern(kt)]],requestTopicExpression:[null,[ue.required,ue.pattern(kt)]],responseTopicExpression:[{value:null,disabled:!0},[ue.required,ue.pattern(kt)]],responseTimeout:[{value:null,disabled:!0},[ue.min(10),ue.pattern(Lt)]],valueExpression:[null,[ue.required,ue.pattern(kt)]],withResponse:[!1,[]]}),this.observeValueChanges(),this.observeWithResponse()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.rpcParametersFormGroup.valid?null:{rpcParametersFormGroup:{valid:!1}}}writeValue(e){this.rpcParametersFormGroup.patchValue(e,{emitEvent:!1}),this.toggleResponseFields(e.withResponse)}observeValueChanges(){this.rpcParametersFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}observeWithResponse(){this.rpcParametersFormGroup.get("withResponse").valueChanges.pipe(Ee((e=>this.toggleResponseFields(e))),Ne(this.destroy$)).subscribe()}toggleResponseFields(e){const t=this.rpcParametersFormGroup.get("responseTopicExpression"),n=this.rpcParametersFormGroup.get("responseTimeout");e?(t.enable(),n.enable()):(t.disable(),n.disable())}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ea,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Ea,isStandalone:!0,selector:"tb-gateway-mqtt-rpc-parameters",providers:[{provide:ge,useExisting:m((()=>Ea)),multi:!0},{provide:fe,useExisting:m((()=>Ea)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n {{ \'gateway.rpc.method-name\' | translate }}\n \n \n \n {{ \'gateway.rpc.requestTopicExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n {{ \'gateway.rpc.responseTopicExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.responseTimeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n\n\n',styles:['@charset "UTF-8";:host{display:flex;flex-direction:column}:host .mat-mdc-slide-toggle.margin{margin-bottom:10px;margin-left:10px}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ea,decorators:[{type:n,args:[{selector:"tb-gateway-mqtt-rpc-parameters",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>Ea)),multi:!0},{provide:fe,useExisting:m((()=>Ea)),multi:!0}],standalone:!0,imports:[H,D],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n {{ \'gateway.rpc.method-name\' | translate }}\n \n \n \n {{ \'gateway.rpc.requestTopicExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.withResponse\' | translate }}\n \n \n {{ \'gateway.rpc.responseTopicExpression\' | translate }}\n \n \n \n {{ \'gateway.rpc.responseTimeout\' | translate }}\n \n \n \n {{ \'gateway.rpc.valueExpression\' | translate }}\n \n \n\n\n',styles:['@charset "UTF-8";:host{display:flex;flex-direction:column}:host .mat-mdc-slide-toggle.margin{margin-bottom:10px;margin-left:10px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder}]});class qa{constructor(e){this.fb=e,this.ModbusEditableDataTypes=ta,this.ModbusFunctionCodeTranslationsMap=zt,this.modbusDataTypes=Object.values(ea),this.writeFunctionCodes=[5,6,15,16],this.defaultFunctionCodes=[3,4,6,16],this.readFunctionCodes=[1,2,3,4],this.bitsFunctionCodes=[...this.readFunctionCodes,...this.writeFunctionCodes],this.destroy$=new Se,this.rpcParametersFormGroup=this.fb.group({type:[ea.BYTES,[ue.required]],functionCode:[this.defaultFunctionCodes[0],[ue.required]],value:[{value:"",disabled:!0},[ue.required,ue.pattern(kt)]],address:[null,[ue.required]],objectsCount:[1,[ue.required]]}),this.updateFunctionCodes(this.rpcParametersFormGroup.get("type").value),this.observeValueChanges(),this.observeKeyDataType(),this.observeFunctionCode()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.rpcParametersFormGroup.valid?null:{rpcParametersFormGroup:{valid:!1}}}writeValue(e){this.rpcParametersFormGroup.patchValue(e,{emitEvent:!1})}observeValueChanges(){this.rpcParametersFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}observeKeyDataType(){this.rpcParametersFormGroup.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.ModbusEditableDataTypes.includes(e)||this.rpcParametersFormGroup.get("objectsCount").patchValue(na[e],{emitEvent:!1}),this.updateFunctionCodes(e)}))}observeFunctionCode(){this.rpcParametersFormGroup.get("functionCode").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.updateValueEnabling(e)))}updateValueEnabling(e){this.writeFunctionCodes.includes(e)?this.rpcParametersFormGroup.get("value").enable({emitEvent:!1}):(this.rpcParametersFormGroup.get("value").setValue(null),this.rpcParametersFormGroup.get("value").disable({emitEvent:!1}))}updateFunctionCodes(e){this.functionCodes=e===ea.BITS?this.bitsFunctionCodes:this.defaultFunctionCodes,this.functionCodes.includes(this.rpcParametersFormGroup.get("functionCode").value)||this.rpcParametersFormGroup.get("functionCode").patchValue(this.functionCodes[0],{emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:qa,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:qa,isStandalone:!0,selector:"tb-gateway-modbus-rpc-parameters",providers:[{provide:ge,useExisting:m((()=>qa)),multi:!0},{provide:fe,useExisting:m((()=>qa)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n {{ \'gateway.rpc.hint.modbus-response-reading\' | translate }}
\n {{ \'gateway.rpc.hint.modbus-writing-functions\' | translate }}\n
\n
\n \n {{ \'gateway.rpc.type\' | translate }}\n \n {{ type }}\n \n \n \n {{ \'gateway.rpc.functionCode\' | translate }}\n \n {{ ModbusFunctionCodeTranslationsMap.get(code) | translate}}\n \n \n
\n
\n \n {{ \'gateway.rpc.address\' | translate }}\n \n \n warning\n \n \n \n {{ \'gateway.rpc.objectsCount\' | translate }}\n \n \n
\n
\n \n {{ \'gateway.rpc.value\' | translate }}\n \n \n warning\n \n \n
\n
\n\n',styles:['@charset "UTF-8";:host .hint-container{margin-bottom:12px}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutGapDirective,selector:" [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]",inputs:["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:qa,decorators:[{type:n,args:[{selector:"tb-gateway-modbus-rpc-parameters",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>qa)),multi:!0},{provide:fe,useExisting:m((()=>qa)),multi:!0}],standalone:!0,imports:[H,D],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n {{ \'gateway.rpc.hint.modbus-response-reading\' | translate }}
\n {{ \'gateway.rpc.hint.modbus-writing-functions\' | translate }}\n
\n
\n \n {{ \'gateway.rpc.type\' | translate }}\n \n {{ type }}\n \n \n \n {{ \'gateway.rpc.functionCode\' | translate }}\n \n {{ ModbusFunctionCodeTranslationsMap.get(code) | translate}}\n \n \n
\n
\n \n {{ \'gateway.rpc.address\' | translate }}\n \n \n warning\n \n \n \n {{ \'gateway.rpc.objectsCount\' | translate }}\n \n \n
\n
\n \n {{ \'gateway.rpc.value\' | translate }}\n \n \n warning\n \n \n
\n
\n\n',styles:['@charset "UTF-8";:host .hint-container{margin-bottom:12px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder}]});class Da{constructor(e,t,n,a,o){this.fb=e,this.dialog=t,this.utils=n,this.cd=a,this.attributeService=o,this.contentTypes=G,this.RPCCommands=["Ping","Stats","Devices","Update","Version","Restart","Reboot"],this.templates=[],this.ConnectorType=_t,this.gatewayConnectorDefaultTypesTranslates=Ht,this.typesWithUpdatedParams=new Set([_t.MQTT,_t.OPCUA,_t.MODBUS]),this.subscriptionOptions={callbacks:{onDataUpdated:()=>this.ctx.ngZone.run((()=>{this.updateTemplates()})),onDataUpdateError:(e,t)=>this.ctx.ngZone.run((()=>{this.onDataUpdateError(t)})),dataLoading:()=>{}}},this.commandForm=this.fb.group({command:[null,[ue.required]],time:[60,[ue.required,ue.min(1)]],params:["{}",[It]],result:[null]})}ngOnInit(){if(this.isConnector=this.ctx.settings.isConnector,this.isConnector){this.connectorType=this.ctx.stateController.getStateParams().connector_rpc.value.type;const e=[{type:F.entity,entityType:I.DEVICE,entityId:this.ctx.defaultSubscription.targetDeviceId,entityName:"Connector",attributes:[{name:`${this.connectorType}_template`}]}];this.ctx.subscriptionApi.createSubscriptionFromInfo(A.latest,e,this.subscriptionOptions,!1,!0).subscribe((e=>{this.subscription=e}))}else this.commandForm.get("command").setValue(this.RPCCommands[0])}sendCommand(e){this.resultTime=null;const t=e||this.commandForm.value,n=this.isConnector?`${this.connectorType}_`:"gateway_",a=this.isConnector?this.getCommandFromParamsByType(t.params):t.command.toLowerCase(),o=t.params;this.ctx.controlApi.sendTwoWayCommand(n+a,o,t.time).subscribe({next:e=>{this.resultTime=(new Date).getTime(),this.commandForm.get("result").setValue(JSON.stringify(e))},error:e=>{this.resultTime=(new Date).getTime(),console.error(e),this.commandForm.get("result").setValue(JSON.stringify(e.error))}})}getCommandFromParamsByType(e){switch(this.connectorType){case _t.MQTT:case _t.FTP:case _t.SNMP:case _t.REST:case _t.REQUEST:return e.methodFilter;case _t.MODBUS:return e.tag;case _t.BACNET:case _t.CAN:case _t.OPCUA:return e.method;case _t.BLE:case _t.OCPP:case _t.SOCKET:case _t.XMPP:return e.methodRPC;default:return e.command}}saveTemplate(){this.dialog.open(Na,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{config:this.commandForm.value.params,templates:this.templates}}).afterClosed().subscribe((e=>{if(e){const t={name:e,config:this.commandForm.value.params},n=this.templates,a=n.findIndex((e=>e.name==t.name));a>-1&&n.splice(a,1),n.push(t);const o=`${this.connectorType}_template`;this.attributeService.saveEntityAttributes({id:this.ctx.defaultSubscription.targetDeviceId,entityType:I.DEVICE},L.SERVER_SCOPE,[{key:o,value:n}]).subscribe((()=>{this.cd.detectChanges()}))}}))}useTemplate(e){this.commandForm.get("params").patchValue(e.config)}updateTemplates(){this.templates=this.subscription.data[0].data[0][1].length?JSON.parse(this.subscription.data[0].data[0][1]):[],this.cd.detectChanges()}onDataUpdateError(e){const t=this.utils.parseException(e);let n=t.name;t.message&&(n+=": "+t.message),console.error(n)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Da,deps:[{token:me.FormBuilder},{token:Je.MatDialog},{token:X.UtilsService},{token:t.ChangeDetectorRef},{token:X.AttributeService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Da,selector:"tb-gateway-service-rpc",inputs:{ctx:"ctx",dialogRef:"dialogRef"},ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n \n \n {{ \'gateway.statistics.command\' | translate }}\n \n \n {{ command }}\n \n \n \n \n {{ \'gateway.statistics.timeout-ms\' | translate }}\n \n \n {{ \'gateway.statistics.timeout-min\' | translate }}\n \n \n \n \n \n \n \n
\n
{{ \'gateway.rpc.title\' | translate: {type: gatewayConnectorDefaultTypesTranslates.get(connectorType)} }}
\n \n \n \n \n \n
\n \n \n
\n
\n
\n
\n
\n
\n {{ \'gateway.rpc-command-result\' | translate }}\n
\n schedule\n {{ resultTime | date: \'yyyy/MM/dd HH:mm:ss\' }}\n
\n
\n \n
\n
\n\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;overflow:auto;display:flex;flex-direction:row;padding:0 5px}:host>*{height:100%;overflow:auto}:host>tb-gateway-service-rpc-connector-templates:last-child{margin-left:10px}:host .command-form{flex-wrap:nowrap;padding:0 5px 5px}:host .command-form>button{margin-top:10px}:host .rpc-parameters{width:100%}:host .result-block{padding:0 5px;display:flex;flex-direction:column;flex:1}:host .result-block>span{font-weight:600;position:relative;font-size:14px;margin-bottom:10px}:host .result-block>span .result-time{font-weight:400;font-size:14px;line-height:32px;position:absolute;left:0;top:25px;z-index:5;color:#0000008a}:host .result-block>span .result-time span{padding-left:10px}:host .result-block tb-json-content{flex:1}:host .border{padding:16px;box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}\n'],dependencies:[{kind:"directive",type:_.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"component",type:st.JsonContentComponent,selector:"tb-json-content",inputs:["label","contentType","disabled","fillHeight","editorStyle","tbPlaceholder","hideToolbar","readonly","validateContent","validateOnChange","required"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutGapDirective,selector:" [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]",inputs:["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultClassDirective,selector:" [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]",inputs:["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:Ma,selector:"tb-gateway-opc-rpc-parameters"},{kind:"component",type:Ea,selector:"tb-gateway-mqtt-rpc-parameters"},{kind:"component",type:qa,selector:"tb-gateway-modbus-rpc-parameters"},{kind:"component",type:Fa,selector:"tb-gateway-service-rpc-connector-templates",inputs:["connectorType","ctx","rpcTemplates"],outputs:["saveTemplate","useTemplate"]},{kind:"component",type:Aa,selector:"tb-gateway-service-rpc-connector",inputs:["connectorType"],outputs:["sendCommand","saveTemplate"]},{kind:"pipe",type:_.DatePipe,name:"date"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayServiceRPCComponent",Da),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Da,decorators:[{type:n,args:[{selector:"tb-gateway-service-rpc",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n \n \n {{ \'gateway.statistics.command\' | translate }}\n \n \n {{ command }}\n \n \n \n \n {{ \'gateway.statistics.timeout-ms\' | translate }}\n \n \n {{ \'gateway.statistics.timeout-min\' | translate }}\n \n \n \n \n \n \n \n
\n
{{ \'gateway.rpc.title\' | translate: {type: gatewayConnectorDefaultTypesTranslates.get(connectorType)} }}
\n \n \n \n \n \n
\n \n \n
\n
\n
\n
\n
\n
\n {{ \'gateway.rpc-command-result\' | translate }}\n
\n schedule\n {{ resultTime | date: \'yyyy/MM/dd HH:mm:ss\' }}\n
\n
\n \n
\n
\n\n\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;overflow:auto;display:flex;flex-direction:row;padding:0 5px}:host>*{height:100%;overflow:auto}:host>tb-gateway-service-rpc-connector-templates:last-child{margin-left:10px}:host .command-form{flex-wrap:nowrap;padding:0 5px 5px}:host .command-form>button{margin-top:10px}:host .rpc-parameters{width:100%}:host .result-block{padding:0 5px;display:flex;flex-direction:column;flex:1}:host .result-block>span{font-weight:600;position:relative;font-size:14px;margin-bottom:10px}:host .result-block>span .result-time{font-weight:400;font-size:14px;line-height:32px;position:absolute;left:0;top:25px;z-index:5;color:#0000008a}:host .result-block>span .result-time span{padding-left:10px}:host .result-block tb-json-content{flex:1}:host .border{padding:16px;box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:Je.MatDialog},{type:X.UtilsService},{type:t.ChangeDetectorRef},{type:X.AttributeService}],propDecorators:{ctx:[{type:a}],dialogRef:[{type:a}]}});class Pa extends P{constructor(e,t,n,a,o){super(e,t,a),this.store=e,this.router=t,this.data=n,this.dialogRef=a,this.fb=o,this.gatewayName=this.data.gatewayName,this.gatewayControl=this.fb.control("")}close(){this.dialogRef.close()}turnOff(){this.dialogRef.close(!0)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Pa,deps:[{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef},{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Pa,selector:"tb-gateway-remote-configuration-dialog",usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n warning\n

gateway.configuration-delete-dialog-header

\n \n \n
\n
\n \n \n gateway.configuration-delete-dialog-input\n \n \n {{ \'gateway.configuration-delete-dialog-input-required\' | translate }}\n \n \n
\n
\n \n \n
\n',dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:Je.MatDialogActions,selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",inputs:["align"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}var Ga;e("GatewayRemoteConfigurationDialogComponent",Pa),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Pa,decorators:[{type:n,args:[{selector:"tb-gateway-remote-configuration-dialog",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n warning\n

gateway.configuration-delete-dialog-header

\n \n \n
\n
\n \n \n gateway.configuration-delete-dialog-input\n \n \n {{ \'gateway.configuration-delete-dialog-input-required\' | translate }}\n \n \n
\n
\n \n \n
\n'}]}],ctorParameters:()=>[{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef},{type:me.FormBuilder}]}),function(e){e.tls="tls",e.accessToken="accessToken"}(Ga||(Ga={}));const Oa="configuration_drafts",Ra="RemoteLoggingLevel",Va=new Map([[Ga.tls,"gateway.security-types.tls"],[Ga.accessToken,"gateway.security-types.access-token"]]);var Ba,Ua;!function(e){e.none="NONE",e.critical="CRITICAL",e.error="ERROR",e.warning="WARNING",e.info="INFO",e.debug="DEBUG"}(Ba||(Ba={})),function(e){e.memory="memory",e.file="file"}(Ua||(Ua={}));const _a=new Map([[Ua.memory,"gateway.storage-types.memory-storage"],[Ua.file,"gateway.storage-types.file-storage"]]);var Ha;!function(e){e.mqtt="MQTT",e.modbus="Modbus",e.opcua="OPC-UA",e.ble="BLE",e.request="Request",e.can="CAN",e.bacnet="BACnet",e.custom="Custom"}(Ha||(Ha={}));const za={config:{},name:"",configType:null,enabled:!1};function Wa(e){return JSON.stringify(e.value)===JSON.stringify({})?{validJSON:!0}:null}const ja='[loggers]}}keys=root, service, connector, converter, tb_connection, storage, extension}}[handlers]}}keys=consoleHandler, serviceHandler, connectorHandler, converterHandler, tb_connectionHandler, storageHandler, extensionHandler}}[formatters]}}keys=LogFormatter}}[logger_root]}}level=ERROR}}handlers=consoleHandler}}[logger_connector]}}level={ERROR}}}handlers=connectorHandler}}formatter=LogFormatter}}qualname=connector}}[logger_storage]}}level={ERROR}}}handlers=storageHandler}}formatter=LogFormatter}}qualname=storage}}[logger_tb_connection]}}level={ERROR}}}handlers=tb_connectionHandler}}formatter=LogFormatter}}qualname=tb_connection}}[logger_service]}}level={ERROR}}}handlers=serviceHandler}}formatter=LogFormatter}}qualname=service}}[logger_converter]}}level={ERROR}}}handlers=converterHandler}}formatter=LogFormatter}}qualname=converter}}[logger_extension]}}level={ERROR}}}handlers=connectorHandler}}formatter=LogFormatter}}qualname=extension}}[handler_consoleHandler]}}class=StreamHandler}}level={ERROR}}}formatter=LogFormatter}}args=(sys.stdout,)}}[handler_connectorHandler]}}level={ERROR}}}class=logging.handlers.TimedRotatingFileHandler}}formatter=LogFormatter}}args=("{./logs/}connector.log", "d", 1, 7,)}}[handler_storageHandler]}}level={ERROR}}}class=logging.handlers.TimedRotatingFileHandler}}formatter=LogFormatter}}args=("{./logs/}storage.log", "d", 1, 7,)}}[handler_serviceHandler]}}level={ERROR}}}class=logging.handlers.TimedRotatingFileHandler}}formatter=LogFormatter}}args=("{./logs/}service.log", "d", 1, 7,)}}[handler_converterHandler]}}level={ERROR}}}class=logging.handlers.TimedRotatingFileHandler}}formatter=LogFormatter}}args=("{./logs/}converter.log", "d", 1, 3,)}}[handler_extensionHandler]}}level={ERROR}}}class=logging.handlers.TimedRotatingFileHandler}}formatter=LogFormatter}}args=("{./logs/}extension.log", "d", 1, 3,)}}[handler_tb_connectionHandler]}}level={ERROR}}}class=logging.handlers.TimedRotatingFileHandler}}formatter=LogFormatter}}args=("{./logs/}tb_connection.log", "d", 1, 3,)}}[formatter_LogFormatter]}}format="%(asctime)s - %(levelname)s - [%(filename)s] - %(module)s - %(lineno)d - %(message)s" }}datefmt="%Y-%m-%d %H:%M:%S"';function Ka(e){return e.replace("_","").replace("-","").replace(/^\s+|\s+/g,"").toLowerCase()+".json"}function $a(e,t){return ja.replace(/{ERROR}/g,e).replace(/{.\/logs\/}/g,t)}function Ya(e){return{id:e,entityType:I.DEVICE}}function Qa(e){const t={};return Object.prototype.hasOwnProperty.call(e,"thingsboard")&&(t.host=e.thingsboard.host,t.port=e.thingsboard.port,t.remoteConfiguration=e.thingsboard.remoteConfiguration,Object.prototype.hasOwnProperty.call(e.thingsboard.security,Ga.accessToken)?(t.securityType=Ga.accessToken,t.accessToken=e.thingsboard.security.accessToken):(t.securityType=Ga.tls,t.caCertPath=e.thingsboard.security.caCert,t.privateKeyPath=e.thingsboard.security.privateKey,t.certPath=e.thingsboard.security.cert)),Object.prototype.hasOwnProperty.call(e,"storage")&&Object.prototype.hasOwnProperty.call(e.storage,"type")&&(e.storage.type===Ua.memory?(t.storageType=Ua.memory,t.readRecordsCount=e.storage.read_records_count,t.maxRecordsCount=e.storage.max_records_count):e.storage.type===Ua.file&&(t.storageType=Ua.file,t.dataFolderPath=e.storage.data_folder_path,t.maxFilesCount=e.storage.max_file_count,t.readRecordsCount=e.storage.read_records_count,t.maxRecordsCount=e.storage.max_records_count)),t}function Ja(e){const t={};for(const n of e)n.enabled||(t[n.name]={connector:n.configType,config:n.config});return t}function Xa(e){const t={thingsboard:Za(e)};return function(e,t){for(const n of t)if(n.enabled){const t=n.configType;Array.isArray(e[t])||(e[t]=[]);const a={name:n.name,config:n.config};e[t].push(a)}}(t,e.connectors),t}function Za(e){let t;t=e.securityType===Ga.accessToken?{accessToken:e.accessToken}:{caCert:e.caCertPath,privateKey:e.privateKeyPath,cert:e.certPath};const n={host:e.host,remoteConfiguration:e.remoteConfiguration,port:e.port,security:t};let a;a=e.storageType===Ua.memory?{type:Ua.memory,read_records_count:e.readRecordsCount,max_records_count:e.maxRecordsCount}:{type:Ua.file,data_folder_path:e.dataFolderPath,max_file_count:e.maxFilesCount,max_read_records_count:e.readRecordsCount,max_records_per_file:e.maxRecordsCount};const o=[];for(const t of e.connectors)if(t.enabled){const e={configuration:Ka(t.name),name:t.name,type:t.configType};o.push(e)}return{thingsboard:n,connectors:o,storage:a,logs:window.btoa($a(e.remoteLoggingLevel,e.remoteLoggingPathToLogs))}}class eo extends O{constructor(e,t,n,a,o,i,r,s,l,c,p){super(e),this.store=e,this.elementRef=t,this.utils=n,this.ngZone=a,this.fb=o,this.window=i,this.dialog=r,this.translate=s,this.deviceService=l,this.attributeService=c,this.importExport=p,this.alignment="row",this.layoutGap="5px",this.securityTypes=Va,this.gatewayLogLevels=Object.keys(Ba).map((e=>Ba[e])),this.connectorTypes=Object.keys(Ha),this.storageTypes=_a,this.toastTargetId="gateway-configuration-widget"+this.utils.guid(),this.isReadOnlyForm=!1}get connectors(){return this.gatewayConfigurationGroup.get("connectors")}ngOnInit(){this.initWidgetSettings(this.ctx.settings),this.ctx.datasources&&this.ctx.datasources.length&&(this.deviceNameForm=this.ctx.datasources[0].name),this.buildForm(),this.ctx.updateWidgetParams(),this.formResize$=new ResizeObserver((()=>{this.resize()})),this.formResize$.observe(this.formContainerRef.nativeElement)}ngOnDestroy(){this.formResize$&&this.formResize$.disconnect(),this.subscribeGateway$.unsubscribe(),this.subscribeStorageType$.unsubscribe()}initWidgetSettings(e){let t;t=e.gatewayTitle&&e.gatewayTitle.length?this.utils.customTranslation(e.gatewayTitle,e.gatewayTitle):this.translate.instant("gateway.gateway"),this.ctx.widgetTitle=t,this.isReadOnlyForm=!!e.readOnly&&e.readOnly,this.archiveFileName=e.archiveFileName?.length?e.archiveFileName:"gatewayConfiguration",this.gatewayType=e.gatewayType?.length?e.gatewayType:"Gateway",this.gatewayNameExists=this.utils.customTranslation(e.gatewayNameExists,e.gatewayNameExists)||this.translate.instant("gateway.gateway-exists"),this.successfulSaved=this.utils.customTranslation(e.successfulSave,e.successfulSave)||this.translate.instant("gateway.gateway-saved"),this.updateWidgetDisplaying()}resize(){this.ngZone.run((()=>{this.updateWidgetDisplaying(),this.ctx.detectChanges()}))}updateWidgetDisplaying(){this.ctx.$container&&this.ctx.$container[0].offsetWidth<=425?(this.layoutGap="0",this.alignment="column"):(this.layoutGap="5px",this.alignment="row")}saveAttribute(e,t,n){const a=this.gatewayConfigurationGroup.get("gateway").value,o={key:e,value:t};return this.attributeService.saveEntityAttributes(Ya(a),n,[o])}createConnector(e=za){this.connectors.push(this.fb.group({enabled:[e.enabled],configType:[e.configType,[ue.required]],name:[e.name,[ue.required]],config:[e.config,[ue.nullValidator,Wa]]}))}getFormField(e){return this.gatewayConfigurationGroup.get(e)}buildForm(){this.gatewayConfigurationGroup=this.fb.group({gateway:[null,[]],accessToken:[null,[ue.required]],securityType:[Ga.accessToken],host:[this.window.location.hostname,[ue.required]],port:[1883,[ue.required,ue.min(1),ue.max(65535),ue.pattern(/^-?[0-9]+$/)]],remoteConfiguration:[!0],caCertPath:["/etc/thingsboard-gateway/ca.pem"],privateKeyPath:["/etc/thingsboard-gateway/privateKey.pem"],certPath:["/etc/thingsboard-gateway/certificate.pem"],remoteLoggingLevel:[Ba.debug],remoteLoggingPathToLogs:["./logs/",[ue.required]],storageType:[Ua.memory],readRecordsCount:[100,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],maxRecordsCount:[1e4,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],maxFilesCount:[5,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],dataFolderPath:["./data/",[ue.required]],connectors:this.fb.array([])}),this.isReadOnlyForm&&this.gatewayConfigurationGroup.disable({emitEvent:!1}),this.subscribeStorageType$=this.getFormField("storageType").valueChanges.subscribe((e=>{e===Ua.memory?(this.getFormField("maxFilesCount").disable(),this.getFormField("dataFolderPath").disable()):(this.getFormField("maxFilesCount").enable(),this.getFormField("dataFolderPath").enable())})),this.subscribeGateway$=this.getFormField("gateway").valueChanges.subscribe((e=>{null!==e?Ae([this.deviceService.getDeviceCredentials(e).pipe(Ee((e=>{this.getFormField("accessToken").patchValue(e.credentialsId)}))),...this.getAttributes(e)]).subscribe((()=>{this.gatewayConfigurationGroup.markAsPristine(),this.ctx.detectChanges()})):this.getFormField("accessToken").patchValue("")}))}gatewayExist(){this.ctx.showErrorToast(this.gatewayNameExists,"top","left",this.toastTargetId)}exportConfig(){const e=this.gatewayConfigurationGroup.value,t={};var n,a,o;t["tb_gateway.yaml"]=function(e){let t;t="thingsboard:\n",t+=" host: "+e.host+"\n",t+=" remoteConfiguration: "+e.remoteConfiguration+"\n",t+=" port: "+e.port+"\n",t+=" security:\n",e.securityType===Ga.accessToken?t+=" access-token: "+e.accessToken+"\n":(t+=" ca_cert: "+e.caCertPath+"\n",t+=" privateKey: "+e.privateKeyPath+"\n",t+=" cert: "+e.certPath+"\n"),t+="storage:\n",e.storageType===Ua.memory?(t+=" type: memory\n",t+=" read_records_count: "+e.readRecordsCount+"\n",t+=" max_records_count: "+e.maxRecordsCount+"\n"):(t+=" type: file\n",t+=" data_folder_path: "+e.dataFolderPath+"\n",t+=" max_file_count: "+e.maxFilesCount+"\n",t+=" max_read_records_count: "+e.readRecordsCount+"\n",t+=" max_records_per_file: "+e.maxRecordsCount+"\n"),t+="connectors:\n";for(const n of e.connectors)n.enabled&&(t+=" -\n",t+=" name: "+n.name+"\n",t+=" type: "+n.configType+"\n",t+=" configuration: "+Ka(n.name)+"\n");return t}(e),function(e,t){for(const n of t)n.enabled&&(e[Ka(n.name)]=JSON.stringify(n.config))}(t,e.connectors),n=t,a=e.remoteLoggingLevel,o=e.remoteLoggingPathToLogs,n["logs.conf"]=$a(a,o),this.importExport.exportJSZip(t,this.archiveFileName),this.saveAttribute(Ra,this.gatewayConfigurationGroup.value.remoteLoggingLevel.toUpperCase(),L.SHARED_SCOPE)}addNewConnector(){this.createConnector()}removeConnector(e){e>-1&&(this.connectors.removeAt(e),this.connectors.markAsDirty())}openConfigDialog(e,t,n,a){e&&(e.stopPropagation(),e.preventDefault()),this.dialog.open(Qe,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{jsonValue:n,required:!0,title:this.translate.instant("gateway.title-connectors-json",{typeName:a})}}).afterClosed().subscribe((e=>{e&&(this.connectors.at(t).get("config").patchValue(e),this.ctx.detectChanges())}))}createConnectorName(e,t,n=0){const a=n?t+n:t;return-1===e.findIndex((e=>e.name===a))?a:this.createConnectorName(e,t,++n)}validateConnectorName(e,t,n,a=0){for(let o=0;o{this.ctx.showSuccessToast(this.successfulSaved,2e3,"top","left",this.toastTargetId),this.gatewayConfigurationGroup.markAsPristine()}))}getAttributes(e){const t=[];return t.push(Ae([this.getAttribute("current_configuration",L.CLIENT_SCOPE,e),this.getAttribute(Oa,L.SERVER_SCOPE,e)]).pipe(Ee((([e,t])=>{this.setFormGatewaySettings(e),this.setFormConnectorsDraft(t),this.isReadOnlyForm&&this.gatewayConfigurationGroup.disable({emitEvent:!1})})))),t.push(this.getAttribute(Ra,L.SHARED_SCOPE,e).pipe(Ee((e=>this.processLoggingLevel(e))))),t}getAttribute(e,t,n){return this.attributeService.getEntityAttributes(Ya(n),t,[e])}setFormGatewaySettings(e){if(this.connectors.clear(),e.length>0){const t=JSON.parse(window.atob(e[0].value));for(const e of Object.keys(t)){const n=t[e];if("thingsboard"===e)null!==n&&Object.keys(n).length>0&&this.gatewayConfigurationGroup.patchValue(Qa(n));else for(const t of Object.keys(n)){let a="No name";Object.prototype.hasOwnProperty.call(n[t],"name")&&(a=n[t].name);const o={enabled:!0,configType:e,config:n[t].config,name:a};this.createConnector(o)}}}}setFormConnectorsDraft(e){if(e.length>0){const t=JSON.parse(window.atob(e[0].value));for(const e of Object.keys(t)){const n={enabled:!1,configType:t[e].connector,config:t[e].config,name:e};this.createConnector(n)}}}processLoggingLevel(e){let t=Ba.debug;e.length>0&&Ba[e[0].value.toLowerCase()]&&(t=Ba[e[0].value.toLowerCase()]),this.getFormField("remoteLoggingLevel").patchValue(t)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:eo,deps:[{token:ot.Store},{token:t.ElementRef},{token:X.UtilsService},{token:t.NgZone},{token:me.UntypedFormBuilder},{token:ae},{token:Je.MatDialog},{token:Y.TranslateService},{token:X.DeviceService},{token:X.AttributeService},{token:lt.ImportExportService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:eo,selector:"tb-gateway-form",inputs:{ctx:"ctx",isStateForm:"isStateForm"},viewQueries:[{propertyName:"formContainerRef",first:!0,predicate:["formContainer"],descendants:!0,static:!0},{propertyName:"multipleInputForm",first:!0,predicate:["gatewayConfigurationForm"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n \n \n \n
{{ \'gateway.thingsboard\' | translate | uppercase }}
\n
\n
\n \n \n
\n \n {{\'gateway.security-type\' | translate }}\n \n \n {{ securityType.value.toString() | translate }}\n \n \n \n
\n
\n \n {{ \'gateway.thingsboard-host\' | translate }}\n \n \n gateway.thingsboard-host-required\n \n \n \n {{ \'gateway.thingsboard-port\' | translate }}\n \n \n gateway.thingsboard-port-required\n \n \n gateway.thingsboard-port-min\n \n \n gateway.thingsboard-port-max\n \n \n gateway.thingsboard-port-pattern\n \n \n
\n\n
\n \n {{ \'gateway.tls-path-ca-certificate\' | translate }}\n \n \n \n {{ \'gateway.tls-path-private-key\' | translate }}\n \n \n \n {{ \'gateway.tls-path-client-certificate\' | translate }}\n \n \n
\n\n {{ \'gateway.remote\' | translate }}\n\n
\n \n {{\'gateway.remote-logging-level\' | translate }}\n \n \n {{ logLevel }}\n \n \n \n\n \n {{ \'gateway.path-logs\' | translate }}\n \n \n gateway.path-logs-required\n \n \n
\n\n
\n\n \n \n \n
{{ \'gateway.storage\' | translate | uppercase }}
\n
\n
\n\n
\n \n {{\'gateway.storage-type\' | translate }}\n \n \n {{ storageType.value.toString() | translate}}\n \n \n \n\n
\n \n {{ \'gateway.storage-pack-size\' | translate }}\n \n \n gateway.storage-pack-size-required\n \n \n gateway.storage-pack-size-min\n \n \n gateway.storage-pack-size-pattern\n \n \n\n \n \n {{ (gatewayConfigurationGroup.get(\'storageType\').value !== \'file\' ? \'gateway.storage-max-records\' : \'gateway.storage-max-file-records\') | translate}}\n \n \n \n gateway.storage-max-records-required\n \n \n gateway.storage-max-records-min\n \n \n gateway.storage-max-records-pattern\n \n \n
\n\n
\n \n {{ \'gateway.storage-max-files\' | translate }}\n \n \n gateway.storage-max-files-required\n \n \n gateway.storage-max-files-min\n \n \n gateway.storage-max-files-pattern\n \n \n\n \n {{ \'gateway.storage-path\' | translate }}\n \n \n gateway.storage-path-required\n \n \n
\n
\n
\n\n \n \n \n
{{ \'gateway.connectors-config\' | translate | uppercase }}
\n
\n
\n\n
\n
\n
\n
\n \n
\n
\n \n {{\'gateway.connector-type\' | translate }}\n \n \n {{ connectorType }}\n \n \n \n gateway.connector-type-required\n \n \n\n \n {{ \'gateway.connector-name\' | translate }}\n \n \n gateway.connector-name-required\n \n \n
\n
\n \n \n
\n
\n
\n {{\'gateway.no-connectors\' | translate}}\n
\n \n
\n
\n
\n
\n
\n \n\n \n
\n
\n',styles:['@charset "UTF-8";:host .gateway-form{height:100%;padding:5px;background-color:transparent;overflow-y:auto;overflow-x:hidden}:host .gateway-form .form-action-buttons{padding-top:8px}:host .gateway-form .gateway-config .no-data-found{position:relative;display:flex;height:40px}\n'],dependencies:[{kind:"directive",type:_.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:ct.ToastDirective,selector:"[tb-toast]",inputs:["toastTarget"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:pt.MatCheckbox,selector:"mat-checkbox",inputs:["aria-label","aria-labelledby","aria-describedby","id","required","labelPosition","name","value","disableRipple","tabIndex","color","disabledInteractive","checked","disabled","indeterminate"],outputs:["change","indeterminateChange"],exportAs:["matCheckbox"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:$e.MatAccordion,selector:"mat-accordion",inputs:["hideToggle","displayMode","togglePosition"],exportAs:["matAccordion"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutGapDirective,selector:" [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]",inputs:["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultShowHideDirective,selector:" [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]",inputs:["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"]},{kind:"directive",type:K.DefaultClassDirective,selector:" [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]",inputs:["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"]},{kind:"directive",type:me.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:me.FormGroupName,selector:"[formGroupName]",inputs:["formGroupName"]},{kind:"directive",type:me.FormArrayName,selector:"[formArrayName]",inputs:["formArrayName"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:mt.EntityGatewaySelectComponent,selector:"tb-entity-gateway-select",inputs:["required","newGatewayType","deviceName","isStateForm"],outputs:["gatewayNameExist"]},{kind:"pipe",type:_.UpperCasePipe,name:"uppercase"},{kind:"pipe",type:_.KeyValuePipe,name:"keyvalue"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayFormComponent",eo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:eo,decorators:[{type:n,args:[{selector:"tb-gateway-form",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n \n \n \n
{{ \'gateway.thingsboard\' | translate | uppercase }}
\n
\n
\n \n \n
\n \n {{\'gateway.security-type\' | translate }}\n \n \n {{ securityType.value.toString() | translate }}\n \n \n \n
\n
\n \n {{ \'gateway.thingsboard-host\' | translate }}\n \n \n gateway.thingsboard-host-required\n \n \n \n {{ \'gateway.thingsboard-port\' | translate }}\n \n \n gateway.thingsboard-port-required\n \n \n gateway.thingsboard-port-min\n \n \n gateway.thingsboard-port-max\n \n \n gateway.thingsboard-port-pattern\n \n \n
\n\n
\n \n {{ \'gateway.tls-path-ca-certificate\' | translate }}\n \n \n \n {{ \'gateway.tls-path-private-key\' | translate }}\n \n \n \n {{ \'gateway.tls-path-client-certificate\' | translate }}\n \n \n
\n\n {{ \'gateway.remote\' | translate }}\n\n
\n \n {{\'gateway.remote-logging-level\' | translate }}\n \n \n {{ logLevel }}\n \n \n \n\n \n {{ \'gateway.path-logs\' | translate }}\n \n \n gateway.path-logs-required\n \n \n
\n\n
\n\n \n \n \n
{{ \'gateway.storage\' | translate | uppercase }}
\n
\n
\n\n
\n \n {{\'gateway.storage-type\' | translate }}\n \n \n {{ storageType.value.toString() | translate}}\n \n \n \n\n
\n \n {{ \'gateway.storage-pack-size\' | translate }}\n \n \n gateway.storage-pack-size-required\n \n \n gateway.storage-pack-size-min\n \n \n gateway.storage-pack-size-pattern\n \n \n\n \n \n {{ (gatewayConfigurationGroup.get(\'storageType\').value !== \'file\' ? \'gateway.storage-max-records\' : \'gateway.storage-max-file-records\') | translate}}\n \n \n \n gateway.storage-max-records-required\n \n \n gateway.storage-max-records-min\n \n \n gateway.storage-max-records-pattern\n \n \n
\n\n
\n \n {{ \'gateway.storage-max-files\' | translate }}\n \n \n gateway.storage-max-files-required\n \n \n gateway.storage-max-files-min\n \n \n gateway.storage-max-files-pattern\n \n \n\n \n {{ \'gateway.storage-path\' | translate }}\n \n \n gateway.storage-path-required\n \n \n
\n
\n
\n\n \n \n \n
{{ \'gateway.connectors-config\' | translate | uppercase }}
\n
\n
\n\n
\n
\n
\n
\n \n
\n
\n \n {{\'gateway.connector-type\' | translate }}\n \n \n {{ connectorType }}\n \n \n \n gateway.connector-type-required\n \n \n\n \n {{ \'gateway.connector-name\' | translate }}\n \n \n gateway.connector-name-required\n \n \n
\n
\n \n \n
\n
\n
\n {{\'gateway.no-connectors\' | translate}}\n
\n \n
\n
\n
\n
\n
\n \n\n \n
\n
\n',styles:['@charset "UTF-8";:host .gateway-form{height:100%;padding:5px;background-color:transparent;overflow-y:auto;overflow-x:hidden}:host .gateway-form .form-action-buttons{padding-top:8px}:host .gateway-form .gateway-config .no-data-found{position:relative;display:flex;height:40px}\n']}]}],ctorParameters:()=>[{type:ot.Store},{type:t.ElementRef},{type:X.UtilsService},{type:t.NgZone},{type:me.UntypedFormBuilder},{type:Window,decorators:[{type:p,args:[ae]}]},{type:Je.MatDialog},{type:Y.TranslateService},{type:X.DeviceService},{type:X.AttributeService},{type:lt.ImportExportService}],propDecorators:{formContainerRef:[{type:o,args:["formContainer",{static:!0}]}],multipleInputForm:[{type:o,args:["gatewayConfigurationForm",{static:!0}]}],ctx:[{type:a}],isStateForm:[{type:a}]}});class to extends P{constructor(e,t,n,a,o,i,r){super(e,t,a),this.store=e,this.router=t,this.data=n,this.dialogRef=a,this.fb=o,this.isLatestVersionConfig=i,this.resourcesService=r,this.connectorType=_t,this.gatewayConnectorDefaultTypesTranslatesMap=Ht,this.gatewayLogLevel=Object.values(Mt),this.submitted=!1,this.destroy$=new Se,this.connectorForm=this.fb.group({type:[_t.MQTT,[]],name:["",[ue.required,this.uniqNameRequired(),ue.pattern(kt)]],logLevel:[Mt.INFO,[]],useDefaults:[!0,[]],sendDataOnlyOnChange:[!1,[]],class:["",[]],key:["auto",[]]})}ngOnInit(){this.observeTypeChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),super.ngOnDestroy()}helpLinkId(){return v+"/docs/iot-gateway/configuration/"}cancel(){this.dialogRef.close(null)}add(){this.submitted=!0;const e=this.connectorForm.getRawValue();e.useDefaults?this.getDefaultConfig(e.type).subscribe((t=>{const n=this.data.gatewayVersion;n&&(e.configVersion=n),e.configurationJson=(this.isLatestVersionConfig.transform(n)?t[Ut.Current]:t[Ut.Legacy])??t,this.connectorForm.valid&&this.dialogRef.close(e)})):this.connectorForm.valid&&this.dialogRef.close(e)}uniqNameRequired(){return e=>{const t=e.value.trim().toLowerCase();return this.data.dataSourceData.some((({value:{name:e}})=>e.toLowerCase()===t))?{duplicateName:{valid:!1}}:null}}observeTypeChange(){this.connectorForm.get("type").valueChanges.pipe(Ee((e=>{const t=this.connectorForm.get("useDefaults");e===_t.GRPC||e===_t.CUSTOM?t.setValue(!1):t.value||t.setValue(!0)})),Ne(this.destroy$)).subscribe()}getDefaultConfig(e){return this.resourcesService.loadJsonResource(`/assets/metadata/connector-default-configs/${e}.json`)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:to,deps:[{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef},{token:me.FormBuilder},{token:va},{token:X.ResourcesService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:to,selector:"tb-add-connector-dialog",providers:[],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n

{{ "gateway.add-connector" | translate}}

\n \n
\n \n
\n
\n
\n
\n
gateway.type
\n
\n \n \n \n {{ type.value }}\n \n \n \n
\n
\n
\n
gateway.name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.connectors-table-class
\n
\n \n \n \n
\n
\n
\n
gateway.connectors-table-key
\n
\n \n \n \n
\n
\n
\n
gateway.remote-logging-level
\n
\n \n \n {{ logLevel }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.fill-connector-defaults\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.send-change-data\' | translate }}\n \n \n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .add-connector{min-width:400px;width:500px}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:dt.HelpComponent,selector:"[tb-help]",inputs:["tb-help"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:Je.MatDialogActions,selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",inputs:["align"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"pipe",type:_.KeyValuePipe,name:"keyvalue"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("AddConnectorDialogComponent",to),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:to,decorators:[{type:n,args:[{selector:"tb-add-connector-dialog",providers:[],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n

{{ "gateway.add-connector" | translate}}

\n \n
\n \n
\n
\n
\n
\n
gateway.type
\n
\n \n \n \n {{ type.value }}\n \n \n \n
\n
\n
\n
gateway.name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.connectors-table-class
\n
\n \n \n \n
\n
\n
\n
gateway.connectors-table-key
\n
\n \n \n \n
\n
\n
\n
gateway.remote-logging-level
\n
\n \n \n {{ logLevel }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.fill-connector-defaults\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.send-change-data\' | translate }}\n \n \n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .add-connector{min-width:400px;width:500px}\n']}]}],ctorParameters:()=>[{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef},{type:me.FormBuilder},{type:va},{type:X.ResourcesService}]});class no{constructor(e){this.fb=e,this.valueTypeKeys=Object.values(Gn),this.valueTypes=Vn,this.MappingValueType=Gn,this.destroy$=new Se,this.propagateChange=e=>{}}ngOnInit(){this.valueListFormArray=this.fb.array([]),this.valueListFormArray.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateView(e)}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}trackByKey(e,t){return t}addKey(){const e=this.fb.group({type:[Gn.STRING],string:["",[ue.required,ue.pattern(kt)]],integer:[{value:0,disabled:!0},[ue.required,ue.pattern(Lt)]],double:[{value:0,disabled:!0},[ue.required]],boolean:[{value:!1,disabled:!0},[ue.required]]});this.observeTypeChange(e),this.valueListFormArray.push(e)}observeTypeChange(e){e.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{e.disable({emitEvent:!1}),e.get("type").enable({emitEvent:!1}),e.get(t).enable({emitEvent:!1})}))}deleteKey(e,t){e&&e.stopPropagation(),this.valueListFormArray.removeAt(t),this.valueListFormArray.markAsDirty()}valueTitle(e){return ie(e)?"object"==typeof e?JSON.stringify(e):e:""}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){for(const t of e){const e={type:[t.type],string:[{value:"",disabled:!0},[ue.required,ue.pattern(kt)]],integer:[{value:0,disabled:!0},[ue.required,ue.pattern(Lt)]],double:[{value:0,disabled:!0},[ue.required]],boolean:[{value:!1,disabled:!0},[ue.required]]};e[t.type][0]={value:t.value,disabled:!1};const n=this.fb.group(e);this.observeTypeChange(n),this.valueListFormArray.push(n)}}validate(){return this.valueListFormArray.valid?null:{valueListForm:{valid:!1}}}updateView(e){this.propagateChange(e.map((({type:e,...t})=>({type:e,value:t[e]}))))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:no,deps:[{token:me.UntypedFormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:no,selector:"tb-type-value-panel",providers:[{provide:ge,useExisting:m((()=>no)),multi:!0},{provide:fe,useExisting:m((()=>no)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
\n
\n \n \n \n \n
{{ valueTitle(keyControl.get(keyControl.get(\'type\').value).value) }}
\n
\n
\n \n
\n
gateway.type
\n
\n \n \n \n
\n \n \n \n {{ valueTypes.get(keyControl.get(\'type\').value)?.name | translate}}\n \n
\n
\n \n \n \n {{ valueTypes.get(valueType).name | translate }}\n \n
\n
\n
\n
\n
\n
gateway.value
\n \n \n \n \n \n \n true\n false\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n\n
\n {{ \'gateway.no-value\' }}\n
\n
\n',styles:['@charset "UTF-8";:host .title-container{max-width:11vw}:host .key-panel{height:250px;overflow:auto}:host .tb-form-panel .mat-mdc-icon-button{width:56px;height:56px;padding:16px;color:#0000008a}:host .see-example{width:32px;height:32px;margin:4px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"directive",type:we.MatSelectTrigger,selector:"mat-select-trigger"},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:$e.MatExpansionPanelContent,selector:"ng-template[matExpansionPanelContent]"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("TypeValuePanelComponent",no),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:no,decorators:[{type:n,args:[{selector:"tb-type-value-panel",providers:[{provide:ge,useExisting:m((()=>no)),multi:!0},{provide:fe,useExisting:m((()=>no)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
\n
\n \n \n \n \n
{{ valueTitle(keyControl.get(keyControl.get(\'type\').value).value) }}
\n
\n
\n \n
\n
gateway.type
\n
\n \n \n \n
\n \n \n \n {{ valueTypes.get(keyControl.get(\'type\').value)?.name | translate}}\n \n
\n
\n \n \n \n {{ valueTypes.get(valueType).name | translate }}\n \n
\n
\n
\n
\n
\n
gateway.value
\n \n \n \n \n \n \n true\n false\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n\n
\n {{ \'gateway.no-value\' }}\n
\n
\n',styles:['@charset "UTF-8";:host .title-container{max-width:11vw}:host .key-panel{height:250px;overflow:auto}:host .tb-form-panel .mat-mdc-icon-button{width:56px;height:56px;padding:16px;color:#0000008a}:host .see-example{width:32px;height:32px;margin:4px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n']}]}],ctorParameters:()=>[{type:me.UntypedFormBuilder}]});class ao extends O{constructor(e,t){super(t),this.fb=e,this.store=t,this.valueTypeKeys=Object.values(Gn),this.valueTypeEnum=Gn,this.valueTypes=Vn,this.rawData=!1,this.keysDataApplied=new i,this.MappingKeysType=Nn,this.errorText=""}ngOnInit(){this.keysListFormArray=this.prepareKeysFormArray(this.keys)}trackByKey(e,t){return t}addKey(){let e;if(e=this.keysType===Nn.RPC_METHODS?this.fb.group({method:["",[ue.required]],arguments:[[],[]]}):this.fb.group({key:["",[ue.required,ue.pattern(kt)]],value:["",[ue.required,ue.pattern(kt)]]}),this.keysType!==Nn.CUSTOM&&this.keysType!==Nn.RPC_METHODS){const t=this.rawData?"raw":this.valueTypeKeys[0];e.addControl("type",this.fb.control(t))}this.keysListFormArray.push(e)}deleteKey(e,t){e&&e.stopPropagation(),this.keysListFormArray.removeAt(t),this.keysListFormArray.markAsDirty()}cancel(){this.popover?.hide()}applyKeysData(){let e=this.keysListFormArray.value;if(this.keysType===Nn.CUSTOM){e={};for(let t of this.keysListFormArray.value)e[t.key]=t.value}this.keysDataApplied.emit(e)}prepareKeysFormArray(e){const t=[];return e&&(this.keysType===Nn.CUSTOM&&(e=Object.keys(e).map((t=>({key:t,value:e[t],type:""})))),e.forEach((e=>{let n;if(this.keysType===Nn.RPC_METHODS)n=this.fb.group({method:[e.method,[ue.required]],arguments:[[...e.arguments],[]]});else{const{key:t,value:a,type:o}=e;n=this.fb.group({key:[t,[ue.required,ue.pattern(kt)]],value:[a,[ue.required,ue.pattern(kt)]],type:[o,[]]})}t.push(n)}))),this.fb.array(t)}valueTitle(e){const t=e.get(this.keysType===Nn.RPC_METHODS?"method":"value").value;return ie(t)?"object"==typeof t?JSON.stringify(t):t:""}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ao,deps:[{token:me.UntypedFormBuilder},{token:ot.Store}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:ao,selector:"tb-mapping-data-keys-panel",inputs:{panelTitle:"panelTitle",addKeyTitle:"addKeyTitle",deleteKeyTitle:"deleteKeyTitle",noKeysText:"noKeysText",keys:"keys",keysType:"keysType",valueTypeKeys:"valueTypeKeys",valueTypeEnum:"valueTypeEnum",valueTypes:"valueTypes",rawData:"rawData",popover:"popover"},outputs:{keysDataApplied:"keysDataApplied"},providers:[],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ panelTitle | translate }}{{\' (\' + keysListFormArray.controls.length + \')\'}}
\n
\n
\n
\n \n \n \n \n \n
\n {{ keyControl.get(\'key\').value }}\n
\n {{ \'-\' }}\n
\n
{{ valueTitle(keyControl) }}
\n
\n
\n \n
\n
\n
gateway.platform-side
\n
\n
\n {{ \'gateway.key\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
gateway.connector-side
\n
\n
gateway.type
\n \n \n \n
\n \n \n \n {{ (valueTypes.get(keyControl.get(\'type\').value)?.name || valueTypes.get(keyControl.get(\'type\').value)) | translate }}\n \n \n {{ \'gateway.raw\' | translate }}\n \n
\n
\n \n \n \n \n \n {{ valueTypes.get(valueType).name || valueTypes.get(valueType) | translate }}\n \n \n \n \n \n {{ \'gateway.raw\' | translate }}\n \n \n
\n
\n
\n
\n
\n {{ \'gateway.value\' | translate }}\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n
\n
gateway.key
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.value
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n {{ \'gateway.method-name\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n \n
\n {{ \'gateway.arguments\' | translate }}{{\' (\' + keyControl.get(\'arguments\').value?.length + \')\'}}\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n {{ noKeysText }}\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .tb-mapping-keys-panel{width:77vw;max-width:700px}:host .tb-mapping-keys-panel .title-container{max-width:11vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .tb-mapping-keys-panel .key-panel{height:500px;overflow:auto}:host .tb-mapping-keys-panel tb-value-input{width:100%}:host .tb-mapping-keys-panel .tb-form-panel .mat-mdc-icon-button{width:56px;height:56px;padding:16px;color:#0000008a}:host .tb-mapping-keys-panel .see-example{width:32px;height:32px;margin:4px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:gt.HelpPopupComponent,selector:"[tb-help-popup], [tb-help-popup-content]",inputs:["tb-help-popup","tb-help-popup-content","trigger-text","trigger-style","tb-help-popup-placement","tb-help-popup-style","hintMode"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"directive",type:we.MatSelectTrigger,selector:"mat-select-trigger"},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:$e.MatExpansionPanelContent,selector:"ng-template[matExpansionPanelContent]"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"component",type:no,selector:"tb-type-value-panel"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"pipe",type:Ta,name:"getGatewayHelpLink"}]})}}e("MappingDataKeysPanelComponent",ao),He([N()],ao.prototype,"rawData",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ao,decorators:[{type:n,args:[{selector:"tb-mapping-data-keys-panel",providers:[],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ panelTitle | translate }}{{\' (\' + keysListFormArray.controls.length + \')\'}}
\n
\n
\n
\n \n \n \n \n \n
\n {{ keyControl.get(\'key\').value }}\n
\n {{ \'-\' }}\n
\n
{{ valueTitle(keyControl) }}
\n
\n
\n \n
\n
\n
gateway.platform-side
\n
\n
\n {{ \'gateway.key\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
gateway.connector-side
\n
\n
gateway.type
\n \n \n \n
\n \n \n \n {{ (valueTypes.get(keyControl.get(\'type\').value)?.name || valueTypes.get(keyControl.get(\'type\').value)) | translate }}\n \n \n {{ \'gateway.raw\' | translate }}\n \n
\n
\n \n \n \n \n \n {{ valueTypes.get(valueType).name || valueTypes.get(valueType) | translate }}\n \n \n \n \n \n {{ \'gateway.raw\' | translate }}\n \n \n
\n
\n
\n
\n
\n {{ \'gateway.value\' | translate }}\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n
\n
gateway.key
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.value
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n {{ \'gateway.method-name\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n \n
\n {{ \'gateway.arguments\' | translate }}{{\' (\' + keyControl.get(\'arguments\').value?.length + \')\'}}\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n {{ noKeysText }}\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .tb-mapping-keys-panel{width:77vw;max-width:700px}:host .tb-mapping-keys-panel .title-container{max-width:11vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .tb-mapping-keys-panel .key-panel{height:500px;overflow:auto}:host .tb-mapping-keys-panel tb-value-input{width:100%}:host .tb-mapping-keys-panel .tb-form-panel .mat-mdc-icon-button{width:56px;height:56px;padding:16px;color:#0000008a}:host .tb-mapping-keys-panel .see-example{width:32px;height:32px;margin:4px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n']}]}],ctorParameters:()=>[{type:me.UntypedFormBuilder},{type:ot.Store}],propDecorators:{panelTitle:[{type:a}],addKeyTitle:[{type:a}],deleteKeyTitle:[{type:a}],noKeysText:[{type:a}],keys:[{type:a}],keysType:[{type:a}],valueTypeKeys:[{type:a}],valueTypeEnum:[{type:a}],valueTypes:[{type:a}],rawData:[{type:a}],popover:[{type:a}],keysDataApplied:[{type:l}]}});class oo extends O{get deviceInfoType(){return this.deviceInfoTypeValue}set deviceInfoType(e){this.deviceInfoTypeValue!==e&&(this.deviceInfoTypeValue=e)}constructor(e,t,n,a){super(e),this.store=e,this.translate=t,this.dialog=n,this.fb=a,this.SourceTypeTranslationsMap=Ln,this.DeviceInfoType=kn,this.useSource=!0,this.required=!1,this.sourceTypes=Object.values(Tn),this.destroy$=new Se,this.propagateChange=e=>{}}ngOnInit(){this.mappingFormGroup=this.fb.group({deviceNameExpression:["",this.required?[ue.required,ue.pattern(kt)]:[ue.pattern(kt)]]}),this.useSource&&this.mappingFormGroup.addControl("deviceNameExpressionSource",this.fb.control(this.sourceTypes[0],[])),this.deviceInfoType===kn.FULL&&(this.useSource&&this.mappingFormGroup.addControl("deviceProfileExpressionSource",this.fb.control(this.sourceTypes[0],[])),this.mappingFormGroup.addControl("deviceProfileExpression",this.fb.control("",this.required?[ue.required,ue.pattern(kt)]:[ue.pattern(kt)]))),this.mappingFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateView(e)}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),super.ngOnDestroy()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.mappingFormGroup.patchValue(e,{emitEvent:!1})}validate(){return this.mappingFormGroup.valid?null:{mappingForm:{valid:!1}}}updateView(e){this.propagateChange(e)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:oo,deps:[{token:ot.Store},{token:Y.TranslateService},{token:Je.MatDialog},{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:oo,selector:"tb-device-info-table",inputs:{useSource:"useSource",required:"required",sourceTypes:"sourceTypes",deviceInfoType:"deviceInfoType"},providers:[{provide:ge,useExisting:m((()=>oo)),multi:!0},{provide:fe,useExisting:m((()=>oo)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n
device.device
\n
\n
\n
gateway.device-info.entity-field
\n
gateway.device-info.source
\n
\n gateway.device-info.expression\n
\n
\n
\n
\n
gateway.device-info.name
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.device-info.profile-name
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}:host .tb-form-row.bottom-same-padding{padding-bottom:16px}:host .tb-form-row.top-same-padding{padding-top:16px}:host .tb-form-row .fixed-title-width{width:19%}:host .table-column{width:40%}:host .table-name-column{width:20%}:host .raw-name{width:19%}:host .raw-value-option{max-width:40%}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:gt.HelpPopupComponent,selector:"[tb-help-popup], [tb-help-popup-content]",inputs:["tb-help-popup","tb-help-popup-content","trigger-text","trigger-style","tb-help-popup-placement","tb-help-popup-style","hintMode"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"pipe",type:Ta,name:"getGatewayHelpLink"}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("DeviceInfoTableComponent",oo),He([N()],oo.prototype,"useSource",void 0),He([N()],oo.prototype,"required",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:oo,decorators:[{type:n,args:[{selector:"tb-device-info-table",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>oo)),multi:!0},{provide:fe,useExisting:m((()=>oo)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n
device.device
\n
\n
\n
gateway.device-info.entity-field
\n
gateway.device-info.source
\n
\n gateway.device-info.expression\n
\n
\n
\n
\n
gateway.device-info.name
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.device-info.profile-name
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}:host .tb-form-row.bottom-same-padding{padding-bottom:16px}:host .tb-form-row.top-same-padding{padding-top:16px}:host .tb-form-row .fixed-title-width{width:19%}:host .table-column{width:40%}:host .table-name-column{width:20%}:host .raw-name{width:19%}:host .raw-value-option{max-width:40%}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n']}]}],ctorParameters:()=>[{type:ot.Store},{type:Y.TranslateService},{type:Je.MatDialog},{type:me.FormBuilder}],propDecorators:{useSource:[{type:a}],required:[{type:a}],sourceTypes:[{type:a}],deviceInfoType:[{type:a}]}});class io extends P{constructor(e,t,n,a,o,i,r,s,l){super(e,t,a),this.store=e,this.router=t,this.data=n,this.dialogRef=a,this.fb=o,this.popoverService=i,this.renderer=r,this.viewContainerRef=s,this.translate=l,this.MappingType=fn,this.qualityTypes=xn,this.QualityTranslationsMap=vn,this.convertorTypes=Object.values(wn),this.ConvertorTypeEnum=wn,this.ConvertorTypeTranslationsMap=Cn,this.sourceTypes=Object.values(Tn),this.OPCUaSourceTypes=Object.values(Sn),this.OPCUaSourceTypesEnum=Sn,this.sourceTypesEnum=Tn,this.SourceTypeTranslationsMap=Ln,this.requestTypes=Object.values(In),this.RequestTypeEnum=In,this.RequestTypesTranslationsMap=An,this.DeviceInfoType=kn,this.ServerSideRPCType=Pn,this.MappingKeysType=Nn,this.MappingHintTranslationsMap=bn,this.MappingTypeTranslationsMap=yn,this.DataConversionTranslationsMap=Bn,this.HelpLinkByMappingTypeMap=hn,this.keysPopupClosed=!0,this.destroy$=new Se,this.createMappingForm()}get converterAttributes(){if(this.converterType)return this.mappingForm.get("converter").get(this.converterType).value.attributes.map((e=>e.key))}get converterTelemetry(){if(this.converterType)return this.mappingForm.get("converter").get(this.converterType).value.timeseries.map((e=>e.key))}get opcAttributes(){return this.mappingForm.get("attributes").value?.map((e=>e.key))||[]}get opcTelemetry(){return this.mappingForm.get("timeseries").value?.map((e=>e.key))||[]}get opcRpcMethods(){return this.mappingForm.get("rpc_methods").value?.map((e=>e.method))||[]}get opcAttributesUpdates(){return this.mappingForm.get("attributes_updates")?.value?.map((e=>e.key))||[]}get converterType(){return this.mappingForm.get("converter").get("type").value}get customKeys(){return Object.keys(this.mappingForm.get("converter").get("custom").value.extensionConfig)}get requestMappingType(){return this.mappingForm.get("requestType").value}get responseTimeoutErrorTooltip(){const e=this.mappingForm.get("requestValue.serverSideRpc.responseTimeout");return e.hasError("required")?this.translate.instant("gateway.response-timeout-required"):e.hasError("min")?this.translate.instant("gateway.response-timeout-limits-error",{min:1}):""}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),super.ngOnDestroy()}createMappingForm(){switch(this.data.mappingType){case fn.DATA:this.mappingForm=this.fb.group({}),this.createDataMappingForm();break;case fn.REQUESTS:this.mappingForm=this.fb.group({}),this.createRequestMappingForm();break;case fn.OPCUA:this.createOPCUAMappingForm()}}cancel(){this.keysPopupClosed&&this.dialogRef.close(null)}add(){this.mappingForm.valid&&this.dialogRef.close(this.prepareMappingData())}manageKeys(e,t,n){e&&e.stopPropagation();const a=t._elementRef.nativeElement;if(this.popoverService.hasPopover(a))this.popoverService.hidePopover(a);else{const e=(this.data.mappingType!==fn.OPCUA?this.mappingForm.get("converter").get(this.converterType):this.mappingForm).get(n),t={keys:e.value,keysType:n,rawData:this.mappingForm.get("converter.type")?.value===wn.BYTES,panelTitle:Mn.get(n),addKeyTitle:En.get(n),deleteKeyTitle:qn.get(n),noKeysText:Dn.get(n)};this.data.mappingType===fn.OPCUA&&(t.valueTypeKeys=Object.values(Sn),t.valueTypeEnum=Sn,t.valueTypes=Ln),this.keysPopupClosed=!1;const o=this.popoverService.displayPopover(a,this.renderer,this.viewContainerRef,ao,"leftBottom",!1,null,t,{},{},{},!0);o.tbComponentRef.instance.popover=o,o.tbComponentRef.instance.keysDataApplied.pipe(Ne(this.destroy$)).subscribe((t=>{o.hide(),e.patchValue(t),e.markAsDirty()})),o.tbHideStart.pipe(Ne(this.destroy$)).subscribe((()=>{this.keysPopupClosed=!0}))}}prepareMappingData(){const e=this.mappingForm.value;switch(this.data.mappingType){case fn.DATA:const{converter:t,topicFilter:n,subscriptionQos:a}=e;return{topicFilter:n,subscriptionQos:a,converter:{type:t.type,...t[t.type]}};case fn.REQUESTS:return{requestType:e.requestType,requestValue:e.requestValue[e.requestType]};default:return e}}getFormValueData(){if(this.data.value&&Object.keys(this.data.value).length)switch(this.data.mappingType){case fn.DATA:const{converter:e,topicFilter:t,subscriptionQos:n}=this.data.value;return{topicFilter:t,subscriptionQos:n,converter:{type:e.type,[e.type]:{...e}}};case fn.REQUESTS:return{requestType:this.data.value.requestType,requestValue:{[this.data.value.requestType]:this.data.value.requestValue}};default:return this.data.value}}createDataMappingForm(){this.mappingForm.addControl("topicFilter",this.fb.control("",[ue.required,ue.pattern(kt)])),this.mappingForm.addControl("subscriptionQos",this.fb.control(0)),this.mappingForm.addControl("converter",this.fb.group({type:[wn.JSON,[]],json:this.fb.group({deviceInfo:[{},[]],attributes:[[],[]],timeseries:[[],[]]}),bytes:this.fb.group({deviceInfo:[{},[]],attributes:[[],[]],timeseries:[[],[]]}),custom:this.fb.group({extension:["",[ue.required,ue.pattern(kt)]],extensionConfig:[{},[]]})})),this.mappingForm.patchValue(this.getFormValueData()),this.mappingForm.get("converter.type").valueChanges.pipe(Re(this.mappingForm.get("converter.type").value),Ne(this.destroy$)).subscribe((e=>{const t=this.mappingForm.get("converter");t.get("json").disable({emitEvent:!1}),t.get("bytes").disable({emitEvent:!1}),t.get("custom").disable({emitEvent:!1}),t.get(e).enable({emitEvent:!1})}))}createRequestMappingForm(){this.mappingForm.addControl("requestType",this.fb.control(In.CONNECT_REQUEST,[])),this.mappingForm.addControl("requestValue",this.fb.group({connectRequests:this.fb.group({topicFilter:["",[ue.required,ue.pattern(kt)]],deviceInfo:[{},[]]}),disconnectRequests:this.fb.group({topicFilter:["",[ue.required,ue.pattern(kt)]],deviceInfo:[{},[]]}),attributeRequests:this.fb.group({topicFilter:["",[ue.required,ue.pattern(kt)]],deviceInfo:this.fb.group({deviceNameExpressionSource:[Tn.MSG,[]],deviceNameExpression:["",[ue.required]]}),attributeNameExpressionSource:[Tn.MSG,[]],attributeNameExpression:["",[ue.required,ue.pattern(kt)]],topicExpression:["",[ue.required,ue.pattern(kt)]],valueExpression:["",[ue.required,ue.pattern(kt)]],retain:[!1,[]]}),attributeUpdates:this.fb.group({deviceNameFilter:["",[ue.required,ue.pattern(kt)]],attributeFilter:["",[ue.required,ue.pattern(kt)]],topicExpression:["",[ue.required,ue.pattern(kt)]],valueExpression:["",[ue.required,ue.pattern(kt)]],retain:[!0,[]]}),serverSideRpc:this.fb.group({type:[Pn.TWO_WAY,[]],deviceNameFilter:["",[ue.required,ue.pattern(kt)]],methodFilter:["",[ue.required,ue.pattern(kt)]],requestTopicExpression:["",[ue.required,ue.pattern(kt)]],responseTopicExpression:["",[ue.required,ue.pattern(kt)]],valueExpression:["",[ue.required,ue.pattern(kt)]],responseTopicQoS:[0,[]],responseTimeout:[1e4,[ue.required,ue.min(1)]]})})),this.mappingForm.get("requestType").valueChanges.pipe(Re(this.mappingForm.get("requestType").value),Ne(this.destroy$)).subscribe((e=>{const t=this.mappingForm.get("requestValue");t.get("connectRequests").disable({emitEvent:!1}),t.get("disconnectRequests").disable({emitEvent:!1}),t.get("attributeRequests").disable({emitEvent:!1}),t.get("attributeUpdates").disable({emitEvent:!1}),t.get("serverSideRpc").disable({emitEvent:!1}),t.get(e).enable()})),this.mappingForm.get("requestValue.serverSideRpc.type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{const t=this.mappingForm.get("requestValue.serverSideRpc");e===Pn.ONE_WAY?(t.get("responseTopicExpression").disable({emitEvent:!1}),t.get("responseTopicQoS").disable({emitEvent:!1}),t.get("responseTimeout").disable({emitEvent:!1})):(t.get("responseTopicExpression").enable({emitEvent:!1}),t.get("responseTopicQoS").enable({emitEvent:!1}),t.get("responseTimeout").enable({emitEvent:!1}))})),this.mappingForm.patchValue(this.getFormValueData())}createOPCUAMappingForm(){this.mappingForm=this.fb.group({deviceNodeSource:[Sn.PATH,[]],deviceNodePattern:["",[ue.required]],deviceInfo:[{},[]],attributes:[[],[]],timeseries:[[],[]],rpc_methods:[[],[]],attributes_updates:[[],[]]}),this.mappingForm.patchValue(this.getFormValueData())}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:io,deps:[{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef},{token:me.FormBuilder},{token:ft.TbPopoverService},{token:t.Renderer2},{token:t.ViewContainerRef},{token:Y.TranslateService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:io,selector:"tb-mapping-dialog",usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n \n

{{ MappingTypeTranslationsMap.get(this.data?.mappingType) | translate}}

\n \n
\n \n
\n
\n
\n
\n {{ MappingHintTranslationsMap.get(this.data?.mappingType) | translate }}\n
\n \n \n
\n
gateway.topic-filter
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n {{ \'gateway.mqtt-qos\' | translate }}\n
\n
\n \n \n \n {{ QualityTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n
\n
gateway.payload-type
\n \n \n {{ ConvertorTypeTranslationsMap.get(type) | translate }}\n \n \n
\n
\n
gateway.data-conversion
\n
\n {{ DataConversionTranslationsMap.get(converterType) | translate }}\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
gateway.attributes
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.timeseries
\n
\n \n \n {{ telemetry }}\n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n {{ \'gateway.extension\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.extension-configuration
\n
{{ \'gateway.extension-configuration-hint\' | translate }}
\n
\n
gateway.keys
\n
\n \n \n {{ telemetry }}\n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
gateway.request-type
\n
\n \n \n \n {{ RequestTypesTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n \n
\n
gateway.topic-filter
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
gateway.from-device-request-settings
\n
\n gateway.from-device-request-settings-hint\n
\n
\n
\n
gateway.device-info.device-name-expression
\n
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.attribute-name-expression
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n
gateway.to-device-response-settings
\n
\n gateway.to-device-response-settings-hint\n
\n
\n
gateway.response-value-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.response-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n \n \n {{ \'gateway.retain\' | translate }}\n \n \n
\n
\n
\n \n
\n
\n {{ \'gateway.device-name-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n {{ \'gateway.attribute-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.response-value-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.response-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n \n \n {{ \'gateway.retain\' | translate }}\n \n \n
\n
\n \n
\n \n \n {{ \'gateway.with-response\' | translate }}\n \n \n {{ \'gateway.without-response\' | translate }}\n \n \n
\n
\n
\n {{ \'gateway.device-name-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n {{ \'gateway.method-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.request-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.value-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n \n
\n
gateway.response-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n {{ \'gateway.response-topic-Qos\' | translate }}\n
\n \n \n \n {{ QualityTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n
gateway.response-timeout
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n {{ \'gateway.device-node\' | translate }}\n
\n
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n \n \n \n warning\n \n
\n
\n
\n
\n
\n \n \n
\n
gateway.attributes
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.timeseries
\n
\n \n \n {{ telemetry }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.attribute-updates
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.rpc-methods
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host{display:grid;height:100%}:host .key-mapping{max-width:900px;display:flex;flex-direction:column}:host .key-mapping .mat-toolbar{min-height:64px}:host .key-mapping tb-toggle-select{padding:4px 0}:host .mat-mdc-dialog-content{height:670px}:host .ellipsis-chips-container{max-width:70%}:host ::ng-deep .key-mapping .mat-mdc-chip-listbox .mdc-evolution-chip-set__chips{justify-content:flex-end;align-items:center;flex-wrap:nowrap}:host ::ng-deep .tb-form-row .fixed-title-width{min-width:40px;width:35%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .tb-form-row .mat-mdc-form-field{width:0}:host ::ng-deep .see-example{width:32px;height:32px;margin:4px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .device-config{gap:12px;padding-left:10px;padding-right:10px}:host ::ng-deep .device-node-pattern-field{flex-basis:3%}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"component",type:dt.HelpComponent,selector:"[tb-help]",inputs:["tb-help"]},{kind:"component",type:gt.HelpPopupComponent,selector:"[tb-help-popup], [tb-help-popup-content]",inputs:["tb-help-popup","tb-help-popup-content","trigger-text","trigger-style","tb-help-popup-placement","tb-help-popup-style","hintMode"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:Je.MatDialogActions,selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",inputs:["align"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"component",type:yt.MatChip,selector:"mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",inputs:["role","id","aria-label","aria-description","value","color","removable","highlighted","disableRipple","disabled"],outputs:["removed","destroyed"],exportAs:["matChip"]},{kind:"component",type:yt.MatChipListbox,selector:"mat-chip-listbox",inputs:["multiple","aria-orientation","selectable","compareWith","required","hideSingleSelectionIndicator","value"],outputs:["change"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:me.FormGroupName,selector:"[formGroupName]",inputs:["formGroupName"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:bt.TbIconComponent,selector:"tb-icon",inputs:["color"],exportAs:["tbIcon"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"directive",type:ka,selector:"[tb-ellipsis-chip-list]",inputs:["tb-ellipsis-chip-list"]},{kind:"component",type:oo,selector:"tb-device-info-table",inputs:["useSource","required","sourceTypes","deviceInfoType"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"pipe",type:Ta,name:"getGatewayHelpLink"}]})}}e("MappingDialogComponent",io),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:io,decorators:[{type:n,args:[{selector:"tb-mapping-dialog",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n \n

{{ MappingTypeTranslationsMap.get(this.data?.mappingType) | translate}}

\n \n
\n \n
\n
\n
\n
\n {{ MappingHintTranslationsMap.get(this.data?.mappingType) | translate }}\n
\n \n \n
\n
gateway.topic-filter
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n {{ \'gateway.mqtt-qos\' | translate }}\n
\n
\n \n \n \n {{ QualityTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n
\n
gateway.payload-type
\n \n \n {{ ConvertorTypeTranslationsMap.get(type) | translate }}\n \n \n
\n
\n
gateway.data-conversion
\n
\n {{ DataConversionTranslationsMap.get(converterType) | translate }}\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
gateway.attributes
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.timeseries
\n
\n \n \n {{ telemetry }}\n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n {{ \'gateway.extension\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.extension-configuration
\n
{{ \'gateway.extension-configuration-hint\' | translate }}
\n
\n
gateway.keys
\n
\n \n \n {{ telemetry }}\n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
gateway.request-type
\n
\n \n \n \n {{ RequestTypesTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n \n \n
\n
gateway.topic-filter
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
gateway.from-device-request-settings
\n
\n gateway.from-device-request-settings-hint\n
\n
\n
\n
gateway.device-info.device-name-expression
\n
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.attribute-name-expression
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n
gateway.to-device-response-settings
\n
\n gateway.to-device-response-settings-hint\n
\n
\n
gateway.response-value-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.response-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n \n \n {{ \'gateway.retain\' | translate }}\n \n \n
\n
\n
\n \n
\n
\n {{ \'gateway.device-name-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n {{ \'gateway.attribute-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.response-value-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.response-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n \n \n {{ \'gateway.retain\' | translate }}\n \n \n
\n
\n \n
\n \n \n {{ \'gateway.with-response\' | translate }}\n \n \n {{ \'gateway.without-response\' | translate }}\n \n \n
\n
\n
\n {{ \'gateway.device-name-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n {{ \'gateway.method-filter\' | translate }}\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.request-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
gateway.value-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n \n
\n
gateway.response-topic-expression
\n
\n \n \n \n warning\n \n
\n
\n
\n
\n
\n
\n
\n {{ \'gateway.response-topic-Qos\' | translate }}\n
\n \n \n \n {{ QualityTranslationsMap.get(type) | translate }}\n \n \n \n
\n
\n
gateway.response-timeout
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n {{ \'gateway.device-node\' | translate }}\n
\n
\n
\n \n \n \n {{ SourceTypeTranslationsMap.get(type) | translate }}\n \n \n \n \n \n \n warning\n \n
\n
\n
\n
\n
\n \n \n
\n
gateway.attributes
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.timeseries
\n
\n \n \n {{ telemetry }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.attribute-updates
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.rpc-methods
\n
\n \n \n {{ attribute }}\n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host{display:grid;height:100%}:host .key-mapping{max-width:900px;display:flex;flex-direction:column}:host .key-mapping .mat-toolbar{min-height:64px}:host .key-mapping tb-toggle-select{padding:4px 0}:host .mat-mdc-dialog-content{height:670px}:host .ellipsis-chips-container{max-width:70%}:host ::ng-deep .key-mapping .mat-mdc-chip-listbox .mdc-evolution-chip-set__chips{justify-content:flex-end;align-items:center;flex-wrap:nowrap}:host ::ng-deep .tb-form-row .fixed-title-width{min-width:40px;width:35%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .tb-form-row .mat-mdc-form-field{width:0}:host ::ng-deep .see-example{width:32px;height:32px;margin:4px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .device-config{gap:12px;padding-left:10px;padding-right:10px}:host ::ng-deep .device-node-pattern-field{flex-basis:3%}\n']}]}],ctorParameters:()=>[{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef},{type:me.FormBuilder},{type:ft.TbPopoverService},{type:t.Renderer2},{type:t.ViewContainerRef},{type:Y.TranslateService}]});class ro{set mappingType(e){this.mappingTypeValue!==e&&(this.mappingTypeValue=e)}get mappingType(){return this.mappingTypeValue}constructor(e,t,n,a){this.translate=e,this.dialog=t,this.dialogService=n,this.fb=a,this.required=!1,this.mappingTypeTranslationsMap=yn,this.mappingTypeEnum=fn,this.displayedColumns=[],this.mappingColumns=[],this.textSearchMode=!1,this.hidePageSize=!1,this.activeValue=!1,this.dirtyValue=!1,this.textSearch=this.fb.control("",{nonNullable:!0}),this.onChange=()=>{},this.onTouched=()=>{},this.destroy$=new Se,this.mappingFormGroup=this.fb.array([]),this.dirtyValue=!this.activeValue,this.dataSource=new so}ngOnInit(){this.setMappingColumns(),this.displayedColumns.push(...this.mappingColumns.map((e=>e.def)),"actions"),this.mappingFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateTableData(e),this.onChange(e),this.onTouched()}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.textSearch.valueChanges.pipe(Ve(150),Be(((e,t)=>(e??"")===t.trim())),Ne(this.destroy$)).subscribe((e=>{const t=e.trim();this.updateTableData(this.mappingFormGroup.value,t.trim())}))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){this.mappingFormGroup.clear(),this.pushDataAsFormArrays(e)}validate(){return!this.required||this.mappingFormGroup.controls.length?null:{mappingFormGroup:{valid:!1}}}enterFilterMode(){this.textSearchMode=!0,setTimeout((()=>{this.searchInputField.nativeElement.focus(),this.searchInputField.nativeElement.setSelectionRange(0,0)}),10)}exitFilterMode(){this.updateTableData(this.mappingFormGroup.value),this.textSearchMode=!1,this.textSearch.reset()}manageMapping(e,t){e&&e.stopPropagation();const n=ie(t)?this.mappingFormGroup.at(t).value:{};this.dialog.open(io,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{mappingType:this.mappingType,value:n,buttonTitle:re(t)?"action.add":"action.apply"}}).afterClosed().pipe(Oe(1),Ne(this.destroy$)).subscribe((e=>{e&&(ie(t)?this.mappingFormGroup.at(t).patchValue(e):this.pushDataAsFormArrays([e]),this.mappingFormGroup.markAsDirty())}))}updateTableData(e,t){let n=e.map((e=>this.getMappingValue(e)));t&&(n=n.filter((e=>Object.values(e).some((e=>e.toString().toLowerCase().includes(t.toLowerCase())))))),this.dataSource.loadData(n)}deleteMapping(e,t){e&&e.stopPropagation(),this.dialogService.confirm(this.translate.instant("gateway.delete-mapping-title"),"",this.translate.instant("action.no"),this.translate.instant("action.yes"),!0).subscribe((e=>{e&&(this.mappingFormGroup.removeAt(t),this.mappingFormGroup.markAsDirty())}))}pushDataAsFormArrays(e){e?.length&&e.forEach((e=>this.mappingFormGroup.push(this.fb.control(e))))}getMappingValue(e){switch(this.mappingType){case fn.DATA:const t=Cn.get(e.converter?.type);return{topicFilter:e.topicFilter,QoS:e.subscriptionQos,converter:t?this.translate.instant(t):""};case fn.REQUESTS:let n;const a=e;return n=a.requestType===In.ATTRIBUTE_UPDATE?a.requestValue.attributeFilter:a.requestType===In.SERVER_SIDE_RPC?a.requestValue.methodFilter:a.requestValue.topicFilter,{requestType:e.requestType,type:this.translate.instant(An.get(e.requestType)),details:n};case fn.OPCUA:const o=e.deviceInfo?.deviceNameExpression,i=e.deviceInfo?.deviceProfileExpression,{deviceNodePattern:r}=e;return{deviceNodePattern:r,deviceNamePattern:o,deviceProfileExpression:i};default:return{}}}setMappingColumns(){switch(this.mappingType){case fn.DATA:this.mappingColumns.push({def:"topicFilter",title:"gateway.topic-filter"},{def:"QoS",title:"gateway.mqtt-qos"},{def:"converter",title:"gateway.payload-type"});break;case fn.REQUESTS:this.mappingColumns.push({def:"type",title:"gateway.type"},{def:"details",title:"gateway.details"});break;case fn.OPCUA:this.mappingColumns.push({def:"deviceNodePattern",title:"gateway.device-node"},{def:"deviceNamePattern",title:"gateway.device-name"},{def:"deviceProfileExpression",title:"gateway.device-profile"})}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ro,deps:[{token:Y.TranslateService},{token:Je.MatDialog},{token:X.DialogService},{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:ro,isStandalone:!0,selector:"tb-mapping-table",inputs:{required:"required",mappingType:"mappingType"},providers:[{provide:ge,useExisting:m((()=>ro)),multi:!0},{provide:fe,useExisting:m((()=>ro)),multi:!0}],viewQueries:[{propertyName:"searchInputField",first:!0,predicate:["searchInput"],descendants:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n \n
\n
\n {{mappingTypeTranslationsMap.get(mappingType) | translate}}\n
\n \n \n \n
\n
\n \n
\n \n \n  \n \n \n \n
\n
\n
\n \n \n \n {{ column.title | translate }}\n \n \n {{ mapping[column.def] }}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n widget.no-data-found\n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}:host .tb-mapping-table .tb-mapping-table-content{width:100%;height:100%;background:#fff;overflow:hidden}:host .tb-mapping-table .tb-mapping-table-content.tb-outlined-border{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}:host .tb-mapping-table .tb-mapping-table-content .mat-toolbar-tools{min-height:auto}:host .tb-mapping-table .tb-mapping-table-content .title-container{overflow:hidden}:host .tb-mapping-table .tb-mapping-table-content .tb-mapping-table-title{padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tb-mapping-table .tb-mapping-table-content .table-container{overflow:auto}:host .tb-mapping-table .tb-mapping-table-content .table-container .mat-mdc-table{table-layout:fixed;min-width:450px}:host .tb-mapping-table .tb-mapping-table-content .table-container .mat-mdc-table .table-value-column{padding:0 12px;width:23%}:host .tb-mapping-table .tb-mapping-table-content .table-container .mat-mdc-table .table-value-column.request-column{width:38%}:host .tb-mapping-table .tb-mapping-table-content .ellipsis{overflow:hidden;text-overflow:ellipsis}:host .no-data-found{height:calc(100% - 120px)}@media screen and (max-width: 599px){:host .mat-toolbar{height:auto;min-height:100px}:host .mat-toolbar .tb-mapping-table-title{padding-bottom:5px;width:100%}}:host ::ng-deep mat-cell.tb-value-cell{cursor:pointer}:host ::ng-deep mat-cell.tb-value-cell .mat-icon{height:24px;width:24px;font-size:24px;color:#757575}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"pipe",type:_.AsyncPipe,name:"async"},{kind:"ngmodule",type:D},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"component",type:ht.MatMenu,selector:"mat-menu",inputs:["backdropClass","aria-label","aria-labelledby","aria-describedby","xPosition","yPosition","overlapTrigger","hasBackdrop","class","classList"],outputs:["closed","close"],exportAs:["matMenu"]},{kind:"directive",type:ht.MatMenuTrigger,selector:"[mat-menu-trigger-for], [matMenuTriggerFor]",inputs:["mat-menu-trigger-for","matMenuTriggerFor","matMenuTriggerData","matMenuTriggerRestoreFocus"],outputs:["menuOpened","onMenuOpen","menuClosed","onMenuClose"],exportAs:["matMenuTrigger"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:b.MatTable,selector:"mat-table, table[mat-table]",exportAs:["matTable"]},{kind:"directive",type:b.MatHeaderCellDef,selector:"[matHeaderCellDef]"},{kind:"directive",type:b.MatHeaderRowDef,selector:"[matHeaderRowDef]",inputs:["matHeaderRowDef","matHeaderRowDefSticky"]},{kind:"directive",type:b.MatColumnDef,selector:"[matColumnDef]",inputs:["matColumnDef"]},{kind:"directive",type:b.MatCellDef,selector:"[matCellDef]"},{kind:"directive",type:b.MatRowDef,selector:"[matRowDef]",inputs:["matRowDefColumns","matRowDefWhen"]},{kind:"directive",type:b.MatHeaderCell,selector:"mat-header-cell, th[mat-header-cell]"},{kind:"directive",type:b.MatCell,selector:"mat-cell, td[mat-cell]"},{kind:"component",type:b.MatHeaderRow,selector:"mat-header-row, tr[mat-header-row]",exportAs:["matHeaderRow"]},{kind:"component",type:b.MatRow,selector:"mat-row, tr[mat-row]",exportAs:["matRow"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultShowHideDirective,selector:" [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]",inputs:["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"]},{kind:"directive",type:K.DefaultClassDirective,selector:" [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]",inputs:["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"]},{kind:"directive",type:K.DefaultStyleDirective,selector:" [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]",inputs:["ngStyle","ngStyle.xs","ngStyle.sm","ngStyle.md","ngStyle.lg","ngStyle.xl","ngStyle.lt-sm","ngStyle.lt-md","ngStyle.lt-lg","ngStyle.lt-xl","ngStyle.gt-xs","ngStyle.gt-sm","ngStyle.gt-md","ngStyle.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:bt.TbIconComponent,selector:"tb-icon",inputs:["color"],exportAs:["tbIcon"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("MappingTableComponent",ro),He([N()],ro.prototype,"required",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ro,decorators:[{type:n,args:[{selector:"tb-mapping-table",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>ro)),multi:!0},{provide:fe,useExisting:m((()=>ro)),multi:!0}],standalone:!0,imports:[H,D,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n \n
\n
\n {{mappingTypeTranslationsMap.get(mappingType) | translate}}\n
\n \n \n \n
\n
\n \n
\n \n \n  \n \n \n \n
\n
\n
\n \n \n \n {{ column.title | translate }}\n \n \n {{ mapping[column.def] }}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n widget.no-data-found\n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}:host .tb-mapping-table .tb-mapping-table-content{width:100%;height:100%;background:#fff;overflow:hidden}:host .tb-mapping-table .tb-mapping-table-content.tb-outlined-border{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}:host .tb-mapping-table .tb-mapping-table-content .mat-toolbar-tools{min-height:auto}:host .tb-mapping-table .tb-mapping-table-content .title-container{overflow:hidden}:host .tb-mapping-table .tb-mapping-table-content .tb-mapping-table-title{padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tb-mapping-table .tb-mapping-table-content .table-container{overflow:auto}:host .tb-mapping-table .tb-mapping-table-content .table-container .mat-mdc-table{table-layout:fixed;min-width:450px}:host .tb-mapping-table .tb-mapping-table-content .table-container .mat-mdc-table .table-value-column{padding:0 12px;width:23%}:host .tb-mapping-table .tb-mapping-table-content .table-container .mat-mdc-table .table-value-column.request-column{width:38%}:host .tb-mapping-table .tb-mapping-table-content .ellipsis{overflow:hidden;text-overflow:ellipsis}:host .no-data-found{height:calc(100% - 120px)}@media screen and (max-width: 599px){:host .mat-toolbar{height:auto;min-height:100px}:host .mat-toolbar .tb-mapping-table-title{padding-bottom:5px;width:100%}}:host ::ng-deep mat-cell.tb-value-cell{cursor:pointer}:host ::ng-deep mat-cell.tb-value-cell .mat-icon{height:24px;width:24px;font-size:24px;color:#757575}\n']}]}],ctorParameters:()=>[{type:Y.TranslateService},{type:Je.MatDialog},{type:X.DialogService},{type:me.FormBuilder}],propDecorators:{required:[{type:a}],mappingType:[{type:a}],searchInputField:[{type:o,args:["searchInput"]}]}});class so extends R{constructor(){super()}}e("MappingDatasource",so);class lo{constructor(e,t){this.fb=e,this.cdr=t,this.title="gateway.security",this.extendCertificatesModel=!1,this.BrokerSecurityType=rn,this.securityTypes=Object.values(rn),this.modeTypes=Object.values(pn),this.SecurityTypeTranslationsMap=mn,this.destroy$=new Se}ngOnInit(){this.securityFormGroup=this.fb.group({type:[rn.ANONYMOUS,[]],username:["",[ue.required,ue.pattern(kt)]],password:["",[ue.pattern(kt)]],pathToCACert:["",[ue.pattern(kt)]],pathToPrivateKey:["",[ue.pattern(kt)]],pathToClientCert:["",[ue.pattern(kt)]]}),this.extendCertificatesModel&&this.securityFormGroup.addControl("mode",this.fb.control(pn.NONE,[])),this.securityFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()})),this.securityFormGroup.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.updateValidators(e)))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}writeValue(e){if(e)e.type||(e.type=rn.ANONYMOUS),this.updateValidators(e.type),this.securityFormGroup.reset(e,{emitEvent:!1});else{const e={type:rn.ANONYMOUS};this.securityFormGroup.reset(e,{emitEvent:!1})}this.cdr.markForCheck()}validate(){return this.securityFormGroup.get("type").value!==rn.BASIC||this.securityFormGroup.valid?null:{securityForm:{valid:!1}}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}updateValidators(e){if(e)if(this.securityFormGroup.get("username").disable({emitEvent:!1}),this.securityFormGroup.get("password").disable({emitEvent:!1}),this.securityFormGroup.get("pathToCACert").disable({emitEvent:!1}),this.securityFormGroup.get("pathToPrivateKey").disable({emitEvent:!1}),this.securityFormGroup.get("pathToClientCert").disable({emitEvent:!1}),this.securityFormGroup.get("mode")?.disable({emitEvent:!1}),e===rn.BASIC)this.securityFormGroup.get("username").enable({emitEvent:!1}),this.securityFormGroup.get("password").enable({emitEvent:!1});else if(e===rn.CERTIFICATES&&(this.securityFormGroup.get("pathToCACert").enable({emitEvent:!1}),this.securityFormGroup.get("pathToPrivateKey").enable({emitEvent:!1}),this.securityFormGroup.get("pathToClientCert").enable({emitEvent:!1}),this.extendCertificatesModel)){const e=this.securityFormGroup.get("mode");e&&!e.value&&e.setValue(pn.NONE,{emitEvent:!1}),e?.enable({emitEvent:!1}),this.securityFormGroup.get("username").enable({emitEvent:!1}),this.securityFormGroup.get("password").enable({emitEvent:!1})}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:lo,deps:[{token:me.FormBuilder},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:lo,isStandalone:!0,selector:"tb-security-config",inputs:{title:"title",extendCertificatesModel:"extendCertificatesModel"},providers:[{provide:ge,useExisting:m((()=>lo)),multi:!0},{provide:fe,useExisting:m((()=>lo)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ title | translate }}
\n \n \n {{ SecurityTypeTranslationsMap.get(type) | translate }}\n \n \n
\n \n \n
\n
gateway.username
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n
\n \n
\n
\n
\n
\n
\n \n
{{ \'gateway.path-hint\' | translate }}
\n
\n
gateway.CA-certificate-path
\n
\n \n \n \n
\n
\n
\n
gateway.private-key-path
\n
\n \n \n \n
\n
\n
\n
gateway.client-cert-path
\n
\n \n \n \n
\n
\n \n
\n
gateway.mode
\n
\n \n \n \n {{ type }}\n \n \n \n
\n
\n
\n
gateway.username
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"ngmodule",type:D},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:tt.TogglePasswordComponent,selector:"tb-toggle-password"},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("SecurityConfigComponent",lo),He([N()],lo.prototype,"extendCertificatesModel",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:lo,decorators:[{type:n,args:[{selector:"tb-security-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>lo)),multi:!0},{provide:fe,useExisting:m((()=>lo)),multi:!0}],standalone:!0,imports:[H,D],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ title | translate }}
\n \n \n {{ SecurityTypeTranslationsMap.get(type) | translate }}\n \n \n
\n \n \n
\n
gateway.username
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n
\n \n
\n
\n
\n
\n
\n \n
{{ \'gateway.path-hint\' | translate }}
\n
\n
gateway.CA-certificate-path
\n
\n \n \n \n
\n
\n
\n
gateway.private-key-path
\n
\n \n \n \n
\n
\n
\n
gateway.client-cert-path
\n
\n \n \n \n
\n
\n \n
\n
gateway.mode
\n
\n \n \n \n {{ type }}\n \n \n \n
\n
\n
\n
gateway.username
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:t.ChangeDetectorRef}],propDecorators:{title:[{type:a}],extendCertificatesModel:[{type:a}]}});class co{constructor(e){this.fb=e,this.hideNewFields=!1,this.securityPolicyTypes=_n,this.destroy$=new Se,this.serverConfigFormGroup=this.fb.group({url:["",[ue.required,ue.pattern(kt)]],timeoutInMillis:[1e3,[ue.required,ue.min(1e3)]],scanPeriodInMillis:[V,[ue.required,ue.min(1e3)]],pollPeriodInMillis:[5e3,[ue.required,ue.min(50)]],enableSubscriptions:[!0,[]],subCheckPeriodInMillis:[100,[ue.required,ue.min(100)]],showMap:[!1,[]],security:[Un.BASIC128,[]],identity:[]}),this.serverConfigFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}ngAfterViewInit(){this.hideNewFields&&this.serverConfigFormGroup.get("pollPeriodInMillis").disable({emitEvent:!1})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.serverConfigFormGroup.valid?null:{serverConfigFormGroup:{valid:!1}}}writeValue(e){const{timeoutInMillis:t=1e3,scanPeriodInMillis:n=V,pollPeriodInMillis:a=5e3,enableSubscriptions:o=!0,subCheckPeriodInMillis:i=100,showMap:r=!1,security:s=Un.BASIC128,identity:l={}}=e;this.serverConfigFormGroup.reset({...e,timeoutInMillis:t,scanPeriodInMillis:n,pollPeriodInMillis:a,enableSubscriptions:o,subCheckPeriodInMillis:i,showMap:r,security:s,identity:l},{emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:co,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:co,isStandalone:!0,selector:"tb-opc-server-config",inputs:{hideNewFields:"hideNewFields"},providers:[{provide:ge,useExisting:m((()=>co)),multi:!0},{provide:fe,useExisting:m((()=>co)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
gateway.server-url
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.timeout\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.security-policy\' | translate }}
\n
\n
\n \n \n {{ version.name }}\n \n \n
\n
\n
\n
\n
{{ \'gateway.scan-period\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.poll-period\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.sub-check-period\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n
{{ \'gateway.enable-subscription\' | translate }}
\n
\n
\n
\n
\n \n \n {{ \'gateway.show-map\' | translate }}\n \n \n
\n \n \n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"component",type:lo,selector:"tb-security-config",inputs:["title","extendCertificatesModel"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("OpcServerConfigComponent",co),He([N()],co.prototype,"hideNewFields",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:co,decorators:[{type:n,args:[{selector:"tb-opc-server-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>co)),multi:!0},{provide:fe,useExisting:m((()=>co)),multi:!0}],standalone:!0,imports:[H,D,lo,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
gateway.server-url
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.timeout\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.security-policy\' | translate }}
\n
\n
\n \n \n {{ version.name }}\n \n \n
\n
\n
\n
\n
{{ \'gateway.scan-period\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.poll-period\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.sub-check-period\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n
{{ \'gateway.enable-subscription\' | translate }}
\n
\n
\n
\n
\n \n \n {{ \'gateway.show-map\' | translate }}\n \n \n
\n \n \n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder}],propDecorators:{hideNewFields:[{type:a}]}});class po extends ya{constructor(){super(...arguments),this.mappingTypes=fn,this.isLegacy=!1}initBasicFormGroup(){return this.fb.group({mapping:[],server:[]})}mapConfigToFormValue(e){return{server:e.server??{},mapping:e.mapping??[]}}getMappedValue(e){return{server:e.server,mapping:e.mapping}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:po,deps:null,target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:po,isStandalone:!0,selector:"tb-opc-ua-basic-config",providers:[{provide:ge,useExisting:m((()=>po)),multi:!0},{provide:fe,useExisting:m((()=>po)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:ro,selector:"tb-mapping-table",inputs:["required","mappingType"]},{kind:"component",type:co,selector:"tb-opc-server-config",inputs:["hideNewFields"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("OpcUaBasicConfigComponent",po),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:po,decorators:[{type:n,args:[{selector:"tb-opc-ua-basic-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>po)),multi:!0},{provide:fe,useExisting:m((()=>po)),multi:!0}],standalone:!0,imports:[H,D,lo,ro,co],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n']}]}]});class mo{constructor(e,t){this.fb=e,this.cdr=t,this.mqttVersions=gn,this.portLimits=Et,this.destroy$=new Se,this.brokerConfigFormGroup=this.fb.group({host:["",[ue.required,ue.pattern(kt)]],port:[null,[ue.required,ue.min(Et.MIN),ue.max(Et.MAX)]],version:[5,[]],clientId:["tb_gw_"+se(5),[ue.pattern(kt)]],security:[]}),this.brokerConfigFormGroup.valueChanges.subscribe((e=>{this.onChange(e),this.onTouched()}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}generate(e){this.brokerConfigFormGroup.get(e)?.patchValue("tb_gw_"+se(5))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){const{version:t=5,clientId:n=`tb_gw_${se(5)}`,security:a={}}=e;this.brokerConfigFormGroup.reset({...e,version:t,clientId:n,security:a},{emitEvent:!1}),this.cdr.markForCheck()}validate(){return this.brokerConfigFormGroup.valid?null:{brokerConfigFormGroup:{valid:!1}}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:mo,deps:[{token:me.FormBuilder},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:mo,isStandalone:!0,selector:"tb-broker-config-control",providers:[{provide:ge,useExisting:m((()=>mo)),multi:!0},{provide:fe,useExisting:m((()=>mo)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.mqtt-version
\n
\n \n \n {{ version.name }}\n \n \n
\n
\n
\n
gateway.client-id
\n
\n \n \n \n \n
\n
\n \n \n
\n',dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:lo,selector:"tb-security-config",inputs:["title","extendCertificatesModel"]},{kind:"pipe",type:wa,name:"getGatewayPortTooltip"}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("BrokerConfigControlComponent",mo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:mo,decorators:[{type:n,args:[{selector:"tb-broker-config-control",changeDetection:d.OnPush,standalone:!0,imports:[H,D,lo,wa],providers:[{provide:ge,useExisting:m((()=>mo)),multi:!0},{provide:fe,useExisting:m((()=>mo)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.mqtt-version
\n
\n \n \n {{ version.name }}\n \n \n
\n
\n
\n
gateway.client-id
\n
\n \n \n \n \n
\n
\n \n \n
\n'}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:t.ChangeDetectorRef}]});class uo{constructor(e){this.fb=e,this.destroy$=new Se,this.workersConfigFormGroup=this.fb.group({maxNumberOfWorkers:[100,[ue.required,ue.min(1)]],maxMessageNumberPerWorker:[10,[ue.required,ue.min(1)]]}),this.workersConfigFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){const{maxNumberOfWorkers:t,maxMessageNumberPerWorker:n}=e;this.workersConfigFormGroup.reset({maxNumberOfWorkers:t||100,maxMessageNumberPerWorker:n||10},{emitEvent:!1})}validate(){return this.workersConfigFormGroup.valid?null:{workersConfigFormGroup:{valid:!1}}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:uo,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:uo,isStandalone:!0,selector:"tb-workers-config-control",providers:[{provide:ge,useExisting:m((()=>uo)),multi:!0},{provide:fe,useExisting:m((()=>uo)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
\n
{{ \'gateway.max-number-of-workers\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.max-messages-queue-for-worker\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n',dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("WorkersConfigControlComponent",uo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:uo,decorators:[{type:n,args:[{selector:"tb-workers-config-control",changeDetection:d.OnPush,standalone:!0,imports:[H,D,Sa],providers:[{provide:ge,useExisting:m((()=>uo)),multi:!0},{provide:fe,useExisting:m((()=>uo)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
\n
{{ \'gateway.max-number-of-workers\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
{{ \'gateway.max-messages-queue-for-worker\' | translate }}
\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n'}]}],ctorParameters:()=>[{type:me.FormBuilder}]});class go{constructor(e){this.fb=e,this.isExpansionMode=!1,this.defaultValue=ln.Key,this.reportStrategyTypes=Object.values(sn),this.ReportTypeTranslateMap=cn,this.ReportStrategyType=sn,this.destroy$=new Se,this.showStrategyControl=this.fb.control(!1),this.reportStrategyFormGroup=this.fb.group({type:[{value:sn.OnReportPeriod,disabled:!0},[]],reportPeriod:[{value:this.defaultValue,disabled:!0},[ue.required]]}),this.observeStrategyFormChange(),this.observeStrategyToggle()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}writeValue(e){this.isExpansionMode&&this.showStrategyControl.setValue(!!e,{emitEvent:!1}),e&&this.reportStrategyFormGroup.enable({emitEvent:!1});const{type:t=sn.OnReportPeriod,reportPeriod:n=this.defaultValue}=e??{};this.reportStrategyFormGroup.setValue({type:t,reportPeriod:n},{emitEvent:!1}),this.onTypeChange(t)}validate(){return this.reportStrategyFormGroup.valid||this.reportStrategyFormGroup.disabled?null:{reportStrategyForm:{valid:!1}}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}observeStrategyFormChange(){this.reportStrategyFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()})),this.reportStrategyFormGroup.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.onTypeChange(e)))}observeStrategyToggle(){this.showStrategyControl.valueChanges.pipe(Ne(this.destroy$),Me((()=>this.isExpansionMode))).subscribe((e=>{e?(this.reportStrategyFormGroup.enable({emitEvent:!1}),this.reportStrategyFormGroup.get("reportPeriod").addValidators(ue.required),this.onChange(this.reportStrategyFormGroup.value)):(this.reportStrategyFormGroup.disable({emitEvent:!1}),this.reportStrategyFormGroup.get("reportPeriod").removeValidators(ue.required),this.onChange(null)),this.reportStrategyFormGroup.updateValueAndValidity({emitEvent:!1})}))}onTypeChange(e){const t=this.reportStrategyFormGroup.get("reportPeriod");e===sn.OnChange?t.disable({emitEvent:!1}):this.isExpansionMode&&!this.showStrategyControl.value||t.enable({emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:go,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:go,isStandalone:!0,selector:"tb-report-strategy",inputs:{isExpansionMode:"isExpansionMode",defaultValue:"defaultValue"},providers:[{provide:ge,useExisting:m((()=>go)),multi:!0},{provide:fe,useExisting:m((()=>go)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n \n \n \n \n {{ \'gateway.report-strategy.label\' | translate }}\n \n \n \n \n \n \n \n
gateway.report-strategy.label
\n \n
\n \n
\n
{{ \'gateway.type\' | translate }}
\n \n \n {{ ReportTypeTranslateMap.get(type) | translate }}\n \n \n
\n
\n
\n \n gateway.report-strategy.report-period\n \n
\n
\n \n \n \n
\n
\n
\n
\n',dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ReportStrategyComponent",go),He([N()],go.prototype,"isExpansionMode",void 0),He([B()],go.prototype,"defaultValue",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:go,decorators:[{type:n,args:[{selector:"tb-report-strategy",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>go)),multi:!0},{provide:fe,useExisting:m((()=>go)),multi:!0}],standalone:!0,imports:[H,D,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n \n \n \n \n {{ \'gateway.report-strategy.label\' | translate }}\n \n \n \n \n \n \n \n
gateway.report-strategy.label
\n \n
\n \n
\n
{{ \'gateway.type\' | translate }}
\n \n \n {{ ReportTypeTranslateMap.get(type) | translate }}\n \n \n
\n
\n
\n \n gateway.report-strategy.report-period\n \n
\n
\n \n \n \n
\n
\n
\n
\n'}]}],ctorParameters:()=>[{type:me.FormBuilder}],propDecorators:{isExpansionMode:[{type:a}],defaultValue:[{type:a}]}});class fo{constructor(e){this.fb=e,this.isMaster=!1,this.hideNewFields=!1,this.keysDataApplied=new i,this.modbusDataTypes=Object.values(ea),this.modifierTypes=Object.values(On),this.withFunctionCode=!0,this.withReportStrategy=!0,this.enableModifiersControlMap=new Map,this.showModifiersMap=new Map,this.functionCodesMap=new Map,this.defaultFunctionCodes=[],this.ModbusEditableDataTypes=ta,this.ModbusFunctionCodeTranslationsMap=zt,this.ModifierTypesMap=Rn,this.ReportStrategyDefaultValue=ln,this.destroy$=new Se,this.defaultReadFunctionCodes=[3,4],this.bitsReadFunctionCodes=[1,2],this.defaultWriteFunctionCodes=[6,16],this.bitsWriteFunctionCodes=[5,15]}ngOnInit(){this.withFunctionCode=!this.isMaster||this.keysType!==aa.ATTRIBUTES&&this.keysType!==aa.TIMESERIES,this.withReportStrategy=!(this.isMaster||this.keysType!==aa.ATTRIBUTES&&this.keysType!==aa.TIMESERIES||this.hideNewFields),this.keysListFormArray=this.prepareKeysFormArray(this.values),this.defaultFunctionCodes=this.getDefaultFunctionCodes()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}trackByControlId(e,t){return t.value.id}addKey(){const e=se(5),t=this.fb.group({tag:["",[ue.required,ue.pattern(kt)]],value:[{value:"",disabled:!this.isMaster},[ue.required,ue.pattern(kt)]],type:[ea.BYTES,[ue.required]],address:[null,[ue.required]],objectsCount:[1,[ue.required]],functionCode:[{value:this.getDefaultFunctionCodes()[0],disabled:!this.withFunctionCode},[ue.required]],reportStrategy:[{value:null,disabled:!this.withReportStrategy}],modifierType:[{value:On.MULTIPLIER,disabled:!0}],modifierValue:[{value:1,disabled:!0},[ue.pattern(Ft)]],id:[{value:e,disabled:!0}]});this.showModifiersMap.set(e,!1),this.enableModifiersControlMap.set(e,this.fb.control(!1)),this.observeKeyDataType(t),this.observeEnableModifier(t),this.keysListFormArray.push(t)}deleteKey(e,t){e&&e.stopPropagation(),this.keysListFormArray.removeAt(t),this.keysListFormArray.markAsDirty()}cancel(){this.popover.hide()}applyKeysData(){this.keysDataApplied.emit(this.getFormValue())}getFormValue(){return this.mapKeysWithModifier(this.withReportStrategy?this.cleanUpEmptyStrategies(this.keysListFormArray.value):this.keysListFormArray.value)}cleanUpEmptyStrategies(e){return e.map((e=>{const{reportStrategy:t,...n}=e;return t?e:n}))}mapKeysWithModifier(e){return e.map(((e,t)=>{if(this.showModifiersMap.get(this.keysListFormArray.controls[t].get("id").value)){const{modifierType:t,modifierValue:n,...a}=e;return t?{...a,[t]:n}:a}return e}))}prepareKeysFormArray(e){const t=[];return e&&e.forEach((e=>{const n=this.createDataKeyFormGroup(e);this.observeKeyDataType(n),this.observeEnableModifier(n),this.functionCodesMap.set(n.get("id").value,this.getFunctionCodes(e.type)),t.push(n)})),this.fb.array(t)}createDataKeyFormGroup(e){const{tag:t,value:n,type:a,address:o,objectsCount:i,functionCode:r,multiplier:s,divider:l,reportStrategy:c}=e,p=se(5),m=this.shouldShowModifier(a);return this.showModifiersMap.set(p,m),this.enableModifiersControlMap.set(p,this.fb.control((s||l)&&m)),this.fb.group({tag:[t,[ue.required,ue.pattern(kt)]],value:[{value:n,disabled:!this.isMaster},[ue.required,ue.pattern(kt)]],type:[a,[ue.required]],address:[o,[ue.required]],objectsCount:[i,[ue.required]],functionCode:[{value:r,disabled:!this.withFunctionCode},[ue.required]],modifierType:[{value:l?On.DIVIDER:On.MULTIPLIER,disabled:!this.enableModifiersControlMap.get(p).value}],modifierValue:[{value:s??l??1,disabled:!this.enableModifiersControlMap.get(p).value},[ue.pattern(Ft)]],id:[{value:p,disabled:!0}],reportStrategy:[{value:c,disabled:!this.withReportStrategy}]})}shouldShowModifier(e){return!(this.isMaster||this.keysType!==aa.ATTRIBUTES&&this.keysType!==aa.TIMESERIES||this.ModbusEditableDataTypes.includes(e))}observeKeyDataType(e){e.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{this.ModbusEditableDataTypes.includes(t)||e.get("objectsCount").patchValue(na[t],{emitEvent:!1});const n=this.shouldShowModifier(t);this.showModifiersMap.set(e.get("id").value,n),this.updateFunctionCodes(e,t)}))}observeEnableModifier(e){this.enableModifiersControlMap.get(e.get("id").value).valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>this.toggleModifierControls(e,t)))}toggleModifierControls(e,t){const n=e.get("modifierType"),a=e.get("modifierValue");t?(n.enable(),a.enable()):(n.disable(),a.disable())}updateFunctionCodes(e,t){const n=this.getFunctionCodes(t);this.functionCodesMap.set(e.get("id").value,n),n.includes(e.get("functionCode").value)||e.get("functionCode").patchValue(n[0],{emitEvent:!1})}getFunctionCodes(e){const t=[...e===ea.BITS?this.bitsWriteFunctionCodes:[],...this.defaultWriteFunctionCodes];if(this.keysType===aa.ATTRIBUTES_UPDATES)return t.sort(((e,t)=>e-t));const n=[...this.defaultReadFunctionCodes];return e===ea.BITS&&n.push(...this.bitsReadFunctionCodes),this.keysType===aa.RPC_REQUESTS&&n.push(...t),n.sort(((e,t)=>e-t))}getDefaultFunctionCodes(){return this.keysType===aa.ATTRIBUTES_UPDATES?this.defaultWriteFunctionCodes:this.keysType===aa.RPC_REQUESTS?[...this.defaultReadFunctionCodes,...this.defaultWriteFunctionCodes]:this.defaultReadFunctionCodes}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:fo,deps:[{token:me.UntypedFormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:fo,isStandalone:!0,selector:"tb-modbus-data-keys-panel",inputs:{isMaster:"isMaster",hideNewFields:"hideNewFields",panelTitle:"panelTitle",addKeyTitle:"addKeyTitle",deleteKeyTitle:"deleteKeyTitle",noKeysText:"noKeysText",keysType:"keysType",values:"values",popover:"popover"},outputs:{keysDataApplied:"keysDataApplied"},ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ panelTitle | translate }}{{\' (\' + keysListFormArray.controls.length + \')\'}}
\n
\n
\n
\n \n \n \n \n
\n {{ keyControl.get(\'tag\').value }}{{ \'-\' }}{{ keyControl.get(\'value\').value }}\n
\n \n
\n
{{ \'gateway.key\' | translate }}:\n {{ keyControl.get(\'tag\').value }}\n
\n
{{ \'gateway.address\' | translate }}:\n {{ keyControl.get(\'address\').value }}\n
\n
{{ \'gateway.type\' | translate }}:\n {{ keyControl.get(\'type\').value }}\n
\n
\n
\n
\n
\n \n
\n {{ \'gateway.hints.modbus.data-keys\' | translate }}\n
\n
\n
\n
\n
gateway.platform-side
\n
\n
\n gateway.key\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
gateway.connector-side
\n
\n
\n gateway.type\n
\n
\n \n \n {{ type }}\n \n \n
\n
\n
\n
gateway.function-code
\n
\n \n \n \n {{ ModbusFunctionCodeTranslationsMap.get(code) | translate }}\n \n \n \n
\n
\n
\n
gateway.objects-count
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.address
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.modifier\' | translate }}\n \n \n \n \n
\n
\n
gateway.type
\n
\n \n \n \n
\n \n {{ ModifierTypesMap.get(keyControl.get(\'modifierType\').value)?.name | translate}}\n
\n
\n \n \n \n {{ ModifierTypesMap.get(modifierType).name | translate }}\n \n
\n
\n
\n
\n
\n
\n
gateway.value
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
gateway.value
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n {{ noKeysText }}\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .tb-modbus-keys-panel{width:77vw;max-width:700px}:host .tb-modbus-keys-panel .title-container{width:180px}:host .tb-modbus-keys-panel .key-label{font-weight:400}:host .tb-modbus-keys-panel .key-panel{height:500px;overflow:auto}:host .tb-modbus-keys-panel .tb-form-panel .mat-mdc-icon-button{width:56px;height:56px;padding:16px;color:#0000008a}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:gt.HelpPopupComponent,selector:"[tb-help-popup], [tb-help-popup-content]",inputs:["tb-help-popup","tb-help-popup-content","trigger-text","trigger-style","tb-help-popup-placement","tb-help-popup-style","hintMode"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"directive",type:we.MatSelectTrigger,selector:"mat-select-trigger"},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:$e.MatExpansionPanelContent,selector:"ng-template[matExpansionPanelContent]"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"component",type:go,selector:"tb-report-strategy",inputs:["isExpansionMode","defaultValue"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}]})}}e("ModbusDataKeysPanelComponent",fo),He([N()],fo.prototype,"isMaster",void 0),He([N()],fo.prototype,"hideNewFields",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:fo,decorators:[{type:n,args:[{selector:"tb-modbus-data-keys-panel",standalone:!0,imports:[H,D,Ta,go,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ panelTitle | translate }}{{\' (\' + keysListFormArray.controls.length + \')\'}}
\n
\n
\n
\n \n \n \n \n
\n {{ keyControl.get(\'tag\').value }}{{ \'-\' }}{{ keyControl.get(\'value\').value }}\n
\n \n
\n
{{ \'gateway.key\' | translate }}:\n {{ keyControl.get(\'tag\').value }}\n
\n
{{ \'gateway.address\' | translate }}:\n {{ keyControl.get(\'address\').value }}\n
\n
{{ \'gateway.type\' | translate }}:\n {{ keyControl.get(\'type\').value }}\n
\n
\n
\n
\n
\n \n
\n {{ \'gateway.hints.modbus.data-keys\' | translate }}\n
\n
\n
\n
\n
gateway.platform-side
\n
\n
\n gateway.key\n
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
gateway.connector-side
\n
\n
\n gateway.type\n
\n
\n \n \n {{ type }}\n \n \n
\n
\n
\n
gateway.function-code
\n
\n \n \n \n {{ ModbusFunctionCodeTranslationsMap.get(code) | translate }}\n \n \n \n
\n
\n
\n
gateway.objects-count
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.address
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.modifier\' | translate }}\n \n \n \n \n
\n
\n
gateway.type
\n
\n \n \n \n
\n \n {{ ModifierTypesMap.get(keyControl.get(\'modifierType\').value)?.name | translate}}\n
\n
\n \n \n \n {{ ModifierTypesMap.get(modifierType).name | translate }}\n \n
\n
\n
\n
\n
\n
\n
gateway.value
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
gateway.value
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n {{ noKeysText }}\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .tb-modbus-keys-panel{width:77vw;max-width:700px}:host .tb-modbus-keys-panel .title-container{width:180px}:host .tb-modbus-keys-panel .key-label{font-weight:400}:host .tb-modbus-keys-panel .key-panel{height:500px;overflow:auto}:host .tb-modbus-keys-panel .tb-form-panel .mat-mdc-icon-button{width:56px;height:56px;padding:16px;color:#0000008a}\n']}]}],ctorParameters:()=>[{type:me.UntypedFormBuilder}],propDecorators:{isMaster:[{type:a}],hideNewFields:[{type:a}],panelTitle:[{type:a}],addKeyTitle:[{type:a}],deleteKeyTitle:[{type:a}],noKeysText:[{type:a}],keysType:[{type:a}],values:[{type:a}],popover:[{type:a}],keysDataApplied:[{type:l}]}});class yo{constructor(e,t,n,a,o){this.fb=e,this.popoverService=t,this.renderer=n,this.viewContainerRef=a,this.cdr=o,this.singleMode=!1,this.hideNewFields=!1,this.disabled=!1,this.modbusRegisterTypes=Object.values(Xn),this.modbusValueKeys=Object.values(aa),this.ModbusValuesTranslationsMap=Zn,this.ModbusValueKey=aa,this.destroy$=new Se}ngOnInit(){this.initializeValuesFormGroup(),this.observeValuesChanges()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){if(this.singleMode)this.valuesFormGroup.setValue(this.getSingleRegisterState(e),{emitEvent:!1});else{const{holding_registers:t,coils_initializer:n,input_registers:a,discrete_inputs:o}=e;this.valuesFormGroup.setValue({holding_registers:this.getSingleRegisterState(t),coils_initializer:this.getSingleRegisterState(n),input_registers:this.getSingleRegisterState(a),discrete_inputs:this.getSingleRegisterState(o)},{emitEvent:!1})}this.cdr.markForCheck()}validate(){return this.valuesFormGroup.valid?null:{valuesFormGroup:{valid:!1}}}setDisabledState(e){this.disabled=e,this.cdr.markForCheck()}getValueGroup(e,t){return t?this.valuesFormGroup.get(t).get(e):this.valuesFormGroup.get(e)}manageKeys(e,t,n,a){e.stopPropagation();const o=t._elementRef.nativeElement;if(this.popoverService.hasPopover(o))return void this.popoverService.hidePopover(o);const i=this.getValueGroup(n,a),r={values:i.value,isMaster:!this.singleMode,keysType:n,panelTitle:oa.get(n),addKeyTitle:ia.get(n),deleteKeyTitle:ra.get(n),noKeysText:sa.get(n),hideNewFields:this.hideNewFields},s=this.popoverService.displayPopover(o,this.renderer,this.viewContainerRef,fo,"leftBottom",!1,null,r,{},{},{},!0);s.tbComponentRef.instance.popover=s,s.tbComponentRef.instance.keysDataApplied.pipe(Ne(this.destroy$)).subscribe((e=>{s.hide(),i.patchValue(e),i.markAsDirty(),this.cdr.markForCheck()}))}initializeValuesFormGroup(){const e=()=>this.fb.group(this.modbusValueKeys.reduce(((e,t)=>(e[t]=this.fb.control([[],[]]),e)),{}));this.singleMode?this.valuesFormGroup=e():this.valuesFormGroup=this.fb.group(this.modbusRegisterTypes.reduce(((t,n)=>(t[n]=e(),t)),{}))}observeValuesChanges(){this.valuesFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}getSingleRegisterState(e){return{attributes:e?.attributes??[],timeseries:e?.timeseries??[],attributeUpdates:e?.attributeUpdates??[],rpc:e?.rpc??[]}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:yo,deps:[{token:me.FormBuilder},{token:ft.TbPopoverService},{token:t.Renderer2},{token:t.ViewContainerRef},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:yo,isStandalone:!0,selector:"tb-modbus-values",inputs:{singleMode:"singleMode",hideNewFields:"hideNewFields"},providers:[{provide:ge,useExisting:m((()=>yo)),multi:!0},{provide:fe,useExisting:m((()=>yo)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n\n
\n \n
\n
\n\n\n \n \n
\n \n
\n
\n
\n
\n\n\n
\n
gateway.attributes
\n
\n \n \n {{ attribute.tag }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.timeseries
\n
\n \n \n {{ telemetry.tag }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.attribute-updates
\n
\n \n \n {{ attributeUpdate.tag }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.rpc-requests
\n
\n \n \n {{ rpcRequest.tag }}\n \n \n \n \n \n \n
\n
\n
\n\n',styles:['@charset "UTF-8";:host ::ng-deep .mat-mdc-tab-body-wrapper{min-height:320px}::ng-deep .mdc-evolution-chip-set__chips{align-items:center}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"component",type:yt.MatChip,selector:"mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",inputs:["role","id","aria-label","aria-description","value","color","removable","highlighted","disableRipple","disabled"],outputs:["removed","destroyed"],exportAs:["matChip"]},{kind:"component",type:yt.MatChipListbox,selector:"mat-chip-listbox",inputs:["multiple","aria-orientation","selectable","compareWith","required","hideSingleSelectionIndicator","value"],outputs:["change"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:bt.TbIconComponent,selector:"tb-icon",inputs:["color"],exportAs:["tbIcon"]},{kind:"directive",type:ka,selector:"[tb-ellipsis-chip-list]",inputs:["tb-ellipsis-chip-list"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ModbusValuesComponent",yo),He([N()],yo.prototype,"singleMode",void 0),He([N()],yo.prototype,"hideNewFields",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:yo,decorators:[{type:n,args:[{selector:"tb-modbus-values",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>yo)),multi:!0},{provide:fe,useExisting:m((()=>yo)),multi:!0}],standalone:!0,imports:[H,D,ka],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n\n
\n \n
\n
\n\n\n \n \n
\n \n
\n
\n
\n
\n\n\n
\n
gateway.attributes
\n
\n \n \n {{ attribute.tag }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.timeseries
\n
\n \n \n {{ telemetry.tag }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.attribute-updates
\n
\n \n \n {{ attributeUpdate.tag }}\n \n \n \n \n \n \n
\n
\n
\n
gateway.rpc-requests
\n
\n \n \n {{ rpcRequest.tag }}\n \n \n \n \n \n \n
\n
\n
\n\n',styles:['@charset "UTF-8";:host ::ng-deep .mat-mdc-tab-body-wrapper{min-height:320px}::ng-deep .mdc-evolution-chip-set__chips{align-items:center}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:ft.TbPopoverService},{type:t.Renderer2},{type:t.ViewContainerRef},{type:t.ChangeDetectorRef}],propDecorators:{singleMode:[{type:a}],hideNewFields:[{type:a}]}});class bo{constructor(e,t){this.fb=e,this.cdr=t,this.isMaster=!1,this.disabled=!1,this.destroy$=new Se,this.securityConfigFormGroup=this.fb.group({certfile:["",[ue.pattern(kt)]],keyfile:["",[ue.pattern(kt)]],password:["",[ue.pattern(kt)]],server_hostname:["",[ue.pattern(kt)]],reqclicert:[{value:!1,disabled:!0}]}),this.observeValueChanges()}ngOnChanges(){this.updateMasterEnabling()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this.disabled?this.securityConfigFormGroup.disable({emitEvent:!1}):this.securityConfigFormGroup.enable({emitEvent:!1}),this.updateMasterEnabling(),this.cdr.markForCheck()}validate(){return this.securityConfigFormGroup.valid?null:{securityConfigFormGroup:{valid:!1}}}writeValue(e){const{certfile:t,password:n,keyfile:a,server_hostname:o}=e,i={certfile:t??"",password:n??"",keyfile:a??"",server_hostname:o??"",reqclicert:!!e.reqclicert};this.securityConfigFormGroup.reset(i,{emitEvent:!1})}updateMasterEnabling(){this.isMaster?(this.disabled||this.securityConfigFormGroup.get("reqclicert").enable({emitEvent:!1}),this.securityConfigFormGroup.get("server_hostname").disable({emitEvent:!1})):(this.disabled||this.securityConfigFormGroup.get("server_hostname").enable({emitEvent:!1}),this.securityConfigFormGroup.get("reqclicert").disable({emitEvent:!1}))}observeValueChanges(){this.securityConfigFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:bo,deps:[{token:me.FormBuilder},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:bo,isStandalone:!0,selector:"tb-modbus-security-config",inputs:{isMaster:"isMaster"},providers:[{provide:ge,useExisting:m((()=>bo)),multi:!0},{provide:fe,useExisting:m((()=>bo)),multi:!0}],usesOnChanges:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
{{ \'gateway.hints.path-in-os\' | translate }}
\n
\n
\n gateway.client-cert-path\n
\n
\n \n \n \n
\n
\n
\n
\n gateway.private-key-path\n
\n
\n \n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n
\n \n
\n
\n
\n
\n
\n
gateway.server-hostname
\n
\n \n \n \n
\n
\n
\n \n \n {{ \'gateway.request-client-certificate\' | translate }}\n \n \n
\n
\n',dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:tt.TogglePasswordComponent,selector:"tb-toggle-password"},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}He([N()],bo.prototype,"isMaster",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:bo,decorators:[{type:n,args:[{selector:"tb-modbus-security-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>bo)),multi:!0},{provide:fe,useExisting:m((()=>bo)),multi:!0}],standalone:!0,imports:[H,D,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
{{ \'gateway.hints.path-in-os\' | translate }}
\n
\n
\n gateway.client-cert-path\n
\n
\n \n \n \n
\n
\n
\n
\n gateway.private-key-path\n
\n
\n \n \n \n
\n
\n
\n
gateway.password
\n
\n \n \n
\n \n
\n
\n
\n
\n
\n
gateway.server-hostname
\n
\n \n \n \n
\n
\n
\n \n \n {{ \'gateway.request-client-certificate\' | translate }}\n \n \n
\n
\n'}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:t.ChangeDetectorRef}],propDecorators:{isMaster:[{type:a}]}});class ho extends P{constructor(e,t,n,a,o){super(t,n,o),this.fb=e,this.store=t,this.router=n,this.data=a,this.dialogRef=o,this.portLimits=Et,this.modbusProtocolTypes=Object.values(Hn),this.modbusMethodTypes=Object.values(Wn),this.modbusSerialMethodTypes=Object.values(jn),this.modbusParities=Object.values(Yn),this.modbusByteSizes=$n,this.modbusBaudrates=la,this.modbusOrderType=Object.values(Jn),this.ModbusProtocolType=Hn,this.ModbusParityLabelsMap=Qn,this.ModbusProtocolLabelsMap=zn,this.ModbusMethodLabelsMap=Kn,this.ReportStrategyDefaultValue=ln,this.modbusHelpLink=v+"/docs/iot-gateway/config/modbus/#section-master-description-and-configuration-parameters",this.serialSpecificControlKeys=["serialPort","baudrate","stopbits","bytesize","parity","strict"],this.tcpUdpSpecificControlKeys=["port","security","host"],this.destroy$=new Se,this.showSecurityControl=this.fb.control(!1),this.initializeSlaveFormGroup(),this.updateSlaveFormGroup(),this.updateControlsEnabling(this.data.value.type),this.observeTypeChange(),this.observeShowSecurity(),this.showSecurityControl.patchValue(!!this.data.value.security&&!ee(this.data.value.security,{}))}get protocolType(){return this.slaveConfigFormGroup.get("type").value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}cancel(){this.dialogRef.close(null)}add(){this.slaveConfigFormGroup.valid&&this.dialogRef.close(this.getSlaveResultData())}initializeSlaveFormGroup(){this.slaveConfigFormGroup=this.fb.group({type:[Hn.TCP],host:["",[ue.required,ue.pattern(kt)]],port:[null,[ue.required,ue.min(Et.MIN),ue.max(Et.MAX)]],serialPort:["",[ue.required,ue.pattern(kt)]],method:[Wn.SOCKET,[ue.required]],baudrate:[this.modbusBaudrates[0]],stopbits:[1],bytesize:[$n[0]],parity:[Yn.None],strict:[!0],unitId:[null,[ue.required]],deviceName:["",[ue.required,ue.pattern(kt)]],deviceType:["",[ue.required,ue.pattern(kt)]],timeout:[35],byteOrder:[Jn.BIG],wordOrder:[Jn.BIG],retries:[!0],retryOnEmpty:[!0],retryOnInvalid:[!0],pollPeriod:[5e3,[ue.required]],connectAttemptTimeMs:[5e3,[ue.required]],connectAttemptCount:[5,[ue.required]],waitAfterFailedAttemptsMs:[3e5,[ue.required]],values:[{}],security:[{}]}),this.addFieldsToFormGroup()}updateSlaveFormGroup(){this.slaveConfigFormGroup.patchValue({...this.data.value,port:this.data.value.type===Hn.Serial?null:this.data.value.port,serialPort:this.data.value.type===Hn.Serial?this.data.value.port:"",values:{attributes:this.data.value.attributes??[],timeseries:this.data.value.timeseries??[],attributeUpdates:this.data.value.attributeUpdates??[],rpc:this.data.value.rpc??[]}})}observeTypeChange(){this.slaveConfigFormGroup.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateControlsEnabling(e),this.updateMethodType(e)}))}updateMethodType(e){this.slaveConfigFormGroup.get("method").value!==Wn.RTU&&this.slaveConfigFormGroup.get("method").patchValue(e===Hn.Serial?jn.ASCII:Wn.SOCKET,{emitEvent:!1})}updateControlsEnabling(e){const[t,n]=e===Hn.Serial?[this.serialSpecificControlKeys,this.tcpUdpSpecificControlKeys]:[this.tcpUdpSpecificControlKeys,this.serialSpecificControlKeys];t.forEach((e=>this.slaveConfigFormGroup.get(e)?.enable({emitEvent:!1}))),n.forEach((e=>this.slaveConfigFormGroup.get(e)?.disable({emitEvent:!1}))),this.updateSecurityEnabling(this.showSecurityControl.value)}observeShowSecurity(){this.showSecurityControl.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.updateSecurityEnabling(e)))}updateSecurityEnabling(e){e&&this.protocolType!==Hn.Serial?this.slaveConfigFormGroup.get("security").enable({emitEvent:!1}):this.slaveConfigFormGroup.get("security").disable({emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ho,deps:[{token:me.FormBuilder},{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef}],target:t.ɵɵFactoryTarget.Directive})}static{this.ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"18.2.6",type:ho,usesInheritance:!0,ngImport:t})}}e("ModbusSlaveDialogAbstract",ho),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ho,decorators:[{type:s}],ctorParameters:()=>[{type:me.FormBuilder},{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef}]});class xo extends ho{constructor(e,t,n,a,o){super(e,t,n,a,o),this.fb=e,this.store=t,this.router=n,this.data=a,this.dialogRef=o}getSlaveResultData(){const{values:e,type:t,serialPort:n,...a}=this.slaveConfigFormGroup.value,o={...a,type:t,...e};return t===Hn.Serial&&(o.port=n),o.reportStrategy||delete o.reportStrategy,o}addFieldsToFormGroup(){this.slaveConfigFormGroup.addControl("reportStrategy",this.fb.control(null))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:xo,deps:[{token:me.FormBuilder},{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:xo,isStandalone:!0,selector:"tb-modbus-slave-dialog",usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n

{{ \'gateway.server-slave\' | translate }}

\n \n
\n \n
\n
\n
\n
\n
\n
gateway.server-connection
\n \n {{ ModbusProtocolLabelsMap.get(type) }}\n \n
\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n gateway.method\n
\n
\n \n \n {{ ModbusMethodLabelsMap.get(method) }}\n \n \n
\n
\n
\n \n
\n
gateway.baudrate
\n
\n \n \n {{ rate }}\n \n \n
\n
\n
\n
gateway.bytesize
\n
\n \n \n {{ size }}\n \n \n
\n
\n
\n
gateway.stopbits
\n
\n \n \n \n
\n
\n
\n
gateway.parity
\n
\n \n \n {{ ModbusParityLabelsMap.get(parity) }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.strict\' | translate }}\n \n \n
\n
\n
\n
gateway.unit-id
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-profile
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n {{ \'gateway.send-data-on-change\' | translate }}\n \n \n
\n \n \n \n
\n \n \n \n
gateway.advanced-connection-settings
\n
\n
\n
\n
\n
gateway.connection-timeout
\n
\n \n \n \n
\n
\n
\n
gateway.byte-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n
gateway.word-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.tls-connection\' | translate }}\n \n \n \n \n \n \n
\n
\n \n \n {{ \'gateway.retries\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-empty\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-invalid\' | translate }}\n \n \n
\n
\n
\n \n gateway.poll-period\n \n
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-time
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-count
\n
\n \n \n \n
\n
\n
\n
gateway.wait-after-failed-attempts
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .slaves-config-container{width:80vw;max-width:900px}:host .slave-name-label{margin-right:16px;color:#000000de}:host .fixed-title-width-260{min-width:260px}:host ::ng-deep .security-config .fixed-title-width{min-width:230px}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:dt.HelpComponent,selector:"[tb-help]",inputs:["tb-help"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:Je.MatDialogActions,selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",inputs:["align"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"component",type:yo,selector:"tb-modbus-values",inputs:["singleMode","hideNewFields"]},{kind:"component",type:bo,selector:"tb-modbus-security-config",inputs:["isMaster"]},{kind:"pipe",type:wa,name:"getGatewayPortTooltip"},{kind:"component",type:go,selector:"tb-report-strategy",inputs:["isExpansionMode","defaultValue"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ModbusSlaveDialogComponent",xo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:xo,decorators:[{type:n,args:[{selector:"tb-modbus-slave-dialog",changeDetection:d.OnPush,standalone:!0,imports:[H,D,yo,bo,wa,go,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n

{{ \'gateway.server-slave\' | translate }}

\n \n
\n \n
\n
\n
\n
\n
\n
gateway.server-connection
\n \n {{ ModbusProtocolLabelsMap.get(type) }}\n \n
\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n gateway.method\n
\n
\n \n \n {{ ModbusMethodLabelsMap.get(method) }}\n \n \n
\n
\n
\n \n
\n
gateway.baudrate
\n
\n \n \n {{ rate }}\n \n \n
\n
\n
\n
gateway.bytesize
\n
\n \n \n {{ size }}\n \n \n
\n
\n
\n
gateway.stopbits
\n
\n \n \n \n
\n
\n
\n
gateway.parity
\n
\n \n \n {{ ModbusParityLabelsMap.get(parity) }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.strict\' | translate }}\n \n \n
\n
\n
\n
gateway.unit-id
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-profile
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n {{ \'gateway.send-data-on-change\' | translate }}\n \n \n
\n \n \n \n
\n \n \n \n
gateway.advanced-connection-settings
\n
\n
\n
\n
\n
gateway.connection-timeout
\n
\n \n \n \n
\n
\n
\n
gateway.byte-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n
gateway.word-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.tls-connection\' | translate }}\n \n \n \n \n \n \n
\n
\n \n \n {{ \'gateway.retries\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-empty\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-invalid\' | translate }}\n \n \n
\n
\n
\n \n gateway.poll-period\n \n
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-time
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-count
\n
\n \n \n \n
\n
\n
\n
gateway.wait-after-failed-attempts
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .slaves-config-container{width:80vw;max-width:900px}:host .slave-name-label{margin-right:16px;color:#000000de}:host .fixed-title-width-260{min-width:260px}:host ::ng-deep .security-config .fixed-title-width{min-width:230px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef}]});class vo extends ho{constructor(e,t,n,a,o){super(e,t,n,a,o),this.fb=e,this.store=t,this.router=n,this.data=a,this.dialogRef=o}getSlaveResultData(){const{values:e,type:t,serialPort:n,...a}=this.slaveConfigFormGroup.value,o={...a,type:t,...e};return t===Hn.Serial&&(o.port=n),o}addFieldsToFormGroup(){this.slaveConfigFormGroup.addControl("sendDataOnlyOnChange",this.fb.control(!1))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:vo,deps:[{token:me.FormBuilder},{token:ot.Store},{token:it.Router},{token:Xe},{token:Je.MatDialogRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:vo,isStandalone:!0,selector:"tb-modbus-legacy-slave-dialog",usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n

{{ \'gateway.server-slave\' | translate }}

\n \n
\n \n
\n
\n
\n
\n
\n
gateway.server-connection
\n \n {{ ModbusProtocolLabelsMap.get(type) }}\n \n
\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n gateway.method\n
\n
\n \n \n {{ ModbusMethodLabelsMap.get(method) }}\n \n \n
\n
\n
\n \n
\n
gateway.baudrate
\n
\n \n \n {{ rate }}\n \n \n
\n
\n
\n
gateway.bytesize
\n
\n \n \n {{ size }}\n \n \n
\n
\n
\n
gateway.stopbits
\n
\n \n \n \n
\n
\n
\n
gateway.parity
\n
\n \n \n {{ ModbusParityLabelsMap.get(parity) }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.strict\' | translate }}\n \n \n
\n
\n
\n
gateway.unit-id
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-profile
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n {{ \'gateway.send-data-on-change\' | translate }}\n \n \n
\n \n \n \n
\n \n \n \n
gateway.advanced-connection-settings
\n
\n
\n
\n
\n
gateway.connection-timeout
\n
\n \n \n \n
\n
\n
\n
gateway.byte-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n
gateway.word-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.tls-connection\' | translate }}\n \n \n \n \n \n \n
\n
\n \n \n {{ \'gateway.retries\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-empty\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-invalid\' | translate }}\n \n \n
\n
\n
\n \n gateway.poll-period\n \n
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-time
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-count
\n
\n \n \n \n
\n
\n
\n
gateway.wait-after-failed-attempts
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .slaves-config-container{width:80vw;max-width:900px}:host .slave-name-label{margin-right:16px;color:#000000de}:host .fixed-title-width-260{min-width:260px}:host ::ng-deep .security-config .fixed-title-width{min-width:230px}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:dt.HelpComponent,selector:"[tb-help]",inputs:["tb-help"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:Je.MatDialogActions,selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",inputs:["align"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"component",type:yo,selector:"tb-modbus-values",inputs:["singleMode","hideNewFields"]},{kind:"component",type:bo,selector:"tb-modbus-security-config",inputs:["isMaster"]},{kind:"pipe",type:wa,name:"getGatewayPortTooltip"},{kind:"component",type:go,selector:"tb-report-strategy",inputs:["isExpansionMode","defaultValue"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ModbusLegacySlaveDialogComponent",vo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:vo,decorators:[{type:n,args:[{selector:"tb-modbus-legacy-slave-dialog",changeDetection:d.OnPush,standalone:!0,imports:[H,D,yo,bo,wa,go],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n \n

{{ \'gateway.server-slave\' | translate }}

\n \n
\n \n
\n
\n
\n
\n
\n
gateway.server-connection
\n \n {{ ModbusProtocolLabelsMap.get(type) }}\n \n
\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n gateway.method\n
\n
\n \n \n {{ ModbusMethodLabelsMap.get(method) }}\n \n \n
\n
\n
\n \n
\n
gateway.baudrate
\n
\n \n \n {{ rate }}\n \n \n
\n
\n
\n
gateway.bytesize
\n
\n \n \n {{ size }}\n \n \n
\n
\n
\n
gateway.stopbits
\n
\n \n \n \n
\n
\n
\n
gateway.parity
\n
\n \n \n {{ ModbusParityLabelsMap.get(parity) }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.strict\' | translate }}\n \n \n
\n
\n
\n
gateway.unit-id
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-profile
\n
\n \n \n \n warning\n \n \n
\n
\n
\n \n \n {{ \'gateway.send-data-on-change\' | translate }}\n \n \n
\n \n \n \n
\n \n \n \n
gateway.advanced-connection-settings
\n
\n
\n
\n
\n
gateway.connection-timeout
\n
\n \n \n \n
\n
\n
\n
gateway.byte-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n
gateway.word-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.tls-connection\' | translate }}\n \n \n \n \n \n \n
\n
\n \n \n {{ \'gateway.retries\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-empty\' | translate }}\n \n \n
\n
\n \n \n {{ \'gateway.retries-on-invalid\' | translate }}\n \n \n
\n
\n
\n \n gateway.poll-period\n \n
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-time
\n
\n \n \n \n
\n
\n
\n
gateway.connect-attempt-count
\n
\n \n \n \n
\n
\n
\n
gateway.wait-after-failed-attempts
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host .slaves-config-container{width:80vw;max-width:900px}:host .slave-name-label{margin-right:16px;color:#000000de}:host .fixed-title-width-260{min-width:260px}:host ::ng-deep .security-config .fixed-title-width{min-width:230px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:ot.Store},{type:it.Router},{type:void 0,decorators:[{type:p,args:[Xe]}]},{type:Je.MatDialogRef}]});class wo{constructor(e,t,n,a,o){this.translate=e,this.dialog=t,this.dialogService=n,this.fb=a,this.cdr=o,this.isLegacy=!1,this.textSearchMode=!1,this.textSearch=this.fb.control("",{nonNullable:!0}),this.ModbusProtocolLabelsMap=zn,this.onChange=()=>{},this.onTouched=()=>{},this.destroy$=new Se,this.masterFormGroup=this.fb.group({slaves:this.fb.array([])}),this.dataSource=new Co}get slaves(){return this.masterFormGroup.get("slaves")}ngOnInit(){this.masterFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateTableData(e.slaves),this.onChange(e),this.onTouched()}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.textSearch.valueChanges.pipe(Ve(150),Be(((e,t)=>(e??"")===t.trim())),Ne(this.destroy$)).subscribe((e=>this.updateTableData(this.slaves.value,e.trim())))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){this.slaves.clear(),this.pushDataAsFormArrays(e.slaves)}enterFilterMode(){this.textSearchMode=!0,this.cdr.detectChanges();const e=this.searchInputField.nativeElement;e.focus(),e.setSelectionRange(0,0)}exitFilterMode(){this.updateTableData(this.slaves.value),this.textSearchMode=!1,this.textSearch.reset()}manageSlave(e,t){e&&e.stopPropagation();const n=ie(t),a=n?this.slaves.at(t).value:{};this.getSlaveDialog(a,n?"action.apply":"action.add").afterClosed().pipe(Oe(1),Ne(this.destroy$)).subscribe((e=>{e&&(n?this.slaves.at(t).patchValue(e):this.slaves.push(this.fb.control(e)),this.masterFormGroup.markAsDirty())}))}getSlaveDialog(e,t){return this.isLegacy?this.dialog.open(vo,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{value:e,hideNewFields:!0,buttonTitle:t}}):this.dialog.open(xo,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{value:e,buttonTitle:t,hideNewFields:!1}})}deleteSlave(e,t){e&&e.stopPropagation(),this.dialogService.confirm(this.translate.instant("gateway.delete-slave-title"),"",this.translate.instant("action.no"),this.translate.instant("action.yes"),!0).pipe(Oe(1),Ne(this.destroy$)).subscribe((e=>{e&&(this.slaves.removeAt(t),this.masterFormGroup.markAsDirty())}))}updateTableData(e,t){t&&(e=e.filter((e=>Object.values(e).some((e=>e.toString().toLowerCase().includes(t.toLowerCase())))))),this.dataSource.loadData(e)}pushDataAsFormArrays(e){e?.length&&e.forEach((e=>this.slaves.push(this.fb.control(e))))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:wo,deps:[{token:Y.TranslateService},{token:Je.MatDialog},{token:X.DialogService},{token:me.FormBuilder},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:wo,isStandalone:!0,selector:"tb-modbus-master-table",inputs:{isLegacy:"isLegacy"},providers:[{provide:ge,useExisting:m((()=>wo)),multi:!0}],viewQueries:[{propertyName:"searchInputField",first:!0,predicate:["searchInput"],descendants:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ \'gateway.hints.modbus-master\' | translate }}
\n
\n
\n \n
\n
\n {{ \'gateway.servers-slaves\' | translate}}\n
\n \n \n \n
\n
\n \n
\n \n \n  \n \n \n \n
\n
\n
\n \n \n \n
{{ \'gateway.device-name\' | translate }}
\n
\n \n
{{ slave[\'deviceName\'] }}
\n
\n
\n \n \n {{ \'gateway.info\' | translate }}\n \n \n
{{ slave[\'host\'] ?? slave[\'port\'] }}
\n
\n
\n \n \n {{ \'gateway.unit-id\' | translate }}\n \n \n
{{ slave[\'unitId\'] }}
\n
\n
\n \n \n
{{ \'gateway.type\' | translate }}
\n
\n \n {{ ModbusProtocolLabelsMap.get(slave[\'type\']) }}\n \n
\n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n widget.no-data-found\n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}:host .tb-master-table .tb-master-table-content{width:100%;height:100%;background:#fff;overflow:hidden}:host .tb-master-table .tb-master-table-content .mat-toolbar-tools{min-height:auto}:host .tb-master-table .tb-master-table-content .title-container{overflow:hidden}:host .tb-master-table .tb-master-table-content .tb-master-table-title{padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tb-master-table .tb-master-table-content .table-container{overflow:auto}:host .tb-master-table .tb-master-table-content .table-container .mat-mdc-table{table-layout:fixed;min-width:450px}:host .tb-master-table .tb-master-table-content .table-container .mat-mdc-table .table-value-column{padding:0 12px;width:38%}:host .no-data-found{height:calc(100% - 120px)}@media screen and (max-width: 599px){:host .mat-toolbar{height:auto;min-height:100px}:host .mat-toolbar .tb-master-table-title{padding-bottom:5px;width:100%}}:host ::ng-deep mat-cell.tb-value-cell{cursor:pointer}:host ::ng-deep mat-cell.tb-value-cell .mat-icon{height:24px;width:24px;font-size:24px;color:#757575}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"pipe",type:_.AsyncPipe,name:"async"},{kind:"ngmodule",type:D},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"component",type:ht.MatMenu,selector:"mat-menu",inputs:["backdropClass","aria-label","aria-labelledby","aria-describedby","xPosition","yPosition","overlapTrigger","hasBackdrop","class","classList"],outputs:["closed","close"],exportAs:["matMenu"]},{kind:"directive",type:ht.MatMenuTrigger,selector:"[mat-menu-trigger-for], [matMenuTriggerFor]",inputs:["mat-menu-trigger-for","matMenuTriggerFor","matMenuTriggerData","matMenuTriggerRestoreFocus"],outputs:["menuOpened","onMenuOpen","menuClosed","onMenuClose"],exportAs:["matMenuTrigger"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:b.MatTable,selector:"mat-table, table[mat-table]",exportAs:["matTable"]},{kind:"directive",type:b.MatHeaderCellDef,selector:"[matHeaderCellDef]"},{kind:"directive",type:b.MatHeaderRowDef,selector:"[matHeaderRowDef]",inputs:["matHeaderRowDef","matHeaderRowDefSticky"]},{kind:"directive",type:b.MatColumnDef,selector:"[matColumnDef]",inputs:["matColumnDef"]},{kind:"directive",type:b.MatCellDef,selector:"[matCellDef]"},{kind:"directive",type:b.MatRowDef,selector:"[matRowDef]",inputs:["matRowDefColumns","matRowDefWhen"]},{kind:"directive",type:b.MatHeaderCell,selector:"mat-header-cell, th[mat-header-cell]"},{kind:"directive",type:b.MatCell,selector:"mat-cell, td[mat-cell]"},{kind:"component",type:b.MatHeaderRow,selector:"mat-header-row, tr[mat-header-row]",exportAs:["matHeaderRow"]},{kind:"component",type:b.MatRow,selector:"mat-row, tr[mat-row]",exportAs:["matRow"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultShowHideDirective,selector:" [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]",inputs:["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"]},{kind:"directive",type:K.DefaultClassDirective,selector:" [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]",inputs:["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"]},{kind:"directive",type:K.DefaultStyleDirective,selector:" [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]",inputs:["ngStyle","ngStyle.xs","ngStyle.sm","ngStyle.md","ngStyle.lg","ngStyle.xl","ngStyle.lt-sm","ngStyle.lt-md","ngStyle.lt-lg","ngStyle.lt-xl","ngStyle.gt-xs","ngStyle.gt-sm","ngStyle.gt-md","ngStyle.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:bt.TbIconComponent,selector:"tb-icon",inputs:["color"],exportAs:["tbIcon"]},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ModbusMasterTableComponent",wo),He([xt()],wo.prototype,"isLegacy",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:wo,decorators:[{type:n,args:[{selector:"tb-modbus-master-table",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>wo)),multi:!0}],standalone:!0,imports:[H,D,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
{{ \'gateway.hints.modbus-master\' | translate }}
\n
\n
\n \n
\n
\n {{ \'gateway.servers-slaves\' | translate}}\n
\n \n \n \n
\n
\n \n
\n \n \n  \n \n \n \n
\n
\n
\n \n \n \n
{{ \'gateway.device-name\' | translate }}
\n
\n \n
{{ slave[\'deviceName\'] }}
\n
\n
\n \n \n {{ \'gateway.info\' | translate }}\n \n \n
{{ slave[\'host\'] ?? slave[\'port\'] }}
\n
\n
\n \n \n {{ \'gateway.unit-id\' | translate }}\n \n \n
{{ slave[\'unitId\'] }}
\n
\n
\n \n \n
{{ \'gateway.type\' | translate }}
\n
\n \n {{ ModbusProtocolLabelsMap.get(slave[\'type\']) }}\n \n
\n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n widget.no-data-found\n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block}:host .tb-master-table .tb-master-table-content{width:100%;height:100%;background:#fff;overflow:hidden}:host .tb-master-table .tb-master-table-content .mat-toolbar-tools{min-height:auto}:host .tb-master-table .tb-master-table-content .title-container{overflow:hidden}:host .tb-master-table .tb-master-table-content .tb-master-table-title{padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tb-master-table .tb-master-table-content .table-container{overflow:auto}:host .tb-master-table .tb-master-table-content .table-container .mat-mdc-table{table-layout:fixed;min-width:450px}:host .tb-master-table .tb-master-table-content .table-container .mat-mdc-table .table-value-column{padding:0 12px;width:38%}:host .no-data-found{height:calc(100% - 120px)}@media screen and (max-width: 599px){:host .mat-toolbar{height:auto;min-height:100px}:host .mat-toolbar .tb-master-table-title{padding-bottom:5px;width:100%}}:host ::ng-deep mat-cell.tb-value-cell{cursor:pointer}:host ::ng-deep mat-cell.tb-value-cell .mat-icon{height:24px;width:24px;font-size:24px;color:#757575}\n']}]}],ctorParameters:()=>[{type:Y.TranslateService},{type:Je.MatDialog},{type:X.DialogService},{type:me.FormBuilder},{type:t.ChangeDetectorRef}],propDecorators:{searchInputField:[{type:o,args:["searchInput"]}],isLegacy:[{type:a}]}});class Co extends R{constructor(){super()}}e("SlavesDatasource",Co);class To extends ya{constructor(){super(),this.enableSlaveControl=new ye(!1),this.enableSlaveControl.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateSlaveEnabling(e),this.basicFormGroup.get("slave").updateValueAndValidity({emitEvent:!!this.onChange})}))}writeValue(e){super.writeValue(e),this.onEnableSlaveControl(e)}validate(){const{master:e,slave:t}=this.basicFormGroup.value,n=!e?.slaves?.length&&(ee(t,{})||!t);return!this.basicFormGroup.valid||n?{basicFormGroup:{valid:!1}}:null}initBasicFormGroup(){return this.fb.group({master:[],slave:[]})}updateSlaveEnabling(e){e?this.basicFormGroup.get("slave").enable({emitEvent:!1}):this.basicFormGroup.get("slave").disable({emitEvent:!1})}onEnableSlaveControl(e){this.enableSlaveControl.setValue(!!e.slave&&!ee(e.slave,{}))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:To,deps:[],target:t.ɵɵFactoryTarget.Directive})}static{this.ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"18.2.6",type:To,usesInheritance:!0,ngImport:t})}}e("ModbusBasicConfigDirective",To),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:To,decorators:[{type:s}],ctorParameters:()=>[]});class So{constructor(e){this.fb=e,this.ModbusProtocolLabelsMap=zn,this.ModbusMethodLabelsMap=Kn,this.portLimits=Et,this.modbusProtocolTypes=Object.values(Hn),this.modbusMethodTypes=Object.values(Wn),this.modbusSerialMethodTypes=Object.values(jn),this.modbusOrderType=Object.values(Jn),this.ModbusProtocolType=Hn,this.modbusBaudrates=la,this.isSlaveEnabled=!1,this.serialSpecificControlKeys=["serialPort","baudrate"],this.tcpUdpSpecificControlKeys=["port","security","host"],this.destroy$=new Se,this.showSecurityControl=this.fb.control(!1),this.slaveConfigFormGroup=this.fb.group({type:[Hn.TCP],host:["",[ue.required,ue.pattern(kt)]],port:[null,[ue.required,ue.min(Et.MIN),ue.max(Et.MAX)]],serialPort:["",[ue.required,ue.pattern(kt)]],method:[Wn.SOCKET],unitId:[null,[ue.required]],baudrate:[this.modbusBaudrates[0]],deviceName:["",[ue.required,ue.pattern(kt)]],deviceType:["",[ue.required,ue.pattern(kt)]],pollPeriod:[5e3,[ue.required]],sendDataToThingsBoard:[!1],byteOrder:[Jn.BIG],wordOrder:[Jn.BIG],security:[],identity:this.fb.group({vendorName:["",[ue.pattern(kt)]],productCode:["",[ue.pattern(kt)]],vendorUrl:["",[ue.pattern(kt)]],productName:["",[ue.pattern(kt)]],modelName:["",[ue.pattern(kt)]]}),values:[]}),this.observeValueChanges(),this.observeTypeChange(),this.observeShowSecurity()}get protocolType(){return this.slaveConfigFormGroup.get("type").value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.slaveConfigFormGroup.valid?null:{slaveConfigFormGroup:{valid:!1}}}writeValue(e){this.showSecurityControl.patchValue(!!e.security&&!ee(e.security,{})),this.updateSlaveConfig(e)}setDisabledState(e){this.isSlaveEnabled=!e,this.updateFormEnableState()}observeValueChanges(){this.slaveConfigFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{e.type===Hn.Serial&&(e.port=e.serialPort,delete e.serialPort),this.onChange(e),this.onTouched()}))}observeTypeChange(){this.slaveConfigFormGroup.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.updateFormEnableState(),this.updateMethodType(e)}))}updateMethodType(e){this.slaveConfigFormGroup.get("method").value!==Wn.RTU&&this.slaveConfigFormGroup.get("method").patchValue(e===Hn.Serial?jn.ASCII:Wn.SOCKET,{emitEvent:!1})}updateFormEnableState(){this.isSlaveEnabled?(this.slaveConfigFormGroup.enable({emitEvent:!1}),this.showSecurityControl.enable({emitEvent:!1})):(this.slaveConfigFormGroup.disable({emitEvent:!1}),this.showSecurityControl.disable({emitEvent:!1})),this.updateEnablingByProtocol(),this.updateSecurityEnable(this.showSecurityControl.value)}observeShowSecurity(){this.showSecurityControl.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>this.updateSecurityEnable(e)))}updateSecurityEnable(e){e&&this.isSlaveEnabled&&this.protocolType!==Hn.Serial?this.slaveConfigFormGroup.get("security").enable({emitEvent:!1}):this.slaveConfigFormGroup.get("security").disable({emitEvent:!1})}updateEnablingByProtocol(){const e=this.protocolType===Hn.Serial,t=e?this.serialSpecificControlKeys:this.tcpUdpSpecificControlKeys,n=e?this.tcpUdpSpecificControlKeys:this.serialSpecificControlKeys;this.isSlaveEnabled&&t.forEach((e=>this.slaveConfigFormGroup.get(e)?.enable({emitEvent:!1}))),n.forEach((e=>this.slaveConfigFormGroup.get(e)?.disable({emitEvent:!1})))}updateSlaveConfig(e){const{type:t=Hn.TCP,method:n=Wn.RTU,unitId:a=0,deviceName:o="",deviceType:i="",pollPeriod:r=5e3,sendDataToThingsBoard:s=!1,byteOrder:l=Jn.BIG,wordOrder:c=Jn.BIG,security:p={},identity:m={vendorName:"",productCode:"",vendorUrl:"",productName:"",modelName:""},values:d={},baudrate:u=this.modbusBaudrates[0],host:g="",port:f=null}=e,y={type:t,method:n,unitId:a,deviceName:o,deviceType:i,pollPeriod:r,sendDataToThingsBoard:!!s,byteOrder:l,wordOrder:c,security:p,identity:m,values:d,baudrate:u,host:t===Hn.Serial?"":g,port:t===Hn.Serial?null:f,serialPort:t===Hn.Serial?f:""};this.slaveConfigFormGroup.setValue(y,{emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:So,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:So,isStandalone:!0,selector:"tb-modbus-slave-config",providers:[{provide:ge,useExisting:m((()=>So)),multi:!0},{provide:fe,useExisting:m((()=>So)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
\n
gateway.server-slave-config
\n \n {{ ModbusProtocolLabelsMap.get(type) }}\n \n
\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n gateway.method\n
\n
\n \n \n {{ ModbusMethodLabelsMap.get(method) }}\n \n \n
\n
\n
\n
\n
gateway.unit-id
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-profile
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n \n gateway.poll-period\n \n
\n
\n \n \n \n
\n
\n
\n
gateway.baudrate
\n
\n \n \n {{ rate }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.send-data-to-platform\' | translate }}\n \n \n
\n
\n \n \n \n
gateway.advanced-connection-settings
\n
\n
\n
\n
\n
gateway.byte-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n
gateway.word-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.tls-connection\' | translate }}\n \n \n \n \n \n \n
\n \n
\n
gateway.vendor-name
\n
\n \n \n \n
\n
\n
\n
gateway.product-code
\n
\n \n \n \n
\n
\n
\n
gateway.vendor-url
\n
\n \n \n \n
\n
\n
\n
gateway.product-name
\n
\n \n \n \n
\n
\n
\n
gateway.model-name
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
gateway.values
\n \n
\n
\n
\n',dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:D},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"component",type:$e.MatExpansionPanel,selector:"mat-expansion-panel",inputs:["hideToggle","togglePosition"],outputs:["afterExpand","afterCollapse"],exportAs:["matExpansionPanel"]},{kind:"component",type:$e.MatExpansionPanelHeader,selector:"mat-expansion-panel-header",inputs:["expandedHeight","collapsedHeight","tabIndex"]},{kind:"directive",type:$e.MatExpansionPanelTitle,selector:"mat-panel-title"},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Ye.TruncateWithTooltipDirective,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"component",type:yo,selector:"tb-modbus-values",inputs:["singleMode","hideNewFields"]},{kind:"component",type:bo,selector:"tb-modbus-security-config",inputs:["isMaster"]},{kind:"pipe",type:wa,name:"getGatewayPortTooltip"},{kind:"directive",type:Sa,selector:"[tbTruncateWithTooltip]",inputs:["tbTruncateWithTooltip","tooltipEnabled","position"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:So,decorators:[{type:n,args:[{selector:"tb-modbus-slave-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>So)),multi:!0},{provide:fe,useExisting:m((()=>So)),multi:!0}],standalone:!0,imports:[H,D,yo,bo,wa,Sa],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n
\n
gateway.server-slave-config
\n \n {{ ModbusProtocolLabelsMap.get(type) }}\n \n
\n
\n
\n
gateway.host
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n \n
\n
gateway.port
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n
\n gateway.method\n
\n
\n \n \n {{ ModbusMethodLabelsMap.get(method) }}\n \n \n
\n
\n
\n
\n
gateway.unit-id
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.device-profile
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
\n \n gateway.poll-period\n \n
\n
\n \n \n \n
\n
\n
\n
gateway.baudrate
\n
\n \n \n {{ rate }}\n \n \n
\n
\n
\n \n \n {{ \'gateway.send-data-to-platform\' | translate }}\n \n \n
\n
\n \n \n \n
gateway.advanced-connection-settings
\n
\n
\n
\n
\n
gateway.byte-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n
gateway.word-order
\n
\n \n \n {{ order }}\n \n \n
\n
\n
\n \n \n \n \n \n {{ \'gateway.tls-connection\' | translate }}\n \n \n \n \n \n \n
\n \n
\n
gateway.vendor-name
\n
\n \n \n \n
\n
\n
\n
gateway.product-code
\n
\n \n \n \n
\n
\n
\n
gateway.vendor-url
\n
\n \n \n \n
\n
\n
\n
gateway.product-name
\n
\n \n \n \n
\n
\n
\n
gateway.model-name
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
gateway.values
\n \n
\n
\n
\n'}]}],ctorParameters:()=>[{type:me.FormBuilder}]});class ko extends To{constructor(){super(...arguments),this.isLegacy=!1}mapConfigToFormValue({master:e,slave:t}){return{master:e?.slaves?e:{slaves:[]},slave:t??{}}}getMappedValue(e){return{master:e.master,slave:e.slave}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ko,deps:null,target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:ko,isStandalone:!0,selector:"tb-modbus-basic-config",providers:[{provide:ge,useExisting:m((()=>ko)),multi:!0},{provide:fe,useExisting:m((()=>ko)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n
{{ \'gateway.hints.modbus-server\' | translate }}
\n
\n \n \n {{ \'gateway.enable\' | translate }}\n \n \n
\n
\n \n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:So,selector:"tb-modbus-slave-config"},{kind:"component",type:wo,selector:"tb-modbus-master-table",inputs:["isLegacy"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ModbusBasicConfigComponent",ko),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:ko,decorators:[{type:n,args:[{selector:"tb-modbus-basic-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>ko)),multi:!0},{provide:fe,useExisting:m((()=>ko)),multi:!0}],standalone:!0,imports:[H,D,So,wo,ka],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n
{{ \'gateway.hints.modbus-server\' | translate }}
\n
\n \n \n {{ \'gateway.enable\' | translate }}\n \n \n
\n
\n \n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}\n']}]}]});class Lo extends To{constructor(){super(...arguments),this.isLegacy=!0}mapConfigToFormValue(e){return{master:e.master?.slaves?e.master:{slaves:[]},slave:e.slave?ha.mapSlaveToUpgradedVersion(e.slave):{}}}getMappedValue(e){return{master:e.master,slave:e.slave?ha.mapSlaveToDowngradedVersion(e.slave):{}}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Lo,deps:null,target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Lo,isStandalone:!0,selector:"tb-modbus-legacy-basic-config",providers:[{provide:ge,useExisting:m((()=>Lo)),multi:!0},{provide:fe,useExisting:m((()=>Lo)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n
{{ \'gateway.hints.modbus-server\' | translate }}
\n
\n \n \n {{ \'gateway.enable\' | translate }}\n \n \n
\n
\n \n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:So,selector:"tb-modbus-slave-config"},{kind:"component",type:wo,selector:"tb-modbus-master-table",inputs:["isLegacy"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}e("ModbusLegacyBasicConfigComponent",Lo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Lo,decorators:[{type:n,args:[{selector:"tb-modbus-legacy-basic-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>Lo)),multi:!0},{provide:fe,useExisting:m((()=>Lo)),multi:!0}],standalone:!0,imports:[H,D,So,wo,ka],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n
{{ \'gateway.hints.modbus-server\' | translate }}
\n
\n \n \n {{ \'gateway.enable\' | translate }}\n \n \n
\n
\n \n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}\n']}]}]});class Fo extends ya{constructor(){super(...arguments),this.mappingTypes=fn,this.isLegacy=!0}initBasicFormGroup(){return this.fb.group({mapping:[],server:[]})}mapConfigToFormValue(e){return{server:e.server?xa.mapServerToUpgradedVersion(e.server):{},mapping:e.server?.mapping?xa.mapMappingToUpgradedVersion(e.server.mapping):[]}}getMappedValue(e){return{server:xa.mapServerToDowngradedVersion(e)}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Fo,deps:null,target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Fo,isStandalone:!0,selector:"tb-opc-ua-legacy-basic-config",providers:[{provide:ge,useExisting:m((()=>Fo)),multi:!0},{provide:fe,useExisting:m((()=>Fo)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:ro,selector:"tb-mapping-table",inputs:["required","mappingType"]},{kind:"component",type:co,selector:"tb-opc-server-config",inputs:["hideNewFields"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Fo,decorators:[{type:n,args:[{selector:"tb-opc-ua-legacy-basic-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>Fo)),multi:!0},{provide:fe,useExisting:m((()=>Fo)),multi:!0}],standalone:!0,imports:[H,D,lo,ro,co],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n']}]}]});class Io extends ya{constructor(){super(...arguments),this.MappingType=fn}initBasicFormGroup(){return this.fb.group({mapping:[],requestsMapping:[],broker:[],workers:[]})}getRequestDataArray(e){const t=[];return le(e)&&Object.keys(e).forEach((n=>{for(const a of e[n])t.push({requestType:n,requestValue:a})})),t}getRequestDataObject(e){return e.reduce(((e,{requestType:t,requestValue:n})=>(e[t].push(n),e)),{connectRequests:[],disconnectRequests:[],attributeRequests:[],attributeUpdates:[],serverSideRpc:[]})}getBrokerMappedValue(e,t){return{...e,maxNumberOfWorkers:t.maxNumberOfWorkers??100,maxMessageNumberPerWorker:t.maxMessageNumberPerWorker??10}}writeValue(e){this.basicFormGroup.setValue(this.mapConfigToFormValue(e),{emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Io,deps:null,target:t.ɵɵFactoryTarget.Directive})}static{this.ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"18.2.6",type:Io,usesInheritance:!0,ngImport:t})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Io,decorators:[{type:s}]});class Ao extends Io{mapConfigToFormValue(e){const{broker:t,mapping:n=[],connectRequests:a=[],disconnectRequests:o=[],attributeRequests:i=[],attributeUpdates:r=[],serverSideRpc:s=[]}=e,l=ma.mapRequestsToUpgradedVersion({connectRequests:a,disconnectRequests:o,attributeRequests:i,attributeUpdates:r,serverSideRpc:s});return{workers:t&&(t.maxNumberOfWorkers||t.maxMessageNumberPerWorker)?{maxNumberOfWorkers:t.maxNumberOfWorkers,maxMessageNumberPerWorker:t.maxMessageNumberPerWorker}:{},mapping:ma.mapMappingToUpgradedVersion(n)||[],broker:t||{},requestsMapping:this.getRequestDataArray(l)}}getMappedValue(e){const{broker:t,workers:n,mapping:a,requestsMapping:o}=e||{},i=o?.length?this.getRequestDataObject(o):{};return{broker:this.getBrokerMappedValue(t,n),mapping:ma.mapMappingToDowngradedVersion(a),...ma.mapRequestsToDowngradedVersion(i)}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ao,deps:null,target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Ao,isStandalone:!0,selector:"tb-mqtt-legacy-basic-config",providers:[{provide:ge,useExisting:m((()=>Ao)),multi:!0},{provide:fe,useExisting:m((()=>Ao)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n \n
\n
\n \n
\n \n
\n
\n
\n\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:uo,selector:"tb-workers-config-control"},{kind:"component",type:mo,selector:"tb-broker-config-control"},{kind:"component",type:ro,selector:"tb-mapping-table",inputs:["required","mappingType"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Ao,decorators:[{type:n,args:[{selector:"tb-mqtt-legacy-basic-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>Ao)),multi:!0},{provide:fe,useExisting:m((()=>Ao)),multi:!0}],standalone:!0,imports:[H,D,lo,uo,mo,ro],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n \n
\n
\n \n
\n \n
\n
\n
\n\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n']}]}]});class No extends Io{mapConfigToFormValue(e){const{broker:t,mapping:n=[],requestsMapping:a}=e;return{workers:t&&(t.maxNumberOfWorkers||t.maxMessageNumberPerWorker)?{maxNumberOfWorkers:t.maxNumberOfWorkers,maxMessageNumberPerWorker:t.maxMessageNumberPerWorker}:{},mapping:n??[],broker:t??{},requestsMapping:this.getRequestDataArray(a)}}getMappedValue(e){const{broker:t,workers:n,mapping:a,requestsMapping:o}=e||{};return{broker:this.getBrokerMappedValue(t,n),mapping:a,requestsMapping:o?.length?this.getRequestDataObject(o):{}}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:No,deps:null,target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:No,isStandalone:!0,selector:"tb-mqtt-basic-config",providers:[{provide:ge,useExisting:m((()=>No)),multi:!0},{provide:fe,useExisting:m((()=>No)),multi:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n \n
\n
\n \n
\n \n
\n
\n
\n\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:D},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"component",type:uo,selector:"tb-workers-config-control"},{kind:"component",type:mo,selector:"tb-broker-config-control"},{kind:"component",type:ro,selector:"tb-mapping-table",inputs:["required","mappingType"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:No,decorators:[{type:n,args:[{selector:"tb-mqtt-basic-config",changeDetection:d.OnPush,providers:[{provide:ge,useExisting:m((()=>No)),multi:!0},{provide:fe,useExisting:m((()=>No)),multi:!0}],standalone:!0,imports:[H,D,lo,uo,mo,ro],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n \n
\n
\n \n
\n \n
\n
\n
\n\n',styles:['@charset "UTF-8";:host{height:100%}:host ::ng-deep .mat-mdc-tab-group,:host ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n']}]}]});class Mo{isErrorState(e){return e&&e.invalid}}e("ForceErrorStateMatcher",Mo);class Eo extends O{constructor(e,t,n,a,o,i,r,s,l,c,p){super(e),this.store=e,this.fb=t,this.translate=n,this.attributeService=a,this.dialogService=o,this.dialog=i,this.telemetryWsService=r,this.zone=s,this.utils=l,this.isLatestVersionConfig=c,this.cd=p,this.ConnectorType=_t,this.allowBasicConfig=new Set([_t.MQTT,_t.OPCUA,_t.MODBUS]),this.gatewayLogLevel=Object.values(Mt),this.displayedColumns=["enabled","key","type","syncStatus","errors","actions"],this.GatewayConnectorTypesTranslatesMap=Ht,this.ConnectorConfigurationModes=on,this.ReportStrategyDefaultValue=ln,this.mode=this.ConnectorConfigurationModes.BASIC,this.basicConfigInitSubject=new Se,this.activeData=[],this.inactiveData=[],this.sharedAttributeData=[],this.subscriptionOptions={callbacks:{onDataUpdated:()=>this.ctx.ngZone.run((()=>{this.onErrorsUpdated()})),onDataUpdateError:(e,t)=>this.ctx.ngZone.run((()=>{this.onDataUpdateError(t)}))}},this.destroy$=new Se,this.attributeUpdateSubject=new Se,this.initDataSources(),this.initConnectorForm(),this.observeAttributeChange()}ngAfterViewInit(){this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=this.getSortingDataAccessor(),this.ctx.$scope.gatewayConnectors=this,this.loadConnectors(),this.loadGatewayState(),this.observeModeChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),super.ngOnDestroy()}onSaveConnector(){this.saveConnector(this.getUpdatedConnectorData(this.connectorForm.value),!1)}saveConnector(e,t=!0){const n=t||this.activeConnectors.includes(this.initialConnector.name)?L.SHARED_SCOPE:L.SERVER_SCOPE;Ae(this.getEntityAttributeTasks(e,n)).pipe(Oe(1)).subscribe((n=>{this.showToast(t?this.translate.instant("gateway.connector-created"):this.translate.instant("gateway.connector-updated")),this.initialConnector=e,this.updateData(!0),this.connectorForm.markAsPristine()}))}getEntityAttributeTasks(e,t){const n=[],a=[{key:e.name,value:e}],o=[],i=!this.activeConnectors.includes(e.name)&&t===L.SHARED_SCOPE||!this.inactiveConnectors.includes(e.name)&&t===L.SERVER_SCOPE,r=this.initialConnector&&this.initialConnector.name!==e.name;return r&&(o.push({key:this.initialConnector.name}),this.removeConnectorFromList(this.initialConnector.name,!0),this.removeConnectorFromList(this.initialConnector.name,!1)),i&&(t===L.SHARED_SCOPE?this.activeConnectors.push(e.name):this.inactiveConnectors.push(e.name)),(r||i)&&n.push(this.getSaveEntityAttributesTask(t)),n.push(this.attributeService.saveEntityAttributes(this.device,t,a)),o.length&&n.push(this.attributeService.deleteEntityAttributes(this.device,t,o)),n}getSaveEntityAttributesTask(e){const t=e===L.SHARED_SCOPE?"active_connectors":"inactive_connectors",n=e===L.SHARED_SCOPE?this.activeConnectors:this.inactiveConnectors;return this.attributeService.saveEntityAttributes(this.device,e,[{key:t,value:n}])}removeConnectorFromList(e,t){const n=t?this.activeConnectors:this.inactiveConnectors,a=n.indexOf(e);-1!==a&&n.splice(a,1)}getUpdatedConnectorData(e){const t={...e};return t.configuration=`${ce(t.name)}.json`,delete t.basicConfig,t.type!==_t.GRPC&&delete t.key,t.type!==_t.CUSTOM&&delete t.class,t.type===_t.MODBUS&&this.isLatestVersionConfig.transform(t.configVersion)&&(t.reportStrategy||(t.reportStrategy={type:sn.OnReportPeriod,reportPeriod:ln.Connector},delete t.sendDataOnlyOnChange)),this.gatewayVersion&&!t.configVersion&&(t.configVersion=this.gatewayVersion),t.ts=Date.now(),t}updateData(e=!1){this.pageLink.sortOrder.property=this.sort.active,this.pageLink.sortOrder.direction=w[this.sort.direction.toUpperCase()],this.attributeDataSource.loadAttributes(this.device,L.CLIENT_SCOPE,this.pageLink,e).subscribe((e=>{this.activeData=e.data.filter((e=>this.activeConnectors.includes(e.key))),this.combineData(),this.generateSubscription(),this.setClientData(e)})),this.inactiveConnectorsDataSource.loadAttributes(this.device,L.SHARED_SCOPE,this.pageLink,e).subscribe((e=>{this.sharedAttributeData=e.data.filter((e=>this.activeConnectors.includes(e.key))),this.combineData()})),this.serverDataSource.loadAttributes(this.device,L.SERVER_SCOPE,this.pageLink,e).subscribe((e=>{this.inactiveData=e.data.filter((e=>this.inactiveConnectors.includes(e.key))),this.combineData()}))}isConnectorSynced(e){const t=e.value;if(!t.ts||e.skipSync||!this.isGatewayActive)return!1;if(-1===this.activeData.findIndex((e=>("string"==typeof e.value?JSON.parse(e.value):e.value).name===t.name)))return!1;return-1!==this.sharedAttributeData.findIndex((e=>{const n=e.value,a=n.name===t.name,o=ee(n.configurationJson,{})&&a,i=this.hasSameConfig(n.configurationJson,t.configurationJson),r=n.ts&&n.ts<=t.ts;return a&&r&&(i||o)}))}hasSameConfig(e,t){const{name:n,id:a,enableRemoteLogging:o,logLevel:i,reportStrategy:r,configVersion:s,...l}=e,{name:c,id:p,enableRemoteLogging:m,logLevel:d,reportStrategy:u,configVersion:g,...f}=t;return ee(l,f)}combineData(){const e=[...this.activeData,...this.inactiveData,...this.sharedAttributeData].reduce(((e,t)=>{const n=e.findIndex((e=>e.key===t.key));return-1===n?e.push(t):t.lastUpdateTs>e[n].lastUpdateTs&&!this.isConnectorSynced(e[n])&&(e[n]={...t,skipSync:!0}),e}),[]);this.dataSource.data=e.map((e=>({...e,value:"string"==typeof e.value?JSON.parse(e.value):e.value})))}clearOutConnectorForm(){this.initialConnector=null,this.connectorForm.setValue({mode:on.BASIC,name:"",type:_t.MQTT,sendDataOnlyOnChange:!1,enableRemoteLogging:!1,logLevel:Mt.INFO,key:"auto",class:"",configuration:"",configurationJson:{},basicConfig:{},configVersion:"",reportStrategy:[{value:{},disabled:!0}]},{emitEvent:!1}),this.connectorForm.markAsPristine()}selectConnector(e,t){e&&e.stopPropagation();const n=t.value;n?.name!==this.initialConnector?.name&&this.confirmConnectorChange().subscribe((e=>{e&&this.setFormValue(n)}))}isSameConnector(e){if(!this.initialConnector)return!1;const t=e.value;return this.initialConnector.name===t.name}showToast(e){this.store.dispatch({type:"[Notification] Show",notification:{message:e,type:"success",duration:1e3,verticalPosition:"top",horizontalPosition:"left",target:"dashboardRoot",forceDismiss:!0}})}returnType(e){const t=e.value;return this.GatewayConnectorTypesTranslatesMap.get(t.type)}deleteConnector(e,t){t?.stopPropagation();const n=`Delete connector "${e.key}"?`;this.dialogService.confirm(n,"All connector data will be deleted.","Cancel","Delete").pipe(Oe(1),Ue((t=>{if(!t)return;const n=[],a=this.activeConnectors.includes(e.value?.name)?L.SHARED_SCOPE:L.SERVER_SCOPE;return n.push(this.attributeService.deleteEntityAttributes(this.device,a,[e])),this.removeConnectorFromList(e.key,!0),this.removeConnectorFromList(e.key,!1),n.push(this.getSaveEntityAttributesTask(a)),Ae(n)}))).subscribe((()=>{this.initialConnector&&this.initialConnector.name!==e.key||(this.clearOutConnectorForm(),this.cd.detectChanges(),this.connectorForm.disable()),this.updateData(!0)}))}connectorLogs(e,t){t&&t.stopPropagation();const n=J(this.ctx.stateController.getStateParams());n.connector_logs=e,n.targetEntityParamName="connector_logs",this.ctx.stateController.openState("connector_logs",n)}connectorRpc(e,t){t&&t.stopPropagation();const n=J(this.ctx.stateController.getStateParams());n.connector_rpc=e,n.targetEntityParamName="connector_rpc",this.ctx.stateController.openState("connector_rpc",n)}onEnableConnector(e){e.value.ts=(new Date).getTime(),this.updateActiveConnectorKeys(e.key),this.attributeUpdateSubject.next(e)}getErrorsCount(e){const t=e.key,n=this.subscription&&this.subscription.data.find((e=>e&&e.dataKey.name===`${t}_ERRORS_COUNT`));return n&&this.activeConnectors.includes(t)?n.data[0][1]||0:"Inactive"}onAddConnector(e){e?.stopPropagation(),this.confirmConnectorChange().pipe(Oe(1),Me(Boolean),Ue((()=>this.openAddConnectorDialog())),Me(Boolean)).subscribe((e=>this.addConnector(e)))}addConnector(e){this.connectorForm.disabled&&this.connectorForm.enable(),e.configurationJson||(e.configurationJson={}),this.gatewayVersion&&!e.configVersion&&(e.configVersion=this.gatewayVersion),e.basicConfig=e.configurationJson,this.initialConnector=e;const t=this.connectorForm.get("type").value;this.setInitialConnectorValues(e),this.saveConnector(this.getUpdatedConnectorData(e)),t!==e.type&&this.allowBasicConfig.has(e.type)?this.basicConfigInitSubject.pipe(Oe(1)).subscribe((()=>{this.patchBasicConfigConnector(e)})):this.patchBasicConfigConnector(e)}setInitialConnectorValues(e){const{basicConfig:t,mode:n,...a}=e;this.toggleReportStrategy(e.type),this.connectorForm.get("mode").setValue(this.allowBasicConfig.has(e.type)?e.mode??on.BASIC:null,{emitEvent:!1}),this.connectorForm.patchValue(a,{emitEvent:!1})}openAddConnectorDialog(){return this.ctx.ngZone.run((()=>this.dialog.open(to,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{dataSourceData:this.dataSource.data,gatewayVersion:this.gatewayVersion}}).afterClosed()))}uniqNameRequired(){return e=>{const t=e.value?.trim().toLowerCase(),n=this.dataSource.data.some((e=>e.value.name.toLowerCase()===t)),a=this.initialConnector?.name.toLowerCase()===t;return n&&!a?{duplicateName:{valid:!1}}:null}}initDataSources(){const e={property:"key",direction:w.ASC};this.pageLink=new C(1e3,0,null,e),this.attributeDataSource=new La(this.attributeService,this.telemetryWsService,this.zone,this.translate),this.inactiveConnectorsDataSource=new La(this.attributeService,this.telemetryWsService,this.zone,this.translate),this.serverDataSource=new La(this.attributeService,this.telemetryWsService,this.zone,this.translate),this.dataSource=new y([])}initConnectorForm(){this.connectorForm=this.fb.group({mode:[on.BASIC],name:["",[ue.required,this.uniqNameRequired(),ue.pattern(kt)]],type:["",[ue.required]],enableRemoteLogging:[!1],logLevel:["",[ue.required]],sendDataOnlyOnChange:[!1],key:["auto"],class:[""],configuration:[""],configurationJson:[{},[ue.required]],basicConfig:[{}],configVersion:[""],reportStrategy:[{value:{},disabled:!0}]}),this.connectorForm.disable()}getSortingDataAccessor(){return(e,t)=>{switch(t){case"syncStatus":return this.isConnectorSynced(e)?1:0;case"enabled":return this.activeConnectors.includes(e.key)?1:0;case"errors":const n=this.getErrorsCount(e);return"string"==typeof n?this.sort.direction.toUpperCase()===w.DESC?-1:1/0:n;default:return e[t]||e.value[t]}}}loadConnectors(){this.device&&this.device.id!==k&&Ae([this.attributeService.getEntityAttributes(this.device,L.SHARED_SCOPE,["active_connectors"]),this.attributeService.getEntityAttributes(this.device,L.SERVER_SCOPE,["inactive_connectors"]),this.attributeService.getEntityAttributes(this.device,L.CLIENT_SCOPE,["Version"])]).pipe(Ne(this.destroy$)).subscribe((e=>{this.activeConnectors=this.parseConnectors(e[0]),this.inactiveConnectors=this.parseConnectors(e[1]),this.gatewayVersion=e[2][0]?.value,this.updateData(!0)}))}loadGatewayState(){this.attributeService.getEntityAttributes(this.device,L.SERVER_SCOPE).pipe(Ne(this.destroy$)).subscribe((e=>{const t=e.find((e=>"active"===e.key)).value,n=e.find((e=>"lastDisconnectTime"===e.key))?.value,a=e.find((e=>"lastConnectTime"===e.key))?.value;this.isGatewayActive=this.getGatewayStatus(t,a,n)}))}parseConnectors(e){const t=e?.[0]?.value||[];return ne(t)?JSON.parse(t):t}observeModeChange(){this.connectorForm.get("mode").valueChanges.pipe(Ne(this.destroy$)).subscribe((()=>{this.connectorForm.get("mode").markAsPristine()}))}observeAttributeChange(){this.attributeUpdateSubject.pipe(Ve(300),Ee((e=>this.executeAttributeUpdates(e))),Ne(this.destroy$)).subscribe()}updateActiveConnectorKeys(e){if(this.activeConnectors.includes(e)){const t=this.activeConnectors.indexOf(e);-1!==t&&this.activeConnectors.splice(t,1),this.inactiveConnectors.push(e)}else{const t=this.inactiveConnectors.indexOf(e);-1!==t&&this.inactiveConnectors.splice(t,1),this.activeConnectors.push(e)}}executeAttributeUpdates(e){Ae(this.getAttributeExecutionTasks(e)).pipe(Oe(1),Ee((()=>this.updateData(!0))),Ne(this.destroy$)).subscribe()}getAttributeExecutionTasks(e){const t=this.activeConnectors.includes(e.key),n=t?L.SERVER_SCOPE:L.SHARED_SCOPE,a=t?L.SHARED_SCOPE:L.SERVER_SCOPE;return[this.attributeService.saveEntityAttributes(this.device,L.SHARED_SCOPE,[{key:"active_connectors",value:this.activeConnectors}]),this.attributeService.saveEntityAttributes(this.device,L.SERVER_SCOPE,[{key:"inactive_connectors",value:this.inactiveConnectors}]),this.attributeService.deleteEntityAttributes(this.device,n,[e]),this.attributeService.saveEntityAttributes(this.device,a,[e])]}onDataUpdateError(e){const t=this.utils.parseException(e);let n=t.name;t.message&&(n+=": "+t.message),console.error(n)}onErrorsUpdated(){this.cd.detectChanges()}onDataUpdated(){const e=this.ctx.defaultSubscription.data,t=e.find((e=>"active"===e.dataKey.name)).data[0][1],n=e.find((e=>"lastDisconnectTime"===e.dataKey.name)).data[0][1],a=e.find((e=>"lastConnectTime"===e.dataKey.name)).data[0][1];this.isGatewayActive=this.getGatewayStatus(t,a,n),this.cd.detectChanges()}getGatewayStatus(e,t,n){return!!e&&(!n||t>n)}generateSubscription(){if(this.subscription&&this.subscription.unsubscribe(),this.device){const e=[{type:F.entity,entityType:I.DEVICE,entityId:this.device.id,entityName:"Gateway",timeseries:[]}];this.dataSource.data.forEach((t=>{e[0].timeseries.push({name:`${t.key}_ERRORS_COUNT`,label:`${t.key}_ERRORS_COUNT`})})),this.ctx.subscriptionApi.createSubscriptionFromInfo(A.latest,e,this.subscriptionOptions,!1,!0).subscribe((e=>{this.subscription=e}))}}createBasicConfigWatcher(){this.basicConfigSub&&this.basicConfigSub.unsubscribe(),this.basicConfigSub=this.connectorForm.get("basicConfig").valueChanges.pipe(Me((()=>!!this.initialConnector)),Ne(this.destroy$)).subscribe((e=>{const t=this.connectorForm.get("configurationJson"),n=this.connectorForm.get("type").value,a=this.connectorForm.get("mode").value;if(!ee(e,t?.value)&&this.allowBasicConfig.has(n)&&a===on.BASIC){const n={...t.value,...e};this.connectorForm.get("configurationJson").patchValue(n,{emitEvent:!1})}}))}createJsonConfigWatcher(){this.jsonConfigSub&&this.jsonConfigSub.unsubscribe(),this.jsonConfigSub=this.connectorForm.get("configurationJson").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{const t=this.connectorForm.get("basicConfig"),n=this.connectorForm.get("type").value,a=this.connectorForm.get("mode").value;!ee(e,t?.value)&&this.allowBasicConfig.has(n)&&a===on.ADVANCED&&this.connectorForm.get("basicConfig").patchValue(e,{emitEvent:!1})}))}confirmConnectorChange(){return this.initialConnector&&this.connectorForm.dirty?this.dialogService.confirm(this.translate.instant("gateway.change-connector-title"),this.translate.instant("gateway.change-connector-text"),this.translate.instant("action.no"),this.translate.instant("action.yes"),!0):Ie(!0)}setFormValue(e){this.connectorForm.disabled&&this.connectorForm.enable();const t=ba.getConfig({configuration:"",key:"auto",configurationJson:{},...e},this.gatewayVersion);this.gatewayVersion&&!t.configVersion&&(t.configVersion=this.gatewayVersion),t.basicConfig=t.configurationJson,this.initialConnector=t,this.updateConnector(t)}updateConnector(e){switch(this.jsonConfigSub?.unsubscribe(),e.type){case _t.MQTT:case _t.OPCUA:case _t.MODBUS:this.updateBasicConfigConnector(e);break;default:this.connectorForm.patchValue({...e,mode:null}),this.connectorForm.markAsPristine(),this.createJsonConfigWatcher()}}updateBasicConfigConnector(e){this.basicConfigSub?.unsubscribe();const t=this.connectorForm.get("type").value;this.setInitialConnectorValues(e),t!==e.type&&this.allowBasicConfig.has(e.type)?this.basicConfigInitSubject.asObservable().pipe(Oe(1)).subscribe((()=>{this.patchBasicConfigConnector(e)})):this.patchBasicConfigConnector(e)}patchBasicConfigConnector(e){this.connectorForm.patchValue(e,{emitEvent:!1}),this.connectorForm.markAsPristine(),this.createBasicConfigWatcher(),this.createJsonConfigWatcher()}toggleReportStrategy(e){const t=this.connectorForm.get("reportStrategy");e===_t.MODBUS?t.enable({emitEvent:!1}):t.disable({emitEvent:!1})}setClientData(e){if(this.initialConnector){const t=e.data.find((e=>e.key===this.initialConnector.name));t&&(t.value="string"==typeof t.value?JSON.parse(t.value):t.value,this.isConnectorSynced(t)&&t.value.configurationJson&&this.setFormValue({...t.value,mode:this.connectorForm.get("mode").value??t.value.mode}))}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Eo,deps:[{token:ot.Store},{token:me.FormBuilder},{token:Y.TranslateService},{token:X.AttributeService},{token:X.DialogService},{token:Je.MatDialog},{token:X.TelemetryWebsocketService},{token:t.NgZone},{token:X.UtilsService},{token:va},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Eo,selector:"tb-gateway-connector",inputs:{ctx:"ctx",device:"device"},providers:[{provide:Te,useClass:Mo}],viewQueries:[{propertyName:"nameInput",first:!0,predicate:["nameInput"],descendants:!0},{propertyName:"sort",first:!0,predicate:g,descendants:!0}],usesInheritance:!0,ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n \n

{{ \'gateway.connectors\' | translate }}

\n \n \n
\n
\n
\n \n
\n \n \n \n {{ \'gateway.connectors-table-enabled\' | translate }}\n \n \n \n \n \n \n \n {{ \'gateway.connectors-table-name\' | translate }}\n \n {{ attribute.key }}\n \n \n \n \n {{ \'gateway.connectors-table-type\' | translate }}\n \n \n {{ returnType(attribute) }}\n \n \n \n \n {{ \'gateway.configuration\' | translate }}\n \n \n
\n {{ isConnectorSynced(attribute) ? \'sync\' : \'out of sync\' }}\n
\n
\n
\n \n \n {{ \'gateway.connectors-table-status\' | translate }}\n \n \n \n \n \n \n \n {{ \'gateway.connectors-table-actions\' | translate }}\n \n \n
\n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n {{ initialConnector?.type ? GatewayConnectorTypesTranslatesMap.get(initialConnector.type) : \'\' }}\n {{ \'gateway.configuration\' | translate }}\n v{{connectorForm.get(\'configVersion\').value}}\n
\n \n \n {{ \'gateway.basic\' | translate }}\n \n \n {{ \'gateway.advanced\' | translate }}\n \n \n
\n \n gateway.select-connector\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n
\n\n
\n
\n
gateway.name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.connectors-table-class
\n
\n \n \n \n
\n
\n
\n
gateway.connectors-table-key
\n
\n \n \n \n
\n
\n
\n
gateway.logs-configuration
\n
\n \n \n {{ \'gateway.enable-remote-logging\' | translate }}\n \n \n
\n
\n
gateway.remote-logging-level
\n
\n \n \n {{ logLevel }}\n \n \n
\n
\n
\n
\n \n \n {{ \'gateway.send-change-data\' | translate }}\n \n \n
\n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block;overflow-x:auto;padding:0}:host .version-placeholder{color:gray;font-size:12px}:host .connector-container{height:100%;width:100%;flex-direction:row}@media screen and (max-width: 1279px){:host .connector-container{flex-direction:column}}:host .connector-container>section:not(.table-section){max-width:unset}@media screen and (min-width: 1280px){:host .connector-container>section:not(.table-section){max-width:50%}}:host .connector-container .table-section{min-height:35vh;overflow:hidden}:host .connector-container .table-section .table-container{overflow:auto}:host .connector-container .flex{flex:1}:host .connector-container .input-container{height:auto}:host .connector-container .section-container{background-color:#fff}:host .mat-toolbar{background:transparent;color:#000000de!important}:host .mat-mdc-slide-toggle{margin:0 8px}:host .status{text-align:center;border-radius:16px;font-weight:500;width:fit-content;padding:5px 15px}:host .status-sync{background:#1980380f;color:#198038}:host .status-unsync{background:#cb25300f;color:#cb2530}:host mat-row{cursor:pointer}:host .dot{height:12px;width:12px;background-color:#bbb;border-radius:50%;display:inline-block}:host .hasErrors{background-color:#cb2530}:host .noErrors{background-color:#198038}:host ::ng-deep .connector-container .mat-mdc-tab-group,:host ::ng-deep .connector-container .mat-mdc-tab-body-wrapper{height:100%}:host ::ng-deep .connector-container .mat-mdc-tab-body.mat-mdc-tab-body-active{position:absolute}:host ::ng-deep .connector-container .tb-form-row .fixed-title-width{min-width:120px;width:30%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .connector-container .tb-add-new{display:flex;z-index:999;pointer-events:none;background-color:#fff}:host ::ng-deep .connector-container .tb-add-new button.connector{height:auto;padding-right:12px;font-size:20px;border-style:dashed;border-width:2px;border-radius:8px;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;color:#00000061}\n'],dependencies:[{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"component",type:vt.JsonObjectEditComponent,selector:"tb-json-object-edit",inputs:["label","disabled","fillHeight","editorStyle","sort","jsonRequired","readonly"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"component",type:ht.MatMenu,selector:"mat-menu",inputs:["backdropClass","aria-label","aria-labelledby","aria-describedby","xPosition","yPosition","overlapTrigger","hasBackdrop","class","classList"],outputs:["closed","close"],exportAs:["matMenu"]},{kind:"directive",type:ht.MatMenuTrigger,selector:"[mat-menu-trigger-for], [matMenuTriggerFor]",inputs:["mat-menu-trigger-for","matMenuTriggerFor","matMenuTriggerData","matMenuTriggerRestoreFocus"],outputs:["menuOpened","onMenuOpen","menuClosed","onMenuClose"],exportAs:["matMenuTrigger"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"component",type:b.MatTable,selector:"mat-table, table[mat-table]",exportAs:["matTable"]},{kind:"directive",type:b.MatHeaderCellDef,selector:"[matHeaderCellDef]"},{kind:"directive",type:b.MatHeaderRowDef,selector:"[matHeaderRowDef]",inputs:["matHeaderRowDef","matHeaderRowDefSticky"]},{kind:"directive",type:b.MatColumnDef,selector:"[matColumnDef]",inputs:["matColumnDef"]},{kind:"directive",type:b.MatCellDef,selector:"[matCellDef]"},{kind:"directive",type:b.MatRowDef,selector:"[matRowDef]",inputs:["matRowDefColumns","matRowDefWhen"]},{kind:"directive",type:b.MatHeaderCell,selector:"mat-header-cell, th[mat-header-cell]"},{kind:"directive",type:b.MatCell,selector:"mat-cell, td[mat-cell]"},{kind:"component",type:b.MatHeaderRow,selector:"mat-header-row, tr[mat-header-row]",exportAs:["matHeaderRow"]},{kind:"component",type:b.MatRow,selector:"mat-row, tr[mat-row]",exportAs:["matRow"]},{kind:"directive",type:f.MatSort,selector:"[matSort]",inputs:["matSortActive","matSortStart","matSortDirection","matSortDisableClear","matSortDisabled"],outputs:["matSortChange"],exportAs:["matSort"]},{kind:"component",type:f.MatSortHeader,selector:"[mat-sort-header]",inputs:["mat-sort-header","arrowPosition","start","disabled","sortActionDescription","disableClear"],exportAs:["matSortHeader"]},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultLayoutAlignDirective,selector:" [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]",inputs:["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:K.DefaultShowHideDirective,selector:" [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]",inputs:["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"]},{kind:"directive",type:K.DefaultStyleDirective,selector:" [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]",inputs:["ngStyle","ngStyle.xs","ngStyle.sm","ngStyle.md","ngStyle.lg","ngStyle.xl","ngStyle.lt-sm","ngStyle.lt-md","ngStyle.lt-lg","ngStyle.lt-xl","ngStyle.gt-xs","ngStyle.gt-sm","ngStyle.gt-md","ngStyle.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]},{kind:"component",type:Lo,selector:"tb-modbus-legacy-basic-config"},{kind:"component",type:ko,selector:"tb-modbus-basic-config"},{kind:"component",type:Fo,selector:"tb-opc-ua-legacy-basic-config"},{kind:"component",type:po,selector:"tb-opc-ua-basic-config"},{kind:"component",type:Ao,selector:"tb-mqtt-legacy-basic-config"},{kind:"component",type:No,selector:"tb-mqtt-basic-config"},{kind:"component",type:go,selector:"tb-report-strategy",inputs:["isExpansionMode","defaultValue"]},{kind:"pipe",type:_.AsyncPipe,name:"async"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"pipe",type:va,name:"isLatestVersionConfig"}]})}}e("GatewayConnectorComponent",Eo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Eo,decorators:[{type:n,args:[{selector:"tb-gateway-connector",providers:[{provide:Te,useClass:Mo}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
\n \n

{{ \'gateway.connectors\' | translate }}

\n \n \n
\n
\n
\n \n
\n \n \n \n {{ \'gateway.connectors-table-enabled\' | translate }}\n \n \n \n \n \n \n \n {{ \'gateway.connectors-table-name\' | translate }}\n \n {{ attribute.key }}\n \n \n \n \n {{ \'gateway.connectors-table-type\' | translate }}\n \n \n {{ returnType(attribute) }}\n \n \n \n \n {{ \'gateway.configuration\' | translate }}\n \n \n
\n {{ isConnectorSynced(attribute) ? \'sync\' : \'out of sync\' }}\n
\n
\n
\n \n \n {{ \'gateway.connectors-table-status\' | translate }}\n \n \n \n \n \n \n \n {{ \'gateway.connectors-table-actions\' | translate }}\n \n \n
\n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n {{ initialConnector?.type ? GatewayConnectorTypesTranslatesMap.get(initialConnector.type) : \'\' }}\n {{ \'gateway.configuration\' | translate }}\n v{{connectorForm.get(\'configVersion\').value}}\n
\n \n \n {{ \'gateway.basic\' | translate }}\n \n \n {{ \'gateway.advanced\' | translate }}\n \n \n
\n \n gateway.select-connector\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n
\n\n
\n
\n
gateway.name
\n
\n \n \n \n warning\n \n \n
\n
\n
\n
gateway.connectors-table-class
\n
\n \n \n \n
\n
\n
\n
gateway.connectors-table-key
\n
\n \n \n \n
\n
\n
\n
gateway.logs-configuration
\n
\n \n \n {{ \'gateway.enable-remote-logging\' | translate }}\n \n \n
\n
\n
gateway.remote-logging-level
\n
\n \n \n {{ logLevel }}\n \n \n
\n
\n
\n
\n \n \n {{ \'gateway.send-change-data\' | translate }}\n \n \n
\n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:block;overflow-x:auto;padding:0}:host .version-placeholder{color:gray;font-size:12px}:host .connector-container{height:100%;width:100%;flex-direction:row}@media screen and (max-width: 1279px){:host .connector-container{flex-direction:column}}:host .connector-container>section:not(.table-section){max-width:unset}@media screen and (min-width: 1280px){:host .connector-container>section:not(.table-section){max-width:50%}}:host .connector-container .table-section{min-height:35vh;overflow:hidden}:host .connector-container .table-section .table-container{overflow:auto}:host .connector-container .flex{flex:1}:host .connector-container .input-container{height:auto}:host .connector-container .section-container{background-color:#fff}:host .mat-toolbar{background:transparent;color:#000000de!important}:host .mat-mdc-slide-toggle{margin:0 8px}:host .status{text-align:center;border-radius:16px;font-weight:500;width:fit-content;padding:5px 15px}:host .status-sync{background:#1980380f;color:#198038}:host .status-unsync{background:#cb25300f;color:#cb2530}:host mat-row{cursor:pointer}:host .dot{height:12px;width:12px;background-color:#bbb;border-radius:50%;display:inline-block}:host .hasErrors{background-color:#cb2530}:host .noErrors{background-color:#198038}:host ::ng-deep .connector-container .mat-mdc-tab-group,:host ::ng-deep .connector-container .mat-mdc-tab-body-wrapper{height:100%}:host ::ng-deep .connector-container .mat-mdc-tab-body.mat-mdc-tab-body-active{position:absolute}:host ::ng-deep .connector-container .tb-form-row .fixed-title-width{min-width:120px;width:30%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .connector-container .tb-add-new{display:flex;z-index:999;pointer-events:none;background-color:#fff}:host ::ng-deep .connector-container .tb-add-new button.connector{height:auto;padding-right:12px;font-size:20px;border-style:dashed;border-width:2px;border-radius:8px;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;color:#00000061}\n']}]}],ctorParameters:()=>[{type:ot.Store},{type:me.FormBuilder},{type:Y.TranslateService},{type:X.AttributeService},{type:X.DialogService},{type:Je.MatDialog},{type:X.TelemetryWebsocketService},{type:t.NgZone},{type:X.UtilsService},{type:va},{type:t.ChangeDetectorRef}],propDecorators:{ctx:[{type:a}],device:[{type:a}],nameInput:[{type:o,args:["nameInput"]}],sort:[{type:o,args:[g,{static:!1}]}]}});class qo{constructor(e){this.deviceService=e}download(e){e&&e.stopPropagation(),this.deviceId&&this.deviceService.downloadGatewayDockerComposeFile(this.deviceId).subscribe((()=>{}))}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:qo,deps:[{token:X.DeviceService}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:qo,selector:"tb-gateway-command",inputs:{deviceId:"deviceId"},ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
{{ \'gateway.docker-label\' | translate }}
\n
\n
device.connectivity.install-necessary-client-tools
\n \n
\n\n
\n
gateway.download-configuration-file
\n
\n
gateway.download-docker-compose
\n \n
\n
\n\n
\n
gateway.launch-gateway
\n
gateway.launch-docker-compose
\n \n
\n
\n',styles:['@charset "UTF-8";:host .tb-commands-hint{color:inherit;font-weight:400;flex:1}:host ::ng-deep .tb-markdown-view .start-code .code-wrapper{padding:0}:host ::ng-deep .tb-markdown-view .start-code .code-wrapper pre[class*=language-]{margin:0;background:#f3f6fa;border-color:#305680;padding-right:38px;overflow:scroll;padding-bottom:4px;min-height:42px;scrollbar-width:thin}:host ::ng-deep .tb-markdown-view .start-code .code-wrapper pre[class*=language-]::-webkit-scrollbar{width:4px;height:4px}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn{right:-2px}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn p{color:#305680}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn p,:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn div{background-color:#f3f6fa}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn div img{display:none}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn div:after{content:"";position:initial;display:block;width:18px;height:18px;background:#305680;mask-image:url(/assets/copy-code-icon.svg);-webkit-mask-image:url(/assets/copy-code-icon.svg);mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}\n'],dependencies:[{kind:"component",type:wt.TbMarkdownComponent,selector:"tb-markdown",inputs:["data","context","additionalCompileModules","markdownClass","containerClass","style","applyDefaultMarkdownStyle","additionalStyles","lineNumbers","fallbackToPlainMarkdown","usePlainMarkdown"],outputs:["ready"]},{kind:"component",type:be.MatAnchor,selector:"a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]",exportAs:["matButton","matAnchor"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:Je.MatDialogContent,selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("DeviceGatewayCommandComponent",qo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:qo,decorators:[{type:n,args:[{selector:"tb-gateway-command",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n
\n
{{ \'gateway.docker-label\' | translate }}
\n
\n
device.connectivity.install-necessary-client-tools
\n \n
\n\n
\n
gateway.download-configuration-file
\n
\n
gateway.download-docker-compose
\n \n
\n
\n\n
\n
gateway.launch-gateway
\n
gateway.launch-docker-compose
\n \n
\n
\n',styles:['@charset "UTF-8";:host .tb-commands-hint{color:inherit;font-weight:400;flex:1}:host ::ng-deep .tb-markdown-view .start-code .code-wrapper{padding:0}:host ::ng-deep .tb-markdown-view .start-code .code-wrapper pre[class*=language-]{margin:0;background:#f3f6fa;border-color:#305680;padding-right:38px;overflow:scroll;padding-bottom:4px;min-height:42px;scrollbar-width:thin}:host ::ng-deep .tb-markdown-view .start-code .code-wrapper pre[class*=language-]::-webkit-scrollbar{width:4px;height:4px}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn{right:-2px}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn p{color:#305680}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn p,:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn div{background-color:#f3f6fa}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn div img{display:none}:host ::ng-deep .tb-markdown-view .start-code button.clipboard-btn div:after{content:"";position:initial;display:block;width:18px;height:18px;background:#305680;mask-image:url(/assets/copy-code-icon.svg);-webkit-mask-image:url(/assets/copy-code-icon.svg);mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}\n']}]}],ctorParameters:()=>[{type:X.DeviceService}],propDecorators:{deviceId:[{type:a}]}});class Do{constructor(e,t,n,a){this.fb=e,this.deviceService=t,this.cd=n,this.dialog=a,this.dialogMode=!1,this.initialCredentialsUpdated=new i,this.StorageTypes=At,this.storageTypes=Object.values(At),this.storageTypesTranslationMap=Rt,this.logSavingPeriods=Ot,this.localLogsConfigs=Object.keys(Pt),this.localLogsConfigTranslateMap=Gt,this.securityTypes=Bt,this.gatewayLogLevel=Object.values(Mt),this.destroy$=new Se,this.initBasicFormGroup(),this.observeFormChanges(),this.basicFormGroup.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){this.basicFormGroup.patchValue(e,{emitEvent:!1}),this.checkAndFetchCredentials(e?.thingsboard?.security??{}),e?.grpc&&this.toggleRpcFields(e.grpc.enabled);(e?.thingsboard?.statistics?.commands??[]).forEach((e=>this.addCommand(e,!1)))}validate(){return this.basicFormGroup.valid?null:{basicFormGroup:{valid:!1}}}atLeastOneRequired(e,t=null){return n=>{t||(t=Object.keys(n.controls));return n?.controls&&t.some((t=>!e(n.controls[t])))?null:{atLeastOne:!0}}}toggleRpcFields(e){const t=this.basicFormGroup.get("grpc");e?(t.get("serverPort").enable({emitEvent:!1}),t.get("keepAliveTimeMs").enable({emitEvent:!1}),t.get("keepAliveTimeoutMs").enable({emitEvent:!1}),t.get("keepalivePermitWithoutCalls").enable({emitEvent:!1}),t.get("maxPingsWithoutData").enable({emitEvent:!1}),t.get("minTimeBetweenPingsMs").enable({emitEvent:!1}),t.get("minPingIntervalWithoutDataMs").enable({emitEvent:!1})):(t.get("serverPort").disable({emitEvent:!1}),t.get("keepAliveTimeMs").disable({emitEvent:!1}),t.get("keepAliveTimeoutMs").disable({emitEvent:!1}),t.get("keepalivePermitWithoutCalls").disable({emitEvent:!1}),t.get("maxPingsWithoutData").disable({emitEvent:!1}),t.get("minTimeBetweenPingsMs").disable({emitEvent:!1}),t.get("minPingIntervalWithoutDataMs").disable({emitEvent:!1}))}addLocalLogConfig(e,t){const n=this.basicFormGroup.get("logs.local"),a=this.fb.group({logLevel:[t.logLevel||Mt.INFO,[ue.required]],filePath:[t.filePath||"./logs",[ue.required]],backupCount:[t.backupCount||7,[ue.required,ue.min(0)]],savingTime:[t.savingTime||3,[ue.required,ue.min(0)]],savingPeriod:[t.savingPeriod||Dt.days,[ue.required]]});n.addControl(e,a)}getLogFormGroup(e){return this.basicFormGroup.get(`logs.local.${e}`)}commandFormArray(){return this.basicFormGroup.get("thingsboard.statistics.commands")}removeCommandControl(e,t){""!==t.pointerType&&(this.commandFormArray().removeAt(e),this.basicFormGroup.markAsDirty())}removeAllSecurityValidators(){const e=this.basicFormGroup.get("thingsboard.security");e.clearValidators();for(const t in e.controls)"type"!==t&&(e.controls[t].clearValidators(),e.controls[t].setErrors(null),e.controls[t].updateValueAndValidity())}removeAllStorageValidators(){const e=this.basicFormGroup.get("storage");for(const t in e.controls)"type"!==t&&(e.controls[t].clearValidators(),e.controls[t].setErrors(null),e.controls[t].updateValueAndValidity())}openConfigurationConfirmDialog(){this.deviceService.getDevice(this.device.id).pipe(Ne(this.destroy$)).subscribe((e=>{this.dialog.open(Pa,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{gatewayName:e.name}}).afterClosed().pipe(Oe(1)).subscribe((e=>{e||this.basicFormGroup.get("thingsboard.remoteConfiguration").setValue(!0,{emitEvent:!1})}))}))}addCommand(e,t=!0){const{attributeOnGateway:n=null,command:a=null,timeout:o=null}=e||{},i=this.fb.group({attributeOnGateway:[n,[ue.required,ue.pattern(/^[^.\s]+$/)]],command:[a,[ue.required,ue.pattern(/^(?=\S).*\S$/)]],timeout:[o,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/),ue.pattern(/^[^.\s]+$/)]]});this.commandFormArray().push(i,{emitEvent:t})}initBasicFormGroup(){this.basicFormGroup=this.fb.group({thingsboard:this.initThingsboardFormGroup(),storage:this.initStorageFormGroup(),grpc:this.initGrpcFormGroup(),connectors:this.fb.array([]),logs:this.initLogsFormGroup()})}initThingsboardFormGroup(){return this.fb.group({host:[window.location.hostname,[ue.required,ue.pattern(/^[^\s]+$/)]],port:[1883,[ue.required,ue.min(1),ue.max(65535),ue.pattern(/^-?[0-9]+$/)]],remoteShell:[!1],remoteConfiguration:[!0],checkConnectorsConfigurationInSeconds:[60,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],statistics:this.fb.group({enable:[!0],statsSendPeriodInSeconds:[3600,[ue.required,ue.min(60),ue.pattern(/^-?[0-9]+$/)]],commands:this.fb.array([])}),maxPayloadSizeBytes:[8196,[ue.required,ue.min(100),ue.pattern(/^-?[0-9]+$/)]],minPackSendDelayMS:[50,[ue.required,ue.min(10),ue.pattern(/^-?[0-9]+$/)]],minPackSizeToSend:[500,[ue.required,ue.min(100),ue.pattern(/^-?[0-9]+$/)]],handleDeviceRenaming:[!0],checkingDeviceActivity:this.initCheckingDeviceActivityFormGroup(),security:this.initSecurityFormGroup(),qos:[1,[ue.required,ue.min(0),ue.max(1),ue.pattern(/^[^.\s]+$/)]]})}initStorageFormGroup(){return this.fb.group({type:[At.MEMORY,[ue.required]],read_records_count:[100,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],max_records_count:[1e5,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],data_folder_path:["./data/",[ue.required]],max_file_count:[10,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]],max_read_records_count:[10,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]],max_records_per_file:[1e4,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]],data_file_path:["./data/data.db",[ue.required]],messages_ttl_check_in_hours:[1,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]],messages_ttl_in_days:[7,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]]})}initGrpcFormGroup(){return this.fb.group({enabled:[!1],serverPort:[9595,[ue.required,ue.min(1),ue.max(65535),ue.pattern(/^-?[0-9]+$/)]],keepAliveTimeMs:[1e4,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],keepAliveTimeoutMs:[5e3,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],keepalivePermitWithoutCalls:[!0],maxPingsWithoutData:[0,[ue.required,ue.min(0),ue.pattern(/^-?[0-9]+$/)]],minTimeBetweenPingsMs:[1e4,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]],minPingIntervalWithoutDataMs:[5e3,[ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]]})}initLogsFormGroup(){return this.fb.group({dateFormat:["%Y-%m-%d %H:%M:%S",[ue.required,ue.pattern(/^[^\s].*[^\s]$/)]],logFormat:["%(asctime)s - |%(levelname)s| - [%(filename)s] - %(module)s - %(funcName)s - %(lineno)d - %(message)s",[ue.required,ue.pattern(/^[^\s].*[^\s]$/)]],type:["remote",[ue.required]],remote:this.fb.group({enabled:[!1],logLevel:[Mt.INFO,[ue.required]]}),local:this.fb.group({})})}initCheckingDeviceActivityFormGroup(){return this.fb.group({checkDeviceInactivity:[!1],inactivityTimeoutSeconds:[200,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]],inactivityCheckPeriodSeconds:[500,[ue.min(1),ue.pattern(/^-?[0-9]+$/)]]})}initSecurityFormGroup(){return this.fb.group({type:[Vt.ACCESS_TOKEN,[ue.required]],accessToken:[null,[ue.required,ue.pattern(/^[^.\s]+$/)]],clientId:[null,[ue.pattern(/^[^.\s]+$/)]],username:[null,[ue.pattern(/^[^.\s]+$/)]],password:[null,[ue.pattern(/^[^.\s]+$/)]],caCert:[null],cert:[null],privateKey:[null]})}observeFormChanges(){this.observeSecurityPasswordChanges(),this.observeRemoteConfigurationChanges(),this.observeDeviceActivityChanges(),this.observeSecurityTypeChanges(),this.observeStorageTypeChanges()}observeSecurityPasswordChanges(){const e=this.basicFormGroup.get("thingsboard.security.username");this.basicFormGroup.get("thingsboard.security.password").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{t&&""!==t?e.setValidators([ue.required]):e.clearValidators(),e.updateValueAndValidity({emitEvent:!1})}))}observeRemoteConfigurationChanges(){this.basicFormGroup.get("thingsboard.remoteConfiguration").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{e||this.openConfigurationConfirmDialog()})),this.logSelector=this.fb.control(Pt.service);for(const e of Object.keys(Pt))this.addLocalLogConfig(e,{})}observeDeviceActivityChanges(){const e=this.basicFormGroup.get("thingsboard.checkingDeviceActivity");e.get("checkDeviceInactivity").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{e.updateValueAndValidity();const n=[ue.min(1),ue.required,ue.pattern(/^-?[0-9]+$/)];t?(e.get("inactivityTimeoutSeconds").setValidators(n),e.get("inactivityCheckPeriodSeconds").setValidators(n)):(e.get("inactivityTimeoutSeconds").clearValidators(),e.get("inactivityCheckPeriodSeconds").clearValidators()),e.get("inactivityTimeoutSeconds").updateValueAndValidity({emitEvent:!1}),e.get("inactivityCheckPeriodSeconds").updateValueAndValidity({emitEvent:!1})})),this.basicFormGroup.get("grpc.enabled").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.toggleRpcFields(e)}))}observeSecurityTypeChanges(){const e=this.basicFormGroup.get("thingsboard.security");e.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{switch(this.removeAllSecurityValidators(),t){case Vt.ACCESS_TOKEN:this.addAccessTokenValidators(e);break;case Vt.TLS_PRIVATE_KEY:this.addTlsPrivateKeyValidators(e);break;case Vt.TLS_ACCESS_TOKEN:this.addTlsAccessTokenValidators(e);break;case Vt.USERNAME_PASSWORD:e.addValidators([this.atLeastOneRequired(ue.required,["clientId","username"])])}e.updateValueAndValidity()})),["caCert","privateKey","cert"].forEach((t=>{e.get(t).valueChanges.pipe(Ne(this.destroy$)).subscribe((()=>this.cd.detectChanges()))}))}observeStorageTypeChanges(){const e=this.basicFormGroup.get("storage");e.get("type").valueChanges.pipe(Ne(this.destroy$)).subscribe((t=>{switch(this.removeAllStorageValidators(),t){case At.MEMORY:this.addMemoryStorageValidators(e);break;case At.FILE:this.addFileStorageValidators(e);break;case At.SQLITE:this.addSqliteStorageValidators(e)}}))}addAccessTokenValidators(e){e.get("accessToken").addValidators([ue.required,ue.pattern(/^[^.\s]+$/)]),e.get("accessToken").updateValueAndValidity()}addTlsPrivateKeyValidators(e){["caCert","privateKey","cert"].forEach((t=>{e.get(t).addValidators([ue.required]),e.get(t).updateValueAndValidity()}))}addTlsAccessTokenValidators(e){this.addAccessTokenValidators(e),e.get("caCert").addValidators([ue.required]),e.get("caCert").updateValueAndValidity()}addMemoryStorageValidators(e){e.get("read_records_count").addValidators([ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]),e.get("max_records_count").addValidators([ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]),e.get("read_records_count").updateValueAndValidity({emitEvent:!1}),e.get("max_records_count").updateValueAndValidity({emitEvent:!1})}addFileStorageValidators(e){["max_file_count","max_read_records_count","max_records_per_file"].forEach((t=>{e.get(t).addValidators([ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]),e.get(t).updateValueAndValidity({emitEvent:!1})}))}addSqliteStorageValidators(e){["messages_ttl_check_in_hours","messages_ttl_in_days"].forEach((t=>{e.get(t).addValidators([ue.required,ue.min(1),ue.pattern(/^-?[0-9]+$/)]),e.get(t).updateValueAndValidity({emitEvent:!1})}))}checkAndFetchCredentials(e){e.type!==Vt.TLS_PRIVATE_KEY&&this.deviceService.getDeviceCredentials(this.device.id).pipe(Ne(this.destroy$)).subscribe((t=>{this.initialCredentialsUpdated.emit(t),this.updateSecurityType(e,t),this.updateCredentials(t,e)}))}updateSecurityType(e,t){const n=t.credentialsType===U.ACCESS_TOKEN||e.type===Vt.TLS_ACCESS_TOKEN?e.type===Vt.TLS_ACCESS_TOKEN?Vt.TLS_ACCESS_TOKEN:Vt.ACCESS_TOKEN:t.credentialsType===U.MQTT_BASIC?Vt.USERNAME_PASSWORD:null;n&&this.basicFormGroup.get("thingsboard.security.type").setValue(n,{emitEvent:!1})}updateCredentials(e,t){switch(e.credentialsType){case U.ACCESS_TOKEN:this.updateAccessTokenCredentials(e,t);break;case U.MQTT_BASIC:this.updateMqttBasicCredentials(e);case U.X509_CERTIFICATE:}}updateAccessTokenCredentials(e,t){this.basicFormGroup.get("thingsboard.security.accessToken").setValue(e.credentialsId,{emitEvent:!1}),t.type===Vt.TLS_ACCESS_TOKEN&&this.basicFormGroup.get("thingsboard.security.caCert").setValue(t.caCert,{emitEvent:!1})}updateMqttBasicCredentials(e){const t=JSON.parse(e.credentialsValue);this.basicFormGroup.get("thingsboard.security.clientId").setValue(t.clientId,{emitEvent:!1}),this.basicFormGroup.get("thingsboard.security.username").setValue(t.userName,{emitEvent:!1}),this.basicFormGroup.get("thingsboard.security.password").setValue(t.password,{emitEvent:!1})}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Do,deps:[{token:me.FormBuilder},{token:X.DeviceService},{token:t.ChangeDetectorRef},{token:Je.MatDialog}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Do,isStandalone:!0,selector:"tb-gateway-basic-configuration",inputs:{device:"device",dialogMode:"dialogMode"},outputs:{initialCredentialsUpdated:"initialCredentialsUpdated"},providers:[{provide:ge,useExisting:m((()=>Do)),multi:!0},{provide:fe,useExisting:m((()=>Do)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n
\n
\n
\n \n {{ \'gateway.remote-configuration\' | translate }}\n \n
\n
\n \n {{ \'gateway.remote-shell\' | translate }}\n \n
\n
\n \n gateway.thingsboard-host\n \n info_outlined\n \n \n {{ \'gateway.thingsboard-host-required\' | translate }}\n \n \n \n gateway.thingsboard-port\n \n \n {{ \'gateway.thingsboard-port-required\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-min\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-max\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
security.security
\n \n \n {{ securityType.value | translate }}\n \n \n \n security.access-token\n \n \n {{ \'security.access-token-required\' | translate }}\n \n \n \n info_outlined\n \n \n
\n
\n \n security.clientId\n \n \n {{ \'security.clientId-required\' | translate }}\n \n \n \n info_outlined\n \n \n \n security.username\n \n \n {{ \'security.username-required\' | translate }}\n \n \n \n info_outlined\n \n \n
\n \n gateway.password\n \n \n \n info_outlined\n \n \n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n gateway.logs.date-format\n \n \n {{ \'gateway.logs.date-format-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.logs.log-format\n \n \n {{ \'gateway.logs.log-format-required\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
gateway.logs.remote
\n
\n \n {{ \'gateway.logs.remote-logs\' | translate }}\n \n
\n \n gateway.logs.level\n \n {{ logLevel }}\n \n \n
\n
\n
gateway.logs.local
\n \n {{ localLogsConfigTranslateMap.get(logConfig) }}\n \n \n
\n \n gateway.logs.level\n \n {{ logLevel }}\n \n \n \n gateway.logs.file-path\n \n \n {{ \'gateway.logs.file-path-required\' | translate }}\n \n \n
\n
\n
\n \n gateway.logs.saving-period\n \n \n {{ \'gateway.logs.saving-period-required\' | translate }}\n \n \n {{ \'gateway.logs.saving-period-min\' | translate }}\n \n \n \n \n \n {{ period.value | translate }}\n \n \n \n
\n \n gateway.logs.backup-count\n \n \n {{ \'gateway.logs.backup-count-required\' | translate }}\n \n \n {{ \'gateway.logs.backup-count-min\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
gateway.storage
\n
gateway.hints.storage
\n \n \n {{ storageTypesTranslationMap.get(storageType) | translate }}\n \n \n
{{ \'gateway.hints.\' + basicFormGroup.get(\'storage.type\').value | translate }}
\n \n
\n \n gateway.storage-read-record-count\n \n \n {{ \'gateway.storage-read-record-count-required\' | translate }}\n \n \n {{ \'gateway.storage-read-record-count-min\' | translate }}\n \n \n {{ \'gateway.storage-read-record-count-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.storage-max-records\n \n \n {{ \'gateway.storage-max-records-required\' | translate }}\n \n \n {{ \'gateway.storage-max-records-min\' | translate }}\n \n \n {{ \'gateway.storage-max-records-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n \n gateway.storage-data-folder-path\n \n \n {{ \'gateway.storage-data-folder-path-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.storage-max-files\n \n \n {{ \'gateway.storage-max-files-required\' | translate }}\n \n \n {{ \'gateway.storage-max-files-min\' | translate }}\n \n \n {{ \'gateway.storage-max-files-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n \n gateway.storage-max-read-record-count\n \n \n {{ \'gateway.storage-max-read-record-count-required\' | translate }}\n \n \n {{ \'gateway.storage-max-read-record-count-min\' | translate }}\n \n \n {{ \'gateway.storage-max-read-record-count-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.storage-max-file-records\n \n \n {{ \'gateway.storage-max-records-required\' | translate }}\n \n \n {{ \'gateway.storage-max-records-min\' | translate }}\n \n \n {{ \'gateway.storage-max-records-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n \n gateway.storage-path\n \n \n {{ \'gateway.storage-path-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.messages-ttl-check-in-hours\n \n \n {{ \'gateway.messages-ttl-check-in-hours-required\' | translate }}\n \n \n {{ \'gateway.messages-ttl-check-in-hours-min\' | translate }}\n \n \n {{ \'gateway.messages-ttl-check-in-hours-pattern\' | translate }}\n \n info_outlined\n \n \n
\n \n gateway.messages-ttl-in-days\n \n \n {{ \'gateway.messages-ttl-in-days-required\' | translate }}\n \n \n {{ \'gateway.messages-ttl-in-days-min\' | translate }}\n \n \n {{ \'gateway.messages-ttl-in-days-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n {{ \'gateway.grpc\' | translate }}\n \n
\n \n {{ \'gateway.permit-without-calls\' | translate }}\n \n
\n
\n
\n \n gateway.server-port\n \n info_outlined\n \n \n {{ \'gateway.thingsboard-port-required\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-min\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-max\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-pattern\' | translate }}\n \n \n \n gateway.grpc-keep-alive-timeout\n \n info_outlined\n \n \n {{ \'gateway.grpc-keep-alive-timeout-required\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-timeout-min\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-timeout-pattern\' | translate }}\n \n \n
\n
\n \n gateway.grpc-keep-alive\n \n info_outlined\n \n \n {{ \'gateway.grpc-keep-alive-required\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-min\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-pattern\' | translate }}\n \n \n \n gateway.grpc-min-time-between-pings\n \n info_outlined\n \n \n {{ \'gateway.grpc-min-time-between-pings-required\' | translate }}\n \n \n {{ \'gateway.grpc-min-time-between-pings-min\' | translate }}\n \n \n {{ \'gateway.grpc-min-time-between-pings-pattern\' | translate }}\n \n \n
\n
\n \n gateway.grpc-max-pings-without-data\n \n info_outlined\n \n \n {{ \'gateway.grpc-max-pings-without-data-required\' | translate }}\n \n \n {{ \'gateway.grpc-max-pings-without-data-min\' | translate }}\n \n \n {{ \'gateway.grpc-max-pings-without-data-pattern\' | translate }}\n \n \n \n gateway.grpc-min-ping-interval-without-data\n \n info_outlined\n \n \n {{ \'gateway.grpc-min-ping-interval-without-data-required\' | translate }}\n \n \n {{ \'gateway.grpc-min-ping-interval-without-data-min\' | translate }}\n \n \n {{ \'gateway.grpc-min-ping-interval-without-data-pattern\' | translate }}\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n {{ \'gateway.statistics.statistics\' | translate }}\n \n \n gateway.statistics.send-period\n \n \n {{ \'gateway.statistics.send-period-required\' | translate }}\n \n \n {{ \'gateway.statistics.send-period-min\' | translate }}\n \n \n {{ \'gateway.statistics.send-period-pattern\' | translate }}\n \n \n
\n
\n
gateway.statistics.commands
\n
gateway.hints.commands
\n \n
\n
\n
\n \n gateway.statistics.attribute-name\n \n \n {{ \'gateway.statistics.attribute-name-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.statistics.timeout\n \n \n {{ \'gateway.statistics.timeout-required\' | translate }}\n \n \n {{ \'gateway.statistics.timeout-min\' | translate }}\n \n \n {{ \'gateway.statistics.timeout-pattern\' | translate }}\n \n info_outlined\n \n \n
\n \n gateway.statistics.command\n \n \n {{ \'gateway.statistics.command-required\' | translate }}\n \n \n {{ \'gateway.statistics.command-pattern\' | translate }}\n \n info_outlined\n \n \n
\n \n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n {{ \'gateway.checking-device-activity\' | translate }}\n \n
\n
\n \n gateway.inactivity-timeout-seconds\n \n \n {{ \'gateway.inactivity-timeout-seconds-required\' | translate }}\n \n \n {{ \'gateway.inactivity-timeout-seconds-min\' | translate }}\n \n \n {{ \'gateway.inactivity-timeout-seconds-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.inactivity-check-period-seconds\n \n \n {{ \'gateway.inactivity-check-period-seconds-required\' | translate }}\n \n \n {{ \'gateway.inactivity-check-period-seconds-min\' | translate }}\n \n \n {{ \'gateway.inactivity-check-period-seconds-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
gateway.advanced
\n
\n \n gateway.min-pack-send-delay\n \n \n {{ \'gateway.min-pack-send-delay-required\' | translate }}\n \n \n {{ \'gateway.min-pack-send-delay-min\' | translate }}\n \n \n {{ \'gateway.min-pack-send-delay-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.mqtt-qos\n \n \n {{ \'gateway.mqtt-qos-required\' | translate }}\n \n \n {{ \'gateway.mqtt-qos-range\' | translate }}\n \n \n {{ \'gateway.mqtt-qos-range\' | translate }}\n \n info_outlined\n \n \n
\n
\n \n gateway.statistics.check-connectors-configuration\n \n \n {{ \'gateway.statistics.check-connectors-configuration-required\' | translate }}\n \n \n {{ \'gateway.statistics.check-connectors-configuration-min\' | translate }}\n \n \n {{ \'gateway.statistics.check-connectors-configuration-pattern\' | translate }}\n \n \n \n gateway.statistics.max-payload-size-bytes\n \n \n {{ \'gateway.statistics.max-payload-size-bytes-required\' | translate }}\n \n \n {{ \'gateway.statistics.max-payload-size-bytes-min\' | translate }}\n \n \n {{ \'gateway.statistics.max-payload-size-bytes-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n \n gateway.statistics.min-pack-size-to-send\n \n \n {{ \'gateway.statistics.min-pack-size-to-send-required\' | translate }}\n \n \n {{ \'gateway.statistics.min-pack-size-to-send-min\' | translate }}\n \n \n {{ \'gateway.statistics.min-pack-size-to-send-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:grid;grid-template-rows:min-content minmax(auto,1fr) min-content}:host .configuration-block{display:flex;flex-direction:column;gap:16px;max-height:70vh}:host .dialog-mode .configuration-block{max-height:60vh}:host .mat-toolbar{grid-row:1;background:transparent;color:#000000de!important}:host .tab-group-block{min-width:0;height:100%;min-height:0;grid-row:2}:host .toggle-group{margin-right:auto}:host .first-capital{text-transform:capitalize}:host textarea{resize:none}:host .saving-period{flex:1}:host .statistics-container{width:100%}:host .statistics-container .command-container{width:100%}:host mat-form-field mat-error{display:none!important}:host mat-form-field mat-error:first-child{display:block!important}:host ::ng-deep .pointer-event{pointer-events:all}:host ::ng-deep .toggle-group span{padding:0 25px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{color:#e0e0e0}:host ::ng-deep .mat-mdc-form-field-icon-suffix:hover{color:#9e9e9e}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"directive",type:_.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{kind:"directive",type:_.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{kind:"pipe",type:_.KeyValuePipe,name:"keyvalue"},{kind:"ngmodule",type:D},{kind:"component",type:Ct.TbErrorComponent,selector:"tb-error",inputs:["noMargin","error"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"directive",type:xe.MatInput,selector:"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",inputs:["disabled","id","placeholder","name","required","type","errorStateMatcher","aria-describedby","value","readonly"],exportAs:["matInput"]},{kind:"component",type:ve.MatFormField,selector:"mat-form-field",inputs:["hideRequiredMarker","color","floatLabel","appearance","subscriptSizing","hintLabel"],exportAs:["matFormField"]},{kind:"directive",type:ve.MatLabel,selector:"mat-label"},{kind:"directive",type:ve.MatError,selector:"mat-error, [matError]",inputs:["id"]},{kind:"directive",type:ve.MatSuffix,selector:"[matSuffix], [matIconSuffix], [matTextSuffix]",inputs:["matTextSuffix"]},{kind:"component",type:we.MatSelect,selector:"mat-select",inputs:["aria-describedby","panelClass","disabled","disableRipple","tabIndex","hideSingleSelectionIndicator","placeholder","required","multiple","disableOptionCentering","compareWith","value","aria-label","aria-labelledby","errorStateMatcher","typeaheadDebounceInterval","sortComparator","id","panelWidth"],outputs:["openedChange","opened","closed","selectionChange","valueChange"],exportAs:["matSelect"]},{kind:"component",type:Ce.MatOption,selector:"mat-option",inputs:["value","id","disabled"],outputs:["onSelectionChange"],exportAs:["matOption"]},{kind:"directive",type:ze.MatTooltip,selector:"[matTooltip]",inputs:["matTooltipPosition","matTooltipPositionAtOrigin","matTooltipDisabled","matTooltipShowDelay","matTooltipHideDelay","matTooltipTouchGestures","matTooltip","matTooltipClass"],exportAs:["matTooltip"]},{kind:"directive",type:W.MatTabContent,selector:"[matTabContent]"},{kind:"component",type:W.MatTab,selector:"mat-tab",inputs:["disabled","label","aria-label","aria-labelledby","labelClass","bodyClass"],exportAs:["matTab"]},{kind:"component",type:W.MatTabGroup,selector:"mat-tab-group",inputs:["color","fitInkBarToContent","mat-stretch-tabs","dynamicHeight","selectedIndex","headerPosition","animationDuration","contentTabIndex","disablePagination","disableRipple","preserveContent","backgroundColor","aria-label","aria-labelledby"],outputs:["selectedIndexChange","focusChange","animationDone","selectedTabChange"],exportAs:["matTabGroup"]},{kind:"component",type:et.MatSlideToggle,selector:"mat-slide-toggle",inputs:["name","id","labelPosition","aria-label","aria-labelledby","aria-describedby","required","color","disabled","disableRipple","tabIndex","checked","hideIcon","disabledInteractive"],outputs:["change","toggleChange"],exportAs:["matSlideToggle"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:j.DefaultFlexDirective,selector:" [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]",inputs:["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"]},{kind:"directive",type:me.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:me.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.MinValidator,selector:"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",inputs:["min"]},{kind:"directive",type:me.MaxValidator,selector:"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",inputs:["max"]},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:me.FormGroupName,selector:"[formGroupName]",inputs:["formGroupName"]},{kind:"directive",type:me.FormArrayName,selector:"[formArrayName]",inputs:["formArrayName"]},{kind:"component",type:Tt.FileInputComponent,selector:"tb-file-input",inputs:["label","hint","accept","noFileText","inputId","allowedExtensions","dropLabel","maxSizeByte","contentConvertFunction","required","requiredAsError","disabled","existingFileName","readAsBinary","workFromFileObj","multipleFile"],outputs:["fileNameChanged"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"component",type:St.CopyButtonComponent,selector:"tb-copy-button",inputs:["copyText","disabled","mdiIcon","icon","tooltipText","tooltipPosition","style","color","miniButton"],outputs:["successCopied"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:ut.HintTooltipIconComponent,selector:"[tb-hint-tooltip-icon]",inputs:["tb-hint-tooltip-icon","tooltipPosition","hintIcon"]}]})}}e("GatewayBasicConfigurationComponent",Do),He([N()],Do.prototype,"dialogMode",void 0),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Do,decorators:[{type:n,args:[{selector:"tb-gateway-basic-configuration",standalone:!0,imports:[H,D],providers:[{provide:ge,useExisting:m((()=>Do)),multi:!0},{provide:fe,useExisting:m((()=>Do)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n \n \n
\n
\n
\n \n {{ \'gateway.remote-configuration\' | translate }}\n \n
\n
\n \n {{ \'gateway.remote-shell\' | translate }}\n \n
\n
\n \n gateway.thingsboard-host\n \n info_outlined\n \n \n {{ \'gateway.thingsboard-host-required\' | translate }}\n \n \n \n gateway.thingsboard-port\n \n \n {{ \'gateway.thingsboard-port-required\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-min\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-max\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
security.security
\n \n \n {{ securityType.value | translate }}\n \n \n \n security.access-token\n \n \n {{ \'security.access-token-required\' | translate }}\n \n \n \n info_outlined\n \n \n
\n
\n \n security.clientId\n \n \n {{ \'security.clientId-required\' | translate }}\n \n \n \n info_outlined\n \n \n \n security.username\n \n \n {{ \'security.username-required\' | translate }}\n \n \n \n info_outlined\n \n \n
\n \n gateway.password\n \n \n \n info_outlined\n \n \n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n gateway.logs.date-format\n \n \n {{ \'gateway.logs.date-format-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.logs.log-format\n \n \n {{ \'gateway.logs.log-format-required\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
gateway.logs.remote
\n
\n \n {{ \'gateway.logs.remote-logs\' | translate }}\n \n
\n \n gateway.logs.level\n \n {{ logLevel }}\n \n \n
\n
\n
gateway.logs.local
\n \n {{ localLogsConfigTranslateMap.get(logConfig) }}\n \n \n
\n \n gateway.logs.level\n \n {{ logLevel }}\n \n \n \n gateway.logs.file-path\n \n \n {{ \'gateway.logs.file-path-required\' | translate }}\n \n \n
\n
\n
\n \n gateway.logs.saving-period\n \n \n {{ \'gateway.logs.saving-period-required\' | translate }}\n \n \n {{ \'gateway.logs.saving-period-min\' | translate }}\n \n \n \n \n \n {{ period.value | translate }}\n \n \n \n
\n \n gateway.logs.backup-count\n \n \n {{ \'gateway.logs.backup-count-required\' | translate }}\n \n \n {{ \'gateway.logs.backup-count-min\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
gateway.storage
\n
gateway.hints.storage
\n \n \n {{ storageTypesTranslationMap.get(storageType) | translate }}\n \n \n
{{ \'gateway.hints.\' + basicFormGroup.get(\'storage.type\').value | translate }}
\n \n
\n \n gateway.storage-read-record-count\n \n \n {{ \'gateway.storage-read-record-count-required\' | translate }}\n \n \n {{ \'gateway.storage-read-record-count-min\' | translate }}\n \n \n {{ \'gateway.storage-read-record-count-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.storage-max-records\n \n \n {{ \'gateway.storage-max-records-required\' | translate }}\n \n \n {{ \'gateway.storage-max-records-min\' | translate }}\n \n \n {{ \'gateway.storage-max-records-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n \n gateway.storage-data-folder-path\n \n \n {{ \'gateway.storage-data-folder-path-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.storage-max-files\n \n \n {{ \'gateway.storage-max-files-required\' | translate }}\n \n \n {{ \'gateway.storage-max-files-min\' | translate }}\n \n \n {{ \'gateway.storage-max-files-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n \n gateway.storage-max-read-record-count\n \n \n {{ \'gateway.storage-max-read-record-count-required\' | translate }}\n \n \n {{ \'gateway.storage-max-read-record-count-min\' | translate }}\n \n \n {{ \'gateway.storage-max-read-record-count-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.storage-max-file-records\n \n \n {{ \'gateway.storage-max-records-required\' | translate }}\n \n \n {{ \'gateway.storage-max-records-min\' | translate }}\n \n \n {{ \'gateway.storage-max-records-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n \n gateway.storage-path\n \n \n {{ \'gateway.storage-path-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.messages-ttl-check-in-hours\n \n \n {{ \'gateway.messages-ttl-check-in-hours-required\' | translate }}\n \n \n {{ \'gateway.messages-ttl-check-in-hours-min\' | translate }}\n \n \n {{ \'gateway.messages-ttl-check-in-hours-pattern\' | translate }}\n \n info_outlined\n \n \n
\n \n gateway.messages-ttl-in-days\n \n \n {{ \'gateway.messages-ttl-in-days-required\' | translate }}\n \n \n {{ \'gateway.messages-ttl-in-days-min\' | translate }}\n \n \n {{ \'gateway.messages-ttl-in-days-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n {{ \'gateway.grpc\' | translate }}\n \n
\n \n {{ \'gateway.permit-without-calls\' | translate }}\n \n
\n
\n
\n \n gateway.server-port\n \n info_outlined\n \n \n {{ \'gateway.thingsboard-port-required\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-min\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-max\' | translate }}\n \n \n {{ \'gateway.thingsboard-port-pattern\' | translate }}\n \n \n \n gateway.grpc-keep-alive-timeout\n \n info_outlined\n \n \n {{ \'gateway.grpc-keep-alive-timeout-required\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-timeout-min\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-timeout-pattern\' | translate }}\n \n \n
\n
\n \n gateway.grpc-keep-alive\n \n info_outlined\n \n \n {{ \'gateway.grpc-keep-alive-required\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-min\' | translate }}\n \n \n {{ \'gateway.grpc-keep-alive-pattern\' | translate }}\n \n \n \n gateway.grpc-min-time-between-pings\n \n info_outlined\n \n \n {{ \'gateway.grpc-min-time-between-pings-required\' | translate }}\n \n \n {{ \'gateway.grpc-min-time-between-pings-min\' | translate }}\n \n \n {{ \'gateway.grpc-min-time-between-pings-pattern\' | translate }}\n \n \n
\n
\n \n gateway.grpc-max-pings-without-data\n \n info_outlined\n \n \n {{ \'gateway.grpc-max-pings-without-data-required\' | translate }}\n \n \n {{ \'gateway.grpc-max-pings-without-data-min\' | translate }}\n \n \n {{ \'gateway.grpc-max-pings-without-data-pattern\' | translate }}\n \n \n \n gateway.grpc-min-ping-interval-without-data\n \n info_outlined\n \n \n {{ \'gateway.grpc-min-ping-interval-without-data-required\' | translate }}\n \n \n {{ \'gateway.grpc-min-ping-interval-without-data-min\' | translate }}\n \n \n {{ \'gateway.grpc-min-ping-interval-without-data-pattern\' | translate }}\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n {{ \'gateway.statistics.statistics\' | translate }}\n \n \n gateway.statistics.send-period\n \n \n {{ \'gateway.statistics.send-period-required\' | translate }}\n \n \n {{ \'gateway.statistics.send-period-min\' | translate }}\n \n \n {{ \'gateway.statistics.send-period-pattern\' | translate }}\n \n \n
\n
\n
gateway.statistics.commands
\n
gateway.hints.commands
\n \n
\n
\n
\n \n gateway.statistics.attribute-name\n \n \n {{ \'gateway.statistics.attribute-name-required\' | translate }}\n \n info_outlined\n \n \n \n gateway.statistics.timeout\n \n \n {{ \'gateway.statistics.timeout-required\' | translate }}\n \n \n {{ \'gateway.statistics.timeout-min\' | translate }}\n \n \n {{ \'gateway.statistics.timeout-pattern\' | translate }}\n \n info_outlined\n \n \n
\n \n gateway.statistics.command\n \n \n {{ \'gateway.statistics.command-required\' | translate }}\n \n \n {{ \'gateway.statistics.command-pattern\' | translate }}\n \n info_outlined\n \n \n
\n \n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n {{ \'gateway.checking-device-activity\' | translate }}\n \n
\n
\n \n gateway.inactivity-timeout-seconds\n \n \n {{ \'gateway.inactivity-timeout-seconds-required\' | translate }}\n \n \n {{ \'gateway.inactivity-timeout-seconds-min\' | translate }}\n \n \n {{ \'gateway.inactivity-timeout-seconds-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.inactivity-check-period-seconds\n \n \n {{ \'gateway.inactivity-check-period-seconds-required\' | translate }}\n \n \n {{ \'gateway.inactivity-check-period-seconds-min\' | translate }}\n \n \n {{ \'gateway.inactivity-check-period-seconds-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
gateway.advanced
\n
\n \n gateway.min-pack-send-delay\n \n \n {{ \'gateway.min-pack-send-delay-required\' | translate }}\n \n \n {{ \'gateway.min-pack-send-delay-min\' | translate }}\n \n \n {{ \'gateway.min-pack-send-delay-pattern\' | translate }}\n \n info_outlined\n \n \n \n gateway.mqtt-qos\n \n \n {{ \'gateway.mqtt-qos-required\' | translate }}\n \n \n {{ \'gateway.mqtt-qos-range\' | translate }}\n \n \n {{ \'gateway.mqtt-qos-range\' | translate }}\n \n info_outlined\n \n \n
\n
\n \n gateway.statistics.check-connectors-configuration\n \n \n {{ \'gateway.statistics.check-connectors-configuration-required\' | translate }}\n \n \n {{ \'gateway.statistics.check-connectors-configuration-min\' | translate }}\n \n \n {{ \'gateway.statistics.check-connectors-configuration-pattern\' | translate }}\n \n \n \n gateway.statistics.max-payload-size-bytes\n \n \n {{ \'gateway.statistics.max-payload-size-bytes-required\' | translate }}\n \n \n {{ \'gateway.statistics.max-payload-size-bytes-min\' | translate }}\n \n \n {{ \'gateway.statistics.max-payload-size-bytes-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n \n gateway.statistics.min-pack-size-to-send\n \n \n {{ \'gateway.statistics.min-pack-size-to-send-required\' | translate }}\n \n \n {{ \'gateway.statistics.min-pack-size-to-send-min\' | translate }}\n \n \n {{ \'gateway.statistics.min-pack-size-to-send-pattern\' | translate }}\n \n info_outlined\n \n \n
\n
\n
\n
\n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:grid;grid-template-rows:min-content minmax(auto,1fr) min-content}:host .configuration-block{display:flex;flex-direction:column;gap:16px;max-height:70vh}:host .dialog-mode .configuration-block{max-height:60vh}:host .mat-toolbar{grid-row:1;background:transparent;color:#000000de!important}:host .tab-group-block{min-width:0;height:100%;min-height:0;grid-row:2}:host .toggle-group{margin-right:auto}:host .first-capital{text-transform:capitalize}:host textarea{resize:none}:host .saving-period{flex:1}:host .statistics-container{width:100%}:host .statistics-container .command-container{width:100%}:host mat-form-field mat-error{display:none!important}:host mat-form-field mat-error:first-child{display:block!important}:host ::ng-deep .pointer-event{pointer-events:all}:host ::ng-deep .toggle-group span{padding:0 25px}:host ::ng-deep .mat-mdc-form-field-icon-suffix{color:#e0e0e0}:host ::ng-deep .mat-mdc-form-field-icon-suffix:hover{color:#9e9e9e}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:X.DeviceService},{type:t.ChangeDetectorRef},{type:Je.MatDialog}],propDecorators:{device:[{type:a}],dialogMode:[{type:a}],initialCredentialsUpdated:[{type:l}]}});class Po{constructor(e){this.fb=e,this.destroy$=new Se,this.advancedFormControl=this.fb.control(""),this.advancedFormControl.valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{this.onChange(e),this.onTouched()}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}writeValue(e){this.advancedFormControl.reset(e,{emitEvent:!1})}validate(){return this.advancedFormControl.valid?null:{advancedFormControl:{valid:!1}}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Po,deps:[{token:me.FormBuilder}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Po,isStandalone:!0,selector:"tb-gateway-advanced-configuration",providers:[{provide:ge,useExisting:m((()=>Po)),multi:!0},{provide:fe,useExisting:m((()=>Po)),multi:!0}],ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n\n',styles:['@charset "UTF-8";:host .config-container{height:calc(100% - 60px);padding:8px}\n'],dependencies:[{kind:"ngmodule",type:H},{kind:"ngmodule",type:D},{kind:"component",type:vt.JsonObjectEditComponent,selector:"tb-json-object-edit",inputs:["label","disabled","fillHeight","editorStyle","sort","jsonRequired","readonly"]},{kind:"directive",type:j.DefaultLayoutDirective,selector:" [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]",inputs:["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.FormControlDirective,selector:"[formControl]",inputs:["formControl","disabled","ngModel"],outputs:["ngModelChange"],exportAs:["ngForm"]},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayAdvancedConfigurationComponent",Po),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Po,decorators:[{type:n,args:[{selector:"tb-gateway-advanced-configuration",standalone:!0,imports:[H,D],providers:[{provide:ge,useExisting:m((()=>Po)),multi:!0},{provide:fe,useExisting:m((()=>Po)),multi:!0}],template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n\n',styles:['@charset "UTF-8";:host .config-container{height:calc(100% - 60px);padding:8px}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder}]});class Go{constructor(e,t,n,a){this.fb=e,this.attributeService=t,this.deviceService=n,this.cd=a,this.ConfigurationModes=on,this.destroy$=new Se,this.gatewayConfigAttributeKeys=["general_configuration","grpc_configuration","logs_configuration","storage_configuration","RemoteLoggingLevel","mode"],this.gatewayConfigGroup=this.fb.group({basicConfig:[],advancedConfig:[],mode:[on.BASIC]}),this.observeAlignConfigs()}ngAfterViewInit(){this.fetchConfigAttribute(this.device)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}saveConfig(){const{mode:e,advancedConfig:t}=pe(this.removeEmpty(this.gatewayConfigGroup.value)),n={mode:e,...t};n.thingsboard.statistics.commands=Object.values(n.thingsboard.statistics.commands??[]);const a=this.generateAttributes(n);this.attributeService.saveEntityAttributes(this.device,L.SHARED_SCOPE,a).pipe(Ue((e=>this.updateCredentials(n.thingsboard.security))),Ne(this.destroy$)).subscribe((()=>{this.dialogRef?this.dialogRef.close():(this.gatewayConfigGroup.markAsPristine(),this.cd.detectChanges())}))}observeAlignConfigs(){this.gatewayConfigGroup.get("basicConfig").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{const t=this.gatewayConfigGroup.get("advancedConfig");ee(t.value,e)||this.gatewayConfigGroup.get("mode").value!==on.BASIC||t.patchValue(e,{emitEvent:!1})})),this.gatewayConfigGroup.get("advancedConfig").valueChanges.pipe(Ne(this.destroy$)).subscribe((e=>{const t=this.gatewayConfigGroup.get("basicConfig");ee(t.value,e)||this.gatewayConfigGroup.get("mode").value!==on.ADVANCED||t.patchValue(e,{emitEvent:!1})}))}generateAttributes(e){const t=[],n=(e,n)=>{t.push({key:e,value:n})},a=(e,t)=>{t={...t,ts:(new Date).getTime()},n(e,t)};return n("RemoteLoggingLevel",e.logs?.remote?.enabled?e.logs.remote.logLevel:Mt.NONE),delete e.connectors,n("logs_configuration",this.generateLogsFile(e.logs)),a("grpc_configuration",e.grpc),a("storage_configuration",e.storage),a("general_configuration",e.thingsboard),n("mode",e.mode),t}updateCredentials(e){let t={};switch(e.type){case Vt.USERNAME_PASSWORD:this.shouldUpdateCredentials(e)&&(t=this.generateMqttCredentials(e));break;case Vt.ACCESS_TOKEN:case Vt.TLS_ACCESS_TOKEN:this.shouldUpdateAccessToken(e)&&(t={credentialsType:U.ACCESS_TOKEN,credentialsId:e.accessToken})}return Object.keys(t).length?this.deviceService.saveDeviceCredentials({...this.initialCredentials,...t}):Ie(null)}shouldUpdateCredentials(e){if(this.initialCredentials.credentialsType!==U.MQTT_BASIC)return!0;const t=JSON.parse(this.initialCredentials.credentialsValue);return!(t.clientId===e.clientId&&t.userName===e.username&&t.password===e.password)}generateMqttCredentials(e){const{clientId:t,username:n,password:a}=e,o={...t&&{clientId:t},...n&&{userName:n},...a&&{password:a}};return{credentialsType:U.MQTT_BASIC,credentialsValue:JSON.stringify(o)}}shouldUpdateAccessToken(e){return this.initialCredentials.credentialsType!==U.ACCESS_TOKEN||this.initialCredentials.credentialsId!==e.accessToken}cancel(){this.dialogRef&&this.dialogRef.close()}removeEmpty(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>null!=t)).map((([e,t])=>[e,t===Object(t)?this.removeEmpty(t):t])))}generateLogsFile(e){const t={version:1,disable_existing_loggers:!1,formatters:{LogFormatter:{class:"logging.Formatter",format:e.logFormat,datefmt:e.dateFormat}},handlers:{consoleHandler:{class:"logging.StreamHandler",formatter:"LogFormatter",level:0,stream:"ext://sys.stdout"},databaseHandler:{class:"thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler",formatter:"LogFormatter",filename:"./logs/database.log",backupCount:1,encoding:"utf-8"}},loggers:{database:{handlers:["databaseHandler","consoleHandler"],level:"DEBUG",propagate:!1}},root:{level:"ERROR",handlers:["consoleHandler"]},ts:(new Date).getTime()};return this.addLocalLoggers(t,e.local),t}addLocalLoggers(e,t){for(const n of Object.keys(t))e.handlers[n+"Handler"]=this.createHandlerObj(t[n],n),e.loggers[n]=this.createLoggerObj(t[n],n)}createHandlerObj(e,t){return{class:"thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler",formatter:"LogFormatter",filename:`${e.filePath}/${t}.log`,backupCount:e.backupCount,interval:e.savingTime,when:e.savingPeriod,encoding:"utf-8"}}createLoggerObj(e,t){return{handlers:[`${t}Handler`,"consoleHandler"],level:e.logLevel,propagate:!1}}fetchConfigAttribute(e){e.id!==k&&this.attributeService.getEntityAttributes(e,L.CLIENT_SCOPE).pipe(_e((t=>t.length?Ie(t):this.attributeService.getEntityAttributes(e,L.SHARED_SCOPE,this.gatewayConfigAttributeKeys))),Ne(this.destroy$)).subscribe((e=>{this.updateConfigs(e),this.cd.detectChanges()}))}updateConfigs(e){const t={thingsboard:{},grpc:{},logs:{},storage:{},mode:on.BASIC};e.forEach((e=>{switch(e.key){case"general_configuration":t.thingsboard=e.value,this.updateFormControls(e.value);break;case"grpc_configuration":t.grpc=e.value;break;case"logs_configuration":t.logs=this.logsToObj(e.value);break;case"storage_configuration":t.storage=e.value;break;case"mode":t.mode=e.value;break;case"RemoteLoggingLevel":t.logs={...t.logs,remote:{enabled:e.value!==Mt.NONE,logLevel:e.value}}}})),this.gatewayConfigGroup.get("basicConfig").setValue(t,{emitEvent:!1}),this.gatewayConfigGroup.get("advancedConfig").setValue(t,{emitEvent:!1})}updateFormControls(e){const{type:t,accessToken:n,...a}=e.security??{};this.initialCredentials={deviceId:this.device,credentialsType:t,credentialsId:n,credentialsValue:JSON.stringify(a)}}logsToObj(e){const{format:t,datefmt:n}=e.formatters.LogFormatter;return{local:Object.keys(Pt).reduce(((t,n)=>{const a=e.handlers[`${n}Handler`]||{},o=e.loggers[n]||{};return t[n]={logLevel:o.level||Mt.INFO,filePath:a.filename?.split(`/${n}`)[0]||"./logs",backupCount:a.backupCount||7,savingTime:a.interval||3,savingPeriod:a.when||Dt.days},t}),{}),logFormat:t,dateFormat:n}}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Go,deps:[{token:me.FormBuilder},{token:X.AttributeService},{token:X.DeviceService},{token:t.ChangeDetectorRef}],target:t.ɵɵFactoryTarget.Component})}static{this.ɵcmp=t.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"18.2.6",type:Go,selector:"tb-gateway-configuration",inputs:{device:"device",dialogRef:"dialogRef"},ngImport:t,template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n
\n \n
\n

gateway.gateway-configuration

\n
\n \n \n {{ \'gateway.basic\' | translate }}\n \n \n {{ \'gateway.advanced\' | translate }}\n \n \n \n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden}:host .page-header.mat-toolbar{background:transparent;color:#000000de!important}:host .actions{grid-row:3;padding:8px 16px 8px 8px;display:flex;gap:8px;justify-content:flex-end;position:absolute;bottom:0;right:0;z-index:1;background:#fff;width:100%}:host .gateway-config-container{display:flex;flex-direction:column;height:100%;overflow:hidden}:host .content-wrapper{flex:1}:host .toolbar-actions{display:flex;align-items:center}.dialog-toggle ::ng-deep .mat-button-toggle-button{color:#ffffffbf}\n'],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:be.MatButton,selector:" button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ",exportAs:["matButton"]},{kind:"component",type:be.MatIconButton,selector:"button[mat-icon-button]",exportAs:["matButton"]},{kind:"component",type:Ke.MatIcon,selector:"mat-icon",inputs:["color","inline","svgIcon","fontSet","fontIcon"],exportAs:["matIcon"]},{kind:"component",type:rt.MatToolbar,selector:"mat-toolbar",inputs:["color"],exportAs:["matToolbar"]},{kind:"directive",type:me.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:me.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:me.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:me.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:Y.TranslateDirective,selector:"[translate],[ngx-translate]",inputs:["translate","translateParams"]},{kind:"directive",type:nt.ToggleOption,selector:"tb-toggle-option",inputs:["value"]},{kind:"component",type:at.ToggleSelectComponent,selector:"tb-toggle-select",inputs:["disabled","selectMediaBreakpoint","appearance","disablePagination","fillHeight","extraPadding","primaryBackground"]},{kind:"component",type:Do,selector:"tb-gateway-basic-configuration",inputs:["device","dialogMode"],outputs:["initialCredentialsUpdated"]},{kind:"component",type:Po,selector:"tb-gateway-advanced-configuration"},{kind:"pipe",type:Y.TranslatePipe,name:"translate"}]})}}e("GatewayConfigurationComponent",Go),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Go,decorators:[{type:n,args:[{selector:"tb-gateway-configuration",template:'\x3c!--\n Copyright © 2016-2024 The Thingsboard Authors\n\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\x3e\n\n
\n
\n \n
\n

gateway.gateway-configuration

\n
\n \n \n {{ \'gateway.basic\' | translate }}\n \n \n {{ \'gateway.advanced\' | translate }}\n \n \n \n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n',styles:['@charset "UTF-8";:host{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden}:host .page-header.mat-toolbar{background:transparent;color:#000000de!important}:host .actions{grid-row:3;padding:8px 16px 8px 8px;display:flex;gap:8px;justify-content:flex-end;position:absolute;bottom:0;right:0;z-index:1;background:#fff;width:100%}:host .gateway-config-container{display:flex;flex-direction:column;height:100%;overflow:hidden}:host .content-wrapper{flex:1}:host .toolbar-actions{display:flex;align-items:center}.dialog-toggle ::ng-deep .mat-button-toggle-button{color:#ffffffbf}\n']}]}],ctorParameters:()=>[{type:me.FormBuilder},{type:X.AttributeService},{type:X.DeviceService},{type:t.ChangeDetectorRef}],propDecorators:{device:[{type:a}],dialogRef:[{type:a}]}});var Oo={gateway:{address:"Address","address-required":"Address required","add-entry":"Add configuration","add-attribute":"Add attribute","add-attribute-update":"Add attribute update","add-key":"Add key","add-timeseries":"Add time series","add-mapping":"Add mapping","add-slave":"Add Slave",arguments:"Arguments","add-rpc-method":"Add method","add-rpc-request":"Add request","add-value":"Add argument",baudrate:"Baudrate",bytesize:"Bytesize","delete-value":"Delete value","delete-rpc-method":"Delete method","delete-rpc-request":"Delete request","delete-attribute-update":"Delete attribute update",advanced:"Advanced","advanced-connection-settings":"Advanced connection settings",attributes:"Attributes","attribute-updates":"Attribute updates","attribute-filter":"Attribute filter","attribute-filter-hint":"Filter for incoming attribute name from platform, supports regular expression.","attribute-filter-required":"Attribute filter required.","attribute-name-expression":"Attribute name expression","attribute-name-expression-required":"Attribute name expression required.","attribute-name-expression-hint":"Hint for Attribute name expression",basic:"Basic","byte-order":"Byte order","word-order":"Word order",broker:{connection:"Connection to broker",name:"Broker name","name-required":"Broker name required.","security-types":{anonymous:"Anonymous",basic:"Basic",certificates:"Certificates"}},"CA-certificate-path":"Path to CA certificate file","path-to-CA-cert-required":"Path to CA certificate file is required.","change-connector-title":"Confirm connector change","change-connector-text":"Switching connectors will discard any unsaved changes. Continue?","checking-device-activity":"Checking device activity",command:"Docker commands","command-copied-message":"Docker command has been copied to clipboard",configuration:"Configuration","add-connector":"Add connector","connector-add":"Add new connector","connector-enabled":"Enable connector","connector-name":"Connector name","connector-name-required":"Connector name is required.","connector-type":"Connector type","connector-type-required":"Connector type is required.",connectors:"Connectors","connectors-config":"Connectors configuration","connectors-table-enabled":"Enabled","connectors-table-name":"Name","connectors-table-type":"Type","connectors-table-status":"Status","connectors-table-actions":"Actions","connectors-table-key":"Key","connectors-table-class":"Class","connection-timeout":"Connection timeout (s)","connect-attempt-time":"Connect attempt time (ms)","connect-attempt-count":"Connect attempt count","copy-username":"Copy username","copy-password":"Copy password","copy-client-id":"Copy client ID","connector-created":"Connector created","connector-updated":"Connector updated","rpc-command-save-template":"Save Template","rpc-command-send":"Send","rpc-command-result":"Response","rpc-command-edit-params":"Edit parameters","gateway-configuration":"General Configuration","docker-label":"Use the following instruction to run IoT Gateway in Docker compose with credentials for selected device","install-docker-compose":"Use the instructions to download, install and setup docker compose","device-info-settings":"Device info settings","device-info":{"entity-field":"Entity field",source:"Source",expression:"Value / Expression","expression-hint":"Show help",name:"Name","profile-name":"Profile name","device-name-expression":"Device name expression","device-name-expression-required":"Device name expression is required.","device-profile-expression-required":"Device profile expression is required."},"device-name-filter":"Device name filter","device-name-filter-hint":"This field supports Regular expressions to filter incoming data by device name.","device-name-filter-required":"Device name filter is required.",details:"Details","delete-mapping-title":"Delete mapping?","delete-slave-title":"Delete slave?",divider:"Divider","download-configuration-file":"Download configuration file","download-docker-compose":"Download docker-compose.yml for your gateway","enable-remote-logging":"Enable remote logging","ellipsis-chips-text":"+ {{count}} more","launch-gateway":"Launch gateway","launch-command":"Launch command","launch-docker-compose":"Start the gateway using the following command in the terminal from folder with docker-compose.yml file","logs-configuration":"Logs configuration","create-new-gateway":"Create a new gateway","create-new-gateway-text":"Are you sure you want create a new gateway with name: '{{gatewayName}}'?","created-time":"Created time","configuration-delete-dialog-header":"Configurations will be deleted","configuration-delete-dialog-body":"Turning off Remote Configuration is possible only if there is physical access to the Gateway. All previous configurations will be deleted.

\nTo turn off configuration, enter gateway name below","configuration-delete-dialog-input":"Gateway name","configuration-delete-dialog-input-required":"Gateway name is mandatory","configuration-delete-dialog-confirm":"Turn Off","connector-duplicate-name":"Connector with such name already exists.","connector-side":"Connector side","payload-type":"Payload type","platform-side":"Platform side",JSON:"JSON","JSON-hint":"Converter for this payload type processes MQTT messages in JSON format. It uses JSON Path expressions to extract vital details such as device names, device profile names, attributes, and time series from the message. And regular expressions to get device details from topics.",bytes:"Bytes","bytes-hint":"Converter for this payload type designed for binary MQTT payloads, this converter directly interprets binary data to retrieve device names and device profile names, along with attributes and time series, using specific byte positions for data extraction.",custom:"Custom","custom-hint":"This option allows you to use a custom converter for specific data tasks. You need to add your custom converter to the extension folder and enter its class name in the UI settings. Any keys you provide will be sent as configuration to your custom converter.","client-cert-path":"Path to client certificate file","path-to-client-cert-required":"Path to client certificate file is required.","client-id":"Client ID","data-conversion":"Data conversion","data-mapping":"Data mapping","data-mapping-hint":"Data mapping provides the capability to parse and convert the data received from a MQTT client in incoming messages into specific attributes and time series data keys.","opcua-data-mapping-hint":"Data mapping provides the capability to parse and convert the data received from a OPCUA server into specific data keys.",delete:"Delete configuration","delete-attribute":"Delete attribute","delete-key":"Delete key","delete-timeseries":"Delete time series",default:"Default","device-node":"Device node","device-node-required":"Device node required.","device-node-hint":"Path or identifier for device node on OPC UA server. Relative paths from it for attributes and time series can be used.","device-name":"Device name","device-profile-label":"Device profile","device-name-required":"Device name required","device-profile-required":"Device profile required","download-tip":"Download configuration file","drop-file":"Drop file here or",enable:"Enable","enable-subscription":"Enable subscription",extension:"Extension","extension-hint":"Put your converter classname in the field. Custom converter with such class should be in extension/mqtt folder.","extension-required":"Extension is required.","extension-configuration":"Extension configuration","extension-configuration-hint":"Configuration for convertor","fill-connector-defaults":"Fill configuration with default values","fill-connector-defaults-hint":"This property allows to fill connector configuration with default values on it's creation.","from-device-request-settings":"Input request parsing","from-device-request-settings-hint":"These fields support JSONPath expressions to extract a name from incoming message.","function-code":"Function code","function-codes":{"read-coils":"01 - Read Coils","read-discrete-inputs":"02 - Read Discrete Inputs","read-multiple-holding-registers":"03 - Read Multiple Holding Registers","read-input-registers":"04 - Read Input Registers","write-single-coil":"05 - Write Single Coil","write-single-holding-register":"06 - Write Single Holding Register","write-multiple-coils":"15 - Write Multiple Coils","write-multiple-holding-registers":"16 - Write Multiple Holding Registers"},"to-device-response-settings":"Output request processing","to-device-response-settings-hint":"For these fields you can use the following variables and they will be replaced with actual values: ${deviceName}, ${attributeKey}, ${attributeValue}",gateway:"Gateway","gateway-exists":"Device with same name is already exists.","gateway-name":"Gateway name","gateway-name-required":"Gateway name is required.","gateway-saved":"Gateway configuration successfully saved.","generate-client-id":"Generate Client ID",grpc:"GRPC","grpc-keep-alive-timeout":"Keep alive timeout (in ms)","grpc-keep-alive-timeout-required":"Keep alive timeout is required","grpc-keep-alive-timeout-min":"Keep alive timeout can not be less then 1","grpc-keep-alive-timeout-pattern":"Keep alive timeout is not valid","grpc-keep-alive":"Keep alive (in ms)","grpc-keep-alive-required":"Keep alive is required","grpc-keep-alive-min":"Keep alive can not be less then 1","grpc-keep-alive-pattern":"Keep alive is not valid","grpc-min-time-between-pings":"Min time between pings (in ms)","grpc-min-time-between-pings-required":"Min time between pings is required","grpc-min-time-between-pings-min":"Min time between pings can not be less then 1","grpc-min-time-between-pings-pattern":"Min time between pings is not valid","grpc-min-ping-interval-without-data":"Min ping interval without data (in ms)","grpc-min-ping-interval-without-data-required":"Min ping interval without data is required","grpc-min-ping-interval-without-data-min":"Min ping interval without data can not be less then 1","grpc-min-ping-interval-without-data-pattern":"Min ping interval without data is not valid","grpc-max-pings-without-data":"Max pings without data","grpc-max-pings-without-data-required":"Max pings without data is required","grpc-max-pings-without-data-min":"Max pings without data can not be less then 1","grpc-max-pings-without-data-pattern":"Max pings without data is not valid",info:"Info",identity:"Identity","inactivity-check-period-seconds":"Inactivity check period (in sec)","inactivity-check-period-seconds-required":"Inactivity check period is required","inactivity-check-period-seconds-min":"Inactivity check period can not be less then 1","inactivity-check-period-seconds-pattern":"Inactivity check period is not valid","inactivity-timeout-seconds":"Inactivity timeout (in sec)","inactivity-timeout-seconds-required":"Inactivity timeout is required","inactivity-timeout-seconds-min":"Inactivity timeout can not be less then 1","inactivity-timeout-seconds-pattern":"Inactivity timeout is not valid","unit-id":"Unit ID",host:"Host","host-required":"Host is required.",holding_registers:"Holding registers",coils_initializer:"Coils initializer",input_registers:"Input registers",discrete_inputs:"Discrete inputs","json-parse":"Not valid JSON.","json-required":"Field cannot be empty.","JSONPath-hint":"This field supports constants and JSONPath expressions.",logs:{logs:"Logs",days:"days",hours:"hours",minutes:"minutes",seconds:"seconds","date-format":"Date format","date-format-required":"Date format required","log-format":"Log format","log-type":"Log type","log-format-required":"Log format required",remote:"Remote logging","remote-logs":"Remote logs",local:"Local logging",level:"Log level","file-path":"File path","file-path-required":"File path required","saving-period":"Log saving period","saving-period-min":"Log saving period can not be less then 1","saving-period-required":"Log saving period required","backup-count":"Backup count","backup-count-min":"Backup count can not be less then 1","backup-count-required":"Backup count required"},"max-number-of-workers":"Max number of workers","max-number-of-workers-hint":"Maximal number of workers threads for converters \n(The amount of workers changes dynamically, depending on load) \nRecommended amount 50-150.","max-number-of-workers-required":"Max number of workers is required.","max-messages-queue-for-worker":"Max messages queue per worker","max-messages-queue-for-worker-hint":"Maximal messages count that will be in the queue \nfor each converter worker.","max-messages-queue-for-worker-required":"Max messages queue per worker is required.",method:"Method","method-name":"Method name","method-required":"Method name is required.","min-pack-send-delay":"Min pack send delay (in ms)","min-pack-send-delay-required":"Min pack send delay is required","min-pack-send-delay-min":"Min pack send delay can not be less then 10","min-pack-send-delay-pattern":"Min pack send delay is not valid",multiplier:"Multiplier",mode:"Mode","model-name":"Model name",modifier:"Modifier","modifier-invalid":"Modifier is not valid","mqtt-version":"MQTT version",name:"Name","name-required":"Name is required.","no-attributes":"No attributes","no-attribute-updates":"No attribute updates","no-connectors":"No connectors","no-data":"No configurations","no-gateway-found":"No gateway found.","no-gateway-matching":" '{{item}}' not found.","no-timeseries":"No time series","no-keys":"No keys","no-value":"No arguments","no-rpc-methods":"No RPC methods","no-rpc-requests":"No RPC requests","path-hint":"The path is local to the gateway file system","path-logs":"Path to log files","path-logs-required":"Path is required.",password:"Password","password-required":"Password is required.","permit-without-calls":"Keep alive permit without calls","poll-period":"Poll period (ms)","poll-period-error":"Poll period should be at least {{min}} (ms).",port:"Port","port-required":"Port is required.","port-limits-error":"Port should be number from {{min}} to {{max}}.","private-key-path":"Path to private key file","path-to-private-key-required":"Path to private key file is required.",parity:"Parity","product-code":"Product code","product-name":"Product name",raw:"Raw",retain:"Retain","retain-hint":"This flag tells the broker to store the message for a topic\nand ensures any new client subscribing to that topic\nwill receive the stored message.",remote:"Remote configuration","remote-logging-level":"Logging level","remove-entry":"Remove configuration","remote-shell":"Remote shell","remote-configuration":"Remote Configuration",retries:"Retries","retries-on-empty":"Retries on empty","retries-on-invalid":"Retries on invalid",rpc:{title:"{{type}} Connector RPC parameters","templates-title":"Connector RPC Templates",methodFilter:"Method filter","method-name":"Method name",requestTopicExpression:"Request topic expression",responseTopicExpression:"Response topic expression",responseTimeout:"Response timeout",valueExpression:"Value expression",tag:"Tag",type:"Type",functionCode:"Function Code",objectsCount:"Objects Count",address:"Address",method:"Method",requestType:"Request Type",requestTimeout:"Request Timeout",objectType:"Object type",identifier:"Identifier",propertyId:"Property ID",methodRPC:"Method RPC name",withResponse:"With Response",characteristicUUID:"Characteristic UUID",methodProcessing:"Method Processing",nodeID:"Node ID",isExtendedID:"Is Extended ID",isFD:"Is FD",bitrateSwitch:"Bitrate Switch",dataInHEX:"Data In HEX",dataLength:"Data Length",dataByteorder:"Data Byte Order",dataBefore:"Data Before",dataAfter:"Data After",dataExpression:"Data Expression",encoding:"Encoding",oid:"OID","add-oid":"Add OID","add-header":"Add header","add-security":"Add security",remove:"Remove",requestFilter:"Request Filter",requestUrlExpression:"Request URL Expression",httpMethod:"HTTP Method",timeout:"Timeout",tries:"Tries",httpHeaders:"HTTP Headers","header-name":"Header name",hint:{"modbus-response-reading":"RPC response will return all subtracted values from all connected devices when the reading functions are selected.","modbus-writing-functions":"RPC will write a filled value to all connected devices when the writing functions are selected.","opc-method":"A filled method name is the OPC-UA method that will processed on the server side (make sure your node has the requested method)."},"security-name":"Security name",value:"Value",security:"Security",responseValueExpression:"Response Value Expression",requestValueExpression:"Request Value Expression",arguments:"Arguments","add-argument":"Add argument","write-property":"Write property","read-property":"Read property","analog-output":"Analog output","analog-input":"Analog input","binary-output":"Binary output","binary-input":"Binary input","binary-value":"Binary value","analog-value":"Analog value",write:"Write",read:"Read",scan:"Scan",oids:"OIDS",set:"Set",multiset:"Multiset",get:"Get","bulk-walk":"Bulk walk",table:"Table","multi-get":"Multiget","get-next":"Get next","bulk-get":"Bulk get",walk:"Walk","save-template":"Save template","template-name":"Template name","template-name-required":"Template name is required.","template-name-duplicate":"Template with such name already exists, it will be updated.",command:"Command",params:"Params","json-value-invalid":"JSON value has an invalid format"},"rpc-methods":"RPC methods","rpc-requests":"RPC requests",request:{"connect-request":"Connect request","disconnect-request":"Disconnect request","attribute-request":"Attribute request","attribute-update":"Attribute update","rpc-connection":"RPC command"},"request-type":"Request type","requests-mapping":"Requests mapping","requests-mapping-hint":"MQTT Connector requests allows you to connect, disconnect, process attribute requests from the device, handle attribute updates on the server and RPC processing configuration.","request-topic-expression":"Request topic expression","request-client-certificate":"Request client certificate","request-topic-expression-required":"Request topic expression is required.","response-timeout":"Response timeout (ms)","response-timeout-required":"Response timeout is required.","response-timeout-limits-error":"Timeout must be more then {{min}} ms.","response-topic-Qos":"Response topic QoS","response-topic-Qos-hint":"MQTT Quality of Service (QoS) is an agreement between the message sender and receiver that defines the level of delivery guarantee for a specific message.","response-topic-expression":"Response topic expression","response-topic-expression-required":"Response topic expression is required.","response-value-expression":"Response value expression","response-value-expression-required":"Response value expression is required.","vendor-name":"Vendor name","vendor-url":"Vendor URL",value:"Value",values:"Values","value-required":"Value is required.","value-expression":"Value expression","value-expression-required":"Value expression is required.","with-response":"With response","without-response":"Without response",other:"Other","save-tip":"Save configuration file","scan-period":"Scan period (ms)","scan-period-error":"Scan period should be at least {{min}} (ms).","sub-check-period":"Subscription check period (ms)","sub-check-period-error":"Subscription check period should be at least {{min}} (ms).","security-label":"Security","security-policy":"Security policy","security-type":"Security type","security-types":{"access-token":"Access Token","username-password":"Username and Password",tls:"TLS","tls-access-token":"TLS + Access Token","tls-private-key":"TLS + Private Key"},"select-connector":"Select connector to display config","send-change-data":"Send data only on change","send-data-to-platform":"Send data to platform","send-data-on-change":"Send data only on change","send-change-data-hint":"The values will be saved to the database only if they are different from the corresponding values in the previous converted message. This functionality applies to both attributes and time series in the converter output.",server:"Server","server-hostname":"Server hostname","server-slave":"Server (Slave)","servers-slaves":"Servers (Slaves)","server-port":"Server port","server-url":"Server endpoint url","server-connection":"Server Connection","server-config":"Server configuration","server-slave-config":"Server (Slave) configuration","server-url-required":"Server endpoint url is required.",stopbits:"Stopbits",strict:"Strict",set:"Set","show-map":"Show map",statistics:{statistic:"Statistic",statistics:"Statistics","statistic-commands-empty":'No configured statistic keys found. You can configure them in "Statistics" tab in general configuration.',"statistics-button":"Go to configuration",commands:"Commands","send-period":"Statistic send period (in sec)","send-period-required":"Statistic send period is required","send-period-min":"Statistic send period can not be less then 60","send-period-pattern":"Statistic send period is not valid","check-connectors-configuration":"Check connectors configuration (in sec)","max-payload-size-bytes":"Max payload size in bytes","max-payload-size-bytes-required":"Max payload size in bytes is required","max-payload-size-bytes-min":"Max payload size in bytes can not be less then 100","max-payload-size-bytes-pattern":"Max payload size in bytes is not valid","min-pack-size-to-send":"Min packet size to send","min-pack-size-to-send-required":"Min packet size to send is required","min-pack-size-to-send-min":"Min packet size to send can not be less then 100","min-pack-size-to-send-pattern":"Min packet size to send is not valid","check-connectors-configuration-required":"Check connectors configuration is required","check-connectors-configuration-min":"Check connectors configuration can not be less then 1","check-connectors-configuration-pattern":"Check connectors configuration is not valid",add:"Add command",timeout:"Timeout (in sec)","timeout-ms":"Timeout (in ms)","timeout-required":"Timeout is required","timeout-min":"Timeout can not be less then 1","timeout-pattern":"Timeout is not valid","attribute-name":"Attribute name","attribute-name-required":"Attribute name is required",command:"Command","command-required":"Command is required","command-pattern":"Command is not valid",remove:"Remove command"},storage:"Storage","storage-max-file-records":"Maximum records in file","storage-max-files":"Maximum number of files","storage-max-files-min":"Minimum number is 1.","storage-max-files-pattern":"Number is not valid.","storage-max-files-required":"Number is required.","storage-max-records":"Maximum records in storage","storage-max-records-min":"Minimum number of records is 1.","storage-max-records-pattern":"Number is not valid.","storage-max-records-required":"Maximum records is required.","storage-read-record-count":"Read record count in storage","storage-read-record-count-min":"Minimum number of records is 1.","storage-read-record-count-pattern":"Number is not valid.","storage-read-record-count-required":"Read record count is required.","storage-max-read-record-count":"Max read record count in storage","storage-max-read-record-count-min":"Minimum number of records is 1.","storage-max-read-record-count-pattern":"Number is not valid.","storage-max-read-record-count-required":"Max Read record count is required.","storage-data-folder-path":"Data folder path","storage-data-folder-path-required":"Data folder path is required.","storage-pack-size":"Maximum event pack size","storage-pack-size-min":"Minimum number is 1.","storage-pack-size-pattern":"Number is not valid.","storage-pack-size-required":"Maximum event pack size is required.","storage-path":"Storage path","storage-path-required":"Storage path is required.","storage-type":"Storage type","storage-types":{"file-storage":"File storage","memory-storage":"Memory storage",sqlite:"SQLITE"},"report-strategy":{label:"Report strategy","on-change":"On value change","on-report-period":"On report period","on-change-or-report-period":"On value change or report period","report-period":"Report period"},"source-type":{msg:"Extract from message",topic:"Extract from topic",const:"Constant",identifier:"Identifier",path:"Path"},"workers-settings":"Workers settings",thingsboard:"ThingsBoard",general:"General",timeseries:"Time series",key:"Key",keys:"Keys","key-required":"Key is required.","thingsboard-host":"Platform host","thingsboard-host-required":"Host is required.","thingsboard-port":"Platform port","thingsboard-port-max":"Maximum port number is 65535.","thingsboard-port-min":"Minimum port number is 1.","thingsboard-port-pattern":"Port is not valid.","thingsboard-port-required":"Port is required.",tidy:"Tidy","tidy-tip":"Tidy config JSON",timeout:"Timeout (ms)","timeout-error":"Timeout should be at least {{min}} (ms).","title-connectors-json":"Connector {{typeName}} configuration",type:"Type","topic-filter":"Topic filter","topic-required":"Topic filter is required.","tls-path-ca-certificate":"Path to CA certificate on gateway","tls-path-client-certificate":"Path to client certificate on gateway","tls-connection":"TLS Connection","master-connections":"Master Connections","method-filter":"Method filter","method-filter-hint":"Regular expression to filter incoming RPC method from platform.","method-filter-required":"Method filter is required.","messages-ttl-check-in-hours":"Messages TTL check in hours","messages-ttl-check-in-hours-required":"Messages TTL check in hours is required.","messages-ttl-check-in-hours-min":"Min number is 1.","messages-ttl-check-in-hours-pattern":"Number is not valid.","messages-ttl-in-days":"Messages TTL in days","messages-ttl-in-days-required":"Messages TTL in days is required.","messages-ttl-in-days-min":"Min number is 1.","messages-ttl-in-days-pattern":"Number is not valid.","mqtt-qos":"QoS","mqtt-qos-required":"QoS is required","mqtt-qos-range":"QoS values range is from 0 to 1",qos:{"at-most-once":"0 - At most once","at-least-once":"1 - At least once","exactly-once":"2 - Exactly once"},"objects-count":"Objects count","objects-count-required":"Objects count is required","wait-after-failed-attempts":"Wait after failed attempts (ms)","tls-path-private-key":"Path to private key on gateway","toggle-fullscreen":"Toggle fullscreen","transformer-json-config":"Configuration JSON*","update-config":"Add/update configuration JSON",username:"Username","username-required":"Username is required.","unit-id-required":"Unit ID is required.","write-coil":"Write Coil","write-coils":"Write Coils","write-register":"Write Register","write-registers":"Write Registers",hints:{"modbus-master":"Configuration sections for connecting to Modbus servers and reading data from them.","modbus-server":"Configuration section for the Modbus server, storing data and sending updates to the platform when changes occur or at fixed intervals.","remote-configuration":"Enables remote configuration and management of the gateway","remote-shell":"Enables remote control of the operating system with the gateway from the Remote Shell widget",host:"Hostname or IP address of platform server",port:"Port of MQTT service on platform server",token:"Access token for the gateway from platform server","client-id":"MQTT client id for the gateway form platform server",username:"MQTT username for the gateway form platform server",password:"MQTT password for the gateway form platform server","ca-cert":"Path to CA certificate file","date-form":"Date format in log message","data-folder":"Path to the folder that will contain data (Relative or Absolute)","log-format":"Log message format","remote-log":"Enables remote logging and logs reading from the gateway","backup-count":"If backup count is > 0, when a rollover is done, no more than backup count files are kept - the oldest ones are deleted",storage:"Provides configuration for saving incoming data before it is sent to the platform","max-file-count":"Maximum number of files that will be created","max-read-count":"Number of messages to retrieve from the storage and send to platform","max-records":"Maximum count of records that will be stored in one file","read-record-count":"Number of messages to retrieve from the storage and send to platform","max-records-count":"Maximum number of data entries in storage before sending to platform","ttl-check-hour":"How often will the Gateway check data for obsolescence","ttl-messages-day":"Maximum number of days that the storage will retain data",commands:"Commands for collecting additional statistic",attribute:"Statistic telemetry key",timeout:"Timeout for command executing",command:"The result of the command execution, will be used as the value for telemetry","check-device-activity":"Enables monitor the activity of each connected device","inactivity-timeout":"Time after whose the gateway will disconnect device","inactivity-period":"Periodicity of device activity check","minimal-pack-delay":"Delay between sending packs of messages (Decreasing this setting results in increased CPU usage)",qos:"Quality of Service in MQTT messaging (0 - at most once, 1 - at least once)","server-port":"Network port on which GRPC server will listen for incoming connections.","grpc-keep-alive-timeout":"Maximum time the server should wait for a keepalive ping response before considering the connection dead.","grpc-keep-alive":"Duration between two successive keepalive ping messages when there is no active RPC call.","grpc-min-time-between-pings":"Minimum amount of time the server should wait between sending keepalive ping messages","grpc-max-pings-without-data":"Maximum number of keepalive ping messages that the server can send without receiving any data before it considers the connection dead.","grpc-min-ping-interval-without-data":"Minimum amount of time the server should wait between sending keepalive ping messages when there is no data being sent or received.","permit-without-calls":"Allow server to keep the GRPC connection alive even when there are no active RPC calls.","path-in-os":"Path in gateway os.",memory:"Your data will be stored in the in-memory queue, it is a fastest but no persistence guarantee.",file:"Your data will be stored in separated files and will be saved even after the gateway restart.",sqlite:"Your data will be stored in file based database. And will be saved even after the gateway restart.","opc-timeout":"Timeout in milliseconds for connecting to OPC-UA server.","security-policy":"Security Policy defines the security mechanisms to be applied.","scan-period":"Period in milliseconds to rescan the server.","sub-check-period":"Period to check the subscriptions in the OPC-UA server.","enable-subscription":"If true - the gateway will subscribe to interesting nodes and wait for data update and if false - the gateway will rescan OPC-UA server every scanPeriodInMillis.","show-map":"Show nodes on scanning.","method-name":"Name of method on OPC-UA server.",arguments:"Arguments for the method (will be overwritten by arguments from the RPC request).","min-pack-size-to-send":"Minimum package size for sending.","max-payload-size-bytes":"Maximum package size in bytes","poll-period":"Period in milliseconds to read data from nodes.",modbus:{"framer-type":"Type of a framer (Socket, RTU, or ASCII), if needed.",host:"Hostname or IP address of Modbus server.",port:"Modbus server port for connection.","unit-id":"Modbus slave ID.","connection-timeout":"Connection timeout (in seconds) for the Modbus server.","byte-order":"Byte order for reading data.","word-order":"Word order when reading multiple registers.",retries:"Retrying data transmission to the master. Acceptable values: true or false.","retries-on-empty":"Retry sending data to the master if the data is empty.","retries-on-invalid":"Retry sending data to the master if it fails.","poll-period":"Period in milliseconds to check attributes and telemetry on the slave.","connect-attempt-time":"A waiting period in milliseconds before establishing a connection to the master.","connect-attempt-count":"The number of connection attempts made through the gateway.","wait-after-failed-attempts":"A waiting period in milliseconds before attempting to send data to the master.","serial-port":"Serial port for connection.",baudrate:"Baud rate for the serial device.",stopbits:"The number of stop bits sent after each character in a message to indicate the end of the byte.",bytesize:"The number of bits in a byte of serial data. This can be one of 5, 6, 7, or 8.",parity:"The type of checksum used to verify data integrity. Options: (E)ven, (O)dd, (N)one.",strict:"Use inter-character timeout for baudrates ≤ 19200.","objects-count":"Depends on the selected type.",address:"Register address to verify.",key:"Key to be used as the attribute key for the platform instance.","data-keys":"For more information about function codes and data types click on help icon",modifier:"The retrieved value will be adjusted (by multiplying or dividing it) based on the specified modifier value."}}}},Ro={"add-entry":"إضافة تكوين",advanced:"متقدم","checking-device-activity":"فحص نشاط الجهاز",command:"أوامر Docker","command-copied-message":"تم نسخ أمر Docker إلى الحافظة",configuration:"التكوين","connector-add":"إضافة موصل جديد","connector-enabled":"تمكين الموصل","connector-name":"اسم الموصل","connector-name-required":"اسم الموصل مطلوب.","connector-type":"نوع الموصل","connector-type-required":"نوع الموصل مطلوب.",connectors:"الموصلات","connectors-config":"تكوينات الموصلات","connectors-table-enabled":"ممكّن","connectors-table-name":"الاسم","connectors-table-type":"النوع","connectors-table-status":"الحالة","connectors-table-actions":"الإجراءات","connectors-table-key":"المفتاح","connectors-table-class":"الفئة","rpc-command-send":"إرسال","rpc-command-result":"الاستجابة","rpc-command-edit-params":"تحرير المعلمات","gateway-configuration":"تكوين عام","docker-label":"استخدم التعليمات التالية لتشغيل IoT Gateway في Docker compose مع بيانات اعتماد للجهاز المحدد","install-docker-compose":"استخدم التعليمات لتنزيل وتثبيت وإعداد docker compose","download-configuration-file":"تنزيل ملف التكوين","download-docker-compose":"تنزيل docker-compose.yml لبوابتك","launch-gateway":"تشغيل البوابة","launch-docker-compose":"بدء تشغيل البوابة باستخدام الأمر التالي في الطرفية من المجلد الذي يحتوي على ملف docker-compose.yml","create-new-gateway":"إنشاء بوابة جديدة","create-new-gateway-text":"هل أنت متأكد أنك تريد إنشاء بوابة جديدة باسم: '{{gatewayName}}'؟","created-time":"وقت الإنشاء","configuration-delete-dialog-header":"سيتم حذف التكوينات","configuration-delete-dialog-body":"يمكن تعطيل التكوين عن بُعد فقط إذا كان هناك وصول جسدي إلى البوابة. ستتم حذف جميع التكوينات السابقة.

\n لتعطيل التكوين، أدخل اسم البوابة أدناه","configuration-delete-dialog-input":"اسم البوابة","configuration-delete-dialog-input-required":"اسم البوابة إلزامي","configuration-delete-dialog-confirm":"إيقاف التشغيل",delete:"حذف التكوين","download-tip":"تنزيل ملف التكوين","drop-file":"أفلق الملف هنا أو",gateway:"البوابة","gateway-exists":"الجهاز بنفس الاسم موجود بالفعل.","gateway-name":"اسم البوابة","gateway-name-required":"اسم البوابة مطلوب.","gateway-saved":"تم حفظ تكوين البوابة بنجاح.",grpc:"GRPC","grpc-keep-alive-timeout":"مهلة البقاء على قيد الحياة (بالمللي ثانية)","grpc-keep-alive-timeout-required":"مهلة البقاء على قيد الحياة مطلوبة","grpc-keep-alive-timeout-min":"مهلة البقاء على قيد الحياة لا يمكن أن تكون أقل من 1","grpc-keep-alive-timeout-pattern":"مهلة البقاء على قيد الحياة غير صالحة","grpc-keep-alive":"البقاء على قيد الحياة (بالمللي ثانية)","grpc-keep-alive-required":"البقاء على قيد الحياة مطلوب","grpc-keep-alive-min":"البقاء على قيد الحياة لا يمكن أن يكون أقل من 1","grpc-keep-alive-pattern":"البقاء على قيد الحياة غير صالح","grpc-min-time-between-pings":"الحد الأدنى للوقت بين البينغات (بالمللي ثانية)","grpc-min-time-between-pings-required":"الحد الأدنى للوقت بين البينغات مطلوب","grpc-min-time-between-pings-min":"الحد الأدنى للوقت بين البينغات لا يمكن أن يكون أقل من 1","grpc-min-time-between-pings-pattern":"الحد الأدنى للوقت بين البينغات غير صالح","grpc-min-ping-interval-without-data":"الحد الأدنى لفاصل البينغ بدون بيانات (بالمللي ثانية)","grpc-min-ping-interval-without-data-required":"الحد الأدنى لفاصل البينغ بدون بيانات مطلوب","grpc-min-ping-interval-without-data-min":"الحد الأدنى لفاصل البينغ بدون بيانات لا يمكن أن يكون أقل من 1","grpc-min-ping-interval-without-data-pattern":"الحد الأدنى لفاصل البينغ بدون بيانات غير صالح","grpc-max-pings-without-data":"الحد الأقصى لعدد البينغات بدون بيانات","grpc-max-pings-without-data-required":"الحد الأقصى لعدد البينغات بدون بيانات مطلوب","grpc-max-pings-without-data-min":"الحد الأقصى لعدد البينغات بدون بيانات لا يمكن أن يكون أقل من 1","grpc-max-pings-without-data-pattern":"الحد الأقصى لعدد البينغات بدون بيانات غير صالح","inactivity-check-period-seconds":"فترة فحص الخمول (بالثواني)","inactivity-check-period-seconds-required":"فترة فحص الخمول مطلوبة","inactivity-check-period-seconds-min":"فترة فحص الخمول لا يمكن أن تكون أقل من 1","inactivity-check-period-seconds-pattern":"فترة فحص الخمول غير صالحة","inactivity-timeout-seconds":"فترة الخمول (بالثواني)","inactivity-timeout-seconds-required":"فترة الخمول مطلوبة","inactivity-timeout-seconds-min":"فترة الخمول لا يمكن أن تكون أقل من 1","inactivity-timeout-seconds-pattern":"فترة الخمول غير صالحة","json-parse":"JSON غير صالح.","json-required":"الحقل لا يمكن أن يكون فارغًا.",logs:{logs:"السجلات",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني","date-format":"تنسيق التاريخ","date-format-required":"تنسيق التاريخ مطلوب","log-format":"تنسيق السجل","log-type":"نوع السجل","log-format-required":"تنسيق السجل مطلوب",remote:"التسجيل عن بُعد","remote-logs":"السجلات عن بُعد",local:"التسجيل المحلي",level:"مستوى السجل","file-path":"مسار الملف","file-path-required":"مسار الملف مطلوب","saving-period":"فترة حفظ السجل","saving-period-min":"فترة حفظ السجل لا يمكن أن تكون أقل من 1","saving-period-required":"فترة حفظ السجل مطلوبة","backup-count":"عدد النسخ الاحتياطية","backup-count-min":"عدد النسخ الاحتياطية لا يمكن أن يكون أقل من 1","backup-count-required":"عدد النسخ الاحتياطية مطلوب"},"min-pack-send-delay":"الحد الأدنى لتأخير إرسال الحزمة (بالمللي ثانية)","min-pack-send-delay-required":"الحد الأدنى لتأخير إرسال الحزمة مطلوب","min-pack-send-delay-min":"لا يمكن أن يكون الحد الأدنى لتأخير إرسال الحزمة أقل من 0","no-connectors":"لا توجد موصلات","no-data":"لا توجد تكوينات","no-gateway-found":"لم يتم العثور على بوابة.","no-gateway-matching":"'{{item}}' غير موجود.","path-logs":"مسار إلى ملفات السجل","path-logs-required":"المسار مطلوب.","permit-without-calls":"البقاء على الحياة يسمح بدون مكالمات",remote:"التكوين عن بُعد","remote-logging-level":"مستوى التسجيل","remove-entry":"إزالة التكوين","remote-shell":"قشرة عن بُعد","remote-configuration":"التكوين عن بُعد",other:"آخر","save-tip":"حفظ ملف التكوين","security-type":"نوع الأمان","security-types":{"access-token":"رمز الوصول","username-password":"اسم المستخدم وكلمة المرور",tls:"TLS","tls-access-token":"TLS + رمز الوصول","tls-private-key":"TLS + المفتاح الخاص"},"server-port":"منفذ الخادم",statistics:{statistic:"إحصائية",statistics:"الإحصائيات","statistic-commands-empty":"لا تتوفر إحصائيات",commands:"الأوامر","send-period":"فترة إرسال الإحصائيات (بالثواني)","send-period-required":"فترة إرسال الإحصائيات مطلوبة","send-period-min":"لا يمكن أن تكون فترة إرسال الإحصائيات أقل من 60","send-period-pattern":"فترة إرسال الإحصائيات غير صالحة","check-connectors-configuration":"فترة فحص تكوين الموصلات (بالثواني)","check-connectors-configuration-required":"فترة فحص تكوين الموصلات مطلوبة","check-connectors-configuration-min":"لا يمكن أن تكون فترة فحص تكوين الموصلات أقل من 1","check-connectors-configuration-pattern":"فترة فحص تكوين الموصلات غير صالحة",add:"إضافة أمر",timeout:"المهلة","timeout-ms":"المهلة (بالمللي ثانية)","timeout-required":"المهلة مطلوبة","timeout-min":"لا يمكن أن تكون المهلة أقل من 1","timeout-pattern":"المهلة غير صالحة","attribute-name":"اسم السمة","attribute-name-required":"اسم السمة مطلوب",command:"الأمر","command-required":"الأمر مطلوب","command-pattern":"الأمر غير صالح",remove:"إزالة الأمر"},storage:"التخزين","storage-max-file-records":"السجلات القصوى في الملف","storage-max-files":"الحد الأقصى لعدد الملفات","storage-max-files-min":"الحد الأدنى هو 1.","storage-max-files-pattern":"العدد غير صالح.","storage-max-files-required":"العدد مطلوب.","storage-max-records":"السجلات القصوى في التخزين","storage-max-records-min":"الحد الأدنى لعدد السجلات هو 1.","storage-max-records-pattern":"العدد غير صالح.","storage-max-records-required":"السجلات القصوى مطلوبة.","storage-read-record-count":"عدد قراءة السجلات في التخزين","storage-read-record-count-min":"الحد الأدنى لعدد السجلات هو 1.","storage-read-record-count-pattern":"العدد غير صالح.","storage-read-record-count-required":"عدد قراءة السجلات مطلوب.","storage-max-read-record-count":"الحد الأقصى لعدد قراءة السجلات في التخزين","storage-max-read-record-count-min":"الحد الأدنى لعدد السجلات هو 1.","storage-max-read-record-count-pattern":"العدد غير صالح.","storage-max-read-record-count-required":"عدد القراءة القصوى مطلوب.","storage-data-folder-path":"مسار مجلد البيانات","storage-data-folder-path-required":"مسار مجلد البيانات مطلوب.","storage-pack-size":"الحد الأقصى لحجم حزمة الحدث","storage-pack-size-min":"الحد الأدنى هو 1.","storage-pack-size-pattern":"العدد غير صالح.","storage-pack-size-required":"الحجم الأقصى لحزمة الحدث مطلوب.","storage-path":"مسار التخزين","storage-path-required":"مسار التخزين مطلوب.","storage-type":"نوع التخزين","storage-types":{"file-storage":"تخزين الملفات","memory-storage":"تخزين الذاكرة",sqlite:"SQLITE"},thingsboard:"ثينغزبورد",general:"عام","thingsboard-host":"مضيف ثينغزبورد","thingsboard-host-required":"المضيف مطلوب.","thingsboard-port":"منفذ ثينغزبورد","thingsboard-port-max":"الحد الأقصى لرقم المنفذ هو 65535.","thingsboard-port-min":"الحد الأدنى لرقم المنفذ هو 1.","thingsboard-port-pattern":"المنفذ غير صالح.","thingsboard-port-required":"المنفذ مطلوب.",tidy:"ترتيب","tidy-tip":"ترتيب تكوين JSON","title-connectors-json":"تكوين موصل {{typeName}}","tls-path-ca-certificate":"المسار إلى شهادة CA على البوابة","tls-path-client-certificate":"المسار إلى شهادة العميل على البوابة","messages-ttl-check-in-hours":"فحص TTL الرسائل بالساعات","messages-ttl-check-in-hours-required":"يجب تحديد فحص TTL الرسائل بالساعات.","messages-ttl-check-in-hours-min":"الحد الأدنى هو 1.","messages-ttl-check-in-hours-pattern":"الرقم غير صالح.","messages-ttl-in-days":"TTL الرسائل بالأيام","messages-ttl-in-days-required":"يجب تحديد TTL الرسائل بالأيام.","messages-ttl-in-days-min":"الحد الأدنى هو 1.","messages-ttl-in-days-pattern":"الرقم غير صالح.","mqtt-qos":"جودة الخدمة (QoS)","mqtt-qos-required":"جودة الخدمة (QoS) مطلوبة","mqtt-qos-range":"تتراوح قيم جودة الخدمة (QoS) من 0 إلى 1","tls-path-private-key":"المسار إلى المفتاح الخاص على البوابة","toggle-fullscreen":"تبديل وضع ملء الشاشة","transformer-json-config":"تكوين JSON*","update-config":"إضافة/تحديث تكوين JSON",hints:{"remote-configuration":"يمكنك تمكين التكوين وإدارة البوابة عن بُعد","remote-shell":"يمكنك تمكين التحكم البعيد في نظام التشغيل مع البوابة من عنصر واجهة المستخدم قشرة عن بُعد",host:"اسم المضيف أو عنوان IP لخادم ثينغزبورد",port:"منفذ خدمة MQTT على خادم ثينغزبورد",token:"رمز الوصول للبوابة من خادم ثينغزبورد","client-id":"معرف عميل MQTT للبوابة من خادم ثينغزبورد",username:"اسم المستخدم MQTT للبوابة من خادم ثينغزبورد",password:"كلمة المرور MQTT للبوابة من خادم ثينغزبورد","ca-cert":"المسار إلى ملف شهادة CA","date-form":"تنسيق التاريخ في رسالة السجل","data-folder":"المسار إلى المجلد الذي سيحتوي على البيانات (نسبي أو مطلق)","log-format":"تنسيق رسالة السجل","remote-log":"يمكنك تمكين التسجيل البعيد وقراءة السجلات من البوابة","backup-count":"إذا كان عدد النسخ الاحتياطية > 0، عند عملية تدوير، لا يتم الاحتفاظ بأكثر من عدد النسخ الاحتياطية المحددة - يتم حذف الأقدم",storage:"يوفر تكوينًا لحفظ البيانات الواردة قبل إرسالها إلى المنصة","max-file-count":"العدد الأقصى لعدد الملفات التي سيتم إنشاؤها","max-read-count":"عدد الرسائل للحصول عليها من التخزين وإرسالها إلى ثينغزبورد","max-records":"العدد الأقصى للسجلات التي ستخزن في ملف واحد","read-record-count":"عدد الرسائل للحصول عليها من التخزين وإرسالها إلى ثينغزبورد","max-records-count":"العدد الأقصى للبيانات في التخزين قبل إرسالها إلى ثينغزبورد","ttl-check-hour":"كم مرة سيتحقق البوابة من البيانات القديمة","ttl-messages-day":"الحد الأقصى لعدد الأيام التي ستحتفظ فيها التخزين بالبيانات",commands:"الأوامر لجمع الإحصائيات الإضافية",attribute:"مفتاح تلقي الإحصائيات",timeout:"مهلة زمنية لتنفيذ الأمر",command:"سيتم استخدام نتيجة تنفيذ الأمر كقيمة لتلقي الإحصائيات","check-device-activity":"يمكنك تمكين مراقبة نشاط كل جهاز متصل","inactivity-timeout":"الوقت بعد الذي ستفصل البوابة الجهاز","inactivity-period":"تكرار فحص نشاط الجهاز","minimal-pack-delay":"التأخير بين إرسال حزم الرسائل (يؤدي تقليل هذا الإعداد إلى زيادة استخدام وحدة المعالجة المركزية)",qos:"جودة الخدمة في رسائل MQTT (0 - على الأكثر مرة واحدة، 1 - على الأقل مرة واحدة)","server-port":"منفذ الشبكة الذي سيستمع فيه خادم GRPC للاستفسارات الواردة.","grpc-keep-alive-timeout":"الحد الأقصى للوقت الذي يجب أن ينتظره الخادم لاستجابة رسالة الحفاظ على الاتصال قبل اعتبار الاتصال ميتًا.","grpc-keep-alive":"المدة بين رسائل حفظ الاتصال المتعاقبة عند عدم وجود استدعاء RPC نشط.","grpc-min-time-between-pings":"الحد الأدنى للوقت الذي يجب فيه أن ينتظر الخادم بين إرسال رسائل حفظ الاتصال","grpc-max-pings-without-data":"الحد الأقصى لعدد رسائل حفظ الاتصال التي يمكن للخادم إرسالها دون تلقي أي بيانات قبل اعتبار الاتصال ميتًا.","grpc-min-ping-interval-without-data":"الحد الأدنى للوقت الذي يجب فيه أن ينتظر الخادم بين إرسال رسائل حفظ الاتصال عند عدم إرسال أو استلام بيانات.","permit-without-calls":"السماح للخادم بإبقاء اتصال GRPC حيًا حتى عندما لا تكون هناك استدعاءات RPC نشطة."}},Vo={"add-entry":"Afegir configuració","connector-add":"Afegir conector","connector-enabled":"Activar conector","connector-name":"Nom conector","connector-name-required":"Cal nom conector.","connector-type":"Tipus conector","connector-type-required":"Cal tipus conector.",connectors:"Configuració de conectors","create-new-gateway":"Crear un gateway nou","create-new-gateway-text":"Crear un nou gateway amb el nom: '{{gatewayName}}'?",delete:"Esborrar configuració","download-tip":"Descarregar fitxer de configuració",gateway:"Gateway","gateway-exists":"Ja existeix un dispositiu amb el mateix nom.","gateway-name":"Nom de Gateway","gateway-name-required":"Cal un nom de gateway.","gateway-saved":"Configuració de gateway gravada satisfactòriament.","json-parse":"JSON no vàlid.","json-required":"El camp no pot ser buit.","no-connectors":"No hi ha conectors","no-data":"No hi ha configuracions","no-gateway-found":"No s'ha trobat cap gateway.","no-gateway-matching":" '{{item}}' no trobat.","path-logs":"Ruta als fitxers de log","path-logs-required":"Cal ruta.",remote:"Configuració remota","remote-logging-level":"Nivel de logging","remove-entry":"Esborrar configuració","save-tip":"Gravar fitxer de configuració","security-type":"Tipus de seguretat","security-types":{"access-token":"Token d'accés",tls:"TLS"},storage:"Grabació","storage-max-file-records":"Número màxim de registres en fitxer","storage-max-files":"Número màxim de fitxers","storage-max-files-min":"El número mínim és 1.","storage-max-files-pattern":"Número no vàlid.","storage-max-files-required":"Cal número.","storage-max-records":"Màxim de registres en el magatzem","storage-max-records-min":"El número mínim és 1.","storage-max-records-pattern":"Número no vàlid.","storage-max-records-required":"Cal número.","storage-pack-size":"Mida màxim de esdeveniments","storage-pack-size-min":"El número mínim és 1.","storage-pack-size-pattern":"Número no vàlid.","storage-pack-size-required":"Cal número.","storage-path":"Ruta de magatzem","storage-path-required":"Cal ruta de magatzem.","storage-type":"Tipus de magatzem","storage-types":{"file-storage":"Magatzem fitxer","memory-storage":"Magatzem en memoria"},thingsboard:"ThingsBoard","thingsboard-host":"Host ThingsBoard","thingsboard-host-required":"Cal Host.","thingsboard-port":"Port ThingsBoard","thingsboard-port-max":"El port màxim és 65535.","thingsboard-port-min":"El port mínim és 1.","thingsboard-port-pattern":"Port no vàlid.","thingsboard-port-required":"Cal port.",tidy:"Endreçat","tidy-tip":"Endreçat JSON","title-connectors-json":"Configuració conector {{typeName}}","tls-path-ca-certificate":"Ruta al certificat CA al gateway","tls-path-client-certificate":"Ruta al certificat client al gateway","tls-path-private-key":"Ruta a la clau privada al gateway","toggle-fullscreen":"Pantalla completa fullscreen","transformer-json-config":"Configuració JSON*","update-config":"Afegir/actualizar configuració JSON"},Bo={"add-entry":"Přidat konfiguraci","connector-add":"Přidat nový konektor","connector-enabled":"Povolit konektor","connector-name":"Název konektoru","connector-name-required":"Název konektoru je povinný.","connector-type":"Typ konektoru","connector-type-required":"Typ konektoru je povinný.",connectors:"Konfigurace konektoru","create-new-gateway":"Vytvořit novou bránu","create-new-gateway-text":"Jste si jisti, že chcete vytvořit novou bránu s názvem: '{{gatewayName}}'?",delete:"Smazat konfiguraci","download-tip":"Stáhnout soubor konfigurace",gateway:"Brána","gateway-exists":"Zařízení se shodným názvem již existuje.","gateway-name":"Název brány","gateway-name-required":"Název brány je povinný.","gateway-saved":"Konfigurace brány byla úspěšně uložena.","json-parse":"Neplatný JSON.","json-required":"Pole nemůže být prázdné.","no-connectors":"Žádné konektory","no-data":"Žádné konfigurace","no-gateway-found":"Žádné brány nebyly nalezeny.","no-gateway-matching":" '{{item}}' nenalezena.","path-logs":"Cesta k souborům logu","path-logs-required":"Cesta je povinná.",remote:"Vzdálená konfigurace","remote-logging-level":"Úroveň logování","remove-entry":"Odstranit konfiguraci","save-tip":"Uložit soubor konfigurace","security-type":"Typ zabezpečení","security-types":{"access-token":"Přístupový token",tls:"TLS"},storage:"Úložiště","storage-max-file-records":"Maximální počet záznamů v souboru","storage-max-files":"Maximální počet souborů","storage-max-files-min":"Minimální počet je 1.","storage-max-files-pattern":"Počet není platný.","storage-max-files-required":"Počet je povinný.","storage-max-records":"Maximální počet záznamů v úložišti","storage-max-records-min":"Minimální počet záznamů je 1.","storage-max-records-pattern":"Počet není platný.","storage-max-records-required":"Maximální počet záznamů je povinný.","storage-pack-size":"Maximální velikost souboru událostí","storage-pack-size-min":"Minimální počet je 1.","storage-pack-size-pattern":"Počet není platný.","storage-pack-size-required":"Maximální velikost souboru událostí je povinná.","storage-path":"Cesta k úložišti","storage-path-required":"Cesta k úložišti je povinná.","storage-type":"Typ úložiště","storage-types":{"file-storage":"Soubor","memory-storage":"Paměť"},thingsboard:"ThingsBoard","thingsboard-host":"Host ThingsBoard","thingsboard-host-required":"Host je povinný.","thingsboard-port":"Port ThingsBoard","thingsboard-port-max":"Maximální číslo portu je 65535.","thingsboard-port-min":"Minimální číslo portu je 1.","thingsboard-port-pattern":"Port není platný.","thingsboard-port-required":"Port je povinný.",tidy:"Uspořádat","tidy-tip":"Uspořádat JSON konfiguraci","title-connectors-json":"Konfigurace {{typeName}} konektoru","tls-path-ca-certificate":"Cesta k certifikátu CA brány","tls-path-client-certificate":"Cesta k certifikátu klienta brány","tls-path-private-key":"Cesta k privátnímu klíči brány","toggle-fullscreen":"Přepnout do režimu celé obrazovky","transformer-json-config":"JSON* konfigurace","update-config":"Přidat/editovat JSON konfiguraci"},Uo={"add-entry":"Tilføj konfiguration","connector-add":"Tilføj ny stikforbindelse","connector-enabled":"Aktivér stikforbindelse","connector-name":"Navn på stikforbindelse","connector-name-required":"Navn på stikforbindelse er påkrævet.","connector-type":"Stikforbindelsestype","connector-type-required":"Stikforbindelsestype er påkrævet.",connectors:"Konfiguration af stikforbindelser","create-new-gateway":"Opret en ny gateway","create-new-gateway-text":"",delete:"Slet konfiguration","download-tip":"Download konfigurationsfil",gateway:"Gateway","gateway-exists":"Enhed med samme navn findes allerede.","gateway-name":"Gateway-navn","gateway-name-required":"Gateway-navn er påkrævet.","gateway-saved":"Gateway-konfigurationen blev gemt.","json-parse":"Ikke gyldig JSON.","json-required":"Feltet må ikke være tomt.","no-connectors":"Ingen stikforbindelser","no-data":"Ingen konfigurationer","no-gateway-found":"Ingen gateway fundet.","no-gateway-matching":"","path-logs":"Sti til logfiler","path-logs-required":"Sti er påkrævet.",remote:"Fjernkonfiguration","remote-logging-level":"Logføringsniveau","remove-entry":"Fjern konfiguration","save-tip":"Gem konfigurationsfil","security-type":"Sikkerhedstype","security-types":{"access-token":"Adgangstoken",tls:"TLS"},storage:"Lagring","storage-max-file-records":"Maks. antal poster i fil","storage-max-files":"Maks. antal filer","storage-max-files-min":"Min. antal er 1.","storage-max-files-pattern":"Antal er ikke gyldigt.","storage-max-files-required":"Antal er påkrævet.","storage-max-records":"Maks. antal poster i lagring","storage-max-records-min":"Min. antal poster er 1.","storage-max-records-pattern":"Antal er ikke gyldigt.","storage-max-records-required":"Maks. antal poster er påkrævet.","storage-pack-size":"Maks. antal pakkestørrelse for begivenhed","storage-pack-size-min":"Min. antal er 1.","storage-pack-size-pattern":"Antal er ikke gyldigt.","storage-pack-size-required":"Maks. antal pakkestørrelse for begivenhed er påkrævet.","storage-path":"Lagringssti","storage-path-required":"Lagringssti er påkrævet.","storage-type":"Lagringstype","storage-types":{"file-storage":"Lagring af filter","memory-storage":"Lagring af hukommelse"},thingsboard:"ThingsBoard","thingsboard-host":"ThingsBoard-vært","thingsboard-host-required":"Vært er påkrævet.","thingsboard-port":"ThingsBoard-port","thingsboard-port-max":"Maks. portnummer er 65535.","thingsboard-port-min":"Min. portnummer er 1.","thingsboard-port-pattern":"Port er ikke gyldig.","thingsboard-port-required":"Port er påkrævet.",tidy:"Tidy","tidy-tip":"Tidy konfig. JSON","title-connectors-json":"","tls-path-ca-certificate":"Sti til CA-certifikat på gateway","tls-path-client-certificate":"Sti til klientcertifikat på gateway","tls-path-private-key":"Sti til privat nøgle på gateway","toggle-fullscreen":"Skift til fuld skærm","transformer-json-config":"Konfiguration JSON*","update-config":"Tilføj/opdater konfiguration JSON"},_o={"add-entry":"Añadir configuración",advanced:"Avanzado","checking-device-activity":"Probando actividad de dispositivo",command:"Comandos Docker","command-copied-message":"Se han copiado los comandos al portapapeles",configuration:"Configuración","connector-add":"Añadir conector","connector-enabled":"Activar conector","connector-name":"Nombre conector","connector-name-required":"Se requiere nombre conector.","connector-type":"Tipo conector","connector-type-required":"Se requiere tipo conector.",connectors:"Conectores","connectors-config":"Configuración de conectores","connectors-table-enabled":"Enabled","connectors-table-name":"Nombre","connectors-table-type":"Tipo","connectors-table-status":"Estado","connectors-table-actions":"Acciones","connectors-table-key":"Clave","connectors-table-class":"Clase","rpc-command-send":"Enviar","rpc-command-result":"Resultado","rpc-command-edit-params":"Editar parametros","gateway-configuration":"Configuración General","create-new-gateway":"Crear un gateway nuevo","create-new-gateway-text":"Crear un nuevo gateway con el nombre: '{{gatewayName}}'?","created-time":"Hora de creación","configuration-delete-dialog-header":"Las configuraciones se borrarán","configuration-delete-dialog-body":"Sólo es posible desactivar la configuración remota, si hay acceso físico al gateway. Se borrarán todas las configuraciones previas.

\nPara desactivar la configuración, introduce el nombre del gateway aquí","configuration-delete-dialog-input":"Nombre Gateway","configuration-delete-dialog-input-required":"Se requiere nombre de gateway","configuration-delete-dialog-confirm":"Desactivar",delete:"Borrar configuración","download-tip":"Descargar fichero de configuración","drop-file":"Arrastra un fichero o",gateway:"Gateway","gateway-exists":"Ya existe un dispositivo con el mismo nombre.","gateway-name":"Nombre de Gateway","gateway-name-required":"Se requiere un nombre de gateway.","gateway-saved":"Configuración de gateway grabada satisfactoriamente.",grpc:"GRPC","grpc-keep-alive-timeout":"Timeout Keep alive (en ms)","grpc-keep-alive-timeout-required":"Se requiere Timeout Keep alive","grpc-keep-alive-timeout-min":"El valor no puede ser menor de 1","grpc-keep-alive-timeout-pattern":"El valor no es válido","grpc-keep-alive":"Keep alive (en ms)","grpc-keep-alive-required":"Se requiere keep alive","grpc-keep-alive-min":"El valor no puede ser menor de 1","grpc-keep-alive-pattern":"El valor keep alive no es válido","grpc-min-time-between-pings":"Tiempo mínimo entre pings (en ms)","grpc-min-time-between-pings-required":"Se requiere tiempo mínimo entre pings","grpc-min-time-between-pings-min":"El valor no puede ser menor de 1","grpc-min-time-between-pings-pattern":"El valor de tiempo mínimo entre pings no es válido","grpc-min-ping-interval-without-data":"Intervalo mínimo sin datos (en ms)","grpc-min-ping-interval-without-data-required":"Se requiere intervalo","grpc-min-ping-interval-without-data-min":"El valor no puede ser menor de 1","grpc-min-ping-interval-without-data-pattern":"El valor de intervalo no es válido","grpc-max-pings-without-data":"Intervalo máximo sin datos","grpc-max-pings-without-data-required":"Se requiere intervalo","grpc-max-pings-without-data-min":"El valor no puede ser menor de 1","grpc-max-pings-without-data-pattern":"El valor de intervalo no es válido","inactivity-check-period-seconds":"Periodo de control de inactividad (en segundos)","inactivity-check-period-seconds-required":"Se requiere periodo","inactivity-check-period-seconds-min":"El valor no puede ser menor de 1","inactivity-check-period-seconds-pattern":"El valor del periodo no es válido","inactivity-timeout-seconds":"Timeout de inactividad (en segundos)","inactivity-timeout-seconds-required":"Se requiere timeout de inactividad","inactivity-timeout-seconds-min":"El valor no puede ser menor de 1","inactivity-timeout-seconds-pattern":"El valor de inactividad no es válido","json-parse":"JSON no válido.","json-required":"El campo no puede estar vacío.",logs:{logs:"Registros",days:"días",hours:"horas",minutes:"minutos",seconds:"segundos","date-format":"Formato de fecha","date-format-required":"Se requiere formato de fecha","log-format":"Formato de registro","log-type":"Tipo de registro","log-format-required":"Se requiere tipo de registro",remote:"Registro remoto","remote-logs":"Registro remoto",local:"Registro local",level:"Nivel de registro","file-path":"Ruta de fichero","file-path-required":"Se requiere ruta de fichero","saving-period":"Periodo de guardado de registros","saving-period-min":"El periodo no puede ser menor que 1","saving-period-required":"Se requiere periodo de guardado","backup-count":"Número de backups","backup-count-min":"El número de backups no puede ser menor que 1","backup-count-required":"Se requiere número de backups"},"min-pack-send-delay":"Tiempo de espera, envío de paquetes (en ms)","min-pack-send-delay-required":"Se requiere tiempo de espera","min-pack-send-delay-min":"El tiempo de espera no puede ser menor que 0","no-connectors":"No hay conectores","no-data":"No hay configuraciones","no-gateway-found":"No se ha encontrado ningún gateway.","no-gateway-matching":" '{{item}}' no encontrado.","path-logs":"Ruta a los archivos de log","path-logs-required":"Ruta requerida.","permit-without-calls":"Permitir Keep alive si llamadas",remote:"Configuración remota","remote-logging-level":"Nivel de logging","remove-entry":"Borrar configuración","remote-shell":"Consola remota","remote-configuration":"Configuración remota",other:"otros","save-tip":"Grabar fichero de configuración","security-type":"Tipo de seguridad","security-types":{"access-token":"Tóken de acceso","username-password":"Usuario y contraseña",tls:"TLS","tls-access-token":"TLS + Tóken de acceso","tls-private-key":"TLS + Clave privada"},"server-port":"Puerto del servidor",statistics:{statistic:"Estadística",statistics:"Estadísticas","statistic-commands-empty":"No hay estadísticas",commands:"Comandos","send-period":"Periodo de envío de estadísticas (en segundos)","send-period-required":"Se requiere periodo de envío","send-period-min":"El periodo de envío no puede ser menor de 60","send-period-pattern":"El periodo de envío no es válido","check-connectors-configuration":"Revisar configuración de conectores (en segundos)","check-connectors-configuration-required":"Se requiere un valor","check-connectors-configuration-min":"El valor no puede ser menor de 1","check-connectors-configuration-pattern":"La configuración no es válida",add:"Añadir comando",timeout:"Timeout","timeout-ms":"Timeout (en ms)","timeout-required":"Se requiere timeout","timeout-min":"El timeout no puede ser menor de 1","timeout-pattern":"El timeout no es válido","attribute-name":"Nombre de atributo","attribute-name-required":"Se requiere nombre de atributo",command:"Comando","command-required":"Se requiere comando",remove:"Borrar comando"},storage:"Grabación","storage-max-file-records":"Número máximo de registros en fichero","storage-max-files":"Número máximo de ficheros","storage-max-files-min":"El número mínimo es 1.","storage-max-files-pattern":"Número no válido.","storage-max-files-required":"Se requiere número.","storage-max-records":"Máximo de registros en el almacén","storage-max-records-min":"El número mínimo es 1.","storage-max-records-pattern":"Número no válido.","storage-max-records-required":"Se requiere número.","storage-read-record-count":"Leer número de entradas en almacén","storage-read-record-count-min":"El número mínimo de entradas es 1.","storage-read-record-count-pattern":"El número no es válido.","storage-read-record-count-required":"Se requiere número de entradas.","storage-max-read-record-count":"Número máximo de entradas en el almacén","storage-max-read-record-count-min":"El número mínimo es 1.","storage-max-read-record-count-pattern":"El número no es válido","storage-max-read-record-count-required":"Se requiere número máximo de entradas.","storage-data-folder-path":"Ruta de carpeta de datos","storage-data-folder-path-required":"Se requiere ruta.","storage-pack-size":"Tamaño máximo de eventos","storage-pack-size-min":"El número mínimo es 1.","storage-pack-size-pattern":"Número no válido.","storage-pack-size-required":"Se requiere número.","storage-path":"Ruta de almacén","storage-path-required":"Se requiere ruta de almacén.","storage-type":"Tipo de almacén","storage-types":{"file-storage":"Almacén en fichero","memory-storage":"Almacén en memoria",sqlite:"SQLITE"},thingsboard:"ThingsBoard",general:"General","thingsboard-host":"Host ThingsBoard","thingsboard-host-required":"Se requiere Host.","thingsboard-port":"Puerto ThingsBoard","thingsboard-port-max":"El puerto máximo es 65535.","thingsboard-port-min":"El puerto mínimo es 1.","thingsboard-port-pattern":"Puerto no válido.","thingsboard-port-required":"Se requiere puerto.",tidy:"Tidy","tidy-tip":"Tidy JSON","title-connectors-json":"Configuración conector {{typeName}}","tls-path-ca-certificate":"Ruta al certificado CA en el gateway","tls-path-client-certificate":"Ruta al certificado cliente en el gateway","messages-ttl-check-in-hours":"Comprobación de TTL de mensajes en horas","messages-ttl-check-in-hours-required":"Campo requerido.","messages-ttl-check-in-hours-min":"El mínimo es 1.","messages-ttl-check-in-hours-pattern":"El número no es válido.","messages-ttl-in-days":"TTL (Time to live) de mensages en días","messages-ttl-in-days-required":"Se requiere TTL de mensajes.","messages-ttl-in-days-min":"El número mínimo es 1.","messages-ttl-in-days-pattern":"El número no es válido.","mqtt-qos":"QoS","mqtt-qos-required":"Se requiere QoS","mqtt-qos-range":"El rango de valores es desde 0 a 1","tls-path-private-key":"Ruta a la clave privada en el gateway","toggle-fullscreen":"Pantalla completa fullscreen","transformer-json-config":"Configuración JSON*","update-config":"Añadir/actualizar configuración JSON",hints:{"remote-configuration":"Habilita la administración y configuración remota del gateway","remote-shell":"Habilita el control remoto del sistema operativo del gateway desde el widget terminal remoto",host:"Hostname o dirección IP del servidor Thingsboard",port:"Puerto del servicio MQTT en el servidor Thingsboard",token:"Access token para el gateway","client-id":"ID de cliente MQTT para el gateway",username:"Usuario MQTT para el gateway",password:"Contraseña MQTT para el gateway","ca-cert":"Ruta al fichero del certificado CA","date-form":"Formato de fecha en los mensajes de registro","data-folder":"Ruta a la carpeta que contendrá los datos (Relativa o absoluta)","log-format":"Formato de mensajes en registro","remote-log":"Habilita el registro remoto y la posterior lectura desde el gateway","backup-count":"Si el contaje de copias de seguridad es mayor que 0, cuando se realice una renovación, no se conservan más que los archivos de recuento de copias de seguridad, los más antíguos se eliminarán",storage:"Provee la configuración para el grabado de datos entrantes antes de que se envíen a la plataforma","max-file-count":"Número máximo de ficheros que se crearán","max-read-count":"Númeo máximo de mensajes a obtener desde el disco y enviados a la plataforma","max-records":"Número máximo de registros que se guardarán en un solo fichero","read-record-count":"Número de mensages a obtener desde el almacenamiento y enviados a la plataforma","max-records-count":"Número máximo de datos en almacenamiento antes de enviar a la plataforma","ttl-check-hour":"Con qué frecuencia el gateway comprobará si los datos están obsoletos","ttl-messages-day":"Número máximo de días para la retención de datos en el almacén",commands:"Comandos para recoger estadísticas adicionales",attribute:"Clave de telemetría para estadísticas",timeout:"Timeout para la ejecución de comandos",command:"El resultado de la ejecución del comando, se usará como valor para la telemetría","check-device-activity":"Habilita la monitorización de cada uno de los dispositivos conectados","inactivity-timeout":"Tiempo tras que el gateway desconectará el dispositivo","inactivity-period":"Periodo de monitorización de actividad en el dispositivo","minimal-pack-delay":"Tiempo de espera entre envío de paquetes de mensajes (Un valor muy bajo, resultará en un aumento de uso de la CPU en el gateway)",qos:"Quality of Service en los mensajes MQTT (0 - at most once, 1 - at least once)","server-port":"Puerto de red en el cual el servidor GRPC escuchará conexiones entrantes.","grpc-keep-alive-timeout":"Tiempo máximo, el cual el servidor esperara un ping keepalive antes de considerar la conexión terminada.","grpc-keep-alive":"Duración entre dos pings keepalive cuando no haya llamada RPC activa.","grpc-min-time-between-pings":"Mínimo tiempo que el servidor debe esperar entre envíos de mensajes de ping","grpc-max-pings-without-data":"Número máximo de pings keepalive que el servidor puede enviar sin recibir ningún dato antes de considerar la conexión terminada.","grpc-min-ping-interval-without-data":"Mínimo tiempo que el servidor debe esperar entre envíos de ping keepalive cuando no haya ningún dato en envío o recepción.","permit-without-calls":"Permitir al servidor mantener la conexión GRPC abierta, cuando no haya llamadas RPC activas."}},Ho={"add-entry":"설정 추가","connector-add":"새로운 연결자 추가","connector-enabled":"Enable connector","connector-name":"Connector name","connector-name-required":"Connector name is required.","connector-type":"Connector type","connector-type-required":"Connector type is required.",connectors:"Connectors configuration","create-new-gateway":"Create a new gateway","create-new-gateway-text":"Are you sure you want create a new gateway with name: '{{gatewayName}}'?",delete:"Delete configuration","download-tip":"Download configuration file",gateway:"Gateway","gateway-exists":"Device with same name is already exists.","gateway-name":"Gateway name","gateway-name-required":"Gateway name is required.","gateway-saved":"Gateway configuration successfully saved.","json-parse":"Not valid JSON.","json-required":"Field cannot be empty.","no-connectors":"No connectors","no-data":"No configurations","no-gateway-found":"No gateway found.","no-gateway-matching":" '{{item}}' not found.","path-logs":"Path to log files","path-logs-required":"Path is required.",remote:"Remote configuration","remote-logging-level":"Logging level","remove-entry":"Remove configuration","save-tip":"Save configuration file","security-type":"Security type","security-types":{"access-token":"Access Token",tls:"TLS"},storage:"Storage","storage-max-file-records":"Maximum records in file","storage-max-files":"Maximum number of files","storage-max-files-min":"Minimum number is 1.","storage-max-files-pattern":"Number is not valid.","storage-max-files-required":"Number is required.","storage-max-records":"Maximum records in storage","storage-max-records-min":"Minimum number of records is 1.","storage-max-records-pattern":"Number is not valid.","storage-max-records-required":"Maximum records is required.","storage-pack-size":"Maximum event pack size","storage-pack-size-min":"Minimum number is 1.","storage-pack-size-pattern":"Number is not valid.","storage-pack-size-required":"Maximum event pack size is required.","storage-path":"Storage path","storage-path-required":"Storage path is required.","storage-type":"Storage type","storage-types":{"file-storage":"File storage","memory-storage":"Memory storage"},thingsboard:"ThingsBoard","thingsboard-host":"ThingsBoard host","thingsboard-host-required":"Host is required.","thingsboard-port":"ThingsBoard port","thingsboard-port-max":"Maximum port number is 65535.","thingsboard-port-min":"Minimum port number is 1.","thingsboard-port-pattern":"Port is not valid.","thingsboard-port-required":"Port is required.",tidy:"Tidy","tidy-tip":"Tidy config JSON","title-connectors-json":"Connector {{typeName}} configuration","tls-path-ca-certificate":"Path to CA certificate on gateway","tls-path-client-certificate":"Path to client certificate on gateway","tls-path-private-key":"Path to private key on gateway","toggle-fullscreen":"Toggle fullscreen","transformer-json-config":"Configuration JSON*","update-config":"Add/update configuration JSON"},zo={"add-entry":"Add configuration",advanced:"Advanced","checking-device-activity":"Checking device activity",command:"Docker commands","command-copied-message":"Docker command has been copied to clipboard",configuration:"Configuration","connector-add":"Add new connector","connector-enabled":"Enable connector","connector-name":"Connector name","connector-name-required":"Connector name is required.","connector-type":"Connector type","connector-type-required":"Connector type is required.",connectors:"Connectors","connectors-config":"Connectors configuration","connectors-table-enabled":"Enabled","connectors-table-name":"Name","connectors-table-type":"Type","connectors-table-status":"Status","connectors-table-actions":"Actions","connectors-table-key":"Key","connectors-table-class":"Class","rpc-command-send":"Send","rpc-command-result":"Result","rpc-command-edit-params":"Edit parameters","gateway-configuration":"General Configuration","docker-label":"In order to run ThingsBoard IoT gateway in docker with credentials for this device you can use the following commands.","create-new-gateway":"Create a new gateway","create-new-gateway-text":"Are you sure you want create a new gateway with name: '{{gatewayName}}'?","created-time":"Created time","configuration-delete-dialog-header":"Configurations will be deleted","configuration-delete-dialog-body":"Turning off Remote Configuration is possible only if there is physical access to the Gateway. All previous configurations will be deleted.

\nTo turn off configuration, enter gateway name below","configuration-delete-dialog-input":"Gateway name","configuration-delete-dialog-input-required":"Gateway name is mandatory","configuration-delete-dialog-confirm":"Turn Off",delete:"Delete configuration","download-tip":"Download configuration file","drop-file":"Drop file here or",gateway:"Gateway","gateway-exists":"Device with same name is already exists.","gateway-name":"Gateway name","gateway-name-required":"Gateway name is required.","gateway-saved":"Gateway configuration successfully saved.",grpc:"GRPC","grpc-keep-alive-timeout":"Keep alive timeout (in ms)","grpc-keep-alive-timeout-required":"Keep alive timeout is required","grpc-keep-alive-timeout-min":"Keep alive timeout can not be less then 1","grpc-keep-alive-timeout-pattern":"Keep alive timeout is not valid","grpc-keep-alive":"Keep alive (in ms)","grpc-keep-alive-required":"Keep alive is required","grpc-keep-alive-min":"Keep alive can not be less then 1","grpc-keep-alive-pattern":"Keep alive is not valid","grpc-min-time-between-pings":"Min time between pings (in ms)","grpc-min-time-between-pings-required":"Min time between pings is required","grpc-min-time-between-pings-min":"Min time between pings can not be less then 1","grpc-min-time-between-pings-pattern":"Min time between pings is not valid","grpc-min-ping-interval-without-data":"Min ping interval without data (in ms)","grpc-min-ping-interval-without-data-required":"Min ping interval without data is required","grpc-min-ping-interval-without-data-min":"Min ping interval without data can not be less then 1","grpc-min-ping-interval-without-data-pattern":"Min ping interval without data is not valid","grpc-max-pings-without-data":"Max pings without data","grpc-max-pings-without-data-required":"Max pings without data is required","grpc-max-pings-without-data-min":"Max pings without data can not be less then 1","grpc-max-pings-without-data-pattern":"Max pings without data is not valid","inactivity-check-period-seconds":"Inactivity check period (in sec)","inactivity-check-period-seconds-required":"Inactivity check period is required","inactivity-check-period-seconds-min":"Inactivity check period can not be less then 1","inactivity-check-period-seconds-pattern":"Inactivity check period is not valid","inactivity-timeout-seconds":"Inactivity timeout (in sec)","inactivity-timeout-seconds-required":"Inactivity timeout is required","inactivity-timeout-seconds-min":"Inactivity timeout can not be less then 1","inactivity-timeout-seconds-pattern":"Inactivity timeout is not valid","json-parse":"Not valid JSON.","json-required":"Field cannot be empty.",logs:{logs:"Logs",days:"days",hours:"hours",minutes:"minutes",seconds:"seconds","date-format":"Date format","date-format-required":"Date format required","log-format":"Log format","log-type":"Log type","log-format-required":"Log format required",remote:"Remote logging","remote-logs":"Remote logs",local:"Local logging",level:"Log level","file-path":"File path","file-path-required":"File path required","saving-period":"Log saving period","saving-period-min":"Log saving period can not be less then 1","saving-period-required":"Log saving period required","backup-count":"Backup count","backup-count-min":"Backup count can not be less then 1","backup-count-required":"Backup count required"},"min-pack-send-delay":"Min pack send delay (in ms)","min-pack-send-delay-required":"Min pack send delay is required","min-pack-send-delay-min":"Min pack send delay can not be less then 0","no-connectors":"No connectors","no-data":"No configurations","no-gateway-found":"No gateway found.","no-gateway-matching":" '{{item}}' not found.","path-logs":"Path to log files","path-logs-required":"Path is required.","permit-without-calls":"Keep alive permit without calls",remote:"Remote configuration","remote-logging-level":"Logging level","remove-entry":"Remove configuration","remote-shell":"Remote shell","remote-configuration":"Remote Configuration",other:"Other","save-tip":"Save configuration file","security-type":"Security type","security-types":{"access-token":"Access Token","username-password":"Username and Password",tls:"TLS","tls-access-token":"TLS + Access Token","tls-private-key":"TLS + Private Key"},"server-port":"Server port",statistics:{statistic:"Statistic",statistics:"Statistics","statistic-commands-empty":"No statistics available",commands:"Commands","send-period":"Statistic send period (in sec)","send-period-required":"Statistic send period is required","send-period-min":"Statistic send period can not be less then 60","send-period-pattern":"Statistic send period is not valid","check-connectors-configuration":"Check connectors configuration (in sec)","check-connectors-configuration-required":"Check connectors configuration is required","check-connectors-configuration-min":"Check connectors configuration can not be less then 1","check-connectors-configuration-pattern":"Check connectors configuration is not valid",add:"Add command",timeout:"Timeout","timeout-ms":"Timeout (in ms)","timeout-required":"Timeout is required","timeout-min":"Timeout can not be less then 1","timeout-pattern":"Timeout is not valid","attribute-name":"Attribute name","attribute-name-required":"Attribute name is required",command:"Command","command-required":"Command is required",remove:"Remove command"},storage:"Storage","storage-max-file-records":"Maximum records in file","storage-max-files":"Maximum number of files","storage-max-files-min":"Minimum number is 1.","storage-max-files-pattern":"Number is not valid.","storage-max-files-required":"Number is required.","storage-max-records":"Maximum records in storage","storage-max-records-min":"Minimum number of records is 1.","storage-max-records-pattern":"Number is not valid.","storage-max-records-required":"Maximum records is required.","storage-read-record-count":"Read record count in storage","storage-read-record-count-min":"Minimum number of records is 1.","storage-read-record-count-pattern":"Number is not valid.","storage-read-record-count-required":"Read record count is required.","storage-max-read-record-count":"Max read record count in storage","storage-max-read-record-count-min":"Minimum number of records is 1.","storage-max-read-record-count-pattern":"Number is not valid.","storage-max-read-record-count-required":"Max Read record count is required.","storage-data-folder-path":"Data folder path","storage-data-folder-path-required":"Data folder path is required.","storage-pack-size":"Maximum event pack size","storage-pack-size-min":"Minimum number is 1.","storage-pack-size-pattern":"Number is not valid.","storage-pack-size-required":"Maximum event pack size is required.","storage-path":"Storage path","storage-path-required":"Storage path is required.","storage-type":"Storage type","storage-types":{"file-storage":"File storage","memory-storage":"Memory storage",sqlite:"SQLITE"},thingsboard:"ThingsBoard",general:"General","thingsboard-host":"ThingsBoard host","thingsboard-host-required":"Host is required.","thingsboard-port":"ThingsBoard port","thingsboard-port-max":"Maximum port number is 65535.","thingsboard-port-min":"Minimum port number is 1.","thingsboard-port-pattern":"Port is not valid.","thingsboard-port-required":"Port is required.",tidy:"Tidy","tidy-tip":"Tidy config JSON","title-connectors-json":"Connector {{typeName}} configuration","tls-path-ca-certificate":"Path to CA certificate on gateway","tls-path-client-certificate":"Path to client certificate on gateway","messages-ttl-check-in-hours":"Messages TTL check in hours","messages-ttl-check-in-hours-required":"Messages TTL check in hours is required.","messages-ttl-check-in-hours-min":"Min number is 1.","messages-ttl-check-in-hours-pattern":"Number is not valid.","messages-ttl-in-days":"Messages TTL in days","messages-ttl-in-days-required":"Messages TTL in days is required.","messages-ttl-in-days-min":"Min number is 1.","messages-ttl-in-days-pattern":"Number is not valid.","mqtt-qos":"QoS","mqtt-qos-required":"QoS is required","mqtt-qos-range":"QoS values range is from 0 to 1","tls-path-private-key":"Path to private key on gateway","toggle-fullscreen":"Toggle fullscreen","transformer-json-config":"Configuration JSON*","update-config":"Add/update configuration JSON",hints:{"remote-configuration":"Enables remote configuration and management of the gateway","remote-shell":"Enables remote control of the operating system with the gateway from the Remote Shell widget",host:"Hostname or IP address of ThingsBoard server",port:"Port of MQTT service on ThingsBoard server",token:"Access token for the gateway from ThingsBoard server","client-id":"MQTT client id for the gateway form ThingsBoard server",username:"MQTT username for the gateway form ThingsBoard server",password:"MQTT password for the gateway form ThingsBoard server","ca-cert":"Path to CA certificate file","date-form":"Date format in log message","data-folder":"Path to folder, that will contains data (Relative or Absolute)","log-format":"Log message format","remote-log":"Enables remote logging and logs reading from the gateway","backup-count":"If backup count is > 0, when a rollover is done, no more than backup count files are kept - the oldest ones are deleted",storage:"Provides configuration for saving incoming data before it is sent to the platform","max-file-count":"Maximum count of file that will be created","max-read-count":"Count of messages to get from storage and send to ThingsBoard","max-records":"Maximum count of records that will be stored in one file","read-record-count":"Count of messages to get from storage and send to ThingsBoard","max-records-count":"Maximum count of data in storage before send to ThingsBoard","ttl-check-hour":"How often will Gateway check data for obsolescence","ttl-messages-day":"Maximum days that storage will save data",commands:"Commands for collecting additional statistic",attribute:"Statistic telemetry key",timeout:"Timeout for command executing",command:"The result of the command execution, will be used as the value for telemetry","check-device-activity":"Enables monitor the activity of each connected device","inactivity-timeout":"Time after whose the gateway will disconnect device","inactivity-period":"Periodicity of device activity check","minimal-pack-delay":"Delay between sending packs of messages (Decreasing this setting results in increased CPU usage)",qos:"Quality of Service in MQTT messaging (0 - at most once, 1 - at least once)","server-port":"Network port on which GRPC server will listen for incoming connections.","grpc-keep-alive-timeout":"Maximum time the server should wait for a keepalive ping response before considering the connection dead.","grpc-keep-alive":"Duration between two successive keepalive ping messages when there is no active RPC call.","grpc-min-time-between-pings":"Minimum amount of time the server should wait between sending keepalive ping messages","grpc-max-pings-without-data":"Maximum number of keepalive ping messages that the server can send without receiving any data before it considers the connection dead.","grpc-min-ping-interval-without-data":"Minimum amount of time the server should wait between sending keepalive ping messages when there is no data being sent or received.","permit-without-calls":"Allow server to keep the GRPC connection alive even when there are no active RPC calls."}},Wo={"add-entry":"Configuratie toevoegen","connector-add":"Nieuwe connector toevoegen","connector-enabled":"Connector inschakelen","connector-name":"Naam van de connector","connector-name-required":"De naam van de connector is vereist.","connector-type":"Type aansluiting","connector-type-required":"Het type connector is vereist.",connectors:"Configuratie van connectoren","create-new-gateway":"Een nieuwe gateway maken","create-new-gateway-text":"Weet u zeker dat u een nieuwe gateway wilt maken met de naam: '{{gatewayName}}'?",delete:"Configuratie verwijderen","download-tip":"Configuratiebestand downloaden",gateway:"Gateway","gateway-exists":"Device met dezelfde naam bestaat al.","gateway-name":"Naam van de gateway","gateway-name-required":"De naam van de gateway is vereist.","gateway-saved":"Gatewayconfiguratie succesvol opgeslagen.","json-parse":"Ongeldige JSON.","json-required":"Het veld mag niet leeg zijn.","no-connectors":"Geen connectoren","no-data":"Geen configuraties","no-gateway-found":"Geen gateway gevonden.","no-gateway-matching":"'{{item}}' niet gevonden.","path-logs":"Pad naar logbestanden","path-logs-required":"Pad is vereist.",remote:"Configuratie op afstand","remote-logging-level":"Registratie niveau","remove-entry":"Configuratie verwijderen","save-tip":"Configuratiebestand opslaan","security-type":"Soort beveiliging","security-types":{"access-token":"Toegang tot token",tls:"TLS (TLS)"},storage:"Opslag","storage-max-file-records":"Maximum aantal records in bestand","storage-max-files":"Maximaal aantal bestanden","storage-max-files-min":"Minimum aantal is 1.","storage-max-files-pattern":"Nummer is niet geldig.","storage-max-files-required":"Nummer is vereist.","storage-max-records":"Maximum aantal records in opslag","storage-max-records-min":"Minimum aantal records is 1.","storage-max-records-pattern":"Nummer is niet geldig.","storage-max-records-required":"Maximale records zijn vereist.","storage-pack-size":"Maximale pakketgrootte voor events","storage-pack-size-min":"Minimum aantal is 1.","storage-pack-size-pattern":"Nummer is niet geldig.","storage-pack-size-required":"De maximale pakketgrootte van het event is vereist.","storage-path":"Opslag pad","storage-path-required":"Opslagpad is vereist.","storage-type":"Type opslag","storage-types":{"file-storage":"Opslag van bestanden","memory-storage":"Geheugen opslag"},thingsboard:"Dingen Bord","thingsboard-host":"ThingsBoard-gastheer","thingsboard-host-required":"Server host is vereist.","thingsboard-port":"ThingsBoard-poort","thingsboard-port-max":"Het maximale poortnummer is 65535.","thingsboard-port-min":"Het minimale poortnummer is 1.","thingsboard-port-pattern":"Poort is niet geldig.","thingsboard-port-required":"Poort is vereist.",tidy:"Ordelijk","tidy-tip":"Opgeruimde configuratie JSON","title-connectors-json":"Configuratie van connector {{typeName}}","tls-path-ca-certificate":"Pad naar CA-certificaat op gateway","tls-path-client-certificate":"Pad naar clientcertificaat op gateway","tls-path-private-key":"Pad naar privésleutel op gateway","toggle-fullscreen":"Volledig scherm in- en uitschakelen","transformer-json-config":"Configuratie JSON*","update-config":"Configuratie JSON toevoegen/bijwerken"},jo={"add-entry":"Dodaj konfigurację",advanced:"Advanced","checking-device-activity":"Checking device activity",command:"Docker commands","command-copied-message":"Docker command has been copied to clipboard",configuration:"Configuration","connector-add":"Dodaj nowe złącze","connector-enabled":"Włącz złącze","connector-name":"Nazwa złącza","connector-name-required":"Nazwa złącza jest wymagana.","connector-type":"Typ złącza","connector-type-required":"Typ złącza jest wymagany.",connectors:"Konfiguracja złączy","connectors-config":"Connectors configuration","connectors-table-enabled":"Enabled","connectors-table-name":"Name","connectors-table-type":"Type","connectors-table-status":"Status","connectors-table-actions":"Actions","connectors-table-key":"Key","connectors-table-class":"Class","rpc-command-send":"Send","rpc-command-result":"Result","rpc-command-edit-params":"Edit parameters","gateway-configuration":"General Configuration","docker-label":"In order to run ThingsBoard IoT gateway in docker with credentials for this device you can use the following commands.","create-new-gateway":"Utwórz nowy gateway","create-new-gateway-text":"Czy na pewno chcesz utworzyć nowy gateway o nazwie: '{{gatewayName}}'?","created-time":"Created time","configuration-delete-dialog-header":"Configurations will be deleted","configuration-delete-dialog-body":"Turning off Remote Configuration is possible only if there is physical access to the Gateway. All previous configurations will be deleted.

\nTo turn off configuration, enter gateway name below","configuration-delete-dialog-input":"Gateway name","configuration-delete-dialog-input-required":"Gateway name is mandatory","configuration-delete-dialog-confirm":"Turn Off",delete:"Usuń konfigurację","download-tip":"Pobierz plik konfiguracyjny","drop-file":"Drop file here or",gateway:"Wejście","gateway-exists":"Urządzenie o tej samej nazwie już istnieje.","gateway-name":"Nazwa Gateway","gateway-name-required":"Nazwa Gateway'a jest wymagana.","gateway-saved":"Konfiguracja Gatewey'a została pomyślnie zapisana.",grpc:"GRPC","grpc-keep-alive-timeout":"Keep alive timeout (in ms)","grpc-keep-alive-timeout-required":"Keep alive timeout is required","grpc-keep-alive-timeout-min":"Keep alive timeout can not be less then 1","grpc-keep-alive-timeout-pattern":"Keep alive timeout is not valid","grpc-keep-alive":"Keep alive (in ms)","grpc-keep-alive-required":"Keep alive is required","grpc-keep-alive-min":"Keep alive can not be less then 1","grpc-keep-alive-pattern":"Keep alive is not valid","grpc-min-time-between-pings":"Min time between pings (in ms)","grpc-min-time-between-pings-required":"Min time between pings is required","grpc-min-time-between-pings-min":"Min time between pings can not be less then 1","grpc-min-time-between-pings-pattern":"Min time between pings is not valid","grpc-min-ping-interval-without-data":"Min ping interval without data (in ms)","grpc-min-ping-interval-without-data-required":"Min ping interval without data is required","grpc-min-ping-interval-without-data-min":"Min ping interval without data can not be less then 1","grpc-min-ping-interval-without-data-pattern":"Min ping interval without data is not valid","grpc-max-pings-without-data":"Max pings without data","grpc-max-pings-without-data-required":"Max pings without data is required","grpc-max-pings-without-data-min":"Max pings without data can not be less then 1","grpc-max-pings-without-data-pattern":"Max pings without data is not valid","inactivity-check-period-seconds":"Inactivity check period (in sec)","inactivity-check-period-seconds-required":"Inactivity check period is required","inactivity-check-period-seconds-min":"Inactivity check period can not be less then 1","inactivity-check-period-seconds-pattern":"Inactivity check period is not valid","inactivity-timeout-seconds":"Inactivity timeout (in sec)","inactivity-timeout-seconds-required":"Inactivity timeout is required","inactivity-timeout-seconds-min":"Inactivity timeout can not be less then 1","inactivity-timeout-seconds-pattern":"Inactivity timeout is not valid","json-parse":"Nieprawidłowy JSON.","json-required":"Pole nie może być puste.",logs:{logs:"Logs",days:"days",hours:"hours",minutes:"minutes",seconds:"seconds","date-format":"Date format","date-format-required":"Date format required","log-format":"Log format","log-type":"Log type","log-format-required":"Log format required",remote:"Remote logging","remote-logs":"Remote logs",local:"Local logging",level:"Log level","file-path":"File path","file-path-required":"File path required","saving-period":"Log saving period","saving-period-min":"Log saving period can not be less then 1","saving-period-required":"Log saving period required","backup-count":"Backup count","backup-count-min":"Backup count can not be less then 1","backup-count-required":"Backup count required"},"min-pack-send-delay":"Min pack send delay (in ms)","min-pack-send-delay-required":"Min pack send delay is required","min-pack-send-delay-min":"Min pack send delay can not be less then 0","no-connectors":"Brak złączy","no-data":"Brak konfiguracji","no-gateway-found":"Nie znaleziono gateway'a.","no-gateway-matching":" '{{item}}' nie znaleziono.","path-logs":"Ścieżka do plików dziennika","path-logs-required":"Ścieżka jest wymagana.","permit-without-calls":"Keep alive permit without calls",remote:"Zdalna konfiguracja","remote-logging-level":"Poziom logowania","remove-entry":"Usuń konfigurację","remote-shell":"Remote shell","remote-configuration":"Remote Configuration",other:"Other","save-tip":"Zapisz plik konfiguracyjny","security-type":"Rodzaj zabezpieczenia","security-types":{"access-token":"Token dostępu","username-password":"Username and Password",tls:"TLS","tls-access-token":"TLS + Access Token","tls-private-key":"TLS + Private Key"},"server-port":"Server port",statistics:{statistic:"Statistic",statistics:"Statistics","statistic-commands-empty":"No statistics available",commands:"Commands","send-period":"Statistic send period (in sec)","send-period-required":"Statistic send period is required","send-period-min":"Statistic send period can not be less then 60","send-period-pattern":"Statistic send period is not valid","check-connectors-configuration":"Check connectors configuration (in sec)","check-connectors-configuration-required":"Check connectors configuration is required","check-connectors-configuration-min":"Check connectors configuration can not be less then 1","check-connectors-configuration-pattern":"Check connectors configuration is not valid",add:"Add command",timeout:"Timeout","timeout-ms":"Timeout (in ms)","timeout-required":"Timeout is required","timeout-min":"Timeout can not be less then 1","timeout-pattern":"Timeout is not valid","attribute-name":"Attribute name","attribute-name-required":"Attribute name is required",command:"Command","command-required":"Command is required",remove:"Remove command"},storage:"Składowanie","storage-max-file-records":"Maksymalna liczba rekordów w pliku","storage-max-files":"Maksymalna liczba plików","storage-max-files-min":"Minimalna liczba to 1.","storage-max-files-pattern":"Numer jest nieprawidłowy.","storage-max-files-required":"Numer jest wymagany.","storage-max-records":"Maksymalna liczba rekordów w pamięci","storage-max-records-min":"Minimalna liczba rekordów to 1.","storage-max-records-pattern":"Numer jest nieprawidłowy.","storage-max-records-required":"Maksymalna liczba rekordów jest wymagana.","storage-read-record-count":"Read record count in storage","storage-read-record-count-min":"Minimum number of records is 1.","storage-read-record-count-pattern":"Number is not valid.","storage-read-record-count-required":"Read record count is required.","storage-max-read-record-count":"Max read record count in storage","storage-max-read-record-count-min":"Minimum number of records is 1.","storage-max-read-record-count-pattern":"Number is not valid.","storage-max-read-record-count-required":"Max Read record count is required.","storage-data-folder-path":"Data folder path","storage-data-folder-path-required":"Data folder path is required.","storage-pack-size":"Maksymalny rozmiar pakietu wydarzeń","storage-pack-size-min":"Minimalna liczba to 1.","storage-pack-size-pattern":"Numer jest nieprawidłowy.","storage-pack-size-required":"Maksymalny rozmiar pakietu wydarzeń jest wymagany.","storage-path":"Ścieżka przechowywania","storage-path-required":"Ścieżka do przechowywania jest wymagana.","storage-type":"Typ składowania","storage-types":{"file-storage":"Nośnik danych","memory-storage":"Przechowywanie pamięci",sqlite:"SQLITE"},thingsboard:"ThingsBoard",general:"General","thingsboard-host":"Gospodarz ThingsBoard","thingsboard-host-required":"Host jest wymagany.","thingsboard-port":"Port ThingsBoard","thingsboard-port-max":"Maksymalny numer portu to 65535.","thingsboard-port-min":"Minimalny numer portu to 1.","thingsboard-port-pattern":"Port jest nieprawidłowy.","thingsboard-port-required":"Port jest wymagany.",tidy:"Uporządkuj","tidy-tip":"Uporządkowana konfiguracja JSON","title-connectors-json":"Złącze {{typeName}} konfiguracja","tls-path-ca-certificate":"Ścieżka do certyfikatu CA na gateway","tls-path-client-certificate":"Ścieżka do certyfikatu klienta na gateway","messages-ttl-check-in-hours":"Messages TTL check in hours","messages-ttl-check-in-hours-required":"Messages TTL check in hours is required.","messages-ttl-check-in-hours-min":"Min number is 1.","messages-ttl-check-in-hours-pattern":"Number is not valid.","messages-ttl-in-days":"Messages TTL in days","messages-ttl-in-days-required":"Messages TTL in days is required.","messages-ttl-in-days-min":"Min number is 1.","messages-ttl-in-days-pattern":"Number is not valid.","mqtt-qos":"QoS","mqtt-qos-required":"QoS is required","mqtt-qos-range":"QoS values range is from 0 to 1","tls-path-private-key":"Ścieżka do klucza prywatnego na bramce","toggle-fullscreen":"Przełącz tryb pełnoekranowy","transformer-json-config":"Konfiguracja JSON*","update-config":"Dodaj/zaktualizuj konfigurację JSON",hints:{"remote-configuration":"Enables remote configuration and management of the gateway","remote-shell":"Enables remote control of the operating system with the gateway from the Remote Shell widget",host:"Hostname or IP address of ThingsBoard server",port:"Port of MQTT service on ThingsBoard server",token:"Access token for the gateway from ThingsBoard server","client-id":"MQTT client id for the gateway form ThingsBoard server",username:"MQTT username for the gateway form ThingsBoard server",password:"MQTT password for the gateway form ThingsBoard server","ca-cert":"Path to CA certificate file","date-form":"Date format in log message","data-folder":"Path to folder, that will contains data (Relative or Absolute)","log-format":"Log message format","remote-log":"Enables remote logging and logs reading from the gateway","backup-count":"If backup count is > 0, when a rollover is done, no more than backup count files are kept - the oldest ones are deleted",storage:"Provides configuration for saving incoming data before it is sent to the platform","max-file-count":"Maximum count of file that will be created","max-read-count":"Count of messages to get from storage and send to ThingsBoard","max-records":"Maximum count of records that will be stored in one file","read-record-count":"Count of messages to get from storage and send to ThingsBoard","max-records-count":"Maximum count of data in storage before send to ThingsBoard","ttl-check-hour":"How often will Gateway check data for obsolescence","ttl-messages-day":"Maximum days that storage will save data",commands:"Commands for collecting additional statistic",attribute:"Statistic telemetry key",timeout:"Timeout for command executing",command:"The result of the command execution, will be used as the value for telemetry","check-device-activity":"Enables monitor the activity of each connected device","inactivity-timeout":"Time after whose the gateway will disconnect device","inactivity-period":"Periodicity of device activity check","minimal-pack-delay":"Delay between sending packs of messages (Decreasing this setting results in increased CPU usage)",qos:"Quality of Service in MQTT messaging (0 - at most once, 1 - at least once)","server-port":"Network port on which GRPC server will listen for incoming connections.","grpc-keep-alive-timeout":"Maximum time the server should wait for a keepalive ping response before considering the connection dead.","grpc-keep-alive":"Duration between two successive keepalive ping messages when there is no active RPC call.","grpc-min-time-between-pings":"Minimum amount of time the server should wait between sending keepalive ping messages","grpc-max-pings-without-data":"Maximum number of keepalive ping messages that the server can send without receiving any data before it considers the connection dead.","grpc-min-ping-interval-without-data":"Minimum amount of time the server should wait between sending keepalive ping messages when there is no data being sent or received.","permit-without-calls":"Allow server to keep the GRPC connection alive even when there are no active RPC calls."}},Ko={"add-entry":"Adicionar configuração","connector-add":"Adicionar novo conector","connector-enabled":"Habilitar conector","connector-name":"Nome do conector","connector-name-required":"O nome do conector é obrigatório.","connector-type":"Tipo de conector","connector-type-required":"O tipo de conector é obrigatório.",connectors:"Configuração de conectores","create-new-gateway":"Criar um novo gateway","create-new-gateway-text":"Tem certeza de que deseja criar um novo gateway com o nome: '{{gatewayName}}'?",delete:"Excluir configuração","download-tip":"Download de arquivo de configuração",gateway:"Gateway","gateway-exists":"Já existe um dispositivo com o mesmo nome.","gateway-name":"Nome do gateway","gateway-name-required":"O nome do gateway é obrigatório.","gateway-saved":"A configuração do gateway foi salva corretamente.","json-parse":"JSON inválido.","json-required":"O campo não pode estar em branco.","no-connectors":"Sem conectores","no-data":"Sem configurações","no-gateway-found":"Nenhum gateway encontrado.","no-gateway-matching":" '{{item}}' não encontrado.","path-logs":"Caminho para arquivos de log","path-logs-required":"O caminho é obrigatório",remote:"Configuração remota","remote-logging-level":"Nível de registro em log","remove-entry":"Remover configuração","save-tip":"Salvar arquivo de configuração","security-type":"Tipo de segurança","security-types":{"access-token":"Token de Acesso",tls:"TLS"},storage:"Armazenamento","storage-max-file-records":"Número máximo de registros em arquivo","storage-max-files":"Número máximo de arquivos","storage-max-files-min":"O número mínimo é 1.","storage-max-files-pattern":"O número não é válido.","storage-max-files-required":"O número é obrigatório.","storage-max-records":"Número máximo de registros em armazenamento","storage-max-records-min":"O número mínimo de registros é 1.","storage-max-records-pattern":"O número não é válido.","storage-max-records-required":"O número máximo de registros é obrigatório.","storage-pack-size":"Tamanho máximo de pacote de eventos","storage-pack-size-min":"O número mínimo é 1.","storage-pack-size-pattern":"O número não é válido.","storage-pack-size-required":"O tamanho máximo de pacote de eventos é obrigatório.","storage-path":"Caminho de armazenamento","storage-path-required":"O caminho de armazenamento é obrigatório.","storage-type":"Tipo de armazenamento","storage-types":{"file-storage":"Armazenamento de arquivo","memory-storage":"Armazenamento de memória"},thingsboard:"ThingsBoard","thingsboard-host":"Host ThingsBoard","thingsboard-host-required":"O host é obrigatório.","thingsboard-port":"Porta ThingsBoard","thingsboard-port-max":"O número máximo de portas é 65535.","thingsboard-port-min":"O número mínimo de portas é 1.","thingsboard-port-pattern":"A porta não é válida.","thingsboard-port-required":"A porta é obrigatória.",tidy:"Tidy","tidy-tip":"Config Tidy JSON","title-connectors-json":"Configuração do conector {{typeName}}","tls-path-ca-certificate":"Caminho para certificado de Autoridade de Certificação no gateway","tls-path-client-certificate":"Caminho para certificado de cliente no gateway","tls-path-private-key":"Caminho para chave privada no gateway","toggle-fullscreen":"Alternar tela inteira","transformer-json-config":"Configuração JSON*","update-config":"Adicionar/atualizar configuração de JSON"},$o={"add-entry":"Dodaj konfiguracijo","connector-add":"Dodaj nov priključek","connector-enabled":"Omogoči priključek","connector-name":"Ime priključka","connector-name-required":"Ime priključka je obvezno.","connector-type":"Vrsta priključka","connector-type-required":"Zahteva se vrsta priključka.",connectors:"Konfiguracija priključkov","create-new-gateway":"Ustvari nov prehod","create-new-gateway-text":"Ali ste prepričani, da želite ustvariti nov prehod z imenom: '{{gatewayName}}'?",delete:"Izbriši konfiguracijo","download-tip":"Prenos konfiguracijske datoteke",gateway:"Prehod","gateway-exists":"Naprava z istim imenom že obstaja.","gateway-name":"Ime prehoda","gateway-name-required":"Ime prehoda je obvezno.","gateway-saved":"Konfiguracija prehoda je uspešno shranjena.","json-parse":"Neveljaven JSON.","json-required":"Polje ne sme biti prazno.","no-connectors":"Ni priključkov","no-data":"Brez konfiguracij","no-gateway-found":"Prehod ni najden.","no-gateway-matching":" '{{item}}' ni mogoče najti.","path-logs":"Pot do dnevniških datotek","path-logs-required":"Pot je obvezna.",remote:"Oddaljena konfiguracija","remote-logging-level":"Raven beleženja","remove-entry":"Odstrani konfiguracijo","save-tip":"Shrani konfiguracijsko datoteko","security-type":"Vrsta zaščite","security-types":{"access-token":"Dostopni žeton",tls:"TLS"},storage:"Shramba","storage-max-file-records":"Največ zapisov v datoteki","storage-max-files":"Največje število datotek","storage-max-files-min":"Najmanjše število je 1.","storage-max-files-pattern":"Številka ni veljavna.","storage-max-files-required":"Številka je obvezna.","storage-max-records":"Največ zapisov v pomnilniku","storage-max-records-min":"Najmanjše število zapisov je 1.","storage-max-records-pattern":"Številka ni veljavna.","storage-max-records-required":"Zahtevan je največ zapisov.","storage-pack-size":"Največja velikost paketa dogodkov","storage-pack-size-min":"Najmanjše število je 1.","storage-pack-size-pattern":"Številka ni veljavna.","storage-pack-size-required":"Zahtevana je največja velikost paketa dogodkov.","storage-path":"Pot pomnilnika","storage-path-required":"Zahtevana je pot do pomnilnika.","storage-type":"Vrsta pomnilnika","storage-types":{"file-storage":"Shramba datotek","memory-storage":"Spomin pomnilnika"},thingsboard:"ThingsBoard","thingsboard-host":"Gostitelj ThingsBoard","thingsboard-host-required":"Potreben je gostitelj.","thingsboard-port":"Vrata ThingsBoard","thingsboard-port-max":"Največja številka vrat je 65535.","thingsboard-port-min":"Najmanjša številka vrat je 1.","thingsboard-port-pattern":"Vrata niso veljavna.","thingsboard-port-required":"Potrebna so vrata.",tidy:"Urejeno","tidy-tip":"Urejena konfiguracija JSON","title-connectors-json":"Konfiguracija konektorja {{typeName}}","tls-path-ca-certificate":"Pot do potrdila CA na prehodu","tls-path-client-certificate":"Pot do potrdila stranke na prehodu","tls-path-private-key":"Pot do zasebnega ključa na prehodu","toggle-fullscreen":"Preklop na celozaslonski način","transformer-json-config":"Konfiguracija JSON *","update-config":"Dodaj / posodobi konfiguracijo JSON"},Yo={"add-entry":"Yapılandırma ekle","connector-add":"Yeni bağlayıcı ekle","connector-enabled":"Bağlayıcıyı etkinleştir","connector-name":"Bağlayıcı adı","connector-name-required":"Bağlayıcı adı gerekli.","connector-type":"Bağlayıcı tipi","connector-type-required":"Bağlayıcı türü gerekli.",connectors:"Bağlayıcıların yapılandırması","create-new-gateway":"Yeni bir ağ geçidi oluştur","create-new-gateway-text":"'{{gatewayName}}' adında yeni bir ağ geçidi oluşturmak istediğinizden emin misiniz?",delete:"Yapılandırmayı sil","download-tip":"Yapılandırma dosyasını indirin",gateway:"Ağ geçidi","gateway-exists":"Aynı ada sahip cihaz zaten var.","gateway-name":"Ağ geçidi adı","gateway-name-required":"Ağ geçidi adı gerekli.","gateway-saved":"Ağ geçidi yapılandırması başarıyla kaydedildi.","json-parse":"Geçerli bir JSON değil.","json-required":"Alan boş olamaz.","no-connectors":"Bağlayıcı yok","no-data":"Yapılandırma yok","no-gateway-found":"Ağ geçidi bulunamadı.","no-gateway-matching":" '{{item}}' bulunamadı.","path-logs":"Log dosyaları yolu","path-logs-required":"Log dosyaları dizini gerekli.",remote:"Uzaktan yapılandırma","remote-logging-level":"Loglama seviyesi","remove-entry":"Yapılandırmayı kaldır","save-tip":"Yapılandırma dosyasını kaydet","security-type":"Güvenlik türü","security-types":{"access-token":"Access Token",tls:"TLS"},storage:"Depolama","storage-max-file-records":"Dosyadaki maksimum kayıt","storage-max-files":"Maksimum dosya sayısı","storage-max-files-min":"Minimum sayı 1'dir.","storage-max-files-pattern":"Sayı geçerli değil.","storage-max-files-required":"Sayı gerekli.","storage-max-records":"Depodaki maksimum kayıt","storage-max-records-min":"Minimum kayıt sayısı 1'dir.","storage-max-records-pattern":"Sayı geçerli değil.","storage-max-records-required":"Maksimum kayıt gerekli.","storage-pack-size":"Maksimum etkinlik paketi boyutu","storage-pack-size-min":"Minimum sayı 1'dir.","storage-pack-size-pattern":"Sayı geçerli değil.","storage-pack-size-required":"Maksimum etkinlik paketi boyutu gerekli.","storage-path":"Depolama yolu","storage-path-required":"Depolama yolu gerekli.","storage-type":"Depolama türü","storage-types":{"file-storage":"Dosya depolama","memory-storage":"Bellek depolama"},thingsboard:"ThingsBoard","thingsboard-host":"ThingsBoard host","thingsboard-host-required":"Host gerekli.","thingsboard-port":"ThingsBoard port","thingsboard-port-max":"Maksimum port numarası 65535.","thingsboard-port-min":"Minimum port numarası 1'dir.","thingsboard-port-pattern":"Port geçerli değil.","thingsboard-port-required":"Port gerekli.",tidy:"Tidy","tidy-tip":"Tidy config JSON","title-connectors-json":"Connector {{typeName}} configuration","tls-path-ca-certificate":"Path to CA certificate on gateway","tls-path-client-certificate":"Path to client certificate on gateway","tls-path-private-key":"Path to private key on gateway","toggle-fullscreen":"Toggle fullscreen","transformer-json-config":"Configuration JSON*","update-config":"Add/update configuration JSON"},Qo={"add-entry":"添加配置",advanced:"高级","checking-device-activity":"检查设备活动",command:"Docker命令","command-copied-message":"Docker命令已复制到剪贴板",configuration:"配置","connector-add":"添加连接器","connector-enabled":"启用连接器","connector-name":"连接器名称","connector-name-required":"连接器名称必填。","connector-type":"连接器类型","connector-type-required":"连接器类型必填。",connectors:"连接器配置","connectors-config":"连接器配置","connectors-table-enabled":"已启用","connectors-table-name":"名称","connectors-table-type":"类型","connectors-table-status":"状态","connectors-table-actions":"操作","connectors-table-key":"键","connectors-table-class":"类","rpc-command-send":"发送","rpc-command-result":"结果","rpc-command-edit-params":"编辑参数","gateway-configuration":"通用配置","create-new-gateway":"创建网关","create-new-gateway-text":"确定要创建名为 '{{gatewayName}}' 的新网关?","created-time":"创建时间","configuration-delete-dialog-header":"配置将被删除","configuration-delete-dialog-body":"只有对网关进行物理访问时,才有可能关闭远程配置。所有先前的配置都将被删除。

\n要关闭配置,请在下面输入网关名称","configuration-delete-dialog-input":"网关名称","configuration-delete-dialog-input-required":"网关名称是必需的","configuration-delete-dialog-confirm":"关闭",delete:"删除配置","download-tip":"下载配置","drop-file":"将文件拖放到此处或",gateway:"网关","gateway-exists":"同名设备已存在。","gateway-name":"网关名称","gateway-name-required":"网关名称必填。","gateway-saved":"已成功保存网关配置。",grpc:"GRPC","grpc-keep-alive-timeout":"保持连接超时(毫秒)","grpc-keep-alive-timeout-required":"需要保持连接超时","grpc-keep-alive-timeout-min":"保持连接超时不能小于1","grpc-keep-alive-timeout-pattern":"保持连接超时无效","grpc-keep-alive":"保持连接(毫秒)","grpc-keep-alive-required":"需要保持连接","grpc-keep-alive-min":"保持连接不能小于1","grpc-keep-alive-pattern":"保持连接无效","grpc-min-time-between-pings":"最小Ping间隔(毫秒)","grpc-min-time-between-pings-required":"需要最小Ping间隔","grpc-min-time-between-pings-min":"最小Ping间隔不能小于1","grpc-min-time-between-pings-pattern":"最小Ping间隔无效","grpc-min-ping-interval-without-data":"无数据时的最小Ping间隔(毫秒)","grpc-min-ping-interval-without-data-required":"需要无数据时的最小Ping间隔","grpc-min-ping-interval-without-data-min":"无数据时的最小Ping间隔不能小于1","grpc-min-ping-interval-without-data-pattern":"无数据时的最小Ping间隔无效","grpc-max-pings-without-data":"无数据时的最大Ping数","grpc-max-pings-without-data-required":"需要无数据时的最大Ping数","grpc-max-pings-without-data-min":"无数据时的最大Ping数不能小于1","grpc-max-pings-without-data-pattern":"无数据时的最大Ping数无效","inactivity-check-period-seconds":"不活跃检查期(秒)","inactivity-check-period-seconds-required":"需要不活跃检查期","inactivity-check-period-seconds-min":"不活跃检查期不能小于1","inactivity-check-period-seconds-pattern":"不活跃检查期无效","inactivity-timeout-seconds":"不活跃超时(秒)","inactivity-timeout-seconds-required":"需要不活跃超时","inactivity-timeout-seconds-min":"不活跃超时不能小于1","inactivity-timeout-seconds-pattern":"不活跃超时无效","json-parse":"无效的JSON。","json-required":"字段不能为空。",logs:{logs:"日志",days:"天",hours:"小时",minutes:"分钟",seconds:"秒","date-format":"日期格式","date-format-required":"需要日期格式","log-format":"日志格式","log-type":"日志类型","log-format-required":"需要日志格式",remote:"远程日志记录","remote-logs":"远程日志",local:"本地日志记录",level:"日志级别","file-path":"文件路径","file-path-required":"需要文件路径","saving-period":"日志保存期限","saving-period-min":"日志保存期限不能小于1","saving-period-required":"需要日志保存期限","backup-count":"备份数量","backup-count-min":"备份数量不能小于1","backup-count-required":"需要备份数量"},"min-pack-send-delay":"最小包发送延迟(毫秒)","min-pack-send-delay-required":"最小包发送延迟是必需的","min-pack-send-delay-min":"最小包发送延迟不能小于0","no-connectors":"无连接器","no-data":"没有配置","no-gateway-found":"未找到网关。","no-gateway-matching":"未找到 '{{item}}' 。","path-logs":"日志文件的路径","path-logs-required":"路径是必需的。","permit-without-calls":"保持连接许可,无需响应",remote:"远程配置","remote-logging-level":"日志记录级别","remove-entry":"删除配置","remote-shell":"远程Shell","remote-configuration":"远程配置",other:"其他","save-tip":"保存配置","security-type":"安全类型","security-types":{"access-token":"访问令牌","username-password":"用户名和密码",tls:"TLS","tls-access-token":"TLS + 访问令牌","tls-private-key":"TLS + 私钥"},"server-port":"服务器端口",statistics:{statistic:"统计信息",statistics:"统计信息","statistic-commands-empty":"无可用统计信息",commands:"命令","send-period":"统计信息发送周期(秒)","send-period-required":"统计信息发送周期是必需的","send-period-min":"统计信息发送周期不能小于60","send-period-pattern":"统计信息发送周期无效","check-connectors-configuration":"检查连接器配置(秒)","check-connectors-configuration-required":"检查连接器配置是必需的","check-connectors-configuration-min":"检查连接器配置不能小于1","check-connectors-configuration-pattern":"检查连接器配置无效",add:"添加命令",timeout:"超时时间","timeout-ms":"超时时间(毫秒)","timeout-required":"超时时间是必需的","timeout-min":"超时时间不能小于1","timeout-pattern":"超时时间无效","attribute-name":"属性名称","attribute-name-required":"属性名称是必需的",command:"命令","command-required":"命令是必需的","command-pattern":"命令无效",remove:"删除命令"},storage:"存储","storage-max-file-records":"文件中的最大记录数","storage-max-files":"最大文件数","storage-max-files-min":"最小值为1。","storage-max-files-pattern":"数字无效。","storage-max-files-required":"数字是必需的。","storage-max-records":"存储中的最大记录数","storage-max-records-min":"最小记录数为1。","storage-max-records-pattern":"数字无效。","storage-max-records-required":"最大记录项必填。","storage-read-record-count":"存储中的读取记录数","storage-read-record-count-min":"最小记录数为1。","storage-read-record-count-pattern":"数字不合法。","storage-read-record-count-required":"需要读取记录数。","storage-max-read-record-count":"存储中的最大读取记录数","storage-max-read-record-count-min":"最小记录数为1。","storage-max-read-record-count-pattern":"数字不合法。","storage-max-read-record-count-required":"最大读取记录数必需。","storage-data-folder-path":"数据文件夹路径","storage-data-folder-path-required":"需要数据文件夹路径。","storage-pack-size":"最大事件包大小","storage-pack-size-min":"最小值为1。","storage-pack-size-pattern":"数字无效。","storage-pack-size-required":"最大事件包大小必填。","storage-path":"存储路径","storage-path-required":"存储路径必填。","storage-type":"存储类型","storage-types":{"file-storage":"文件存储","memory-storage":"内存存储",sqlite:"SQLITE"},thingsboard:"ThingsBoard",general:"常规","thingsboard-host":"ThingsBoard主机","thingsboard-host-required":"主机必填。","thingsboard-port":"ThingsBoard端口","thingsboard-port-max":"最大端口号为65535。","thingsboard-port-min":"最小端口号为1。","thingsboard-port-pattern":"端口无效。","thingsboard-port-required":"端口必填。",tidy:"整理","tidy-tip":"整理配置JSON","title-connectors-json":"连接器 {{typeName}} 配置","tls-path-ca-certificate":"网关上CA证书的路径","tls-path-client-certificate":"网关上客户端证书的路径","messages-ttl-check-in-hours":"消息TTL检查小时数","messages-ttl-check-in-hours-required":"需要提供消息TTL检查小时数。","messages-ttl-check-in-hours-min":"最小值为1。","messages-ttl-check-in-hours-pattern":"数字无效。","messages-ttl-in-days":"消息TTL天数","messages-ttl-in-days-required":"需要提供消息TTL天数。","messages-ttl-in-days-min":"最小值为1。","messages-ttl-in-days-pattern":"数字无效。","mqtt-qos":"QoS","mqtt-qos-required":"需要提供QoS","mqtt-qos-range":"QoS值的范围是从0到1","tls-path-private-key":"网关上私钥的路径","toggle-fullscreen":"切换全屏","transformer-json-config":"配置JSON*","update-config":"添加/更新配置JSON",hints:{"remote-configuration":"启用对网关的远程配置和管理","remote-shell":"通过远程Shell小部件启用对网关操作系统的远程控制",host:"ThingsBoard 主机名或IP地址",port:"ThingsBoard MQTT服务端口",token:"ThingsBoard 网关访问令牌","client-id":"ThingsBoard 网关MQTT客户端ID",username:"ThingsBoard 网关MQTT用户名",password:"ThingsBoard 网关MQTT密码","ca-cert":"CA证书文件的路径","date-form":"日志消息中的日期格式","data-folder":"包含数据的文件夹的路径(相对或绝对路径)","log-format":"日志消息格式","remote-log":"启用对网关的远程日志记录和日志读取","backup-count":"如果备份计数大于0,则在执行轮换时,最多保留备份计数个文件-最旧的文件将被删除",storage:"提供将数据发送到平台之前保存传入数据的配置","max-file-count":"将创建的文件的最大数量","max-read-count":"从存储中获取的消息计数并发送到ThingsBoard","max-records":"一个文件中存储的最大记录数","read-record-count":"从存储中获取的消息计数并发送到ThingsBoard","max-records-count":"在将数据发送到ThingsBoard之前,存储中的最大数据计数","ttl-check-hour":"网关多久检查一次数据是否过时","ttl-messages-day":"存储将保存数据的最大天数",commands:"用于收集附加统计信息的命令",attribute:"统计遥测键",timeout:"命令执行的超时时间",command:"命令执行的结果,将用作遥测的值","check-device-activity":"启用监视每个连接设备的活动","inactivity-timeout":"在此时间后,网关将断开设备的连接","inactivity-period":"设备活动检查的周期","minimal-pack-delay":"发送消息包之间的延迟(减小此设置会导致增加CPU使用率)",qos:"MQTT消息传递的服务质量(0-至多一次,1-至少一次)","server-port":"GRPC服务器侦听传入连接的网络端口","grpc-keep-alive-timeout":"在考虑连接死亡之前,服务器等待keepalive ping响应的最长时间","grpc-keep-alive":"没有活动RPC调用时两个连续keepalive ping消息之间的持续时间","grpc-min-time-between-pings":"服务器在发送keepalive ping消息之间应等待的最小时间量","grpc-max-pings-without-data":"在没有接收到任何数据之前,服务器可以发送的keepalive ping消息的最大数量,然后将连接视为死亡","grpc-min-ping-interval-without-data":"在没有发送或接收数据时,服务器在发送keepalive ping消息之间应等待的最小时间量","permit-without-calls":"允许服务器在没有活动RPC调用时保持GRPC连接活动"},"docker-label":"使用以下指令在 Docker compose 中运行 IoT 网关,并为选定的设备提供凭据","install-docker-compose":"使用以下说明下载、安装和设置 Docker Compose","download-configuration-file":"下载配置文件","download-docker-compose":"下载您的网关的 docker-compose.yml 文件","launch-gateway":"启动网关","launch-docker-compose":"在包含 docker-compose.yml 文件的文件夹中,使用以下命令在终端中启动网关"},Jo={"add-entry":"增加配置","connector-add":"增加新連接器","connector-enabled":"啟用連接器","connector-name":"連接器名稱","connector-name-required":"需要連接器名稱。","connector-type":"連接器類型","connector-type-required":"需要連接器類型。",connectors:"連接器配置","create-new-gateway":"建立新閘道","create-new-gateway-text":"您確定要建立一個名稱為:'{{gatewayName}}'的新閘道嗎?",delete:"刪除配置","download-tip":"下載配置文件",gateway:"閘道","gateway-exists":"同名設備已存在。","gateway-name":"閘道名稱","gateway-name-required":"需要閘道名稱。","gateway-saved":"閘道配置已成功保存。","json-parse":"無效的JSON","json-required":"欄位不能為空。","no-connectors":"無連接器","no-data":"無配置","no-gateway-found":"未找到閘道。","no-gateway-matching":" 未找到'{{item}}'。","path-logs":"日誌文件的路徑","path-logs-required":"需要路徑。",remote:"移除配置","remote-logging-level":"日誌記錄級別","remove-entry":"移除配置","save-tip":"保存配置文件","security-type":"安全類型","security-types":{"access-token":"訪問Token",tls:"TLS"},storage:"貯存","storage-max-file-records":"文件中的最大紀錄","storage-max-files":"最大文件數","storage-max-files-min":"最小數量為1。","storage-max-files-pattern":"號碼無效。","storage-max-files-required":"需要號碼。","storage-max-records":"存儲中的最大紀錄","storage-max-records-min":"最小紀錄數為1。","storage-max-records-pattern":"號碼無效。","storage-max-records-required":"需要最大紀錄數","storage-pack-size":"最大事件包大小","storage-pack-size-min":"最小數量為1。","storage-pack-size-pattern":"號碼無效.","storage-pack-size-required":"需要最大事件包大小","storage-path":"存儲路徑","storage-path-required":"需要存儲路徑。","storage-type":"存儲類型","storage-types":{"file-storage":"文件存儲","memory-storage":"記憶體存儲"},thingsboard:"ThingsBoard","thingsboard-host":"ThingsBoard主機","thingsboard-host-required":"需要主機。","thingsboard-port":"ThingsBoard連接埠","thingsboard-port-max":"最大埠號為 65535。","thingsboard-port-min":"最小埠號為1。","thingsboard-port-pattern":"連接埠無效。","thingsboard-port-required":"需要連接埠。",tidy:"整理","tidy-tip":"整理配置JSON","title-connectors-json":"連接器{{typeName}}配置","tls-path-ca-certificate":"閘道上CA證書的路徑","tls-path-client-certificate":"閘道上用戶端憑據的路徑","tls-path-private-key":"閘道上的私鑰路徑","toggle-fullscreen":"切換全螢幕","transformer-json-config":"配置JSON*","update-config":"增加/更新配置JSON"};const Xo=[ca,pa,Fa,Da,Aa,Na,Pa,eo,Eo,io,ao,oo,qo,to,Go,no];class Zo{constructor(e){this.translate=e,function(e){e.setTranslation("en_US",Oo,!0),e.setTranslation("ar_AE",Ro,!0),e.setTranslation("ca_ES",Vo,!0),e.setTranslation("cs_CZ",Bo,!0),e.setTranslation("da_DK",Uo,!0),e.setTranslation("es_ES",_o,!0),e.setTranslation("ko_KR",Ho,!0),e.setTranslation("lt_LT",zo,!0),e.setTranslation("nl_BE",Wo,!0),e.setTranslation("pl_PL",jo,!0),e.setTranslation("pt_BR",Ko,!0),e.setTranslation("sl_SI",$o,!0),e.setTranslation("tr_TR",Yo,!0),e.setTranslation("zh_CN",Qo,!0),e.setTranslation("zh_TW",Jo,!0)}(e)}static{this.ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Zo,deps:[{token:Y.TranslateService}],target:t.ɵɵFactoryTarget.NgModule})}static{this.ɵmod=t.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"18.2.6",ngImport:t,type:Zo,declarations:[ca,pa,Fa,Da,Aa,Na,Pa,eo,Eo,io,ao,oo,qo,to,Go,no],imports:[H,D,Q,Ma,Ea,qa,va,Ia,Lo,ko,Fo,po,Ao,No,go,Ta,Do,Po,ka,Ca,Sa],exports:[ca,pa,Fa,Da,Aa,Na,Pa,eo,Eo,io,ao,oo,qo,to,Go,no]})}static{this.ɵinj=t.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Zo,providers:[va],imports:[H,D,Q,Ma,Ea,qa,Ia,Lo,ko,Fo,po,Ao,No,go,Do,Po]})}}e("GatewayExtensionModule",Zo),t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"18.2.6",ngImport:t,type:Zo,decorators:[{type:u,args:[{declarations:Xo,imports:[H,D,Q,Ma,Ea,qa,va,Ia,Lo,ko,Fo,po,Ao,No,go,Ta,Do,Po,ka,Ca,Sa],exports:Xo,providers:[va]}]}],ctorParameters:()=>[{type:Y.TranslateService}]})}}}));//# sourceMappingURL=gateway-management-extension.js.map diff --git a/application/src/main/java/org/thingsboard/server/service/entitiy/dashboard/DashboardSyncService.java b/application/src/main/java/org/thingsboard/server/service/entitiy/dashboard/DashboardSyncService.java index ee00b756ab..dcb382263f 100644 --- a/application/src/main/java/org/thingsboard/server/service/entitiy/dashboard/DashboardSyncService.java +++ b/application/src/main/java/org/thingsboard/server/service/entitiy/dashboard/DashboardSyncService.java @@ -23,6 +23,7 @@ import org.springframework.stereotype.Service; import org.thingsboard.server.common.data.ResourceType; import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.msg.queue.ServiceType; +import org.thingsboard.server.dao.resource.ImageService; import org.thingsboard.server.dao.resource.ResourceService; import org.thingsboard.server.dao.widget.WidgetsBundleService; import org.thingsboard.server.queue.discovery.PartitionService; @@ -32,6 +33,7 @@ import org.thingsboard.server.service.sync.GitSyncService; import org.thingsboard.server.service.sync.vc.GitRepository.FileType; import org.thingsboard.server.service.sync.vc.GitRepository.RepoFile; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Stream; @@ -45,6 +47,7 @@ public class DashboardSyncService { private final GitSyncService gitSyncService; private final ResourceService resourceService; + private final ImageService imageService; private final WidgetsBundleService widgetsBundleService; private final PartitionService partitionService; @@ -70,9 +73,14 @@ public class DashboardSyncService { List resources = listFiles("resources"); for (RepoFile resourceFile : resources) { - String data = getFileContent(resourceFile.path()); + byte[] data = getFileContent(resourceFile.path()).getBytes(StandardCharsets.UTF_8); resourceService.createOrUpdateSystemResource(ResourceType.JS_MODULE, resourceFile.name(), data); } + List images = listFiles("images"); + for (RepoFile imageFile : images) { + byte[] data = getFileContent(imageFile.path()).getBytes(StandardCharsets.UTF_8); + imageService.createOrUpdateSystemImage(imageFile.name(), data); + } Stream widgetsBundles = listFiles("widget_bundles").stream() .map(widgetsBundleFile -> getFileContent(widgetsBundleFile.path())); @@ -80,11 +88,8 @@ public class DashboardSyncService { .map(widgetTypeFile -> getFileContent(widgetTypeFile.path())); widgetsBundleService.updateSystemWidgets(widgetsBundles, widgetTypes); - // TODO: read images folder and save images - RepoFile dashboardFile = listFiles("dashboards").get(0); - String dashboardJson = getFileContent(dashboardFile.path()); - resourceService.createOrUpdateSystemResource(ResourceType.DASHBOARD, GATEWAYS_DASHBOARD_KEY, dashboardJson); + resourceService.createOrUpdateSystemResource(ResourceType.DASHBOARD, GATEWAYS_DASHBOARD_KEY, getFileContent(dashboardFile.path()).getBytes(StandardCharsets.UTF_8)); log.info("Gateways dashboard sync completed"); } diff --git a/application/src/main/java/org/thingsboard/server/service/install/InstallScripts.java b/application/src/main/java/org/thingsboard/server/service/install/InstallScripts.java index 911eee78f6..32a13adb23 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/InstallScripts.java +++ b/application/src/main/java/org/thingsboard/server/service/install/InstallScripts.java @@ -416,6 +416,8 @@ public class InstallScripts { } Path resourcesDir = Path.of(getDataDir(), RESOURCES_DIR); + loadSystemResources(resourcesDir.resolve("images"), ResourceType.IMAGE); + loadSystemResources(resourcesDir.resolve("js_modules"), ResourceType.JS_MODULE); loadSystemResources(resourcesDir.resolve("dashboards"), ResourceType.DASHBOARD); } @@ -520,18 +522,21 @@ public class InstallScripts { listDir(dir).forEach(resourceFile -> { String resourceKey = resourceFile.getFileName().toString(); try { - String data = getContent(resourceFile); - TbResource resource = resourceService.createOrUpdateSystemResource(resourceType, resourceKey, data); - log.info("{} resource {}", (resource.getId() == null ? "Created" : "Updated"), resourceKey); + byte[] data = getContent(resourceFile); + if (resourceType == ResourceType.IMAGE) { + imageService.createOrUpdateSystemImage(resourceKey, data); + } else { + resourceService.createOrUpdateSystemResource(resourceType, resourceKey, data); + } } catch (Exception e) { throw new RuntimeException("Unable to load system resource " + resourceFile, e); } }); } - private String getContent(Path file) { + private byte[] getContent(Path file) { try { - return Files.readString(file); + return Files.readAllBytes(file); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ImageService.java b/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ImageService.java index 94c92500aa..fc282f6b74 100644 --- a/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ImageService.java +++ b/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ImageService.java @@ -76,4 +76,6 @@ public interface ImageService { void inlineImagesForEdge(WidgetTypeDetails widgetTypeDetails); + TbResourceInfo createOrUpdateSystemImage(String resourceKey, byte[] data); + } diff --git a/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ResourceService.java b/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ResourceService.java index 529326b14c..9b08ce48c9 100644 --- a/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ResourceService.java +++ b/common/dao-api/src/main/java/org/thingsboard/server/dao/resource/ResourceService.java @@ -88,6 +88,6 @@ public interface ResourceService extends EntityDaoService { List getUsedResources(WidgetTypeDetails widgetTypeDetails); - TbResource createOrUpdateSystemResource(ResourceType resourceType, String resourceKey, String data); + TbResource createOrUpdateSystemResource(ResourceType resourceType, String resourceKey, byte[] data); } diff --git a/dao/src/main/java/org/thingsboard/server/dao/resource/BaseImageService.java b/dao/src/main/java/org/thingsboard/server/dao/resource/BaseImageService.java index cbc03bad51..9bb8538f40 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/resource/BaseImageService.java +++ b/dao/src/main/java/org/thingsboard/server/dao/resource/BaseImageService.java @@ -315,6 +315,30 @@ public class BaseImageService extends BaseResourceService implements ImageServic return result.success(success).build(); } + @Override + public TbResourceInfo createOrUpdateSystemImage(String resourceKey, byte[] data) { + TbResource image; + TbResourceInfo existingImage = findResourceInfoByTenantIdAndKey(TenantId.SYS_TENANT_ID, ResourceType.IMAGE, resourceKey); + if (existingImage != null) { + image = new TbResource(existingImage); + } else { + image = new TbResource(); + image.setTenantId(TenantId.SYS_TENANT_ID); + image.setFileName(resourceKey); + image.setTitle(resourceKey); + image.setResourceKey(resourceKey); + image.setResourceType(ResourceType.IMAGE); + image.setResourceSubType(ResourceSubType.IMAGE); + } + ImageDescriptor descriptor = new ImageDescriptor(); + descriptor.setMediaType(ImageUtils.fileExtensionToMediaType(StringUtils.substringAfterLast(resourceKey, "."))); + image.setDescriptorValue(descriptor); + image.setData(data); + image.setPublic(true); + log.debug("{} system image {}", (image.getId() == null ? "Creating" : "Updating"), resourceKey); + return saveImage(image); + } + @Override public String calculateImageEtag(byte[] imageData) { return calculateEtag(imageData); diff --git a/dao/src/main/java/org/thingsboard/server/dao/resource/BaseResourceService.java b/dao/src/main/java/org/thingsboard/server/dao/resource/BaseResourceService.java index f27e2d29fa..1c5503be20 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/resource/BaseResourceService.java +++ b/dao/src/main/java/org/thingsboard/server/dao/resource/BaseResourceService.java @@ -546,9 +546,9 @@ public class BaseResourceService extends AbstractCachedEntityService