@openremote/or-attribute-input 1.12.0-snapshot.20251204103102 → 1.12.0-snapshot.20251209124232

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@ ${l.shaderPreludeCode.vertexSource}`,define:l.shaderDefine},defaultProjectionDat
67
67
  :host([hidden]) {
68
68
  display: none;
69
69
  }
70
- `,tH([ev({type:String})],tU.prototype,"value",void 0),tH([ev({type:Object})],tU.prototype,"options",void 0),tU=tH([e_("or-translate")],tU),function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aC||(aC={})),function(t){t.LOW="LOW",t.MEDIUM="MEDIUM",t.HIGH="HIGH"}(aM||(aM={})),function(t){t.MANUAL="MANUAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET",t.AGENT="AGENT"}(aS||(aS={})),function(t){t.OPEN="OPEN",t.ACKNOWLEDGED="ACKNOWLEDGED",t.IN_PROGRESS="IN_PROGRESS",t.RESOLVED="RESOLVED",t.CLOSED="CLOSED"}(aL||(aL={})),function(t){t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT",t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT"}(aD||(aD={})),function(t){t.CREATE="CREATE",t.READ="READ",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aI||(aI={})),function(t){t.NONE="NONE",t.FORECAST="FORECAST",t.SETPOINT="SETPOINT"}(aR||(aR={})),function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTING="CONNECTING",t.DISCONNECTING="DISCONNECTING",t.CONNECTED="CONNECTED",t.DISABLED="DISABLED",t.WAITING="WAITING",t.ERROR="ERROR",t.STOPPED="STOPPED"}(aO||(aO={})),function(t){t.EV="EV",t.PHEV="PHEV"}(aP||(aP={})),function(t){t.YAZAKI="YAZAKI",t.MENNEKES="MENNEKES",t.LE_GRAND="LE_GRAND",t.CHADEMO="CHADEMO",t.COMBO="COMBO",t.SCHUKO="SCHUKO",t.ENERGYLOCK="ENERGYLOCK"}(aB||(aB={})),function(t){t.SOUTH="SOUTH",t.EAST_WEST="EAST_WEST"}(aN||(aN={})),function(t){t.REQUEST_START="REQUEST_START",t.REQUEST_REPEATING="REQUEST_REPEATING",t.REQUEST_CANCEL="REQUEST_CANCEL",t.READY="READY",t.COMPLETED="COMPLETED",t.RUNNING="RUNNING",t.CANCELLED="CANCELLED"}(a$||(a$={})),function(t){t.TOGGLE="TOGGLE",t.INCREMENT="INCREMENT",t.DECREMENT="DECREMENT",t.NEGATE="NEGATE"}(az||(az={})),function(t){t.ASSET_NOT_FOUND="ASSET_NOT_FOUND",t.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",t.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",t.INVALID_VALUE="INVALID_VALUE",t.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",t.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",t.CANNOT_PROCESS="CANNOT_PROCESS",t.QUEUE_FULL="QUEUE_FULL",t.UNKNOWN="UNKNOWN",t.ASSET_ID_MISSING="ASSET_ID_MISSING",t.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(aj||(aj={})),function(t){t.PUBLIC="PUBLIC",t.SHARED="SHARED",t.PRIVATE="PRIVATE"}(aY||(aY={})),function(t){t.OFF="OFF",t.ONE_MIN="ONE_MIN",t.FIVE_MIN="FIVE_MIN",t.QUARTER="QUARTER",t.ONE_HOUR="ONE_HOUR"}(aH||(aH={})),function(t){t.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",t.KEEP_LAYOUT="KEEP_LAYOUT",t.REDIRECT="REDIRECT",t.BLOCK_DEVICE="BLOCK_DEVICE"}(aU||(aU={})),function(t){t.MINUTE="MINUTE",t.HOUR="HOUR",t.DAY="DAY",t.WEEK="WEEK",t.MONTH="MONTH",t.YEAR="YEAR"}(aV||(aV={})),function(t){t.MIN="MIN",t.AVG="AVG",t.MAX="MAX",t.DIFFERENCE="DIFFERENCE",t.COUNT="COUNT",t.SUM="SUM",t.MODE="MODE",t.MEDIAN="MEDIAN"}(aW||(aW={})),function(t){t.TERMINATING="TERMINATING",t.DISABLED="DISABLED",t.ALREADY_CONNECTED="ALREADY_CONNECTED",t.UNRECOGNISED="UNRECOGNISED",t.PERMANENT_ERROR="PERMANENT_ERROR",t.SYNC_ERROR="SYNC_ERROR"}(aG||(aG={})),function(t){t.HTTPS="HTTPS",t.HTTP="HTTP",t.TCP="TCP"}(aq||(aq={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.OPTIONS="OPTIONS",t.PATCH="PATCH"}(aZ||(aZ={})),function(t){t.KEYCLOAK="KEYCLOAK",t.BASIC="BASIC",t.NONE="NONE"}(aK||(aK={})),function(t){t.WEBSOCKET="WEBSOCKET",t.POLLING="POLLING"}(aX||(aX={})),function(t){t.VECTOR="VECTOR",t.RASTER="RASTER"}(aJ||(aJ={})),function(t){t.INTERNAL="INTERNAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET"}(aQ||(aQ={})),function(t){t.REALM="REALM",t.USER="USER",t.ASSET="ASSET",t.CUSTOM="CUSTOM"}(a0||(a0={})),function(t){t.NORMAL="NORMAL",t.HIGH="HIGH"}(a1||(a1={})),function(t){t.DEVICE="DEVICE",t.TOPIC="TOPIC",t.CONDITION="CONDITION"}(a2||(a2={})),function(t){t.ALWAYS="ALWAYS",t.ONCE="ONCE",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.ANNUALLY="ANNUALLY"}(a3||(a3={})),function(t){t.MESSAGE_INVALID="MESSAGE_INVALID",t.CERTIFICATE_INVALID="CERTIFICATE_INVALID",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",t.CONFIG_DISABLED="CONFIG_DISABLED",t.USER_DISABLED="USER_DISABLED",t.SERVER_ERROR="SERVER_ERROR",t.ASSET_ERROR="ASSET_ERROR",t.SERVER_BUSY="SERVER_BUSY"}(a5||(a5={})),function(t){t.PRIVATE="PRIVATE",t.PROTECTED="PROTECTED",t.PUBLIC="PUBLIC"}(a4||(a4={})),function(t){t.EXACT="EXACT",t.BEGIN="BEGIN",t.END="END",t.CONTAINS="CONTAINS"}(a6||(a6={})),function(t){t.EQUALS="EQUALS",t.GREATER_THAN="GREATER_THAN",t.GREATER_EQUALS="GREATER_EQUALS",t.LESS_THAN="LESS_THAN",t.LESS_EQUALS="LESS_EQUALS",t.BETWEEN="BETWEEN"}(a8||(a8={})),function(t){t.CREATED_ON="CREATED_ON",t.NAME="NAME",t.ASSET_TYPE="ASSET_TYPE",t.PARENT_ID="PARENT_ID",t.REALM="REALM"}(a7||(a7={})),function(t){t.RESTRICTED="RESTRICTED",t.LINKED="LINKED",t.REALM="REALM"}(a9||(a9={})),function(t){t.AT_LEAST_ONE="AT_LEAST_ONE",t.ALL="ALL",t.NONE="NONE"}(se||(se={})),function(t){t.AND="AND",t.OR="OR"}(st||(st={})),function(t){t.CREATED_ON="CREATED_ON",t.FIRST_NAME="FIRST_NAME",t.LAST_NAME="LAST_NAME",t.USERNAME="USERNAME",t.EMAIL="EMAIL"}(sn||(sn={})),function(t){t.STOPPED="STOPPED",t.RUNNING="RUNNING",t.ERROR="ERROR"}(si||(si={})),function(t){t.JAVASCRIPT="JAVASCRIPT",t.GROOVY="GROOVY",t.JSON="JSON",t.FLOW="FLOW"}(sr||(sr={})),function(t){t.READY="READY",t.DEPLOYED="DEPLOYED",t.COMPILATION_ERROR="COMPILATION_ERROR",t.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",t.EXECUTION_ERROR="EXECUTION_ERROR",t.LOOP_ERROR="LOOP_ERROR",t.DISABLED="DISABLED",t.PAUSED="PAUSED",t.EXPIRED="EXPIRED",t.REMOVED="REMOVED",t.EMPTY="EMPTY"}(so||(so={})),function(t){t.SUNRISE="SUNRISE",t.SUNSET="SUNSET",t.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",t.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",t.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",t.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",t.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",t.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",t.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",t.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",t.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",t.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",t.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",t.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",t.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",t.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",t.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",t.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",t.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",t.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(sa||(sa={})),function(t){t.NUMBER="NUMBER",t.NUMBER_ARRAY="NUMBER_ARRAY",t.STRING="STRING",t.BOOLEAN="BOOLEAN",t.TRIGGER="TRIGGER",t.COLOR="COLOR",t.ANY="ANY"}(ss||(ss={})),function(t){t.NEW_LINE="NEW_LINE",t.SPACER="SPACER"}(sl||(sl={})),function(t){t.INPUT="INPUT",t.PROCESSOR="PROCESSOR",t.OUTPUT="OUTPUT",t.THEN="THEN"}(sc||(sc={})),function(t){t.TEXT="TEXT",t.MULTILINE="MULTILINE",t.NUMBER="NUMBER",t.DROPDOWN="DROPDOWN",t.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",t.CHECKBOX="CHECKBOX",t.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",t.COLOR="COLOR",t.DATE="DATE"}(sd||(sd={})),function(t){t.ADD="ADD",t.ADD_OR_REPLACE="ADD_OR_REPLACE",t.REPLACE="REPLACE",t.DELETE="DELETE",t.CLEAR="CLEAR"}(su||(su={})),function(t){t.PER_ASSET="PER_ASSET",t.GLOBAL="GLOBAL"}(sh||(sh={})),function(t){t.READ_ADMIN="read:admin",t.READ_LOGS="read:logs",t.READ_USERS="read:users",t.READ_MAP="read:map",t.READ_ASSETS="read:assets",t.READ_RULES="read:rules",t.READ_INSIGHTS="read:insights",t.READ_ALARMS="read:alarms",t.READ_SERVICES="read:services",t.WRITE_SERVICES="write:services",t.WRITE_USER="write:user",t.WRITE_ADMIN="write:admin",t.WRITE_LOGS="write:logs",t.WRITE_ASSETS="write:assets",t.WRITE_ATTRIBUTES="write:attributes",t.WRITE_RULES="write:rules",t.WRITE_INSIGHTS="write:insights",t.WRITE_ALARMS="write:alarms",t.READ="read",t.WRITE="write"}(sm||(sm={})),function(t){t.REGISTER="REGISTER",t.UPDATE="UPDATE",t.DEREGISTER="DEREGISTER"}(sf||(sf={})),function(t){t.AVAILABLE="AVAILABLE",t.UNAVAILABLE="UNAVAILABLE"}(sp||(sp={})),function(t){t.ASSET="ASSET",t.AGENT="AGENT",t.NOTIFICATION="NOTIFICATION",t.ALARM="ALARM",t.RULES="RULES",t.PROTOCOL="PROTOCOL",t.GATEWAY="GATEWAY",t.MODEL_AND_VALUES="MODEL_AND_VALUES",t.API="API",t.DATA="DATA"}(sg||(sg={})),function(t){t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(sb||(sb={})),function(t){t.NUMERIC="numeric",t.DIGIT_2="2-digit",t.FULL="full",t.LONG="long",t.MEDIUM="medium",t.SHORT="short",t.NARROW="narrow"}(s_||(s_={})),function(t){t.SECONDLY="SECONDLY",t.MINUTELY="MINUTELY",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.YEARLY="YEARLY"}(sy||(sy={})),function(t){t.OMIT="OMIT",t.BACKWARD="BACKWARD",t.FORWARD="FORWARD"}(sv||(sv={})),function(t){t.JAPANESE="JAPANESE",t.BUDDHIST="BUDDHIST",t.ROC="ROC",t.ISLAMIC="ISLAMIC",t.ISO8601="ISO8601",t.CHINESE="CHINESE",t.ETHIOPIC="ETHIOPIC",t.HEBREW="HEBREW",t.GREGORIAN="GREGORIAN"}(sx||(sx={})),function(t){t.SU="SU",t.MO="MO",t.TU="TU",t.WE="WE",t.TH="TH",t.FR="FR",t.SA="SA"}(sw||(sw={})),function(t){t.PEOPLECOUNTERASSET="PeopleCounterAsset",t.STORAGESIMULATORAGENT="StorageSimulatorAgent",t.CITYASSET="CityAsset",t.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",t.ELECTRICVEHICLEASSET="ElectricVehicleAsset",t.CONSOLEASSET="ConsoleAsset",t.PRESENCESENSORASSET="PresenceSensorAsset",t.LIGHTASSET="LightAsset",t.THETHINGSSTACKAGENT="TheThingsStackAgent",t.PLUGASSET="PlugAsset",t.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",t.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",t.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",t.TCPAGENT="TCPAgent",t.SERIALAGENT="SerialAgent",t.BLUETOOTHMESHAGENT="BluetoothMeshAgent",t.SNMPAGENT="SNMPAgent",t.GROUPASSET="GroupAsset",t.BUILDINGASSET="BuildingAsset",t.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",t.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",t.MQTTAGENT="MQTTAgent",t.MICROPHONEASSET="MicrophoneAsset",t.MODBUSTCPAGENT="ModbusTcpAgent",t.HTTPAGENT="HTTPAgent",t.DOORASSET="DoorAsset",t.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",t.MAILAGENT="MailAgent",t.UDPAGENT="UDPAgent",t.ROOMASSET="RoomAsset",t.VENTILATIONASSET="VentilationAsset",t.TRADFRILIGHTASSET="TradfriLightAsset",t.KNXAGENT="KNXAgent",t.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",t.CHIRPSTACKAGENT="ChirpStackAgent",t.WEATHERASSET="WeatherAsset",t.THINGASSET="ThingAsset",t.WEBSOCKETAGENT="WebsocketAgent",t.GATEWAYASSET="GatewayAsset",t.PARKINGASSET="ParkingAsset",t.TRADFRIPLUGASSET="TradfriPlugAsset",t.SIMULATORAGENT="SimulatorAgent",t.MODBUSSERIALAGENT="ModbusSerialAgent",t.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",t.VELBUSTCPAGENT="VelbusTCPAgent",t.ARTNETLIGHTASSET="ArtnetLightAsset",t.VELBUSSERIALAGENT="VelbusSerialAgent",t.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",t.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",t.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",t.ZWAVEAGENT="ZWaveAgent",t.THERMOSTATASSET="ThermostatAsset",t.SHIPASSET="ShipAsset"}(sF||(sF={})),function(t){t.SUPPORTSEXPORT="supportsExport",t.MQTTPORT="MQTTPort",t.ENERGYSELFCONSUMPTION="energySelfConsumption",t.LASTACCESS="lastAccess",t.CHARGERID="chargerID",t.POSITION="position",t.CARBONSAVING="carbonSaving",t.ROUTINGMODE="routingMode",t.LASTWILLRETAIN="lastWillRetain",t.LASTWILLTOPIC="lastWillTopic",t.SERIALBAUDRATE="serialBaudrate",t.BASEURL="baseURL",t.REQUIREDVALUES="requiredValues",t.FINANCIALSAVING="financialSaving",t.FLEETCATEGORY="fleetCategory",t.GATEWAYSTATUS="gatewayStatus",t.NO2LEVEL="NO2Level",t.ATMOSPHERICPRESSURE="atmosphericPressure",t.TAGS="tags",t.UNLOCK="unlock",t.MILEAGEMIN="mileageMin",t.CHECKINTERVALSECONDS="checkIntervalSeconds",t.LOCATION="location",t.CLIENTSECRET="clientSecret",t.WINDDIRECTION="windDirection",t.WINDSPEED="windSpeed",t.PARTICLESPM10="particlesPM10",t.APPLICATIONKEY="applicationKey",t.POWEREXPORTMAX="powerExportMax",t.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",t.WATERLEVEL="waterLevel",t.CONSOLENAME="consoleName",t.CONNECTHEADERS="connectHeaders",t.WEBSOCKETQUERY="websocketQuery",t.PREFERHTML="preferHTML",t.COOLING="cooling",t.POLLINGMILLIS="pollingMillis",t.SOILTEMPERATURE="soilTemperature",t.SUNIRRADIANCE="sunIrradiance",t.ODOMETER="odometer",t.SUPPORTSIMPORT="supportsImport",t.MESSAGEMAXLENGTH="messageMaxLength",t.WINDGUSTSPEED="windGustSpeed",t.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",t.LIGHTID="lightId",t.POWER="power",t.STREET="street",t.DELETEPROCESSEDMAIL="deleteProcessedMail",t.WINDSPEEDMIN="windSpeedMin",t.POWERSETPOINT="powerSetpoint",t.PRESENCE="presence",t.SPACESOCCUPIED="spacesOccupied",t.STARTTLS="startTLS",t.AGENTSTATUS="agentStatus",t.MESSAGECHARSET="messageCharset",t.CERTIFICATEALIAS="certificateAlias",t.PANELPITCH="panelPitch",t.EMAIL="email",t.BINDPORT="bindPort",t.PARTICLESPM1="particlesPM1",t.SPEED="speed",t.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",t.MESSAGESTRIPDELIMITER="messageStripDelimiter",t.AREA="area",t.COUNTRY="country",t.SHIPTYPE="shipType",t.CONNECTSUBSCRIPTIONS="connectSubscriptions",t.RELATIVEHUMIDITY="relativeHumidity",t.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",t.SOURCEADDRESS="sourceAddress",t.RAINFALL="rainfall",t.ENERGYIMPORTTOTAL="energyImportTotal",t.OAUTHGRANT="oAuthGrant",t.OZONELEVEL="ozoneLevel",t.COUNTINMINUTE="countInMinute",t.PORT="port",t.TUNNELINGSUPPORTED="tunnelingSupported",t.ENINUMBER="ENINumber",t.AGENTDISABLED="agentDisabled",t.DISABLED="disabled",t.FORCECHARGE="forceCharge",t.TIMEINJECTIONINTERVAL="timeInjectionInterval",t.FINANCIALWEIGHTING="financialWeighting",t.ENERGYLEVELPERCENTAGE="energyLevelPercentage",t.SPACESBUFFER="spacesBuffer",t.VEHICLECATEGORY="vehicleCategory",t.FANSPEED="fanSpeed",t.FINANCIALCOST="financialCost",t.NOTES="notes",t.MAILFOLDERNAME="mailFolderName",t.TEMPERATURE="temperature",t.AVAILABLECHARGINGSPACES="availableChargingSpaces",t.ENERGYCAPACITY="energyCapacity",t.POWERIMPORTMIN="powerImportMin",t.INTERVALSIZE="intervalSize",t.SNMPVERSIONVALUE="SNMPVersionValue",t.SOUNDLEVEL="soundLevel",t.UNITID="unitId",t.STOPBITS="stopBits",t.CONNECTURL="connectURL",t.CLIENTID="clientId",t.VEHICLEID="vehicleID",t.SUNAZIMUTH="sunAzimuth",t.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",t.WEBSOCKETMODE="websocketMode",t.COLOURTEMPERATURE="colourTemperature",t.VEHICLECONNECTED="vehicleConnected",t.DATABITS="dataBits",t.MILEAGEMINIMUM="mileageMinimum",t.COLOURRGB="colourRGB",t.CARBONIMPORT="carbonImport",t.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",t.PRICEHOURLY="priceHourly",t.WINDSPEEDMAX="windSpeedMax",t.PINGDISABLED="pingDisabled",t.FLOW="flow",t.CHILDASSETTYPE="childAssetType",t.NETWORKKEY="networkKey",t.UNIVERSE="universe",t.MSSINUMBER="MSSINumber",t.SUBSCRIBEQOS="subscribeQos",t.LEDCOUNT="lEDCount",t.LOCKED="locked",t.CLOUDCOVERAGE="cloudCoverage",t.PROTOCOL="protocol",t.TARIFFIMPORT="tariffImport",t.ENERGYRENEWABLESHARE="energyRenewableShare",t.REGION="region",t.CONSOLEPLATFORM="consolePlatform",t.POWEREXPORTMIN="powerExportMin",t.EFFICIENCYEXPORT="efficiencyExport",t.CHARGECYCLES="chargeCycles",t.SERIALPORT="serialPort",t.APPLICATIONID="applicationId",t.PANELORIENTATION="panelOrientation",t.LENGTH="length",t.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",t.USERNAMEPASSWORD="usernamePassword",t.POWERFORECAST="powerForecast",t.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",t.REQUESTQUERYPARAMETERS="requestQueryParameters",t.PROXYADDRESS="proxyAddress",t.MQTTHOST="MQTTHost",t.ENERGYLOCAL="energyLocal",t.ENERGYAUTARKY="energyAutarky",t.MODEL="model",t.MANUFACTURER="manufacturer",t.ONOFF="onOff",t.RESUMESESSION="resumeSession",t.TARIFFEXPORT="tariffExport",t.APIKEY="ApiKey",t.CITY="city",t.CONNECTORTYPE="connectorType",t.ENERGYEXPORTTOTAL="energyExportTotal",t.CARBONEXPORT="carbonExport",t.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",t.ENERGYLEVEL="energyLevel",t.OPTIMISATIONDISABLED="optimisationDisabled",t.WEBSOCKETPATH="websocketPath",t.WINDSPEEDREFERENCE="windSpeedReference",t.PRICEDAILY="priceDaily",t.COUNTGROWTHMINUTE="countGrowthMinute",t.IMONUMBER="IMONumber",t.ATTRIBUTION="Attribution",t.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",t.REQUESTHEADERS="requestHeaders",t.TENANTID="tenantId",t.HOST="host",t.COUNTOUTMINUTE="countOutMinute",t.ENERGYTYPE="energyType",t.CONSOLEVERSION="consoleVersion",t.MTU="mtu",t.PANELAZIMUTH="panelAzimuth",t.SEQUENCENUMBER="sequenceNumber",t.SUNALTITUDE="sunAltitude",t.COUNTOUT="countOut",t.CHARGERCONNECTED="chargerConnected",t.ROOMNUMBER="roomNumber",t.PARTICLESPM2_5="particlesPM2_5",t.MESSAGESOURCEADDRESS="messageSourceAddress",t.COUNTIN="countIn",t.MILEAGECHARGED="mileageCharged",t.PROVISIONWEATHERASSET="ProvisionWeatherAsset",t.TEMPERATURESETPOINT="temperatureSetpoint",t.CONSOLEPROVIDERS="consoleProviders",t.POWERIMPORTMAX="powerImportMax",t.COUNTTOTAL="countTotal",t.SPACESTOTAL="spacesTotal",t.BINDHOST="bindHost",t.MESSAGECONVERTBINARY="messageConvertBinary",t.MESSAGEDELIMITERS="messageDelimiters",t.EFFICIENCYIMPORT="efficiencyImport",t.SUNZENITH="sunZenith",t.BRIGHTNESS="brightness",t.POSTALCODE="postalCode",t.SPACESOPEN="spacesOpen",t.HUMIDITY="humidity",t.SECUREMODE="secureMode",t.MILEAGECAPACITY="mileageCapacity",t.DIRECTION="direction",t.ENERGYLEVELSCHEDULE="energyLevelSchedule",t.UVINDEX="uVIndex",t.NATMODE="NATMode",t.UPDATEONWRITE="updateOnWrite",t.LASTWILLPAYLOAD="lastWillPayload",t.GROUPID="groupId",t.FOLLOWREDIRECTS="followRedirects",t.CARBONCOST="carbonCost",t.MESSAGECONVERTHEX="messageConvertHex",t.PUBLISHQOS="publishQos"}(sk||(sk={})),function(t){t.FORMAT="format",t.RULESTATE="ruleState",t.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",t.STOREDATAPOINTS="storeDataPoints",t.LABEL="label",t.CONSTRAINTS="constraints",t.SHOWONDASHBOARD="showOnDashboard",t.READONLY="readOnly",t.MULTILINE="multiline",t.ACCESSPUBLICWRITE="accessPublicWrite",t.MOMENTARY="momentary",t.AGENTLINK="agentLink",t.ACCESSRESTRICTEDREAD="accessRestrictedRead",t.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",t.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",t.SECRET="secret",t.ATTRIBUTELINKS="attributeLinks",t.RULERESETIMMEDIATE="ruleResetImmediate",t.AGENTLINKCONFIG="agentLinkConfig",t.FORECAST="forecast",t.UNITS="units",t.USERCONNECTED="userConnected",t.ACCESSPUBLICREAD="accessPublicRead"}(sE||(sE={})),function(t){t.WSURL="WS_URL",t.POSITIVENUMBER="positiveNumber",t.VALUEDESCRIPTOR="valueDescriptor",t.LONG="long",t.BOOLEANMAP="booleanMap",t.MQTTQOS="MQTTQos",t.GEOJSONPOINT="GEO_JSONPoint",t.SNMPVERSION="SNMPVersion",t.ASSETTYPE="assetType",t.JSONOBJECT="JSONObject",t.BIGNUMBER="bigNumber",t.IPADDRESS="IPAddress",t.EMAIL="email",t.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",t.ATTRIBUTEREFERENCE="attributeReference",t.INTEGER="integer",t.OAUTHGRANT="oAuthGrant",t.NUMBER="number",t.TEXTMAP="textMap",t.WEBSOCKETSUBSCRIPTION="websocketSubscription",t.BOOLEAN="boolean",t.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",t.TIMESTAMPISO8601="timestampISO8601",t.MULTIVALUEDTEXTMAP="multivaluedTextMap",t.JSON="JSON",t.INTEGERBYTE="integerByte",t.AGENTLINK="agentLink",t.CALENDAREVENT="calendarEvent",t.CONNECTIONSTATUS="connectionStatus",t.VALUECONSTRAINT="valueConstraint",t.ASSETQUERY="assetQuery",t.COLOURRGB="colourRGB",t.VALUEFORMAT="valueFormat",t.TEXT="text",t.BYTE="byte",t.USERNAMEANDPASSWORD="usernameAndPassword",t.HTTPURL="HTTP_URL",t.ATTRIBUTELINK="attributeLink",t.ASSETID="assetID",t.NUMBERMAP="numberMap",t.HTTPMETHOD="HTTPMethod",t.PANELORIENTATION="panelOrientation",t.ATTRIBUTESTATE="attributeState",t.POSITIVEINTEGER="positiveInteger",t.EXECUTIONSTATUS="executionStatus",t.BIGINTEGER="bigInteger",t.PERIODDURATIONISO8601="periodDurationISO8601",t.DATEANDTIME="dateAndTime",t.CONNECTORTYPE="connectorType",t.NEGATIVEINTEGER="negativeInteger",t.TCPIPPORTNUMBER="TCP_IPPortNumber",t.INTEGERMAP="integerMap",t.ENERGYTYPE="energyType",t.TIMESTAMP="timestamp",t.UUID="UUID",t.FORECASTCONFIGURATION="forecastConfiguration",t.TIMEDURATIONISO8601="timeDurationISO8601",t.CONSOLEPROVIDERS="consoleProviders",t.NEGATIVENUMBER="negativeNumber",t.CRONEXPRESSION="CRONExpression",t.DIRECTION="direction",t.HOSTORIPADDRESS="hostOrIPAddress"}(sT||(sT={})),function(t){t.MONTH="month",t.MILE_SCANDINAVIAN="mile_scandinavian",t.YEAR="year",t.VOLT="volt",t.HERTZ="hertz",t.MILE="mile",t.BTU="btu",t.FOOT="foot",t.MEGA="mega",t.INCH="inch",t.IN_HG="inch_mercury",t.CENTI="centi",t.GRAM="gram",t.KNOT="knot",t.METRE="metre",t.LITRE="litre",t.FLUID_OUNCE="fluid_ounce",t.CELSIUS="celsius",t.DECIBEL="decibel",t.FAHRENHEIT="fahrenheit",t.WATT="watt",t.PEAK="peak",t.MICRO="micro",t.PER="per",t.STONE="stone",t.VAR="var",t.OUNCE="ounce",t.HECTARE="hectare",t.YARD="yard",t.JOULE="joule",t.DEGREE="degree",t.KILO="kilo",t.KELVIN="kelvin",t.CARBON="carbon",t.DECIBEL_ATTENUATED="decibel_attenuated",t.SQUARED="squared",t.PERCENTAGE="percentage",t.CUBED="cubed",t.DAY="day",t.RADIAN="radian",t.OHM="ohm",t.MINUTE="minute",t.PART_PER_MILLION="ppm",t.AMP="amp",t.MASS_POUND="pound",t.HOUR="hour",t.ACRE="acre",t.RPM="rpm",t.PASCAL="pascal",t.LUMEN="lumen",t.WEEK="week",t.GALLON="gallon",t.LUX="lux",t.MILLI="milli",t.BAR="bar",t.HECTO="hecto",t.SECOND="second"}(sA||(sA={})),sC||(sC={});class tV{static getAssetDescriptors(){return tV._assetTypeInfos.map(t=>t.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(t){if(t)return t.assetDescriptor?t:("string"!=typeof t&&(t=t.name),this._assetTypeInfos.find(n=>n.assetDescriptor.name===t))}static getAssetDescriptor(t){if(!t)return;if(t.assetDescriptor)return t.assetDescriptor;if("string"!=typeof t)return t;let n=this._assetTypeInfos.find(n=>n.assetDescriptor.name===t);return n?n.assetDescriptor:void 0}static getAttributeDescriptor(t,n){if(!t)return;let i=this.getAssetTypeInfo(n||"ThingAsset");if(i&&i.attributeDescriptors)return i.attributeDescriptors.find(n=>n.name===t)}static getValueDescriptor(t){let n;if(!t)return;if(t.endsWith("[]"))for(n=0;t.endsWith("[]");)t=t.substring(0,t.length-2),n++;let i=this._valueDescriptors.find(n=>n.name===t);return i&&n&&(i=Object.assign(Object.assign({},i),{arrayDimensions:n})),i}static resolveValueDescriptor(t,n){let i;return n&&("string"==typeof n&&(i=tV.getValueDescriptor(n)),i=n.jsonType?n:tV.getValueDescriptor(n.type)),!i&&t&&(i=tV.getValueDescriptor("JSON")),i}static resolveValueTypeFromValue(t){if(null!=t){if("number"==typeof t)return"number";if("string"==typeof t)return"text";if("boolean"==typeof t)return"boolean";if(Array.isArray(t)){let n=1,i=t.find(t=>null!=t);for(;Array.isArray(i);)i=i.find(t=>null!=t),n++;let r=this.resolveValueTypeFromValue(i);if(!r)return;for(;n>0;)r+="[]",n--;return r}if(t instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(t,n,i){let r,o;if(n&&"string"!=typeof n)r=n;else{let o=this.getAssetTypeInfo(t||"ThingAsset");if(!o)return[void 0,void 0];"string"==typeof n&&(r=this.getAttributeDescriptor(n,o)),!r&&i&&(r={type:i.type,name:i.name,meta:i.meta})}return r&&(o=this.getValueDescriptor(r.type)),[r,o]}static getMetaItemDescriptor(t){if(t)return this._metaItemDescriptors.find(n=>n.name===t)}static getAssetDescriptorColour(t,n){let i=this.getAssetDescriptor(t);return i&&i.colour?i.colour:n}static getAssetDescriptorIcon(t,n){let i=this.getAssetDescriptor(t);return i&&i.icon?i.icon:n}}tV._assetTypeInfos=[],tV._metaItemDescriptors=[],tV._valueDescriptors=[],i(50488);var tW=i(33348),tG=i.n(tW),tq=i(53806),tZ=i.n(tq),tK=i(92891);class tX{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n}),Object.freeze(this)}}function tJ(t,n,i=!0){if(null==t||null==n)return t===n;if(t.constructor!==n.constructor)return!1;if(t instanceof Function||t instanceof RegExp)return t===n;if(t===n||t.valueOf()===n.valueOf())return!0;if(Array.isArray(t)&&t.length!==n.length||t instanceof Date||!(t instanceof Object)||!(n instanceof Object))return!1;if(i){let i=Object.keys(t);return Object.keys(n).every(t=>-1!==i.indexOf(t))&&i.every(i=>tJ(t[i],n[i]))}return!1}function tQ(t){if(null==t)return"";let n=!1;return t.split(/([A-Z]|\d)/).map((t,i,r)=>{if(!t)return t;if(!n)return n=!0,t.charAt(0).toUpperCase()+t.slice(1);if("_"===t)return" ";if(1===t.length&&t===t.toUpperCase()){let n=!r[i-1]||"_"===r[i-1],o=i+1<r.length&&r[i+1]&&"_"!==r[i+1],a=i+3>r.length||!r[i+1]&&!r[i+3];(!n||o)&&(t=" "+t),!o&&(n||a)||(t=t.toLowerCase())}return t}).join("").trim()}function t0(t,n,i){let r="string"==typeof t?t:t.name;return n&&n.meta&&n.meta.hasOwnProperty(r)?n.meta[r]:i&&i.meta?i.meta[r]:void 0}function t1(t,n){let i="string"==typeof t?tV.getMetaItemDescriptor(t):t;return i?{name:i.name,type:i.type,value:n}:{name:typeof t,type:tV.resolveValueTypeFromValue(n),value:n}}function t2(t,n,i,r,o,a){let s=t8("label",t,n,i,o),l="";if(s||(s=t0("label",t,n&&n.meta?n:void 0)),r&&(l=t4(t6("units",t,n,i,o))),!s){let i=t?t.name:n?"string"==typeof n?n:n.name:void 0;s=a||(i?tQ(i):void 0)}return s?s+(l?" ("+l+")":""):l}function t3(t,n,i,r,o,a){let s=t5(t?t.value:void 0,()=>t6("format",t,n,i,o),void 0,a),l=t6("units",t,n,i,!0);return r&&l&&l.length&&(s=t4(t6("units",t,n,i,o),s)),s}function t5(t,n,i,r){let o="";if(null==t)o=r||"";else if("string"==typeof t)o=t;else if("number"==typeof t||"boolean"==typeof t||t instanceof Date){let r=n&&n();if(r&&0!==Object.keys(r).length)switch("number"==typeof t?r.asBoolean?t=!!t:r.asDate&&(t=new Date(t)):"boolean"==typeof t&&r.asNumber&&(t=+!!t),typeof t){case"number":o=new Intl.NumberFormat(i||tY.language,r).format(t);break;case"boolean":r.asOnOff&&(o=t?tY.t("on"):tY.t("off")),r.asOpenClosed&&(o=t?tY.t("open"):tY.t("closed")),r.asPressedReleased&&(o=t?tY.t("pressed"):tY.t("released"));break;case"object":if(r.momentJsFormat)o=tZ()(t).format(r.momentJsFormat);else if(r.iso8601)o=t.toISOString();else if(r.week){var a;let n,i=((a=new Date(Date.UTC((a=t).getFullYear(),a.getMonth(),a.getDate()))).setUTCDate(a.getUTCDate()+4-(a.getUTCDay()||7)),n=new Date(Date.UTC(a.getUTCFullYear(),0,1)),Math.ceil(((a.getTime()-n.getTime())/864e5+1)/7));o="2-digit"===r.week?String(i).padStart(2,"0"):Number(i).toString(10)}else o=new Intl.DateTimeFormat(i||tY.language,r).format(t)}else o=Object(t).toString()}return o}function t4(t,n){if(!t)return"";n||(n="");let i=t.map((t,i)=>{if(3!==t.length||t.toUpperCase()!==t)return tY.t(["units."+t,"or:units."+t]);{let r=new Intl.NumberFormat(tY.language,{currency:t,style:"currency"}).formatToParts();if(0!==i||"currency"!==r[0].type)return"currency"===r[0].type?r[0].value:r[r.length-1].value;if(!n)return r[0].value;n=r[0].value+n}}).join("");return n.length>0?n+" "+i:i}function t6(t,n,i,r,o){let a,s=[],l=t8(t,n&&"string"==typeof n?n:n?n.name:i?"string"==typeof i?i:i.name:void 0,i,r,o);if(l&&(a=JSON.parse(l)))if("format"!==t)return a;else s.push(a);if(n&&n.meta&&(a=t0(t,n,i)))if("format"!==t)return a;else s.push(a);if(i&&"string"!=typeof i&&i.hasOwnProperty(t)){if(a=i[t],"format"!==t)return a;s.push(a)}if(i&&i.type){if(a=tV.getValueDescriptor(i.type)[t],"format"!==t)return a;s.push(a)}if("format"!==t||0===s.length)return a;let c={};return s.reverse().forEach(t=>{c=Object.assign(Object.assign({},c),t)}),c}function t8(t,n,i,r,o,a){let s;if(n?s="string"==typeof n?n:n.name:i&&(s="string"==typeof i?i:i.name),!s)return;let l=[],c=t+"."+(o?"attribute":"meta")+".";if(r&&l.push(c+r+"."+s),i&&"string"!=typeof i&&(l.push(c+i.type+"."+s),l.push(c+i.type)),l.push(c+s),l.length>0)return tY.t(l,{defaultValue:a||""})}function t7(t,n){let i=n.ref.name;if(t.attributes)if(n.deleted)delete t.attributes[i];else{let r=t.attributes[i];r&&(r.value=n.value,r.timestamp=n.timestamp)}return Object.assign({},t)}var t9=function(t,n,i,r){return new(i||(i=Promise))(function(o,a){function s(t){try{c(r.next(t))}catch(t){a(t)}}function l(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var n;t.done?o(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,l)}c((r=r.apply(t,n||[])).next())})};let ne=i(89916);class nt{constructor(t,n,i){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=t,this._autoEnable=n,this._enableCompleteCallback=i,window.OpenRemoteConsole=this;let r=new URLSearchParams(window.location.search),o=r.get("consoleName"),a=r.get("consoleVersion"),s=r.get("consolePlatform"),l=r.get("consoleProviders"),c=r.get("consoleAutoEnable"),d=l&&l.length>0?l.split(" "):["push"];this._pendingProviderEnables=d;let u=nt._createConsoleRegistration(),h=window.localStorage.getItem("OpenRemoteConsole:"+t);if(h)try{let t=JSON.parse(h);t.id&&(u.id=t.id),t.name&&(u.name=t.name),t.providers&&(u.providers=t.providers),t.apps&&(u.apps=t.apps)}catch(t){console.error("Failed to deserialise console registration")}let m=u.providers;for(let t of(u.providers={},d)){let n=m&&m.hasOwnProperty(t)?m[t]:{enabled:!1,disabled:!1};u.providers[t]=n}let f=i$.getAppName();f.length>0&&0>u.apps.indexOf(f)&&u.apps.push(f),this._registration=u,o&&(u.name=o),a&&(u.version=a),s&&(u.platform=s),c&&(this._autoEnable="TRUE"===c||"true"===c)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let t=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return t&&("iP"===t.substring(0,2)||"Mac"===t.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return t9(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let t of Object.keys(this._registration.providers))yield this._initialiseProvider(t);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(t){console.error(t)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return t9(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let t=this._pendingProviderEnables.length-1;t>-1;t--){let n=this._pendingProviderEnables[t];yield this.enableProvider(n)}})}enableProvider(t,n){return t9(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: enabling provider '"+t+"'");let i={provider:t,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:n},r=yield this.sendProviderMessage(i,!0);this._registration.providers[t].hasPermission=r.hasPermission,this._registration.providers[t].success=r.success,this._registration.providers[t].enabled=r.success,this._registration.providers[t].data=r.data;let o=this._pendingProviderEnables.indexOf(t);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),r})}disableProvider(t){return t9(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: disabling provider '"+t+"'");let n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[t].disabled=!0,this._registration.providers[t].enabled=!1,n})}getProvider(t){return this._registration&&this._registration.providers?this._registration.providers[t]:void 0}sendProviderMessage(t,n){return t9(this,void 0,void 0,function*(){if("storage"!==t.provider&&!this._registration.providers.hasOwnProperty(t.provider))throw console.debug("Invalid console provider '"+t.provider+"'"),Error("Invalid console provider '"+t.provider+"'");if(!n)return void this._doSendProviderMessage(t);let i=t.provider+t.action;if(this._pendingProviderPromises[i])throw Error("Message already pending for provider '"+t.provider+"' with action '"+t.action+"'");let r=new tX,o=()=>{delete this._pendingProviderPromises[i],r.reject("No response from provider")};return this._pendingProviderPromises[i]=[r,window.setTimeout(o,5e3)],this._doSendProviderMessage(t),r.promise})}sendRegistration(t){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(t=void 0!==t?t:2e3)+"ms"),new Promise((t,n)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),i$.rest.api.ConsoleResource.register(this._registration).then(n=>{if(200!==n.status)throw Error("Failed to register console");this._registration=n.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),t()})}catch(t){console.error("Failed to register console"),n("Failed to register console")}})})}storeData(t,n){this.sendProviderMessage({provider:"storage",action:"STORE",key:t,value:n},!1)}retrieveData(t){return t9(this,void 0,void 0,function*(){let n=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:t},!0);try{let t=yield Promise.race([n,new Promise((t,n)=>setTimeout(n,2e3))]);if(t&&t.value){let n=t.value;return"null"===n?void 0:n}}catch(t){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(t,n){this._providerMessageListeners[t.provider+t.action]=n}removeProviderMessageListener(t){delete this._providerMessageListeners[t.provider+t.action]}_postNativeShellMessage(t){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(t));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(t)}catch(t){console.error("Failed to send shell message towards console",t)}}_doSendGenericMessage(t,n){let i={type:t,data:n};this.isMobile?this._postNativeShellMessage(i):console.warn("Failed to send generic message to console.",i)}_doSendProviderMessage(t){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:t});else{if(!t.provider||!t.action)return;switch(t.provider.trim().toUpperCase()){case"PUSH":switch(t.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;case"STORAGE":switch(t.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'store' action requires a `key`");null===t.value?window.localStorage.removeItem(n):window.localStorage.setItem(n,JSON.stringify(t.value))}break;case"RETRIEVE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'retrieve' action requires a `key`");let i=window.localStorage.getItem(n);if(null!==i)try{i=JSON.parse(i)}catch(t){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:n,value:i}))}break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;default:console.error("Unsupported provider: "+t.provider)}}}_handleProviderResponse(t){if(!t)return;let n=JSON.parse(t),i=n.provider,r=n.action,o=this._pendingProviderPromises[i+r];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[i+r],o[0].resolve(n));let a=this._providerMessageListeners[i+r];a&&a(n)}_callCompletedCallback(){let t=this._enableCompleteCallback;this._enableCompleteCallback=null,t&&window.setTimeout(()=>{t()},0)}static _createConsoleRegistration(){return{name:ne.name,version:ne.version,platform:ne.os.toString(),apps:[],model:((ne.manufacturer?ne.manufacturer+" ":"")+(ne.product?ne.product:"")).trim()}}_initialiseProvider(t){return t9(this,void 0,void 0,function*(){let n;console.debug("Console: initialising provider '"+t+"'");try{n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_INIT"},!0),this._registration.providers[t].version=n.version,this._registration.providers[t].requiresPermission=n.requiresPermission,this._registration.providers[t].hasPermission=n.hasPermission,this._registration.providers[t].success=n.success,this._registration.providers[t].enabled=n.enabled,this._registration.providers[t].disabled=n.disabled,this._registration.providers[t].data=n.data}catch(t){console.error(t),n={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(n.success||(console.debug("Provider initialisation failed: '"+t+"'"),n.disabled=!0,this._registration.providers[t].disabled=!0),n.disabled||n.enabled){let n=this._pendingProviderEnables.indexOf(t);n>=0&&this._pendingProviderEnables.splice(n,1)}})}}var nn=i(43653),ni=i.n(nn);class nr{constructor(t){this.httpClient=t}createAlarm(t,n,i){return this.httpClient.request({method:"POST",url:nT`alarm`,queryParams:n,data:t,options:i})}getAlarms(t,n){return this.httpClient.request({method:"GET",url:nT`alarm`,queryParams:t,options:n})}removeAlarms(t,n){return this.httpClient.request({method:"DELETE",url:nT`alarm`,data:t,options:n})}setAssetLinks(t,n){return this.httpClient.request({method:"PUT",url:nT`alarm/assets`,data:t,options:n})}getAlarm(t,n){return this.httpClient.request({method:"GET",url:nT`alarm/${t}`,options:n})}removeAlarm(t,n){return this.httpClient.request({method:"DELETE",url:nT`alarm/${t}`,options:n})}updateAlarm(t,n,i){return this.httpClient.request({method:"PUT",url:nT`alarm/${t}`,data:n,options:i})}getAssetLinks(t,n,i){return this.httpClient.request({method:"GET",url:nT`alarm/${t}/assets`,queryParams:n,options:i})}}class no{constructor(t){this.httpClient=t}getAssetDescriptors(t,n){return this.httpClient.request({method:"GET",url:nT`model/assetDescriptors`,queryParams:t,options:n})}getAssetInfo(t,n,i){return this.httpClient.request({method:"GET",url:nT`model/assetInfo/${t}`,queryParams:n,options:i})}getAssetInfos(t,n){return this.httpClient.request({method:"GET",url:nT`model/assetInfos`,queryParams:t,options:n})}getValueDescriptorSchema(t,n){return this.httpClient.request({method:"GET",url:nT`model/getValueDescriptorSchema`,queryParams:t,options:n})}getMetaItemDescriptors(t,n){return this.httpClient.request({method:"GET",url:nT`model/metaItemDescriptors`,queryParams:t,options:n})}getValueDescriptors(t,n){return this.httpClient.request({method:"GET",url:nT`model/valueDescriptors`,queryParams:t,options:n})}}class na{constructor(t){this.httpClient=t}getDatapointExport(t,n){return this.httpClient.request({method:"GET",url:nT`asset/datapoint/export`,queryParams:t,options:n})}getDatapointPeriod(t,n){return this.httpClient.request({method:"GET",url:nT`asset/datapoint/periods`,queryParams:t,options:n})}getDatapoints(t,n,i,r){return this.httpClient.request({method:"POST",url:nT`asset/datapoint/${t}/${n}`,data:i,options:r})}}class ns{constructor(t){this.httpClient=t}getConfig(t){return this.httpClient.request({method:"GET",url:nT`syslog/config`,options:t})}updateConfig(t,n){return this.httpClient.request({method:"PUT",url:nT`syslog/config`,data:t,options:n})}clearEvents(t){return this.httpClient.request({method:"DELETE",url:nT`syslog/event`,options:t})}getEvents(t,n){return this.httpClient.request({method:"GET",url:nT`syslog/event`,queryParams:t,options:n})}}class nl{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nT`realm`,data:t,options:n})}getAll(t){return this.httpClient.request({method:"GET",url:nT`realm`,options:t})}getAccessible(t){return this.httpClient.request({method:"GET",url:nT`realm/accessible`,options:t})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nT`realm/${t}`,options:n})}get(t,n){return this.httpClient.request({method:"GET",url:nT`realm/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nT`realm/${t}`,data:n,options:i})}}class nc{constructor(t){this.httpClient=t}getManagerConfig(t){return this.httpClient.request({method:"GET",url:nT`configuration/manager`,options:t})}update(t,n){return this.httpClient.request({method:"PUT",url:nT`configuration/manager`,data:t,options:n})}fileUpload(t,n,i){return this.httpClient.request({method:"POST",url:nT`configuration/manager/file`,queryParams:n,data:t,options:i})}getManagerConfigImage(t,n){return this.httpClient.request({method:"GET",url:nT`configuration/manager/image/${t}`,options:n})}}class nd{constructor(t){this.httpClient=t}register(t,n){return this.httpClient.request({method:"POST",url:nT`console/register`,data:t,options:n})}}class nu{constructor(t){this.httpClient=t}getAllNodeDefinitions(t){return this.httpClient.request({method:"GET",url:nT`flow`,options:t})}getNodeDefinition(t,n){return this.httpClient.request({method:"GET",url:nT`flow/${t}`,options:n})}getAllNodeDefinitionsByType(t,n){return this.httpClient.request({method:"GET",url:nT`flow/${t}`,options:n})}}class nh{constructor(t){this.httpClient=t}createGlobalRuleset(t,n){return this.httpClient.request({method:"POST",url:nT`rules`,data:t,options:n})}getGlobalRulesets(t,n){return this.httpClient.request({method:"GET",url:nT`rules`,queryParams:t,options:n})}createAssetRuleset(t,n){return this.httpClient.request({method:"POST",url:nT`rules/asset`,data:t,options:n})}getAssetRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nT`rules/asset/for/${t}`,queryParams:n,options:i})}deleteAssetRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nT`rules/asset/${t}`,options:n})}getAssetRuleset(t,n){return this.httpClient.request({method:"GET",url:nT`rules/asset/${t}`,options:n})}updateAssetRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`rules/asset/${t}`,data:n,options:i})}getAssetGeofences(t,n){return this.httpClient.request({method:"GET",url:nT`rules/geofences/${t}`,options:n})}getAssetEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nT`rules/info/asset/${t}`,options:n})}getGlobalEngineInfo(t){return this.httpClient.request({method:"GET",url:nT`rules/info/global`,options:t})}getRealmEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nT`rules/info/realm/${t}`,options:n})}createRealmRuleset(t,n){return this.httpClient.request({method:"POST",url:nT`rules/realm`,data:t,options:n})}getRealmRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nT`rules/realm/for/${t}`,queryParams:n,options:i})}deleteRealmRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nT`rules/realm/${t}`,options:n})}getRealmRuleset(t,n){return this.httpClient.request({method:"GET",url:nT`rules/realm/${t}`,options:n})}updateRealmRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`rules/realm/${t}`,data:n,options:i})}deleteGlobalRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nT`rules/${t}`,options:n})}getGlobalRuleset(t,n){return this.httpClient.request({method:"GET",url:nT`rules/${t}`,options:n})}updateGlobalRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`rules/${t}`,data:n,options:i})}}class nm{constructor(t){this.httpClient=t}getSettings(t){return this.httpClient.request({method:"GET",url:nT`map`,options:t})}saveSettings(t,n){return this.httpClient.request({method:"PUT",url:nT`map`,data:t,options:n})}deleteMap(t){return this.httpClient.request({method:"DELETE",url:nT`map/deleteMap`,options:t})}getCustomMapInfo(t){return this.httpClient.request({method:"GET",url:nT`map/getCustomMapInfo`,options:t})}getSettingsJs(t){return this.httpClient.request({method:"GET",url:nT`map/js`,options:t})}getTile(t,n,i,r){return this.httpClient.request({method:"GET",url:nT`map/tile/${t}/${n}/${i}`,options:r})}uploadMap(t,n){return this.httpClient.request({method:"POST",url:nT`map/upload`,queryParams:t,options:n})}}class nf{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nT`asset`,data:t,options:n})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nT`asset`,queryParams:t,options:n})}writeAttributeValues(t,n){return this.httpClient.request({method:"PUT",url:nT`asset/attributes`,data:t,options:n})}writeAttributeEvents(t,n){return this.httpClient.request({method:"PUT",url:nT`asset/attributes/timestamp`,data:t,options:n})}updateNoneParent(t,n){return this.httpClient.request({method:"DELETE",url:nT`asset/parent`,queryParams:t,options:n})}getPartial(t,n){return this.httpClient.request({method:"GET",url:nT`asset/partial/${t}`,options:n})}queryAssets(t,n){return this.httpClient.request({method:"POST",url:nT`asset/query`,data:t,options:n})}queryAssetTree(t,n){return this.httpClient.request({method:"POST",url:nT`asset/tree`,data:t,options:n})}getCurrentUserAssets(t){return this.httpClient.request({method:"GET",url:nT`asset/user/current`,options:t})}createUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nT`asset/user/link`,data:t,options:n})}getUserAssetLinks(t,n){return this.httpClient.request({method:"GET",url:nT`asset/user/link`,queryParams:t,options:n})}deleteUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nT`asset/user/link/delete`,data:t,options:n})}deleteAllUserAssetLinks(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`asset/user/link/${t}/${n}`,options:i})}deleteUserAssetLink(t,n,i,r){return this.httpClient.request({method:"DELETE",url:nT`asset/user/link/${t}/${n}/${i}`,options:r})}get(t,n){return this.httpClient.request({method:"GET",url:nT`asset/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nT`asset/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`asset/${t}/attribute/${n}`,data:i,options:r})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(t,n,i,r,o){return this.httpClient.request({method:"PUT",url:nT`asset/${t}/attribute/${n}/${i}`,data:r,options:o})}updateParent(t,n,i){return this.httpClient.request({method:"PUT",url:nT`asset/${t}/child`,queryParams:n,options:i})}}class np{constructor(t){this.httpClient=t}updateCurrentUserLocale(t,n){return this.httpClient.request({method:"PUT",url:nT`user/locale`,data:t,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nT`user/query`,data:t,options:n})}requestPasswordResetCurrent(t){return this.httpClient.request({method:"PUT",url:nT`user/request-password-reset`,options:t})}updatePasswordCurrent(t,n){return this.httpClient.request({method:"PUT",url:nT`user/reset-password`,data:t,options:n})}updateCurrent(t,n){return this.httpClient.request({method:"PUT",url:nT`user/update`,data:t,options:n})}getCurrent(t){return this.httpClient.request({method:"GET",url:nT`user/user`,options:t})}getCurrentUserRealmRoles(t){return this.httpClient.request({method:"GET",url:nT`user/userRealmRoles`,options:t})}getCurrentUserClientRoles(t,n){return this.httpClient.request({method:"GET",url:nT`user/userRoles/${t}`,options:n})}disconnectUserSession(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/disconnect/${n}`,options:i})}requestPasswordReset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`user/${t}/request-password-reset/${n}`,options:i})}updatePassword(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`user/${t}/reset-password/${n}`,data:i,options:r})}resetSecret(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/reset-secret/${n}`,options:i})}updateRoles(t,n,i){return this.httpClient.request({method:"PUT",url:nT`user/${t}/roles`,data:n,options:i})}getUserRealmRoles(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/userRealmRoles/${n}`,options:i})}updateUserRealmRoles(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`user/${t}/userRealmRoles/${n}`,data:i,options:r})}getUserClientRoles(t,n,i,r){return this.httpClient.request({method:"GET",url:nT`user/${t}/userRoles/${n}/${i}`,options:r})}updateUserClientRoles(t,n,i,r,o){return this.httpClient.request({method:"PUT",url:nT`user/${t}/userRoles/${n}/${i}`,data:r,options:o})}getUserSessions(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/userSessions/${n}`,options:i})}create(t,n,i){return this.httpClient.request({method:"POST",url:nT`user/${t}/users`,data:n,options:i})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nT`user/${t}/users`,data:n,options:i})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`user/${t}/users/${n}`,options:i})}getClientRoles(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/${n}/roles`,options:i})}updateClientRoles(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`user/${t}/${n}/roles`,data:i,options:r})}get(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/${n}`,options:i})}}class ng{constructor(t){this.httpClient=t}getServices(t,n){return this.httpClient.request({method:"GET",url:nT`service`,queryParams:t,options:n})}registerService(t,n){return this.httpClient.request({method:"POST",url:nT`service`,data:t,options:n})}getGlobalServices(t){return this.httpClient.request({method:"GET",url:nT`service/global`,options:t})}registerGlobalService(t,n){return this.httpClient.request({method:"POST",url:nT`service/global`,data:t,options:n})}deregisterService(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`service/${t}/${n}`,options:i})}getService(t,n,i){return this.httpClient.request({method:"GET",url:nT`service/${t}/${n}`,options:i})}heartbeat(t,n,i){return this.httpClient.request({method:"PUT",url:nT`service/${t}/${n}`,options:i})}}class nb{constructor(t){this.httpClient=t}getApps(t){return this.httpClient.request({method:"GET",url:nT`apps`,options:t})}getConsoleConfig(t){return this.httpClient.request({method:"GET",url:nT`apps/consoleConfig`,options:t})}getAppInfos(t){return this.httpClient.request({method:"GET",url:nT`apps/info`,options:t})}}class n_{constructor(t){this.httpClient=t}startTunnel(t,n){return this.httpClient.request({method:"POST",url:nT`gateway/tunnel`,data:t,options:n})}stopTunnel(t,n){return this.httpClient.request({method:"DELETE",url:nT`gateway/tunnel`,data:t,options:n})}getAllActiveTunnelInfos(t,n){return this.httpClient.request({method:"GET",url:nT`gateway/tunnel/${t}`,options:n})}getGatewayActiveTunnelInfos(t,n,i){return this.httpClient.request({method:"GET",url:nT`gateway/tunnel/${t}/${n}`,options:i})}getActiveTunnelInfo(t,n,i,r,o){return this.httpClient.request({method:"GET",url:nT`gateway/tunnel/${t}/${n}/${i}/${r}`,options:o})}}class ny{constructor(t){this.httpClient=t}createProvisioningConfig(t,n){return this.httpClient.request({method:"POST",url:nT`provisioning`,data:t,options:n})}getProvisioningConfigs(t){return this.httpClient.request({method:"GET",url:nT`provisioning`,options:t})}deleteProvisioningConfig(t,n){return this.httpClient.request({method:"DELETE",url:nT`provisioning/${t}`,options:n})}updateProvisioningConfig(t,n,i){return this.httpClient.request({method:"PUT",url:nT`provisioning/${t}`,data:n,options:i})}}class nv{constructor(t){this.httpClient=t}getNotifications(t,n){return this.httpClient.request({method:"GET",url:nT`notification`,queryParams:t,options:n})}removeNotifications(t,n){return this.httpClient.request({method:"DELETE",url:nT`notification`,queryParams:t,options:n})}sendNotification(t,n){return this.httpClient.request({method:"POST",url:nT`notification/alert`,data:t,options:n})}removeNotification(t,n){return this.httpClient.request({method:"DELETE",url:nT`notification/${t}`,options:n})}notificationAcknowledged(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`notification/${t}/acknowledged`,queryParams:i,data:n,options:r})}notificationDelivered(t,n,i){return this.httpClient.request({method:"PUT",url:nT`notification/${t}/delivered`,queryParams:n,options:i})}}class nx{constructor(t){this.httpClient=t}getPredictedDatapoints(t,n,i,r){return this.httpClient.request({method:"POST",url:nT`asset/predicted/${t}/${n}`,data:i,options:r})}writePredictedDatapoints(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`asset/predicted/${t}/${n}`,data:i,options:r})}}class nw{constructor(t){this.httpClient=t}getHealthStatus(t){return this.httpClient.request({method:"GET",url:nT`health`,options:t})}getInfo(t){return this.httpClient.request({method:"GET",url:nT`info`,options:t})}}class nF{constructor(t){this.httpClient=t}deleteConnections(t,n){return this.httpClient.request({method:"DELETE",url:nT`gateway/connection`,queryParams:t,options:n})}getConnections(t){return this.httpClient.request({method:"GET",url:nT`gateway/connection`,options:t})}deleteConnection(t,n){return this.httpClient.request({method:"DELETE",url:nT`gateway/connection/${t}`,options:n})}getConnection(t,n){return this.httpClient.request({method:"GET",url:nT`gateway/connection/${t}`,options:n})}setConnection(t,n,i){return this.httpClient.request({method:"PUT",url:nT`gateway/connection/${t}`,data:n,options:i})}getConnectionStatus(t,n){return this.httpClient.request({method:"GET",url:nT`gateway/status/${t}`,options:n})}}class nk{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nT`dashboard`,data:t,options:n})}update(t,n){return this.httpClient.request({method:"PUT",url:nT`dashboard`,data:t,options:n})}getAllRealmDashboards(t,n){return this.httpClient.request({method:"GET",url:nT`dashboard/all/${t}`,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nT`dashboard/query`,data:t,options:n})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`dashboard/${t}/${n}`,options:i})}get(t,n,i){return this.httpClient.request({method:"GET",url:nT`dashboard/${t}/${n}`,options:i})}}class nE{constructor(t){this.httpClient=t}doProtocolAssetDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nT`agent/assetDiscovery/${t}`,queryParams:n,options:i})}doProtocolAssetImport(t,n,i,r){return this.httpClient.request({method:"POST",url:nT`agent/assetImport/${t}`,queryParams:i,data:n,options:r})}doProtocolInstanceDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nT`agent/instanceDiscovery/${t}`,queryParams:n,options:i})}}function nT(t,...n){let i="";for(let r=0;r<n.length;r++)i+=t[r],i+=encodeURIComponent(n[r]);return i+t[t.length-1]}class nA{constructor(t,n=ni().create()){this._alarmResource=new nM(t,n),this._assetModelResource=new nS(t,n),this._assetDatapointResource=new nL(t,n),this._syslogResource=new nD(t,n),this._realmResource=new nI(t,n),this._configurationResource=new nR(t,n),this._consoleResource=new nO(t,n),this._flowResource=new nP(t,n),this._rulesResource=new nB(t,n),this._mapResource=new nN(t,n),this._assetResource=new n$(t,n),this._userResource=new nz(t,n),this._externalServiceResource=new nj(t,n),this._appResource=new nY(t,n),this._gatewayServiceResource=new nH(t,n),this._provisioningResource=new nU(t,n),this._notificationResource=new nV(t,n),this._assetPredictedDatapointResource=new nW(t,n),this._statusResource=new nG(t,n),this._gatewayClientResource=new nq(t,n),this._dashboardResource=new nZ(t,n),this._agentResource=new nK(t,n),this._assetResource=new n$(t,n)}get AlarmResource(){return this._alarmResource}get AssetModelResource(){return this._assetModelResource}get AssetDatapointResource(){return this._assetDatapointResource}get SyslogResource(){return this._syslogResource}get RealmResource(){return this._realmResource}get ConfigurationResource(){return this._configurationResource}get ConsoleResource(){return this._consoleResource}get FlowResource(){return this._flowResource}get RulesResource(){return this._rulesResource}get MapResource(){return this._mapResource}get AssetResource(){return this._assetResource}get UserResource(){return this._userResource}get ExternalServiceResource(){return this._externalServiceResource}get AppResource(){return this._appResource}get GatewayServiceResource(){return this._gatewayServiceResource}get ProvisioningResource(){return this._provisioningResource}get NotificationResource(){return this._notificationResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get StatusResource(){return this._statusResource}get GatewayClientResource(){return this._gatewayClientResource}get DashboardResource(){return this._dashboardResource}get AgentResource(){return this._agentResource}}class nC{constructor(t){this.axios=t}request(t){let n={};n.method=t.method,n.url=t.url,n.params=t.queryParams,n.data=t.data,function(t,n){if(void 0!=n)for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i])}(n,t.options);let i=t.copyFn;return this.axios.request(n).then(t=>(i&&t.data&&(t.originalData=t.data,t.data=i(t.data)),t))}}class nM extends nr{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nS extends no{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nL extends na{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nD extends ns{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nI extends nl{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nR extends nc{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nO extends nd{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nP extends nu{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nB extends nh{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nN extends nm{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class n$ extends nf{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nz extends np{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nj extends ng{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nY extends nb{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nH extends n_{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nU extends ny{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nV extends nv{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nW extends nx{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nG extends nw{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nq extends nF{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nZ extends nk{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nK extends nE{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}ni().isAxiosError;let nX=new class{get api(){return this._client}constructor(){this._axiosInstance=ni().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(t=>(t.paramsSerializer=t=>tG().stringify(t,{arrayFormat:"repeat"}),t))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(t){this._axiosInstance.defaults.timeout=t}addRequestInterceptor(t){this._axiosInstance.interceptors.request.use(t)}initialise(t){this._baseUrl=t,this._client=new nA(t,this._axiosInstance)}};var nJ=function(t,n,i,r){return new(i||(i=Promise))(function(o,a){function s(t){try{c(r.next(t))}catch(t){a(t)}}function l(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var n;t.done?o(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,l)}c((r=r.apply(t,n||[])).next())})};!function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING"}(sM||(sM={}));let nQ="SUBSCRIBED:",n0="UNAUTHORIZED:",n1="TRIGGERED:",n2="EVENT:";class n3{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=n5.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=sM.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(t){this._statusCallbacks.push(t)}unsubscribeStatusChange(t){!function(t,n){if(0===t.length)return;let i=t.indexOf(n);i>=0&&t.splice(i,1)}(this._statusCallbacks,t)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===sM.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(sM.CONNECTING),this._connectingDeferred=new tX,this._doConnect().then(t=>{if(this._connectingDeferred){let n=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=n5.MIN_RECONNECT_DELAY,this._onStatusChanged(sM.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),n.resolve(t)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==sM.DISCONNECTED&&this._doDisconnect())}subscribe(t,n){let i={eventSubscription:t,callback:n,deferred:new tX};return null!=this._pendingSubscription||this._status!==sM.CONNECTED?(this._queuedSubscriptions.push(i),i.deferred.promise):(this._pendingSubscription=i,this._doSubscribe(t).then(t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(t,n),this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.resolve(t)}},t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.reject(t)}}),this._pendingSubscription.deferred.promise)}unsubscribe(t){return nJ(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(t))return void this._doUnsubscribe(t);if(this._assetEventCallbackMap.delete(t)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let t=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(t)}return}if(this._attributeEventCallbackMap.delete(t)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let t=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(t)}return}})}sendEvent(t){this._status===sM.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==sM.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(t,n,i){return nJ(this,void 0,void 0,function*(){let r=t&&"string"!=typeof t[0]?t.map(t=>t.id):t,o="AssetEvent"+n3._subscriptionCounter++;if(!this._assetEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"asset",filter:t};this._assetEventPromise=this.subscribe(n,t=>{this._assetEventCallbackMap.forEach(n=>n(t))})}return this._assetEventCallbackMap.set(o,t=>{let n=t.asset.id;r?r.find(t=>n===t)&&i(t):t.asset.realm===i$.displayRealm&&i(t)}),this._assetEventPromise.then(()=>{try{if(r&&n){let t={messageID:"read-assets:"+r.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(t).then(t=>{t.assets&&this._assetEventCallbackMap.has(o)&&t.assets.forEach(t=>{i({eventType:"asset",asset:t,cause:"READ"})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),o&&this.unsubscribe(o),n}return o})})}subscribeAttributeEvents(t,n,i){return nJ(this,void 0,void 0,function*(){let r=t&&"string"!=typeof t[0],o=r?t.map(t=>t.id):t,a=r?t:void 0,s="AttributeEvent"+n3._subscriptionCounter++;if(!this._attributeEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"attribute",filter:t};this._attributeEventPromise=this.subscribe(n,t=>{this._attributeEventCallbackMap.forEach(n=>n(t))})}let l=n=>{let a=n.ref;r?t.forEach(t=>{a.id===t.id&&a.name===t.name&&i(n)}):o?o.find(t=>a.id===t)&&i(n):n.realm===i$.displayRealm&&i(n)};return this._attributeEventCallbackMap.set(s,l),this._attributeEventPromise.then(()=>{try{if(n&&o){let t={messageID:"read-assets:"+o.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(t).then(t=>{t.assets&&this._attributeEventCallbackMap.has(s)&&t.assets.forEach(t=>{t.attributes&&Object.entries(t.attributes).forEach(([n,i])=>{(!a||a.find(i=>i.id===t.id&&i.name===n))&&l({eventType:"attribute",timestamp:i.timestamp,value:i.value,ref:{id:t.id,name:n}})})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),s&&this.unsubscribe(s),n}return s})})}_processNextSubscription(){this._status===sM.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let t=this._queuedSubscriptions.shift();t&&this.subscribe(t.eventSubscription,t.callback).then(n=>{let i=t.deferred;t.deferred=null,i&&i.resolve(n)},n=>{let i=t.deferred;t.deferred=null,i&&i.reject(n)})},0)}_onStatusChanged(t){t!==this._status&&(console.debug("Event provider status changed: "+t),this._status=t,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(n=>n(t))},0))}_onMessageReceived(t,n){let i=this._subscriptionMap.get(t);i&&i.callback(n)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let t in this._subscriptionMap)this._subscriptionMap.has(t)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(t));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===sM.CONNECTED&&this._onStatusChanged(sM.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(sM.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<n5.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(n5.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}n3.MIN_RECONNECT_DELAY=0,n3.MAX_RECONNECT_DELAY=3e4,n3._subscriptionCounter=0;class n5 extends n3{get endpointUrl(){return this._endpointUrl}constructor(t){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(t.startsWith("https:")?"wss":"ws")+"://"+t.substr(t.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let t=this._endpointUrl+"?Realm="+i$.config.realm;return i$.authenticated&&(t+="&Authorization="+i$.getAuthorizationHeader()),this._webSocket=new WebSocket(t),this._connectDeferred=new tX,this._webSocket.onopen=()=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!0)}},this._webSocket.onerror=t=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=t=>{let n=t.data;if(n&&n.startsWith(nQ)){let t=JSON.parse(n.substring(nQ.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&i.resolve(t.subscriptionId)}else if(n.startsWith(n0)){let t=JSON.parse(n.substring(n0.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&(console.warn("Unauthorized event subscription: "+JSON.stringify(t,null,2)),i.reject("Unauthorized"))}else if(n.startsWith(n1)){let t=JSON.parse(n.substring(n1.length));t.events&&t.events.forEach(n=>{this._onMessageReceived(t.subscriptionId,n)})}else if(n.startsWith(n2)){let t=JSON.parse(n.substring(n2.length));if(t.messageID){let n=this._repliesDeferred.get(t.messageID);this._repliesDeferred.delete(t.messageID),n&&n.resolve(t)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var t;null==(t=this._webSocket)||t.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(t){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new tX,t.subscriptionId||(t.subscriptionId=n5._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(t)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(t){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:t}))}_doSend(t){let n=n2+JSON.stringify(t);this._webSocket.send(n)}_doSendWithReply(t){if(t.messageID||(t.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(t.messageID))return Promise.reject("There's already a pending send and reply with this ID");let n=new tX;return this._repliesDeferred.set(t.messageID,n),this._webSocket.send(n2+JSON.stringify(t)),n.promise}}function n4(t){return(n4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n5._subscriptionCounter=1;var n6=[],n8=n6.forEach,n7=n6.slice;function n9(t){return n8.call(n7.call(arguments,1),function(n){if(n)for(var i in n)void 0===t[i]&&(t[i]=n[i])}),t}function ie(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":n4(XMLHttpRequest))==="object"}var it=i(46850),ii=i.t(it,2);function ir(t){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"function"==typeof fetch&&(sS="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),ie()&&("undefined"!=typeof global&&global.XMLHttpRequest?sL=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(sL=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?sD=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(sD=window.ActiveXObject)),sS||!ii||sL||sD||(sS=it||ii),"function"!=typeof sS&&(sS=void 0);var io=function(t,n){if(n&&"object"===ir(n)){var i="";for(var r in n)i+="&"+encodeURIComponent(r)+"="+encodeURIComponent(n[r]);if(!i)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+i.slice(1)}return t},ia=function(t,n,i){sS(t,n).then(function(t){if(!t.ok)return i(t.statusText||"Error",{status:t.status});t.text().then(function(n){i(null,{status:t.status,data:n})}).catch(i)}).catch(i)},is=!1,il=function(t,n,i,r){t.queryStringParams&&(n=io(n,t.queryStringParams));var o=n9({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);i&&(o["Content-Type"]="application/json");var a="function"==typeof t.requestOptions?t.requestOptions(i):t.requestOptions,s=n9({method:i?"POST":"GET",body:i?t.stringify(i):void 0,headers:o},is?{}:a);try{ia(n,s,r)}catch(t){if(!a||0===Object.keys(a).length||!t.message||0>t.message.indexOf("not implemented"))return r(t);try{Object.keys(a).forEach(function(t){delete s[t]}),ia(n,s,r),is=!0}catch(t){r(t)}}},ic=function(t,n,i,r){i&&"object"===ir(i)&&(i=io("",i).slice(1)),t.queryStringParams&&(n=io(n,t.queryStringParams));try{(o=sL?new sL:new sD("MSXML2.XMLHTTP.3.0")).open(i?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,i&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var o,a=t.customHeaders;if(a="function"==typeof a?a():a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(i)}catch(t){console&&console.log(t)}};let id=function(t,n,i,r){return("function"==typeof i&&(r=i,i=void 0),r=r||function(){},sS)?il(t,n,i,r):ie()||"function"==typeof ActiveXObject?ic(t,n,i,r):void r(Error("No fetch and no xhr implementation found!"))};var iu=function(){var t;function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof n))throw TypeError("Cannot call a class as a function");this.services=t,this.options=i,this.allOptions=r,this.type="backend",this.init(t,i,r)}return t=[{key:"init",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=n9(i,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){var r,o;return r={},o=i||"",n in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r},request:id,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval(function(){return n.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,r,o){var a,s,l=this,c=this.options.loadPath;"function"==typeof this.options.loadPath&&(c=this.options.loadPath(t,i)),(c=(s=a=c)&&"function"==typeof s.then?a:Promise.resolve(a)).then(function(a){if(!a)return o(null,{});var s=l.services.interpolator.interpolate(a,{lng:t.join("+"),ns:i.join("+")});l.loadUrl(s,o,n,r)})}},{key:"loadUrl",value:function(t,n,i,r){var o=this;this.options.request(this.options,t,void 0,function(a,s){var l,c;if(s&&(s.status>=500&&s.status<600||!s.status))return n("failed loading "+t+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return n("failed loading "+t+"; status code: "+s.status,!1);if(!s&&a&&a.message&&a.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+a.message,!0);if(a)return n(a,!1);try{l="string"==typeof s.data?o.options.parse(s.data,i,r):s.data}catch(n){c="failed parsing "+t+" to json"}if(c)return n(c,!1);n(null,l)})}},{key:"create",value:function(t,n,i,r,o){var a=this;if(this.options.addPath){"string"==typeof t&&(t=[t]);var s=this.options.parsePayload(n,i,r),l=0,c=[],d=[];t.forEach(function(i){var r=a.options.addPath;"function"==typeof a.options.addPath&&(r=a.options.addPath(i,n));var u=a.services.interpolator.interpolate(r,{lng:i,ns:n});a.options.request(a.options,u,s,function(n,i){l+=1,c.push(n),d.push(i),l===t.length&&o&&o(c,d)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,r=n.languageUtils,o=n.logger,a=i.language;if(!a||"cimode"!==a.toLowerCase()){var s=[],l=function(t){r.toResolveHierarchy(t).forEach(function(t){0>s.indexOf(t)&&s.push(t)})};l(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(t){return l(t)}),s.forEach(function(n){t.allOptions.ns.forEach(function(t){i.read(n,t,"read",null,null,function(r,a){r&&o.warn("loading namespace ".concat(t," for language ").concat(n," failed"),r),!r&&a&&o.log("loaded namespace ".concat(t," for language ").concat(n),a),i.loaded("".concat(n,"|").concat(t),r,a)})})})}}}],function(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();iu.type="backend";class ih extends eA{constructor(t){if(super(t),this.it=ee,t.type!==eE.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ee||null==t)return this._t=void 0,this.it=t;if(t===Q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}ih.directiveName="unsafeHTML",ih.resultType=1,eT(ih);class im extends ih{}im.directiveName="unsafeSVG",im.resultType=2;let ip=eT(im),ig={size:24,icons:{logo:'<path style=\'pointer-events: var(--or-icon-pointer-events, none);\' fill="#C4D600" d="m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z" /><path fill="#4E9D2D" d="m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z"/><path fill="#1D5632"d="m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z"/>',"logo-plain":"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",marker:'<ellipse fill="#000" opacity="0.2" ry="1.5" rx="4" cy="22.5" cx="12" /><path style=\'pointer-events: var(--or-icon-pointer-events, none);\' d="m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z" />'}};var ib=function(t,n,i,r){var o,a=arguments.length,s=a<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(s=(a<3?o(s):a>3?o(n,i,s):o(n,i))||s);return a>3&&s&&Object.defineProperty(n,i,s),s};let i_=i(7319);class iy extends CustomEvent{constructor(){super(iy.NAME,{bubbles:!0,composed:!0})}}iy.NAME="or-iconset-added";let iv=new class{constructor(){this._icons={}}addIconSet(t,n){this._icons[t]=n,this._defaultIconSet||(this._defaultIconSet=n),n.onAdd&&n.onAdd(),window.dispatchEvent(new iy)}getIconSet(t){return this._icons[t]}getIconTemplate(t){if(!t)return X``;let n=(t||"").split(":"),i=n.pop(),r=n.pop(),o=this._defaultIconSet;return(r&&(o=this.getIconSet(r)),i&&o)?o.getIconTemplate(i):X``}},ix=class extends eg{constructor(){super(...arguments),this._handler=t=>{this._updateIcon()}}static get styles(){return[m`
70
+ `,tH([ev({type:String})],tU.prototype,"value",void 0),tH([ev({type:Object})],tU.prototype,"options",void 0),tU=tH([e_("or-translate")],tU),function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aC||(aC={})),function(t){t.LOW="LOW",t.MEDIUM="MEDIUM",t.HIGH="HIGH"}(aM||(aM={})),function(t){t.MANUAL="MANUAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET",t.AGENT="AGENT"}(aS||(aS={})),function(t){t.OPEN="OPEN",t.ACKNOWLEDGED="ACKNOWLEDGED",t.IN_PROGRESS="IN_PROGRESS",t.RESOLVED="RESOLVED",t.CLOSED="CLOSED"}(aL||(aL={})),function(t){t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT",t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT"}(aD||(aD={})),function(t){t.CREATE="CREATE",t.READ="READ",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aI||(aI={})),function(t){t.NONE="NONE",t.FORECAST="FORECAST",t.SETPOINT="SETPOINT"}(aR||(aR={})),function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTING="CONNECTING",t.DISCONNECTING="DISCONNECTING",t.CONNECTED="CONNECTED",t.DISABLED="DISABLED",t.WAITING="WAITING",t.ERROR="ERROR",t.STOPPED="STOPPED"}(aO||(aO={})),function(t){t.EV="EV",t.PHEV="PHEV"}(aP||(aP={})),function(t){t.YAZAKI="YAZAKI",t.MENNEKES="MENNEKES",t.LE_GRAND="LE_GRAND",t.CHADEMO="CHADEMO",t.COMBO="COMBO",t.SCHUKO="SCHUKO",t.ENERGYLOCK="ENERGYLOCK"}(aB||(aB={})),function(t){t.SOUTH="SOUTH",t.EAST_WEST="EAST_WEST"}(aN||(aN={})),function(t){t.REQUEST_START="REQUEST_START",t.REQUEST_REPEATING="REQUEST_REPEATING",t.REQUEST_CANCEL="REQUEST_CANCEL",t.READY="READY",t.COMPLETED="COMPLETED",t.RUNNING="RUNNING",t.CANCELLED="CANCELLED"}(a$||(a$={})),function(t){t.TOGGLE="TOGGLE",t.INCREMENT="INCREMENT",t.DECREMENT="DECREMENT",t.NEGATE="NEGATE"}(az||(az={})),function(t){t.ASSET_NOT_FOUND="ASSET_NOT_FOUND",t.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",t.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",t.INVALID_VALUE="INVALID_VALUE",t.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",t.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",t.CANNOT_PROCESS="CANNOT_PROCESS",t.QUEUE_FULL="QUEUE_FULL",t.UNKNOWN="UNKNOWN",t.ASSET_ID_MISSING="ASSET_ID_MISSING",t.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(aj||(aj={})),function(t){t.PUBLIC="PUBLIC",t.SHARED="SHARED",t.PRIVATE="PRIVATE"}(aY||(aY={})),function(t){t.OFF="OFF",t.ONE_MIN="ONE_MIN",t.FIVE_MIN="FIVE_MIN",t.QUARTER="QUARTER",t.ONE_HOUR="ONE_HOUR"}(aH||(aH={})),function(t){t.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",t.KEEP_LAYOUT="KEEP_LAYOUT",t.REDIRECT="REDIRECT",t.BLOCK_DEVICE="BLOCK_DEVICE"}(aU||(aU={})),function(t){t.MINUTE="MINUTE",t.HOUR="HOUR",t.DAY="DAY",t.WEEK="WEEK",t.MONTH="MONTH",t.YEAR="YEAR"}(aV||(aV={})),function(t){t.MIN="MIN",t.AVG="AVG",t.MAX="MAX",t.DIFFERENCE="DIFFERENCE",t.COUNT="COUNT",t.SUM="SUM",t.MODE="MODE",t.MEDIAN="MEDIAN"}(aW||(aW={})),function(t){t.TERMINATING="TERMINATING",t.DISABLED="DISABLED",t.ALREADY_CONNECTED="ALREADY_CONNECTED",t.UNRECOGNISED="UNRECOGNISED",t.PERMANENT_ERROR="PERMANENT_ERROR",t.SYNC_ERROR="SYNC_ERROR"}(aG||(aG={})),function(t){t.HTTPS="HTTPS",t.HTTP="HTTP",t.TCP="TCP"}(aq||(aq={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.OPTIONS="OPTIONS",t.PATCH="PATCH"}(aZ||(aZ={})),function(t){t.KEYCLOAK="KEYCLOAK",t.BASIC="BASIC",t.NONE="NONE"}(aK||(aK={})),function(t){t.WEBSOCKET="WEBSOCKET",t.POLLING="POLLING"}(aX||(aX={})),function(t){t.VECTOR="VECTOR",t.RASTER="RASTER"}(aJ||(aJ={})),function(t){t.INTERNAL="INTERNAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET"}(aQ||(aQ={})),function(t){t.REALM="REALM",t.USER="USER",t.ASSET="ASSET",t.CUSTOM="CUSTOM"}(a0||(a0={})),function(t){t.NORMAL="NORMAL",t.HIGH="HIGH"}(a1||(a1={})),function(t){t.DEVICE="DEVICE",t.TOPIC="TOPIC",t.CONDITION="CONDITION"}(a2||(a2={})),function(t){t.ALWAYS="ALWAYS",t.ONCE="ONCE",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.ANNUALLY="ANNUALLY"}(a3||(a3={})),function(t){t.MESSAGE_INVALID="MESSAGE_INVALID",t.CERTIFICATE_INVALID="CERTIFICATE_INVALID",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",t.CONFIG_DISABLED="CONFIG_DISABLED",t.USER_DISABLED="USER_DISABLED",t.SERVER_ERROR="SERVER_ERROR",t.ASSET_ERROR="ASSET_ERROR",t.SERVER_BUSY="SERVER_BUSY"}(a5||(a5={})),function(t){t.PRIVATE="PRIVATE",t.PROTECTED="PROTECTED",t.PUBLIC="PUBLIC"}(a4||(a4={})),function(t){t.EXACT="EXACT",t.BEGIN="BEGIN",t.END="END",t.CONTAINS="CONTAINS"}(a6||(a6={})),function(t){t.EQUALS="EQUALS",t.GREATER_THAN="GREATER_THAN",t.GREATER_EQUALS="GREATER_EQUALS",t.LESS_THAN="LESS_THAN",t.LESS_EQUALS="LESS_EQUALS",t.BETWEEN="BETWEEN"}(a8||(a8={})),function(t){t.CREATED_ON="CREATED_ON",t.NAME="NAME",t.ASSET_TYPE="ASSET_TYPE",t.PARENT_ID="PARENT_ID",t.REALM="REALM"}(a7||(a7={})),function(t){t.RESTRICTED="RESTRICTED",t.LINKED="LINKED",t.REALM="REALM"}(a9||(a9={})),function(t){t.AT_LEAST_ONE="AT_LEAST_ONE",t.ALL="ALL",t.NONE="NONE"}(se||(se={})),function(t){t.AND="AND",t.OR="OR"}(st||(st={})),function(t){t.CREATED_ON="CREATED_ON",t.FIRST_NAME="FIRST_NAME",t.LAST_NAME="LAST_NAME",t.USERNAME="USERNAME",t.EMAIL="EMAIL"}(sn||(sn={})),function(t){t.STOPPED="STOPPED",t.RUNNING="RUNNING",t.ERROR="ERROR"}(si||(si={})),function(t){t.JAVASCRIPT="JAVASCRIPT",t.GROOVY="GROOVY",t.JSON="JSON",t.FLOW="FLOW"}(sr||(sr={})),function(t){t.READY="READY",t.DEPLOYED="DEPLOYED",t.COMPILATION_ERROR="COMPILATION_ERROR",t.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",t.EXECUTION_ERROR="EXECUTION_ERROR",t.LOOP_ERROR="LOOP_ERROR",t.DISABLED="DISABLED",t.PAUSED="PAUSED",t.EXPIRED="EXPIRED",t.REMOVED="REMOVED",t.EMPTY="EMPTY"}(so||(so={})),function(t){t.SUNRISE="SUNRISE",t.SUNSET="SUNSET",t.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",t.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",t.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",t.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",t.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",t.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",t.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",t.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",t.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",t.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",t.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",t.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",t.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",t.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",t.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",t.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",t.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",t.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(sa||(sa={})),function(t){t.NUMBER="NUMBER",t.NUMBER_ARRAY="NUMBER_ARRAY",t.STRING="STRING",t.BOOLEAN="BOOLEAN",t.TRIGGER="TRIGGER",t.COLOR="COLOR",t.ANY="ANY"}(ss||(ss={})),function(t){t.NEW_LINE="NEW_LINE",t.SPACER="SPACER"}(sl||(sl={})),function(t){t.INPUT="INPUT",t.PROCESSOR="PROCESSOR",t.OUTPUT="OUTPUT",t.THEN="THEN"}(sc||(sc={})),function(t){t.TEXT="TEXT",t.MULTILINE="MULTILINE",t.NUMBER="NUMBER",t.DROPDOWN="DROPDOWN",t.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",t.CHECKBOX="CHECKBOX",t.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",t.COLOR="COLOR",t.DATE="DATE"}(sd||(sd={})),function(t){t.ADD="ADD",t.ADD_OR_REPLACE="ADD_OR_REPLACE",t.REPLACE="REPLACE",t.DELETE="DELETE",t.CLEAR="CLEAR"}(su||(su={})),function(t){t.PER_ASSET="PER_ASSET",t.GLOBAL="GLOBAL"}(sh||(sh={})),function(t){t.READ_ADMIN="read:admin",t.READ_LOGS="read:logs",t.READ_USERS="read:users",t.READ_MAP="read:map",t.READ_ASSETS="read:assets",t.READ_RULES="read:rules",t.READ_INSIGHTS="read:insights",t.READ_ALARMS="read:alarms",t.READ_SERVICES="read:services",t.WRITE_SERVICES="write:services",t.WRITE_USER="write:user",t.WRITE_ADMIN="write:admin",t.WRITE_LOGS="write:logs",t.WRITE_ASSETS="write:assets",t.WRITE_ATTRIBUTES="write:attributes",t.WRITE_RULES="write:rules",t.WRITE_INSIGHTS="write:insights",t.WRITE_ALARMS="write:alarms",t.READ="read",t.WRITE="write"}(sm||(sm={})),function(t){t.REGISTER="REGISTER",t.UPDATE="UPDATE",t.DEREGISTER="DEREGISTER"}(sf||(sf={})),function(t){t.AVAILABLE="AVAILABLE",t.UNAVAILABLE="UNAVAILABLE"}(sp||(sp={})),function(t){t.ASSET="ASSET",t.AGENT="AGENT",t.NOTIFICATION="NOTIFICATION",t.ALARM="ALARM",t.RULES="RULES",t.PROTOCOL="PROTOCOL",t.GATEWAY="GATEWAY",t.MODEL_AND_VALUES="MODEL_AND_VALUES",t.API="API",t.DATA="DATA"}(sg||(sg={})),function(t){t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(sb||(sb={})),function(t){t.NUMERIC="numeric",t.DIGIT_2="2-digit",t.FULL="full",t.LONG="long",t.MEDIUM="medium",t.SHORT="short",t.NARROW="narrow"}(s_||(s_={})),function(t){t.SECONDLY="SECONDLY",t.MINUTELY="MINUTELY",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.YEARLY="YEARLY"}(sy||(sy={})),function(t){t.OMIT="OMIT",t.BACKWARD="BACKWARD",t.FORWARD="FORWARD"}(sv||(sv={})),function(t){t.JAPANESE="JAPANESE",t.BUDDHIST="BUDDHIST",t.ROC="ROC",t.ISLAMIC="ISLAMIC",t.ISO8601="ISO8601",t.CHINESE="CHINESE",t.ETHIOPIC="ETHIOPIC",t.HEBREW="HEBREW",t.GREGORIAN="GREGORIAN"}(sx||(sx={})),function(t){t.SU="SU",t.MO="MO",t.TU="TU",t.WE="WE",t.TH="TH",t.FR="FR",t.SA="SA"}(sw||(sw={})),function(t){t.PEOPLECOUNTERASSET="PeopleCounterAsset",t.STORAGESIMULATORAGENT="StorageSimulatorAgent",t.CITYASSET="CityAsset",t.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",t.ELECTRICVEHICLEASSET="ElectricVehicleAsset",t.CONSOLEASSET="ConsoleAsset",t.PRESENCESENSORASSET="PresenceSensorAsset",t.LIGHTASSET="LightAsset",t.THETHINGSSTACKAGENT="TheThingsStackAgent",t.PLUGASSET="PlugAsset",t.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",t.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",t.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",t.TCPAGENT="TCPAgent",t.SERIALAGENT="SerialAgent",t.BLUETOOTHMESHAGENT="BluetoothMeshAgent",t.SNMPAGENT="SNMPAgent",t.GROUPASSET="GroupAsset",t.BUILDINGASSET="BuildingAsset",t.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",t.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",t.MQTTAGENT="MQTTAgent",t.MICROPHONEASSET="MicrophoneAsset",t.MODBUSTCPAGENT="ModbusTcpAgent",t.HTTPAGENT="HTTPAgent",t.DOORASSET="DoorAsset",t.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",t.MAILAGENT="MailAgent",t.UDPAGENT="UDPAgent",t.ROOMASSET="RoomAsset",t.VENTILATIONASSET="VentilationAsset",t.TRADFRILIGHTASSET="TradfriLightAsset",t.KNXAGENT="KNXAgent",t.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",t.CHIRPSTACKAGENT="ChirpStackAgent",t.WEATHERASSET="WeatherAsset",t.THINGASSET="ThingAsset",t.WEBSOCKETAGENT="WebsocketAgent",t.GATEWAYASSET="GatewayAsset",t.PARKINGASSET="ParkingAsset",t.TRADFRIPLUGASSET="TradfriPlugAsset",t.SIMULATORAGENT="SimulatorAgent",t.MODBUSSERIALAGENT="ModbusSerialAgent",t.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",t.VELBUSTCPAGENT="VelbusTCPAgent",t.ARTNETLIGHTASSET="ArtnetLightAsset",t.VELBUSSERIALAGENT="VelbusSerialAgent",t.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",t.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",t.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",t.ZWAVEAGENT="ZWaveAgent",t.THERMOSTATASSET="ThermostatAsset",t.SHIPASSET="ShipAsset"}(sF||(sF={})),function(t){t.SUPPORTSEXPORT="supportsExport",t.MQTTPORT="MQTTPort",t.ENERGYSELFCONSUMPTION="energySelfConsumption",t.LASTACCESS="lastAccess",t.CHARGERID="chargerID",t.POSITION="position",t.CARBONSAVING="carbonSaving",t.ROUTINGMODE="routingMode",t.LASTWILLRETAIN="lastWillRetain",t.LASTWILLTOPIC="lastWillTopic",t.SERIALBAUDRATE="serialBaudrate",t.BASEURL="baseURL",t.REQUIREDVALUES="requiredValues",t.FINANCIALSAVING="financialSaving",t.FLEETCATEGORY="fleetCategory",t.GATEWAYSTATUS="gatewayStatus",t.NO2LEVEL="NO2Level",t.ATMOSPHERICPRESSURE="atmosphericPressure",t.TAGS="tags",t.UNLOCK="unlock",t.MILEAGEMIN="mileageMin",t.CHECKINTERVALSECONDS="checkIntervalSeconds",t.LOCATION="location",t.CLIENTSECRET="clientSecret",t.WINDDIRECTION="windDirection",t.WINDSPEED="windSpeed",t.PARTICLESPM10="particlesPM10",t.APPLICATIONKEY="applicationKey",t.POWEREXPORTMAX="powerExportMax",t.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",t.WATERLEVEL="waterLevel",t.CONSOLENAME="consoleName",t.CONNECTHEADERS="connectHeaders",t.WEBSOCKETQUERY="websocketQuery",t.PREFERHTML="preferHTML",t.COOLING="cooling",t.POLLINGMILLIS="pollingMillis",t.SOILTEMPERATURE="soilTemperature",t.SUNIRRADIANCE="sunIrradiance",t.ODOMETER="odometer",t.SUPPORTSIMPORT="supportsImport",t.MESSAGEMAXLENGTH="messageMaxLength",t.WINDGUSTSPEED="windGustSpeed",t.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",t.LIGHTID="lightId",t.POWER="power",t.STREET="street",t.DELETEPROCESSEDMAIL="deleteProcessedMail",t.WINDSPEEDMIN="windSpeedMin",t.POWERSETPOINT="powerSetpoint",t.PRESENCE="presence",t.SPACESOCCUPIED="spacesOccupied",t.STARTTLS="startTLS",t.AGENTSTATUS="agentStatus",t.MESSAGECHARSET="messageCharset",t.CERTIFICATEALIAS="certificateAlias",t.PANELPITCH="panelPitch",t.EMAIL="email",t.BINDPORT="bindPort",t.PARTICLESPM1="particlesPM1",t.SPEED="speed",t.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",t.MESSAGESTRIPDELIMITER="messageStripDelimiter",t.AREA="area",t.COUNTRY="country",t.SHIPTYPE="shipType",t.CONNECTSUBSCRIPTIONS="connectSubscriptions",t.RELATIVEHUMIDITY="relativeHumidity",t.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",t.SOURCEADDRESS="sourceAddress",t.RAINFALL="rainfall",t.ENERGYIMPORTTOTAL="energyImportTotal",t.OAUTHGRANT="oAuthGrant",t.OZONELEVEL="ozoneLevel",t.COUNTINMINUTE="countInMinute",t.PORT="port",t.TUNNELINGSUPPORTED="tunnelingSupported",t.ENINUMBER="ENINumber",t.AGENTDISABLED="agentDisabled",t.DISABLED="disabled",t.FORCECHARGE="forceCharge",t.TIMEINJECTIONINTERVAL="timeInjectionInterval",t.FINANCIALWEIGHTING="financialWeighting",t.ENERGYLEVELPERCENTAGE="energyLevelPercentage",t.SPACESBUFFER="spacesBuffer",t.VEHICLECATEGORY="vehicleCategory",t.FANSPEED="fanSpeed",t.FINANCIALCOST="financialCost",t.NOTES="notes",t.MAILFOLDERNAME="mailFolderName",t.TEMPERATURE="temperature",t.AVAILABLECHARGINGSPACES="availableChargingSpaces",t.ENERGYCAPACITY="energyCapacity",t.POWERIMPORTMIN="powerImportMin",t.INTERVALSIZE="intervalSize",t.SNMPVERSIONVALUE="SNMPVersionValue",t.SOUNDLEVEL="soundLevel",t.UNITID="unitId",t.STOPBITS="stopBits",t.CONNECTURL="connectURL",t.CLIENTID="clientId",t.VEHICLEID="vehicleID",t.SUNAZIMUTH="sunAzimuth",t.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",t.WEBSOCKETMODE="websocketMode",t.COLOURTEMPERATURE="colourTemperature",t.VEHICLECONNECTED="vehicleConnected",t.DATABITS="dataBits",t.MILEAGEMINIMUM="mileageMinimum",t.COLOURRGB="colourRGB",t.CARBONIMPORT="carbonImport",t.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",t.PRICEHOURLY="priceHourly",t.WINDSPEEDMAX="windSpeedMax",t.PINGDISABLED="pingDisabled",t.FLOW="flow",t.CHILDASSETTYPE="childAssetType",t.NETWORKKEY="networkKey",t.UNIVERSE="universe",t.MSSINUMBER="MSSINumber",t.SUBSCRIBEQOS="subscribeQos",t.LEDCOUNT="lEDCount",t.LOCKED="locked",t.CLOUDCOVERAGE="cloudCoverage",t.PROTOCOL="protocol",t.TARIFFIMPORT="tariffImport",t.ENERGYRENEWABLESHARE="energyRenewableShare",t.REGION="region",t.CONSOLEPLATFORM="consolePlatform",t.POWEREXPORTMIN="powerExportMin",t.EFFICIENCYEXPORT="efficiencyExport",t.CHARGECYCLES="chargeCycles",t.SERIALPORT="serialPort",t.APPLICATIONID="applicationId",t.PANELORIENTATION="panelOrientation",t.LENGTH="length",t.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",t.USERNAMEPASSWORD="usernamePassword",t.POWERFORECAST="powerForecast",t.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",t.REQUESTQUERYPARAMETERS="requestQueryParameters",t.PROXYADDRESS="proxyAddress",t.MQTTHOST="MQTTHost",t.ENERGYLOCAL="energyLocal",t.ENERGYAUTARKY="energyAutarky",t.MODEL="model",t.MANUFACTURER="manufacturer",t.ONOFF="onOff",t.RESUMESESSION="resumeSession",t.TARIFFEXPORT="tariffExport",t.APIKEY="ApiKey",t.CITY="city",t.CONNECTORTYPE="connectorType",t.ENERGYEXPORTTOTAL="energyExportTotal",t.CARBONEXPORT="carbonExport",t.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",t.ENERGYLEVEL="energyLevel",t.OPTIMISATIONDISABLED="optimisationDisabled",t.WEBSOCKETPATH="websocketPath",t.WINDSPEEDREFERENCE="windSpeedReference",t.PRICEDAILY="priceDaily",t.COUNTGROWTHMINUTE="countGrowthMinute",t.IMONUMBER="IMONumber",t.ATTRIBUTION="Attribution",t.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",t.REQUESTHEADERS="requestHeaders",t.TENANTID="tenantId",t.HOST="host",t.COUNTOUTMINUTE="countOutMinute",t.ENERGYTYPE="energyType",t.CONSOLEVERSION="consoleVersion",t.MTU="mtu",t.PANELAZIMUTH="panelAzimuth",t.SEQUENCENUMBER="sequenceNumber",t.SUNALTITUDE="sunAltitude",t.COUNTOUT="countOut",t.CHARGERCONNECTED="chargerConnected",t.ROOMNUMBER="roomNumber",t.PARTICLESPM2_5="particlesPM2_5",t.MESSAGESOURCEADDRESS="messageSourceAddress",t.COUNTIN="countIn",t.MILEAGECHARGED="mileageCharged",t.PROVISIONWEATHERASSET="ProvisionWeatherAsset",t.TEMPERATURESETPOINT="temperatureSetpoint",t.CONSOLEPROVIDERS="consoleProviders",t.POWERIMPORTMAX="powerImportMax",t.COUNTTOTAL="countTotal",t.SPACESTOTAL="spacesTotal",t.BINDHOST="bindHost",t.MESSAGECONVERTBINARY="messageConvertBinary",t.MESSAGEDELIMITERS="messageDelimiters",t.EFFICIENCYIMPORT="efficiencyImport",t.SUNZENITH="sunZenith",t.BRIGHTNESS="brightness",t.POSTALCODE="postalCode",t.SPACESOPEN="spacesOpen",t.HUMIDITY="humidity",t.SECUREMODE="secureMode",t.MILEAGECAPACITY="mileageCapacity",t.DIRECTION="direction",t.ENERGYLEVELSCHEDULE="energyLevelSchedule",t.UVINDEX="uVIndex",t.NATMODE="NATMode",t.UPDATEONWRITE="updateOnWrite",t.LASTWILLPAYLOAD="lastWillPayload",t.GROUPID="groupId",t.FOLLOWREDIRECTS="followRedirects",t.CARBONCOST="carbonCost",t.MESSAGECONVERTHEX="messageConvertHex",t.PUBLISHQOS="publishQos"}(sk||(sk={})),function(t){t.FORMAT="format",t.RULESTATE="ruleState",t.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",t.STOREDATAPOINTS="storeDataPoints",t.LABEL="label",t.CONSTRAINTS="constraints",t.SHOWONDASHBOARD="showOnDashboard",t.READONLY="readOnly",t.MULTILINE="multiline",t.ACCESSPUBLICWRITE="accessPublicWrite",t.MOMENTARY="momentary",t.AGENTLINK="agentLink",t.ACCESSRESTRICTEDREAD="accessRestrictedRead",t.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",t.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",t.SECRET="secret",t.ATTRIBUTELINKS="attributeLinks",t.RULERESETIMMEDIATE="ruleResetImmediate",t.AGENTLINKCONFIG="agentLinkConfig",t.FORECAST="forecast",t.UNITS="units",t.USERCONNECTED="userConnected",t.ACCESSPUBLICREAD="accessPublicRead"}(sE||(sE={})),function(t){t.WSURL="WS_URL",t.POSITIVENUMBER="positiveNumber",t.VALUEDESCRIPTOR="valueDescriptor",t.LONG="long",t.BOOLEANMAP="booleanMap",t.MQTTQOS="MQTTQos",t.GEOJSONPOINT="GEO_JSONPoint",t.SNMPVERSION="SNMPVersion",t.ASSETTYPE="assetType",t.JSONOBJECT="JSONObject",t.BIGNUMBER="bigNumber",t.IPADDRESS="IPAddress",t.EMAIL="email",t.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",t.ATTRIBUTEREFERENCE="attributeReference",t.INTEGER="integer",t.OAUTHGRANT="oAuthGrant",t.NUMBER="number",t.TEXTMAP="textMap",t.WEBSOCKETSUBSCRIPTION="websocketSubscription",t.BOOLEAN="boolean",t.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",t.TIMESTAMPISO8601="timestampISO8601",t.MULTIVALUEDTEXTMAP="multivaluedTextMap",t.JSON="JSON",t.INTEGERBYTE="integerByte",t.AGENTLINK="agentLink",t.CALENDAREVENT="calendarEvent",t.CONNECTIONSTATUS="connectionStatus",t.VALUECONSTRAINT="valueConstraint",t.ASSETQUERY="assetQuery",t.COLOURRGB="colourRGB",t.VALUEFORMAT="valueFormat",t.TEXT="text",t.BYTE="byte",t.USERNAMEANDPASSWORD="usernameAndPassword",t.HTTPURL="HTTP_URL",t.ATTRIBUTELINK="attributeLink",t.ASSETID="assetID",t.NUMBERMAP="numberMap",t.HTTPMETHOD="HTTPMethod",t.PANELORIENTATION="panelOrientation",t.ATTRIBUTESTATE="attributeState",t.POSITIVEINTEGER="positiveInteger",t.EXECUTIONSTATUS="executionStatus",t.BIGINTEGER="bigInteger",t.PERIODDURATIONISO8601="periodDurationISO8601",t.DATEANDTIME="dateAndTime",t.CONNECTORTYPE="connectorType",t.NEGATIVEINTEGER="negativeInteger",t.TCPIPPORTNUMBER="TCP_IPPortNumber",t.INTEGERMAP="integerMap",t.ENERGYTYPE="energyType",t.TIMESTAMP="timestamp",t.UUID="UUID",t.FORECASTCONFIGURATION="forecastConfiguration",t.TIMEDURATIONISO8601="timeDurationISO8601",t.CONSOLEPROVIDERS="consoleProviders",t.NEGATIVENUMBER="negativeNumber",t.CRONEXPRESSION="CRONExpression",t.DIRECTION="direction",t.HOSTORIPADDRESS="hostOrIPAddress"}(sT||(sT={})),function(t){t.MONTH="month",t.MILE_SCANDINAVIAN="mile_scandinavian",t.YEAR="year",t.VOLT="volt",t.HERTZ="hertz",t.MILE="mile",t.BTU="btu",t.FOOT="foot",t.MEGA="mega",t.INCH="inch",t.IN_HG="inch_mercury",t.CENTI="centi",t.GRAM="gram",t.KNOT="knot",t.METRE="metre",t.LITRE="litre",t.FLUID_OUNCE="fluid_ounce",t.CELSIUS="celsius",t.DECIBEL="decibel",t.FAHRENHEIT="fahrenheit",t.WATT="watt",t.PEAK="peak",t.MICRO="micro",t.PER="per",t.STONE="stone",t.VAR="var",t.OUNCE="ounce",t.HECTARE="hectare",t.YARD="yard",t.JOULE="joule",t.DEGREE="degree",t.KILO="kilo",t.KELVIN="kelvin",t.CARBON="carbon",t.DECIBEL_ATTENUATED="decibel_attenuated",t.SQUARED="squared",t.PERCENTAGE="percentage",t.CUBED="cubed",t.DAY="day",t.RADIAN="radian",t.OHM="ohm",t.MINUTE="minute",t.PART_PER_MILLION="ppm",t.AMP="amp",t.MASS_POUND="pound",t.HOUR="hour",t.ACRE="acre",t.RPM="rpm",t.PASCAL="pascal",t.LUMEN="lumen",t.WEEK="week",t.GALLON="gallon",t.LUX="lux",t.MILLI="milli",t.BAR="bar",t.HECTO="hecto",t.SECOND="second"}(sA||(sA={})),sC||(sC={});class tV{static getAssetDescriptors(){return tV._assetTypeInfos.map(t=>t.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(t){if(t)return t.assetDescriptor?t:("string"!=typeof t&&(t=t.name),this._assetTypeInfos.find(n=>n.assetDescriptor.name===t))}static getAssetDescriptor(t){if(!t)return;if(t.assetDescriptor)return t.assetDescriptor;if("string"!=typeof t)return t;let n=this._assetTypeInfos.find(n=>n.assetDescriptor.name===t);return n?n.assetDescriptor:void 0}static getAttributeDescriptor(t,n){if(!t)return;let i=this.getAssetTypeInfo(n||"ThingAsset");if(i&&i.attributeDescriptors)return i.attributeDescriptors.find(n=>n.name===t)}static getValueDescriptor(t){let n;if(!t)return;if(t.endsWith("[]"))for(n=0;t.endsWith("[]");)t=t.substring(0,t.length-2),n++;let i=this._valueDescriptors.find(n=>n.name===t);return i&&n&&(i=Object.assign(Object.assign({},i),{arrayDimensions:n})),i}static resolveValueDescriptor(t,n){let i;return n&&("string"==typeof n&&(i=tV.getValueDescriptor(n)),i=n.jsonType?n:tV.getValueDescriptor(n.type)),!i&&t&&(i=tV.getValueDescriptor("JSON")),i}static resolveValueTypeFromValue(t){if(null!=t){if("number"==typeof t)return"number";if("string"==typeof t)return"text";if("boolean"==typeof t)return"boolean";if(Array.isArray(t)){let n=1,i=t.find(t=>null!=t);for(;Array.isArray(i);)i=i.find(t=>null!=t),n++;let r=this.resolveValueTypeFromValue(i);if(!r)return;for(;n>0;)r+="[]",n--;return r}if(t instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(t,n,i){let r,o;if(n&&"string"!=typeof n)r=n;else{let o=this.getAssetTypeInfo(t||"ThingAsset");if(!o)return[void 0,void 0];"string"==typeof n&&(r=this.getAttributeDescriptor(n,o)),!r&&i&&(r={type:i.type,name:i.name,meta:i.meta})}return r&&(o=this.getValueDescriptor(r.type)),[r,o]}static getMetaItemDescriptor(t){if(t)return this._metaItemDescriptors.find(n=>n.name===t)}static getAssetDescriptorColour(t,n){let i=this.getAssetDescriptor(t);return i&&i.colour?i.colour:n}static getAssetDescriptorIcon(t,n){let i=this.getAssetDescriptor(t);return i&&i.icon?i.icon:n}}tV._assetTypeInfos=[],tV._metaItemDescriptors=[],tV._valueDescriptors=[],i(50488);var tW=i(33348),tG=i.n(tW),tq=i(53806),tZ=i.n(tq),tK=i(92891);class tX{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n}),Object.freeze(this)}}function tJ(t,n,i=!0){if(null==t||null==n)return t===n;if(t.constructor!==n.constructor)return!1;if(t instanceof Function||t instanceof RegExp)return t===n;if(t===n||t.valueOf()===n.valueOf())return!0;if(Array.isArray(t)&&t.length!==n.length||t instanceof Date||!(t instanceof Object)||!(n instanceof Object))return!1;if(i){let i=Object.keys(t);return Object.keys(n).every(t=>-1!==i.indexOf(t))&&i.every(i=>tJ(t[i],n[i]))}return!1}function tQ(t){if(null==t)return"";let n=!1;return t.split(/([A-Z]|\d)/).map((t,i,r)=>{if(!t)return t;if(!n)return n=!0,t.charAt(0).toUpperCase()+t.slice(1);if("_"===t)return" ";if(1===t.length&&t===t.toUpperCase()){let n=!r[i-1]||"_"===r[i-1],o=i+1<r.length&&r[i+1]&&"_"!==r[i+1],a=i+3>r.length||!r[i+1]&&!r[i+3];(!n||o)&&(t=" "+t),!o&&(n||a)||(t=t.toLowerCase())}return t}).join("").trim()}function t0(t,n,i){let r="string"==typeof t?t:t.name;return n&&n.meta&&n.meta.hasOwnProperty(r)?n.meta[r]:i&&i.meta?i.meta[r]:void 0}function t1(t,n){let i="string"==typeof t?tV.getMetaItemDescriptor(t):t;return i?{name:i.name,type:i.type,value:n}:{name:typeof t,type:tV.resolveValueTypeFromValue(n),value:n}}function t2(t,n,i,r,o,a){let s=t8("label",t,n,i,o),l="";if(s||(s=t0("label",t,n&&n.meta?n:void 0)),r&&(l=t4(t6("units",t,n,i,o))),!s){let i=t?t.name:n?"string"==typeof n?n:n.name:void 0;s=a||(i?tQ(i):void 0)}return s?s+(l?" ("+l+")":""):l}function t3(t,n,i,r,o,a){let s=t5(t?t.value:void 0,()=>t6("format",t,n,i,o),void 0,a),l=t6("units",t,n,i,!0);return r&&l&&l.length&&(s=t4(t6("units",t,n,i,o),s)),s}function t5(t,n,i,r){let o="";if(null==t)o=r||"";else if("string"==typeof t)o=t;else if("number"==typeof t||"boolean"==typeof t||t instanceof Date){let r=n&&n();if(r&&0!==Object.keys(r).length)switch("number"==typeof t?r.asBoolean?t=!!t:r.asDate&&(t=new Date(t)):"boolean"==typeof t&&r.asNumber&&(t=+!!t),typeof t){case"number":o=new Intl.NumberFormat(i||tY.language,r).format(t);break;case"boolean":r.asOnOff&&(o=t?tY.t("on"):tY.t("off")),r.asOpenClosed&&(o=t?tY.t("open"):tY.t("closed")),r.asPressedReleased&&(o=t?tY.t("pressed"):tY.t("released"));break;case"object":if(r.momentJsFormat)o=tZ()(t).format(r.momentJsFormat);else if(r.iso8601)o=t.toISOString();else if(r.week){var a;let n,i=((a=new Date(Date.UTC((a=t).getFullYear(),a.getMonth(),a.getDate()))).setUTCDate(a.getUTCDate()+4-(a.getUTCDay()||7)),n=new Date(Date.UTC(a.getUTCFullYear(),0,1)),Math.ceil(((a.getTime()-n.getTime())/864e5+1)/7));o="2-digit"===r.week?String(i).padStart(2,"0"):Number(i).toString(10)}else o=new Intl.DateTimeFormat(i||tY.language,r).format(t)}else o=Object(t).toString()}return o}function t4(t,n){if(!t)return"";n||(n="");let i=t.map((t,i)=>{if(3!==t.length||t.toUpperCase()!==t)return tY.t(["units."+t,"or:units."+t]);{let r=new Intl.NumberFormat(tY.language,{currency:t,style:"currency"}).formatToParts();if(0!==i||"currency"!==r[0].type)return"currency"===r[0].type?r[0].value:r[r.length-1].value;if(!n)return r[0].value;n=r[0].value+n}}).join("");return n.length>0?n+" "+i:i}function t6(t,n,i,r,o){let a,s=[],l=t8(t,n&&"string"==typeof n?n:n?n.name:i?"string"==typeof i?i:i.name:void 0,i,r,o);if(l&&(a=JSON.parse(l)))if("format"!==t)return a;else s.push(a);if(n&&n.meta&&(a=t0(t,n,i)))if("format"!==t)return a;else s.push(a);if(i&&"string"!=typeof i&&i.hasOwnProperty(t)){if(a=i[t],"format"!==t)return a;s.push(a)}if(i&&i.type){if(a=tV.getValueDescriptor(i.type)[t],"format"!==t)return a;s.push(a)}if("format"!==t||0===s.length)return a;let c={};return s.reverse().forEach(t=>{c=Object.assign(Object.assign({},c),t)}),c}function t8(t,n,i,r,o,a){let s;if(n?s="string"==typeof n?n:n.name:i&&(s="string"==typeof i?i:i.name),!s)return;let l=[],c=t+"."+(o?"attribute":"meta")+".";if(r&&l.push(c+r+"."+s),i&&"string"!=typeof i&&(l.push(c+i.type+"."+s),l.push(c+i.type)),l.push(c+s),l.length>0)return tY.t(l,{defaultValue:a||""})}function t7(t,n){let i=n.ref.name;if(t.attributes)if(n.deleted)delete t.attributes[i];else{let r=t.attributes[i];r&&(r.value=n.value,r.timestamp=n.timestamp)}return Object.assign({},t)}var t9=function(t,n,i,r){return new(i||(i=Promise))(function(o,a){function s(t){try{c(r.next(t))}catch(t){a(t)}}function l(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var n;t.done?o(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,l)}c((r=r.apply(t,n||[])).next())})};let ne=i(89916);class nt{constructor(t,n,i){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=t,this._autoEnable=n,this._enableCompleteCallback=i,window.OpenRemoteConsole=this;let r=new URLSearchParams(window.location.search),o=r.get("consoleName"),a=r.get("consoleVersion"),s=r.get("consolePlatform"),l=r.get("consoleProviders"),c=r.get("consoleAutoEnable"),d=l&&l.length>0?l.split(" "):["push"];this._pendingProviderEnables=d;let u=nt._createConsoleRegistration(),h=window.localStorage.getItem("OpenRemoteConsole:"+t);if(h)try{let t=JSON.parse(h);t.id&&(u.id=t.id),t.name&&(u.name=t.name),t.providers&&(u.providers=t.providers),t.apps&&(u.apps=t.apps)}catch(t){console.error("Failed to deserialise console registration")}let m=u.providers;for(let t of(u.providers={},d)){let n=m&&m.hasOwnProperty(t)?m[t]:{enabled:!1,disabled:!1};u.providers[t]=n}let f=i$.getAppName();f.length>0&&0>u.apps.indexOf(f)&&u.apps.push(f),this._registration=u,o&&(u.name=o),a&&(u.version=a),s&&(u.platform=s),c&&(this._autoEnable="TRUE"===c||"true"===c)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let t=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return t&&("iP"===t.substring(0,2)||"Mac"===t.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return t9(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let t of Object.keys(this._registration.providers))yield this._initialiseProvider(t);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(t){console.error(t)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return t9(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let t=this._pendingProviderEnables.length-1;t>-1;t--){let n=this._pendingProviderEnables[t];yield this.enableProvider(n)}})}enableProvider(t,n){return t9(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: enabling provider '"+t+"'");let i={provider:t,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:n},r=yield this.sendProviderMessage(i,!0);this._registration.providers[t].hasPermission=r.hasPermission,this._registration.providers[t].success=r.success,this._registration.providers[t].enabled=r.success,this._registration.providers[t].data=r.data;let o=this._pendingProviderEnables.indexOf(t);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),r})}disableProvider(t){return t9(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: disabling provider '"+t+"'");let n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[t].disabled=!0,this._registration.providers[t].enabled=!1,n})}getProvider(t){return this._registration&&this._registration.providers?this._registration.providers[t]:void 0}sendProviderMessage(t,n){return t9(this,void 0,void 0,function*(){if("storage"!==t.provider&&!this._registration.providers.hasOwnProperty(t.provider))throw console.debug("Invalid console provider '"+t.provider+"'"),Error("Invalid console provider '"+t.provider+"'");if(!n)return void this._doSendProviderMessage(t);let i=t.provider+t.action;if(this._pendingProviderPromises[i])throw Error("Message already pending for provider '"+t.provider+"' with action '"+t.action+"'");let r=new tX,o=()=>{delete this._pendingProviderPromises[i],r.reject("No response from provider")};return this._pendingProviderPromises[i]=[r,window.setTimeout(o,5e3)],this._doSendProviderMessage(t),r.promise})}sendRegistration(t){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(t=void 0!==t?t:2e3)+"ms"),new Promise((t,n)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),i$.rest.api.ConsoleResource.register(this._registration).then(n=>{if(200!==n.status)throw Error("Failed to register console");this._registration=n.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),t()})}catch(t){console.error("Failed to register console"),n("Failed to register console")}})})}storeData(t,n){this.sendProviderMessage({provider:"storage",action:"STORE",key:t,value:n},!1)}retrieveData(t){return t9(this,void 0,void 0,function*(){let n=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:t},!0);try{let t=yield Promise.race([n,new Promise((t,n)=>setTimeout(n,2e3))]);if(t&&t.value){let n=t.value;return"null"===n?void 0:n}}catch(t){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(t,n){this._providerMessageListeners[t.provider+t.action]=n}removeProviderMessageListener(t){delete this._providerMessageListeners[t.provider+t.action]}_postNativeShellMessage(t){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(t));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(t)}catch(t){console.error("Failed to send shell message towards console",t)}}_doSendGenericMessage(t,n){let i={type:t,data:n};this.isMobile?this._postNativeShellMessage(i):console.warn("Failed to send generic message to console.",i)}_doSendProviderMessage(t){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:t});else{if(!t.provider||!t.action)return;switch(t.provider.trim().toUpperCase()){case"PUSH":switch(t.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;case"STORAGE":switch(t.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'store' action requires a `key`");null===t.value?window.localStorage.removeItem(n):window.localStorage.setItem(n,JSON.stringify(t.value))}break;case"RETRIEVE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'retrieve' action requires a `key`");let i=window.localStorage.getItem(n);if(null!==i)try{i=JSON.parse(i)}catch(t){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:n,value:i}))}break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;default:console.error("Unsupported provider: "+t.provider)}}}_handleProviderResponse(t){if(!t)return;let n=JSON.parse(t),i=n.provider,r=n.action,o=this._pendingProviderPromises[i+r];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[i+r],o[0].resolve(n));let a=this._providerMessageListeners[i+r];a&&a(n)}_callCompletedCallback(){let t=this._enableCompleteCallback;this._enableCompleteCallback=null,t&&window.setTimeout(()=>{t()},0)}static _createConsoleRegistration(){return{name:ne.name,version:ne.version,platform:ne.os.toString(),apps:[],model:((ne.manufacturer?ne.manufacturer+" ":"")+(ne.product?ne.product:"")).trim()}}_initialiseProvider(t){return t9(this,void 0,void 0,function*(){let n;console.debug("Console: initialising provider '"+t+"'");try{n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_INIT"},!0),this._registration.providers[t].version=n.version,this._registration.providers[t].requiresPermission=n.requiresPermission,this._registration.providers[t].hasPermission=n.hasPermission,this._registration.providers[t].success=n.success,this._registration.providers[t].enabled=n.enabled,this._registration.providers[t].disabled=n.disabled,this._registration.providers[t].data=n.data}catch(t){console.error(t),n={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(n.success||(console.debug("Provider initialisation failed: '"+t+"'"),n.disabled=!0,this._registration.providers[t].disabled=!0),n.disabled||n.enabled){let n=this._pendingProviderEnables.indexOf(t);n>=0&&this._pendingProviderEnables.splice(n,1)}})}}var nn=i(43653),ni=i.n(nn);class nr{constructor(t){this.httpClient=t}getAssetDescriptors(t,n){return this.httpClient.request({method:"GET",url:nT`model/assetDescriptors`,queryParams:t,options:n})}getAssetInfo(t,n,i){return this.httpClient.request({method:"GET",url:nT`model/assetInfo/${t}`,queryParams:n,options:i})}getAssetInfos(t,n){return this.httpClient.request({method:"GET",url:nT`model/assetInfos`,queryParams:t,options:n})}getValueDescriptorSchema(t,n){return this.httpClient.request({method:"GET",url:nT`model/getValueDescriptorSchema`,queryParams:t,options:n})}getMetaItemDescriptors(t,n){return this.httpClient.request({method:"GET",url:nT`model/metaItemDescriptors`,queryParams:t,options:n})}getValueDescriptors(t,n){return this.httpClient.request({method:"GET",url:nT`model/valueDescriptors`,queryParams:t,options:n})}}class no{constructor(t){this.httpClient=t}getConfig(t){return this.httpClient.request({method:"GET",url:nT`syslog/config`,options:t})}updateConfig(t,n){return this.httpClient.request({method:"PUT",url:nT`syslog/config`,data:t,options:n})}clearEvents(t){return this.httpClient.request({method:"DELETE",url:nT`syslog/event`,options:t})}getEvents(t,n){return this.httpClient.request({method:"GET",url:nT`syslog/event`,queryParams:t,options:n})}}class na{constructor(t){this.httpClient=t}doProtocolAssetDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nT`agent/assetDiscovery/${t}`,queryParams:n,options:i})}doProtocolAssetImport(t,n,i,r){return this.httpClient.request({method:"POST",url:nT`agent/assetImport/${t}`,queryParams:i,data:n,options:r})}doProtocolInstanceDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nT`agent/instanceDiscovery/${t}`,queryParams:n,options:i})}}class ns{constructor(t){this.httpClient=t}getPredictedDatapoints(t,n,i,r){return this.httpClient.request({method:"POST",url:nT`asset/predicted/${t}/${n}`,data:i,options:r})}writePredictedDatapoints(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`asset/predicted/${t}/${n}`,data:i,options:r})}}class nl{constructor(t){this.httpClient=t}register(t,n){return this.httpClient.request({method:"POST",url:nT`console/register`,data:t,options:n})}}class nc{constructor(t){this.httpClient=t}getApps(t){return this.httpClient.request({method:"GET",url:nT`apps`,options:t})}getConsoleConfig(t){return this.httpClient.request({method:"GET",url:nT`apps/consoleConfig`,options:t})}getAppInfos(t){return this.httpClient.request({method:"GET",url:nT`apps/info`,options:t})}}class nd{constructor(t){this.httpClient=t}getAllNodeDefinitions(t){return this.httpClient.request({method:"GET",url:nT`flow`,options:t})}getNodeDefinition(t,n){return this.httpClient.request({method:"GET",url:nT`flow/${t}`,options:n})}getAllNodeDefinitionsByType(t,n){return this.httpClient.request({method:"GET",url:nT`flow/${t}`,options:n})}}class nu{constructor(t){this.httpClient=t}createAlarm(t,n,i){return this.httpClient.request({method:"POST",url:nT`alarm`,queryParams:n,data:t,options:i})}getAlarms(t,n){return this.httpClient.request({method:"GET",url:nT`alarm`,queryParams:t,options:n})}removeAlarms(t,n){return this.httpClient.request({method:"DELETE",url:nT`alarm`,data:t,options:n})}setAssetLinks(t,n){return this.httpClient.request({method:"PUT",url:nT`alarm/assets`,data:t,options:n})}getAlarm(t,n){return this.httpClient.request({method:"GET",url:nT`alarm/${t}`,options:n})}removeAlarm(t,n){return this.httpClient.request({method:"DELETE",url:nT`alarm/${t}`,options:n})}updateAlarm(t,n,i){return this.httpClient.request({method:"PUT",url:nT`alarm/${t}`,data:n,options:i})}getAssetLinks(t,n,i){return this.httpClient.request({method:"GET",url:nT`alarm/${t}/assets`,queryParams:n,options:i})}}class nh{constructor(t){this.httpClient=t}getHealthStatus(t){return this.httpClient.request({method:"GET",url:nT`health`,options:t})}getInfo(t){return this.httpClient.request({method:"GET",url:nT`info`,options:t})}}class nm{constructor(t){this.httpClient=t}getManagerConfig(t){return this.httpClient.request({method:"GET",url:nT`configuration/manager`,options:t})}update(t,n){return this.httpClient.request({method:"PUT",url:nT`configuration/manager`,data:t,options:n})}fileUpload(t,n,i){return this.httpClient.request({method:"POST",url:nT`configuration/manager/file`,queryParams:n,data:t,options:i})}getManagerConfigImage(t,n){return this.httpClient.request({method:"GET",url:nT`configuration/manager/image/${t}`,options:n})}}class nf{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nT`asset`,data:t,options:n})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nT`asset`,queryParams:t,options:n})}writeAttributeValues(t,n){return this.httpClient.request({method:"PUT",url:nT`asset/attributes`,data:t,options:n})}writeAttributeEvents(t,n){return this.httpClient.request({method:"PUT",url:nT`asset/attributes/timestamp`,data:t,options:n})}updateNoneParent(t,n){return this.httpClient.request({method:"DELETE",url:nT`asset/parent`,queryParams:t,options:n})}getPartial(t,n){return this.httpClient.request({method:"GET",url:nT`asset/partial/${t}`,options:n})}queryAssets(t,n){return this.httpClient.request({method:"POST",url:nT`asset/query`,data:t,options:n})}queryAssetTree(t,n){return this.httpClient.request({method:"POST",url:nT`asset/tree`,data:t,options:n})}getCurrentUserAssets(t){return this.httpClient.request({method:"GET",url:nT`asset/user/current`,options:t})}createUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nT`asset/user/link`,data:t,options:n})}getUserAssetLinks(t,n){return this.httpClient.request({method:"GET",url:nT`asset/user/link`,queryParams:t,options:n})}deleteUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nT`asset/user/link/delete`,data:t,options:n})}deleteAllUserAssetLinks(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`asset/user/link/${t}/${n}`,options:i})}deleteUserAssetLink(t,n,i,r){return this.httpClient.request({method:"DELETE",url:nT`asset/user/link/${t}/${n}/${i}`,options:r})}get(t,n){return this.httpClient.request({method:"GET",url:nT`asset/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nT`asset/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`asset/${t}/attribute/${n}`,data:i,options:r})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(t,n,i,r,o){return this.httpClient.request({method:"PUT",url:nT`asset/${t}/attribute/${n}/${i}`,data:r,options:o})}updateParent(t,n,i){return this.httpClient.request({method:"PUT",url:nT`asset/${t}/child`,queryParams:n,options:i})}}class np{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nT`dashboard`,data:t,options:n})}update(t,n){return this.httpClient.request({method:"PUT",url:nT`dashboard`,data:t,options:n})}getAllRealmDashboards(t,n){return this.httpClient.request({method:"GET",url:nT`dashboard/all/${t}`,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nT`dashboard/query`,data:t,options:n})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`dashboard/${t}/${n}`,options:i})}get(t,n,i){return this.httpClient.request({method:"GET",url:nT`dashboard/${t}/${n}`,options:i})}}class ng{constructor(t){this.httpClient=t}getServices(t,n){return this.httpClient.request({method:"GET",url:nT`service`,queryParams:t,options:n})}registerService(t,n){return this.httpClient.request({method:"POST",url:nT`service`,data:t,options:n})}getGlobalServices(t){return this.httpClient.request({method:"GET",url:nT`service/global`,options:t})}registerGlobalService(t,n){return this.httpClient.request({method:"POST",url:nT`service/global`,data:t,options:n})}deregisterService(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`service/${t}/${n}`,options:i})}getService(t,n,i){return this.httpClient.request({method:"GET",url:nT`service/${t}/${n}`,options:i})}heartbeat(t,n,i){return this.httpClient.request({method:"PUT",url:nT`service/${t}/${n}`,options:i})}}class nb{constructor(t){this.httpClient=t}createProvisioningConfig(t,n){return this.httpClient.request({method:"POST",url:nT`provisioning`,data:t,options:n})}getProvisioningConfigs(t){return this.httpClient.request({method:"GET",url:nT`provisioning`,options:t})}deleteProvisioningConfig(t,n){return this.httpClient.request({method:"DELETE",url:nT`provisioning/${t}`,options:n})}updateProvisioningConfig(t,n,i){return this.httpClient.request({method:"PUT",url:nT`provisioning/${t}`,data:n,options:i})}}class n_{constructor(t){this.httpClient=t}getDatapointExport(t,n){return this.httpClient.request({method:"GET",url:nT`asset/datapoint/export`,queryParams:t,options:n})}getDatapointPeriod(t,n){return this.httpClient.request({method:"GET",url:nT`asset/datapoint/periods`,queryParams:t,options:n})}getDatapoints(t,n,i,r){return this.httpClient.request({method:"POST",url:nT`asset/datapoint/${t}/${n}`,data:i,options:r})}}class ny{constructor(t){this.httpClient=t}updateCurrentUserLocale(t,n){return this.httpClient.request({method:"PUT",url:nT`user/locale`,data:t,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nT`user/query`,data:t,options:n})}requestPasswordResetCurrent(t){return this.httpClient.request({method:"PUT",url:nT`user/request-password-reset`,options:t})}updatePasswordCurrent(t,n){return this.httpClient.request({method:"PUT",url:nT`user/reset-password`,data:t,options:n})}updateCurrent(t,n){return this.httpClient.request({method:"PUT",url:nT`user/update`,data:t,options:n})}getCurrent(t){return this.httpClient.request({method:"GET",url:nT`user/user`,options:t})}getCurrentUserRealmRoles(t){return this.httpClient.request({method:"GET",url:nT`user/userRealmRoles`,options:t})}getCurrentUserClientRoles(t,n){return this.httpClient.request({method:"GET",url:nT`user/userRoles/${t}`,options:n})}disconnectUserSession(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/disconnect/${n}`,options:i})}requestPasswordReset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`user/${t}/request-password-reset/${n}`,options:i})}updatePassword(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`user/${t}/reset-password/${n}`,data:i,options:r})}resetSecret(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/reset-secret/${n}`,options:i})}updateRoles(t,n,i){return this.httpClient.request({method:"PUT",url:nT`user/${t}/roles`,data:n,options:i})}getUserRealmRoles(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/userRealmRoles/${n}`,options:i})}updateUserRealmRoles(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`user/${t}/userRealmRoles/${n}`,data:i,options:r})}getUserClientRoles(t,n,i,r){return this.httpClient.request({method:"GET",url:nT`user/${t}/userRoles/${n}/${i}`,options:r})}updateUserClientRoles(t,n,i,r,o){return this.httpClient.request({method:"PUT",url:nT`user/${t}/userRoles/${n}/${i}`,data:r,options:o})}getUserSessions(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/userSessions/${n}`,options:i})}create(t,n,i){return this.httpClient.request({method:"POST",url:nT`user/${t}/users`,data:n,options:i})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nT`user/${t}/users`,data:n,options:i})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nT`user/${t}/users/${n}`,options:i})}getClientRoles(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/${n}/roles`,options:i})}updateClientRoles(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`user/${t}/${n}/roles`,data:i,options:r})}get(t,n,i){return this.httpClient.request({method:"GET",url:nT`user/${t}/${n}`,options:i})}}class nv{constructor(t){this.httpClient=t}startTunnel(t,n){return this.httpClient.request({method:"POST",url:nT`gateway/tunnel`,data:t,options:n})}stopTunnel(t,n){return this.httpClient.request({method:"DELETE",url:nT`gateway/tunnel`,data:t,options:n})}getAllActiveTunnelInfos(t,n){return this.httpClient.request({method:"GET",url:nT`gateway/tunnel/${t}`,options:n})}getGatewayActiveTunnelInfos(t,n,i){return this.httpClient.request({method:"GET",url:nT`gateway/tunnel/${t}/${n}`,options:i})}getActiveTunnelInfo(t,n,i,r,o){return this.httpClient.request({method:"GET",url:nT`gateway/tunnel/${t}/${n}/${i}/${r}`,options:o})}}class nx{constructor(t){this.httpClient=t}getNotifications(t,n){return this.httpClient.request({method:"GET",url:nT`notification`,queryParams:t,options:n})}removeNotifications(t,n){return this.httpClient.request({method:"DELETE",url:nT`notification`,queryParams:t,options:n})}sendNotification(t,n){return this.httpClient.request({method:"POST",url:nT`notification/alert`,data:t,options:n})}removeNotification(t,n){return this.httpClient.request({method:"DELETE",url:nT`notification/${t}`,options:n})}notificationAcknowledged(t,n,i,r){return this.httpClient.request({method:"PUT",url:nT`notification/${t}/acknowledged`,queryParams:i,data:n,options:r})}notificationDelivered(t,n,i){return this.httpClient.request({method:"PUT",url:nT`notification/${t}/delivered`,queryParams:n,options:i})}}class nw{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nT`realm`,data:t,options:n})}getAll(t){return this.httpClient.request({method:"GET",url:nT`realm`,options:t})}getAccessible(t){return this.httpClient.request({method:"GET",url:nT`realm/accessible`,options:t})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nT`realm/${t}`,options:n})}get(t,n){return this.httpClient.request({method:"GET",url:nT`realm/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nT`realm/${t}`,data:n,options:i})}}class nF{constructor(t){this.httpClient=t}createGlobalRuleset(t,n){return this.httpClient.request({method:"POST",url:nT`rules`,data:t,options:n})}getGlobalRulesets(t,n){return this.httpClient.request({method:"GET",url:nT`rules`,queryParams:t,options:n})}createAssetRuleset(t,n){return this.httpClient.request({method:"POST",url:nT`rules/asset`,data:t,options:n})}getAssetRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nT`rules/asset/for/${t}`,queryParams:n,options:i})}deleteAssetRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nT`rules/asset/${t}`,options:n})}getAssetRuleset(t,n){return this.httpClient.request({method:"GET",url:nT`rules/asset/${t}`,options:n})}updateAssetRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`rules/asset/${t}`,data:n,options:i})}getAssetGeofences(t,n){return this.httpClient.request({method:"GET",url:nT`rules/geofences/${t}`,options:n})}getAssetEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nT`rules/info/asset/${t}`,options:n})}getGlobalEngineInfo(t){return this.httpClient.request({method:"GET",url:nT`rules/info/global`,options:t})}getRealmEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nT`rules/info/realm/${t}`,options:n})}createRealmRuleset(t,n){return this.httpClient.request({method:"POST",url:nT`rules/realm`,data:t,options:n})}getRealmRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nT`rules/realm/for/${t}`,queryParams:n,options:i})}deleteRealmRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nT`rules/realm/${t}`,options:n})}getRealmRuleset(t,n){return this.httpClient.request({method:"GET",url:nT`rules/realm/${t}`,options:n})}updateRealmRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`rules/realm/${t}`,data:n,options:i})}deleteGlobalRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nT`rules/${t}`,options:n})}getGlobalRuleset(t,n){return this.httpClient.request({method:"GET",url:nT`rules/${t}`,options:n})}updateGlobalRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nT`rules/${t}`,data:n,options:i})}}class nk{constructor(t){this.httpClient=t}getSettings(t){return this.httpClient.request({method:"GET",url:nT`map`,options:t})}saveSettings(t,n){return this.httpClient.request({method:"PUT",url:nT`map`,data:t,options:n})}deleteMap(t){return this.httpClient.request({method:"DELETE",url:nT`map/deleteMap`,options:t})}getCustomMapInfo(t){return this.httpClient.request({method:"GET",url:nT`map/getCustomMapInfo`,options:t})}getSettingsJs(t){return this.httpClient.request({method:"GET",url:nT`map/js`,options:t})}getTile(t,n,i,r){return this.httpClient.request({method:"GET",url:nT`map/tile/${t}/${n}/${i}`,options:r})}uploadMap(t,n){return this.httpClient.request({method:"POST",url:nT`map/upload`,queryParams:t,options:n})}}class nE{constructor(t){this.httpClient=t}deleteConnections(t,n){return this.httpClient.request({method:"DELETE",url:nT`gateway/connection`,queryParams:t,options:n})}getConnections(t){return this.httpClient.request({method:"GET",url:nT`gateway/connection`,options:t})}deleteConnection(t,n){return this.httpClient.request({method:"DELETE",url:nT`gateway/connection/${t}`,options:n})}getConnection(t,n){return this.httpClient.request({method:"GET",url:nT`gateway/connection/${t}`,options:n})}setConnection(t,n,i){return this.httpClient.request({method:"PUT",url:nT`gateway/connection/${t}`,data:n,options:i})}getConnectionStatus(t,n){return this.httpClient.request({method:"GET",url:nT`gateway/status/${t}`,options:n})}}function nT(t,...n){let i="";for(let r=0;r<n.length;r++)i+=t[r],i+=encodeURIComponent(n[r]);return i+t[t.length-1]}class nA{constructor(t,n=ni().create()){this._assetModelResource=new nM(t,n),this._syslogResource=new nS(t,n),this._agentResource=new nL(t,n),this._assetPredictedDatapointResource=new nD(t,n),this._consoleResource=new nI(t,n),this._appResource=new nR(t,n),this._flowResource=new nO(t,n),this._alarmResource=new nP(t,n),this._statusResource=new nB(t,n),this._configurationResource=new nN(t,n),this._assetResource=new n$(t,n),this._dashboardResource=new nz(t,n),this._externalServiceResource=new nj(t,n),this._provisioningResource=new nY(t,n),this._assetDatapointResource=new nH(t,n),this._userResource=new nU(t,n),this._gatewayServiceResource=new nV(t,n),this._notificationResource=new nW(t,n),this._realmResource=new nG(t,n),this._rulesResource=new nq(t,n),this._mapResource=new nZ(t,n),this._gatewayClientResource=new nK(t,n),this._assetResource=new n$(t,n)}get AssetModelResource(){return this._assetModelResource}get SyslogResource(){return this._syslogResource}get AgentResource(){return this._agentResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get ConsoleResource(){return this._consoleResource}get AppResource(){return this._appResource}get FlowResource(){return this._flowResource}get AlarmResource(){return this._alarmResource}get StatusResource(){return this._statusResource}get ConfigurationResource(){return this._configurationResource}get AssetResource(){return this._assetResource}get DashboardResource(){return this._dashboardResource}get ExternalServiceResource(){return this._externalServiceResource}get ProvisioningResource(){return this._provisioningResource}get AssetDatapointResource(){return this._assetDatapointResource}get UserResource(){return this._userResource}get GatewayServiceResource(){return this._gatewayServiceResource}get NotificationResource(){return this._notificationResource}get RealmResource(){return this._realmResource}get RulesResource(){return this._rulesResource}get MapResource(){return this._mapResource}get GatewayClientResource(){return this._gatewayClientResource}}class nC{constructor(t){this.axios=t}request(t){let n={};n.method=t.method,n.url=t.url,n.params=t.queryParams,n.data=t.data,function(t,n){if(void 0!=n)for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i])}(n,t.options);let i=t.copyFn;return this.axios.request(n).then(t=>(i&&t.data&&(t.originalData=t.data,t.data=i(t.data)),t))}}class nM extends nr{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nS extends no{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nL extends na{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nD extends ns{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nI extends nl{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nR extends nc{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nO extends nd{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nP extends nu{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nB extends nh{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nN extends nm{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class n$ extends nf{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nz extends np{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nj extends ng{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nY extends nb{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nH extends n_{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nU extends ny{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nV extends nv{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nW extends nx{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nG extends nw{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nq extends nF{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nZ extends nk{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}class nK extends nE{constructor(t,n=ni().create()){n.defaults.baseURL=t,super(new nC(n))}}ni().isAxiosError;let nX=new class{get api(){return this._client}constructor(){this._axiosInstance=ni().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(t=>(t.paramsSerializer=t=>tG().stringify(t,{arrayFormat:"repeat"}),t))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(t){this._axiosInstance.defaults.timeout=t}addRequestInterceptor(t){this._axiosInstance.interceptors.request.use(t)}initialise(t){this._baseUrl=t,this._client=new nA(t,this._axiosInstance)}};var nJ=function(t,n,i,r){return new(i||(i=Promise))(function(o,a){function s(t){try{c(r.next(t))}catch(t){a(t)}}function l(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var n;t.done?o(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,l)}c((r=r.apply(t,n||[])).next())})};!function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING"}(sM||(sM={}));let nQ="SUBSCRIBED:",n0="UNAUTHORIZED:",n1="TRIGGERED:",n2="EVENT:";class n3{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=n5.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=sM.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(t){this._statusCallbacks.push(t)}unsubscribeStatusChange(t){!function(t,n){if(0===t.length)return;let i=t.indexOf(n);i>=0&&t.splice(i,1)}(this._statusCallbacks,t)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===sM.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(sM.CONNECTING),this._connectingDeferred=new tX,this._doConnect().then(t=>{if(this._connectingDeferred){let n=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=n5.MIN_RECONNECT_DELAY,this._onStatusChanged(sM.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),n.resolve(t)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==sM.DISCONNECTED&&this._doDisconnect())}subscribe(t,n){let i={eventSubscription:t,callback:n,deferred:new tX};return null!=this._pendingSubscription||this._status!==sM.CONNECTED?(this._queuedSubscriptions.push(i),i.deferred.promise):(this._pendingSubscription=i,this._doSubscribe(t).then(t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(t,n),this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.resolve(t)}},t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.reject(t)}}),this._pendingSubscription.deferred.promise)}unsubscribe(t){return nJ(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(t))return void this._doUnsubscribe(t);if(this._assetEventCallbackMap.delete(t)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let t=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(t)}return}if(this._attributeEventCallbackMap.delete(t)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let t=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(t)}return}})}sendEvent(t){this._status===sM.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==sM.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(t,n,i){return nJ(this,void 0,void 0,function*(){let r=t&&"string"!=typeof t[0]?t.map(t=>t.id):t,o="AssetEvent"+n3._subscriptionCounter++;if(!this._assetEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"asset",filter:t};this._assetEventPromise=this.subscribe(n,t=>{this._assetEventCallbackMap.forEach(n=>n(t))})}return this._assetEventCallbackMap.set(o,t=>{let n=t.asset.id;r?r.find(t=>n===t)&&i(t):t.asset.realm===i$.displayRealm&&i(t)}),this._assetEventPromise.then(()=>{try{if(r&&n){let t={messageID:"read-assets:"+r.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(t).then(t=>{t.assets&&this._assetEventCallbackMap.has(o)&&t.assets.forEach(t=>{i({eventType:"asset",asset:t,cause:"READ"})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),o&&this.unsubscribe(o),n}return o})})}subscribeAttributeEvents(t,n,i){return nJ(this,void 0,void 0,function*(){let r=t&&"string"!=typeof t[0],o=r?t.map(t=>t.id):t,a=r?t:void 0,s="AttributeEvent"+n3._subscriptionCounter++;if(!this._attributeEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"attribute",filter:t};this._attributeEventPromise=this.subscribe(n,t=>{this._attributeEventCallbackMap.forEach(n=>n(t))})}let l=n=>{let a=n.ref;r?t.forEach(t=>{a.id===t.id&&a.name===t.name&&i(n)}):o?o.find(t=>a.id===t)&&i(n):n.realm===i$.displayRealm&&i(n)};return this._attributeEventCallbackMap.set(s,l),this._attributeEventPromise.then(()=>{try{if(n&&o){let t={messageID:"read-assets:"+o.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(t).then(t=>{t.assets&&this._attributeEventCallbackMap.has(s)&&t.assets.forEach(t=>{t.attributes&&Object.entries(t.attributes).forEach(([n,i])=>{(!a||a.find(i=>i.id===t.id&&i.name===n))&&l({eventType:"attribute",timestamp:i.timestamp,value:i.value,ref:{id:t.id,name:n}})})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),s&&this.unsubscribe(s),n}return s})})}_processNextSubscription(){this._status===sM.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let t=this._queuedSubscriptions.shift();t&&this.subscribe(t.eventSubscription,t.callback).then(n=>{let i=t.deferred;t.deferred=null,i&&i.resolve(n)},n=>{let i=t.deferred;t.deferred=null,i&&i.reject(n)})},0)}_onStatusChanged(t){t!==this._status&&(console.debug("Event provider status changed: "+t),this._status=t,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(n=>n(t))},0))}_onMessageReceived(t,n){let i=this._subscriptionMap.get(t);i&&i.callback(n)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let t in this._subscriptionMap)this._subscriptionMap.has(t)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(t));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===sM.CONNECTED&&this._onStatusChanged(sM.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(sM.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<n5.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(n5.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}n3.MIN_RECONNECT_DELAY=0,n3.MAX_RECONNECT_DELAY=3e4,n3._subscriptionCounter=0;class n5 extends n3{get endpointUrl(){return this._endpointUrl}constructor(t){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(t.startsWith("https:")?"wss":"ws")+"://"+t.substr(t.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let t=this._endpointUrl+"?Realm="+i$.config.realm;return i$.authenticated&&(t+="&Authorization="+i$.getAuthorizationHeader()),this._webSocket=new WebSocket(t),this._connectDeferred=new tX,this._webSocket.onopen=()=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!0)}},this._webSocket.onerror=t=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=t=>{let n=t.data;if(n&&n.startsWith(nQ)){let t=JSON.parse(n.substring(nQ.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&i.resolve(t.subscriptionId)}else if(n.startsWith(n0)){let t=JSON.parse(n.substring(n0.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&(console.warn("Unauthorized event subscription: "+JSON.stringify(t,null,2)),i.reject("Unauthorized"))}else if(n.startsWith(n1)){let t=JSON.parse(n.substring(n1.length));t.events&&t.events.forEach(n=>{this._onMessageReceived(t.subscriptionId,n)})}else if(n.startsWith(n2)){let t=JSON.parse(n.substring(n2.length));if(t.messageID){let n=this._repliesDeferred.get(t.messageID);this._repliesDeferred.delete(t.messageID),n&&n.resolve(t)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var t;null==(t=this._webSocket)||t.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(t){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new tX,t.subscriptionId||(t.subscriptionId=n5._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(t)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(t){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:t}))}_doSend(t){let n=n2+JSON.stringify(t);this._webSocket.send(n)}_doSendWithReply(t){if(t.messageID||(t.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(t.messageID))return Promise.reject("There's already a pending send and reply with this ID");let n=new tX;return this._repliesDeferred.set(t.messageID,n),this._webSocket.send(n2+JSON.stringify(t)),n.promise}}function n4(t){return(n4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n5._subscriptionCounter=1;var n6=[],n8=n6.forEach,n7=n6.slice;function n9(t){return n8.call(n7.call(arguments,1),function(n){if(n)for(var i in n)void 0===t[i]&&(t[i]=n[i])}),t}function ie(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":n4(XMLHttpRequest))==="object"}var it=i(46850),ii=i.t(it,2);function ir(t){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"function"==typeof fetch&&(sS="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),ie()&&("undefined"!=typeof global&&global.XMLHttpRequest?sL=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(sL=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?sD=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(sD=window.ActiveXObject)),sS||!ii||sL||sD||(sS=it||ii),"function"!=typeof sS&&(sS=void 0);var io=function(t,n){if(n&&"object"===ir(n)){var i="";for(var r in n)i+="&"+encodeURIComponent(r)+"="+encodeURIComponent(n[r]);if(!i)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+i.slice(1)}return t},ia=function(t,n,i){sS(t,n).then(function(t){if(!t.ok)return i(t.statusText||"Error",{status:t.status});t.text().then(function(n){i(null,{status:t.status,data:n})}).catch(i)}).catch(i)},is=!1,il=function(t,n,i,r){t.queryStringParams&&(n=io(n,t.queryStringParams));var o=n9({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);i&&(o["Content-Type"]="application/json");var a="function"==typeof t.requestOptions?t.requestOptions(i):t.requestOptions,s=n9({method:i?"POST":"GET",body:i?t.stringify(i):void 0,headers:o},is?{}:a);try{ia(n,s,r)}catch(t){if(!a||0===Object.keys(a).length||!t.message||0>t.message.indexOf("not implemented"))return r(t);try{Object.keys(a).forEach(function(t){delete s[t]}),ia(n,s,r),is=!0}catch(t){r(t)}}},ic=function(t,n,i,r){i&&"object"===ir(i)&&(i=io("",i).slice(1)),t.queryStringParams&&(n=io(n,t.queryStringParams));try{(o=sL?new sL:new sD("MSXML2.XMLHTTP.3.0")).open(i?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,i&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var o,a=t.customHeaders;if(a="function"==typeof a?a():a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(i)}catch(t){console&&console.log(t)}};let id=function(t,n,i,r){return("function"==typeof i&&(r=i,i=void 0),r=r||function(){},sS)?il(t,n,i,r):ie()||"function"==typeof ActiveXObject?ic(t,n,i,r):void r(Error("No fetch and no xhr implementation found!"))};var iu=function(){var t;function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof n))throw TypeError("Cannot call a class as a function");this.services=t,this.options=i,this.allOptions=r,this.type="backend",this.init(t,i,r)}return t=[{key:"init",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=n9(i,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){var r,o;return r={},o=i||"",n in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r},request:id,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval(function(){return n.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,r,o){var a,s,l=this,c=this.options.loadPath;"function"==typeof this.options.loadPath&&(c=this.options.loadPath(t,i)),(c=(s=a=c)&&"function"==typeof s.then?a:Promise.resolve(a)).then(function(a){if(!a)return o(null,{});var s=l.services.interpolator.interpolate(a,{lng:t.join("+"),ns:i.join("+")});l.loadUrl(s,o,n,r)})}},{key:"loadUrl",value:function(t,n,i,r){var o=this;this.options.request(this.options,t,void 0,function(a,s){var l,c;if(s&&(s.status>=500&&s.status<600||!s.status))return n("failed loading "+t+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return n("failed loading "+t+"; status code: "+s.status,!1);if(!s&&a&&a.message&&a.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+a.message,!0);if(a)return n(a,!1);try{l="string"==typeof s.data?o.options.parse(s.data,i,r):s.data}catch(n){c="failed parsing "+t+" to json"}if(c)return n(c,!1);n(null,l)})}},{key:"create",value:function(t,n,i,r,o){var a=this;if(this.options.addPath){"string"==typeof t&&(t=[t]);var s=this.options.parsePayload(n,i,r),l=0,c=[],d=[];t.forEach(function(i){var r=a.options.addPath;"function"==typeof a.options.addPath&&(r=a.options.addPath(i,n));var u=a.services.interpolator.interpolate(r,{lng:i,ns:n});a.options.request(a.options,u,s,function(n,i){l+=1,c.push(n),d.push(i),l===t.length&&o&&o(c,d)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,r=n.languageUtils,o=n.logger,a=i.language;if(!a||"cimode"!==a.toLowerCase()){var s=[],l=function(t){r.toResolveHierarchy(t).forEach(function(t){0>s.indexOf(t)&&s.push(t)})};l(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(t){return l(t)}),s.forEach(function(n){t.allOptions.ns.forEach(function(t){i.read(n,t,"read",null,null,function(r,a){r&&o.warn("loading namespace ".concat(t," for language ").concat(n," failed"),r),!r&&a&&o.log("loaded namespace ".concat(t," for language ").concat(n),a),i.loaded("".concat(n,"|").concat(t),r,a)})})})}}}],function(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();iu.type="backend";class ih extends eA{constructor(t){if(super(t),this.it=ee,t.type!==eE.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ee||null==t)return this._t=void 0,this.it=t;if(t===Q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}ih.directiveName="unsafeHTML",ih.resultType=1,eT(ih);class im extends ih{}im.directiveName="unsafeSVG",im.resultType=2;let ip=eT(im),ig={size:24,icons:{logo:'<path style=\'pointer-events: var(--or-icon-pointer-events, none);\' fill="#C4D600" d="m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z" /><path fill="#4E9D2D" d="m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z"/><path fill="#1D5632"d="m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z"/>',"logo-plain":"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",marker:'<ellipse fill="#000" opacity="0.2" ry="1.5" rx="4" cy="22.5" cx="12" /><path style=\'pointer-events: var(--or-icon-pointer-events, none);\' d="m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z" />'}};var ib=function(t,n,i,r){var o,a=arguments.length,s=a<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(s=(a<3?o(s):a>3?o(n,i,s):o(n,i))||s);return a>3&&s&&Object.defineProperty(n,i,s),s};let i_=i(7319);class iy extends CustomEvent{constructor(){super(iy.NAME,{bubbles:!0,composed:!0})}}iy.NAME="or-iconset-added";let iv=new class{constructor(){this._icons={}}addIconSet(t,n){this._icons[t]=n,this._defaultIconSet||(this._defaultIconSet=n),n.onAdd&&n.onAdd(),window.dispatchEvent(new iy)}getIconSet(t){return this._icons[t]}getIconTemplate(t){if(!t)return X``;let n=(t||"").split(":"),i=n.pop(),r=n.pop(),o=this._defaultIconSet;return(r&&(o=this.getIconSet(r)),i&&o)?o.getIconTemplate(i):X``}},ix=class extends eg{constructor(){super(...arguments),this._handler=t=>{this._updateIcon()}}static get styles(){return[m`
71
71
  :host {
72
72
  --internal-or-icon-width: var(--or-icon-width, 24px);
73
73
  --internal-or-icon-height: var(--or-icon-height, 24px);