@openremote/or-attribute-input 1.4.0 → 1.5.0-snapshot.20250422083638
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.
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:host([hidden]) {
|
|
16
16
|
display: none;
|
|
17
17
|
}
|
|
18
|
-
`,un([Le({type:String})],hn.prototype,"value",void 0),un([Le({type:Object})],hn.prototype,"options",void 0),hn=un([Me("or-translate")],hn),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(mn||(mn={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(pn||(pn={})),function(e){e.MANUAL="MANUAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET",e.AGENT="AGENT"}(fn||(fn={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(gn||(gn={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(bn||(bn={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(_n||(_n={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(yn||(yn={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.DISCONNECTING="DISCONNECTING",e.CONNECTED="CONNECTED",e.DISABLED="DISABLED",e.WAITING="WAITING",e.ERROR="ERROR",e.STOPPED="STOPPED"}(vn||(vn={})),function(e){e.EV="EV",e.PHEV="PHEV"}(xn||(xn={})),function(e){e.YAZAKI="YAZAKI",e.MENNEKES="MENNEKES",e.LE_GRAND="LE_GRAND",e.CHADEMO="CHADEMO",e.COMBO="COMBO",e.SCHUKO="SCHUKO",e.ENERGYLOCK="ENERGYLOCK"}(wn||(wn={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(Fn||(Fn={})),function(e){e.REQUEST_START="REQUEST_START",e.REQUEST_REPEATING="REQUEST_REPEATING",e.REQUEST_CANCEL="REQUEST_CANCEL",e.READY="READY",e.COMPLETED="COMPLETED",e.RUNNING="RUNNING",e.CANCELLED="CANCELLED"}(kn||(kn={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(En||(En={})),function(e){e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",e.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",e.INVALID_VALUE="INVALID_VALUE",e.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",e.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",e.CANNOT_PROCESS="CANNOT_PROCESS",e.QUEUE_FULL="QUEUE_FULL",e.UNKNOWN="UNKNOWN",e.ASSET_ID_MISSING="ASSET_ID_MISSING",e.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(An||(An={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(Cn||(Cn={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(Mn||(Mn={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(Sn||(Sn={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(Tn||(Tn={})),function(e){e.MIN="MIN",e.AVG="AVG",e.MAX="MAX"}(Ln||(Ln={})),function(e){e.TERMINATING="TERMINATING",e.DISABLED="DISABLED",e.ALREADY_CONNECTED="ALREADY_CONNECTED",e.UNRECOGNISED="UNRECOGNISED",e.PERMANENT_ERROR="PERMANENT_ERROR",e.SYNC_ERROR="SYNC_ERROR"}(Dn||(Dn={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(In||(In={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(Rn||(Rn={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(On||(On={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(Pn||(Pn={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}($n||($n={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(Bn||(Bn={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(Nn||(Nn={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(zn||(zn={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(jn||(jn={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(Yn||(Yn={})),function(e){e.MESSAGE_INVALID="MESSAGE_INVALID",e.CERTIFICATE_INVALID="CERTIFICATE_INVALID",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",e.CONFIG_DISABLED="CONFIG_DISABLED",e.USER_DISABLED="USER_DISABLED",e.SERVER_ERROR="SERVER_ERROR",e.ASSET_ERROR="ASSET_ERROR",e.SERVER_BUSY="SERVER_BUSY"}(Hn||(Hn={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(Un||(Un={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(Vn||(Vn={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_EQUALS="GREATER_EQUALS",e.LESS_THAN="LESS_THAN",e.LESS_EQUALS="LESS_EQUALS",e.BETWEEN="BETWEEN"}(Wn||(Wn={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(qn||(qn={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(Gn||(Gn={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(Kn||(Kn={})),function(e){e.AND="AND",e.OR="OR"}(Xn||(Xn={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(Zn||(Zn={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(Jn||(Jn={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(Qn||(Qn={})),function(e){e.READY="READY",e.DEPLOYED="DEPLOYED",e.COMPILATION_ERROR="COMPILATION_ERROR",e.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",e.EXECUTION_ERROR="EXECUTION_ERROR",e.LOOP_ERROR="LOOP_ERROR",e.DISABLED="DISABLED",e.PAUSED="PAUSED",e.EXPIRED="EXPIRED",e.REMOVED="REMOVED",e.EMPTY="EMPTY"}(ei||(ei={})),function(e){e.SUNRISE="SUNRISE",e.SUNSET="SUNSET",e.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",e.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",e.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",e.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",e.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",e.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",e.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",e.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",e.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",e.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",e.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",e.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",e.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",e.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",e.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",e.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",e.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",e.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(ti||(ti={})),function(e){e.NUMBER="NUMBER",e.NUMBER_ARRAY="NUMBER_ARRAY",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.TRIGGER="TRIGGER",e.COLOR="COLOR",e.ANY="ANY"}(ni||(ni={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(ii||(ii={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}(oi||(oi={})),function(e){e.TEXT="TEXT",e.MULTILINE="MULTILINE",e.NUMBER="NUMBER",e.DROPDOWN="DROPDOWN",e.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",e.CHECKBOX="CHECKBOX",e.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",e.COLOR="COLOR",e.DATE="DATE"}(ri||(ri={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(ai||(ai={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(si||(si={})),function(e){e.READ_ADMIN="read:admin",e.READ_LOGS="read:logs",e.READ_USERS="read:users",e.READ_MAP="read:map",e.READ_ASSETS="read:assets",e.READ_RULES="read:rules",e.READ_INSIGHTS="read:insights",e.READ_ALARMS="read:alarms",e.WRITE_USER="write:user",e.WRITE_ADMIN="write:admin",e.WRITE_LOGS="write:logs",e.WRITE_ASSETS="write:assets",e.WRITE_ATTRIBUTES="write:attributes",e.WRITE_RULES="write:rules",e.WRITE_INSIGHTS="write:insights",e.WRITE_ALARMS="write:alarms",e.READ="read",e.WRITE="write"}(li||(li={})),function(e){e.ASSET="ASSET",e.AGENT="AGENT",e.NOTIFICATION="NOTIFICATION",e.ALARM="ALARM",e.RULES="RULES",e.PROTOCOL="PROTOCOL",e.GATEWAY="GATEWAY",e.MODEL_AND_VALUES="MODEL_AND_VALUES",e.API="API",e.DATA="DATA"}(ci||(ci={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(di||(di={})),function(e){e.NUMERIC="numeric",e.DIGIT_2="2-digit",e.FULL="full",e.LONG="long",e.MEDIUM="medium",e.SHORT="short",e.NARROW="narrow"}(ui||(ui={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(hi||(hi={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(mi||(mi={})),function(e){e.JAPANESE="JAPANESE",e.BUDDHIST="BUDDHIST",e.ROC="ROC",e.ISLAMIC="ISLAMIC",e.ISO8601="ISO8601",e.CHINESE="CHINESE",e.ETHIOPIC="ETHIOPIC",e.HEBREW="HEBREW",e.GREGORIAN="GREGORIAN"}(pi||(pi={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(fi||(fi={})),function(e){e.PEOPLECOUNTERASSET="PeopleCounterAsset",e.MAILAGENT="MailAgent",e.UDPAGENT="UDPAgent",e.STORAGESIMULATORAGENT="StorageSimulatorAgent",e.ROOMASSET="RoomAsset",e.CITYASSET="CityAsset",e.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",e.ELECTRICVEHICLEASSET="ElectricVehicleAsset",e.VENTILATIONASSET="VentilationAsset",e.TRADFRILIGHTASSET="TradfriLightAsset",e.CONSOLEASSET="ConsoleAsset",e.PRESENCESENSORASSET="PresenceSensorAsset",e.LIGHTASSET="LightAsset",e.KNXAGENT="KNXAgent",e.PLUGASSET="PlugAsset",e.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",e.WEATHERASSET="WeatherAsset",e.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",e.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",e.THINGASSET="ThingAsset",e.WEBSOCKETAGENT="WebsocketAgent",e.TCPAGENT="TCPAgent",e.GATEWAYASSET="GatewayAsset",e.SERIALAGENT="SerialAgent",e.BLUETOOTHMESHAGENT="BluetoothMeshAgent",e.PARKINGASSET="ParkingAsset",e.TRADFRIPLUGASSET="TradfriPlugAsset",e.SIMULATORAGENT="SimulatorAgent",e.SNMPAGENT="SNMPAgent",e.GROUPASSET="GroupAsset",e.BUILDINGASSET="BuildingAsset",e.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",e.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",e.MQTTAGENT="MQTTAgent",e.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",e.VELBUSTCPAGENT="VelbusTCPAgent",e.ARTNETLIGHTASSET="ArtnetLightAsset",e.VELBUSSERIALAGENT="VelbusSerialAgent",e.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",e.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",e.MICROPHONEASSET="MicrophoneAsset",e.ZWAVEAGENT="ZWaveAgent",e.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",e.HTTPAGENT="HTTPAgent",e.DOORASSET="DoorAsset",e.THERMOSTATASSET="ThermostatAsset",e.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",e.SHIPASSET="ShipAsset"}(gi||(gi={})),function(e){e.SUPPORTSEXPORT="supportsExport",e.ENERGYSELFCONSUMPTION="energySelfConsumption",e.LASTACCESS="lastAccess",e.CHARGERID="chargerID",e.POSITION="position",e.CARBONSAVING="carbonSaving",e.ROUTINGMODE="routingMode",e.LASTWILLRETAIN="lastWillRetain",e.LASTWILLTOPIC="lastWillTopic",e.SERIALBAUDRATE="serialBaudrate",e.BASEURL="baseURL",e.REQUIREDVALUES="requiredValues",e.FINANCIALSAVING="financialSaving",e.FLEETCATEGORY="fleetCategory",e.GATEWAYSTATUS="gatewayStatus",e.NO2LEVEL="NO2Level",e.TAGS="tags",e.MILEAGEMIN="mileageMin",e.UNLOCK="unlock",e.CHECKINTERVALSECONDS="checkIntervalSeconds",e.LOCATION="location",e.CLIENTSECRET="clientSecret",e.WINDDIRECTION="windDirection",e.WINDSPEED="windSpeed",e.PARTICLESPM10="particlesPM10",e.APPLICATIONKEY="applicationKey",e.POWEREXPORTMAX="powerExportMax",e.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",e.WATERLEVEL="waterLevel",e.CONNECTHEADERS="connectHeaders",e.CONSOLENAME="consoleName",e.WEBSOCKETQUERY="websocketQuery",e.PREFERHTML="preferHTML",e.COOLING="cooling",e.POLLINGMILLIS="pollingMillis",e.SOILTEMPERATURE="soilTemperature",e.SUNIRRADIANCE="sunIrradiance",e.ODOMETER="odometer",e.SUPPORTSIMPORT="supportsImport",e.MESSAGEMAXLENGTH="messageMaxLength",e.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",e.LIGHTID="lightId",e.POWER="power",e.STREET="street",e.DELETEPROCESSEDMAIL="deleteProcessedMail",e.WINDSPEEDMIN="windSpeedMin",e.POWERSETPOINT="powerSetpoint",e.PRESENCE="presence",e.SPACESOCCUPIED="spacesOccupied",e.STARTTLS="startTLS",e.AGENTSTATUS="agentStatus",e.MESSAGECHARSET="messageCharset",e.CERTIFICATEALIAS="certificateAlias",e.PANELPITCH="panelPitch",e.EMAIL="email",e.BINDPORT="bindPort",e.PARTICLESPM1="particlesPM1",e.SPEED="speed",e.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",e.MESSAGESTRIPDELIMITER="messageStripDelimiter",e.AREA="area",e.COUNTRY="country",e.SHIPTYPE="shipType",e.CONNECTSUBSCRIPTIONS="connectSubscriptions",e.RELATIVEHUMIDITY="relativeHumidity",e.SOURCEADDRESS="sourceAddress",e.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",e.RAINFALL="rainfall",e.ENERGYIMPORTTOTAL="energyImportTotal",e.OAUTHGRANT="oAuthGrant",e.OZONELEVEL="ozoneLevel",e.COUNTINMINUTE="countInMinute",e.PORT="port",e.TUNNELINGSUPPORTED="tunnelingSupported",e.ENINUMBER="ENINumber",e.AGENTDISABLED="agentDisabled",e.DISABLED="disabled",e.FORCECHARGE="forceCharge",e.TIMEINJECTIONINTERVAL="timeInjectionInterval",e.FINANCIALWEIGHTING="financialWeighting",e.ENERGYLEVELPERCENTAGE="energyLevelPercentage",e.SPACESBUFFER="spacesBuffer",e.VEHICLECATEGORY="vehicleCategory",e.FANSPEED="fanSpeed",e.FINANCIALCOST="financialCost",e.NOTES="notes",e.MAILFOLDERNAME="mailFolderName",e.TEMPERATURE="temperature",e.AVAILABLECHARGINGSPACES="availableChargingSpaces",e.ENERGYCAPACITY="energyCapacity",e.POWERIMPORTMIN="powerImportMin",e.INTERVALSIZE="intervalSize",e.SNMPVERSIONVALUE="SNMPVersionValue",e.SOUNDLEVEL="soundLevel",e.CONNECTURL="connectURL",e.CLIENTID="clientId",e.VEHICLEID="vehicleID",e.SUNAZIMUTH="sunAzimuth",e.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",e.WEBSOCKETMODE="websocketMode",e.COLOURTEMPERATURE="colourTemperature",e.VEHICLECONNECTED="vehicleConnected",e.MILEAGEMINIMUM="mileageMinimum",e.COLOURRGB="colourRGB",e.CARBONIMPORT="carbonImport",e.PRICEHOURLY="priceHourly",e.WINDSPEEDMAX="windSpeedMax",e.PINGDISABLED="pingDisabled",e.FLOW="flow",e.CHILDASSETTYPE="childAssetType",e.NETWORKKEY="networkKey",e.UNIVERSE="universe",e.MSSINUMBER="MSSINumber",e.LEDCOUNT="lEDCount",e.SUBSCRIBEQOS="subscribeQos",e.LOCKED="locked",e.PROTOCOL="protocol",e.TARIFFIMPORT="tariffImport",e.ENERGYRENEWABLESHARE="energyRenewableShare",e.REGION="region",e.CONSOLEPLATFORM="consolePlatform",e.POWEREXPORTMIN="powerExportMin",e.EFFICIENCYEXPORT="efficiencyExport",e.CHARGECYCLES="chargeCycles",e.SERIALPORT="serialPort",e.PANELORIENTATION="panelOrientation",e.LENGTH="length",e.USERNAMEPASSWORD="usernamePassword",e.POWERFORECAST="powerForecast",e.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",e.PROXYADDRESS="proxyAddress",e.REQUESTQUERYPARAMETERS="requestQueryParameters",e.ENERGYLOCAL="energyLocal",e.ENERGYAUTARKY="energyAutarky",e.MODEL="model",e.MANUFACTURER="manufacturer",e.ONOFF="onOff",e.RESUMESESSION="resumeSession",e.TARIFFEXPORT="tariffExport",e.CITY="city",e.CONNECTORTYPE="connectorType",e.ENERGYEXPORTTOTAL="energyExportTotal",e.CARBONEXPORT="carbonExport",e.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",e.ENERGYLEVEL="energyLevel",e.OPTIMISATIONDISABLED="optimisationDisabled",e.WEBSOCKETPATH="websocketPath",e.WINDSPEEDREFERENCE="windSpeedReference",e.PRICEDAILY="priceDaily",e.COUNTGROWTHMINUTE="countGrowthMinute",e.IMONUMBER="IMONumber",e.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",e.REQUESTHEADERS="requestHeaders",e.COUNTOUTMINUTE="countOutMinute",e.HOST="host",e.ENERGYTYPE="energyType",e.CONSOLEVERSION="consoleVersion",e.MTU="mtu",e.PANELAZIMUTH="panelAzimuth",e.SEQUENCENUMBER="sequenceNumber",e.SUNALTITUDE="sunAltitude",e.COUNTOUT="countOut",e.CHARGERCONNECTED="chargerConnected",e.ROOMNUMBER="roomNumber",e.PARTICLESPM2_5="particlesPM2_5",e.COUNTIN="countIn",e.MESSAGESOURCEADDRESS="messageSourceAddress",e.MILEAGECHARGED="mileageCharged",e.TEMPERATURESETPOINT="temperatureSetpoint",e.CONSOLEPROVIDERS="consoleProviders",e.POWERIMPORTMAX="powerImportMax",e.COUNTTOTAL="countTotal",e.SPACESTOTAL="spacesTotal",e.BINDHOST="bindHost",e.MESSAGECONVERTBINARY="messageConvertBinary",e.MESSAGEDELIMITERS="messageDelimiters",e.EFFICIENCYIMPORT="efficiencyImport",e.SUNZENITH="sunZenith",e.BRIGHTNESS="brightness",e.POSTALCODE="postalCode",e.SPACESOPEN="spacesOpen",e.HUMIDITY="humidity",e.MILEAGECAPACITY="mileageCapacity",e.SECUREMODE="secureMode",e.DIRECTION="direction",e.ENERGYLEVELSCHEDULE="energyLevelSchedule",e.UVINDEX="uVIndex",e.NATMODE="NATMode",e.UPDATEONWRITE="updateOnWrite",e.GROUPID="groupId",e.LASTWILLPAYLOAD="lastWillPayload",e.FOLLOWREDIRECTS="followRedirects",e.CARBONCOST="carbonCost",e.MESSAGECONVERTHEX="messageConvertHex",e.PUBLISHQOS="publishQos"}(bi||(bi={})),function(e){e.FORMAT="format",e.RULESTATE="ruleState",e.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",e.STOREDATAPOINTS="storeDataPoints",e.LABEL="label",e.CONSTRAINTS="constraints",e.SHOWONDASHBOARD="showOnDashboard",e.READONLY="readOnly",e.MULTILINE="multiline",e.ACCESSPUBLICWRITE="accessPublicWrite",e.MOMENTARY="momentary",e.AGENTLINK="agentLink",e.ACCESSRESTRICTEDREAD="accessRestrictedRead",e.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",e.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",e.SECRET="secret",e.ATTRIBUTELINKS="attributeLinks",e.RULERESETIMMEDIATE="ruleResetImmediate",e.FORECAST="forecast",e.UNITS="units",e.USERCONNECTED="userConnected",e.ACCESSPUBLICREAD="accessPublicRead"}(_i||(_i={})),function(e){e.WSURL="WS_URL",e.POSITIVENUMBER="positiveNumber",e.VALUEDESCRIPTOR="valueDescriptor",e.LONG="long",e.BOOLEANMAP="booleanMap",e.MQTTQOS="MQTTQos",e.GEOJSONPOINT="GEO_JSONPoint",e.SNMPVERSION="SNMPVersion",e.ASSETTYPE="assetType",e.JSONOBJECT="JSONObject",e.BIGNUMBER="bigNumber",e.IPADDRESS="IPAddress",e.EMAIL="email",e.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",e.ATTRIBUTEREFERENCE="attributeReference",e.INTEGER="integer",e.OAUTHGRANT="oAuthGrant",e.NUMBER="number",e.TEXTMAP="textMap",e.WEBSOCKETSUBSCRIPTION="websocketSubscription",e.BOOLEAN="boolean",e.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",e.TIMESTAMPISO8601="timestampISO8601",e.MULTIVALUEDTEXTMAP="multivaluedTextMap",e.JSON="JSON",e.INTEGERBYTE="integerByte",e.AGENTLINK="agentLink",e.CALENDAREVENT="calendarEvent",e.CONNECTIONSTATUS="connectionStatus",e.VALUECONSTRAINT="valueConstraint",e.ASSETQUERY="assetQuery",e.COLOURRGB="colourRGB",e.VALUEFORMAT="valueFormat",e.TEXT="text",e.BYTE="byte",e.USERNAMEANDPASSWORD="usernameAndPassword",e.HTTPURL="HTTP_URL",e.ATTRIBUTELINK="attributeLink",e.ASSETID="assetID",e.NUMBERMAP="numberMap",e.HTTPMETHOD="HTTPMethod",e.PANELORIENTATION="panelOrientation",e.ATTRIBUTESTATE="attributeState",e.POSITIVEINTEGER="positiveInteger",e.EXECUTIONSTATUS="executionStatus",e.BIGINTEGER="bigInteger",e.PERIODDURATIONISO8601="periodDurationISO8601",e.DATEANDTIME="dateAndTime",e.CONNECTORTYPE="connectorType",e.NEGATIVEINTEGER="negativeInteger",e.TCPIPPORTNUMBER="TCP_IPPortNumber",e.INTEGERMAP="integerMap",e.ENERGYTYPE="energyType",e.TIMESTAMP="timestamp",e.UUID="UUID",e.FORECASTCONFIGURATION="forecastConfiguration",e.TIMEDURATIONISO8601="timeDurationISO8601",e.CONSOLEPROVIDERS="consoleProviders",e.NEGATIVENUMBER="negativeNumber",e.CRONEXPRESSION="CRONExpression",e.DIRECTION="direction",e.HOSTORIPADDRESS="hostOrIPAddress"}(yi||(yi={})),function(e){e.MONTH="month",e.MILE_SCANDINAVIAN="mile_scandinavian",e.YEAR="year",e.VOLT="volt",e.HERTZ="hertz",e.MILE="mile",e.BTU="btu",e.FOOT="foot",e.MEGA="mega",e.INCH="inch",e.IN_HG="inch_mercury",e.CENTI="centi",e.GRAM="gram",e.KNOT="knot",e.METRE="metre",e.LITRE="litre",e.FLUID_OUNCE="fluid_ounce",e.CELSIUS="celsius",e.DECIBEL="decibel",e.FAHRENHEIT="fahrenheit",e.WATT="watt",e.PEAK="peak",e.MICRO="micro",e.PER="per",e.STONE="stone",e.VAR="var",e.OUNCE="ounce",e.HECTARE="hectare",e.YARD="yard",e.JOULE="joule",e.DEGREE="degree",e.KILO="kilo",e.KELVIN="kelvin",e.CARBON="carbon",e.DECIBEL_ATTENUATED="decibel_attenuated",e.SQUARED="squared",e.PERCENTAGE="percentage",e.CUBED="cubed",e.DAY="day",e.RADIAN="radian",e.OHM="ohm",e.MINUTE="minute",e.PART_PER_MILLION="ppm",e.AMP="amp",e.MASS_POUND="pound",e.HOUR="hour",e.ACRE="acre",e.RPM="rpm",e.PASCAL="pascal",e.LUMEN="lumen",e.WEEK="week",e.GALLON="gallon",e.LUX="lux",e.MILLI="milli",e.BAR="bar",e.HECTO="hecto",e.SECOND="second"}(vi||(vi={})),xi||(xi={});class wi{static getAssetDescriptors(){return wi._assetTypeInfos.map((e=>e.assetDescriptor))}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(e){if(e)return e.assetDescriptor?e:("string"!=typeof e&&(e=e.name),this._assetTypeInfos.find((t=>t.assetDescriptor.name===e)))}static getAssetDescriptor(e){if(!e)return;if(e.assetDescriptor)return e.assetDescriptor;if("string"!=typeof e)return e;const t=this._assetTypeInfos.find((t=>t.assetDescriptor.name===e));return t?t.assetDescriptor:void 0}static getAttributeDescriptor(e,t){if(!e)return;const n=this.getAssetTypeInfo(t||"ThingAsset");return n&&n.attributeDescriptors?n.attributeDescriptors.find((t=>t.name===e)):void 0}static getValueDescriptor(e){if(!e)return;let t;if(e.endsWith("[]"))for(t=0;e.endsWith("[]");)e=e.substring(0,e.length-2),t++;let n=this._valueDescriptors.find((t=>t.name===e));return n&&t&&(n=Object.assign(Object.assign({},n),{arrayDimensions:t})),n}static resolveValueDescriptor(e,t){let n;return t&&("string"==typeof t&&(n=wi.getValueDescriptor(t)),n=t.jsonType?t:wi.getValueDescriptor(t.type)),!n&&e&&(n=wi.getValueDescriptor("JSON")),n}static resolveValueTypeFromValue(e){if(null!=e){if("number"==typeof e)return"number";if("string"==typeof e)return"text";if("boolean"==typeof e)return"boolean";if(Array.isArray(e)){let t=1,n=e.find((e=>null!=e));for(;Array.isArray(n);)n=n.find((e=>null!=e)),t++;let i=this.resolveValueTypeFromValue(n);if(!i)return;for(;t>0;)i+="[]",t--;return i}return e instanceof Date?"dateAndTime":void 0}}static getAttributeAndValueDescriptors(e,t,n){let i,o;if(t&&"string"!=typeof t)i=t;else{const o=this.getAssetTypeInfo(e||"ThingAsset");if(!o)return[void 0,void 0];"string"==typeof t&&(i=this.getAttributeDescriptor(t,o)),!i&&n&&(i={type:n.type,name:n.name,meta:n.meta})}return i&&(o=this.getValueDescriptor(i.type)),[i,o]}static getMetaItemDescriptor(e){if(e)return this._metaItemDescriptors.find((t=>t.name===e))}static getAssetDescriptorColour(e,t){const n=this.getAssetDescriptor(e);return n&&n.colour?n.colour:t}static getAssetDescriptorIcon(e,t){const n=this.getAssetDescriptor(e);return n&&n.icon?n.icon:t}}wi._assetTypeInfos=[],wi._metaItemDescriptors=[],wi._valueDescriptors=[],o(12960);var Fi=o(16960),ki=o.n(Fi),Ei=o(56104),Ai=o.n(Ei),Ci=o(97944);class Mi{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t})),Object.freeze(this)}}function Si(e,t,n=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function)return e===t;if(e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length)return!1;if(e instanceof Date)return!1;if(!(e instanceof Object))return!1;if(!(t instanceof Object))return!1;if(n){const n=Object.keys(e);return Object.keys(t).every((e=>-1!==n.indexOf(e)))&&n.every((n=>Si(e[n],t[n])))}return!1}function Ti(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map(((e,n,i)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){const t=!i[n-1]||"_"===i[n-1],o=n+1<i.length&&i[n+1]&&"_"!==i[n+1],r=n+3>i.length||!i[n+1]&&!i[n+3];t&&!o||(e=" "+e),(o||!t&&!r)&&(e=e.toLowerCase())}return e})).join("").trim()}function Li(e,t,n){const i="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(i)?t.meta[i]:n&&n.meta?n.meta[i]:void 0}function Di(e,t){const n="string"==typeof e?wi.getMetaItemDescriptor(e):e;return n?{name:n.name,type:n.type,value:t}:{name:typeof e,type:wi.resolveValueTypeFromValue(t),value:t}}function Ii(e,t,n,i,o){return function(e,t,n,i,o,r){let a=Ni("label",e,t,n,o),s="";if(a||(a=Li("label",e,t&&t.meta?t:void 0)),i&&(s=Pi(Bi("units",e,t,n,o))),!a){const n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=r||(n?Ti(n):void 0)}return a?a+(s?" ("+s+")":""):s}(e,t,n,i,!0,o)}function Ri(e,t,n,i,o){return function(e,t,n,i,o,r){let a=Oi(e?e.value:void 0,(()=>Bi("format",e,t,n,o)),void 0,r);const s=function(e,t,n){return Bi("units",e,t,n,!0)}(e,t,n);return i&&s&&s.length&&(a=Pi(Bi("units",e,t,n,o),a)),a}(e,t,n,i,!0,o)}function Oi(e,t,n,i){let o="";if(null==e)o=i||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){const i=t&&t();if(i&&0!==Object.keys(i).length)switch("number"==typeof e?i.asBoolean?e=!!e:i.asDate&&(e=new Date(e)):"boolean"==typeof e&&i.asNumber&&(e=e?1:0),typeof e){case"number":o=new Intl.NumberFormat(n||dn.language,i).format(e);break;case"boolean":i.asOnOff&&(o=e?dn.t("on"):dn.t("off")),i.asOpenClosed&&(o=e?dn.t("open"):dn.t("closed")),i.asPressedReleased&&(o=e?dn.t("pressed"):dn.t("released"));break;case"object":if(i.momentJsFormat)o=Ai()(e).format(i.momentJsFormat);else if(i.iso8601)o=e.toISOString();else if(i.week){const t=function(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));const t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}(e);o="2-digit"===i.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(n||dn.language,i).format(e)}else o=Object(e).toString()}return o}function Pi(e,t){if(!e)return"";t||(t="");const n=e.map(((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return dn.t(["units."+e,"or:units."+e]);{const i=new Intl.NumberFormat(dn.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==i[0].type)return"currency"===i[0].type?i[0].value:i[i.length-1].value;if(!t)return i[0].value;t=i[0].value+t}})).join("");return t.length>0?t+" "+n:n}function $i(e,t,n){if(e&&!t)return Object.assign({},e);if(t&&!e)return Object.assign({},t);const i=Object.assign({},e),o=[];return Object.entries(t).forEach((([e,t])=>{!function(e,t,n,i,o){let r=e;t.forEach((e=>{r.hasOwnProperty(e)||(r[e]={}),r=r[e]})),r&&(r.hasOwnProperty(n)?null==i?delete r[n]:Array.isArray(r[n])?r[n]=o?[...r[n],...i]:[...i]:r[n]="object"==typeof i?$i(Object.assign({},r[n]),i,o):i:null==i?delete r[n]:Array.isArray(i)?r[n]=[...i]:r[n]="object"==typeof i?Object.assign({},i):i)}(i,o,e,t,n)})),i}function Bi(e,t,n,i,o){let r;const a=[],s=Ni(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,i,o);if(s&&(r=JSON.parse(s),r)){if("format"!==e)return r;a.push(r)}if(t&&t.meta&&(r=Li(e,t,n),r)){if("format"!==e)return r;a.push(r)}if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(r=n[e],"format"!==e)return r;a.push(r)}if(n&&n.type){if(r=wi.getValueDescriptor(n.type)[e],"format"!==e)return r;a.push(r)}if("format"!==e||0===a.length)return r;let l={};return a.reverse().forEach((e=>{l=Object.assign(Object.assign({},l),e)})),l}function Ni(e,t,n,i,o,r){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;const s=[],l=e+"."+(o?"attribute":"meta")+".";return i&&s.push(l+i+"."+a),n&&"string"!=typeof n&&(s.push(l+n.type+"."+a),s.push(l+n.type)),s.push(l+a),s.length>0?dn.t(s,{defaultValue:r||""}):void 0}function zi(e,t){const n=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[n];else{const i=e.attributes[n];i&&(i.value=t.value,i.timestamp=t.timestamp)}return Object.assign({},e)}let ji=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{ji=!0}}))}catch(jo){}document.createElement("div");var Yi=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};let Hi=o(26900);class Ui{constructor(e,t,n){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=n,window.OpenRemoteConsole=this;let i=new URLSearchParams(window.location.search),o=i.get("consoleName"),r=i.get("consoleVersion"),a=i.get("consolePlatform"),s=i.get("consoleProviders"),l=i.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let d=Ui._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+e);if(u)try{let e=JSON.parse(u);e.id&&(d.id=e.id),e.name&&(d.name=e.name),e.providers&&(d.providers=e.providers),e.apps&&(d.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let h=d.providers;d.providers={};for(let e of c){let t=h&&h.hasOwnProperty(e)?h[e]:{enabled:!1,disabled:!1};d.providers[e]=t}let m=$r.getAppName();m.length>0&&d.apps.indexOf(m)<0&&d.apps.push(m),this._registration=d,o&&(d.name=o),r&&(d.version=r),a&&(d.platform=a),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){const e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return Yi(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 e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);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(e){console.error(e)}finally{this._initialiseInProgress=!1}}}))}enableProviders(){return Yi(this,void 0,void 0,(function*(){if(!this._initialised)throw new Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}}))}enableProvider(e,t){return Yi(this,void 0,void 0,(function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),new Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),new Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let n={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},i=yield this.sendProviderMessage(n,!0);this._registration.providers[e].hasPermission=i.hasPermission,this._registration.providers[e].success=i.success,this._registration.providers[e].enabled=i.success,this._registration.providers[e].data=i.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),i}))}disableProvider(e){return Yi(this,void 0,void 0,(function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),new Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),new Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t}))}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return Yi(this,void 0,void 0,(function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),new Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let n=e.provider+e.action;if(this._pendingProviderPromises[n])throw new Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");const i=new Mi;return this._pendingProviderPromises[n]=[i,window.setTimeout((()=>{delete this._pendingProviderPromises[n],i.reject("No response from provider")}),5e3)],this._doSendProviderMessage(e),i.promise}))}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),e=void 0!==e?e:2e3,console.debug("Sending registration in: "+e+"ms"),new Promise(((e,t)=>{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={}),$r.rest.api.ConsoleResource.register(this._registration).then((t=>{if(200!==t.status)throw new Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()}))}catch(e){console.error("Failed to register console"),t("Failed to register console")}}))}))}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return Yi(this,void 0,void 0,(function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{const e=yield Promise.race([t,new Promise(((e,t)=>setTimeout(t,2e3)))]);if(e&&e.value){const t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}}))}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){const n={type:e,data:t};this.isMobile?this._postNativeShellMessage(n):console.warn("Failed to send generic message to console.",n)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.action.trim().toUpperCase()){case"PROVIDER_INIT":let t={action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0};this._handleProviderResponse(JSON.stringify(t));break;case"PROVIDER_ENABLE":let n={action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0};this._handleProviderResponse(JSON.stringify(n));break;default:throw new Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":let t={action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0};this._handleProviderResponse(JSON.stringify(t));break;case"PROVIDER_ENABLE":let n={action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0};this._handleProviderResponse(JSON.stringify(n));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw new Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw new Error("Storage provider 'retrieve' action requires a `key`");let n=window.localStorage.getItem(t);if(null!==n)try{n=JSON.parse(n)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:n}))}break;default:throw new Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),n=t.provider,i=t.action,o=this._pendingProviderPromises[n+i];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[n+i],o[0].resolve(t));let r=this._providerMessageListeners[n+i];r&&r(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout((()=>{e()}),0)}static _createConsoleRegistration(){return{name:Hi.name,version:Hi.version,platform:Hi.os.toString(),apps:[],model:((Hi.manufacturer?Hi.manufacturer+" ":"")+(Hi.product?Hi.product:"")).trim()}}_initialiseProvider(e){return Yi(this,void 0,void 0,(function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}}))}}var Vi=o(79048),Wi=o.n(Vi);class qi{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:fo`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:fo`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:fo`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:fo`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:fo`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:fo`gateway/status/${e}`,options:t})}}class Gi{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:fo`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:fo`info`,options:e})}}class Ki{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:fo`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:fo`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:fo`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:fo`provisioning/${e}`,data:t,options:n})}}class Xi{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:fo`console/register`,data:e,options:t})}}class Zi{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:fo`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:fo`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:fo`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:fo`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:fo`notification/${e}/delivered`,queryParams:t,options:n})}}class Ji{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:fo`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:fo`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:fo`flow/${e}`,options:t})}}class Qi{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:fo`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:fo`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:fo`model/assetInfos`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:fo`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:fo`model/valueDescriptors`,queryParams:e,options:t})}}class eo{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:fo`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:fo`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:fo`asset/datapoint/${e}/${t}`,data:n,options:i})}}class to{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:fo`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:fo`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:fo`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:fo`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:fo`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:fo`dashboard/${e}/${t}`,options:n})}}class no{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:fo`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:fo`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:fo`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:fo`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,o){return this.httpClient.request({method:"GET",url:fo`gateway/tunnel/${e}/${t}/${n}/${i}`,options:o})}}class io{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:fo`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`asset/predicted/${e}/${t}`,data:n,options:i})}}class oo{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:fo`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:fo`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:fo`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:fo`syslog/event`,queryParams:e,options:t})}}class ro{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:fo`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:fo`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:fo`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:fo`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:fo`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:fo`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:fo`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:fo`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:fo`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:fo`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:fo`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:fo`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:fo`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:fo`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:fo`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:fo`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:fo`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:fo`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:fo`rules/${e}`,data:t,options:n})}}class ao{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:fo`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:fo`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:fo`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:fo`configuration/manager/image/${e}`,options:t})}}class so{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:fo`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:fo`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:fo`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:fo`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:fo`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:fo`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:fo`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:fo`alarm/${e}/assets`,queryParams:t,options:n})}}class lo{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:fo`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:fo`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:fo`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class co{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:fo`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:fo`user/query`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:fo`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:fo`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:fo`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/disconnect/${t}`,options:n})}resetPassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:fo`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:fo`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:fo`user/${e}/userRoles/${t}/${n}`,data:i,options:o})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:fo`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:fo`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:fo`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/${t}`,options:n})}}class uo{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:fo`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:fo`map`,data:e,options:t})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:fo`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:fo`map/tile/${e}/${t}/${n}`,options:i})}}class ho{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:fo`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:fo`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:fo`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:fo`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:fo`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:fo`realm/${e}`,data:t,options:n})}}class mo{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:fo`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:fo`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:fo`apps/info`,options:e})}}class po{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:fo`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:fo`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:fo`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:fo`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:fo`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:fo`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:fo`asset/query`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:fo`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:fo`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:fo`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:fo`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:fo`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:fo`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:fo`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:fo`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`asset/${e}/attribute/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:fo`asset/${e}/attribute/${t}/${n}`,data:i,options:o})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:fo`asset/${e}/child`,queryParams:t,options:n})}}function fo(e,...t){let n="";for(let i=0;i<t.length;i++)n+=e[i],n+=encodeURIComponent(t[i]);return n+=e[e.length-1],n}class go{constructor(e,t=Wi().create()){this._gatewayClientResource=new _o(e,t),this._statusResource=new yo(e,t),this._provisioningResource=new vo(e,t),this._consoleResource=new xo(e,t),this._notificationResource=new wo(e,t),this._flowResource=new Fo(e,t),this._assetModelResource=new ko(e,t),this._assetDatapointResource=new Eo(e,t),this._dashboardResource=new Ao(e,t),this._gatewayServiceResource=new Co(e,t),this._assetPredictedDatapointResource=new Mo(e,t),this._syslogResource=new So(e,t),this._rulesResource=new To(e,t),this._configurationResource=new Lo(e,t),this._alarmResource=new Do(e,t),this._agentResource=new Io(e,t),this._userResource=new Ro(e,t),this._mapResource=new Oo(e,t),this._realmResource=new Po(e,t),this._appResource=new $o(e,t),this._assetResource=new Bo(e,t),this._assetResource=new Bo(e,t)}get GatewayClientResource(){return this._gatewayClientResource}get StatusResource(){return this._statusResource}get ProvisioningResource(){return this._provisioningResource}get ConsoleResource(){return this._consoleResource}get NotificationResource(){return this._notificationResource}get FlowResource(){return this._flowResource}get AssetModelResource(){return this._assetModelResource}get AssetDatapointResource(){return this._assetDatapointResource}get DashboardResource(){return this._dashboardResource}get GatewayServiceResource(){return this._gatewayServiceResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get SyslogResource(){return this._syslogResource}get RulesResource(){return this._rulesResource}get ConfigurationResource(){return this._configurationResource}get AlarmResource(){return this._alarmResource}get AgentResource(){return this._agentResource}get UserResource(){return this._userResource}get MapResource(){return this._mapResource}get RealmResource(){return this._realmResource}get AppResource(){return this._appResource}get AssetResource(){return this._assetResource}}class bo{constructor(e){this.axios=e}request(e){const t={};t.method=e.method,t.url=e.url,t.params=e.queryParams,t.data=e.data,function(e,t){if(null!=t)for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(t,e.options);const n=e.copyFn;return this.axios.request(t).then((e=>(n&&e.data&&(e.originalData=e.data,e.data=n(e.data)),e)))}}class _o extends qi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class yo extends Gi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class vo extends Ki{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class xo extends Xi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class wo extends Zi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Fo extends Ji{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class ko extends Qi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Eo extends eo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Ao extends to{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Co extends no{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Mo extends io{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class So extends oo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class To extends ro{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Lo extends ao{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Do extends so{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Io extends lo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Ro extends co{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Oo extends uo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Po extends ho{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class $o extends mo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Bo extends po{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}Wi().isAxiosError;const No=new class{get api(){return this._client}constructor(){this._axiosInstance=Wi().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use((e=>(e.paramsSerializer=e=>ki().stringify(e,{arrayFormat:"repeat"}),e)))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(e){this._axiosInstance.defaults.timeout=e}addRequestInterceptor(e){this._axiosInstance.interceptors.request.use(e)}initialise(e){this._baseUrl=e,this._client=new go(e,this._axiosInstance)}};var zo,jo,Yo=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};(jo=zo||(zo={})).DISCONNECTED="DISCONNECTED",jo.CONNECTED="CONNECTED",jo.CONNECTING="CONNECTING";class Ho{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=Uo.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=zo.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(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){!function(e,t){if(0===e.length)return;const n=e.indexOf(t);n>=0&&e.splice(n,1)}(this._statusCallbacks,e)}connect(){return this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===zo.CONNECTED?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(zo.CONNECTING),this._connectingDeferred=new Mi,this._doConnect().then((e=>{if(this._connectingDeferred){const t=this._connectingDeferred;this._connectingDeferred=null,e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=Uo.MIN_RECONNECT_DELAY,this._onStatusChanged(zo.CONNECTED),window.setTimeout((()=>{this._onConnect()}),0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),t.resolve(e)}}))),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!==zo.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){const n={eventSubscription:e,callback:t,deferred:new Mi};return null!=this._pendingSubscription||this._status!==zo.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(e).then((e=>{if(this._pendingSubscription){const t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();const n=t.deferred;t.deferred=null,n&&n.resolve(e)}}),(e=>{if(this._pendingSubscription){const t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();const n=t.deferred;t.deferred=null,n&&n.reject(e)}})),this._pendingSubscription.deferred.promise)}unsubscribe(e){return Yo(this,void 0,void 0,(function*(){if(this._subscriptionMap.delete(e))this._doUnsubscribe(e);else if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){const e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}}else if(this._attributeEventCallbackMap.delete(e)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){const e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}}))}sendEvent(e){this._status===zo.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==zo.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return Yo(this,void 0,void 0,(function*(){const i=e&&"string"!=typeof e[0]?e.map((e=>e.id)):e,o="AssetEvent"+Ho._subscriptionCounter++;if(!this._assetEventPromise){let e;$r.authenticated||(e={filterType:"asset",realm:$r.displayRealm});const t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,(e=>{this._assetEventCallbackMap.forEach((t=>t(e)))}))}return this._assetEventCallbackMap.set(o,(e=>{const t=e.asset.id;i?i.find((e=>t===e))&&n(e):e.asset.realm===$r.displayRealm&&n(e)})),this._assetEventPromise.then((()=>{try{if(i&&t){const e={messageID:"read-assets:"+i.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then((e=>{const t=e;t.assets&&this._assetEventCallbackMap.has(o)&&t.assets.forEach((e=>{n({eventType:"asset",asset:e,cause:"READ"})}))}))}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o}))}))}subscribeAttributeEvents(e,t,n){return Yo(this,void 0,void 0,(function*(){const i=e&&"string"!=typeof e[0],o=i?e.map((e=>e.id)):e,r=i?e:void 0,a="AttributeEvent"+Ho._subscriptionCounter++;if(!this._attributeEventPromise){let e;$r.authenticated||(e={filterType:"asset",realm:$r.displayRealm});const t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,(e=>{this._attributeEventCallbackMap.forEach((t=>t(e)))}))}const s=t=>{const r=t.ref;i?e.forEach((e=>{r.id===e.id&&r.name===e.name&&n(t)})):o?o.find((e=>r.id===e))&&n(t):t.realm===$r.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then((()=>{try{if(t&&o){const e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then((e=>{const t=e;t.assets&&this._attributeEventCallbackMap.has(a)&&t.assets.forEach((e=>{e.attributes&&Object.entries(e.attributes).forEach((([t,n])=>{r&&!r.find((n=>n.id===e.id&&n.name===t))||s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})}))}))}))}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a}))}))}_processNextSubscription(){this._status===zo.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout((()=>{const e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then((t=>{const n=e.deferred;e.deferred=null,n&&n.resolve(t)}),(t=>{const n=e.deferred;e.deferred=null,n&&n.reject(t)}))}),0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout((()=>{this._statusCallbacks.forEach((t=>t(e)))}),0))}_onMessageReceived(e,t){const n=this._subscriptionMap.get(e);n&&n.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(const e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===zo.CONNECTED&&this._onStatusChanged(zo.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(zo.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<Uo.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(Uo.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}Ho.MIN_RECONNECT_DELAY=0,Ho.MAX_RECONNECT_DELAY=3e4,Ho._subscriptionCounter=0;class Uo extends Ho{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",(()=>{this._unloading=!0,this.disconnect()}))}_doConnect(){let e=this._endpointUrl+"?Realm="+$r.config.realm;return $r.authenticated&&(e+="&Authorization="+$r.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new Mi,this._webSocket.onopen=()=>{if(this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{const t=e.data;if(t&&t.startsWith("SUBSCRIBED:")){const e=t.substring(11),n=JSON.parse(e),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&i.resolve(n.subscriptionId)}else if(t.startsWith("UNAUTHORIZED:")){const e=t.substring(13),n=JSON.parse(e),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&(console.warn("Unauthorized event subscription: "+JSON.stringify(n,null,2)),i.reject("Unauthorized"))}else if(t.startsWith("TRIGGERED:")){const e=t.substring(10),n=JSON.parse(e);n.events&&n.events.forEach((e=>{this._onMessageReceived(n.subscriptionId,e)}))}else if(t.startsWith("EVENT:")){const e=t.substring(6),n=JSON.parse(e);if(n.messageID){const e=this._repliesDeferred.get(n.messageID);this._repliesDeferred.delete(n.messageID),e&&e.resolve(n)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null===(e=this._webSocket)||void 0===e||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new Mi,e.subscriptionId||(e.subscriptionId=Uo._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){if(!this._webSocket)return;const t={subscriptionId:e};this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify(t))}_doSend(e){const t="EVENT:"+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=((new Date).getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");const t=new Mi;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send("EVENT:"+JSON.stringify(e)),t.promise}}function Vo(e){return Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vo(e)}Uo._subscriptionCounter=1;var Wo=[],qo=Wo.forEach,Go=Wo.slice;function Ko(e){return qo.call(Go.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function Xo(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Vo(XMLHttpRequest))}var Zo,Jo,Qo,er=o(96624),tr=o.t(er,2);function nr(e){return nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(e)}"function"==typeof fetch&&(Zo="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),Xo()&&("undefined"!=typeof global&&global.XMLHttpRequest?Jo=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(Jo=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?Qo=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(Qo=window.ActiveXObject)),Zo||!tr||Jo||Qo||(Zo=er||tr),"function"!=typeof Zo&&(Zo=void 0);var ir=function(e,t){if(t&&"object"===nr(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},or=function(e,t,n){Zo(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},rr=!1;const ar=function(e,t,n,i){return"function"==typeof n&&(i=n,n=void 0),i=i||function(){},Zo?function(e,t,n,i){e.queryStringParams&&(t=ir(t,e.queryStringParams));var o=Ko({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var r="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Ko({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},rr?{}:r);try{or(t,a,i)}catch(e){if(!r||0===Object.keys(r).length||!e.message||e.message.indexOf("not implemented")<0)return i(e);try{Object.keys(r).forEach((function(e){delete a[e]})),or(t,a,i),rr=!0}catch(e){i(e)}}}(e,t,n,i):Xo()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===nr(n)&&(n=ir("",n).slice(1)),e.queryStringParams&&(t=ir(t,e.queryStringParams));try{var o;(o=Jo?new Jo:new Qo("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)o.setRequestHeader(a,r[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,i):void i(new Error("No fetch and no xhr implementation found!"))};function sr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var lr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)}var t,n;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Ko(n,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:ar,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=i,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,i,o){var r,a=this,s=this.options.loadPath;"function"==typeof this.options.loadPath&&(s=this.options.loadPath(e,n)),(s=function(e){return!!e&&"function"==typeof e.then}(r=s)?r:Promise.resolve(r)).then((function(r){if(!r)return o(null,{});var s=a.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(s,o,t,i)}))}},{key:"loadUrl",value:function(e,t,n,i){var o=this;this.options.request(this.options,e,void 0,(function(r,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&r&&r.message&&r.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+r.message,!0);if(r)return t(r,!1);var s,l;try{s="string"==typeof a.data?o.options.parse(a.data,n,i):a.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,i,o){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,i),s=0,l=[],c=[];e.forEach((function(n){var i=r.options.addPath;"function"==typeof r.options.addPath&&(i=r.options.addPath(n,t));var d=r.services.interpolator.interpolate(i,{lng:n,ns:t});r.options.request(r.options,d,a,(function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&o&&o(l,c)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,o=t.logger,r=n.language;if(!r||"cimode"!==r.toLowerCase()){var a=[],s=function(e){i.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};s(r),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return s(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(i,r){i&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&r&&o.log("loaded namespace ".concat(e," for language ").concat(t),r),n.loaded("".concat(t,"|").concat(e),i,r)}))}))}))}}}],n&&sr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();lr.type="backend";const cr=lr;class dr extends Be{constructor(e){if(super(e),this.et=H,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||null==e)return this.ft=void 0,this.et=e;if(e===Y)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}dr.directiveName="unsafeHTML",dr.resultType=1,$e(dr);class ur extends dr{}ur.directiveName="unsafeSVG",ur.resultType=2;const hr=$e(ur),mr=24,pr={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 fr=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};const gr=o(180);class br extends CustomEvent{constructor(){super(br.NAME,{bubbles:!0,composed:!0})}}br.NAME="or-iconset-added";const _r=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new br)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return j``;const t=(e||"").split(":"),n=t.pop(),i=t.pop();let o=this._defaultIconSet;return i&&(o=this.getIconSet(i)),n&&o?o.getIconTemplate(n):j``}};let yr=class extends Ae{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[he`
|
|
18
|
+
`,un([Le({type:String})],hn.prototype,"value",void 0),un([Le({type:Object})],hn.prototype,"options",void 0),hn=un([Me("or-translate")],hn),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(mn||(mn={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(pn||(pn={})),function(e){e.MANUAL="MANUAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET",e.AGENT="AGENT"}(fn||(fn={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(gn||(gn={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(bn||(bn={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(_n||(_n={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(yn||(yn={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.DISCONNECTING="DISCONNECTING",e.CONNECTED="CONNECTED",e.DISABLED="DISABLED",e.WAITING="WAITING",e.ERROR="ERROR",e.STOPPED="STOPPED"}(vn||(vn={})),function(e){e.EV="EV",e.PHEV="PHEV"}(xn||(xn={})),function(e){e.YAZAKI="YAZAKI",e.MENNEKES="MENNEKES",e.LE_GRAND="LE_GRAND",e.CHADEMO="CHADEMO",e.COMBO="COMBO",e.SCHUKO="SCHUKO",e.ENERGYLOCK="ENERGYLOCK"}(wn||(wn={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(Fn||(Fn={})),function(e){e.REQUEST_START="REQUEST_START",e.REQUEST_REPEATING="REQUEST_REPEATING",e.REQUEST_CANCEL="REQUEST_CANCEL",e.READY="READY",e.COMPLETED="COMPLETED",e.RUNNING="RUNNING",e.CANCELLED="CANCELLED"}(kn||(kn={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(En||(En={})),function(e){e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",e.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",e.INVALID_VALUE="INVALID_VALUE",e.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",e.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",e.CANNOT_PROCESS="CANNOT_PROCESS",e.QUEUE_FULL="QUEUE_FULL",e.UNKNOWN="UNKNOWN",e.ASSET_ID_MISSING="ASSET_ID_MISSING",e.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(An||(An={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(Cn||(Cn={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(Mn||(Mn={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(Sn||(Sn={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(Tn||(Tn={})),function(e){e.MIN="MIN",e.AVG="AVG",e.MAX="MAX"}(Ln||(Ln={})),function(e){e.TERMINATING="TERMINATING",e.DISABLED="DISABLED",e.ALREADY_CONNECTED="ALREADY_CONNECTED",e.UNRECOGNISED="UNRECOGNISED",e.PERMANENT_ERROR="PERMANENT_ERROR",e.SYNC_ERROR="SYNC_ERROR"}(Dn||(Dn={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(In||(In={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(Rn||(Rn={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(On||(On={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(Pn||(Pn={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}($n||($n={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(Bn||(Bn={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(Nn||(Nn={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(zn||(zn={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(jn||(jn={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(Yn||(Yn={})),function(e){e.MESSAGE_INVALID="MESSAGE_INVALID",e.CERTIFICATE_INVALID="CERTIFICATE_INVALID",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",e.CONFIG_DISABLED="CONFIG_DISABLED",e.USER_DISABLED="USER_DISABLED",e.SERVER_ERROR="SERVER_ERROR",e.ASSET_ERROR="ASSET_ERROR",e.SERVER_BUSY="SERVER_BUSY"}(Hn||(Hn={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(Un||(Un={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(Vn||(Vn={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_EQUALS="GREATER_EQUALS",e.LESS_THAN="LESS_THAN",e.LESS_EQUALS="LESS_EQUALS",e.BETWEEN="BETWEEN"}(Wn||(Wn={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(qn||(qn={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(Gn||(Gn={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(Kn||(Kn={})),function(e){e.AND="AND",e.OR="OR"}(Xn||(Xn={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(Zn||(Zn={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(Jn||(Jn={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(Qn||(Qn={})),function(e){e.READY="READY",e.DEPLOYED="DEPLOYED",e.COMPILATION_ERROR="COMPILATION_ERROR",e.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",e.EXECUTION_ERROR="EXECUTION_ERROR",e.LOOP_ERROR="LOOP_ERROR",e.DISABLED="DISABLED",e.PAUSED="PAUSED",e.EXPIRED="EXPIRED",e.REMOVED="REMOVED",e.EMPTY="EMPTY"}(ei||(ei={})),function(e){e.SUNRISE="SUNRISE",e.SUNSET="SUNSET",e.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",e.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",e.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",e.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",e.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",e.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",e.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",e.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",e.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",e.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",e.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",e.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",e.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",e.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",e.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",e.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",e.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",e.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(ti||(ti={})),function(e){e.NUMBER="NUMBER",e.NUMBER_ARRAY="NUMBER_ARRAY",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.TRIGGER="TRIGGER",e.COLOR="COLOR",e.ANY="ANY"}(ni||(ni={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(ii||(ii={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}(oi||(oi={})),function(e){e.TEXT="TEXT",e.MULTILINE="MULTILINE",e.NUMBER="NUMBER",e.DROPDOWN="DROPDOWN",e.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",e.CHECKBOX="CHECKBOX",e.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",e.COLOR="COLOR",e.DATE="DATE"}(ri||(ri={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(ai||(ai={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(si||(si={})),function(e){e.READ_ADMIN="read:admin",e.READ_LOGS="read:logs",e.READ_USERS="read:users",e.READ_MAP="read:map",e.READ_ASSETS="read:assets",e.READ_RULES="read:rules",e.READ_INSIGHTS="read:insights",e.READ_ALARMS="read:alarms",e.WRITE_USER="write:user",e.WRITE_ADMIN="write:admin",e.WRITE_LOGS="write:logs",e.WRITE_ASSETS="write:assets",e.WRITE_ATTRIBUTES="write:attributes",e.WRITE_RULES="write:rules",e.WRITE_INSIGHTS="write:insights",e.WRITE_ALARMS="write:alarms",e.READ="read",e.WRITE="write"}(li||(li={})),function(e){e.ASSET="ASSET",e.AGENT="AGENT",e.NOTIFICATION="NOTIFICATION",e.ALARM="ALARM",e.RULES="RULES",e.PROTOCOL="PROTOCOL",e.GATEWAY="GATEWAY",e.MODEL_AND_VALUES="MODEL_AND_VALUES",e.API="API",e.DATA="DATA"}(ci||(ci={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(di||(di={})),function(e){e.NUMERIC="numeric",e.DIGIT_2="2-digit",e.FULL="full",e.LONG="long",e.MEDIUM="medium",e.SHORT="short",e.NARROW="narrow"}(ui||(ui={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(hi||(hi={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(mi||(mi={})),function(e){e.JAPANESE="JAPANESE",e.BUDDHIST="BUDDHIST",e.ROC="ROC",e.ISLAMIC="ISLAMIC",e.ISO8601="ISO8601",e.CHINESE="CHINESE",e.ETHIOPIC="ETHIOPIC",e.HEBREW="HEBREW",e.GREGORIAN="GREGORIAN"}(pi||(pi={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(fi||(fi={})),function(e){e.PEOPLECOUNTERASSET="PeopleCounterAsset",e.MAILAGENT="MailAgent",e.UDPAGENT="UDPAgent",e.STORAGESIMULATORAGENT="StorageSimulatorAgent",e.ROOMASSET="RoomAsset",e.CITYASSET="CityAsset",e.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",e.ELECTRICVEHICLEASSET="ElectricVehicleAsset",e.VENTILATIONASSET="VentilationAsset",e.TRADFRILIGHTASSET="TradfriLightAsset",e.CONSOLEASSET="ConsoleAsset",e.PRESENCESENSORASSET="PresenceSensorAsset",e.LIGHTASSET="LightAsset",e.KNXAGENT="KNXAgent",e.PLUGASSET="PlugAsset",e.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",e.WEATHERASSET="WeatherAsset",e.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",e.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",e.THINGASSET="ThingAsset",e.WEBSOCKETAGENT="WebsocketAgent",e.TCPAGENT="TCPAgent",e.GATEWAYASSET="GatewayAsset",e.SERIALAGENT="SerialAgent",e.BLUETOOTHMESHAGENT="BluetoothMeshAgent",e.PARKINGASSET="ParkingAsset",e.TRADFRIPLUGASSET="TradfriPlugAsset",e.SIMULATORAGENT="SimulatorAgent",e.SNMPAGENT="SNMPAgent",e.GROUPASSET="GroupAsset",e.BUILDINGASSET="BuildingAsset",e.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",e.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",e.MQTTAGENT="MQTTAgent",e.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",e.VELBUSTCPAGENT="VelbusTCPAgent",e.ARTNETLIGHTASSET="ArtnetLightAsset",e.VELBUSSERIALAGENT="VelbusSerialAgent",e.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",e.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",e.MICROPHONEASSET="MicrophoneAsset",e.ZWAVEAGENT="ZWaveAgent",e.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",e.HTTPAGENT="HTTPAgent",e.DOORASSET="DoorAsset",e.THERMOSTATASSET="ThermostatAsset",e.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",e.SHIPASSET="ShipAsset"}(gi||(gi={})),function(e){e.SUPPORTSEXPORT="supportsExport",e.ENERGYSELFCONSUMPTION="energySelfConsumption",e.LASTACCESS="lastAccess",e.CHARGERID="chargerID",e.POSITION="position",e.CARBONSAVING="carbonSaving",e.ROUTINGMODE="routingMode",e.LASTWILLRETAIN="lastWillRetain",e.LASTWILLTOPIC="lastWillTopic",e.SERIALBAUDRATE="serialBaudrate",e.BASEURL="baseURL",e.REQUIREDVALUES="requiredValues",e.FINANCIALSAVING="financialSaving",e.FLEETCATEGORY="fleetCategory",e.GATEWAYSTATUS="gatewayStatus",e.NO2LEVEL="NO2Level",e.TAGS="tags",e.MILEAGEMIN="mileageMin",e.UNLOCK="unlock",e.CHECKINTERVALSECONDS="checkIntervalSeconds",e.LOCATION="location",e.CLIENTSECRET="clientSecret",e.WINDDIRECTION="windDirection",e.WINDSPEED="windSpeed",e.PARTICLESPM10="particlesPM10",e.APPLICATIONKEY="applicationKey",e.POWEREXPORTMAX="powerExportMax",e.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",e.WATERLEVEL="waterLevel",e.CONNECTHEADERS="connectHeaders",e.CONSOLENAME="consoleName",e.WEBSOCKETQUERY="websocketQuery",e.PREFERHTML="preferHTML",e.COOLING="cooling",e.POLLINGMILLIS="pollingMillis",e.SOILTEMPERATURE="soilTemperature",e.SUNIRRADIANCE="sunIrradiance",e.ODOMETER="odometer",e.SUPPORTSIMPORT="supportsImport",e.MESSAGEMAXLENGTH="messageMaxLength",e.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",e.LIGHTID="lightId",e.POWER="power",e.STREET="street",e.DELETEPROCESSEDMAIL="deleteProcessedMail",e.WINDSPEEDMIN="windSpeedMin",e.POWERSETPOINT="powerSetpoint",e.PRESENCE="presence",e.SPACESOCCUPIED="spacesOccupied",e.STARTTLS="startTLS",e.AGENTSTATUS="agentStatus",e.MESSAGECHARSET="messageCharset",e.CERTIFICATEALIAS="certificateAlias",e.PANELPITCH="panelPitch",e.EMAIL="email",e.BINDPORT="bindPort",e.PARTICLESPM1="particlesPM1",e.SPEED="speed",e.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",e.MESSAGESTRIPDELIMITER="messageStripDelimiter",e.AREA="area",e.COUNTRY="country",e.SHIPTYPE="shipType",e.CONNECTSUBSCRIPTIONS="connectSubscriptions",e.RELATIVEHUMIDITY="relativeHumidity",e.SOURCEADDRESS="sourceAddress",e.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",e.RAINFALL="rainfall",e.ENERGYIMPORTTOTAL="energyImportTotal",e.OAUTHGRANT="oAuthGrant",e.OZONELEVEL="ozoneLevel",e.COUNTINMINUTE="countInMinute",e.PORT="port",e.TUNNELINGSUPPORTED="tunnelingSupported",e.ENINUMBER="ENINumber",e.AGENTDISABLED="agentDisabled",e.DISABLED="disabled",e.FORCECHARGE="forceCharge",e.TIMEINJECTIONINTERVAL="timeInjectionInterval",e.FINANCIALWEIGHTING="financialWeighting",e.ENERGYLEVELPERCENTAGE="energyLevelPercentage",e.SPACESBUFFER="spacesBuffer",e.VEHICLECATEGORY="vehicleCategory",e.FANSPEED="fanSpeed",e.FINANCIALCOST="financialCost",e.NOTES="notes",e.MAILFOLDERNAME="mailFolderName",e.TEMPERATURE="temperature",e.AVAILABLECHARGINGSPACES="availableChargingSpaces",e.ENERGYCAPACITY="energyCapacity",e.POWERIMPORTMIN="powerImportMin",e.INTERVALSIZE="intervalSize",e.SNMPVERSIONVALUE="SNMPVersionValue",e.SOUNDLEVEL="soundLevel",e.CONNECTURL="connectURL",e.CLIENTID="clientId",e.VEHICLEID="vehicleID",e.SUNAZIMUTH="sunAzimuth",e.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",e.WEBSOCKETMODE="websocketMode",e.COLOURTEMPERATURE="colourTemperature",e.VEHICLECONNECTED="vehicleConnected",e.MILEAGEMINIMUM="mileageMinimum",e.COLOURRGB="colourRGB",e.CARBONIMPORT="carbonImport",e.PRICEHOURLY="priceHourly",e.WINDSPEEDMAX="windSpeedMax",e.PINGDISABLED="pingDisabled",e.FLOW="flow",e.CHILDASSETTYPE="childAssetType",e.NETWORKKEY="networkKey",e.UNIVERSE="universe",e.MSSINUMBER="MSSINumber",e.LEDCOUNT="lEDCount",e.SUBSCRIBEQOS="subscribeQos",e.LOCKED="locked",e.PROTOCOL="protocol",e.TARIFFIMPORT="tariffImport",e.ENERGYRENEWABLESHARE="energyRenewableShare",e.REGION="region",e.CONSOLEPLATFORM="consolePlatform",e.POWEREXPORTMIN="powerExportMin",e.EFFICIENCYEXPORT="efficiencyExport",e.CHARGECYCLES="chargeCycles",e.SERIALPORT="serialPort",e.PANELORIENTATION="panelOrientation",e.LENGTH="length",e.USERNAMEPASSWORD="usernamePassword",e.POWERFORECAST="powerForecast",e.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",e.PROXYADDRESS="proxyAddress",e.REQUESTQUERYPARAMETERS="requestQueryParameters",e.ENERGYLOCAL="energyLocal",e.ENERGYAUTARKY="energyAutarky",e.MODEL="model",e.MANUFACTURER="manufacturer",e.ONOFF="onOff",e.RESUMESESSION="resumeSession",e.TARIFFEXPORT="tariffExport",e.CITY="city",e.CONNECTORTYPE="connectorType",e.ENERGYEXPORTTOTAL="energyExportTotal",e.CARBONEXPORT="carbonExport",e.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",e.ENERGYLEVEL="energyLevel",e.OPTIMISATIONDISABLED="optimisationDisabled",e.WEBSOCKETPATH="websocketPath",e.WINDSPEEDREFERENCE="windSpeedReference",e.PRICEDAILY="priceDaily",e.COUNTGROWTHMINUTE="countGrowthMinute",e.IMONUMBER="IMONumber",e.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",e.REQUESTHEADERS="requestHeaders",e.COUNTOUTMINUTE="countOutMinute",e.HOST="host",e.ENERGYTYPE="energyType",e.CONSOLEVERSION="consoleVersion",e.MTU="mtu",e.PANELAZIMUTH="panelAzimuth",e.SEQUENCENUMBER="sequenceNumber",e.SUNALTITUDE="sunAltitude",e.COUNTOUT="countOut",e.CHARGERCONNECTED="chargerConnected",e.ROOMNUMBER="roomNumber",e.PARTICLESPM2_5="particlesPM2_5",e.COUNTIN="countIn",e.MESSAGESOURCEADDRESS="messageSourceAddress",e.MILEAGECHARGED="mileageCharged",e.TEMPERATURESETPOINT="temperatureSetpoint",e.CONSOLEPROVIDERS="consoleProviders",e.POWERIMPORTMAX="powerImportMax",e.COUNTTOTAL="countTotal",e.SPACESTOTAL="spacesTotal",e.BINDHOST="bindHost",e.MESSAGECONVERTBINARY="messageConvertBinary",e.MESSAGEDELIMITERS="messageDelimiters",e.EFFICIENCYIMPORT="efficiencyImport",e.SUNZENITH="sunZenith",e.BRIGHTNESS="brightness",e.POSTALCODE="postalCode",e.SPACESOPEN="spacesOpen",e.HUMIDITY="humidity",e.MILEAGECAPACITY="mileageCapacity",e.SECUREMODE="secureMode",e.DIRECTION="direction",e.ENERGYLEVELSCHEDULE="energyLevelSchedule",e.UVINDEX="uVIndex",e.NATMODE="NATMode",e.UPDATEONWRITE="updateOnWrite",e.GROUPID="groupId",e.LASTWILLPAYLOAD="lastWillPayload",e.FOLLOWREDIRECTS="followRedirects",e.CARBONCOST="carbonCost",e.MESSAGECONVERTHEX="messageConvertHex",e.PUBLISHQOS="publishQos"}(bi||(bi={})),function(e){e.FORMAT="format",e.RULESTATE="ruleState",e.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",e.STOREDATAPOINTS="storeDataPoints",e.LABEL="label",e.CONSTRAINTS="constraints",e.SHOWONDASHBOARD="showOnDashboard",e.READONLY="readOnly",e.MULTILINE="multiline",e.ACCESSPUBLICWRITE="accessPublicWrite",e.MOMENTARY="momentary",e.AGENTLINK="agentLink",e.ACCESSRESTRICTEDREAD="accessRestrictedRead",e.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",e.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",e.SECRET="secret",e.ATTRIBUTELINKS="attributeLinks",e.RULERESETIMMEDIATE="ruleResetImmediate",e.FORECAST="forecast",e.UNITS="units",e.USERCONNECTED="userConnected",e.ACCESSPUBLICREAD="accessPublicRead"}(_i||(_i={})),function(e){e.WSURL="WS_URL",e.POSITIVENUMBER="positiveNumber",e.VALUEDESCRIPTOR="valueDescriptor",e.LONG="long",e.BOOLEANMAP="booleanMap",e.MQTTQOS="MQTTQos",e.GEOJSONPOINT="GEO_JSONPoint",e.SNMPVERSION="SNMPVersion",e.ASSETTYPE="assetType",e.JSONOBJECT="JSONObject",e.BIGNUMBER="bigNumber",e.IPADDRESS="IPAddress",e.EMAIL="email",e.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",e.ATTRIBUTEREFERENCE="attributeReference",e.INTEGER="integer",e.OAUTHGRANT="oAuthGrant",e.NUMBER="number",e.TEXTMAP="textMap",e.WEBSOCKETSUBSCRIPTION="websocketSubscription",e.BOOLEAN="boolean",e.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",e.TIMESTAMPISO8601="timestampISO8601",e.MULTIVALUEDTEXTMAP="multivaluedTextMap",e.JSON="JSON",e.INTEGERBYTE="integerByte",e.AGENTLINK="agentLink",e.CALENDAREVENT="calendarEvent",e.CONNECTIONSTATUS="connectionStatus",e.VALUECONSTRAINT="valueConstraint",e.ASSETQUERY="assetQuery",e.COLOURRGB="colourRGB",e.VALUEFORMAT="valueFormat",e.TEXT="text",e.BYTE="byte",e.USERNAMEANDPASSWORD="usernameAndPassword",e.HTTPURL="HTTP_URL",e.ATTRIBUTELINK="attributeLink",e.ASSETID="assetID",e.NUMBERMAP="numberMap",e.HTTPMETHOD="HTTPMethod",e.PANELORIENTATION="panelOrientation",e.ATTRIBUTESTATE="attributeState",e.POSITIVEINTEGER="positiveInteger",e.EXECUTIONSTATUS="executionStatus",e.BIGINTEGER="bigInteger",e.PERIODDURATIONISO8601="periodDurationISO8601",e.DATEANDTIME="dateAndTime",e.CONNECTORTYPE="connectorType",e.NEGATIVEINTEGER="negativeInteger",e.TCPIPPORTNUMBER="TCP_IPPortNumber",e.INTEGERMAP="integerMap",e.ENERGYTYPE="energyType",e.TIMESTAMP="timestamp",e.UUID="UUID",e.FORECASTCONFIGURATION="forecastConfiguration",e.TIMEDURATIONISO8601="timeDurationISO8601",e.CONSOLEPROVIDERS="consoleProviders",e.NEGATIVENUMBER="negativeNumber",e.CRONEXPRESSION="CRONExpression",e.DIRECTION="direction",e.HOSTORIPADDRESS="hostOrIPAddress"}(yi||(yi={})),function(e){e.MONTH="month",e.MILE_SCANDINAVIAN="mile_scandinavian",e.YEAR="year",e.VOLT="volt",e.HERTZ="hertz",e.MILE="mile",e.BTU="btu",e.FOOT="foot",e.MEGA="mega",e.INCH="inch",e.IN_HG="inch_mercury",e.CENTI="centi",e.GRAM="gram",e.KNOT="knot",e.METRE="metre",e.LITRE="litre",e.FLUID_OUNCE="fluid_ounce",e.CELSIUS="celsius",e.DECIBEL="decibel",e.FAHRENHEIT="fahrenheit",e.WATT="watt",e.PEAK="peak",e.MICRO="micro",e.PER="per",e.STONE="stone",e.VAR="var",e.OUNCE="ounce",e.HECTARE="hectare",e.YARD="yard",e.JOULE="joule",e.DEGREE="degree",e.KILO="kilo",e.KELVIN="kelvin",e.CARBON="carbon",e.DECIBEL_ATTENUATED="decibel_attenuated",e.SQUARED="squared",e.PERCENTAGE="percentage",e.CUBED="cubed",e.DAY="day",e.RADIAN="radian",e.OHM="ohm",e.MINUTE="minute",e.PART_PER_MILLION="ppm",e.AMP="amp",e.MASS_POUND="pound",e.HOUR="hour",e.ACRE="acre",e.RPM="rpm",e.PASCAL="pascal",e.LUMEN="lumen",e.WEEK="week",e.GALLON="gallon",e.LUX="lux",e.MILLI="milli",e.BAR="bar",e.HECTO="hecto",e.SECOND="second"}(vi||(vi={})),xi||(xi={});class wi{static getAssetDescriptors(){return wi._assetTypeInfos.map((e=>e.assetDescriptor))}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(e){if(e)return e.assetDescriptor?e:("string"!=typeof e&&(e=e.name),this._assetTypeInfos.find((t=>t.assetDescriptor.name===e)))}static getAssetDescriptor(e){if(!e)return;if(e.assetDescriptor)return e.assetDescriptor;if("string"!=typeof e)return e;const t=this._assetTypeInfos.find((t=>t.assetDescriptor.name===e));return t?t.assetDescriptor:void 0}static getAttributeDescriptor(e,t){if(!e)return;const n=this.getAssetTypeInfo(t||"ThingAsset");return n&&n.attributeDescriptors?n.attributeDescriptors.find((t=>t.name===e)):void 0}static getValueDescriptor(e){if(!e)return;let t;if(e.endsWith("[]"))for(t=0;e.endsWith("[]");)e=e.substring(0,e.length-2),t++;let n=this._valueDescriptors.find((t=>t.name===e));return n&&t&&(n=Object.assign(Object.assign({},n),{arrayDimensions:t})),n}static resolveValueDescriptor(e,t){let n;return t&&("string"==typeof t&&(n=wi.getValueDescriptor(t)),n=t.jsonType?t:wi.getValueDescriptor(t.type)),!n&&e&&(n=wi.getValueDescriptor("JSON")),n}static resolveValueTypeFromValue(e){if(null!=e){if("number"==typeof e)return"number";if("string"==typeof e)return"text";if("boolean"==typeof e)return"boolean";if(Array.isArray(e)){let t=1,n=e.find((e=>null!=e));for(;Array.isArray(n);)n=n.find((e=>null!=e)),t++;let i=this.resolveValueTypeFromValue(n);if(!i)return;for(;t>0;)i+="[]",t--;return i}return e instanceof Date?"dateAndTime":void 0}}static getAttributeAndValueDescriptors(e,t,n){let i,o;if(t&&"string"!=typeof t)i=t;else{const o=this.getAssetTypeInfo(e||"ThingAsset");if(!o)return[void 0,void 0];"string"==typeof t&&(i=this.getAttributeDescriptor(t,o)),!i&&n&&(i={type:n.type,name:n.name,meta:n.meta})}return i&&(o=this.getValueDescriptor(i.type)),[i,o]}static getMetaItemDescriptor(e){if(e)return this._metaItemDescriptors.find((t=>t.name===e))}static getAssetDescriptorColour(e,t){const n=this.getAssetDescriptor(e);return n&&n.colour?n.colour:t}static getAssetDescriptorIcon(e,t){const n=this.getAssetDescriptor(e);return n&&n.icon?n.icon:t}}wi._assetTypeInfos=[],wi._metaItemDescriptors=[],wi._valueDescriptors=[],o(12960);var Fi=o(16960),ki=o.n(Fi),Ei=o(56104),Ai=o.n(Ei),Ci=o(97944);class Mi{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t})),Object.freeze(this)}}function Si(e,t,n=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function)return e===t;if(e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length)return!1;if(e instanceof Date)return!1;if(!(e instanceof Object))return!1;if(!(t instanceof Object))return!1;if(n){const n=Object.keys(e);return Object.keys(t).every((e=>-1!==n.indexOf(e)))&&n.every((n=>Si(e[n],t[n])))}return!1}function Ti(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map(((e,n,i)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){const t=!i[n-1]||"_"===i[n-1],o=n+1<i.length&&i[n+1]&&"_"!==i[n+1],r=n+3>i.length||!i[n+1]&&!i[n+3];t&&!o||(e=" "+e),(o||!t&&!r)&&(e=e.toLowerCase())}return e})).join("").trim()}function Li(e,t,n){const i="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(i)?t.meta[i]:n&&n.meta?n.meta[i]:void 0}function Di(e,t){const n="string"==typeof e?wi.getMetaItemDescriptor(e):e;return n?{name:n.name,type:n.type,value:t}:{name:typeof e,type:wi.resolveValueTypeFromValue(t),value:t}}function Ii(e,t,n,i,o){return function(e,t,n,i,o,r){let a=Ni("label",e,t,n,o),s="";if(a||(a=Li("label",e,t&&t.meta?t:void 0)),i&&(s=Pi(Bi("units",e,t,n,o))),!a){const n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=r||(n?Ti(n):void 0)}return a?a+(s?" ("+s+")":""):s}(e,t,n,i,!0,o)}function Ri(e,t,n,i,o){return function(e,t,n,i,o,r){let a=Oi(e?e.value:void 0,(()=>Bi("format",e,t,n,o)),void 0,r);const s=function(e,t,n){return Bi("units",e,t,n,!0)}(e,t,n);return i&&s&&s.length&&(a=Pi(Bi("units",e,t,n,o),a)),a}(e,t,n,i,!0,o)}function Oi(e,t,n,i){let o="";if(null==e)o=i||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){const i=t&&t();if(i&&0!==Object.keys(i).length)switch("number"==typeof e?i.asBoolean?e=!!e:i.asDate&&(e=new Date(e)):"boolean"==typeof e&&i.asNumber&&(e=e?1:0),typeof e){case"number":o=new Intl.NumberFormat(n||dn.language,i).format(e);break;case"boolean":i.asOnOff&&(o=e?dn.t("on"):dn.t("off")),i.asOpenClosed&&(o=e?dn.t("open"):dn.t("closed")),i.asPressedReleased&&(o=e?dn.t("pressed"):dn.t("released"));break;case"object":if(i.momentJsFormat)o=Ai()(e).format(i.momentJsFormat);else if(i.iso8601)o=e.toISOString();else if(i.week){const t=function(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));const t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}(e);o="2-digit"===i.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(n||dn.language,i).format(e)}else o=Object(e).toString()}return o}function Pi(e,t){if(!e)return"";t||(t="");const n=e.map(((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return dn.t(["units."+e,"or:units."+e]);{const i=new Intl.NumberFormat(dn.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==i[0].type)return"currency"===i[0].type?i[0].value:i[i.length-1].value;if(!t)return i[0].value;t=i[0].value+t}})).join("");return t.length>0?t+" "+n:n}function $i(e,t,n){if(e&&!t)return Object.assign({},e);if(t&&!e)return Object.assign({},t);const i=Object.assign({},e),o=[];return Object.entries(t).forEach((([e,t])=>{!function(e,t,n,i,o){let r=e;t.forEach((e=>{r.hasOwnProperty(e)||(r[e]={}),r=r[e]})),r&&(r.hasOwnProperty(n)?null==i?delete r[n]:Array.isArray(r[n])?r[n]=o?[...r[n],...i]:[...i]:r[n]="object"==typeof i?$i(Object.assign({},r[n]),i,o):i:null==i?delete r[n]:Array.isArray(i)?r[n]=[...i]:r[n]="object"==typeof i?Object.assign({},i):i)}(i,o,e,t,n)})),i}function Bi(e,t,n,i,o){let r;const a=[],s=Ni(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,i,o);if(s&&(r=JSON.parse(s),r)){if("format"!==e)return r;a.push(r)}if(t&&t.meta&&(r=Li(e,t,n),r)){if("format"!==e)return r;a.push(r)}if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(r=n[e],"format"!==e)return r;a.push(r)}if(n&&n.type){if(r=wi.getValueDescriptor(n.type)[e],"format"!==e)return r;a.push(r)}if("format"!==e||0===a.length)return r;let l={};return a.reverse().forEach((e=>{l=Object.assign(Object.assign({},l),e)})),l}function Ni(e,t,n,i,o,r){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;const s=[],l=e+"."+(o?"attribute":"meta")+".";return i&&s.push(l+i+"."+a),n&&"string"!=typeof n&&(s.push(l+n.type+"."+a),s.push(l+n.type)),s.push(l+a),s.length>0?dn.t(s,{defaultValue:r||""}):void 0}function zi(e,t){const n=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[n];else{const i=e.attributes[n];i&&(i.value=t.value,i.timestamp=t.timestamp)}return Object.assign({},e)}let ji=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{ji=!0}}))}catch(jo){}document.createElement("div");var Yi=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};let Hi=o(26900);class Ui{constructor(e,t,n){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=n,window.OpenRemoteConsole=this;let i=new URLSearchParams(window.location.search),o=i.get("consoleName"),r=i.get("consoleVersion"),a=i.get("consolePlatform"),s=i.get("consoleProviders"),l=i.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let d=Ui._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+e);if(u)try{let e=JSON.parse(u);e.id&&(d.id=e.id),e.name&&(d.name=e.name),e.providers&&(d.providers=e.providers),e.apps&&(d.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let h=d.providers;d.providers={};for(let e of c){let t=h&&h.hasOwnProperty(e)?h[e]:{enabled:!1,disabled:!1};d.providers[e]=t}let m=$r.getAppName();m.length>0&&d.apps.indexOf(m)<0&&d.apps.push(m),this._registration=d,o&&(d.name=o),r&&(d.version=r),a&&(d.platform=a),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){const e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return Yi(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 e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);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(e){console.error(e)}finally{this._initialiseInProgress=!1}}}))}enableProviders(){return Yi(this,void 0,void 0,(function*(){if(!this._initialised)throw new Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}}))}enableProvider(e,t){return Yi(this,void 0,void 0,(function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),new Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),new Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let n={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},i=yield this.sendProviderMessage(n,!0);this._registration.providers[e].hasPermission=i.hasPermission,this._registration.providers[e].success=i.success,this._registration.providers[e].enabled=i.success,this._registration.providers[e].data=i.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),i}))}disableProvider(e){return Yi(this,void 0,void 0,(function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),new Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),new Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t}))}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return Yi(this,void 0,void 0,(function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),new Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let n=e.provider+e.action;if(this._pendingProviderPromises[n])throw new Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");const i=new Mi;return this._pendingProviderPromises[n]=[i,window.setTimeout((()=>{delete this._pendingProviderPromises[n],i.reject("No response from provider")}),5e3)],this._doSendProviderMessage(e),i.promise}))}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),e=void 0!==e?e:2e3,console.debug("Sending registration in: "+e+"ms"),new Promise(((e,t)=>{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={}),$r.rest.api.ConsoleResource.register(this._registration).then((t=>{if(200!==t.status)throw new Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()}))}catch(e){console.error("Failed to register console"),t("Failed to register console")}}))}))}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return Yi(this,void 0,void 0,(function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{const e=yield Promise.race([t,new Promise(((e,t)=>setTimeout(t,2e3)))]);if(e&&e.value){const t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}}))}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){const n={type:e,data:t};this.isMobile?this._postNativeShellMessage(n):console.warn("Failed to send generic message to console.",n)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.action.trim().toUpperCase()){case"PROVIDER_INIT":let t={action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0};this._handleProviderResponse(JSON.stringify(t));break;case"PROVIDER_ENABLE":let n={action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0};this._handleProviderResponse(JSON.stringify(n));break;default:throw new Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":let t={action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0};this._handleProviderResponse(JSON.stringify(t));break;case"PROVIDER_ENABLE":let n={action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0};this._handleProviderResponse(JSON.stringify(n));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw new Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw new Error("Storage provider 'retrieve' action requires a `key`");let n=window.localStorage.getItem(t);if(null!==n)try{n=JSON.parse(n)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:n}))}break;default:throw new Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),n=t.provider,i=t.action,o=this._pendingProviderPromises[n+i];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[n+i],o[0].resolve(t));let r=this._providerMessageListeners[n+i];r&&r(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout((()=>{e()}),0)}static _createConsoleRegistration(){return{name:Hi.name,version:Hi.version,platform:Hi.os.toString(),apps:[],model:((Hi.manufacturer?Hi.manufacturer+" ":"")+(Hi.product?Hi.product:"")).trim()}}_initialiseProvider(e){return Yi(this,void 0,void 0,(function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}}))}}var Vi=o(79048),Wi=o.n(Vi);class qi{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:fo`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:fo`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:fo`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:fo`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:fo`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:fo`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:fo`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:fo`alarm/${e}/assets`,queryParams:t,options:n})}}class Gi{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:fo`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:fo`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:fo`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:fo`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:fo`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:fo`realm/${e}`,data:t,options:n})}}class Ki{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:fo`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:fo`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:fo`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:fo`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:fo`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:fo`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:fo`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:fo`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:fo`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:fo`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:fo`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:fo`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:fo`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:fo`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:fo`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:fo`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:fo`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:fo`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:fo`rules/${e}`,data:t,options:n})}}class Xi{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:fo`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:fo`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:fo`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:fo`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:fo`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:fo`dashboard/${e}/${t}`,options:n})}}class Zi{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:fo`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:fo`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:fo`apps/info`,options:e})}}class Ji{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:fo`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:fo`info`,options:e})}}class Qi{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:fo`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:fo`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:fo`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class eo{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:fo`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:fo`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:fo`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:fo`configuration/manager/image/${e}`,options:t})}}class to{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:fo`console/register`,data:e,options:t})}}class no{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:fo`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`asset/predicted/${e}/${t}`,data:n,options:i})}}class io{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:fo`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:fo`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:fo`asset/datapoint/${e}/${t}`,data:n,options:i})}}class oo{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:fo`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:fo`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:fo`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:fo`syslog/event`,queryParams:e,options:t})}}class ro{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:fo`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:fo`user/query`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:fo`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:fo`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:fo`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/disconnect/${t}`,options:n})}resetPassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:fo`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:fo`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:fo`user/${e}/userRoles/${t}/${n}`,data:i,options:o})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:fo`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:fo`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:fo`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:fo`user/${e}/${t}`,options:n})}}class ao{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:fo`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:fo`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:fo`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:fo`provisioning/${e}`,data:t,options:n})}}class so{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:fo`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:fo`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:fo`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:fo`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,o){return this.httpClient.request({method:"GET",url:fo`gateway/tunnel/${e}/${t}/${n}/${i}`,options:o})}}class lo{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:fo`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:fo`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:fo`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:fo`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:fo`notification/${e}/delivered`,queryParams:t,options:n})}}class co{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:fo`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:fo`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:fo`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:fo`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:fo`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:fo`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:fo`map/upload`,queryParams:e,options:t})}}class uo{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:fo`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:fo`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:fo`flow/${e}`,options:t})}}class ho{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:fo`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:fo`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:fo`model/assetInfos`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:fo`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:fo`model/valueDescriptors`,queryParams:e,options:t})}}class mo{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:fo`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:fo`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:fo`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:fo`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:fo`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:fo`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:fo`asset/query`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:fo`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:fo`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:fo`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:fo`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:fo`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:fo`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:fo`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:fo`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:fo`asset/${e}/attribute/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:fo`asset/${e}/attribute/${t}/${n}`,data:i,options:o})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:fo`asset/${e}/child`,queryParams:t,options:n})}}class po{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:fo`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:fo`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:fo`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:fo`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:fo`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:fo`gateway/status/${e}`,options:t})}}function fo(e,...t){let n="";for(let i=0;i<t.length;i++)n+=e[i],n+=encodeURIComponent(t[i]);return n+=e[e.length-1],n}class go{constructor(e,t=Wi().create()){this._alarmResource=new _o(e,t),this._realmResource=new yo(e,t),this._rulesResource=new vo(e,t),this._dashboardResource=new xo(e,t),this._appResource=new wo(e,t),this._statusResource=new Fo(e,t),this._agentResource=new ko(e,t),this._configurationResource=new Eo(e,t),this._consoleResource=new Ao(e,t),this._assetPredictedDatapointResource=new Co(e,t),this._assetDatapointResource=new Mo(e,t),this._syslogResource=new So(e,t),this._userResource=new To(e,t),this._provisioningResource=new Lo(e,t),this._gatewayServiceResource=new Do(e,t),this._notificationResource=new Io(e,t),this._mapResource=new Ro(e,t),this._flowResource=new Oo(e,t),this._assetModelResource=new Po(e,t),this._assetResource=new $o(e,t),this._gatewayClientResource=new Bo(e,t),this._assetResource=new $o(e,t)}get AlarmResource(){return this._alarmResource}get RealmResource(){return this._realmResource}get RulesResource(){return this._rulesResource}get DashboardResource(){return this._dashboardResource}get AppResource(){return this._appResource}get StatusResource(){return this._statusResource}get AgentResource(){return this._agentResource}get ConfigurationResource(){return this._configurationResource}get ConsoleResource(){return this._consoleResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get AssetDatapointResource(){return this._assetDatapointResource}get SyslogResource(){return this._syslogResource}get UserResource(){return this._userResource}get ProvisioningResource(){return this._provisioningResource}get GatewayServiceResource(){return this._gatewayServiceResource}get NotificationResource(){return this._notificationResource}get MapResource(){return this._mapResource}get FlowResource(){return this._flowResource}get AssetModelResource(){return this._assetModelResource}get AssetResource(){return this._assetResource}get GatewayClientResource(){return this._gatewayClientResource}}class bo{constructor(e){this.axios=e}request(e){const t={};t.method=e.method,t.url=e.url,t.params=e.queryParams,t.data=e.data,function(e,t){if(null!=t)for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(t,e.options);const n=e.copyFn;return this.axios.request(t).then((e=>(n&&e.data&&(e.originalData=e.data,e.data=n(e.data)),e)))}}class _o extends qi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class yo extends Gi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class vo extends Ki{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class xo extends Xi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class wo extends Zi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Fo extends Ji{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class ko extends Qi{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Eo extends eo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Ao extends to{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Co extends no{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Mo extends io{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class So extends oo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class To extends ro{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Lo extends ao{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Do extends so{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Io extends lo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Ro extends co{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Oo extends uo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Po extends ho{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class $o extends mo{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}class Bo extends po{constructor(e,t=Wi().create()){t.defaults.baseURL=e,super(new bo(t))}}Wi().isAxiosError;const No=new class{get api(){return this._client}constructor(){this._axiosInstance=Wi().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use((e=>(e.paramsSerializer=e=>ki().stringify(e,{arrayFormat:"repeat"}),e)))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(e){this._axiosInstance.defaults.timeout=e}addRequestInterceptor(e){this._axiosInstance.interceptors.request.use(e)}initialise(e){this._baseUrl=e,this._client=new go(e,this._axiosInstance)}};var zo,jo,Yo=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};(jo=zo||(zo={})).DISCONNECTED="DISCONNECTED",jo.CONNECTED="CONNECTED",jo.CONNECTING="CONNECTING";class Ho{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=Uo.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=zo.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(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){!function(e,t){if(0===e.length)return;const n=e.indexOf(t);n>=0&&e.splice(n,1)}(this._statusCallbacks,e)}connect(){return this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===zo.CONNECTED?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(zo.CONNECTING),this._connectingDeferred=new Mi,this._doConnect().then((e=>{if(this._connectingDeferred){const t=this._connectingDeferred;this._connectingDeferred=null,e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=Uo.MIN_RECONNECT_DELAY,this._onStatusChanged(zo.CONNECTED),window.setTimeout((()=>{this._onConnect()}),0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),t.resolve(e)}}))),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!==zo.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){const n={eventSubscription:e,callback:t,deferred:new Mi};return null!=this._pendingSubscription||this._status!==zo.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(e).then((e=>{if(this._pendingSubscription){const t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();const n=t.deferred;t.deferred=null,n&&n.resolve(e)}}),(e=>{if(this._pendingSubscription){const t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();const n=t.deferred;t.deferred=null,n&&n.reject(e)}})),this._pendingSubscription.deferred.promise)}unsubscribe(e){return Yo(this,void 0,void 0,(function*(){if(this._subscriptionMap.delete(e))this._doUnsubscribe(e);else if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){const e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}}else if(this._attributeEventCallbackMap.delete(e)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){const e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}}))}sendEvent(e){this._status===zo.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==zo.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return Yo(this,void 0,void 0,(function*(){const i=e&&"string"!=typeof e[0]?e.map((e=>e.id)):e,o="AssetEvent"+Ho._subscriptionCounter++;if(!this._assetEventPromise){let e;$r.authenticated||(e={filterType:"asset",realm:$r.displayRealm});const t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,(e=>{this._assetEventCallbackMap.forEach((t=>t(e)))}))}return this._assetEventCallbackMap.set(o,(e=>{const t=e.asset.id;i?i.find((e=>t===e))&&n(e):e.asset.realm===$r.displayRealm&&n(e)})),this._assetEventPromise.then((()=>{try{if(i&&t){const e={messageID:"read-assets:"+i.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then((e=>{const t=e;t.assets&&this._assetEventCallbackMap.has(o)&&t.assets.forEach((e=>{n({eventType:"asset",asset:e,cause:"READ"})}))}))}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o}))}))}subscribeAttributeEvents(e,t,n){return Yo(this,void 0,void 0,(function*(){const i=e&&"string"!=typeof e[0],o=i?e.map((e=>e.id)):e,r=i?e:void 0,a="AttributeEvent"+Ho._subscriptionCounter++;if(!this._attributeEventPromise){let e;$r.authenticated||(e={filterType:"asset",realm:$r.displayRealm});const t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,(e=>{this._attributeEventCallbackMap.forEach((t=>t(e)))}))}const s=t=>{const r=t.ref;i?e.forEach((e=>{r.id===e.id&&r.name===e.name&&n(t)})):o?o.find((e=>r.id===e))&&n(t):t.realm===$r.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then((()=>{try{if(t&&o){const e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then((e=>{const t=e;t.assets&&this._attributeEventCallbackMap.has(a)&&t.assets.forEach((e=>{e.attributes&&Object.entries(e.attributes).forEach((([t,n])=>{r&&!r.find((n=>n.id===e.id&&n.name===t))||s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})}))}))}))}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a}))}))}_processNextSubscription(){this._status===zo.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout((()=>{const e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then((t=>{const n=e.deferred;e.deferred=null,n&&n.resolve(t)}),(t=>{const n=e.deferred;e.deferred=null,n&&n.reject(t)}))}),0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout((()=>{this._statusCallbacks.forEach((t=>t(e)))}),0))}_onMessageReceived(e,t){const n=this._subscriptionMap.get(e);n&&n.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(const e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===zo.CONNECTED&&this._onStatusChanged(zo.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(zo.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<Uo.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(Uo.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}Ho.MIN_RECONNECT_DELAY=0,Ho.MAX_RECONNECT_DELAY=3e4,Ho._subscriptionCounter=0;class Uo extends Ho{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",(()=>{this._unloading=!0,this.disconnect()}))}_doConnect(){let e=this._endpointUrl+"?Realm="+$r.config.realm;return $r.authenticated&&(e+="&Authorization="+$r.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new Mi,this._webSocket.onopen=()=>{if(this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{const t=e.data;if(t&&t.startsWith("SUBSCRIBED:")){const e=t.substring(11),n=JSON.parse(e),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&i.resolve(n.subscriptionId)}else if(t.startsWith("UNAUTHORIZED:")){const e=t.substring(13),n=JSON.parse(e),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&(console.warn("Unauthorized event subscription: "+JSON.stringify(n,null,2)),i.reject("Unauthorized"))}else if(t.startsWith("TRIGGERED:")){const e=t.substring(10),n=JSON.parse(e);n.events&&n.events.forEach((e=>{this._onMessageReceived(n.subscriptionId,e)}))}else if(t.startsWith("EVENT:")){const e=t.substring(6),n=JSON.parse(e);if(n.messageID){const e=this._repliesDeferred.get(n.messageID);this._repliesDeferred.delete(n.messageID),e&&e.resolve(n)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null===(e=this._webSocket)||void 0===e||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new Mi,e.subscriptionId||(e.subscriptionId=Uo._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){if(!this._webSocket)return;const t={subscriptionId:e};this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify(t))}_doSend(e){const t="EVENT:"+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=((new Date).getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");const t=new Mi;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send("EVENT:"+JSON.stringify(e)),t.promise}}function Vo(e){return Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vo(e)}Uo._subscriptionCounter=1;var Wo=[],qo=Wo.forEach,Go=Wo.slice;function Ko(e){return qo.call(Go.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function Xo(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Vo(XMLHttpRequest))}var Zo,Jo,Qo,er=o(96624),tr=o.t(er,2);function nr(e){return nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(e)}"function"==typeof fetch&&(Zo="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),Xo()&&("undefined"!=typeof global&&global.XMLHttpRequest?Jo=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(Jo=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?Qo=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(Qo=window.ActiveXObject)),Zo||!tr||Jo||Qo||(Zo=er||tr),"function"!=typeof Zo&&(Zo=void 0);var ir=function(e,t){if(t&&"object"===nr(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},or=function(e,t,n){Zo(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},rr=!1;const ar=function(e,t,n,i){return"function"==typeof n&&(i=n,n=void 0),i=i||function(){},Zo?function(e,t,n,i){e.queryStringParams&&(t=ir(t,e.queryStringParams));var o=Ko({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var r="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Ko({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},rr?{}:r);try{or(t,a,i)}catch(e){if(!r||0===Object.keys(r).length||!e.message||e.message.indexOf("not implemented")<0)return i(e);try{Object.keys(r).forEach((function(e){delete a[e]})),or(t,a,i),rr=!0}catch(e){i(e)}}}(e,t,n,i):Xo()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===nr(n)&&(n=ir("",n).slice(1)),e.queryStringParams&&(t=ir(t,e.queryStringParams));try{var o;(o=Jo?new Jo:new Qo("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)o.setRequestHeader(a,r[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,i):void i(new Error("No fetch and no xhr implementation found!"))};function sr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var lr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)}var t,n;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Ko(n,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:ar,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=i,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,i,o){var r,a=this,s=this.options.loadPath;"function"==typeof this.options.loadPath&&(s=this.options.loadPath(e,n)),(s=function(e){return!!e&&"function"==typeof e.then}(r=s)?r:Promise.resolve(r)).then((function(r){if(!r)return o(null,{});var s=a.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(s,o,t,i)}))}},{key:"loadUrl",value:function(e,t,n,i){var o=this;this.options.request(this.options,e,void 0,(function(r,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&r&&r.message&&r.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+r.message,!0);if(r)return t(r,!1);var s,l;try{s="string"==typeof a.data?o.options.parse(a.data,n,i):a.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,i,o){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,i),s=0,l=[],c=[];e.forEach((function(n){var i=r.options.addPath;"function"==typeof r.options.addPath&&(i=r.options.addPath(n,t));var d=r.services.interpolator.interpolate(i,{lng:n,ns:t});r.options.request(r.options,d,a,(function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&o&&o(l,c)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,o=t.logger,r=n.language;if(!r||"cimode"!==r.toLowerCase()){var a=[],s=function(e){i.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};s(r),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return s(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(i,r){i&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&r&&o.log("loaded namespace ".concat(e," for language ").concat(t),r),n.loaded("".concat(t,"|").concat(e),i,r)}))}))}))}}}],n&&sr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();lr.type="backend";const cr=lr;class dr extends Be{constructor(e){if(super(e),this.et=H,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||null==e)return this.ft=void 0,this.et=e;if(e===Y)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}dr.directiveName="unsafeHTML",dr.resultType=1,$e(dr);class ur extends dr{}ur.directiveName="unsafeSVG",ur.resultType=2;const hr=$e(ur),mr=24,pr={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 fr=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};const gr=o(180);class br extends CustomEvent{constructor(){super(br.NAME,{bubbles:!0,composed:!0})}}br.NAME="or-iconset-added";const _r=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new br)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return j``;const t=(e||"").split(":"),n=t.pop(),i=t.pop();let o=this._defaultIconSet;return i&&(o=this.getIconSet(i)),n&&o?o.getIconTemplate(n):j``}};let yr=class extends Ae{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[he`
|
|
19
19
|
:host {
|
|
20
20
|
--internal-or-icon-width: var(--or-icon-width, 24px);
|
|
21
21
|
--internal-or-icon-height: var(--or-icon-height, 24px);
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
width: var(--internal-or-icon-width);
|
|
59
59
|
height: var(--internal-or-icon-height);
|
|
60
60
|
}
|
|
61
|
-
`,he`${ue(gr)}`]}render(){return this._iconTemplate||j``}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(br.NAME,this._handler)}shouldUpdate(e){return e.has("icon")&&this._updateIcon(),!0}_updateIcon(){this._iconTemplate=void 0,window.removeEventListener(br.NAME,this._handler),this._iconTemplate=_r.getIconTemplate(this.icon),this.icon&&!this._iconTemplate&&window.addEventListener(br.NAME,this._handler)}};fr([Le({type:String,reflect:!0})],yr.prototype,"icon",void 0),fr([De()],yr.prototype,"_iconTemplate",void 0),yr=fr([Me("or-icon")],yr);var vr=o(95964);class xr extends Error{}function wr(e,t){if("string"!=typeof e)throw new xr("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,i=e.split(".")[n];if("string"!=typeof i)throw new xr(`Invalid token specified: missing part #${n+1}`);let o;try{o=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return atob(t)}}(i)}catch(e){throw new xr(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new xr(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(xr.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Fr(e){if(!(this instanceof Fr))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,i=this,o=[],r={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)-1===a[s].src.indexOf("keycloak.js")&&-1===a[s].src.indexOf("keycloak.min.js")||-1===a[s].src.indexOf("version=")||(i.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var l=!0,c=C(console.info),d=C(console.warn);function u(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=new Array(e);for(var i=0;i<t.length;i++)t[i]=Math.floor(256*Math.random());return t}(e),i=new Array(e),o=0;o<e;o++)i[o]=t.charCodeAt(n[o]%t.length);return String.fromCharCode.apply(null,i)}function h(){return void 0!==i.authServerUrl?"/"==i.authServerUrl.charAt(i.authServerUrl.length-1)?i.authServerUrl+"realms/"+encodeURIComponent(i.realm):i.authServerUrl+"/realms/"+encodeURIComponent(i.realm):void 0}function m(e,t){var n=e.code,o=e.error,r=e.prompt,a=(new Date).getTime();if(e.kc_action_status&&i.onActionUpdate&&i.onActionUpdate(e.kc_action_status),o)if("none"!=r)if(e.error_description&&"authentication_expired"===e.error_description)i.login(e.loginOptions);else{var s={error:o,error_description:e.error_description};i.onAuthError&&i.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();else if("standard"!=i.flow&&(e.access_token||e.id_token)&&m(e.access_token,null,e.id_token,!0),"implicit"!=i.flow&&n){var d="code="+n+"&grant_type=authorization_code",u=i.endpoints.token(),h=new XMLHttpRequest;h.open("POST",u,!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d+="&client_id="+encodeURIComponent(i.clientId),d+="&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(d+="&code_verifier="+e.pkceCodeVerifier),h.withCredentials=!0,h.onreadystatechange=function(){if(4==h.readyState)if(200==h.status){var e=JSON.parse(h.responseText);m(e.access_token,e.refresh_token,e.id_token,"standard"===i.flow),x()}else i.onAuthError&&i.onAuthError(),t&&t.setError()},h.send(d)}function m(n,o,r,s){f(n,o,r,a=(a+(new Date).getTime())/2),l&&i.idTokenParsed&&i.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),i.clearToken(),t&&t.setError()):s&&(i.onAuthSuccess&&i.onAuthSuccess(),t&&t.setSuccess())}}function p(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function f(e,t,n,o){if(i.tokenTimeoutHandle&&(clearTimeout(i.tokenTimeoutHandle),i.tokenTimeoutHandle=null),t?(i.refreshToken=t,i.refreshTokenParsed=wr(t)):(delete i.refreshToken,delete i.refreshTokenParsed),n?(i.idToken=n,i.idTokenParsed=wr(n)):(delete i.idToken,delete i.idTokenParsed),e){if(i.token=e,i.tokenParsed=wr(e),i.sessionId=i.tokenParsed.sid,i.authenticated=!0,i.subject=i.tokenParsed.sub,i.realmAccess=i.tokenParsed.realm_access,i.resourceAccess=i.tokenParsed.resource_access,o&&(i.timeSkew=Math.floor(o/1e3)-i.tokenParsed.iat),null!=i.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+i.timeSkew+" seconds"),i.onTokenExpired)){var r=1e3*(i.tokenParsed.exp-(new Date).getTime()/1e3+i.timeSkew);c("[KEYCLOAK] Token expires in "+Math.round(r/1e3)+" s"),r<=0?i.onTokenExpired():i.tokenTimeoutHandle=setTimeout(i.onTokenExpired,r)}}else delete i.token,delete i.tokenParsed,delete i.subject,delete i.realmAccess,delete i.resourceAccess,i.authenticated=!1}function g(){var e="0123456789abcdef",t=u(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function b(e){var t=function(e){var t;switch(i.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var n,o,r=e.indexOf("?"),a=e.indexOf("#");if("query"===i.responseMode&&-1!==r?(n=e.substring(0,r),""!==(o=_(e.substring(r+1,-1!==a?a:e.length),t)).paramsString&&(n+="?"+o.paramsString),-1!==a&&(n+=e.substring(a))):"fragment"===i.responseMode&&-1!==a&&(n=e.substring(0,a),""!==(o=_(e.substring(a+1),t)).paramsString&&(n+="#"+o.paramsString)),o&&o.oauthParams)if("standard"===i.flow||"hybrid"===i.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}else if("implicit"===i.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}(e);if(t){var o=n.get(t.state);return o&&(t.valid=!0,t.redirectUri=o.redirectUri,t.storedNonce=o.nonce,t.prompt=o.prompt,t.pkceCodeVerifier=o.pkceCodeVerifier,t.loginOptions=o.loginOptions),t}}function _(e,t){for(var n=e.split("&"),i={paramsString:"",oauthParams:{}},o=0;o<n.length;o++){var r=n[o].indexOf("="),a=n[o].slice(0,r);-1!==t.indexOf(a)?i.oauthParams[a]=n[o].slice(r+1):(""!==i.paramsString&&(i.paramsString+="&"),i.paramsString+=n[o])}return i}function y(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}function v(){var e=y();if(!r.enable)return e.setSuccess(),e.promise;if(r.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");r.iframe=t,t.onload=function(){var t=i.endpoints.authorize();"/"===t.charAt(0)?r.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):r.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var n=i.endpoints.checkSessionIframe();return t.setAttribute("src",n),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",(function(e){if(e.origin===r.iframeOrigin&&r.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&i.clearToken();for(var t=r.callbackList.splice(0,r.callbackList.length),n=t.length-1;n>=0;--n){var o=t[n];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}}),!1),e.promise}function x(){r.enable&&i.token&&setTimeout((function(){w().then((function(e){e&&x()}))}),1e3*r.interval)}function w(){var e=y();if(r.iframe&&r.iframeOrigin){var t=i.clientId+" "+(i.sessionId?i.sessionId:"");r.callbackList.push(e);var n=r.iframeOrigin;1==r.callbackList.length&&r.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function F(){var e=y();if(r.enable||i.silentCheckSsoRedirectUri){var t=document.createElement("iframe");t.setAttribute("src",i.endpoints.thirdPartyCookiesIframe()),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-3p-check-iframe"),t.style.display="none",document.body.appendChild(t);var n=function(o){t.contentWindow===o.source&&("supported"!==o.data&&"unsupported"!==o.data||("unsupported"===o.data&&(d("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),r.enable=!1,i.silentCheckSsoFallback&&(i.silentCheckSsoRedirectUri=!1)),document.body.removeChild(t),window.removeEventListener("message",n),e.setSuccess()))};window.addEventListener("message",n,!1)}else e.setSuccess();return function(e,t,n){var i=null,o=new Promise((function(e,n){i=setTimeout((function(){n({error:"Timeout when waiting for 3rd party check iframe message."})}),t)}));return Promise.race([e,o]).finally((function(){clearTimeout(i)}))}(e.promise,i.messageReceiveTimeout)}function k(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(i.createLoginUrl(e)),y().promise},logout:async function(e){if("GET"===(e?.logoutMethod??i.logoutMethod))return void window.location.replace(i.createLogoutUrl(e));const n=i.createLogoutUrl(e),o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:i.idToken,client_id:i.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected)window.location.href=o.url;else{if(!o.ok)throw new Error("Logout failed, request returned an error code.");window.location.reload()}},register:function(e){return window.location.assign(i.createRegisterUrl(e)),y().promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";return window.location.href=e,y().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:location.href}};if("cordova"==e){r.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},o=function(e){var t=function(e){return e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce((function(t,n){return t[n]=e.cordovaOptions[n],t}),{}):{}}(e);return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),function(e){return Object.keys(e).reduce((function(t,n){return t.push(n+"="+e[n]),t}),[]).join(",")}(t)},a=function(){return i.redirectUri||"http://localhost"};return{login:function(e){var t=y(),r=o(e),s=i.createLoginUrl(e),l=n(s,"_blank",r),c=!1,d=!1,u=function(){d=!0,l.close()};return l.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&(m(b(e.url),t),u(),c=!0)})),l.addEventListener("loaderror",(function(e){c||(0==e.url.indexOf(a())?(m(b(e.url),t),u(),c=!0):(t.setError(),u()))})),l.addEventListener("exit",(function(e){d||t.setError({reason:"closed_by_user"})})),t.promise},logout:function(e){var t,o=y(),r=i.createLogoutUrl(e),s=n(r,"_blank","location=no,hidden=yes,clearcache=yes");return s.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&s.close()})),s.addEventListener("loaderror",(function(e){0==e.url.indexOf(a())||(t=!0),s.close()})),s.addEventListener("exit",(function(e){t?o.setError():(i.clearToken(),o.setSuccess())})),o.promise},register:function(e){var t=y(),r=i.createRegisterUrl(),s=o(e),l=n(r,"_blank",s);return l.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&(l.close(),m(b(e.url),t))})),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";var t=n(e,"_blank","location=no");t.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&t.close()}))},redirectUri:function(e){return a()}}}if("cordova-native"==e)return r.enable=!1,{login:function(e){var t=y(),n=i.createLoginUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=y(),n=i.createLogoutUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),i.clearToken(),t.setSuccess()})),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=y(),n=i.createRegisterUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";window.cordova.plugins.browsertab.openUrl(e)},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}i.init=function(o){if(i.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");if(i.didInitialize=!0,i.authenticated=!1,n=function(){try{return new E}catch(e){}return new A}(),t=o&&["default","cordova","cordova-native"].indexOf(o.adapter)>-1?k(o.adapter):o&&"object"==typeof o.adapter?o.adapter:window.Cordova||window.cordova?k("cordova"):k(),o){if(void 0!==o.useNonce&&(l=o.useNonce),void 0!==o.checkLoginIframe&&(r.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(r.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(i.loginRequired=!0),o.responseMode){if("query"!==o.responseMode&&"fragment"!==o.responseMode)throw"Invalid value for responseMode";i.responseMode=o.responseMode}if(o.flow){switch(o.flow){case"standard":i.responseType="code";break;case"implicit":i.responseType="id_token token";break;case"hybrid":i.responseType="code id_token token";break;default:throw"Invalid value for flow"}i.flow=o.flow}if(null!=o.timeSkew&&(i.timeSkew=o.timeSkew),o.redirectUri&&(i.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(i.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?i.silentCheckSsoFallback=o.silentCheckSsoFallback:i.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);i.pkceMethod=o.pkceMethod}else i.pkceMethod="S256";"boolean"==typeof o.enableLogging?i.enableLogging=o.enableLogging:i.enableLogging=!1,"POST"===o.logoutMethod?i.logoutMethod="POST":i.logoutMethod="GET","string"==typeof o.scope&&(i.scope=o.scope),"string"==typeof o.acrValues&&(i.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?i.messageReceiveTimeout=o.messageReceiveTimeout:i.messageReceiveTimeout=1e4}i.responseMode||(i.responseMode="fragment"),i.responseType||(i.responseType="code",i.flow="standard");var a=y(),s=y();s.promise.then((function(){i.onReady&&i.onReady(i.authenticated),a.setSuccess(i.authenticated)})).catch((function(e){a.setError(e)}));var c=function(t){var n,o=y();function r(e){i.endpoints=e?{authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:{authorize:function(){return h()+"/protocol/openid-connect/auth"},token:function(){return h()+"/protocol/openid-connect/token"},logout:function(){return h()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=h()+"/protocol/openid-connect/login-status-iframe.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=h()+"/protocol/openid-connect/3p-cookies/step1.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},register:function(){return h()+"/protocol/openid-connect/registrations"},userinfo:function(){return h()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(n=e):n="keycloak.json",n)(l=new XMLHttpRequest).open("GET",n,!0),l.setRequestHeader("Accept","application/json"),l.onreadystatechange=function(){if(4==l.readyState)if(200==l.status||p(l)){var e=JSON.parse(l.responseText);i.authServerUrl=e["auth-server-url"],i.realm=e.realm,i.clientId=e.resource,r(null),o.setSuccess()}else o.setError()},l.send();else{if(!e.clientId)throw"clientId missing";i.clientId=e.clientId;var a=e.oidcProvider;if(a){var s,l;"string"==typeof a?(s="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",(l=new XMLHttpRequest).open("GET",s,!0),l.setRequestHeader("Accept","application/json"),l.onreadystatechange=function(){4==l.readyState&&(200==l.status||p(l)?(r(JSON.parse(l.responseText)),o.setSuccess()):o.setError())},l.send()):(r(a),o.setSuccess())}else{if(!e.url)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++)if(c[d].src.match(/.*keycloak\.js/)){e.url=c[d].src.substr(0,c[d].src.indexOf("/js/keycloak.js"));break}if(!e.realm)throw"realm missing";i.authServerUrl=e.url,i.realm=e.realm,r(null),o.setSuccess()}}return o.promise}();function d(){var e=function(e){e||(n.prompt="none"),o&&o.locale&&(n.locale=o.locale),i.login(n).then((function(){s.setSuccess()})).catch((function(e){s.setError(e)}))},t=function(){var e=document.createElement("iframe"),t=i.createLoginUrl({prompt:"none",redirectUri:i.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(m(b(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(o.onLoad){case"check-sso":r.enable?v().then((function(){w().then((function(n){n?s.setSuccess():i.silentCheckSsoRedirectUri?t():e(!1)})).catch((function(e){s.setError(e)}))})):i.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function u(){var e=b(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return v().then((function(){m(e,s)})).catch((function(e){s.setError(e)}));o?o.token&&o.refreshToken?(f(o.token,o.refreshToken,o.idToken),r.enable?v().then((function(){w().then((function(e){e?(i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess(),x()):s.setSuccess()})).catch((function(e){s.setError(e)}))})):i.updateToken(-1).then((function(){i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess()})).catch((function(e){i.onAuthError&&i.onAuthError(),o.onLoad?d():s.setError(e)}))):o.onLoad?d():s.setSuccess():s.setSuccess()}return c.then((function(){(function(){var e=y(),t=function(){"interactive"!==document.readyState&&"complete"!==document.readyState||(document.removeEventListener("readystatechange",t),e.setSuccess())};return document.addEventListener("readystatechange",t),t(),e.promise})().then(F).then(u).catch((function(e){a.setError(e)}))})),c.catch((function(e){a.setError(e)})),a.promise},i.login=function(e){return t.login(e)},i.createLoginUrl=function(e){var o,r=g(),a=g(),s=t.redirectUri(e),c={state:r,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),o=e&&"register"==e.action?i.endpoints.register():i.endpoints.authorize();var d=e&&e.scope||i.scope;d?-1===d.indexOf("openid")&&(d="openid "+d):d="openid";var h,m=o+"?client_id="+encodeURIComponent(i.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(r)+"&response_mode="+encodeURIComponent(i.responseMode)+"&response_type="+encodeURIComponent(i.responseType)+"&scope="+encodeURIComponent(d);if(l&&(m=m+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(m+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(m+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(m+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(m+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(m+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(m+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr){var p=(h={id_token:{acr:e.acr}},JSON.stringify(h));m+="&claims="+encodeURIComponent(p)}if((e&&e.acrValues||i.acrValues)&&(m+="&acr_values="+encodeURIComponent(e.acrValues||i.acrValues)),i.pkceMethod){var f=u(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=f,m+="&code_challenge="+function(e,t){if("S256"!==e)throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return function(e){const t=String.fromCodePoint(...e);return btoa(t)}(new Uint8Array(vr.arrayBuffer(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(i.pkceMethod,f),m+="&code_challenge_method="+i.pkceMethod}return n.add(c),m},i.logout=function(e){return t.logout(e)},i.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??i.logoutMethod))return i.endpoints.logout();var n=i.endpoints.logout()+"?client_id="+encodeURIComponent(i.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return i.idToken&&(n+="&id_token_hint="+encodeURIComponent(i.idToken)),n},i.register=function(e){return t.register(e)},i.createRegisterUrl=function(e){return e||(e={}),e.action="register",i.createLoginUrl(e)},i.createAccountUrl=function(e){var n=h(),o=void 0;return void 0!==n&&(o=n+"/account?referrer="+encodeURIComponent(i.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},i.accountManagement=function(){return t.accountManagement()},i.hasRealmRole=function(e){var t=i.realmAccess;return!!t&&t.roles.indexOf(e)>=0},i.hasResourceRole=function(e,t){if(!i.resourceAccess)return!1;var n=i.resourceAccess[t||i.clientId];return!!n&&n.roles.indexOf(e)>=0},i.loadUserProfile=function(){var e=h()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.profile=JSON.parse(t.responseText),n.setSuccess(i.profile)):n.setError())},t.send(),n.promise},i.loadUserInfo=function(){var e=i.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.userInfo=JSON.parse(t.responseText),n.setSuccess(i.userInfo)):n.setError())},t.send(),n.promise},i.isTokenExpired=function(e){if(!i.tokenParsed||!i.refreshToken&&"implicit"!=i.flow)throw"Not authenticated";if(null==i.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=i.tokenParsed.exp-Math.ceil((new Date).getTime()/1e3)+i.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},i.updateToken=function(e){var t=y();if(!i.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):i.tokenParsed&&!i.isTokenExpired(e)||(n=!0,c("[KEYCLOAK] Refreshing token: token expired")),n){var r="grant_type=refresh_token&refresh_token="+i.refreshToken,a=i.endpoints.token();if(o.push(t),1==o.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,r+="&client_id="+encodeURIComponent(i.clientId);var l=(new Date).getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),l=(l+(new Date).getTime())/2;var e=JSON.parse(s.responseText);f(e.access_token,e.refresh_token,e.id_token,l),i.onAuthRefreshSuccess&&i.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else for(d("[KEYCLOAK] Failed to refresh token"),400==s.status&&i.clearToken(),i.onAuthRefreshError&&i.onAuthRefreshError(),t=o.pop();null!=t;t=o.pop())t.setError(!0)},s.send(r)}}else t.setSuccess(!1)};return r.enable?w().then((function(){n()})).catch((function(e){t.setError(e)})):n(),t.promise},i.clearToken=function(){i.token&&(f(null,null,null),i.onAuthLogout&&i.onAuthLogout(),i.loginRequired&&i.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=(new Date).getTime(),t=0;t<localStorage.length;t++){var n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var i=localStorage.getItem(n);if(i)try{var o=JSON.parse(i).expires;(!o||o<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,i=localStorage.getItem(n);return i&&(localStorage.removeItem(n),i=JSON.parse(i)),e(),i}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=(new Date).getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},A=function(){if(!(this instanceof A))return new A;var e=this;e.get=function(e){if(e){var o=n("kc-callback-"+e);return i("kc-callback-"+e,"",t(-100)),o?JSON.parse(o):void 0}},e.add=function(e){i("kc-callback-"+e.state,JSON.stringify(e),t(60))},e.removeItem=function(e){i(e,"",t(-100))};var t=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},n=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},i=function(e,t,n){var i=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=i}};function C(e){return function(){i.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var kr=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const Er=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=zo.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){e.getEventProvider()?this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return kr(this,void 0,void 0,(function*(){this.eventsConnected&&this._onEventsConnect()}))}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===zo.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case zo.DISCONNECTED:this._onEventsDisconnect();break;case zo.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return kr(this,void 0,void 0,(function*(){const t=!!this._attributeRefs,n=!!this._assetIds,i=this._attributeRefs?this._attributeRefs:this._assetIds;if(i&&i.length>0){if(this._subscriptionIds=[],n){const t=yield e.getEventProvider().subscribeAssetEvents(i,!0,(e=>this._onEvent(e))),n=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!Si(i,n))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}const o=yield e.getEventProvider().subscribeAttributeEvents(i,t,(e=>this._onEvent(e))),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!Si(i,r))return void e.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}}))}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach((t=>{e.getEventProvider().unsubscribe(t)})),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){Si(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){Si(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},Ar="#4d9d2a",Cr="#FFFFFF",Mr="#CCCCCC",Sr="#FFFFFF",Tr="#4c4c4c",Lr="0 1px 3px 0 rgba(0,0,0,0.21)";var Dr,Ir,Rr=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(Dr||(Dr={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(Ir||(Ir={}));class Or{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){const e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach((([t,n])=>{const i=n.roles;e.set(t,i)})):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){return this._config.managerUrl}get keycloakUrl(){return this._config.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return No}get language(){return dn.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(dn.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.updateKeycloakUserLanguage(e).catch((e=>console.error(e))))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(Ir.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||"openremote"}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;const e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){this._listeners.indexOf(e)<0&&this._listeners.push(e)}removeListener(e){const t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return Rr(this,void 0,void 0,(function*(){this._config&&console.debug("Already initialised"),this._config=function(e){const t=e?Object.assign({},e):{};return t.managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.keycloakUrl&&""!==t.keycloakUrl||(t.keycloakUrl=t.managerUrl+"/auth"),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId="openremote"),t}(e);let t=yield this.loadManagerInfo();const n=new Ui(this._config.realm,this._config.consoleAutoEnable,(()=>{this._emitEvent(Ir.CONSOLE_READY)}));if(this._console=n,"BASIC"===this._config.auth)t=(yield this.doTranslateInit())&&t,t=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){const e=new URL(this._config.managerUrl);let t;this._authServerUrl.startsWith("//")&&(this._authServerUrl=e.protocol+this._authServerUrl);try{t=new URL(this._authServerUrl)}catch(n){t=new URL(e),t.pathname=this._authServerUrl}t.protocol||(t.protocol=e.protocol),t.hostname||(t.hostname=e.hostname),t.port||(t.port=e.port),this._config.keycloakUrl=t.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),t=yield this.doAuthInit(),t||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",t=yield this.doAuthInit())}return!!t&&(t&&(t=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),t=(yield this.doTranslateInit())&&t,t&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(Ir.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)}))}loadManagerInfo(){return Rr(this,void 0,void 0,(function*(){try{const e=yield new Promise(((e,t)=>{const n=new XMLHttpRequest;n.addEventListener("load",(()=>{e(JSON.parse(n.responseText))})),n.addEventListener("error",(()=>{t(new Error("Failed to contact the manager"))})),n.open("GET",this._config.managerUrl+"/api/master/info"),n.send()}));return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(Dr.MANAGER_FAILED_TO_LOAD),!1}}))}doTranslateInit(){return Rr(this,void 0,void 0,(function*(){if(dn.isInitialized)return!0;dn.on("initialized",(e=>{this._emitEvent(Ir.TRANSLATE_INIT)})),dn.on("languageChanged",(e=>{Ai().locale(e),this._emitEvent(Ir.TRANSLATE_LANGUAGE_CHANGED)}));const e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,n)=>"uppercase"===t?e.toUpperCase():e instanceof Date?Ai()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(e);try{yield dn.use(cr).init(e)}catch(e){return console.error(e),this._setError(Dr.TRANSLATION_ERROR),!1}return!0}))}doDescriptorsInit(){return Rr(this,void 0,void 0,(function*(){if(!this.config.loadDescriptors)return!0;try{const e=yield No.api.AssetModelResource.getAssetInfos(),t=yield No.api.AssetModelResource.getMetaItemDescriptors(),n=yield No.api.AssetModelResource.getValueDescriptors();wi._assetTypeInfos=e.data,wi._metaItemDescriptors=Object.values(t.data),wi._valueDescriptors=Object.values(n.data)}catch(e){return console.error(e),!1}return!0}))}doAuthInit(){return Rr(this,void 0,void 0,(function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(Dr.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(No.addRequestInterceptor((e=>{if(!e.headers.Authorization){const t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e})),e)}))}doRestApiInit(){return No.setTimeout(2e4),No.initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return Rr(this,void 0,void 0,(function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new Uo(this._config.managerUrl),this._events.subscribeStatusChange((e=>this._onEventProviderStatusChanged(e))),e=yield this._events.connect()),e||this._setError(Dr.EVENTS_CONNECTION_ERROR),e}))}_connectEvents(){var e;(null===(e=this.events)||void 0===e?void 0:e.status)===zo.DISCONNECTED?this.events.connect().catch((e=>{console.error("Failed to connect EventProvider."),console.error(e)})):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(e){switch(e){case zo.DISCONNECTED:this._onDisconnect();break;case zo.CONNECTED:break;case zo.CONNECTING:this._emitEvent(Ir.CONNECTING)}}doConsoleInit(){return Rr(this,void 0,void 0,(function*(){try{return yield this.console.initialise(),this._emitEvent(Ir.CONSOLE_INIT),!0}catch(e){return this._setError(Dr.CONSOLE_ERROR),!1}}))}doIconInit(){var e;this._config.loadIcons&&(_r.addIconSet("mdi",(e=Pr.config.managerUrl,{getIconTemplate:e=>j`<span style="font-family: 'Material Design Icons';" class="mdi-${e}"></span>`,onAdd(){const t=document.createElement("style");t.id="mdiFontStyle",t.textContent='@font-face {\n font-family: "Material Design Icons";\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot");\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot") format("embedded-opentype"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff2") format("woff2"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff") format("woff"), url("'+e+'/shared/fonts/Material Design Icons//fonts/materialdesignicons-webfont.ttf") format("truetype");\n font-weight: normal;\n font-style: normal;\n}',document.head.appendChild(t)}})),_r.addIconSet("or",function(e,t){return{getIconTemplate:n=>{const i=t[n];return i?j`
|
|
61
|
+
`,he`${ue(gr)}`]}render(){return this._iconTemplate||j``}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(br.NAME,this._handler)}shouldUpdate(e){return e.has("icon")&&this._updateIcon(),!0}_updateIcon(){this._iconTemplate=void 0,window.removeEventListener(br.NAME,this._handler),this._iconTemplate=_r.getIconTemplate(this.icon),this.icon&&!this._iconTemplate&&window.addEventListener(br.NAME,this._handler)}};fr([Le({type:String,reflect:!0})],yr.prototype,"icon",void 0),fr([De()],yr.prototype,"_iconTemplate",void 0),yr=fr([Me("or-icon")],yr);var vr=o(95964);class xr extends Error{}function wr(e,t){if("string"!=typeof e)throw new xr("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,i=e.split(".")[n];if("string"!=typeof i)throw new xr(`Invalid token specified: missing part #${n+1}`);let o;try{o=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return atob(t)}}(i)}catch(e){throw new xr(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new xr(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(xr.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Fr(e){if(!(this instanceof Fr))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,i=this,o=[],r={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)-1===a[s].src.indexOf("keycloak.js")&&-1===a[s].src.indexOf("keycloak.min.js")||-1===a[s].src.indexOf("version=")||(i.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var l=!0,c=C(console.info),d=C(console.warn);function u(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=new Array(e);for(var i=0;i<t.length;i++)t[i]=Math.floor(256*Math.random());return t}(e),i=new Array(e),o=0;o<e;o++)i[o]=t.charCodeAt(n[o]%t.length);return String.fromCharCode.apply(null,i)}function h(){return void 0!==i.authServerUrl?"/"==i.authServerUrl.charAt(i.authServerUrl.length-1)?i.authServerUrl+"realms/"+encodeURIComponent(i.realm):i.authServerUrl+"/realms/"+encodeURIComponent(i.realm):void 0}function m(e,t){var n=e.code,o=e.error,r=e.prompt,a=(new Date).getTime();if(e.kc_action_status&&i.onActionUpdate&&i.onActionUpdate(e.kc_action_status),o)if("none"!=r)if(e.error_description&&"authentication_expired"===e.error_description)i.login(e.loginOptions);else{var s={error:o,error_description:e.error_description};i.onAuthError&&i.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();else if("standard"!=i.flow&&(e.access_token||e.id_token)&&m(e.access_token,null,e.id_token,!0),"implicit"!=i.flow&&n){var d="code="+n+"&grant_type=authorization_code",u=i.endpoints.token(),h=new XMLHttpRequest;h.open("POST",u,!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d+="&client_id="+encodeURIComponent(i.clientId),d+="&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(d+="&code_verifier="+e.pkceCodeVerifier),h.withCredentials=!0,h.onreadystatechange=function(){if(4==h.readyState)if(200==h.status){var e=JSON.parse(h.responseText);m(e.access_token,e.refresh_token,e.id_token,"standard"===i.flow),x()}else i.onAuthError&&i.onAuthError(),t&&t.setError()},h.send(d)}function m(n,o,r,s){f(n,o,r,a=(a+(new Date).getTime())/2),l&&i.idTokenParsed&&i.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),i.clearToken(),t&&t.setError()):s&&(i.onAuthSuccess&&i.onAuthSuccess(),t&&t.setSuccess())}}function p(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function f(e,t,n,o){if(i.tokenTimeoutHandle&&(clearTimeout(i.tokenTimeoutHandle),i.tokenTimeoutHandle=null),t?(i.refreshToken=t,i.refreshTokenParsed=wr(t)):(delete i.refreshToken,delete i.refreshTokenParsed),n?(i.idToken=n,i.idTokenParsed=wr(n)):(delete i.idToken,delete i.idTokenParsed),e){if(i.token=e,i.tokenParsed=wr(e),i.sessionId=i.tokenParsed.sid,i.authenticated=!0,i.subject=i.tokenParsed.sub,i.realmAccess=i.tokenParsed.realm_access,i.resourceAccess=i.tokenParsed.resource_access,o&&(i.timeSkew=Math.floor(o/1e3)-i.tokenParsed.iat),null!=i.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+i.timeSkew+" seconds"),i.onTokenExpired)){var r=1e3*(i.tokenParsed.exp-(new Date).getTime()/1e3+i.timeSkew);c("[KEYCLOAK] Token expires in "+Math.round(r/1e3)+" s"),r<=0?i.onTokenExpired():i.tokenTimeoutHandle=setTimeout(i.onTokenExpired,r)}}else delete i.token,delete i.tokenParsed,delete i.subject,delete i.realmAccess,delete i.resourceAccess,i.authenticated=!1}function g(){var e="0123456789abcdef",t=u(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function b(e){var t=function(e){var t;switch(i.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var n,o,r=e.indexOf("?"),a=e.indexOf("#");if("query"===i.responseMode&&-1!==r?(n=e.substring(0,r),""!==(o=_(e.substring(r+1,-1!==a?a:e.length),t)).paramsString&&(n+="?"+o.paramsString),-1!==a&&(n+=e.substring(a))):"fragment"===i.responseMode&&-1!==a&&(n=e.substring(0,a),""!==(o=_(e.substring(a+1),t)).paramsString&&(n+="#"+o.paramsString)),o&&o.oauthParams)if("standard"===i.flow||"hybrid"===i.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}else if("implicit"===i.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}(e);if(t){var o=n.get(t.state);return o&&(t.valid=!0,t.redirectUri=o.redirectUri,t.storedNonce=o.nonce,t.prompt=o.prompt,t.pkceCodeVerifier=o.pkceCodeVerifier,t.loginOptions=o.loginOptions),t}}function _(e,t){for(var n=e.split("&"),i={paramsString:"",oauthParams:{}},o=0;o<n.length;o++){var r=n[o].indexOf("="),a=n[o].slice(0,r);-1!==t.indexOf(a)?i.oauthParams[a]=n[o].slice(r+1):(""!==i.paramsString&&(i.paramsString+="&"),i.paramsString+=n[o])}return i}function y(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}function v(){var e=y();if(!r.enable)return e.setSuccess(),e.promise;if(r.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");r.iframe=t,t.onload=function(){var t=i.endpoints.authorize();"/"===t.charAt(0)?r.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):r.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var n=i.endpoints.checkSessionIframe();return t.setAttribute("src",n),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",(function(e){if(e.origin===r.iframeOrigin&&r.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&i.clearToken();for(var t=r.callbackList.splice(0,r.callbackList.length),n=t.length-1;n>=0;--n){var o=t[n];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}}),!1),e.promise}function x(){r.enable&&i.token&&setTimeout((function(){w().then((function(e){e&&x()}))}),1e3*r.interval)}function w(){var e=y();if(r.iframe&&r.iframeOrigin){var t=i.clientId+" "+(i.sessionId?i.sessionId:"");r.callbackList.push(e);var n=r.iframeOrigin;1==r.callbackList.length&&r.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function F(){var e=y();if(r.enable||i.silentCheckSsoRedirectUri){var t=document.createElement("iframe");t.setAttribute("src",i.endpoints.thirdPartyCookiesIframe()),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-3p-check-iframe"),t.style.display="none",document.body.appendChild(t);var n=function(o){t.contentWindow===o.source&&("supported"!==o.data&&"unsupported"!==o.data||("unsupported"===o.data&&(d("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),r.enable=!1,i.silentCheckSsoFallback&&(i.silentCheckSsoRedirectUri=!1)),document.body.removeChild(t),window.removeEventListener("message",n),e.setSuccess()))};window.addEventListener("message",n,!1)}else e.setSuccess();return function(e,t,n){var i=null,o=new Promise((function(e,n){i=setTimeout((function(){n({error:"Timeout when waiting for 3rd party check iframe message."})}),t)}));return Promise.race([e,o]).finally((function(){clearTimeout(i)}))}(e.promise,i.messageReceiveTimeout)}function k(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(i.createLoginUrl(e)),y().promise},logout:async function(e){if("GET"===(e?.logoutMethod??i.logoutMethod))return void window.location.replace(i.createLogoutUrl(e));const n=i.createLogoutUrl(e),o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:i.idToken,client_id:i.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected)window.location.href=o.url;else{if(!o.ok)throw new Error("Logout failed, request returned an error code.");window.location.reload()}},register:function(e){return window.location.assign(i.createRegisterUrl(e)),y().promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";return window.location.href=e,y().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:location.href}};if("cordova"==e){r.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},o=function(e){var t=function(e){return e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce((function(t,n){return t[n]=e.cordovaOptions[n],t}),{}):{}}(e);return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),function(e){return Object.keys(e).reduce((function(t,n){return t.push(n+"="+e[n]),t}),[]).join(",")}(t)},a=function(){return i.redirectUri||"http://localhost"};return{login:function(e){var t=y(),r=o(e),s=i.createLoginUrl(e),l=n(s,"_blank",r),c=!1,d=!1,u=function(){d=!0,l.close()};return l.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&(m(b(e.url),t),u(),c=!0)})),l.addEventListener("loaderror",(function(e){c||(0==e.url.indexOf(a())?(m(b(e.url),t),u(),c=!0):(t.setError(),u()))})),l.addEventListener("exit",(function(e){d||t.setError({reason:"closed_by_user"})})),t.promise},logout:function(e){var t,o=y(),r=i.createLogoutUrl(e),s=n(r,"_blank","location=no,hidden=yes,clearcache=yes");return s.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&s.close()})),s.addEventListener("loaderror",(function(e){0==e.url.indexOf(a())||(t=!0),s.close()})),s.addEventListener("exit",(function(e){t?o.setError():(i.clearToken(),o.setSuccess())})),o.promise},register:function(e){var t=y(),r=i.createRegisterUrl(),s=o(e),l=n(r,"_blank",s);return l.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&(l.close(),m(b(e.url),t))})),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";var t=n(e,"_blank","location=no");t.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&t.close()}))},redirectUri:function(e){return a()}}}if("cordova-native"==e)return r.enable=!1,{login:function(e){var t=y(),n=i.createLoginUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=y(),n=i.createLogoutUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),i.clearToken(),t.setSuccess()})),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=y(),n=i.createRegisterUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";window.cordova.plugins.browsertab.openUrl(e)},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}i.init=function(o){if(i.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");if(i.didInitialize=!0,i.authenticated=!1,n=function(){try{return new E}catch(e){}return new A}(),t=o&&["default","cordova","cordova-native"].indexOf(o.adapter)>-1?k(o.adapter):o&&"object"==typeof o.adapter?o.adapter:window.Cordova||window.cordova?k("cordova"):k(),o){if(void 0!==o.useNonce&&(l=o.useNonce),void 0!==o.checkLoginIframe&&(r.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(r.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(i.loginRequired=!0),o.responseMode){if("query"!==o.responseMode&&"fragment"!==o.responseMode)throw"Invalid value for responseMode";i.responseMode=o.responseMode}if(o.flow){switch(o.flow){case"standard":i.responseType="code";break;case"implicit":i.responseType="id_token token";break;case"hybrid":i.responseType="code id_token token";break;default:throw"Invalid value for flow"}i.flow=o.flow}if(null!=o.timeSkew&&(i.timeSkew=o.timeSkew),o.redirectUri&&(i.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(i.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?i.silentCheckSsoFallback=o.silentCheckSsoFallback:i.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);i.pkceMethod=o.pkceMethod}else i.pkceMethod="S256";"boolean"==typeof o.enableLogging?i.enableLogging=o.enableLogging:i.enableLogging=!1,"POST"===o.logoutMethod?i.logoutMethod="POST":i.logoutMethod="GET","string"==typeof o.scope&&(i.scope=o.scope),"string"==typeof o.acrValues&&(i.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?i.messageReceiveTimeout=o.messageReceiveTimeout:i.messageReceiveTimeout=1e4}i.responseMode||(i.responseMode="fragment"),i.responseType||(i.responseType="code",i.flow="standard");var a=y(),s=y();s.promise.then((function(){i.onReady&&i.onReady(i.authenticated),a.setSuccess(i.authenticated)})).catch((function(e){a.setError(e)}));var c=function(t){var n,o=y();function r(e){i.endpoints=e?{authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:{authorize:function(){return h()+"/protocol/openid-connect/auth"},token:function(){return h()+"/protocol/openid-connect/token"},logout:function(){return h()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=h()+"/protocol/openid-connect/login-status-iframe.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=h()+"/protocol/openid-connect/3p-cookies/step1.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},register:function(){return h()+"/protocol/openid-connect/registrations"},userinfo:function(){return h()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(n=e):n="keycloak.json",n)(l=new XMLHttpRequest).open("GET",n,!0),l.setRequestHeader("Accept","application/json"),l.onreadystatechange=function(){if(4==l.readyState)if(200==l.status||p(l)){var e=JSON.parse(l.responseText);i.authServerUrl=e["auth-server-url"],i.realm=e.realm,i.clientId=e.resource,r(null),o.setSuccess()}else o.setError()},l.send();else{if(!e.clientId)throw"clientId missing";i.clientId=e.clientId;var a=e.oidcProvider;if(a){var s,l;"string"==typeof a?(s="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",(l=new XMLHttpRequest).open("GET",s,!0),l.setRequestHeader("Accept","application/json"),l.onreadystatechange=function(){4==l.readyState&&(200==l.status||p(l)?(r(JSON.parse(l.responseText)),o.setSuccess()):o.setError())},l.send()):(r(a),o.setSuccess())}else{if(!e.url)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++)if(c[d].src.match(/.*keycloak\.js/)){e.url=c[d].src.substr(0,c[d].src.indexOf("/js/keycloak.js"));break}if(!e.realm)throw"realm missing";i.authServerUrl=e.url,i.realm=e.realm,r(null),o.setSuccess()}}return o.promise}();function d(){var e=function(e){e||(n.prompt="none"),o&&o.locale&&(n.locale=o.locale),i.login(n).then((function(){s.setSuccess()})).catch((function(e){s.setError(e)}))},t=function(){var e=document.createElement("iframe"),t=i.createLoginUrl({prompt:"none",redirectUri:i.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(m(b(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(o.onLoad){case"check-sso":r.enable?v().then((function(){w().then((function(n){n?s.setSuccess():i.silentCheckSsoRedirectUri?t():e(!1)})).catch((function(e){s.setError(e)}))})):i.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function u(){var e=b(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return v().then((function(){m(e,s)})).catch((function(e){s.setError(e)}));o?o.token&&o.refreshToken?(f(o.token,o.refreshToken,o.idToken),r.enable?v().then((function(){w().then((function(e){e?(i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess(),x()):s.setSuccess()})).catch((function(e){s.setError(e)}))})):i.updateToken(-1).then((function(){i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess()})).catch((function(e){i.onAuthError&&i.onAuthError(),o.onLoad?d():s.setError(e)}))):o.onLoad?d():s.setSuccess():s.setSuccess()}return c.then((function(){(function(){var e=y(),t=function(){"interactive"!==document.readyState&&"complete"!==document.readyState||(document.removeEventListener("readystatechange",t),e.setSuccess())};return document.addEventListener("readystatechange",t),t(),e.promise})().then(F).then(u).catch((function(e){a.setError(e)}))})),c.catch((function(e){a.setError(e)})),a.promise},i.login=function(e){return t.login(e)},i.createLoginUrl=function(e){var o,r=g(),a=g(),s=t.redirectUri(e),c={state:r,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),o=e&&"register"==e.action?i.endpoints.register():i.endpoints.authorize();var d=e&&e.scope||i.scope;d?-1===d.indexOf("openid")&&(d="openid "+d):d="openid";var h,m=o+"?client_id="+encodeURIComponent(i.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(r)+"&response_mode="+encodeURIComponent(i.responseMode)+"&response_type="+encodeURIComponent(i.responseType)+"&scope="+encodeURIComponent(d);if(l&&(m=m+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(m+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(m+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(m+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(m+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(m+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(m+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr){var p=(h={id_token:{acr:e.acr}},JSON.stringify(h));m+="&claims="+encodeURIComponent(p)}if((e&&e.acrValues||i.acrValues)&&(m+="&acr_values="+encodeURIComponent(e.acrValues||i.acrValues)),i.pkceMethod){var f=u(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=f,m+="&code_challenge="+function(e,t){if("S256"!==e)throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return function(e){const t=String.fromCodePoint(...e);return btoa(t)}(new Uint8Array(vr.arrayBuffer(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(i.pkceMethod,f),m+="&code_challenge_method="+i.pkceMethod}return n.add(c),m},i.logout=function(e){return t.logout(e)},i.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??i.logoutMethod))return i.endpoints.logout();var n=i.endpoints.logout()+"?client_id="+encodeURIComponent(i.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return i.idToken&&(n+="&id_token_hint="+encodeURIComponent(i.idToken)),n},i.register=function(e){return t.register(e)},i.createRegisterUrl=function(e){return e||(e={}),e.action="register",i.createLoginUrl(e)},i.createAccountUrl=function(e){var n=h(),o=void 0;return void 0!==n&&(o=n+"/account?referrer="+encodeURIComponent(i.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},i.accountManagement=function(){return t.accountManagement()},i.hasRealmRole=function(e){var t=i.realmAccess;return!!t&&t.roles.indexOf(e)>=0},i.hasResourceRole=function(e,t){if(!i.resourceAccess)return!1;var n=i.resourceAccess[t||i.clientId];return!!n&&n.roles.indexOf(e)>=0},i.loadUserProfile=function(){var e=h()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.profile=JSON.parse(t.responseText),n.setSuccess(i.profile)):n.setError())},t.send(),n.promise},i.loadUserInfo=function(){var e=i.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.userInfo=JSON.parse(t.responseText),n.setSuccess(i.userInfo)):n.setError())},t.send(),n.promise},i.isTokenExpired=function(e){if(!i.tokenParsed||!i.refreshToken&&"implicit"!=i.flow)throw"Not authenticated";if(null==i.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=i.tokenParsed.exp-Math.ceil((new Date).getTime()/1e3)+i.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},i.updateToken=function(e){var t=y();if(!i.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):i.tokenParsed&&!i.isTokenExpired(e)||(n=!0,c("[KEYCLOAK] Refreshing token: token expired")),n){var r="grant_type=refresh_token&refresh_token="+i.refreshToken,a=i.endpoints.token();if(o.push(t),1==o.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,r+="&client_id="+encodeURIComponent(i.clientId);var l=(new Date).getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),l=(l+(new Date).getTime())/2;var e=JSON.parse(s.responseText);f(e.access_token,e.refresh_token,e.id_token,l),i.onAuthRefreshSuccess&&i.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else for(d("[KEYCLOAK] Failed to refresh token"),400==s.status&&i.clearToken(),i.onAuthRefreshError&&i.onAuthRefreshError(),t=o.pop();null!=t;t=o.pop())t.setError(!0)},s.send(r)}}else t.setSuccess(!1)};return r.enable?w().then((function(){n()})).catch((function(e){t.setError(e)})):n(),t.promise},i.clearToken=function(){i.token&&(f(null,null,null),i.onAuthLogout&&i.onAuthLogout(),i.loginRequired&&i.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=(new Date).getTime(),t=0;t<localStorage.length;t++){var n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var i=localStorage.getItem(n);if(i)try{var o=JSON.parse(i).expires;(!o||o<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,i=localStorage.getItem(n);return i&&(localStorage.removeItem(n),i=JSON.parse(i)),e(),i}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=(new Date).getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},A=function(){if(!(this instanceof A))return new A;var e=this;e.get=function(e){if(e){var o=n("kc-callback-"+e);return i("kc-callback-"+e,"",t(-100)),o?JSON.parse(o):void 0}},e.add=function(e){i("kc-callback-"+e.state,JSON.stringify(e),t(60))},e.removeItem=function(e){i(e,"",t(-100))};var t=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},n=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},i=function(e,t,n){var i=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=i}};function C(e){return function(){i.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var kr=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const Er=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=zo.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){e.getEventProvider()?this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return kr(this,void 0,void 0,(function*(){this.eventsConnected&&this._onEventsConnect()}))}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===zo.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case zo.DISCONNECTED:this._onEventsDisconnect();break;case zo.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return kr(this,void 0,void 0,(function*(){const t=!!this._attributeRefs,n=!!this._assetIds,i=this._attributeRefs?this._attributeRefs:this._assetIds;if(i&&i.length>0){if(this._subscriptionIds=[],n){const t=yield e.getEventProvider().subscribeAssetEvents(i,!0,(e=>this._onEvent(e))),n=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!Si(i,n))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}const o=yield e.getEventProvider().subscribeAttributeEvents(i,t,(e=>this._onEvent(e))),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!Si(i,r))return void e.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}}))}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach((t=>{e.getEventProvider().unsubscribe(t)})),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){Si(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){Si(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},Ar="#4d9d2a",Cr="#FFFFFF",Mr="#CCCCCC",Sr="#FFFFFF",Tr="#4c4c4c",Lr="0 1px 3px 0 rgba(0,0,0,0.21)";var Dr,Ir,Rr=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(Dr||(Dr={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(Ir||(Ir={}));class Or{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){const e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach((([t,n])=>{const i=n.roles;e.set(t,i)})):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null===(e=this._config)||void 0===e?void 0:e.managerUrl}get keycloakUrl(){var e;return null===(e=this._config)||void 0===e?void 0:e.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return No}get language(){return dn.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(dn.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.updateKeycloakUserLanguage(e).catch((e=>console.error(e))))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(Ir.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||"openremote"}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;const e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){this._listeners.indexOf(e)<0&&this._listeners.push(e)}removeListener(e){const t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return Rr(this,void 0,void 0,(function*(){this._config&&console.debug("Already initialised"),this._config=function(e){const t=e?Object.assign({},e):{};return t.managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.keycloakUrl&&""!==t.keycloakUrl||(t.keycloakUrl=t.managerUrl+"/auth"),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId="openremote"),t}(e);let t=yield this.loadManagerInfo();const n=new Ui(this._config.realm,this._config.consoleAutoEnable,(()=>{this._emitEvent(Ir.CONSOLE_READY)}));if(this._console=n,"BASIC"===this._config.auth)t=(yield this.doTranslateInit())&&t,t=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){const e=new URL(this._config.managerUrl);let t;this._authServerUrl.startsWith("//")&&(this._authServerUrl=e.protocol+this._authServerUrl);try{t=new URL(this._authServerUrl)}catch(n){t=new URL(e),t.pathname=this._authServerUrl}t.protocol||(t.protocol=e.protocol),t.hostname||(t.hostname=e.hostname),t.port||(t.port=e.port),this._config.keycloakUrl=t.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),t=yield this.doAuthInit(),t||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",t=yield this.doAuthInit())}return!!t&&(t&&(t=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),t=(yield this.doTranslateInit())&&t,t&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(Ir.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)}))}loadManagerInfo(){return Rr(this,void 0,void 0,(function*(){try{const e=yield new Promise(((e,t)=>{const n=new XMLHttpRequest;n.addEventListener("load",(()=>{e(JSON.parse(n.responseText))})),n.addEventListener("error",(()=>{t(new Error("Failed to contact the manager"))})),n.open("GET",this._config.managerUrl+"/api/master/info"),n.send()}));return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(Dr.MANAGER_FAILED_TO_LOAD),!1}}))}doTranslateInit(){return Rr(this,void 0,void 0,(function*(){if(dn.isInitialized)return!0;dn.on("initialized",(e=>{this._emitEvent(Ir.TRANSLATE_INIT)})),dn.on("languageChanged",(e=>{Ai().locale(e),this._emitEvent(Ir.TRANSLATE_LANGUAGE_CHANGED)}));const e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,n)=>"uppercase"===t?e.toUpperCase():e instanceof Date?Ai()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(e);try{yield dn.use(cr).init(e)}catch(e){return console.error(e),this._setError(Dr.TRANSLATION_ERROR),!1}return!0}))}doDescriptorsInit(){return Rr(this,void 0,void 0,(function*(){if(!this.config.loadDescriptors)return!0;try{const e=yield No.api.AssetModelResource.getAssetInfos(),t=yield No.api.AssetModelResource.getMetaItemDescriptors(),n=yield No.api.AssetModelResource.getValueDescriptors();wi._assetTypeInfos=e.data,wi._metaItemDescriptors=Object.values(t.data),wi._valueDescriptors=Object.values(n.data)}catch(e){return console.error(e),!1}return!0}))}doAuthInit(){return Rr(this,void 0,void 0,(function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(Dr.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(No.addRequestInterceptor((e=>{if(!e.headers.Authorization){const t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e})),e)}))}doRestApiInit(){return No.setTimeout(2e4),No.initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return Rr(this,void 0,void 0,(function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new Uo(this._config.managerUrl),this._events.subscribeStatusChange((e=>this._onEventProviderStatusChanged(e))),e=yield this._events.connect()),e||this._setError(Dr.EVENTS_CONNECTION_ERROR),e}))}_connectEvents(){var e;(null===(e=this.events)||void 0===e?void 0:e.status)===zo.DISCONNECTED?this.events.connect().catch((e=>{console.error("Failed to connect EventProvider."),console.error(e)})):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(e){switch(e){case zo.DISCONNECTED:this._onDisconnect();break;case zo.CONNECTED:break;case zo.CONNECTING:this._emitEvent(Ir.CONNECTING)}}doConsoleInit(){return Rr(this,void 0,void 0,(function*(){try{return yield this.console.initialise(),this._emitEvent(Ir.CONSOLE_INIT),!0}catch(e){return this._setError(Dr.CONSOLE_ERROR),!1}}))}doIconInit(){var e;this._config.loadIcons&&(_r.addIconSet("mdi",(e=Pr.managerUrl,{getIconTemplate:e=>j`<span style="font-family: 'Material Design Icons';" class="mdi-${e}"></span>`,onAdd(){const t=document.createElement("style");t.id="mdiFontStyle",t.textContent='@font-face {\n font-family: "Material Design Icons";\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot");\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot") format("embedded-opentype"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff2") format("woff2"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff") format("woff"), url("'+e+'/shared/fonts/Material Design Icons//fonts/materialdesignicons-webfont.ttf") format("truetype");\n font-weight: normal;\n font-style: normal;\n}',document.head.appendChild(t)}})),_r.addIconSet("or",function(e,t){return{getIconTemplate:n=>{const i=t[n];return i?j`
|
|
62
62
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
63
63
|
viewBox="0 0 ${e} ${e}" preserveAspectRatio="xMidYMid meet" focusable="false">
|
|
64
64
|
${hr(i.startsWith("<")?i:'<path xmlns="http://www.w3.org/2000/svg" d="'+i+'" />')}
|
|
65
65
|
</svg>
|
|
66
|
-
`:j``},onAdd:void 0}}(mr,pr)))}getConsoleAppConfig(){return Rr(this,void 0,void 0,(function*(){try{const e=yield fetch(Pr.config.managerUrl+"/consoleappconfig/"+Pr.displayRealm+".json");return this._consoleAppConfig=yield e.json(),!0}catch(e){return!0}}))}getConsolePreferredLanguage(e=this.console){return Rr(this,void 0,void 0,(function*(){return e.retrieveData("LANGUAGE")}))}getUserPreferredLanguage(e=this._keycloak){return Rr(this,void 0,void 0,(function*(){if(e){const t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){const e=new Map(Object.entries(t.attributes));if(e.has("locale")){const t=e.get("locale");if("string"==typeof t[0])return t[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}}))}updateKeycloakUserLanguage(e,t=this._keycloak,n=this.rest){return Rr(this,void 0,void 0,(function*(){t&&(n?yield n.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}}):console.warn("Tried updating user language in keycloak, but the REST API is not initialized yet."))}))}logout(e){this._authenticated&&(this._authenticated=!0,this._keycloak?(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){const t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return Rr(this,void 0,void 0,(function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)}))}doBasicLogin(){var e,t,n,i;return Rr(this,void 0,void 0,(function*(){if(!this.config.basicLoginProvider)return;let o={username:(null===(e=this.config.credentials)||void 0===e?void 0:e.username)?null===(t=this.config.credentials)||void 0===t?void 0:t.username:"",password:(null===(n=this.config.credentials)||void 0===n?void 0:n.password)?null===(i=this.config.credentials)||void 0===i?void 0:i.password:"",cancel:!1},r=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!r;){if(o=yield this.config.basicLoginProvider(o.username,o.password),o.cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{const t=yield No.api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(!e){console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}{console.debug("Basic authentication successful"),r=!0;const e=yield No.api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}}r&&this._onAuthenticated()}))}isSuperUser(){return!(!this.getRealm()||"master"!==this.getRealm()||!this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole("restricted_user")}getApiBaseUrl(){let e=this._config.managerUrl;return e+="/api/"+this._config.realm+"/",e}getAppName(){const e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){const n=this.roles;return n&&n.has(t)&&n.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0,this._events||this.doEventsSubscriptionInit()}loadAndInitialiseKeycloak(){var e,t,n,i;return Rr(this,void 0,void 0,(function*(){try{this._keycloak=new Fr({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});const o=yield this._getNativeOfflineRefreshToken();let r=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!r&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,r=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(r)this._name=null===(e=this._keycloak.tokenParsed)||void 0===e?void 0:e.name,this._username=null===(t=this._keycloak.tokenParsed)||void 0===t?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&"Offline"===(null===(i=null===(n=this._keycloak)||void 0===n?void 0:n.refreshTokenParsed)||void 0===i?void 0:i.typ)&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(Dr.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}}))}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval((()=>Rr(this,void 0,void 0,(function*(){yield this._updateKeycloakAccessToken().catch((()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()}))}))),1e4))}_updateKeycloakAccessToken(){return Rr(this,void 0,void 0,(function*(){const e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e}))}_getNativeOfflineRefreshToken(){return Rr(this,void 0,void 0,(function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")}))}_emitEvent(e){window.setTimeout((()=>{const t=this._listeners;for(const n of t)n(e)}),0)}_setError(e){this._error=e,this._emitEvent(Ir.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null===(e=this.console)||void 0===e||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return Rr(this,void 0,void 0,(function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(Ir.OFFLINE),this.reconnect())}))}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(Ir.ONLINE)}reconnect(e=3e3){return Rr(this,void 0,void 0,(function*(){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);const t=yield(()=>Rr(this,void 0,void 0,(function*(){var e;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(e){const t=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=t;try{yield this._updateKeycloakAccessToken()}catch(e){return console.debug("Cannot update access token so sending to login"),void this.login()}return console.debug("Keycloak access token is valid"),!0}const t=this.events&&this.events.status===zo.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+t),!t||(yield null===(e=this.events)||void 0===e?void 0:e.connect())})))();return void 0!==t?t?void this._onReconnected():(e=Math.min(Or.MAX_RECONNECT_DELAY,e+3e3),console.debug("Scheduling another reconnect attempt in (ms): "+e),void(this._reconnectTimer=window.setTimeout((()=>this.reconnect(e)),e))):void 0}))}isKeycloakReachable(e=2e3){return Rr(this,void 0,void 0,(function*(){const t=new AbortController,n=setTimeout((()=>t.abort()),e);try{const e=this._keycloak.endpoints.token();return 200===(yield fetch(e,{method:"OPTIONS",signal:t.signal})).status}catch(e){return!1}finally{clearTimeout(n)}}))}}Or.MAX_RECONNECT_DELAY=45e3;const Pr=new Or,$r=Pr,Br=$e(class extends Be{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(n=this.nt)||void 0===n?void 0:n.has(e))&&this.it.add(e);return this.render(t)}const o=e.element.classList;this.it.forEach((e=>{e in t||(o.remove(e),this.it.delete(e))}));for(const e in t){const n=!!t[e];n===this.it.has(e)||(null===(i=this.nt)||void 0===i?void 0:i.has(e))||(n?(o.add(e),this.it.add(e)):(o.remove(e),this.it.delete(e)))}return Y}});function Nr(e,t,n){return e?t():null==n?void 0:n()}var zr=function(e,t){return zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},zr(e,t)};function jr(e,t){function n(){this.constructor=e}zr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Yr=function(){return Yr=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yr.apply(this,arguments)};function Hr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ur(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Vr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ur(arguments[t]));return e}var Wr=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),qr=function(){function e(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,Vr(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new Wr({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},e.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},e.prototype.emit=function(e,t,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,n,!1,t),this.root.dispatchEvent(i)},e}();function Gr(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}function Kr(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(Xr(n,t))return n;n=n.parentElement}return null}function Xr(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var Zr,Jr={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Qr=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Jr},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,i=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},t.prototype.setRequired=function(e){var n=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(Wr),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.shake=function(e){this.foundation.shake(e)},t.prototype.float=function(e){this.foundation.float(e)},t.prototype.setRequired=function(e){this.foundation.setRequired(e)},t.prototype.getWidth=function(){return this.foundation.getWidth()},t.prototype.getDefaultFoundation=function(){var e=this;return new Qr({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},getWidth:function(){return function(e){var t=e;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}(e.root)},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)}})},t}(qr),ta={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},na=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ta},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.activate=function(){this.adapter.removeClass(ta.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(ta.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(ta.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(ta.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(ta.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(ta.LINE_RIPPLE_DEACTIVATING))},t}(Wr),ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.setRippleCenter=function(e){this.foundation.setRippleCenter(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new na({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setStyle:function(t,n){return e.root.style.setProperty(t,n)},registerEventHandler:function(t,n){return e.listen(t,n)},deregisterEventHandler:function(t,n){return e.unlisten(t,n)}})},t}(qr),oa={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},ra={NOTCH_ELEMENT_PADDING:8},aa={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},sa=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return oa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return aa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ra},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),t.prototype.notch=function(e){var n=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=ra.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(n)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(Wr),la=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(oa.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+Qr.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(aa.OUTLINE_UPGRADED),requestAnimationFrame((function(){e.style.transitionDuration=""}))):this.root.classList.add(aa.NO_LABEL)},t.prototype.notch=function(e){this.foundation.notch(e)},t.prototype.closeNotch=function(){this.foundation.closeNotch()},t.prototype.getDefaultFoundation=function(){var e=this;return new sa({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNotchWidthProperty:function(t){return e.notchElement_.style.setProperty("width",t+"px")},removeNotchWidthProperty:function(){return e.notchElement_.style.removeProperty("width")}})},t}(qr),ca={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},da={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},ua={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},ha=["touchstart","pointerdown","mousedown","keydown"],ma=["touchend","pointerup","mouseup","contextmenu"],pa=[],fa=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(e){return i.activate_(e)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ca},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return da},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ua},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=t.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(o),e.adapter.isUnbounded()&&(e.adapter.addClass(r),e.layoutInternal_())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(o),e.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){e.layoutInternal_(),e.layoutFrame_=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple_=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(ha.forEach((function(e){t.adapter.registerInteractionHandler(e,t.activateHandler_)})),this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler_)),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):ma.forEach((function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)}))},t.prototype.deregisterRootHandlers_=function(){var e=this;ha.forEach((function(t){e.adapter.deregisterInteractionHandler(t,e.activateHandler_)})),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),ma.forEach((function(t){e.adapter.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)}))},t.prototype.removeCssVars_=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)}))},t.prototype.activate_=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;i&&void 0!==e&&i.type!==e.type||(n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type),void 0!==e&&pa.length>0&&pa.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState_():(void 0!==e&&(pa.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){pa=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())}))))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=t.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates_(),h=u.startPoint,m=u.endPoint;c=h.x+"px, "+h.y+"px",d=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout((function(){return e.activationTimerCallback_()}),l)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,o,r=t.x,a=t.y,s=r+n.left,l=a+n.top;if("touchstart"===e.type){var c=e;i=c.changedTouches[0].pageX-s,o=c.changedTouches[0].pageY-l}else{var d=e;i=d.pageX-s,o=d.pageY-l}return{x:i,y:o}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},{startPoint:e={x:e.x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState_,o=i.hasDeactivationUXRun,r=i.isActivated;(o||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout((function(){e.adapter.removeClass(n)}),ua.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return e.previousActivationEvent_=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var n=Yr({},t);t.isProgrammatic?(requestAnimationFrame((function(){return e.animateDeactivation_(n)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(n),e.resetActivationState_()})))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){this.frame_=this.adapter.computeBoundingRect();var e=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+t.numbers.PADDING;var n=Math.floor(e*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize_=n-1:this.initialSize_=n,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,o=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(r,this.fgScale_),this.adapter.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords_.top+"px"))},t}(Wr),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return jr(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var i=new t(e);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},t.createAdapter=function(e){return{addClass:function(t){return e.root.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n,i=window.CSS;if("boolean"==typeof Zr&&!t)return Zr;if(!i||"function"!=typeof i.supports)return!1;var o=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=o||r,t||(Zr=n),n}()},computeBoundingRect:function(){return e.root.getBoundingClientRect()},containsEventTarget:function(t){return e.root.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,Gr())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,Gr())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return Xr(e.root,":active")},isSurfaceDisabled:function(){return Boolean(e.disabled)},isUnbounded:function(){return Boolean(e.unbounded)},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,Gr())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,Gr())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root.classList.remove(t)},updateCssVariable:function(t,n){return e.root.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(e){this.unbounded_=Boolean(e),this.setUnbounded_()},enumerable:!0,configurable:!0}),t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getDefaultFoundation=function(){return new fa(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root;this.unbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded_=function(){this.foundation.setUnbounded(Boolean(this.unbounded_))},t}(qr),ba={ROOT:"mdc-text-field-character-counter"},_a={ROOT_SELECTOR:"."+ba.ROOT},ya=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ba},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return _a},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setCounterValue=function(e,t){e=Math.min(e,t),this.adapter.setContent(e+" / "+t)},t}(Wr),va=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new ya({setContent:function(t){e.root.textContent=t}})},t}(qr),xa={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},wa={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},Fa={LABEL_SCALE:.75},ka=["pattern","min","max","required","step","minlength","maxlength"],Ea=["color","date","datetime-local","month","range","time","week"],Aa=["mousedown","touchstart"],Ca=["click","keydown"],Ma=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return o.isFocused_=!1,o.receivedUserInput_=!1,o.isValid_=!0,o.useNativeValidation_=!0,o.validateOnValueChange_=!0,o.helperText_=i.helperText,o.characterCounter_=i.characterCounter,o.leadingIcon_=i.leadingIcon,o.trailingIcon_=i.trailingIcon,o.inputFocusHandler_=function(){return o.activateFocus()},o.inputBlurHandler_=function(){return o.deactivateFocus()},o.inputInputHandler_=function(){return o.handleInput()},o.setPointerXOffset_=function(e){return o.setTransformOrigin(e)},o.textFieldInteractionHandler_=function(){return o.handleTextFieldInteraction()},o.validationAttributeChangeHandler_=function(e){return o.handleValidationAttributeChange(e)},o}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return wa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return xa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Fa},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return Ea.indexOf(e)>=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.adapter.hasLabel()&&this.getNativeInput_().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler_():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating_(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler_),Aa.forEach((function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)})),Ca.forEach((function(t){e.adapter.registerTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)})),this.validationObserver_=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},t.prototype.destroy=function(){var e=this;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler_),Aa.forEach((function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)})),Ca.forEach((function(t){e.adapter.deregisterTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)})),this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput_=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return ka.indexOf(e)>-1&&(t.styleValidity_(!0),t.adapter.setLabelRequired(t.getNativeInput_().required),!0)})),e.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*Fa.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText_||!this.helperText_.isPersistent()&&this.helperText_.isValidation()&&this.isValid_||this.helperText_.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,n=t?t[0]:e,i=n.target.getBoundingClientRect(),o=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(o)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity_(e),this.styleFocused_(this.isFocused_),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},t.prototype.getValue=function(){return this.getNativeInput_().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput_().value=e),this.setCharacterCounter_(e.length),this.validateOnValueChange_){var t=this.isValid();this.styleValidity_(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.validateOnValueChange_&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},t.prototype.setValid=function(e){this.isValid_=e,this.styleValidity_(e);var t=!e&&!this.isFocused_&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange_=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange_},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation_=e},t.prototype.isDisabled=function(){return this.getNativeInput_().disabled},t.prototype.setDisabled=function(e){this.getNativeInput_().disabled=e,this.styleDisabled_(e)},t.prototype.setHelperTextContent=function(e){this.helperText_&&this.helperText_.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon_&&this.leadingIcon_.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon_&&this.trailingIcon_.setContent(e)},t.prototype.setCharacterCounter_=function(e){if(this.characterCounter_){var t=this.getNativeInput_().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(e,t)}},t.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},t.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},t.prototype.styleValidity_=function(e){var n=t.cssClasses.INVALID;if(e?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText_){if(this.helperText_.setValidity(e),!this.helperText_.isValidation())return;var i=this.helperText_.isVisible(),o=this.helperText_.getId();i&&o?this.adapter.setInputAttr(xa.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(xa.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused_=function(e){var n=t.cssClasses.FOCUSED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.styleDisabled_=function(e){var n=t.cssClasses,i=n.DISABLED,o=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon_&&this.leadingIcon_.setDisabled(e),this.trailingIcon_&&this.trailingIcon_.setDisabled(e)},t.prototype.styleFloating_=function(e){var n=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.getNativeInput_=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(Wr),Sa={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},Ta={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+Sa.ROOT},La=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Sa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ta},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(Ta.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(Sa.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(Sa.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(Sa.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(Sa.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(Sa.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(Sa.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(Ta.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(Sa.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(Sa.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(Ta.ROLE,"alert")):this.adapter.removeAttr(Ta.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(Ta.ARIA_HIDDEN,"true")},t}(Wr),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new La({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(qr),Ia={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},Ra={ROOT:"mdc-text-field__icon"},Oa=["click","keydown"],Pa=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return Ia},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Ra},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),Oa.forEach((function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)}))},t.prototype.destroy=function(){var e=this;Oa.forEach((function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)}))},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",Ia.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&(e.preventDefault(),this.adapter.notifyIconAction())},t}(Wr),$a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new Pa({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(Pa.strings.ICON_EVENT,{},!0)}})},t}(qr),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r,a){void 0===e&&(e=function(e,t){return new ga(e,t)}),void 0===t&&(t=function(e){return new ia(e)}),void 0===n&&(n=function(e){return new Da(e)}),void 0===i&&(i=function(e){return new va(e)}),void 0===o&&(o=function(e){return new $a(e)}),void 0===r&&(r=function(e){return new ea(e)}),void 0===a&&(a=function(e){return new la(e)}),this.input_=this.root.querySelector(xa.INPUT_SELECTOR);var s=this.root.querySelector(xa.LABEL_SELECTOR);this.label_=s?r(s):null;var l=this.root.querySelector(xa.LINE_RIPPLE_SELECTOR);this.lineRipple_=l?t(l):null;var c=this.root.querySelector(xa.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=La.strings,u=this.root.nextElementSibling,h=u&&u.classList.contains(wa.HELPER_LINE),m=h&&u&&u.querySelector(d.ROOT_SELECTOR);this.helperText_=m?n(m):null;var p=ya.strings,f=this.root.querySelector(p.ROOT_SELECTOR);!f&&h&&u&&(f=u.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=f?i(f):null;var g=this.root.querySelector(xa.LEADING_ICON_SELECTOR);this.leadingIcon_=g?o(g):null;var b=this.root.querySelector(xa.TRAILING_ICON_SELECTOR);this.trailingIcon_=b?o(b):null,this.prefix_=this.root.querySelector(xa.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(xa.SUFFIX_SELECTOR),this.ripple=this.createRipple_(e)},t.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),e.prototype.destroy.call(this)},t.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.input_.required},set:function(e){this.input_.required=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(e){this.input_.pattern=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(e){this.input_.minLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(e){e<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.input_.min},set:function(e){this.input_.min=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.input_.max},set:function(e){this.input_.max=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"step",{get:function(){return this.input_.step},set:function(e){this.input_.step=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconAriaLabel",{set:function(e){this.foundation.setTrailingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconContent",{set:function(e){this.foundation.setTrailingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useNativeValidation",{set:function(e){this.foundation.setUseNativeValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(e){this.prefix_&&(this.prefix_.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(e){this.suffix_&&(this.suffix_.textContent=e)},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.input_.focus()},t.prototype.layout=function(){var e=this.foundation.shouldFloat;this.foundation.notchOutline(e)},t.prototype.getDefaultFoundation=function(){var e=Yr(Yr(Yr(Yr(Yr({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_());return new Ma(e,this.getFoundationMap_())},t.prototype.getRootAdapterMethods_=function(){var e=this;return{addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},registerTextFieldInteractionHandler:function(t,n){e.listen(t,n)},deregisterTextFieldInteractionHandler:function(t,n){e.unlisten(t,n)},registerValidationAttributeChangeHandler:function(t){var n=new MutationObserver((function(e){return t(function(e){return e.map((function(e){return e.attributeName})).filter((function(e){return e}))}(e))}));return n.observe(e.input_,{attributes:!0}),n},deregisterValidationAttributeChangeHandler:function(e){e.disconnect()}}},t.prototype.getInputAdapterMethods_=function(){var e=this;return{getNativeInput:function(){return e.input_},setInputAttr:function(t,n){e.input_.setAttribute(t,n)},removeInputAttr:function(t){e.input_.removeAttribute(t)},isFocused:function(){return document.activeElement===e.input_},registerInputInteractionHandler:function(t,n){e.input_.addEventListener(t,n,Gr())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,Gr())}}},t.prototype.getLabelAdapterMethods_=function(){var e=this;return{floatLabel:function(t){return e.label_&&e.label_.float(t)},getLabelWidth:function(){return e.label_?e.label_.getWidth():0},hasLabel:function(){return Boolean(e.label_)},shakeLabel:function(t){return e.label_&&e.label_.shake(t)},setLabelRequired:function(t){return e.label_&&e.label_.setRequired(t)}}},t.prototype.getLineRippleAdapterMethods_=function(){var e=this;return{activateLineRipple:function(){e.lineRipple_&&e.lineRipple_.activate()},deactivateLineRipple:function(){e.lineRipple_&&e.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(t){e.lineRipple_&&e.lineRipple_.setRippleCenter(t)}}},t.prototype.getOutlineAdapterMethods_=function(){var e=this;return{closeOutline:function(){return e.outline_&&e.outline_.closeNotch()},hasOutline:function(){return Boolean(e.outline_)},notchOutline:function(t){return e.outline_&&e.outline_.notch(t)}}},t.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundationForTextField:void 0,helperText:this.helperText_?this.helperText_.foundationForTextField:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundationForTextField:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundationForTextField:void 0}},t.prototype.createRipple_=function(e){var t=this,n=this.root.classList.contains(wa.TEXTAREA),i=this.root.classList.contains(wa.OUTLINED);if(n||i)return null;var o=Yr(Yr({},ga.createAdapter(this)),{isSurfaceActive:function(){return Xr(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,Gr())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,Gr())}});return e(this.root,new fa(o))},t}(qr),Na={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},za={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function ja(e){return Boolean(e.document)&&"function"==typeof e.document.createElement}function Ya(e,t){if(ja(e)&&t in Na){var n=e.document.createElement("div"),i=Na[t],o=i.standard,r=i.prefixed;return o in n.style?o:r}return t}function Ha(e,t){if(ja(e)&&t in za){var n=e.document.createElement("div"),i=za[t],o=i.standard,r=i.prefixed;return i.cssProperty in n.style?o:r}return t}var Ua={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},Va={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},Wa={ANIM_END_LATCH_MS:250},qa=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.currentCheckState_=Va.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ua},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Va},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Wa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter.addClass(Ua.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Ua.DISABLED):this.adapter.removeClass(Ua.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout((function(){e.adapter.removeClass(e.currentAnimationClass_),e.enableAnimationEndHandler_=!1}),Wa.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState_()},t.prototype.transitionCheckState_=function(){if(this.adapter.hasNativeControl()){var e=this.currentCheckState_,t=this.determineCheckState_();if(e!==t){this.updateAriaChecked_();var n=Ua.SELECTED;t===Va.TRANSITION_STATE_UNCHECKED?this.adapter.removeClass(n):this.adapter.addClass(n),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter.forceLayout(),this.adapter.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(e,t),this.currentCheckState_=t,this.adapter.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},t.prototype.determineCheckState_=function(){var e=Va.TRANSITION_STATE_INDETERMINATE,t=Va.TRANSITION_STATE_CHECKED,n=Va.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=Va.TRANSITION_STATE_INIT,o=Va.TRANSITION_STATE_CHECKED,r=Va.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,l=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,u=a.ANIM_INDETERMINATE_CHECKED,h=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:return n===r?"":n===o?u:h;case r:return n===o?s:l;case o:return n===r?c:d;default:return n===o?u:h}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(Va.ARIA_CHECKED_ATTR,Va.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(Va.ARIA_CHECKED_ATTR)},t}(Wr),Ga=["checked","indeterminate"],Ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.nativeControl_.checked=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indeterminate",{get:function(){return this.nativeControl_.indeterminate},set:function(e){this.nativeControl_.indeterminate=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.nativeControl_.value},set:function(e){this.nativeControl_.value=e},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){var e=Va.DATA_INDETERMINATE_ATTR;this.nativeControl_.indeterminate="true"===this.nativeControl_.getAttribute(e),this.nativeControl_.removeAttribute(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleChange_=function(){return e.foundation.handleChange()},this.handleAnimationEnd_=function(){return e.foundation.handleAnimationEnd()},this.nativeControl_.addEventListener("change",this.handleChange_),this.listen(Ha(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(Ha(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new qa({addClass:function(t){return e.root.classList.add(t)},forceLayout:function(){return e.root.offsetWidth},hasNativeControl:function(){return!!e.nativeControl_},isAttachedToDOM:function(){return Boolean(e.root.parentNode)},isChecked:function(){return e.checked},isIndeterminate:function(){return e.indeterminate},removeClass:function(t){e.root.classList.remove(t)},removeNativeControlAttr:function(t){e.nativeControl_.removeAttribute(t)},setNativeControlAttr:function(t,n){e.nativeControl_.setAttribute(t,n)},setNativeControlDisabled:function(t){e.nativeControl_.disabled=t}})},t.prototype.createRipple_=function(){var e=this,t=Yr(Yr({},ga.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,Gr())},isSurfaceActive:function(){return Xr(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,Gr())}});return new ga(this.root,new fa(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);Ga.forEach((function(i){var o=Object.getOwnPropertyDescriptor(n,i);if(Xa(o)){var r=o.get,a={configurable:o.configurable,enumerable:o.enumerable,get:r,set:function(n){o.set.call(t,n),e.foundation.handleChange()}};Object.defineProperty(t,i,a)}}))},t.prototype.uninstallPropertyChangeHooks_=function(){var e=this.nativeControl_,t=Object.getPrototypeOf(e);Ga.forEach((function(n){var i=Object.getOwnPropertyDescriptor(t,n);Xa(i)&&Object.defineProperty(e,n,i)}))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=Va.NATIVE_CONTROL_SELECTOR,t=this.root.querySelector(e);if(!t)throw new Error("Checkbox component requires a "+e+" element");return t},enumerable:!0,configurable:!0}),t}(qr);function Xa(e){return!!e&&"function"==typeof e.set}var Za,Ja,Qa={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},es={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},ts=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return es},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Qa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked_(e),this.updateCheckedStyling_(e)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Qa.DISABLED):this.adapter.removeClass(Qa.DISABLED)},t.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked_(t.checked),this.updateCheckedStyling_(t.checked)},t.prototype.updateCheckedStyling_=function(e){e?this.adapter.addClass(Qa.CHECKED):this.adapter.removeClass(Qa.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(es.ARIA_CHECKED_ATTR,""+!!e)},t}(Wr),ns=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.changeHandler_)},t.prototype.initialSyncWithDOM=function(){var e=this;this.changeHandler_=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(t=e.foundation).handleChange.apply(t,Vr(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new ts({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNativeControlChecked:function(t){return e.nativeControl_.checked=t},setNativeControlDisabled:function(t){return e.nativeControl_.disabled=t},setNativeControlAttr:function(t,n){return e.nativeControl_.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.foundation.setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple_=function(){var e=this,t=ts.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=Yr(Yr({},ga.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,Gr())},isSurfaceActive:function(){return Xr(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,Gr())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new ga(this.root,new fa(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=ts.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(qr),is="mdc-slider--disabled",os="mdc-slider__thumb",rs="mdc-slider__thumb--top",as="mdc-slider__thumb--with-indicator",ss="mdc-slider__tick-marks",ls="mdc-slider__tick-mark--active",cs="mdc-slider__tick-mark--inactive",ds="disabled",us="min",hs="max",ms="value",ps="step";!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(Za||(Za={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(Ja||(Ja={}));var fs,gs,bs="undefined"!=typeof window,_s=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=1,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return jr(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDisabled=this.adapter.hasClass(is),this.isDiscrete=this.adapter.hasClass("mdc-slider--discrete"),this.hasTickMarks=this.adapter.hasClass("mdc-slider--tick-marks"),this.isRange=this.adapter.hasClass("mdc-slider--range");var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(us,this.isRange?Ja.START:Ja.END),us),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(hs,Ja.END),hs),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(ms,Ja.END),ms),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(ms,Ja.START),ms):t;this.validateProperties({min:t,max:n,value:i,valueStart:o}),this.min=t,this.max=n,this.value=i,this.valueStart=o,this.valueBeforeDownEvent=i,this.valueStartBeforeDownEvent=o;var r=this.adapter.getInputAttribute(ps,Ja.END);if(r&&(this.step=this.convertAttributeValueToNumber(r,ps)),this.step<=0)throw new Error("MDCSliderFoundation: step must be a positive number. Current step: "+this.step);this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){e.handleInputChange(Ja.START)},this.inputEndChangeListener=function(){e.handleInputChange(Ja.END)},this.inputStartFocusListener=function(){e.handleInputFocus(Ja.START)},this.inputEndFocusListener=function(){e.handleInputFocus(Ja.END)},this.inputStartBlurListener=function(){e.handleInputBlur(Ja.START)},this.inputEndBlurListener=function(){e.handleInputBlur(Ja.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},t.prototype.destroy=function(){this.deregisterEventHandlers()},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){if(this.isRange&&e<this.valueStart)throw new Error("end thumb value ("+e+") must be >= start thumb value ("+this.valueStart+")");this.updateValue(e,Ja.END)},t.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},t.prototype.setValueStart=function(e){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&e>this.value)throw new Error("start thumb value ("+e+") must be <= end thumb value ("+this.value+")");this.updateValue(e,Ja.START)},t.prototype.getStep=function(){return this.step},t.prototype.getDisabled=function(){return this.isDisabled},t.prototype.setDisabled=function(e){this.isDisabled=e,e?(this.adapter.addClass(is),this.isRange&&this.adapter.setInputAttribute(ds,"",Ja.START),this.adapter.setInputAttribute(ds,"",Ja.END)):(this.adapter.removeClass(is),this.isRange&&this.adapter.removeInputAttribute(ds,Ja.START),this.adapter.removeInputAttribute(ds,Ja.END))},t.prototype.getIsRange=function(){return this.isRange},t.prototype.layout=function(e){var t=(void 0===e?{}:e).skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(Ja.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(Ja.END)),t||this.updateUI()},t.prototype.handleResize=function(){this.layout()},t.prototype.handleDown=function(e){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX;this.downEventClientX=t;var n=this.mapClientXOnSliderScale(t);this.thumb=this.getThumbFromDownEvent(t,n),null!==this.thumb&&(this.handleDragStart(e,n,this.thumb),this.isRange&&n>=this.valueStart&&n<=this.value||this.updateValue(n,this.thumb,{emitInputEvent:!0}))}},t.prototype.handleMove=function(e){if(!this.isDisabled){e.preventDefault();var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX,n=null!=this.thumb;if(this.thumb=this.getThumbFromMoveEvent(t),null!==this.thumb){var i=this.mapClientXOnSliderScale(t);n||(this.handleDragStart(e,i,this.thumb),this.adapter.emitDragStartEvent(i,this.thumb)),this.updateValue(i,this.thumb,{emitInputEvent:!0})}}},t.prototype.handleUp=function(){if(!this.isDisabled&&null!==this.thumb){var e=this.thumb===Ja.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===Ja.START?this.valueStart:this.value;e!==t&&this.adapter.emitChangeEvent(t,this.thumb),this.adapter.emitDragEndEvent(t,this.thumb),this.thumb=null}},t.prototype.handleThumbMouseenter=function(){this.isDiscrete&&this.isRange&&(this.adapter.addThumbClass(as,Ja.START),this.adapter.addThumbClass(as,Ja.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(Ja.START)||this.adapter.isInputFocused(Ja.END)||(this.adapter.removeThumbClass(as,Ja.START),this.adapter.removeThumbClass(as,Ja.END)))},t.prototype.handleMousedownOrTouchstart=function(e){var t=this,n="mousedown"===e.type?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(n,this.moveListener);var i=function(){t.handleUp(),t.adapter.deregisterBodyEventHandler(n,t.moveListener),t.adapter.deregisterEventHandler("mouseup",i),t.adapter.deregisterEventHandler("touchend",i)};this.adapter.registerBodyEventHandler("mouseup",i),this.adapter.registerBodyEventHandler("touchend",i),this.handleDown(e)},t.prototype.handlePointerdown=function(e){this.adapter.setPointerCapture(e.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(e)},t.prototype.handleInputChange=function(e){var t=Number(this.adapter.getInputValue(e));e===Ja.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(as,e),this.isRange)){var t=e===Ja.START?Ja.END:Ja.START;this.adapter.addThumbClass(as,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(as,e),this.isRange)){var t=e===Ja.START?Ja.END:Ja.START;this.adapter.removeThumbClass(as,t)}},t.prototype.handleDragStart=function(e,t,n){this.adapter.focusInput(n),e.preventDefault(),this.adapter.emitDragStartEvent(t,n)},t.prototype.getThumbFromDownEvent=function(e,t){if(!this.isRange)return Ja.END;var n=this.adapter.getThumbBoundingClientRect(Ja.START),i=this.adapter.getThumbBoundingClientRect(Ja.END),o=e>=n.left&&e<=n.right,r=e>=i.left&&e<=i.right;return o&&r?null:o?Ja.START:r?Ja.END:t<this.valueStart?Ja.START:t>this.value?Ja.END:null},t.prototype.getThumbFromMoveEvent=function(e){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw new Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-e)<5?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?Ja.END:Ja.START:this.adapter.isRTL()?Ja.START:Ja.END},t.prototype.updateUI=function(e){this.updateThumbAndInputAttributes(e),this.updateThumbAndTrackUI(e),this.updateValueIndicatorUI(e),this.updateTickMarksUI()},t.prototype.updateThumbAndInputAttributes=function(e){if(e){var t=this.isRange&&e===Ja.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(ms,n,e),this.isRange&&e===Ja.START?this.adapter.setInputAttribute(us,n,Ja.END):this.isRange&&e===Ja.END&&this.adapter.setInputAttribute(hs,n,Ja.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute("aria-valuetext",i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===Ja.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===Ja.START?Ja.START:Ja.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,Ja.START)}},t.prototype.updateTickMarksUI=function(){if(this.isDiscrete&&this.hasTickMarks){var e=(this.valueStart-this.min)/this.step,t=(this.value-this.valueStart)/this.step+1,n=(this.max-this.value)/this.step,i=Array.from({length:e}).fill(Za.INACTIVE),o=Array.from({length:t}).fill(Za.ACTIVE),r=Array.from({length:n}).fill(Za.INACTIVE);this.adapter.updateTickMarks(i.concat(o).concat(r))}},t.prototype.mapClientXOnSliderScale=function(e){var t=(e-this.rect.left)/this.rect.width;this.adapter.isRTL()&&(t=1-t);var n=this.min+t*(this.max-this.min);return n===this.max||n===this.min?n:this.quantize(n)},t.prototype.updateValue=function(e,t,n){var i=void 0===n?{}:n,o=i.emitInputEvent,r=i.emitChangeEvent;if(e=this.clampValue(e,t),this.isRange&&t===Ja.START){if(this.valueStart===e)return;this.valueStart=e}else{if(this.value===e)return;this.value=e}this.updateUI(t),o&&this.adapter.emitInputEvent(t===Ja.START?this.valueStart:this.value,t),r&&this.adapter.emitChangeEvent(t===Ja.START?this.valueStart:this.value,t)},t.prototype.quantize=function(e){return Math.round(e/this.step)*this.step},t.prototype.clampValue=function(e,t){return e=Math.min(Math.max(e,this.min),this.max),this.isRange&&t===Ja.START&&e>this.value?this.value:this.isRange&&t===Ja.END&&e<this.valueStart?this.valueStart:e},t.prototype.updateThumbAndTrackUI=function(e){var t=this,n=this.max,i=this.min,o=(this.value-this.valueStart)/(n-i),r=o*this.rect.width,a=this.adapter.isRTL(),s=bs?Ya(window,"transform"):"transform";if(this.isRange){var l=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,c=l+r;requestAnimationFrame((function(){!a&&e===Ja.START||a&&e!==Ja.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-c+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",l+"px")),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")");var n=a?c:l,i=t.adapter.isRTL()?l:c;e!==Ja.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+n+"px)",Ja.START),e!==Ja.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+i+"px)",Ja.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)}))}else requestAnimationFrame((function(){var e=a?t.rect.width-r:r;t.adapter.setThumbStyleProperty(s,"translateX("+e+"px)",Ja.END),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")"),t.removeInitialStyles(a)}))},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,Ja.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,Ja.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=bs?Ya(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,Ja.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,Ja.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame((function(){e.adapter.removeThumbStyleProperty(t,Ja.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,Ja.START)}))}},t.prototype.updateOverlappingThumbsUI=function(e,t,n){var i=!1;if(this.adapter.isRTL()){var o=e-this.startThumbKnobWidth/2;i=t+this.endThumbKnobWidth/2>=o}else i=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2;i?(this.adapter.addThumbClass(rs,n||Ja.END),this.adapter.removeThumbClass(rs,n===Ja.START?Ja.END:Ja.START)):(this.adapter.removeThumbClass(rs,Ja.START),this.adapter.removeThumbClass(rs,Ja.END))},t.prototype.convertAttributeValueToNumber=function(e,t){if(null===e)throw new Error("MDCSliderFoundation: `"+t+"` must be non-null.");var n=Number(e);if(isNaN(n))throw new Error("MDCSliderFoundation: `"+t+"` value is `"+e+"`, but must be a number.");return n},t.prototype.validateProperties=function(e){var t=e.min,n=e.max,i=e.value,o=e.valueStart;if(t>=n)throw new Error("MDCSliderFoundation: min must be strictly less than max. Current: [min: "+t+", max: "+n+"]");if(this.isRange){if(i<t||i>n||o<t||o>n)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+o+", end value: "+i+"]");if(o>i)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+o+", end value: "+i+"]")}else if(i<t||i>n)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current value: "+i)},t.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(Ja.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(Ja.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(Ja.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(Ja.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(Ja.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(Ja.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(Ja.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(Ja.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(Ja.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(Ja.END,"blur",this.inputEndBlurListener)},t.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(Ja.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(Ja.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(Ja.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(Ja.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(Ja.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(Ja.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(Ja.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(Ja.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(Ja.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(Ja.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=bs&&Boolean(window.PointerEvent),t}(Wr),ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return jr(t,e),t.attachTo=function(e,n){return void 0===n&&(n={}),new t(e,void 0,n)},t.prototype.getDefaultFoundation=function(){var e=this;return new _s({hasClass:function(t){return e.root.classList.contains(t)},addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},addThumbClass:function(t,n){e.getThumbEl(n).classList.add(t)},removeThumbClass:function(t,n){e.getThumbEl(n).classList.remove(t)},getAttribute:function(t){return e.root.getAttribute(t)},getInputValue:function(t){return e.getInput(t).value},setInputValue:function(t,n){e.getInput(n).value=t},getInputAttribute:function(t,n){return e.getInput(n).getAttribute(t)},setInputAttribute:function(t,n,i){e.getInput(i).setAttribute(t,n)},removeInputAttribute:function(t,n){e.getInput(n).removeAttribute(t)},focusInput:function(t){e.getInput(t).focus()},isInputFocused:function(t){return e.getInput(t)===document.activeElement},getThumbKnobWidth:function(t){return e.getThumbEl(t).querySelector(".mdc-slider__thumb-knob").getBoundingClientRect().width},getThumbBoundingClientRect:function(t){return e.getThumbEl(t).getBoundingClientRect()},getBoundingClientRect:function(){return e.root.getBoundingClientRect()},isRTL:function(){return"rtl"===getComputedStyle(e.root).direction},setThumbStyleProperty:function(t,n,i){e.getThumbEl(i).style.setProperty(t,n)},removeThumbStyleProperty:function(t,n){e.getThumbEl(n).style.removeProperty(t)},setTrackActiveStyleProperty:function(t,n){e.trackActive.style.setProperty(t,n)},removeTrackActiveStyleProperty:function(t){e.trackActive.style.removeProperty(t)},setValueIndicatorText:function(t,n){e.getThumbEl(n).querySelector(".mdc-slider__value-indicator-text").textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+ss);n||((n=document.createElement("div")).classList.add(ss),e.root.querySelector(".mdc-slider__track").appendChild(n)),t.length!==n.children.length?(n.innerHTML="",e.addTickMarks(n,t)):e.updateTickMarks(n,t)},setPointerCapture:function(t){e.root.setPointerCapture(t)},emitChangeEvent:function(t,n){e.emit("MDCSlider:change",{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit("MDCSlider:input",{value:t,thumb:n})},emitDragStartEvent:function(t,n){e.getRipple(n).activate()},emitDragEndEvent:function(t,n){e.getRipple(n).deactivate()},registerEventHandler:function(t,n){e.listen(t,n)},deregisterEventHandler:function(t,n){e.unlisten(t,n)},registerThumbEventHandler:function(t,n,i){e.getThumbEl(t).addEventListener(n,i)},deregisterThumbEventHandler:function(t,n,i){e.getThumbEl(t).removeEventListener(n,i)},registerInputEventHandler:function(t,n,i){e.getInput(t).addEventListener(n,i)},deregisterInputEventHandler:function(t,n,i){e.getInput(t).removeEventListener(n,i)},registerBodyEventHandler:function(e,t){document.body.addEventListener(e,t)},deregisterBodyEventHandler:function(e,t){document.body.removeEventListener(e,t)},registerWindowEventHandler:function(e,t){window.addEventListener(e,t)},deregisterWindowEventHandler:function(e,t){window.removeEventListener(e,t)}})},t.prototype.initialize=function(e){var t=(void 0===e?{}:e).skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll(".mdc-slider__input")),this.thumbs=[].slice.call(this.root.querySelectorAll("."+os)),this.trackActive=this.root.querySelector(".mdc-slider__track--active_fill"),this.ripples=this.createRipples(),t&&(this.skipInitialUIUpdate=!0)},t.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getValueStart=function(){return this.foundation.getValueStart()},t.prototype.setValueStart=function(e){this.foundation.setValueStart(e)},t.prototype.getValue=function(){return this.foundation.getValue()},t.prototype.setValue=function(e){this.foundation.setValue(e)},t.prototype.getDisabled=function(){return this.foundation.getDisabled()},t.prototype.setDisabled=function(e){this.foundation.setDisabled(e)},t.prototype.setValueToAriaValueTextFn=function(e){this.valueToAriaValueTextFn=e},t.prototype.getThumbEl=function(e){return e===Ja.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===Ja.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===Ja.END?this.ripples[this.ripples.length-1]:this.ripples[0]},t.prototype.addTickMarks=function(e,t){for(var n=document.createDocumentFragment(),i=0;i<t.length;i++){var o=document.createElement("div"),r=t[i]===Za.ACTIVE?ls:cs;o.classList.add(r),n.appendChild(o)}e.appendChild(n)},t.prototype.updateTickMarks=function(e,t){for(var n=Array.from(e.children),i=0;i<n.length;i++)t[i]===Za.ACTIVE?(n[i].classList.add(ls),n[i].classList.remove(cs)):(n[i].classList.add(cs),n[i].classList.remove(ls))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+os)),n=function(n){var o=t[n],r=i.inputs[n],a=Yr(Yr({},ga.createAdapter(i)),{addClass:function(e){o.classList.add(e)},computeBoundingRect:function(){return o.getBoundingClientRect()},deregisterInteractionHandler:function(e,t){r.removeEventListener(e,t)},isSurfaceActive:function(){return Xr(r,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,t){r.addEventListener(e,t)},removeClass:function(e){o.classList.remove(e)},updateCssVariable:function(e,t){o.style.setProperty(e,t)}}),s=new ga(o,new fa(a));s.unbounded=!0,e.push(s)},i=this,o=0;o<t.length;o++)n(o);return e},t}(qr),vs={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},xs={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},ws={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(fs||(fs={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(gs||(gs={}));var Fs={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},ks={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+Fs.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+Fs.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+Fs.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+Fs.LIST_ITEM_CLASS+" a,\n ."+Fs.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+Fs.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},Es={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},As={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape"},Cs=new Set;Cs.add(As.BACKSPACE),Cs.add(As.ENTER),Cs.add(As.SPACEBAR),Cs.add(As.PAGE_UP),Cs.add(As.PAGE_DOWN),Cs.add(As.END),Cs.add(As.HOME),Cs.add(As.ARROW_LEFT),Cs.add(As.ARROW_UP),Cs.add(As.ARROW_RIGHT),Cs.add(As.ARROW_DOWN),Cs.add(As.DELETE),Cs.add(As.ESCAPE);var Ms=new Map;Ms.set(8,As.BACKSPACE),Ms.set(13,As.ENTER),Ms.set(32,As.SPACEBAR),Ms.set(33,As.PAGE_UP),Ms.set(34,As.PAGE_DOWN),Ms.set(35,As.END),Ms.set(36,As.HOME),Ms.set(37,As.ARROW_LEFT),Ms.set(38,As.ARROW_UP),Ms.set(39,As.ARROW_RIGHT),Ms.set(40,As.ARROW_DOWN),Ms.set(46,As.DELETE),Ms.set(27,As.ESCAPE);var Ss=new Set;function Ts(e){var t=e.key;return Cs.has(t)?t:Ms.get(e.keyCode)||As.UNKNOWN}Ss.add(As.PAGE_UP),Ss.add(As.PAGE_DOWN),Ss.add(As.END),Ss.add(As.HOME),Ss.add(As.ARROW_LEFT),Ss.add(As.ARROW_UP),Ss.add(As.ARROW_RIGHT),Ss.add(As.ARROW_DOWN);var Ls=["input","button","textarea","select"],Ds=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===Ls.indexOf(n)&&e.preventDefault()}};function Is(e,t){var n,i=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,l=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout((function(){Os(t)}),Es.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,n=1===t.typeaheadBuffer.length?function(e,t,n,i){var o=i.typeaheadBuffer[0],r=e.get(o);if(!r)return-1;if(o===i.currentFirstChar&&r[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%r.length;var a=r[i.sortedIndexCursor].index;if(!n(a))return a}i.currentFirstChar=o;var s,l=-1;for(s=0;s<r.length;s++)if(!n(r[s].index)){l=s;break}for(;s<r.length;s++)if(r[s].index>t&&!n(r[s].index)){l=s;break}return-1!==l?(i.sortedIndexCursor=l,r[i.sortedIndexCursor].index):-1}(r,a,l,t):function(e,t,n){var i=n.typeaheadBuffer[0],o=e.get(i);if(!o)return-1;var r=o[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(r.index))return r.index;for(var a=(n.sortedIndexCursor+1)%o.length,s=-1;a!==n.sortedIndexCursor;){var l=o[a],c=0===l.text.lastIndexOf(n.typeaheadBuffer,0),d=!t(l.index);if(c&&d){s=a;break}a=(a+1)%o.length}return-1!==s?(n.sortedIndexCursor=s,o[n.sortedIndexCursor].index):-1}(r,l,t),-1===n||s||o(n),n}function Rs(e){return e.typeaheadBuffer.length>0}function Os(e){e.typeaheadBuffer=""}function Ps(e,t){var n=e.event,i=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,l="ArrowLeft"===Ts(n),c="ArrowUp"===Ts(n),d="ArrowRight"===Ts(n),u="ArrowDown"===Ts(n),h="Home"===Ts(n),m="End"===Ts(n),p="Enter"===Ts(n),f="Spacebar"===Ts(n);return l||c||d||u||h||m||p?-1:f||1!==n.key.length?f?(i&&Ds(n),i&&Rs(t)?Is({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},t):-1):-1:(Ds(n),Is({focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},t))}var $s,Bs,Ns=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=Es.UNSET_INDEX,i.focusedItemIndex=Es.UNSET_INDEX,i.useActivatedClass_=!1,i.useSelectedAttr_=!1,i.ariaCurrentAttrValue_=null,i.isCheckboxList_=!1,i.isRadioList_=!1,i.hasTypeahead=!1,i.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},i.sortedIndexByFirstChar=new Map,i}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return ks},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Fs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Es},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!0,configurable:!0}),t.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList_=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},t.prototype.setWrapFocus=function(e){this.wrapFocus_=e},t.prototype.setVerticalOrientation=function(e){this.isVertical_=e},t.prototype.setSingleSelection=function(e){this.isSingleSelectionList_=e,e&&this.maybeInitializeSingleSelection()},t.prototype.maybeInitializeSingleSelection=function(){for(var e=0;e<this.adapter.getListItemCount();e++){var t=this.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_ACTIVATED_CLASS);if(t||n)return n&&this.setUseActivatedClass(!0),this.isSingleSelectionList_=!0,void(this.selectedIndex_=e)}},t.prototype.setHasTypeahead=function(e){this.hasTypeahead=e,e&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},t.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&Rs(this.typeaheadState)},t.prototype.setUseActivatedClass=function(e){this.useActivatedClass_=e},t.prototype.setUseSelectedAttribute=function(e){this.useSelectedAttr_=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex_},t.prototype.setSelectedIndex=function(e){this.isIndexValid_(e)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(e):this.isRadioList_?this.setRadioAtIndex_(e):this.setSingleSelectionAtIndex_(e))},t.prototype.handleFocusIn=function(e,t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},t.prototype.handleFocusOut=function(e,t){var n=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout((function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()}),0)},t.prototype.handleKeydown=function(e,t,n){var i=this,o="ArrowLeft"===Ts(e),r="ArrowUp"===Ts(e),a="ArrowRight"===Ts(e),s="ArrowDown"===Ts(e),l="Home"===Ts(e),c="End"===Ts(e),d="Enter"===Ts(e),u="Spacebar"===Ts(e),h="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(r||c?(e.preventDefault(),this.focusLastElement()):(s||l)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)}};Ps(m,this.typeaheadState)}}else{var p=this.adapter.getFocusedElementIndex();if(!(-1===p&&(p=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)Ds(e),this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&o)Ds(e),this.focusPrevElement(p);else if(l)Ds(e),this.focusFirstElement();else if(c)Ds(e),this.focusLastElement();else if(h&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===Es.UNSET_INDEX?[]:this.selectedIndex_);else if((d||u)&&t){var f=e.target;if(f&&"A"===f.tagName&&d)return;if(Ds(e),this.adapter.listItemAtIndexHasClass(p,Fs.LIST_ITEM_DISABLED_CLASS))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(p),this.adapter.notifyAction(p))}this.hasTypeahead&&Ps(m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==Es.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(e,t),this.adapter.notifyAction(e)))},t.prototype.focusNextElement=function(e){var t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.focusItemAtIndex(t),t},t.prototype.focusPrevElement=function(e){var t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.focusItemAtIndex(t),t},t.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},t.prototype.focusLastElement=function(){var e=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(e),e},t.prototype.focusInitialElement=function(){var e=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(e),e},t.prototype.setEnabled=function(e,t){this.isIndexValid_(e)&&(t?(this.adapter.removeClassForElementIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,ks.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,ks.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=Fs.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=Fs.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==Es.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==Es.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===Es.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,ks.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?ks.ARIA_CURRENT:ks.ARIA_SELECTED;if(this.selectedIndex_!==Es.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==Es.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?ks.ARIA_SELECTED:ks.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==Es.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,t,"false"),this.adapter.setAttributeForElementIndex(e,t,"true"),this.selectedIndex_=e},t.prototype.setCheckboxAtIndex_=function(e){for(var t=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var i=!1;e.indexOf(n)>=0&&(i=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,i),this.adapter.setAttributeForElementIndex(n,t,i?"true":"false")}this.selectedIndex_=e},t.prototype.setTabindexAtIndex=function(e){this.focusedItemIndex===Es.UNSET_INDEX&&0!==e?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==e&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex_ instanceof Array||this.selectedIndex_===e||this.adapter.setAttributeForElementIndex(this.selectedIndex_,"tabindex","-1"),e!==Es.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(e,"tabindex","0")},t.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},t.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var e=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(e)},t.prototype.getFirstSelectedOrFocusedItemIndex=function(){var e=this.focusedItemIndex>=0?this.focusedItemIndex:0;return this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==Es.UNSET_INDEX?e=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(e=this.selectedIndex_.reduce((function(e,t){return Math.min(e,t)})))),e},t.prototype.isIndexValid_=function(e){var t=this;if(e instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===e.length||e.some((function(e){return t.isIndexInRange_(e)}))}if("number"==typeof e){if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return this.isIndexInRange_(e)||this.isSingleSelectionList_&&e===Es.UNSET_INDEX}return!1},t.prototype.isIndexInRange_=function(e){var t=this.adapter.getListItemCount();return e>=0&&e<t},t.prototype.setSelectedIndexOnAction_=function(e,t){void 0===t&&(t=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(e,t):this.setSelectedIndex(e)},t.prototype.toggleCheckboxAtIndex_=function(e,t){var n=this.getSelectionAttribute(),i=this.adapter.isCheckboxCheckedAtIndex(e);t&&(i=!i,this.adapter.setCheckedCheckboxOrRadioAtIndex(e,i)),this.adapter.setAttributeForElementIndex(e,n,i?"true":"false");var o=this.selectedIndex_===Es.UNSET_INDEX?[]:this.selectedIndex_.slice();i?o.push(e):o=o.filter((function(t){return t!==e})),this.selectedIndex_=o},t.prototype.focusItemAtIndex=function(e){this.adapter.focusItemAtIndex(e),this.focusedItemIndex=e},t.prototype.toggleAll=function(e){var t=this.adapter.getListItemCount();if(e.length===t)this.setCheckboxAtIndex_([]);else{for(var n=[],i=0;i<t;i++)(!this.adapter.listItemAtIndexHasClass(i,Fs.LIST_ITEM_DISABLED_CLASS)||e.indexOf(i)>-1)&&n.push(i);this.setCheckboxAtIndex_(n)}},t.prototype.typeaheadMatchItem=function(e,t,n){var i=this;return void 0===n&&(n=!1),Is({focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:t||this.focusedItemIndex,nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},t.prototype.typeaheadInitSortedIndex=function(){return function(e,t){for(var n=new Map,i=0;i<e;i++){var o=t(i).trim();if(o){var r=o[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:o.toLowerCase(),index:i})}}return n.forEach((function(e){e.sort((function(e,t){return e.index-t.index}))})),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},t.prototype.clearTypeaheadBuffer=function(){Os(this.typeaheadState)},t}(Wr),zs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),Object.defineProperty(t.prototype,"vertical",{set:function(e){this.foundation.setVerticalOrientation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listElements",{get:function(){return[].slice.call(this.root.querySelectorAll("."+Fs.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{set:function(e){this.foundation.setWrapFocus(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.foundation.setHasTypeahead(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.foundation.setSingleSelection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e)},enumerable:!0,configurable:!0}),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},t.prototype.layout=function(){var e=this.root.getAttribute(ks.ARIA_ORIENTATION);this.vertical=e!==ks.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach((function(e){e.setAttribute("tabindex","-1")})),[].slice.call(this.root.querySelectorAll(ks.FOCUSABLE_CHILD_ELEMENTS)).forEach((function(e){return e.setAttribute("tabindex","-1")})),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+Fs.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+Fs.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(ks.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(ks.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(ks.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(i,(function(t){return e.listElements.indexOf(t)}))}else n&&(this.selectedIndex=this.listElements.indexOf(n))},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.typeaheadMatchItem=function(e,t){return this.foundation.typeaheadMatchItem(e,t,!0)},t.prototype.getDefaultFoundation=function(){var e=this;return new Ns({addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(n)},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},getAttributeForElementIndex:function(t,n){return e.listElements[t].getAttribute(n)},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},getListItemCount:function(){return e.listElements.length},getPrimaryTextAtIndex:function(t){return e.getPrimaryText(e.listElements[t])},hasCheckboxAtIndex:function(t){return!!e.listElements[t].querySelector(ks.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(ks.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(ks.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return e.root!==document.activeElement&&e.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===e.root},listItemAtIndexHasClass:function(t,n){return e.listElements[t].classList.contains(n)},notifyAction:function(t){e.emit(ks.ACTION_EVENT,{index:t},!0)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(n)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements[t];o&&o.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(ks.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(ks.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach((function(e){return e.setAttribute("tabindex",n)}))}})},t.prototype.getListItemIndex_=function(e){var t=Kr(e.target,"."+Fs.LIST_ITEM_CLASS+", ."+Fs.ROOT);return t&&Xr(t,"."+Fs.LIST_ITEM_CLASS)?this.listElements.indexOf(t):-1},t.prototype.handleFocusInEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusIn(e,t)},t.prototype.handleFocusOutEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusOut(e,t)},t.prototype.handleKeydownEvent_=function(e){var t=this.getListItemIndex_(e),n=e.target;this.foundation.handleKeydown(e,n.classList.contains(Fs.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!Xr(e.target,ks.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(qr),js=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=gs.TOP_START,i.originCorner=gs.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return vs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return xs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ws},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return gs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^fs.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){e.adapter.addClass(t.cssClasses.OPEN),e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.openAnimationEndTimerId=setTimeout((function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()}),ws.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var n=this;void 0===e&&(e=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){n.adapter.removeClass(t.cssClasses.OPEN),n.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()}),ws.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()))},t.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},t.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},t.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),o=this.hasBit(n,fs.BOTTOM)?"bottom":"top",r=this.hasBit(n,fs.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),s=this.getVerticalOriginOffset(n),l=this.measurements,c=l.anchorSize,d=l.surfaceSize,u=((e={})[r]=a,e[o]=s,e);c.width/d.width>ws.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(u),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(u),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,fs.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:n.width-e.right,bottom:n.height-e.bottom,left:e.left},viewportSize:n,windowScroll:i}},t.prototype.getoriginCorner=function(){var e,n,i=this.originCorner,o=this.measurements,r=o.viewportDistance,a=o.anchorSize,s=o.surfaceSize,l=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,fs.BOTTOM)?(e=r.top-l+a.height+this.anchorMargin.bottom,n=r.bottom-l-this.anchorMargin.bottom):(e=r.top-l+this.anchorMargin.top,n=r.bottom-l+a.height-this.anchorMargin.top),!(n-s.height>0)&&e>=n&&(i=this.setBit(i,fs.BOTTOM));var c,d,u,h=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,fs.FLIP_RTL),p=this.hasBit(this.anchorCorner,fs.RIGHT)||this.hasBit(i,fs.RIGHT);(u=h&&m?!p:p)?(c=r.left+a.width+this.anchorMargin.right,d=r.right-this.anchorMargin.right):(c=r.left+this.anchorMargin.left,d=r.right+a.width-this.anchorMargin.left);var f=c-s.width>0,g=d-s.width>0,b=this.hasBit(i,fs.FLIP_RTL)&&this.hasBit(i,fs.RIGHT);return g&&b&&h||!f&&b?i=this.unsetBit(i,fs.RIGHT):(f&&u&&h||f&&!u&&p||!g&&c>=d)&&(i=this.setBit(i,fs.RIGHT)),i},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,o=this.hasBit(e,fs.BOTTOM),r=this.hasBit(this.anchorCorner,fs.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return o?(i=n.top+this.anchorMargin.top-a,r||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(i-=this.measurements.anchorSize.height)),i},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,fs.RIGHT),i=this.hasBit(this.anchorCorner,fs.RIGHT);if(n){var o=i?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return i?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,fs.BOTTOM),i=this.hasBit(this.anchorCorner,fs.BOTTOM);return n?i?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?t.height+this.anchorMargin.bottom:this.anchorMargin.top},t.prototype.adjustPositionForHoistedElement=function(e){var t,n,i=this.measurements,o=i.windowScroll,r=i.viewportDistance,a=Object.keys(e);try{for(var s=Hr(a),l=s.next();!l.done;l=s.next()){var c=l.value,d=e[c]||0;d+=r[c],this.isFixedPosition||("top"===c?d+=o.y:"bottom"===c?d-=o.y:"left"===c?d+=o.x:d-=o.x),e[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this.adapter.isFocused(),t=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||t)&&this.adapter.restoreFocus()},t.prototype.hasBit=function(e,t){return Boolean(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(Wr),Ys=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this,t=this.root.parentElement;this.anchorElement=t&&t.classList.contains(vs.ANCHOR)?t:null,this.root.classList.contains(vs.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleBodyClick=function(t){e.foundation.handleBodyClick(t)},this.registerBodyClickListener=function(){document.body.addEventListener("click",e.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",e.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(xs.OPENED_EVENT,this.registerBodyClickListener),this.listen(xs.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(xs.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(xs.CLOSED_EVENT,this.deregisterBodyClickListener),e.prototype.destroy.call(this)},t.prototype.isOpen=function(){return this.foundation.isOpen()},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(e){void 0===e&&(e=!1),this.foundation.close(e)},Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.foundation.setQuickOpen(e)},enumerable:!0,configurable:!0}),t.prototype.setIsHoisted=function(e){this.foundation.setIsHoisted(e)},t.prototype.setMenuSurfaceAnchorElement=function(e){this.anchorElement=e},t.prototype.setFixedPosition=function(e){e?this.root.classList.add(vs.FIXED):this.root.classList.remove(vs.FIXED),this.foundation.setFixedPosition(e)},t.prototype.setAbsolutePosition=function(e,t){this.foundation.setAbsolutePosition(e,t),this.setIsHoisted(!0)},t.prototype.setAnchorCorner=function(e){this.foundation.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.foundation.setAnchorMargin(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new js({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(js.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(js.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root).getPropertyValue("direction")},setTransformOrigin:function(t){var n=function(e,t){if(void 0===t&&(t=!1),void 0===$s||t){var n=e.document.createElement("div");$s="transform"in n.style?"transform":"webkitTransform"}return $s}(window)+"-origin";e.root.style.setProperty(n,t)},isFocused:function(){return document.activeElement===e.root},saveFocus:function(){e.previousFocus=document.activeElement},restoreFocus:function(){e.root.contains(document.activeElement)&&e.previousFocus&&e.previousFocus.focus&&e.previousFocus.focus()},getInnerDimensions:function(){return{width:e.root.offsetWidth,height:e.root.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement?e.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){var n=e.root;n.style.left="left"in t?t.left+"px":"",n.style.right="right"in t?t.right+"px":"",n.style.top="top"in t?t.top+"px":"",n.style.bottom="bottom"in t?t.bottom+"px":""},setMaxHeight:function(t){e.root.style.maxHeight=t}})},t}(qr),Hs={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Us={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},Vs={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(Bs||(Bs={}));var Ws=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=Bs.LIST_ROOT,i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Hs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Us},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Vs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var t=e.key,n=e.keyCode;("Tab"===t||9===n)&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var t=this,n=this.adapter.getElementIndex(e);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout((function(){var n=t.adapter.getElementIndex(e);n>=0&&t.adapter.isSelectableItemAtIndex(n)&&t.setSelectedIndex(n)}),js.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case Bs.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Bs.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Bs.NONE:break;default:this.adapter.focusListRoot()}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState_=e},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex_(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,Us.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,Hs.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,Hs.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,Us.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,Us.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,Us.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex_=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e<t))throw new Error("MDCMenuFoundation: No list item at specified index.")},t}(Wr),qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new Ys(e)}),void 0===t&&(t=function(e){return new zs(e)}),this.menuSurfaceFactory_=e,this.listFactory_=t},t.prototype.initialSyncWithDOM=function(){var e=this;this.menuSurface_=this.menuSurfaceFactory_(this.root);var t=this.root.querySelector(Us.LIST_SELECTOR);t?(this.list_=this.listFactory_(t),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(t){return e.foundation.handleKeydown(t)},this.handleItemAction_=function(t){return e.foundation.handleItemAction(e.items[t.detail.index])},this.handleMenuSurfaceOpened_=function(){return e.foundation.handleMenuSurfaceOpened()},this.menuSurface_.listen(js.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(Ns.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(js.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Ns.strings.ACTION_EVENT,this.handleItemAction_),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(e){e?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(e){this.list_&&(this.list_.wrapFocus=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.list_&&(this.list_.hasTypeahead=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return!!this.list_&&this.list_.typeaheadInProgress},enumerable:!0,configurable:!0}),t.prototype.typeaheadMatchItem=function(e,t){return this.list_?this.list_.typeaheadMatchItem(e,t):-1},t.prototype.layout=function(){this.list_&&this.list_.layout()},Object.defineProperty(t.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.list_&&(this.list_.singleSelection=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.list_?this.list_.selectedIndex:Es.UNSET_INDEX},set:function(e){this.list_&&(this.list_.selectedIndex=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.menuSurface_.quickOpen=e},enumerable:!0,configurable:!0}),t.prototype.setDefaultFocusState=function(e){this.foundation.setDefaultFocusState(e)},t.prototype.setAnchorCorner=function(e){this.menuSurface_.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.menuSurface_.setAnchorMargin(e)},t.prototype.setSelectedIndex=function(e){this.foundation.setSelectedIndex(e)},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.getOptionByIndex=function(e){return e<this.items.length?this.items[e]:null},t.prototype.getPrimaryTextAtIndex=function(e){var t=this.getOptionByIndex(e);return t&&this.list_&&this.list_.getPrimaryText(t)||""},t.prototype.setFixedPosition=function(e){this.menuSurface_.setFixedPosition(e)},t.prototype.setIsHoisted=function(e){this.menuSurface_.setIsHoisted(e)},t.prototype.setAbsolutePosition=function(e,t){this.menuSurface_.setAbsolutePosition(e,t)},t.prototype.setAnchorElement=function(e){this.menuSurface_.anchorElement=e},t.prototype.getDefaultFoundation=function(){var e=this;return new Ws({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(t){return e.menuSurface_.close(t)},getElementIndex:function(t){return e.items.indexOf(t)},notifySelected:function(t){return e.emit(Us.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})},getMenuItemCount:function(){return e.items.length},focusItemAtIndex:function(t){return e.items[t].focus()},focusListRoot:function(){return e.root.querySelector(Us.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!Kr(e.items[t],"."+Hs.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=Kr(e.items[t],"."+Hs.MENU_SELECTION_GROUP).querySelector("."+Hs.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(qr),Gs={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},Ks={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Xs={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Zs=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=Xs.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Gs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Xs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ks},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!0,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),e>=this.adapter.getMenuItemCount()||(e===Xs.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),n||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var n=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(n,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==Xs.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(Gs.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(Gs.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass(Gs.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(Gs.FOCUSED),n=e||t,i=this.adapter.hasClass(Gs.REQUIRED);this.notchOutline(n),this.adapter.floatLabel(n),this.adapter.setLabelRequired(i)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},t.prototype.handleMenuClosed=function(){this.adapter.removeClass(Gs.ACTIVATED),this.isMenuOpen=!1,this.adapter.setSelectAnchorAttr("aria-expanded","false"),this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(Gs.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(Gs.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(Gs.FOCUSED)){var t=Ts(e)===As.ENTER,n=Ts(e)===As.SPACEBAR,i=Ts(e)===As.ARROW_UP,o=Ts(e)===As.ARROW_DOWN;if(!n&&e.key&&1===e.key.length||n&&this.adapter.isTypeaheadInProgress()){var r=n?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void e.preventDefault()}(t||n||i||o)&&(i&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):o&&this.getSelectedIndex()<this.adapter.getMenuItemCount()-1&&this.setSelectedIndex(this.getSelectedIndex()+1),this.openMenu(),e.preventDefault())}},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(Gs.FOCUSED);if(e){var n=Xs.LABEL_SCALE,i=this.adapter.getLabelWidth()*n;this.adapter.notchOutline(i)}else t||this.adapter.closeOutline()}},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},t.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(Gs.INVALID),this.adapter.removeMenuClass(Gs.MENU_INVALID)):(this.adapter.addClass(Gs.INVALID),this.adapter.addMenuClass(Gs.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(Gs.REQUIRED)&&!this.adapter.hasClass(Gs.DISABLED)?this.getSelectedIndex()!==Xs.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(Gs.REQUIRED):this.adapter.removeClass(Gs.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},t.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},t.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner(gs.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(Gs.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(Gs.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(Gs.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(Gs.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),n=this.helperText.getId();t&&n?this.adapter.setSelectAnchorAttr(Ks.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(Ks.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){e.recentlyClicked=!1}),Xs.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(Wr),Js={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},Qs={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},el=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Qs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Js},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},getAttr:function(){return null},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(Js.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(Qs.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(Qs.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(Qs.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(Qs.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(Qs.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(Qs.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t)return this.showToScreenReader(),void(e?this.adapter.removeAttr(Js.ROLE):this.adapter.setAttr(Js.ROLE,"alert"));this.adapter.removeAttr(Js.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(Js.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(Js.ARIA_HIDDEN,"true")},t}(Wr),tl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new el({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(qr),nl={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},il=["click","keydown"],ol=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return nl},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),il.forEach((function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)}))},t.prototype.destroy=function(){var e=this;il.forEach((function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)}))},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",nl.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&this.adapter.notifyIconAction()},t}(Wr),rl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new ol({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(ol.strings.ICON_EVENT,{},!0)}})},t}(qr),al=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r){if(void 0===e&&(e=function(e){return new ea(e)}),void 0===t&&(t=function(e){return new ia(e)}),void 0===n&&(n=function(e){return new la(e)}),void 0===i&&(i=function(e){return new qs(e)}),void 0===o&&(o=function(e){return new rl(e)}),void 0===r&&(r=function(e){return new tl(e)}),this.selectAnchor=this.root.querySelector(Ks.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(Ks.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(Ks.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw new Error("MDCSelect: Missing required element: The following selector must be present: '"+Ks.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(Ks.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(Ks.ARIA_CONTROLS));a&&(this.helperText=r(a))}this.menuSetup(i);var s=this.root.querySelector(Ks.LABEL_SELECTOR);this.label=s?e(s):null;var l=this.root.querySelector(Ks.LINE_RIPPLE_SELECTOR);this.lineRipple=l?t(l):null;var c=this.root.querySelector(Ks.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(Ks.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=o(d)),this.root.classList.contains(Gs.OUTLINED)||(this.ripple=this.createRipple())},t.prototype.initialSyncWithDOM=function(){var e=this;if(this.handleFocus=function(){e.foundation.handleFocus()},this.handleBlur=function(){e.foundation.handleBlur()},this.handleClick=function(t){e.selectAnchor.focus(),e.foundation.handleClick(e.getNormalizedXCoordinate(t))},this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleMenuItemAction=function(t){e.foundation.handleMenuItemAction(t.detail.index)},this.handleMenuOpened=function(){e.foundation.handleMenuOpened()},this.handleMenuClosed=function(){e.foundation.handleMenuClosed()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(xs.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(xs.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(Us.SELECTED_EVENT,this.handleMenuItemAction),this.hiddenInput){if(this.hiddenInput.value)return this.foundation.setValue(this.hiddenInput.value,!0),void this.foundation.layout();this.hiddenInput.value=this.value}},t.prototype.destroy=function(){this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(xs.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(xs.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(Us.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.getDisabled()},set:function(e){this.foundation.setDisabled(e),this.hiddenInput&&(this.hiddenInput.disabled=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useDefaultValidation",{set:function(e){this.foundation.setUseDefaultValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.foundation.getRequired()},set:function(e){this.foundation.setRequired(e)},enumerable:!0,configurable:!0}),t.prototype.layout=function(){this.foundation.layout()},t.prototype.layoutOptions=function(){this.foundation.layoutOptions(),this.menu.layout(),this.menuItemValues=this.menu.items.map((function(e){return e.getAttribute(Ks.VALUE_ATTR)||""})),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){var e=Yr(Yr(Yr(Yr({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods());return new Zs(e,this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(Ks.MENU_SELECTOR),this.menu=e(this.menuElement),this.menu.hasTypeahead=!0,this.menu.singleSelection=!0,this.menuItemValues=this.menu.items.map((function(e){return e.getAttribute(Ks.VALUE_ATTR)||""}))},t.prototype.createRipple=function(){var e=this,t=Yr(Yr({},ga.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new ga(this.selectAnchor,new fa(t))},t.prototype.getSelectAdapterMethods=function(){var e=this;return{getMenuItemAttr:function(e,t){return e.getAttribute(t)},setSelectedText:function(t){e.selectedText.textContent=t},isSelectAnchorFocused:function(){return document.activeElement===e.selectAnchor},getSelectAnchorAttr:function(t){return e.selectAnchor.getAttribute(t)},setSelectAnchorAttr:function(t,n){e.selectAnchor.setAttribute(t,n)},removeSelectAnchorAttr:function(t){e.selectAnchor.removeAttribute(t)},addMenuClass:function(t){e.menuElement.classList.add(t)},removeMenuClass:function(t){e.menuElement.classList.remove(t)},openMenu:function(){e.menu.open=!0},closeMenu:function(){e.menu.open=!1},getAnchorElement:function(){return e.root.querySelector(Ks.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(t){e.menu.setAnchorElement(t)},setMenuAnchorCorner:function(t){e.menu.setAnchorCorner(t)},setMenuWrapFocus:function(t){e.menu.wrapFocus=t},getSelectedIndex:function(){var t=e.menu.selectedIndex;return t instanceof Array?t[0]:t},setSelectedIndex:function(t){e.menu.selectedIndex=t},focusMenuItemAtIndex:function(t){e.menu.items[t].focus()},getMenuItemCount:function(){return e.menu.items.length},getMenuItemValues:function(){return e.menuItemValues},getMenuItemTextAtIndex:function(t){return e.menu.getPrimaryTextAtIndex(t)},isTypeaheadInProgress:function(){return e.menu.typeaheadInProgress},typeaheadMatchItem:function(t,n){return e.menu.typeaheadMatchItem(t,n)}}},t.prototype.getCommonAdapterMethods=function(){var e=this;return{addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setRippleCenter:function(t){e.lineRipple&&e.lineRipple.setRippleCenter(t)},activateBottomLine:function(){e.lineRipple&&e.lineRipple.activate()},deactivateBottomLine:function(){e.lineRipple&&e.lineRipple.deactivate()},notifyChange:function(t){var n=e.selectedIndex;e.emit(Ks.CHANGE_EVENT,{value:t,index:n},!0),e.hiddenInput&&(e.hiddenInput.value=t)}}},t.prototype.getOutlineAdapterMethods=function(){var e=this;return{hasOutline:function(){return Boolean(e.outline)},notchOutline:function(t){e.outline&&e.outline.notch(t)},closeOutline:function(){e.outline&&e.outline.closeNotch()}}},t.prototype.getLabelAdapterMethods=function(){var e=this;return{hasLabel:function(){return!!e.label},floatLabel:function(t){e.label&&e.label.float(t)},getLabelWidth:function(){return e.label?e.label.getWidth():0},setLabelRequired:function(t){e.label&&e.label.setRequired(t)}}},t.prototype.getNormalizedXCoordinate=function(e){var t=e.target.getBoundingClientRect();return(this.isTouchEvent(e)?e.touches[0].clientX:e.clientX)-t.left},t.prototype.isTouchEvent=function(e){return Boolean(e.touches)},t.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundationForSelect:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForSelect:void 0}},t}(qr),sl={ROOT:"mdc-form-field"},ll={LABEL_SELECTOR:".mdc-form-field > label"},cl=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return sl},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ll},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},t.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){e.adapter.deactivateInputRipple()}))},t}(Wr),dl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=cl.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new cl({activateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.activate()},deactivateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.deactivate()},deregisterInteractionHandler:function(t,n){var i=e.labelEl();i&&i.removeEventListener(t,n)},registerInteractionHandler:function(t,n){var i=e.labelEl();i&&i.addEventListener(t,n)}})},t}(qr),ul={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},hl={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"},ml=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ul},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return hl},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this.adapter.getAttr(hl.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(hl.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(hl.ARIA_PRESSED))throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(hl.ARIA_PRESSED,String(this.isOn()))},t.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},t.prototype.isOn=function(){return this.adapter.hasClass(ul.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(ul.ICON_BUTTON_ON):this.adapter.removeClass(ul.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(hl.DATA_ARIA_LABEL_ON):this.adapter.getAttr(hl.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(hl.ARIA_LABEL,t||"")}else this.adapter.setAttr(hl.ARIA_PRESSED,""+e)},t}(Wr),pl=ml.strings,fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen("click",this.handleClick)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new ml({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(pl.CHANGE_EVENT,t)},removeClass:function(t){return e.root.classList.remove(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(e){this.foundation.toggle(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple=function(){var e=new ga(this.root);return e.unbounded=!0,e},t}(qr);const gl="important",bl=" !"+gl,_l=$e(class extends Be{constructor(e){var t;if(super(e),1!==e.type||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ht){this.ht=new Set;for(const e in t)this.ht.add(e);return this.render(t)}this.ht.forEach((e=>{null==t[e]&&(this.ht.delete(e),e.includes("-")?n.removeProperty(e):n[e]="")}));for(const e in t){const i=t[e];if(null!=i){this.ht.add(e);const t="string"==typeof i&&i.endsWith(bl);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?gl:""):n[e]=i}}return Y}});var yl=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};const vl=o(65744),xl=o(72832);class wl extends CustomEvent{constructor(e){super(wl.NAME,{detail:e,bubbles:!0,composed:!0})}}var Fl,kl;function El(e,t,n,i,o){switch(i=i||"listbox",e){case Fl.RADIO:i="radiogroup";break;case Fl.MULTI_CHECKBOX:i="group"}return j`
|
|
66
|
+
`:j``},onAdd:void 0}}(mr,pr)))}getConsoleAppConfig(){var e;return Rr(this,void 0,void 0,(function*(){try{const t=yield fetch((null!==(e=Pr.managerUrl)&&void 0!==e?e:"")+"/consoleappconfig/"+Pr.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}}))}getConsolePreferredLanguage(e=this.console){return Rr(this,void 0,void 0,(function*(){return e.retrieveData("LANGUAGE")}))}getUserPreferredLanguage(e=this._keycloak){return Rr(this,void 0,void 0,(function*(){if(e){const t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){const e=new Map(Object.entries(t.attributes));if(e.has("locale")){const t=e.get("locale");if("string"==typeof t[0])return t[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}}))}updateKeycloakUserLanguage(e,t=this._keycloak,n=this.rest){return Rr(this,void 0,void 0,(function*(){t&&(n?yield n.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}}):console.warn("Tried updating user language in keycloak, but the REST API is not initialized yet."))}))}logout(e){this._authenticated&&(this._authenticated=!0,this._keycloak?(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){const t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return Rr(this,void 0,void 0,(function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)}))}doBasicLogin(){var e,t,n,i;return Rr(this,void 0,void 0,(function*(){if(!this.config.basicLoginProvider)return;let o={username:(null===(e=this.config.credentials)||void 0===e?void 0:e.username)?null===(t=this.config.credentials)||void 0===t?void 0:t.username:"",password:(null===(n=this.config.credentials)||void 0===n?void 0:n.password)?null===(i=this.config.credentials)||void 0===i?void 0:i.password:"",cancel:!1},r=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!r;){if(o=yield this.config.basicLoginProvider(o.username,o.password),o.cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{const t=yield No.api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(!e){console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}{console.debug("Basic authentication successful"),r=!0;const e=yield No.api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}}r&&this._onAuthenticated()}))}isSuperUser(){return!(!this.getRealm()||"master"!==this.getRealm()||!this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole("restricted_user")}getApiBaseUrl(){let e=this._config.managerUrl;return e+="/api/"+this._config.realm+"/",e}getAppName(){const e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){const n=this.roles;return n&&n.has(t)&&n.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0,this._events||this.doEventsSubscriptionInit()}loadAndInitialiseKeycloak(){var e,t,n,i;return Rr(this,void 0,void 0,(function*(){try{this._keycloak=new Fr({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});const o=yield this._getNativeOfflineRefreshToken();let r=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!r&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,r=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(r)this._name=null===(e=this._keycloak.tokenParsed)||void 0===e?void 0:e.name,this._username=null===(t=this._keycloak.tokenParsed)||void 0===t?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&"Offline"===(null===(i=null===(n=this._keycloak)||void 0===n?void 0:n.refreshTokenParsed)||void 0===i?void 0:i.typ)&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(Dr.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}}))}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval((()=>Rr(this,void 0,void 0,(function*(){yield this._updateKeycloakAccessToken().catch((()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()}))}))),1e4))}_updateKeycloakAccessToken(){return Rr(this,void 0,void 0,(function*(){const e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e}))}_getNativeOfflineRefreshToken(){return Rr(this,void 0,void 0,(function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")}))}_emitEvent(e){window.setTimeout((()=>{const t=this._listeners;for(const n of t)n(e)}),0)}_setError(e){this._error=e,this._emitEvent(Ir.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null===(e=this.console)||void 0===e||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return Rr(this,void 0,void 0,(function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(Ir.OFFLINE),this.reconnect())}))}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(Ir.ONLINE)}reconnect(e=3e3){return Rr(this,void 0,void 0,(function*(){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);const t=yield(()=>Rr(this,void 0,void 0,(function*(){var e;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(e){const t=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=t;try{yield this._updateKeycloakAccessToken()}catch(e){return console.debug("Cannot update access token so sending to login"),void this.login()}return console.debug("Keycloak access token is valid"),!0}const t=this.events&&this.events.status===zo.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+t),!t||(yield null===(e=this.events)||void 0===e?void 0:e.connect())})))();return void 0!==t?t?void this._onReconnected():(e=Math.min(Or.MAX_RECONNECT_DELAY,e+3e3),console.debug("Scheduling another reconnect attempt in (ms): "+e),void(this._reconnectTimer=window.setTimeout((()=>this.reconnect(e)),e))):void 0}))}isKeycloakReachable(e=2e3){return Rr(this,void 0,void 0,(function*(){const t=new AbortController,n=setTimeout((()=>t.abort()),e);try{const e=this._keycloak.endpoints.token();return 200===(yield fetch(e,{method:"OPTIONS",signal:t.signal})).status}catch(e){return!1}finally{clearTimeout(n)}}))}}Or.MAX_RECONNECT_DELAY=45e3;const Pr=new Or,$r=Pr,Br=$e(class extends Be{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(n=this.nt)||void 0===n?void 0:n.has(e))&&this.it.add(e);return this.render(t)}const o=e.element.classList;this.it.forEach((e=>{e in t||(o.remove(e),this.it.delete(e))}));for(const e in t){const n=!!t[e];n===this.it.has(e)||(null===(i=this.nt)||void 0===i?void 0:i.has(e))||(n?(o.add(e),this.it.add(e)):(o.remove(e),this.it.delete(e)))}return Y}});function Nr(e,t,n){return e?t():null==n?void 0:n()}var zr=function(e,t){return zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},zr(e,t)};function jr(e,t){function n(){this.constructor=e}zr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Yr=function(){return Yr=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yr.apply(this,arguments)};function Hr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ur(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Vr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ur(arguments[t]));return e}var Wr=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),qr=function(){function e(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,Vr(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new Wr({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},e.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},e.prototype.emit=function(e,t,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,n,!1,t),this.root.dispatchEvent(i)},e}();function Gr(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}function Kr(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(Xr(n,t))return n;n=n.parentElement}return null}function Xr(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var Zr,Jr={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Qr=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Jr},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,i=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},t.prototype.setRequired=function(e){var n=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(Wr),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.shake=function(e){this.foundation.shake(e)},t.prototype.float=function(e){this.foundation.float(e)},t.prototype.setRequired=function(e){this.foundation.setRequired(e)},t.prototype.getWidth=function(){return this.foundation.getWidth()},t.prototype.getDefaultFoundation=function(){var e=this;return new Qr({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},getWidth:function(){return function(e){var t=e;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}(e.root)},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)}})},t}(qr),ta={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},na=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ta},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.activate=function(){this.adapter.removeClass(ta.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(ta.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(ta.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(ta.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(ta.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(ta.LINE_RIPPLE_DEACTIVATING))},t}(Wr),ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.setRippleCenter=function(e){this.foundation.setRippleCenter(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new na({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setStyle:function(t,n){return e.root.style.setProperty(t,n)},registerEventHandler:function(t,n){return e.listen(t,n)},deregisterEventHandler:function(t,n){return e.unlisten(t,n)}})},t}(qr),oa={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},ra={NOTCH_ELEMENT_PADDING:8},aa={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},sa=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return oa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return aa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ra},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),t.prototype.notch=function(e){var n=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=ra.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(n)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(Wr),la=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(oa.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+Qr.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(aa.OUTLINE_UPGRADED),requestAnimationFrame((function(){e.style.transitionDuration=""}))):this.root.classList.add(aa.NO_LABEL)},t.prototype.notch=function(e){this.foundation.notch(e)},t.prototype.closeNotch=function(){this.foundation.closeNotch()},t.prototype.getDefaultFoundation=function(){var e=this;return new sa({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNotchWidthProperty:function(t){return e.notchElement_.style.setProperty("width",t+"px")},removeNotchWidthProperty:function(){return e.notchElement_.style.removeProperty("width")}})},t}(qr),ca={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},da={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},ua={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},ha=["touchstart","pointerdown","mousedown","keydown"],ma=["touchend","pointerup","mouseup","contextmenu"],pa=[],fa=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(e){return i.activate_(e)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ca},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return da},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ua},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=t.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(o),e.adapter.isUnbounded()&&(e.adapter.addClass(r),e.layoutInternal_())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(o),e.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){e.layoutInternal_(),e.layoutFrame_=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple_=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(ha.forEach((function(e){t.adapter.registerInteractionHandler(e,t.activateHandler_)})),this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler_)),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):ma.forEach((function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)}))},t.prototype.deregisterRootHandlers_=function(){var e=this;ha.forEach((function(t){e.adapter.deregisterInteractionHandler(t,e.activateHandler_)})),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),ma.forEach((function(t){e.adapter.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)}))},t.prototype.removeCssVars_=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)}))},t.prototype.activate_=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;i&&void 0!==e&&i.type!==e.type||(n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type),void 0!==e&&pa.length>0&&pa.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState_():(void 0!==e&&(pa.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){pa=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())}))))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=t.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates_(),h=u.startPoint,m=u.endPoint;c=h.x+"px, "+h.y+"px",d=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout((function(){return e.activationTimerCallback_()}),l)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,o,r=t.x,a=t.y,s=r+n.left,l=a+n.top;if("touchstart"===e.type){var c=e;i=c.changedTouches[0].pageX-s,o=c.changedTouches[0].pageY-l}else{var d=e;i=d.pageX-s,o=d.pageY-l}return{x:i,y:o}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},{startPoint:e={x:e.x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState_,o=i.hasDeactivationUXRun,r=i.isActivated;(o||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout((function(){e.adapter.removeClass(n)}),ua.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return e.previousActivationEvent_=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var n=Yr({},t);t.isProgrammatic?(requestAnimationFrame((function(){return e.animateDeactivation_(n)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(n),e.resetActivationState_()})))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){this.frame_=this.adapter.computeBoundingRect();var e=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+t.numbers.PADDING;var n=Math.floor(e*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize_=n-1:this.initialSize_=n,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,o=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(r,this.fgScale_),this.adapter.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords_.top+"px"))},t}(Wr),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return jr(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var i=new t(e);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},t.createAdapter=function(e){return{addClass:function(t){return e.root.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n,i=window.CSS;if("boolean"==typeof Zr&&!t)return Zr;if(!i||"function"!=typeof i.supports)return!1;var o=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=o||r,t||(Zr=n),n}()},computeBoundingRect:function(){return e.root.getBoundingClientRect()},containsEventTarget:function(t){return e.root.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,Gr())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,Gr())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return Xr(e.root,":active")},isSurfaceDisabled:function(){return Boolean(e.disabled)},isUnbounded:function(){return Boolean(e.unbounded)},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,Gr())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,Gr())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root.classList.remove(t)},updateCssVariable:function(t,n){return e.root.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(e){this.unbounded_=Boolean(e),this.setUnbounded_()},enumerable:!0,configurable:!0}),t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getDefaultFoundation=function(){return new fa(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root;this.unbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded_=function(){this.foundation.setUnbounded(Boolean(this.unbounded_))},t}(qr),ba={ROOT:"mdc-text-field-character-counter"},_a={ROOT_SELECTOR:"."+ba.ROOT},ya=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ba},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return _a},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setCounterValue=function(e,t){e=Math.min(e,t),this.adapter.setContent(e+" / "+t)},t}(Wr),va=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new ya({setContent:function(t){e.root.textContent=t}})},t}(qr),xa={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},wa={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},Fa={LABEL_SCALE:.75},ka=["pattern","min","max","required","step","minlength","maxlength"],Ea=["color","date","datetime-local","month","range","time","week"],Aa=["mousedown","touchstart"],Ca=["click","keydown"],Ma=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return o.isFocused_=!1,o.receivedUserInput_=!1,o.isValid_=!0,o.useNativeValidation_=!0,o.validateOnValueChange_=!0,o.helperText_=i.helperText,o.characterCounter_=i.characterCounter,o.leadingIcon_=i.leadingIcon,o.trailingIcon_=i.trailingIcon,o.inputFocusHandler_=function(){return o.activateFocus()},o.inputBlurHandler_=function(){return o.deactivateFocus()},o.inputInputHandler_=function(){return o.handleInput()},o.setPointerXOffset_=function(e){return o.setTransformOrigin(e)},o.textFieldInteractionHandler_=function(){return o.handleTextFieldInteraction()},o.validationAttributeChangeHandler_=function(e){return o.handleValidationAttributeChange(e)},o}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return wa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return xa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Fa},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return Ea.indexOf(e)>=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.adapter.hasLabel()&&this.getNativeInput_().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler_():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating_(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler_),Aa.forEach((function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)})),Ca.forEach((function(t){e.adapter.registerTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)})),this.validationObserver_=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},t.prototype.destroy=function(){var e=this;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler_),Aa.forEach((function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)})),Ca.forEach((function(t){e.adapter.deregisterTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)})),this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput_=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return ka.indexOf(e)>-1&&(t.styleValidity_(!0),t.adapter.setLabelRequired(t.getNativeInput_().required),!0)})),e.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*Fa.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText_||!this.helperText_.isPersistent()&&this.helperText_.isValidation()&&this.isValid_||this.helperText_.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,n=t?t[0]:e,i=n.target.getBoundingClientRect(),o=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(o)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity_(e),this.styleFocused_(this.isFocused_),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},t.prototype.getValue=function(){return this.getNativeInput_().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput_().value=e),this.setCharacterCounter_(e.length),this.validateOnValueChange_){var t=this.isValid();this.styleValidity_(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.validateOnValueChange_&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},t.prototype.setValid=function(e){this.isValid_=e,this.styleValidity_(e);var t=!e&&!this.isFocused_&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange_=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange_},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation_=e},t.prototype.isDisabled=function(){return this.getNativeInput_().disabled},t.prototype.setDisabled=function(e){this.getNativeInput_().disabled=e,this.styleDisabled_(e)},t.prototype.setHelperTextContent=function(e){this.helperText_&&this.helperText_.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon_&&this.leadingIcon_.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon_&&this.trailingIcon_.setContent(e)},t.prototype.setCharacterCounter_=function(e){if(this.characterCounter_){var t=this.getNativeInput_().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(e,t)}},t.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},t.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},t.prototype.styleValidity_=function(e){var n=t.cssClasses.INVALID;if(e?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText_){if(this.helperText_.setValidity(e),!this.helperText_.isValidation())return;var i=this.helperText_.isVisible(),o=this.helperText_.getId();i&&o?this.adapter.setInputAttr(xa.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(xa.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused_=function(e){var n=t.cssClasses.FOCUSED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.styleDisabled_=function(e){var n=t.cssClasses,i=n.DISABLED,o=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon_&&this.leadingIcon_.setDisabled(e),this.trailingIcon_&&this.trailingIcon_.setDisabled(e)},t.prototype.styleFloating_=function(e){var n=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.getNativeInput_=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(Wr),Sa={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},Ta={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+Sa.ROOT},La=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Sa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ta},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(Ta.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(Sa.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(Sa.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(Sa.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(Sa.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(Sa.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(Sa.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(Ta.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(Sa.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(Sa.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(Ta.ROLE,"alert")):this.adapter.removeAttr(Ta.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(Ta.ARIA_HIDDEN,"true")},t}(Wr),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new La({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(qr),Ia={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},Ra={ROOT:"mdc-text-field__icon"},Oa=["click","keydown"],Pa=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return Ia},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Ra},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),Oa.forEach((function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)}))},t.prototype.destroy=function(){var e=this;Oa.forEach((function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)}))},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",Ia.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&(e.preventDefault(),this.adapter.notifyIconAction())},t}(Wr),$a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new Pa({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(Pa.strings.ICON_EVENT,{},!0)}})},t}(qr),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r,a){void 0===e&&(e=function(e,t){return new ga(e,t)}),void 0===t&&(t=function(e){return new ia(e)}),void 0===n&&(n=function(e){return new Da(e)}),void 0===i&&(i=function(e){return new va(e)}),void 0===o&&(o=function(e){return new $a(e)}),void 0===r&&(r=function(e){return new ea(e)}),void 0===a&&(a=function(e){return new la(e)}),this.input_=this.root.querySelector(xa.INPUT_SELECTOR);var s=this.root.querySelector(xa.LABEL_SELECTOR);this.label_=s?r(s):null;var l=this.root.querySelector(xa.LINE_RIPPLE_SELECTOR);this.lineRipple_=l?t(l):null;var c=this.root.querySelector(xa.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=La.strings,u=this.root.nextElementSibling,h=u&&u.classList.contains(wa.HELPER_LINE),m=h&&u&&u.querySelector(d.ROOT_SELECTOR);this.helperText_=m?n(m):null;var p=ya.strings,f=this.root.querySelector(p.ROOT_SELECTOR);!f&&h&&u&&(f=u.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=f?i(f):null;var g=this.root.querySelector(xa.LEADING_ICON_SELECTOR);this.leadingIcon_=g?o(g):null;var b=this.root.querySelector(xa.TRAILING_ICON_SELECTOR);this.trailingIcon_=b?o(b):null,this.prefix_=this.root.querySelector(xa.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(xa.SUFFIX_SELECTOR),this.ripple=this.createRipple_(e)},t.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),e.prototype.destroy.call(this)},t.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.input_.required},set:function(e){this.input_.required=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(e){this.input_.pattern=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(e){this.input_.minLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(e){e<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.input_.min},set:function(e){this.input_.min=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.input_.max},set:function(e){this.input_.max=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"step",{get:function(){return this.input_.step},set:function(e){this.input_.step=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconAriaLabel",{set:function(e){this.foundation.setTrailingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconContent",{set:function(e){this.foundation.setTrailingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useNativeValidation",{set:function(e){this.foundation.setUseNativeValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(e){this.prefix_&&(this.prefix_.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(e){this.suffix_&&(this.suffix_.textContent=e)},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.input_.focus()},t.prototype.layout=function(){var e=this.foundation.shouldFloat;this.foundation.notchOutline(e)},t.prototype.getDefaultFoundation=function(){var e=Yr(Yr(Yr(Yr(Yr({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_());return new Ma(e,this.getFoundationMap_())},t.prototype.getRootAdapterMethods_=function(){var e=this;return{addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},registerTextFieldInteractionHandler:function(t,n){e.listen(t,n)},deregisterTextFieldInteractionHandler:function(t,n){e.unlisten(t,n)},registerValidationAttributeChangeHandler:function(t){var n=new MutationObserver((function(e){return t(function(e){return e.map((function(e){return e.attributeName})).filter((function(e){return e}))}(e))}));return n.observe(e.input_,{attributes:!0}),n},deregisterValidationAttributeChangeHandler:function(e){e.disconnect()}}},t.prototype.getInputAdapterMethods_=function(){var e=this;return{getNativeInput:function(){return e.input_},setInputAttr:function(t,n){e.input_.setAttribute(t,n)},removeInputAttr:function(t){e.input_.removeAttribute(t)},isFocused:function(){return document.activeElement===e.input_},registerInputInteractionHandler:function(t,n){e.input_.addEventListener(t,n,Gr())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,Gr())}}},t.prototype.getLabelAdapterMethods_=function(){var e=this;return{floatLabel:function(t){return e.label_&&e.label_.float(t)},getLabelWidth:function(){return e.label_?e.label_.getWidth():0},hasLabel:function(){return Boolean(e.label_)},shakeLabel:function(t){return e.label_&&e.label_.shake(t)},setLabelRequired:function(t){return e.label_&&e.label_.setRequired(t)}}},t.prototype.getLineRippleAdapterMethods_=function(){var e=this;return{activateLineRipple:function(){e.lineRipple_&&e.lineRipple_.activate()},deactivateLineRipple:function(){e.lineRipple_&&e.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(t){e.lineRipple_&&e.lineRipple_.setRippleCenter(t)}}},t.prototype.getOutlineAdapterMethods_=function(){var e=this;return{closeOutline:function(){return e.outline_&&e.outline_.closeNotch()},hasOutline:function(){return Boolean(e.outline_)},notchOutline:function(t){return e.outline_&&e.outline_.notch(t)}}},t.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundationForTextField:void 0,helperText:this.helperText_?this.helperText_.foundationForTextField:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundationForTextField:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundationForTextField:void 0}},t.prototype.createRipple_=function(e){var t=this,n=this.root.classList.contains(wa.TEXTAREA),i=this.root.classList.contains(wa.OUTLINED);if(n||i)return null;var o=Yr(Yr({},ga.createAdapter(this)),{isSurfaceActive:function(){return Xr(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,Gr())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,Gr())}});return e(this.root,new fa(o))},t}(qr),Na={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},za={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function ja(e){return Boolean(e.document)&&"function"==typeof e.document.createElement}function Ya(e,t){if(ja(e)&&t in Na){var n=e.document.createElement("div"),i=Na[t],o=i.standard,r=i.prefixed;return o in n.style?o:r}return t}function Ha(e,t){if(ja(e)&&t in za){var n=e.document.createElement("div"),i=za[t],o=i.standard,r=i.prefixed;return i.cssProperty in n.style?o:r}return t}var Ua={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},Va={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},Wa={ANIM_END_LATCH_MS:250},qa=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.currentCheckState_=Va.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ua},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Va},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Wa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter.addClass(Ua.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Ua.DISABLED):this.adapter.removeClass(Ua.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout((function(){e.adapter.removeClass(e.currentAnimationClass_),e.enableAnimationEndHandler_=!1}),Wa.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState_()},t.prototype.transitionCheckState_=function(){if(this.adapter.hasNativeControl()){var e=this.currentCheckState_,t=this.determineCheckState_();if(e!==t){this.updateAriaChecked_();var n=Ua.SELECTED;t===Va.TRANSITION_STATE_UNCHECKED?this.adapter.removeClass(n):this.adapter.addClass(n),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter.forceLayout(),this.adapter.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(e,t),this.currentCheckState_=t,this.adapter.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},t.prototype.determineCheckState_=function(){var e=Va.TRANSITION_STATE_INDETERMINATE,t=Va.TRANSITION_STATE_CHECKED,n=Va.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=Va.TRANSITION_STATE_INIT,o=Va.TRANSITION_STATE_CHECKED,r=Va.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,l=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,u=a.ANIM_INDETERMINATE_CHECKED,h=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:return n===r?"":n===o?u:h;case r:return n===o?s:l;case o:return n===r?c:d;default:return n===o?u:h}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(Va.ARIA_CHECKED_ATTR,Va.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(Va.ARIA_CHECKED_ATTR)},t}(Wr),Ga=["checked","indeterminate"],Ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.nativeControl_.checked=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indeterminate",{get:function(){return this.nativeControl_.indeterminate},set:function(e){this.nativeControl_.indeterminate=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.nativeControl_.value},set:function(e){this.nativeControl_.value=e},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){var e=Va.DATA_INDETERMINATE_ATTR;this.nativeControl_.indeterminate="true"===this.nativeControl_.getAttribute(e),this.nativeControl_.removeAttribute(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleChange_=function(){return e.foundation.handleChange()},this.handleAnimationEnd_=function(){return e.foundation.handleAnimationEnd()},this.nativeControl_.addEventListener("change",this.handleChange_),this.listen(Ha(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(Ha(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new qa({addClass:function(t){return e.root.classList.add(t)},forceLayout:function(){return e.root.offsetWidth},hasNativeControl:function(){return!!e.nativeControl_},isAttachedToDOM:function(){return Boolean(e.root.parentNode)},isChecked:function(){return e.checked},isIndeterminate:function(){return e.indeterminate},removeClass:function(t){e.root.classList.remove(t)},removeNativeControlAttr:function(t){e.nativeControl_.removeAttribute(t)},setNativeControlAttr:function(t,n){e.nativeControl_.setAttribute(t,n)},setNativeControlDisabled:function(t){e.nativeControl_.disabled=t}})},t.prototype.createRipple_=function(){var e=this,t=Yr(Yr({},ga.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,Gr())},isSurfaceActive:function(){return Xr(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,Gr())}});return new ga(this.root,new fa(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);Ga.forEach((function(i){var o=Object.getOwnPropertyDescriptor(n,i);if(Xa(o)){var r=o.get,a={configurable:o.configurable,enumerable:o.enumerable,get:r,set:function(n){o.set.call(t,n),e.foundation.handleChange()}};Object.defineProperty(t,i,a)}}))},t.prototype.uninstallPropertyChangeHooks_=function(){var e=this.nativeControl_,t=Object.getPrototypeOf(e);Ga.forEach((function(n){var i=Object.getOwnPropertyDescriptor(t,n);Xa(i)&&Object.defineProperty(e,n,i)}))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=Va.NATIVE_CONTROL_SELECTOR,t=this.root.querySelector(e);if(!t)throw new Error("Checkbox component requires a "+e+" element");return t},enumerable:!0,configurable:!0}),t}(qr);function Xa(e){return!!e&&"function"==typeof e.set}var Za,Ja,Qa={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},es={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},ts=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return es},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Qa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked_(e),this.updateCheckedStyling_(e)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Qa.DISABLED):this.adapter.removeClass(Qa.DISABLED)},t.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked_(t.checked),this.updateCheckedStyling_(t.checked)},t.prototype.updateCheckedStyling_=function(e){e?this.adapter.addClass(Qa.CHECKED):this.adapter.removeClass(Qa.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(es.ARIA_CHECKED_ATTR,""+!!e)},t}(Wr),ns=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.changeHandler_)},t.prototype.initialSyncWithDOM=function(){var e=this;this.changeHandler_=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(t=e.foundation).handleChange.apply(t,Vr(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new ts({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNativeControlChecked:function(t){return e.nativeControl_.checked=t},setNativeControlDisabled:function(t){return e.nativeControl_.disabled=t},setNativeControlAttr:function(t,n){return e.nativeControl_.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.foundation.setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple_=function(){var e=this,t=ts.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=Yr(Yr({},ga.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,Gr())},isSurfaceActive:function(){return Xr(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,Gr())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new ga(this.root,new fa(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=ts.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(qr),is="mdc-slider--disabled",os="mdc-slider__thumb",rs="mdc-slider__thumb--top",as="mdc-slider__thumb--with-indicator",ss="mdc-slider__tick-marks",ls="mdc-slider__tick-mark--active",cs="mdc-slider__tick-mark--inactive",ds="disabled",us="min",hs="max",ms="value",ps="step";!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(Za||(Za={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(Ja||(Ja={}));var fs,gs,bs="undefined"!=typeof window,_s=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=1,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return jr(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDisabled=this.adapter.hasClass(is),this.isDiscrete=this.adapter.hasClass("mdc-slider--discrete"),this.hasTickMarks=this.adapter.hasClass("mdc-slider--tick-marks"),this.isRange=this.adapter.hasClass("mdc-slider--range");var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(us,this.isRange?Ja.START:Ja.END),us),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(hs,Ja.END),hs),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(ms,Ja.END),ms),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(ms,Ja.START),ms):t;this.validateProperties({min:t,max:n,value:i,valueStart:o}),this.min=t,this.max=n,this.value=i,this.valueStart=o,this.valueBeforeDownEvent=i,this.valueStartBeforeDownEvent=o;var r=this.adapter.getInputAttribute(ps,Ja.END);if(r&&(this.step=this.convertAttributeValueToNumber(r,ps)),this.step<=0)throw new Error("MDCSliderFoundation: step must be a positive number. Current step: "+this.step);this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){e.handleInputChange(Ja.START)},this.inputEndChangeListener=function(){e.handleInputChange(Ja.END)},this.inputStartFocusListener=function(){e.handleInputFocus(Ja.START)},this.inputEndFocusListener=function(){e.handleInputFocus(Ja.END)},this.inputStartBlurListener=function(){e.handleInputBlur(Ja.START)},this.inputEndBlurListener=function(){e.handleInputBlur(Ja.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},t.prototype.destroy=function(){this.deregisterEventHandlers()},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){if(this.isRange&&e<this.valueStart)throw new Error("end thumb value ("+e+") must be >= start thumb value ("+this.valueStart+")");this.updateValue(e,Ja.END)},t.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},t.prototype.setValueStart=function(e){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&e>this.value)throw new Error("start thumb value ("+e+") must be <= end thumb value ("+this.value+")");this.updateValue(e,Ja.START)},t.prototype.getStep=function(){return this.step},t.prototype.getDisabled=function(){return this.isDisabled},t.prototype.setDisabled=function(e){this.isDisabled=e,e?(this.adapter.addClass(is),this.isRange&&this.adapter.setInputAttribute(ds,"",Ja.START),this.adapter.setInputAttribute(ds,"",Ja.END)):(this.adapter.removeClass(is),this.isRange&&this.adapter.removeInputAttribute(ds,Ja.START),this.adapter.removeInputAttribute(ds,Ja.END))},t.prototype.getIsRange=function(){return this.isRange},t.prototype.layout=function(e){var t=(void 0===e?{}:e).skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(Ja.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(Ja.END)),t||this.updateUI()},t.prototype.handleResize=function(){this.layout()},t.prototype.handleDown=function(e){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX;this.downEventClientX=t;var n=this.mapClientXOnSliderScale(t);this.thumb=this.getThumbFromDownEvent(t,n),null!==this.thumb&&(this.handleDragStart(e,n,this.thumb),this.isRange&&n>=this.valueStart&&n<=this.value||this.updateValue(n,this.thumb,{emitInputEvent:!0}))}},t.prototype.handleMove=function(e){if(!this.isDisabled){e.preventDefault();var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX,n=null!=this.thumb;if(this.thumb=this.getThumbFromMoveEvent(t),null!==this.thumb){var i=this.mapClientXOnSliderScale(t);n||(this.handleDragStart(e,i,this.thumb),this.adapter.emitDragStartEvent(i,this.thumb)),this.updateValue(i,this.thumb,{emitInputEvent:!0})}}},t.prototype.handleUp=function(){if(!this.isDisabled&&null!==this.thumb){var e=this.thumb===Ja.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===Ja.START?this.valueStart:this.value;e!==t&&this.adapter.emitChangeEvent(t,this.thumb),this.adapter.emitDragEndEvent(t,this.thumb),this.thumb=null}},t.prototype.handleThumbMouseenter=function(){this.isDiscrete&&this.isRange&&(this.adapter.addThumbClass(as,Ja.START),this.adapter.addThumbClass(as,Ja.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(Ja.START)||this.adapter.isInputFocused(Ja.END)||(this.adapter.removeThumbClass(as,Ja.START),this.adapter.removeThumbClass(as,Ja.END)))},t.prototype.handleMousedownOrTouchstart=function(e){var t=this,n="mousedown"===e.type?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(n,this.moveListener);var i=function(){t.handleUp(),t.adapter.deregisterBodyEventHandler(n,t.moveListener),t.adapter.deregisterEventHandler("mouseup",i),t.adapter.deregisterEventHandler("touchend",i)};this.adapter.registerBodyEventHandler("mouseup",i),this.adapter.registerBodyEventHandler("touchend",i),this.handleDown(e)},t.prototype.handlePointerdown=function(e){this.adapter.setPointerCapture(e.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(e)},t.prototype.handleInputChange=function(e){var t=Number(this.adapter.getInputValue(e));e===Ja.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(as,e),this.isRange)){var t=e===Ja.START?Ja.END:Ja.START;this.adapter.addThumbClass(as,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(as,e),this.isRange)){var t=e===Ja.START?Ja.END:Ja.START;this.adapter.removeThumbClass(as,t)}},t.prototype.handleDragStart=function(e,t,n){this.adapter.focusInput(n),e.preventDefault(),this.adapter.emitDragStartEvent(t,n)},t.prototype.getThumbFromDownEvent=function(e,t){if(!this.isRange)return Ja.END;var n=this.adapter.getThumbBoundingClientRect(Ja.START),i=this.adapter.getThumbBoundingClientRect(Ja.END),o=e>=n.left&&e<=n.right,r=e>=i.left&&e<=i.right;return o&&r?null:o?Ja.START:r?Ja.END:t<this.valueStart?Ja.START:t>this.value?Ja.END:null},t.prototype.getThumbFromMoveEvent=function(e){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw new Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-e)<5?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?Ja.END:Ja.START:this.adapter.isRTL()?Ja.START:Ja.END},t.prototype.updateUI=function(e){this.updateThumbAndInputAttributes(e),this.updateThumbAndTrackUI(e),this.updateValueIndicatorUI(e),this.updateTickMarksUI()},t.prototype.updateThumbAndInputAttributes=function(e){if(e){var t=this.isRange&&e===Ja.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(ms,n,e),this.isRange&&e===Ja.START?this.adapter.setInputAttribute(us,n,Ja.END):this.isRange&&e===Ja.END&&this.adapter.setInputAttribute(hs,n,Ja.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute("aria-valuetext",i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===Ja.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===Ja.START?Ja.START:Ja.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,Ja.START)}},t.prototype.updateTickMarksUI=function(){if(this.isDiscrete&&this.hasTickMarks){var e=(this.valueStart-this.min)/this.step,t=(this.value-this.valueStart)/this.step+1,n=(this.max-this.value)/this.step,i=Array.from({length:e}).fill(Za.INACTIVE),o=Array.from({length:t}).fill(Za.ACTIVE),r=Array.from({length:n}).fill(Za.INACTIVE);this.adapter.updateTickMarks(i.concat(o).concat(r))}},t.prototype.mapClientXOnSliderScale=function(e){var t=(e-this.rect.left)/this.rect.width;this.adapter.isRTL()&&(t=1-t);var n=this.min+t*(this.max-this.min);return n===this.max||n===this.min?n:this.quantize(n)},t.prototype.updateValue=function(e,t,n){var i=void 0===n?{}:n,o=i.emitInputEvent,r=i.emitChangeEvent;if(e=this.clampValue(e,t),this.isRange&&t===Ja.START){if(this.valueStart===e)return;this.valueStart=e}else{if(this.value===e)return;this.value=e}this.updateUI(t),o&&this.adapter.emitInputEvent(t===Ja.START?this.valueStart:this.value,t),r&&this.adapter.emitChangeEvent(t===Ja.START?this.valueStart:this.value,t)},t.prototype.quantize=function(e){return Math.round(e/this.step)*this.step},t.prototype.clampValue=function(e,t){return e=Math.min(Math.max(e,this.min),this.max),this.isRange&&t===Ja.START&&e>this.value?this.value:this.isRange&&t===Ja.END&&e<this.valueStart?this.valueStart:e},t.prototype.updateThumbAndTrackUI=function(e){var t=this,n=this.max,i=this.min,o=(this.value-this.valueStart)/(n-i),r=o*this.rect.width,a=this.adapter.isRTL(),s=bs?Ya(window,"transform"):"transform";if(this.isRange){var l=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,c=l+r;requestAnimationFrame((function(){!a&&e===Ja.START||a&&e!==Ja.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-c+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",l+"px")),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")");var n=a?c:l,i=t.adapter.isRTL()?l:c;e!==Ja.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+n+"px)",Ja.START),e!==Ja.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+i+"px)",Ja.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)}))}else requestAnimationFrame((function(){var e=a?t.rect.width-r:r;t.adapter.setThumbStyleProperty(s,"translateX("+e+"px)",Ja.END),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")"),t.removeInitialStyles(a)}))},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,Ja.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,Ja.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=bs?Ya(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,Ja.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,Ja.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame((function(){e.adapter.removeThumbStyleProperty(t,Ja.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,Ja.START)}))}},t.prototype.updateOverlappingThumbsUI=function(e,t,n){var i=!1;if(this.adapter.isRTL()){var o=e-this.startThumbKnobWidth/2;i=t+this.endThumbKnobWidth/2>=o}else i=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2;i?(this.adapter.addThumbClass(rs,n||Ja.END),this.adapter.removeThumbClass(rs,n===Ja.START?Ja.END:Ja.START)):(this.adapter.removeThumbClass(rs,Ja.START),this.adapter.removeThumbClass(rs,Ja.END))},t.prototype.convertAttributeValueToNumber=function(e,t){if(null===e)throw new Error("MDCSliderFoundation: `"+t+"` must be non-null.");var n=Number(e);if(isNaN(n))throw new Error("MDCSliderFoundation: `"+t+"` value is `"+e+"`, but must be a number.");return n},t.prototype.validateProperties=function(e){var t=e.min,n=e.max,i=e.value,o=e.valueStart;if(t>=n)throw new Error("MDCSliderFoundation: min must be strictly less than max. Current: [min: "+t+", max: "+n+"]");if(this.isRange){if(i<t||i>n||o<t||o>n)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+o+", end value: "+i+"]");if(o>i)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+o+", end value: "+i+"]")}else if(i<t||i>n)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current value: "+i)},t.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(Ja.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(Ja.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(Ja.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(Ja.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(Ja.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(Ja.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(Ja.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(Ja.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(Ja.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(Ja.END,"blur",this.inputEndBlurListener)},t.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(Ja.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(Ja.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(Ja.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(Ja.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(Ja.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(Ja.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(Ja.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(Ja.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(Ja.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(Ja.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=bs&&Boolean(window.PointerEvent),t}(Wr),ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return jr(t,e),t.attachTo=function(e,n){return void 0===n&&(n={}),new t(e,void 0,n)},t.prototype.getDefaultFoundation=function(){var e=this;return new _s({hasClass:function(t){return e.root.classList.contains(t)},addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},addThumbClass:function(t,n){e.getThumbEl(n).classList.add(t)},removeThumbClass:function(t,n){e.getThumbEl(n).classList.remove(t)},getAttribute:function(t){return e.root.getAttribute(t)},getInputValue:function(t){return e.getInput(t).value},setInputValue:function(t,n){e.getInput(n).value=t},getInputAttribute:function(t,n){return e.getInput(n).getAttribute(t)},setInputAttribute:function(t,n,i){e.getInput(i).setAttribute(t,n)},removeInputAttribute:function(t,n){e.getInput(n).removeAttribute(t)},focusInput:function(t){e.getInput(t).focus()},isInputFocused:function(t){return e.getInput(t)===document.activeElement},getThumbKnobWidth:function(t){return e.getThumbEl(t).querySelector(".mdc-slider__thumb-knob").getBoundingClientRect().width},getThumbBoundingClientRect:function(t){return e.getThumbEl(t).getBoundingClientRect()},getBoundingClientRect:function(){return e.root.getBoundingClientRect()},isRTL:function(){return"rtl"===getComputedStyle(e.root).direction},setThumbStyleProperty:function(t,n,i){e.getThumbEl(i).style.setProperty(t,n)},removeThumbStyleProperty:function(t,n){e.getThumbEl(n).style.removeProperty(t)},setTrackActiveStyleProperty:function(t,n){e.trackActive.style.setProperty(t,n)},removeTrackActiveStyleProperty:function(t){e.trackActive.style.removeProperty(t)},setValueIndicatorText:function(t,n){e.getThumbEl(n).querySelector(".mdc-slider__value-indicator-text").textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+ss);n||((n=document.createElement("div")).classList.add(ss),e.root.querySelector(".mdc-slider__track").appendChild(n)),t.length!==n.children.length?(n.innerHTML="",e.addTickMarks(n,t)):e.updateTickMarks(n,t)},setPointerCapture:function(t){e.root.setPointerCapture(t)},emitChangeEvent:function(t,n){e.emit("MDCSlider:change",{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit("MDCSlider:input",{value:t,thumb:n})},emitDragStartEvent:function(t,n){e.getRipple(n).activate()},emitDragEndEvent:function(t,n){e.getRipple(n).deactivate()},registerEventHandler:function(t,n){e.listen(t,n)},deregisterEventHandler:function(t,n){e.unlisten(t,n)},registerThumbEventHandler:function(t,n,i){e.getThumbEl(t).addEventListener(n,i)},deregisterThumbEventHandler:function(t,n,i){e.getThumbEl(t).removeEventListener(n,i)},registerInputEventHandler:function(t,n,i){e.getInput(t).addEventListener(n,i)},deregisterInputEventHandler:function(t,n,i){e.getInput(t).removeEventListener(n,i)},registerBodyEventHandler:function(e,t){document.body.addEventListener(e,t)},deregisterBodyEventHandler:function(e,t){document.body.removeEventListener(e,t)},registerWindowEventHandler:function(e,t){window.addEventListener(e,t)},deregisterWindowEventHandler:function(e,t){window.removeEventListener(e,t)}})},t.prototype.initialize=function(e){var t=(void 0===e?{}:e).skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll(".mdc-slider__input")),this.thumbs=[].slice.call(this.root.querySelectorAll("."+os)),this.trackActive=this.root.querySelector(".mdc-slider__track--active_fill"),this.ripples=this.createRipples(),t&&(this.skipInitialUIUpdate=!0)},t.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getValueStart=function(){return this.foundation.getValueStart()},t.prototype.setValueStart=function(e){this.foundation.setValueStart(e)},t.prototype.getValue=function(){return this.foundation.getValue()},t.prototype.setValue=function(e){this.foundation.setValue(e)},t.prototype.getDisabled=function(){return this.foundation.getDisabled()},t.prototype.setDisabled=function(e){this.foundation.setDisabled(e)},t.prototype.setValueToAriaValueTextFn=function(e){this.valueToAriaValueTextFn=e},t.prototype.getThumbEl=function(e){return e===Ja.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===Ja.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===Ja.END?this.ripples[this.ripples.length-1]:this.ripples[0]},t.prototype.addTickMarks=function(e,t){for(var n=document.createDocumentFragment(),i=0;i<t.length;i++){var o=document.createElement("div"),r=t[i]===Za.ACTIVE?ls:cs;o.classList.add(r),n.appendChild(o)}e.appendChild(n)},t.prototype.updateTickMarks=function(e,t){for(var n=Array.from(e.children),i=0;i<n.length;i++)t[i]===Za.ACTIVE?(n[i].classList.add(ls),n[i].classList.remove(cs)):(n[i].classList.add(cs),n[i].classList.remove(ls))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+os)),n=function(n){var o=t[n],r=i.inputs[n],a=Yr(Yr({},ga.createAdapter(i)),{addClass:function(e){o.classList.add(e)},computeBoundingRect:function(){return o.getBoundingClientRect()},deregisterInteractionHandler:function(e,t){r.removeEventListener(e,t)},isSurfaceActive:function(){return Xr(r,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,t){r.addEventListener(e,t)},removeClass:function(e){o.classList.remove(e)},updateCssVariable:function(e,t){o.style.setProperty(e,t)}}),s=new ga(o,new fa(a));s.unbounded=!0,e.push(s)},i=this,o=0;o<t.length;o++)n(o);return e},t}(qr),vs={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},xs={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},ws={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(fs||(fs={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(gs||(gs={}));var Fs={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},ks={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+Fs.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+Fs.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+Fs.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+Fs.LIST_ITEM_CLASS+" a,\n ."+Fs.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+Fs.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},Es={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},As={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape"},Cs=new Set;Cs.add(As.BACKSPACE),Cs.add(As.ENTER),Cs.add(As.SPACEBAR),Cs.add(As.PAGE_UP),Cs.add(As.PAGE_DOWN),Cs.add(As.END),Cs.add(As.HOME),Cs.add(As.ARROW_LEFT),Cs.add(As.ARROW_UP),Cs.add(As.ARROW_RIGHT),Cs.add(As.ARROW_DOWN),Cs.add(As.DELETE),Cs.add(As.ESCAPE);var Ms=new Map;Ms.set(8,As.BACKSPACE),Ms.set(13,As.ENTER),Ms.set(32,As.SPACEBAR),Ms.set(33,As.PAGE_UP),Ms.set(34,As.PAGE_DOWN),Ms.set(35,As.END),Ms.set(36,As.HOME),Ms.set(37,As.ARROW_LEFT),Ms.set(38,As.ARROW_UP),Ms.set(39,As.ARROW_RIGHT),Ms.set(40,As.ARROW_DOWN),Ms.set(46,As.DELETE),Ms.set(27,As.ESCAPE);var Ss=new Set;function Ts(e){var t=e.key;return Cs.has(t)?t:Ms.get(e.keyCode)||As.UNKNOWN}Ss.add(As.PAGE_UP),Ss.add(As.PAGE_DOWN),Ss.add(As.END),Ss.add(As.HOME),Ss.add(As.ARROW_LEFT),Ss.add(As.ARROW_UP),Ss.add(As.ARROW_RIGHT),Ss.add(As.ARROW_DOWN);var Ls=["input","button","textarea","select"],Ds=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===Ls.indexOf(n)&&e.preventDefault()}};function Is(e,t){var n,i=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,l=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout((function(){Os(t)}),Es.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,n=1===t.typeaheadBuffer.length?function(e,t,n,i){var o=i.typeaheadBuffer[0],r=e.get(o);if(!r)return-1;if(o===i.currentFirstChar&&r[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%r.length;var a=r[i.sortedIndexCursor].index;if(!n(a))return a}i.currentFirstChar=o;var s,l=-1;for(s=0;s<r.length;s++)if(!n(r[s].index)){l=s;break}for(;s<r.length;s++)if(r[s].index>t&&!n(r[s].index)){l=s;break}return-1!==l?(i.sortedIndexCursor=l,r[i.sortedIndexCursor].index):-1}(r,a,l,t):function(e,t,n){var i=n.typeaheadBuffer[0],o=e.get(i);if(!o)return-1;var r=o[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(r.index))return r.index;for(var a=(n.sortedIndexCursor+1)%o.length,s=-1;a!==n.sortedIndexCursor;){var l=o[a],c=0===l.text.lastIndexOf(n.typeaheadBuffer,0),d=!t(l.index);if(c&&d){s=a;break}a=(a+1)%o.length}return-1!==s?(n.sortedIndexCursor=s,o[n.sortedIndexCursor].index):-1}(r,l,t),-1===n||s||o(n),n}function Rs(e){return e.typeaheadBuffer.length>0}function Os(e){e.typeaheadBuffer=""}function Ps(e,t){var n=e.event,i=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,l="ArrowLeft"===Ts(n),c="ArrowUp"===Ts(n),d="ArrowRight"===Ts(n),u="ArrowDown"===Ts(n),h="Home"===Ts(n),m="End"===Ts(n),p="Enter"===Ts(n),f="Spacebar"===Ts(n);return l||c||d||u||h||m||p?-1:f||1!==n.key.length?f?(i&&Ds(n),i&&Rs(t)?Is({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},t):-1):-1:(Ds(n),Is({focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},t))}var $s,Bs,Ns=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=Es.UNSET_INDEX,i.focusedItemIndex=Es.UNSET_INDEX,i.useActivatedClass_=!1,i.useSelectedAttr_=!1,i.ariaCurrentAttrValue_=null,i.isCheckboxList_=!1,i.isRadioList_=!1,i.hasTypeahead=!1,i.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},i.sortedIndexByFirstChar=new Map,i}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return ks},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Fs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Es},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!0,configurable:!0}),t.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList_=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},t.prototype.setWrapFocus=function(e){this.wrapFocus_=e},t.prototype.setVerticalOrientation=function(e){this.isVertical_=e},t.prototype.setSingleSelection=function(e){this.isSingleSelectionList_=e,e&&this.maybeInitializeSingleSelection()},t.prototype.maybeInitializeSingleSelection=function(){for(var e=0;e<this.adapter.getListItemCount();e++){var t=this.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_ACTIVATED_CLASS);if(t||n)return n&&this.setUseActivatedClass(!0),this.isSingleSelectionList_=!0,void(this.selectedIndex_=e)}},t.prototype.setHasTypeahead=function(e){this.hasTypeahead=e,e&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},t.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&Rs(this.typeaheadState)},t.prototype.setUseActivatedClass=function(e){this.useActivatedClass_=e},t.prototype.setUseSelectedAttribute=function(e){this.useSelectedAttr_=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex_},t.prototype.setSelectedIndex=function(e){this.isIndexValid_(e)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(e):this.isRadioList_?this.setRadioAtIndex_(e):this.setSingleSelectionAtIndex_(e))},t.prototype.handleFocusIn=function(e,t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},t.prototype.handleFocusOut=function(e,t){var n=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout((function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()}),0)},t.prototype.handleKeydown=function(e,t,n){var i=this,o="ArrowLeft"===Ts(e),r="ArrowUp"===Ts(e),a="ArrowRight"===Ts(e),s="ArrowDown"===Ts(e),l="Home"===Ts(e),c="End"===Ts(e),d="Enter"===Ts(e),u="Spacebar"===Ts(e),h="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(r||c?(e.preventDefault(),this.focusLastElement()):(s||l)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)}};Ps(m,this.typeaheadState)}}else{var p=this.adapter.getFocusedElementIndex();if(!(-1===p&&(p=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)Ds(e),this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&o)Ds(e),this.focusPrevElement(p);else if(l)Ds(e),this.focusFirstElement();else if(c)Ds(e),this.focusLastElement();else if(h&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===Es.UNSET_INDEX?[]:this.selectedIndex_);else if((d||u)&&t){var f=e.target;if(f&&"A"===f.tagName&&d)return;if(Ds(e),this.adapter.listItemAtIndexHasClass(p,Fs.LIST_ITEM_DISABLED_CLASS))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(p),this.adapter.notifyAction(p))}this.hasTypeahead&&Ps(m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==Es.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(e,t),this.adapter.notifyAction(e)))},t.prototype.focusNextElement=function(e){var t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.focusItemAtIndex(t),t},t.prototype.focusPrevElement=function(e){var t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.focusItemAtIndex(t),t},t.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},t.prototype.focusLastElement=function(){var e=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(e),e},t.prototype.focusInitialElement=function(){var e=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(e),e},t.prototype.setEnabled=function(e,t){this.isIndexValid_(e)&&(t?(this.adapter.removeClassForElementIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,ks.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,ks.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=Fs.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=Fs.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==Es.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==Es.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===Es.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,ks.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?ks.ARIA_CURRENT:ks.ARIA_SELECTED;if(this.selectedIndex_!==Es.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==Es.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?ks.ARIA_SELECTED:ks.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==Es.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,t,"false"),this.adapter.setAttributeForElementIndex(e,t,"true"),this.selectedIndex_=e},t.prototype.setCheckboxAtIndex_=function(e){for(var t=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var i=!1;e.indexOf(n)>=0&&(i=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,i),this.adapter.setAttributeForElementIndex(n,t,i?"true":"false")}this.selectedIndex_=e},t.prototype.setTabindexAtIndex=function(e){this.focusedItemIndex===Es.UNSET_INDEX&&0!==e?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==e&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex_ instanceof Array||this.selectedIndex_===e||this.adapter.setAttributeForElementIndex(this.selectedIndex_,"tabindex","-1"),e!==Es.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(e,"tabindex","0")},t.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},t.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var e=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(e)},t.prototype.getFirstSelectedOrFocusedItemIndex=function(){var e=this.focusedItemIndex>=0?this.focusedItemIndex:0;return this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==Es.UNSET_INDEX?e=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(e=this.selectedIndex_.reduce((function(e,t){return Math.min(e,t)})))),e},t.prototype.isIndexValid_=function(e){var t=this;if(e instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===e.length||e.some((function(e){return t.isIndexInRange_(e)}))}if("number"==typeof e){if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return this.isIndexInRange_(e)||this.isSingleSelectionList_&&e===Es.UNSET_INDEX}return!1},t.prototype.isIndexInRange_=function(e){var t=this.adapter.getListItemCount();return e>=0&&e<t},t.prototype.setSelectedIndexOnAction_=function(e,t){void 0===t&&(t=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(e,t):this.setSelectedIndex(e)},t.prototype.toggleCheckboxAtIndex_=function(e,t){var n=this.getSelectionAttribute(),i=this.adapter.isCheckboxCheckedAtIndex(e);t&&(i=!i,this.adapter.setCheckedCheckboxOrRadioAtIndex(e,i)),this.adapter.setAttributeForElementIndex(e,n,i?"true":"false");var o=this.selectedIndex_===Es.UNSET_INDEX?[]:this.selectedIndex_.slice();i?o.push(e):o=o.filter((function(t){return t!==e})),this.selectedIndex_=o},t.prototype.focusItemAtIndex=function(e){this.adapter.focusItemAtIndex(e),this.focusedItemIndex=e},t.prototype.toggleAll=function(e){var t=this.adapter.getListItemCount();if(e.length===t)this.setCheckboxAtIndex_([]);else{for(var n=[],i=0;i<t;i++)(!this.adapter.listItemAtIndexHasClass(i,Fs.LIST_ITEM_DISABLED_CLASS)||e.indexOf(i)>-1)&&n.push(i);this.setCheckboxAtIndex_(n)}},t.prototype.typeaheadMatchItem=function(e,t,n){var i=this;return void 0===n&&(n=!1),Is({focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:t||this.focusedItemIndex,nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,Fs.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},t.prototype.typeaheadInitSortedIndex=function(){return function(e,t){for(var n=new Map,i=0;i<e;i++){var o=t(i).trim();if(o){var r=o[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:o.toLowerCase(),index:i})}}return n.forEach((function(e){e.sort((function(e,t){return e.index-t.index}))})),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},t.prototype.clearTypeaheadBuffer=function(){Os(this.typeaheadState)},t}(Wr),zs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),Object.defineProperty(t.prototype,"vertical",{set:function(e){this.foundation.setVerticalOrientation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listElements",{get:function(){return[].slice.call(this.root.querySelectorAll("."+Fs.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{set:function(e){this.foundation.setWrapFocus(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.foundation.setHasTypeahead(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.foundation.setSingleSelection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e)},enumerable:!0,configurable:!0}),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},t.prototype.layout=function(){var e=this.root.getAttribute(ks.ARIA_ORIENTATION);this.vertical=e!==ks.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach((function(e){e.setAttribute("tabindex","-1")})),[].slice.call(this.root.querySelectorAll(ks.FOCUSABLE_CHILD_ELEMENTS)).forEach((function(e){return e.setAttribute("tabindex","-1")})),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+Fs.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+Fs.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(ks.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(ks.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(ks.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(i,(function(t){return e.listElements.indexOf(t)}))}else n&&(this.selectedIndex=this.listElements.indexOf(n))},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.typeaheadMatchItem=function(e,t){return this.foundation.typeaheadMatchItem(e,t,!0)},t.prototype.getDefaultFoundation=function(){var e=this;return new Ns({addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(n)},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},getAttributeForElementIndex:function(t,n){return e.listElements[t].getAttribute(n)},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},getListItemCount:function(){return e.listElements.length},getPrimaryTextAtIndex:function(t){return e.getPrimaryText(e.listElements[t])},hasCheckboxAtIndex:function(t){return!!e.listElements[t].querySelector(ks.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(ks.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(ks.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return e.root!==document.activeElement&&e.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===e.root},listItemAtIndexHasClass:function(t,n){return e.listElements[t].classList.contains(n)},notifyAction:function(t){e.emit(ks.ACTION_EVENT,{index:t},!0)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(n)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements[t];o&&o.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(ks.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(ks.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach((function(e){return e.setAttribute("tabindex",n)}))}})},t.prototype.getListItemIndex_=function(e){var t=Kr(e.target,"."+Fs.LIST_ITEM_CLASS+", ."+Fs.ROOT);return t&&Xr(t,"."+Fs.LIST_ITEM_CLASS)?this.listElements.indexOf(t):-1},t.prototype.handleFocusInEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusIn(e,t)},t.prototype.handleFocusOutEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusOut(e,t)},t.prototype.handleKeydownEvent_=function(e){var t=this.getListItemIndex_(e),n=e.target;this.foundation.handleKeydown(e,n.classList.contains(Fs.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!Xr(e.target,ks.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(qr),js=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=gs.TOP_START,i.originCorner=gs.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return vs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return xs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ws},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return gs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^fs.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){e.adapter.addClass(t.cssClasses.OPEN),e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.openAnimationEndTimerId=setTimeout((function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()}),ws.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var n=this;void 0===e&&(e=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){n.adapter.removeClass(t.cssClasses.OPEN),n.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()}),ws.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()))},t.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},t.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},t.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),o=this.hasBit(n,fs.BOTTOM)?"bottom":"top",r=this.hasBit(n,fs.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),s=this.getVerticalOriginOffset(n),l=this.measurements,c=l.anchorSize,d=l.surfaceSize,u=((e={})[r]=a,e[o]=s,e);c.width/d.width>ws.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(u),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(u),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,fs.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:n.width-e.right,bottom:n.height-e.bottom,left:e.left},viewportSize:n,windowScroll:i}},t.prototype.getoriginCorner=function(){var e,n,i=this.originCorner,o=this.measurements,r=o.viewportDistance,a=o.anchorSize,s=o.surfaceSize,l=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,fs.BOTTOM)?(e=r.top-l+a.height+this.anchorMargin.bottom,n=r.bottom-l-this.anchorMargin.bottom):(e=r.top-l+this.anchorMargin.top,n=r.bottom-l+a.height-this.anchorMargin.top),!(n-s.height>0)&&e>=n&&(i=this.setBit(i,fs.BOTTOM));var c,d,u,h=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,fs.FLIP_RTL),p=this.hasBit(this.anchorCorner,fs.RIGHT)||this.hasBit(i,fs.RIGHT);(u=h&&m?!p:p)?(c=r.left+a.width+this.anchorMargin.right,d=r.right-this.anchorMargin.right):(c=r.left+this.anchorMargin.left,d=r.right+a.width-this.anchorMargin.left);var f=c-s.width>0,g=d-s.width>0,b=this.hasBit(i,fs.FLIP_RTL)&&this.hasBit(i,fs.RIGHT);return g&&b&&h||!f&&b?i=this.unsetBit(i,fs.RIGHT):(f&&u&&h||f&&!u&&p||!g&&c>=d)&&(i=this.setBit(i,fs.RIGHT)),i},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,o=this.hasBit(e,fs.BOTTOM),r=this.hasBit(this.anchorCorner,fs.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return o?(i=n.top+this.anchorMargin.top-a,r||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(i-=this.measurements.anchorSize.height)),i},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,fs.RIGHT),i=this.hasBit(this.anchorCorner,fs.RIGHT);if(n){var o=i?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return i?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,fs.BOTTOM),i=this.hasBit(this.anchorCorner,fs.BOTTOM);return n?i?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?t.height+this.anchorMargin.bottom:this.anchorMargin.top},t.prototype.adjustPositionForHoistedElement=function(e){var t,n,i=this.measurements,o=i.windowScroll,r=i.viewportDistance,a=Object.keys(e);try{for(var s=Hr(a),l=s.next();!l.done;l=s.next()){var c=l.value,d=e[c]||0;d+=r[c],this.isFixedPosition||("top"===c?d+=o.y:"bottom"===c?d-=o.y:"left"===c?d+=o.x:d-=o.x),e[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this.adapter.isFocused(),t=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||t)&&this.adapter.restoreFocus()},t.prototype.hasBit=function(e,t){return Boolean(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(Wr),Ys=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this,t=this.root.parentElement;this.anchorElement=t&&t.classList.contains(vs.ANCHOR)?t:null,this.root.classList.contains(vs.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleBodyClick=function(t){e.foundation.handleBodyClick(t)},this.registerBodyClickListener=function(){document.body.addEventListener("click",e.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",e.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(xs.OPENED_EVENT,this.registerBodyClickListener),this.listen(xs.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(xs.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(xs.CLOSED_EVENT,this.deregisterBodyClickListener),e.prototype.destroy.call(this)},t.prototype.isOpen=function(){return this.foundation.isOpen()},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(e){void 0===e&&(e=!1),this.foundation.close(e)},Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.foundation.setQuickOpen(e)},enumerable:!0,configurable:!0}),t.prototype.setIsHoisted=function(e){this.foundation.setIsHoisted(e)},t.prototype.setMenuSurfaceAnchorElement=function(e){this.anchorElement=e},t.prototype.setFixedPosition=function(e){e?this.root.classList.add(vs.FIXED):this.root.classList.remove(vs.FIXED),this.foundation.setFixedPosition(e)},t.prototype.setAbsolutePosition=function(e,t){this.foundation.setAbsolutePosition(e,t),this.setIsHoisted(!0)},t.prototype.setAnchorCorner=function(e){this.foundation.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.foundation.setAnchorMargin(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new js({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(js.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(js.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root).getPropertyValue("direction")},setTransformOrigin:function(t){var n=function(e,t){if(void 0===t&&(t=!1),void 0===$s||t){var n=e.document.createElement("div");$s="transform"in n.style?"transform":"webkitTransform"}return $s}(window)+"-origin";e.root.style.setProperty(n,t)},isFocused:function(){return document.activeElement===e.root},saveFocus:function(){e.previousFocus=document.activeElement},restoreFocus:function(){e.root.contains(document.activeElement)&&e.previousFocus&&e.previousFocus.focus&&e.previousFocus.focus()},getInnerDimensions:function(){return{width:e.root.offsetWidth,height:e.root.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement?e.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){var n=e.root;n.style.left="left"in t?t.left+"px":"",n.style.right="right"in t?t.right+"px":"",n.style.top="top"in t?t.top+"px":"",n.style.bottom="bottom"in t?t.bottom+"px":""},setMaxHeight:function(t){e.root.style.maxHeight=t}})},t}(qr),Hs={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Us={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},Vs={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(Bs||(Bs={}));var Ws=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=Bs.LIST_ROOT,i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Hs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Us},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Vs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var t=e.key,n=e.keyCode;("Tab"===t||9===n)&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var t=this,n=this.adapter.getElementIndex(e);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout((function(){var n=t.adapter.getElementIndex(e);n>=0&&t.adapter.isSelectableItemAtIndex(n)&&t.setSelectedIndex(n)}),js.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case Bs.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Bs.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Bs.NONE:break;default:this.adapter.focusListRoot()}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState_=e},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex_(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,Us.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,Hs.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,Hs.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,Us.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,Us.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,Fs.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,Us.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex_=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e<t))throw new Error("MDCMenuFoundation: No list item at specified index.")},t}(Wr),qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new Ys(e)}),void 0===t&&(t=function(e){return new zs(e)}),this.menuSurfaceFactory_=e,this.listFactory_=t},t.prototype.initialSyncWithDOM=function(){var e=this;this.menuSurface_=this.menuSurfaceFactory_(this.root);var t=this.root.querySelector(Us.LIST_SELECTOR);t?(this.list_=this.listFactory_(t),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(t){return e.foundation.handleKeydown(t)},this.handleItemAction_=function(t){return e.foundation.handleItemAction(e.items[t.detail.index])},this.handleMenuSurfaceOpened_=function(){return e.foundation.handleMenuSurfaceOpened()},this.menuSurface_.listen(js.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(Ns.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(js.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Ns.strings.ACTION_EVENT,this.handleItemAction_),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(e){e?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(e){this.list_&&(this.list_.wrapFocus=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.list_&&(this.list_.hasTypeahead=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return!!this.list_&&this.list_.typeaheadInProgress},enumerable:!0,configurable:!0}),t.prototype.typeaheadMatchItem=function(e,t){return this.list_?this.list_.typeaheadMatchItem(e,t):-1},t.prototype.layout=function(){this.list_&&this.list_.layout()},Object.defineProperty(t.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.list_&&(this.list_.singleSelection=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.list_?this.list_.selectedIndex:Es.UNSET_INDEX},set:function(e){this.list_&&(this.list_.selectedIndex=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.menuSurface_.quickOpen=e},enumerable:!0,configurable:!0}),t.prototype.setDefaultFocusState=function(e){this.foundation.setDefaultFocusState(e)},t.prototype.setAnchorCorner=function(e){this.menuSurface_.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.menuSurface_.setAnchorMargin(e)},t.prototype.setSelectedIndex=function(e){this.foundation.setSelectedIndex(e)},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.getOptionByIndex=function(e){return e<this.items.length?this.items[e]:null},t.prototype.getPrimaryTextAtIndex=function(e){var t=this.getOptionByIndex(e);return t&&this.list_&&this.list_.getPrimaryText(t)||""},t.prototype.setFixedPosition=function(e){this.menuSurface_.setFixedPosition(e)},t.prototype.setIsHoisted=function(e){this.menuSurface_.setIsHoisted(e)},t.prototype.setAbsolutePosition=function(e,t){this.menuSurface_.setAbsolutePosition(e,t)},t.prototype.setAnchorElement=function(e){this.menuSurface_.anchorElement=e},t.prototype.getDefaultFoundation=function(){var e=this;return new Ws({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(t){return e.menuSurface_.close(t)},getElementIndex:function(t){return e.items.indexOf(t)},notifySelected:function(t){return e.emit(Us.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})},getMenuItemCount:function(){return e.items.length},focusItemAtIndex:function(t){return e.items[t].focus()},focusListRoot:function(){return e.root.querySelector(Us.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!Kr(e.items[t],"."+Hs.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=Kr(e.items[t],"."+Hs.MENU_SELECTION_GROUP).querySelector("."+Hs.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(qr),Gs={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},Ks={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Xs={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Zs=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=Xs.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Gs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Xs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ks},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!0,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),e>=this.adapter.getMenuItemCount()||(e===Xs.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),n||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var n=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(n,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==Xs.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(Gs.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(Gs.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass(Gs.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(Gs.FOCUSED),n=e||t,i=this.adapter.hasClass(Gs.REQUIRED);this.notchOutline(n),this.adapter.floatLabel(n),this.adapter.setLabelRequired(i)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},t.prototype.handleMenuClosed=function(){this.adapter.removeClass(Gs.ACTIVATED),this.isMenuOpen=!1,this.adapter.setSelectAnchorAttr("aria-expanded","false"),this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(Gs.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(Gs.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(Gs.FOCUSED)){var t=Ts(e)===As.ENTER,n=Ts(e)===As.SPACEBAR,i=Ts(e)===As.ARROW_UP,o=Ts(e)===As.ARROW_DOWN;if(!n&&e.key&&1===e.key.length||n&&this.adapter.isTypeaheadInProgress()){var r=n?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void e.preventDefault()}(t||n||i||o)&&(i&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):o&&this.getSelectedIndex()<this.adapter.getMenuItemCount()-1&&this.setSelectedIndex(this.getSelectedIndex()+1),this.openMenu(),e.preventDefault())}},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(Gs.FOCUSED);if(e){var n=Xs.LABEL_SCALE,i=this.adapter.getLabelWidth()*n;this.adapter.notchOutline(i)}else t||this.adapter.closeOutline()}},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},t.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(Gs.INVALID),this.adapter.removeMenuClass(Gs.MENU_INVALID)):(this.adapter.addClass(Gs.INVALID),this.adapter.addMenuClass(Gs.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(Gs.REQUIRED)&&!this.adapter.hasClass(Gs.DISABLED)?this.getSelectedIndex()!==Xs.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(Gs.REQUIRED):this.adapter.removeClass(Gs.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},t.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},t.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner(gs.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(Gs.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(Gs.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(Gs.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(Gs.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),n=this.helperText.getId();t&&n?this.adapter.setSelectAnchorAttr(Ks.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(Ks.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){e.recentlyClicked=!1}),Xs.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(Wr),Js={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},Qs={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},el=function(e){function t(n){return e.call(this,Yr(Yr({},t.defaultAdapter),n))||this}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Qs},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Js},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},getAttr:function(){return null},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(Js.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(Qs.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(Qs.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(Qs.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(Qs.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(Qs.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(Qs.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t)return this.showToScreenReader(),void(e?this.adapter.removeAttr(Js.ROLE):this.adapter.setAttr(Js.ROLE,"alert"));this.adapter.removeAttr(Js.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(Js.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(Js.ARIA_HIDDEN,"true")},t}(Wr),tl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new el({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(qr),nl={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},il=["click","keydown"],ol=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return jr(t,e),Object.defineProperty(t,"strings",{get:function(){return nl},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),il.forEach((function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)}))},t.prototype.destroy=function(){var e=this;il.forEach((function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)}))},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",nl.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&this.adapter.notifyIconAction()},t}(Wr),rl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new ol({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(ol.strings.ICON_EVENT,{},!0)}})},t}(qr),al=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r){if(void 0===e&&(e=function(e){return new ea(e)}),void 0===t&&(t=function(e){return new ia(e)}),void 0===n&&(n=function(e){return new la(e)}),void 0===i&&(i=function(e){return new qs(e)}),void 0===o&&(o=function(e){return new rl(e)}),void 0===r&&(r=function(e){return new tl(e)}),this.selectAnchor=this.root.querySelector(Ks.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(Ks.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(Ks.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw new Error("MDCSelect: Missing required element: The following selector must be present: '"+Ks.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(Ks.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(Ks.ARIA_CONTROLS));a&&(this.helperText=r(a))}this.menuSetup(i);var s=this.root.querySelector(Ks.LABEL_SELECTOR);this.label=s?e(s):null;var l=this.root.querySelector(Ks.LINE_RIPPLE_SELECTOR);this.lineRipple=l?t(l):null;var c=this.root.querySelector(Ks.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(Ks.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=o(d)),this.root.classList.contains(Gs.OUTLINED)||(this.ripple=this.createRipple())},t.prototype.initialSyncWithDOM=function(){var e=this;if(this.handleFocus=function(){e.foundation.handleFocus()},this.handleBlur=function(){e.foundation.handleBlur()},this.handleClick=function(t){e.selectAnchor.focus(),e.foundation.handleClick(e.getNormalizedXCoordinate(t))},this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleMenuItemAction=function(t){e.foundation.handleMenuItemAction(t.detail.index)},this.handleMenuOpened=function(){e.foundation.handleMenuOpened()},this.handleMenuClosed=function(){e.foundation.handleMenuClosed()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(xs.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(xs.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(Us.SELECTED_EVENT,this.handleMenuItemAction),this.hiddenInput){if(this.hiddenInput.value)return this.foundation.setValue(this.hiddenInput.value,!0),void this.foundation.layout();this.hiddenInput.value=this.value}},t.prototype.destroy=function(){this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(xs.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(xs.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(Us.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.getDisabled()},set:function(e){this.foundation.setDisabled(e),this.hiddenInput&&(this.hiddenInput.disabled=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useDefaultValidation",{set:function(e){this.foundation.setUseDefaultValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.foundation.getRequired()},set:function(e){this.foundation.setRequired(e)},enumerable:!0,configurable:!0}),t.prototype.layout=function(){this.foundation.layout()},t.prototype.layoutOptions=function(){this.foundation.layoutOptions(),this.menu.layout(),this.menuItemValues=this.menu.items.map((function(e){return e.getAttribute(Ks.VALUE_ATTR)||""})),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){var e=Yr(Yr(Yr(Yr({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods());return new Zs(e,this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(Ks.MENU_SELECTOR),this.menu=e(this.menuElement),this.menu.hasTypeahead=!0,this.menu.singleSelection=!0,this.menuItemValues=this.menu.items.map((function(e){return e.getAttribute(Ks.VALUE_ATTR)||""}))},t.prototype.createRipple=function(){var e=this,t=Yr(Yr({},ga.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new ga(this.selectAnchor,new fa(t))},t.prototype.getSelectAdapterMethods=function(){var e=this;return{getMenuItemAttr:function(e,t){return e.getAttribute(t)},setSelectedText:function(t){e.selectedText.textContent=t},isSelectAnchorFocused:function(){return document.activeElement===e.selectAnchor},getSelectAnchorAttr:function(t){return e.selectAnchor.getAttribute(t)},setSelectAnchorAttr:function(t,n){e.selectAnchor.setAttribute(t,n)},removeSelectAnchorAttr:function(t){e.selectAnchor.removeAttribute(t)},addMenuClass:function(t){e.menuElement.classList.add(t)},removeMenuClass:function(t){e.menuElement.classList.remove(t)},openMenu:function(){e.menu.open=!0},closeMenu:function(){e.menu.open=!1},getAnchorElement:function(){return e.root.querySelector(Ks.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(t){e.menu.setAnchorElement(t)},setMenuAnchorCorner:function(t){e.menu.setAnchorCorner(t)},setMenuWrapFocus:function(t){e.menu.wrapFocus=t},getSelectedIndex:function(){var t=e.menu.selectedIndex;return t instanceof Array?t[0]:t},setSelectedIndex:function(t){e.menu.selectedIndex=t},focusMenuItemAtIndex:function(t){e.menu.items[t].focus()},getMenuItemCount:function(){return e.menu.items.length},getMenuItemValues:function(){return e.menuItemValues},getMenuItemTextAtIndex:function(t){return e.menu.getPrimaryTextAtIndex(t)},isTypeaheadInProgress:function(){return e.menu.typeaheadInProgress},typeaheadMatchItem:function(t,n){return e.menu.typeaheadMatchItem(t,n)}}},t.prototype.getCommonAdapterMethods=function(){var e=this;return{addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setRippleCenter:function(t){e.lineRipple&&e.lineRipple.setRippleCenter(t)},activateBottomLine:function(){e.lineRipple&&e.lineRipple.activate()},deactivateBottomLine:function(){e.lineRipple&&e.lineRipple.deactivate()},notifyChange:function(t){var n=e.selectedIndex;e.emit(Ks.CHANGE_EVENT,{value:t,index:n},!0),e.hiddenInput&&(e.hiddenInput.value=t)}}},t.prototype.getOutlineAdapterMethods=function(){var e=this;return{hasOutline:function(){return Boolean(e.outline)},notchOutline:function(t){e.outline&&e.outline.notch(t)},closeOutline:function(){e.outline&&e.outline.closeNotch()}}},t.prototype.getLabelAdapterMethods=function(){var e=this;return{hasLabel:function(){return!!e.label},floatLabel:function(t){e.label&&e.label.float(t)},getLabelWidth:function(){return e.label?e.label.getWidth():0},setLabelRequired:function(t){e.label&&e.label.setRequired(t)}}},t.prototype.getNormalizedXCoordinate=function(e){var t=e.target.getBoundingClientRect();return(this.isTouchEvent(e)?e.touches[0].clientX:e.clientX)-t.left},t.prototype.isTouchEvent=function(e){return Boolean(e.touches)},t.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundationForSelect:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForSelect:void 0}},t}(qr),sl={ROOT:"mdc-form-field"},ll={LABEL_SELECTOR:".mdc-form-field > label"},cl=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return sl},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ll},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},t.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){e.adapter.deactivateInputRipple()}))},t}(Wr),dl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=cl.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new cl({activateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.activate()},deactivateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.deactivate()},deregisterInteractionHandler:function(t,n){var i=e.labelEl();i&&i.removeEventListener(t,n)},registerInteractionHandler:function(t,n){var i=e.labelEl();i&&i.addEventListener(t,n)}})},t}(qr),ul={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},hl={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"},ml=function(e){function t(n){var i=e.call(this,Yr(Yr({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return jr(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ul},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return hl},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this.adapter.getAttr(hl.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(hl.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(hl.ARIA_PRESSED))throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(hl.ARIA_PRESSED,String(this.isOn()))},t.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},t.prototype.isOn=function(){return this.adapter.hasClass(ul.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(ul.ICON_BUTTON_ON):this.adapter.removeClass(ul.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(hl.DATA_ARIA_LABEL_ON):this.adapter.getAttr(hl.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(hl.ARIA_LABEL,t||"")}else this.adapter.setAttr(hl.ARIA_PRESSED,""+e)},t}(Wr),pl=ml.strings,fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return jr(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen("click",this.handleClick)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new ml({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(pl.CHANGE_EVENT,t)},removeClass:function(t){return e.root.classList.remove(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(e){this.foundation.toggle(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple=function(){var e=new ga(this.root);return e.unbounded=!0,e},t}(qr);const gl="important",bl=" !"+gl,_l=$e(class extends Be{constructor(e){var t;if(super(e),1!==e.type||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ht){this.ht=new Set;for(const e in t)this.ht.add(e);return this.render(t)}this.ht.forEach((e=>{null==t[e]&&(this.ht.delete(e),e.includes("-")?n.removeProperty(e):n[e]="")}));for(const e in t){const i=t[e];if(null!=i){this.ht.add(e);const t="string"==typeof i&&i.endsWith(bl);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?gl:""):n[e]=i}}return Y}});var yl=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};const vl=o(65744),xl=o(72832);class wl extends CustomEvent{constructor(e){super(wl.NAME,{detail:e,bubbles:!0,composed:!0})}}var Fl,kl;function El(e,t,n,i,o){switch(i=i||"listbox",e){case Fl.RADIO:i="radiogroup";break;case Fl.MULTI_CHECKBOX:i="group"}return j`
|
|
67
67
|
<ul id="list" class="mdc-list${n?" mdc-list--two-line":""}" role="${Oe(i)}" @MDCList:action="${e=>o&&o(e)}" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
|
|
68
68
|
${t}
|
|
69
69
|
</ul>
|
|
@@ -708,7 +708,7 @@
|
|
|
708
708
|
${this.content||""}
|
|
709
709
|
</div>`:""}
|
|
710
710
|
</div>
|
|
711
|
-
`}};function nc(e,t,n){return{index:e,removed:t,addedCount:n}}ec([Le({type:Number})],tc.prototype,"loadingHeight",void 0),ec([Le({type:Boolean})],tc.prototype,"loadDom",void 0),ec([Le({type:Boolean})],tc.prototype,"fadeContent",void 0),ec([Le({type:Boolean})],tc.prototype,"loading",void 0),ec([Le({type:Object,attribute:!1})],tc.prototype,"content",void 0),tc=ec([Me("or-loading-wrapper")],tc),window.JSCompiler_renameProperty=function(e,t){return e};function ic(e,t){return e===t}let oc=0,rc=0,ac=[],sc=0,lc=!1,cc=document.createTextNode("");new window.MutationObserver((function(){lc=!1;const e=ac.length;for(let t=0;t<e;t++){let e=ac[t];if(e)try{e()}catch(e){setTimeout((()=>{throw e}))}}ac.splice(0,e),rc+=e})).observe(cc,{characterData:!0});const dc={run:e=>(lc||(lc=!0,cc.textContent=sc++),ac.push(e),oc++),cancel(e){const t=e-rc;if(t>=0){if(!ac[t])throw new Error("invalid async handle: "+e);ac[t]=null}}},uc=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e;function hc(e){return"slot"===e.localName}let mc=class{static getFlattenedNodes(e){const t=uc(e);return hc(e)?t.assignedNodes({flatten:!0}):Array.from(t.childNodes).map((e=>hc(e)?uc(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){hc(this._target)?this._listenSlots([this._target]):uc(this._target).children&&(this._listenSlots(uc(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){hc(this._target)?this._unlistenSlots([this._target]):uc(this._target).children&&(this._unlistenSlots(uc(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,dc.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let n=e[t];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),n=(i=t,o=this._effectiveNodes,function(e,t,n,i,o,r){let a,s=0,l=0,c=Math.min(n-t,r-o);if(0==t&&0==o&&(s=function(e,t,n){for(let i=0;i<n;i++)if(!ic(e[i],t[i]))return i;return n}(e,i,c)),n==e.length&&r==i.length&&(l=function(e,t,n){let i=e.length,o=t.length,r=0;for(;r<n&&ic(e[--i],t[--o]);)r++;return r}(e,i,c-s)),o+=s,r-=l,(n-=l)-(t+=s)==0&&r-o==0)return[];if(t==n){for(a=nc(t,[],0);o<r;)a.removed.push(i[o++]);return[a]}if(o==r)return[nc(t,[],n-t)];let d=function(e){let t=e.length-1,n=e[0].length-1,i=e[t][n],o=[];for(;t>0||n>0;){if(0==t){o.push(2),n--;continue}if(0==n){o.push(3),t--;continue}let r,a=e[t-1][n-1],s=e[t-1][n],l=e[t][n-1];r=s<l?s<a?s:a:l<a?l:a,r==a?(a==i?o.push(0):(o.push(1),i=a),t--,n--):r==s?(o.push(3),t--,i=s):(o.push(2),n--,i=l)}return o.reverse(),o}(function(e,t,n,i,o,r){let a=r-o+1,s=n-t+1,l=new Array(a);for(let e=0;e<a;e++)l[e]=new Array(s),l[e][0]=e;for(let e=0;e<s;e++)l[0][e]=e;for(let n=1;n<a;n++)for(let r=1;r<s;r++)if(ic(e[t+r-1],i[o+n-1]))l[n][r]=l[n-1][r-1];else{let e=l[n-1][r]+1,t=l[n][r-1]+1;l[n][r]=e<t?e:t}return l}(e,t,n,i,o,r));a=void 0;let u=[],h=t,m=o;for(let e=0;e<d.length;e++)switch(d[e]){case 0:a&&(u.push(a),a=void 0),h++,m++;break;case 1:a||(a=nc(h,[],0)),a.addedCount++,h++,a.removed.push(i[m]),m++;break;case 2:a||(a=nc(h,[],0)),a.addedCount++,h++;break;case 3:a||(a=nc(h,[],0)),a.removed.push(i[m]),m++}return a&&u.push(a),u}(i,0,i.length,o,0,o.length));var i,o;for(let t,i=0;i<n.length&&(t=n[i]);i++)for(let n,i=0;i<t.removed.length&&(n=t.removed[i]);i++)e.removedNodes.push(n);for(let i,o=0;o<n.length&&(i=n[o]);o++)for(let n=i.index;n<i.index+i.addedCount;n++)e.addedNodes.push(t[n]);this._effectiveNodes=t;let r=!1;return(e.addedNodes.length||e.removedNodes.length)&&(r=!0,this.callback.call(this._target,e)),r}_listenSlots(e){for(let t=0;t<e.length;t++){let n=e[t];hc(n)&&n.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let n=e[t];hc(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}};var pc=o(77280),fc=o.n(pc),gc=o(57688),bc=o.n(gc);function _c(e){if(e){if(e instanceof pc.LngLat)return e;if(e.lat)return e.lon?{lng:e.lon,lat:e.lat}:{lng:e.lng,lat:e.lat};if(Array.isArray(e))return{lng:e[0],lat:e[1]};if(e.coordinates&&Array.isArray(e.coordinates)&&e.coordinates.length>=2)return _c(e.coordinates);if(e.attributes){const t=e.attributes.location;if(!t)return;return t.value?_c(t.value):void 0}return e.value?_c(e.value):void 0}}function yc(e){if(e)return Array.isArray(e)?{type:"Point",coordinates:e}:{type:"Point",coordinates:[e.hasOwnProperty("lng")?e.lng:e.lon,e.lat]}}function vc(e,t){if(!e)return;const n="string"==typeof e?wi.getAssetDescriptor(e):e,i=n&&n.icon?n.icon:"help-circle";let o=n&&n.colour?n.colour:void 0;if(t&&t.markerConfig){const e=t.markerConfig,n=t.currentValue;if("range"===e.type&&e.ranges&&"number"==typeof n){const t=e.ranges;o=(t.sort(((e,t)=>t.min-e.min)).find((e=>n>=e.min))||t.reduce(((e,t)=>t.min>e.min?e:t))).colour||void 0}else"boolean"===e.type?o=e[!!n+""]:"string"===e.type&&(o=e[n+""])}return{color:o,icon:i}}o(45455);var xc=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const wc=o(77792),Fc=o(21704),kc=o(45455),Ec=(e,t)=>e/.075/Math.cos(t*Math.PI/180);class Ac{constructor(e,t,n,i=!1,o=!1,r=!0,a=!0){this._loaded=!1,this._markersJs=new Map,this._markersGl=new Map,this._geoJsonSources=[],this._geoJsonLayers=new Map,this._showGeoCodingControl=!1,this._showBoundaryBox=!1,this._useZoomControls=!0,this._showGeoJson=!0,this._clickHandlers=new Map,this._type=e,this._styleParent=t,this._mapContainer=n,this._showGeoCodingControl=i,this._showBoundaryBox=o,this._useZoomControls=r,this._showGeoJson=a}setCenter(e){switch(this._center=_c(e),this._type){case"RASTER":if(this._mapJs){const e=_c(this._center)||(this._viewSettings?_c(this._viewSettings.center):void 0);e&&this._mapJs.setView(e,void 0,{pan:{animate:!1},zoom:{animate:!1}})}break;case"VECTOR":this._mapGl&&this._center&&this._mapGl.setCenter(this._center)}return this}flyTo(e,t){switch(this._type){case"RASTER":this._mapJs;break;case"VECTOR":e||(e=this._center?this._center:this._viewSettings?this._viewSettings.center:void 0),t||(t=this._zoom?this._zoom:this._viewSettings&&this._viewSettings.zoom?this._viewSettings.zoom:void 0),this._mapGl?e&&this._mapGl.flyTo({center:e,zoom:t}):(this._center=e,this._zoom=t)}return this}resize(){switch(this._type){case"RASTER":this._mapJs;break;case"VECTOR":this._mapGl&&this._mapGl.resize()}return this}setZoom(e){switch(this._zoom=e,this._type){case"RASTER":this._mapJs&&this._zoom&&this._mapJs.setZoom(this._zoom,{animate:!1});break;case"VECTOR":this._mapGl&&this._zoom&&this._mapGl.setZoom(this._zoom)}return this}setControls(e){return this._controls=e,this._mapGl&&(this._controls?this._controls.forEach((e=>{if(Array.isArray(e)){const t=e;this._mapGl.addControl(t[0],t[1])}else this._mapGl.addControl(e)})):this._mapGl.addControl(new pc.NavigationControl)),this}setGeoJson(e){var t;return this._geoJsonConfig=e,this._mapGl&&(this._geoJsonConfig?this.loadGeoJSON(this._geoJsonConfig):this.loadGeoJSON(null===(t=this._viewSettings)||void 0===t?void 0:t.geoJson)),this}loadViewSettings(){var e;return xc(this,void 0,void 0,(function*(){let t;t="RASTER"===this._type?yield $r.rest.api.MapResource.getSettingsJs():yield $r.rest.api.MapResource.getSettings();const n=t.data,i=$r.displayRealm||"default";return this._viewSettings=n.options?n.options[i]?n.options[i]:n.options.default:null,this._viewSettings&&(this._mapGl&&(this._mapGl.setMinZoom(this._viewSettings.minZoom),this._mapGl.setMaxZoom(this._viewSettings.maxZoom),this._viewSettings.bounds&&this._mapGl.setMaxBounds(this._viewSettings.bounds),this._geoJsonConfig?yield this.loadGeoJSON(this._geoJsonConfig):yield this.loadGeoJSON(null===(e=this._viewSettings)||void 0===e?void 0:e.geoJson)),this._center?this.setCenter(this._center):this.setCenter(this._viewSettings.center)),n}))}load(){var e;return xc(this,void 0,void 0,(function*(){if(!this._loaded){if("RASTER"===this._type){const e=document.createElement("style");e.id="mapboxJsStyle",e.textContent=wc,this._styleParent.appendChild(e);const t=yield this.loadViewSettings();let n;if(this._viewSettings){if(n={},n.zoom=this._viewSettings.zoom?this._viewSettings.zoom+1:void 0,this._useZoomControls&&(n.maxZoom=this._viewSettings.maxZoom?this._viewSettings.maxZoom-1:void 0,n.minZoom=this._viewSettings.minZoom?this._viewSettings.minZoom+1:void 0),n.boxZoom=this._viewSettings.boxZoom,this._viewSettings.bounds&&(n.maxBounds=function(e){const t=function(e){if(e){if(e instanceof pc.LngLatBounds)return e;const t=e;if(2===t.length){const e=_c(t[0]),n=_c(t[1]);if(e&&n)return new pc.LngLatBounds(e,n)}if(4===t.length)return new pc.LngLatBounds([t[0],t[1],t[2],t[3]])}}(e);if(t)return L.latLngBounds(t.getNorthEast(),t.getSouthWest())}(this._viewSettings.bounds)),this._viewSettings.center){const e=_c(this._viewSettings.center);n.center=e?L.latLng(e.lat,e.lng):void 0}if(this._center){const e=_c(this._center);n.center=e?L.latLng(e.lat,e.lng):void 0}this._zoom&&(n.zoom=this._zoom+1)}if(this._mapJs=L.mapbox.map(this._mapContainer,t,n),this._mapJs.on("click",(e=>{this._onMapClick(e.latlng)})),n&&n.maxBounds){const e=this._mapJs.getBoundsZoom(n.maxBounds,!0);(!n.minZoom||n.minZoom<e)&&this._mapJs.setMinZoom(e)}}else{let t=document.createElement("style");t.id="maplibreGlStyle",t.textContent=Fc,this._styleParent.appendChild(t),t=document.createElement("style"),t.id="maplibreGeoCoderStyles",t.textContent=kc,this._styleParent.appendChild(t);const n=yield Promise.resolve().then(o.t.bind(o,77280,23)),i=yield this.loadViewSettings(),r={attributionControl:{compact:!0},container:this._mapContainer,style:i,transformRequest:(e,t)=>({headers:{Authorization:$r.getAuthorizationHeader()},url:e})};this._viewSettings&&(this._useZoomControls&&(r.maxZoom=this._viewSettings.maxZoom,r.minZoom=this._viewSettings.minZoom),this._viewSettings.bounds&&!this._showBoundaryBox&&(r.maxBounds=this._viewSettings.bounds),r.boxZoom=this._viewSettings.boxZoom,r.zoom=this._viewSettings.zoom,r.center=this._viewSettings.center),this._center=this._center||(this._viewSettings?this._viewSettings.center:void 0),r.center=this._center,this._zoom&&(r.zoom=this._zoom),this._mapGl=new n.Map(r),yield this.styleLoaded(),this._mapGl.on("click",(e=>{this._onMapClick(e.lngLat)})),this._mapGl.on("dblclick",(e=>{this._onMapClick(e.lngLat,!0)})),this._showGeoCodingControl&&this._viewSettings&&this._viewSettings.geocodeUrl&&(this._geocoder=new(bc())({forwardGeocode:this._forwardGeocode.bind(this),reverseGeocode:this._reverseGeocode},{maplibregl:fc(),showResultsWhileTyping:!0}),this._geocoder._onKeyDown=(0,Ci.debounce)((e=>{var t=27,n=9;if(e.keyCode===t&&this._geocoder.options.clearAndBlurOnEsc)return this._geocoder._clear(e),this._geocoder._inputEl.blur();var i=this._geocoder._inputEl.value||e.key;if(!i)return this._geocoder.fresh=!0,e.keyCode!==n&&this._geocoder.clear(e),this._geocoder._clearEl.style.display="none";if(!e.metaKey&&-1===[n,t,37,39,38,40].indexOf(e.keyCode)){if(13===e.keyCode){if(this._geocoder.options.showResultsWhileTyping)return this._geocoder.options.showResultMarkers&&this._geocoder._fitBoundsForMarkers(),this._geocoder._inputEl.value=this._geocoder._typeahead.query,this._geocoder.lastSelected=null,void(this._geocoder._typeahead.selected=null);this._geocoder._typeahead.list.selectingListItem||this._geocoder._geocode(i)}i.length>=this._geocoder.options.minLength&&this._geocoder.options.showResultsWhileTyping&&this._geocoder._geocode(i)}}),300),this._mapGl.addControl(this._geocoder,"top-left"),this._geocoder._inputEl.addEventListener("change",(()=>{var e=this._geocoder._typeahead.selected;this._onGeocodeChange(e)}))),this._controls?this._controls.forEach((e=>{if(Array.isArray(e)){const t=e;this._mapGl.addControl(t[0],t[1])}else this._mapGl.addControl(e)})):(this._mapGl.addControl(new pc.NavigationControl),this._mapGl.addControl(new pc.GeolocateControl({positionOptions:{enableHighAccuracy:!0},showAccuracyCircle:!0,showUserLocation:!0}))),this._geoJsonConfig?yield this.loadGeoJSON(this._geoJsonConfig):yield this.loadGeoJSON(null===(e=this._viewSettings)||void 0===e?void 0:e.geoJson),this._initLongPressEvent()}this._mapContainer.dispatchEvent(new ad),this._loaded=!0,this.createBoundaryBox()}}))}styleLoaded(){return new Promise((e=>{this._mapGl&&this._mapGl.once("style.load",(()=>{e()}))}))}unload(){this._mapGl&&(this._mapGl.remove(),this._mapGl=void 0),this._mapJs&&(this._mapJs.remove(),this._mapJs=void 0)}_onMapClick(e,t=!1){this._mapContainer.dispatchEvent(new sd(e,t))}loadGeoJSON(e){return xc(this,void 0,void 0,(function*(){if(this._geoJsonLayers.size>0&&(this._geoJsonLayers.forEach(((e,t)=>this._mapGl.removeLayer(t))),this._geoJsonLayers=new Map),this._geoJsonSources.length>0&&(this._geoJsonSources.forEach((e=>this._mapGl.removeSource(e))),this._geoJsonSources=[]),this._showGeoJson&&e)if("FeatureCollection"==e.source.type){const t=this.groupSourcesByGeometryType(e.source);null==t||t.forEach(((e,t)=>{const n={type:"geojson",data:{type:"FeatureCollection",features:e}},i=this.addGeoJSONSource(n);i&&this.addGeoJSONLayer(t,i.sourceId)}))}else if("Feature"==e.source.type){const t=this.addGeoJSONSource(e.source);t&&this.addGeoJSONLayer(t.source.type,t.sourceId)}else console.error("Could not create layer since source type is neither 'FeatureCollection' nor 'Feature'.")}))}groupSourcesByGeometryType(e){const t=new Map;return e.features.forEach((e=>{let n=t.get(e.geometry.type);null==n&&(n=[]),n.push(e),t.set(e.geometry.type,n)})),t}addGeoJSONSource(e){if(!this._mapGl)return void console.error("mapGl instance not found!");const t=Date.now()+"-"+(this._geoJsonSources.length+1);return this._mapGl.addSource(t,e),this._geoJsonSources.push(t),{source:e,sourceId:t}}addGeoJSONLayer(e,t){if(!this._mapGl)return void console.error("mapGl instance not found!");const n=e,i=t+"-"+n;if(null==this._geoJsonLayers.get(i)){let e=getComputedStyle(this._mapContainer).getPropertyValue("--or-app-color4");null!=e&&0!=e.length||(e=Ar);let o={id:i,source:t};switch(n){case"Point":case"MultiPoint":o.type="circle",o.paint={"circle-radius":12,"circle-color":e},this._geoJsonLayers.set(i,o),this._mapGl.addLayer(o);break;case"LineString":case"MultiLineString":o.type="line",o.paint={"line-color":e,"line-width":4},this._geoJsonLayers.set(i,o),this._mapGl.addLayer(o);break;case"Polygon":case"MultiPolygon":{o.type="fill",o.paint={"fill-color":e,"fill-opacity":.3},this._geoJsonLayers.set(i,o),this._mapGl.addLayer(o);const n=i+"-outline",r={id:n,source:t,type:"line",paint:{"line-color":e,"line-width":2}};this._geoJsonLayers.set(n,r),this._mapGl.addLayer(r);break}case"GeometryCollection":return void console.error("GeometryCollection GeoJSON is not implemented yet!")}}}addMarker(e){e.hasPosition()&&this._updateMarkerElement(e,!0)}removeMarker(e){this._removeMarkerRadius(e),this._updateMarkerElement(e,!1)}onMarkerChanged(e,t){if(this._loaded)switch(t){case"lat":case"lng":case"radius":e.hasPosition()?e._actualMarkerElement?this._updateMarkerPosition(e):this._updateMarkerElement(e,!0):e._actualMarkerElement&&this._updateMarkerElement(e,!1)}}_updateMarkerPosition(e){switch(this._type){case"RASTER":const t=this._markersJs.get(e);t&&t.setLatLng([e.lat,e.lng]);break;case"VECTOR":const n=this._markersGl.get(e);n&&n.setLngLat([e.lng,e.lat])}this._createMarkerRadius(e)}_updateMarkerElement(e,t){switch(this._type){case"RASTER":let n=this._markersJs.get(e);if(n&&(this._removeMarkerClickHandler(e,e.markerContainer),e._actualMarkerElement=void 0,n.removeFrom(this._mapJs),this._markersJs.delete(e)),t){const t=e._createMarkerElement();if(t){const i=L.divIcon({html:t.outerHTML,className:"or-marker-raster"});n=L.marker([e.lat,e.lng],{icon:i,clickable:e.interactive}),n.addTo(this._mapJs),e._actualMarkerElement=n.getElement()?n.getElement().firstElementChild:void 0,e.interactive&&this._addMarkerClickHandler(e,e.markerContainer),this._markersJs.set(e,n)}e.radius&&this._createMarkerRadius(e)}break;case"VECTOR":let i=this._markersGl.get(e);if(i&&(e._actualMarkerElement=void 0,this._removeMarkerClickHandler(e,i.getElement()),i.remove(),this._markersGl.delete(e)),t){const t=e._createMarkerElement();t&&(i=new pc.Marker({element:t,anchor:"top-left"}).setLngLat([e.lng,e.lat]).addTo(this._mapGl),this._markersGl.set(e,i),e._actualMarkerElement=i.getElement(),e.interactive&&this._addMarkerClickHandler(e,i.getElement())),e.radius&&this._createMarkerRadius(e)}}}_removeMarkerRadius(e){this._mapGl&&this._loaded&&e.radius&&e.lat&&e.lng&&this._mapGl.getSource("circleData")&&(this._mapGl.removeLayer("marker-radius-circle"),this._mapGl.removeSource("circleData"))}_createMarkerRadius(e){this._mapGl&&this._loaded&&e.radius&&e.lat&&e.lng&&(this._removeMarkerRadius(e),this._mapGl.addSource("circleData",{type:"geojson",data:{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[e.lng,e.lat]},properties:{title:"You Found Me"}}]}}),this._mapGl.addLayer({id:"marker-radius-circle",type:"circle",source:"circleData",paint:{"circle-radius":["interpolate",["linear"],["zoom"],0,0,20,Ec(e.radius,e.lat)],"circle-color":"red","circle-opacity":.3}}))}createBoundaryBox(e=[]){var t,n;if(this._mapGl&&this._loaded&&this._showBoundaryBox&&(null===(t=this._viewSettings)||void 0===t?void 0:t.bounds)){this._mapGl.getSource("bounds")&&(this._mapGl.removeLayer("bounds"),this._mapGl.removeSource("bounds")),4!==e.length&&(e=null===(n=this._viewSettings)||void 0===n?void 0:n.bounds.toString().split(","));var i=[[[e[0],e[3]],[e[2],e[3]],[e[2],e[1]],[e[0],e[1]],[e[0],e[3]]]];this._mapGl.fitBounds([parseFloat(e[0])+.01,parseFloat(e[1])-.01,parseFloat(e[2])-.01,parseFloat(e[3])+.01]),this._mapGl.addSource("bounds",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:i}}}),this._mapGl.addLayer({id:"bounds",type:"fill",source:"bounds",paint:{"fill-color":"#FF0000","fill-opacity":.4}})}}_addMarkerClickHandler(e,t){if(t){const n=t=>{t.stopPropagation(),e._onClick(t)};this._clickHandlers.set(e,n),t.addEventListener("click",n)}}_removeMarkerClickHandler(e,t){const n=this._clickHandlers.get(e);n&&t&&(t.removeEventListener("click",n),this._clickHandlers.delete(e))}_forwardGeocode(e){return xc(this,void 0,void 0,(function*(){const t=[];try{let n=this._viewSettings.geocodeUrl+"/search?q="+e.query+"&format=geojson&polygon_geojson=1&addressdetails=1";const i=yield fetch(n),o=yield i.json();for(let e of o.features){let n=[e.bbox[0]+(e.bbox[2]-e.bbox[0])/2,e.bbox[1]+(e.bbox[3]-e.bbox[1])/2],i={type:"Feature",geometry:{type:"Point",coordinates:n},place_name:e.properties.display_name,properties:e.properties,text:e.properties.display_name,place_type:["place"],center:n};t.push(i)}}catch(e){console.error(`Failed to forwardGeocode with error: ${e}`)}return{features:t}}))}_reverseGeocode(e){return xc(this,void 0,void 0,(function*(){const t=[];try{let n=this._viewSettings.geocodeUrl+"/reverse?lat="+e.lat+"&lon="+e.lon+"&format=geojson&polygon_geojson=1&addressdetails=1";const i=yield fetch(n),o=yield i.json();for(let e of o.features){let n=[e.bbox[0]+(e.bbox[2]-e.bbox[0])/2,e.bbox[1]+(e.bbox[3]-e.bbox[1])/2],i={type:"Feature",geometry:{type:"Point",coordinates:n},place_name:e.properties.display_name,properties:e.properties,text:e.properties.display_name,place_type:["place"],center:n};t.push(i)}}catch(e){console.error(`Failed to reverseGeocode with error: ${e}`)}return{features:t}}))}_initLongPressEvent(){if(this._mapGl){let e,t,n=()=>{e&&clearTimeout(e),e=null};this._mapGl.on("touchstart",(n=>{n.originalEvent.touches.length>1||(t=n.lngLat,e=setTimeout((()=>{this._onLongPress(t)}),500))})),this._mapGl.on("mousedown",(n=>{e||(t=n.lngLat,e=setTimeout((()=>{this._onLongPress(t),e=null}),500))})),this._mapGl.on("dragstart",n),this._mapGl.on("mouseup",n),this._mapGl.on("touchend",n),this._mapGl.on("touchcancel",n),this._mapGl.on("touchmove",n),this._mapGl.on("moveend",n),this._mapGl.on("gesturestart",n),this._mapGl.on("gesturechange",n),this._mapGl.on("gestureend",n)}}_onLongPress(e){this._mapContainer.dispatchEvent(new ld(e))}_onGeocodeChange(e){this._mapContainer.dispatchEvent(new cd(e))}}const Cc="--internal-or-map-marker-color",Mc="--internal-or-map-marker-active-color",Sc=he`
|
|
711
|
+
`}};function nc(e,t,n){return{index:e,removed:t,addedCount:n}}ec([Le({type:Number})],tc.prototype,"loadingHeight",void 0),ec([Le({type:Boolean})],tc.prototype,"loadDom",void 0),ec([Le({type:Boolean})],tc.prototype,"fadeContent",void 0),ec([Le({type:Boolean})],tc.prototype,"loading",void 0),ec([Le({type:Object,attribute:!1})],tc.prototype,"content",void 0),tc=ec([Me("or-loading-wrapper")],tc),window.JSCompiler_renameProperty=function(e,t){return e};function ic(e,t){return e===t}let oc=0,rc=0,ac=[],sc=0,lc=!1,cc=document.createTextNode("");new window.MutationObserver((function(){lc=!1;const e=ac.length;for(let t=0;t<e;t++){let e=ac[t];if(e)try{e()}catch(e){setTimeout((()=>{throw e}))}}ac.splice(0,e),rc+=e})).observe(cc,{characterData:!0});const dc={run:e=>(lc||(lc=!0,cc.textContent=sc++),ac.push(e),oc++),cancel(e){const t=e-rc;if(t>=0){if(!ac[t])throw new Error("invalid async handle: "+e);ac[t]=null}}},uc=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e;function hc(e){return"slot"===e.localName}let mc=class{static getFlattenedNodes(e){const t=uc(e);return hc(e)?t.assignedNodes({flatten:!0}):Array.from(t.childNodes).map((e=>hc(e)?uc(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){hc(this._target)?this._listenSlots([this._target]):uc(this._target).children&&(this._listenSlots(uc(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){hc(this._target)?this._unlistenSlots([this._target]):uc(this._target).children&&(this._unlistenSlots(uc(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,dc.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let n=e[t];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),n=(i=t,o=this._effectiveNodes,function(e,t,n,i,o,r){let a,s=0,l=0,c=Math.min(n-t,r-o);if(0==t&&0==o&&(s=function(e,t,n){for(let i=0;i<n;i++)if(!ic(e[i],t[i]))return i;return n}(e,i,c)),n==e.length&&r==i.length&&(l=function(e,t,n){let i=e.length,o=t.length,r=0;for(;r<n&&ic(e[--i],t[--o]);)r++;return r}(e,i,c-s)),o+=s,r-=l,(n-=l)-(t+=s)==0&&r-o==0)return[];if(t==n){for(a=nc(t,[],0);o<r;)a.removed.push(i[o++]);return[a]}if(o==r)return[nc(t,[],n-t)];let d=function(e){let t=e.length-1,n=e[0].length-1,i=e[t][n],o=[];for(;t>0||n>0;){if(0==t){o.push(2),n--;continue}if(0==n){o.push(3),t--;continue}let r,a=e[t-1][n-1],s=e[t-1][n],l=e[t][n-1];r=s<l?s<a?s:a:l<a?l:a,r==a?(a==i?o.push(0):(o.push(1),i=a),t--,n--):r==s?(o.push(3),t--,i=s):(o.push(2),n--,i=l)}return o.reverse(),o}(function(e,t,n,i,o,r){let a=r-o+1,s=n-t+1,l=new Array(a);for(let e=0;e<a;e++)l[e]=new Array(s),l[e][0]=e;for(let e=0;e<s;e++)l[0][e]=e;for(let n=1;n<a;n++)for(let r=1;r<s;r++)if(ic(e[t+r-1],i[o+n-1]))l[n][r]=l[n-1][r-1];else{let e=l[n-1][r]+1,t=l[n][r-1]+1;l[n][r]=e<t?e:t}return l}(e,t,n,i,o,r));a=void 0;let u=[],h=t,m=o;for(let e=0;e<d.length;e++)switch(d[e]){case 0:a&&(u.push(a),a=void 0),h++,m++;break;case 1:a||(a=nc(h,[],0)),a.addedCount++,h++,a.removed.push(i[m]),m++;break;case 2:a||(a=nc(h,[],0)),a.addedCount++,h++;break;case 3:a||(a=nc(h,[],0)),a.removed.push(i[m]),m++}return a&&u.push(a),u}(i,0,i.length,o,0,o.length));var i,o;for(let t,i=0;i<n.length&&(t=n[i]);i++)for(let n,i=0;i<t.removed.length&&(n=t.removed[i]);i++)e.removedNodes.push(n);for(let i,o=0;o<n.length&&(i=n[o]);o++)for(let n=i.index;n<i.index+i.addedCount;n++)e.addedNodes.push(t[n]);this._effectiveNodes=t;let r=!1;return(e.addedNodes.length||e.removedNodes.length)&&(r=!0,this.callback.call(this._target,e)),r}_listenSlots(e){for(let t=0;t<e.length;t++){let n=e[t];hc(n)&&n.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let n=e[t];hc(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}};var pc=o(77280),fc=o.n(pc),gc=o(57688),bc=o.n(gc);function _c(e){if(e){if(e instanceof pc.LngLat)return e;if(e.lat)return e.lon?{lng:e.lon,lat:e.lat}:{lng:e.lng,lat:e.lat};if(Array.isArray(e))return{lng:e[0],lat:e[1]};if(e.coordinates&&Array.isArray(e.coordinates)&&e.coordinates.length>=2)return _c(e.coordinates);if(e.attributes){const t=e.attributes.location;if(!t)return;return t.value?_c(t.value):void 0}return e.value?_c(e.value):void 0}}function yc(e){if(e)return Array.isArray(e)?{type:"Point",coordinates:e}:{type:"Point",coordinates:[e.hasOwnProperty("lng")?e.lng:e.lon,e.lat]}}function vc(e,t){if(!e)return;const n="string"==typeof e?wi.getAssetDescriptor(e):e,i=n&&n.icon?n.icon:"help-circle";let o=n&&n.colour?n.colour:void 0;if(t&&t.markerConfig){const e=t.markerConfig,n=t.currentValue;if("range"===e.type&&e.ranges&&"number"==typeof n){const t=e.ranges;o=(t.sort(((e,t)=>t.min-e.min)).find((e=>n>=e.min))||t.reduce(((e,t)=>t.min>e.min?e:t))).colour||void 0}else"boolean"===e.type?o=e[!!n+""]:"string"===e.type&&(o=e[n+""])}return{color:o,icon:i}}o(45455);var xc=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const wc=o(77792),Fc=o(21704),kc=o(45455),Ec=(e,t)=>e/.075/Math.cos(t*Math.PI/180);class Ac{constructor(e,t,n,i=!1,o=!1,r=!0,a=!0){this._loaded=!1,this._markersJs=new Map,this._markersGl=new Map,this._geoJsonSources=[],this._geoJsonLayers=new Map,this._showGeoCodingControl=!1,this._showBoundaryBox=!1,this._useZoomControls=!0,this._showGeoJson=!0,this._clickHandlers=new Map,this._type=e,this._styleParent=t,this._mapContainer=n,this._showGeoCodingControl=i,this._showBoundaryBox=o,this._useZoomControls=r,this._showGeoJson=a}setCenter(e){switch(this._center=_c(e),this._type){case"RASTER":if(this._mapJs){const e=_c(this._center)||(this._viewSettings?_c(this._viewSettings.center):void 0);e&&this._mapJs.setView(e,void 0,{pan:{animate:!1},zoom:{animate:!1}})}break;case"VECTOR":this._mapGl&&this._center&&this._mapGl.setCenter(this._center)}return this}flyTo(e,t){switch(this._type){case"RASTER":this._mapJs;break;case"VECTOR":e||(e=this._center?this._center:this._viewSettings?this._viewSettings.center:void 0),t||(t=this._zoom?this._zoom:this._viewSettings&&this._viewSettings.zoom?this._viewSettings.zoom:void 0),this._mapGl?e&&this._mapGl.flyTo({center:e,zoom:t}):(this._center=e,this._zoom=t)}return this}resize(){switch(this._type){case"RASTER":this._mapJs;break;case"VECTOR":this._mapGl&&this._mapGl.resize()}return this}setZoom(e){switch(this._zoom=e,this._type){case"RASTER":this._mapJs&&this._zoom&&this._mapJs.setZoom(this._zoom,{animate:!1});break;case"VECTOR":this._mapGl&&this._zoom&&this._mapGl.setZoom(this._zoom)}return this}setControls(e){return this._controls=e,this._mapGl&&(this._controls?this._controls.forEach((e=>{if(Array.isArray(e)){const t=e;this._mapGl.addControl(t[0],t[1])}else this._mapGl.addControl(e)})):this._mapGl.addControl(new pc.NavigationControl)),this}setGeoJson(e){var t;return this._geoJsonConfig=e,this._mapGl&&(this._geoJsonConfig?this.loadGeoJSON(this._geoJsonConfig):this.loadGeoJSON(null===(t=this._viewSettings)||void 0===t?void 0:t.geoJson)),this}loadViewSettings(){var e;return xc(this,void 0,void 0,(function*(){let t;t="RASTER"===this._type?yield $r.rest.api.MapResource.getSettingsJs():yield $r.rest.api.MapResource.getSettings();const n=t.data,i=$r.displayRealm||"default";return this._viewSettings=n.options?n.options[i]?n.options[i]:n.options.default:null,this._viewSettings&&(this._mapGl&&(this._mapGl.setMinZoom(this._viewSettings.minZoom),this._mapGl.setMaxZoom(this._viewSettings.maxZoom),this._viewSettings.bounds&&this._mapGl.setMaxBounds(this._viewSettings.bounds),this._geoJsonConfig?yield this.loadGeoJSON(this._geoJsonConfig):yield this.loadGeoJSON(null===(e=this._viewSettings)||void 0===e?void 0:e.geoJson)),this._center?this.setCenter(this._center):this.setCenter(this._viewSettings.center)),n}))}load(){var e;return xc(this,void 0,void 0,(function*(){if(!this._loaded){if("RASTER"===this._type){const e=document.createElement("style");e.id="mapboxJsStyle",e.textContent=wc,this._styleParent.appendChild(e);const t=yield this.loadViewSettings();let n;if(this._viewSettings){if(n={},n.zoom=this._viewSettings.zoom?this._viewSettings.zoom+1:void 0,this._useZoomControls&&(n.maxZoom=this._viewSettings.maxZoom?this._viewSettings.maxZoom-1:void 0,n.minZoom=this._viewSettings.minZoom?this._viewSettings.minZoom+1:void 0),n.boxZoom=this._viewSettings.boxZoom,this._viewSettings.bounds&&(n.maxBounds=function(e){const t=function(e){if(e){if(e instanceof pc.LngLatBounds)return e;const t=e;if(2===t.length){const e=_c(t[0]),n=_c(t[1]);if(e&&n)return new pc.LngLatBounds(e,n)}if(4===t.length)return new pc.LngLatBounds([t[0],t[1],t[2],t[3]])}}(e);if(t)return L.latLngBounds(t.getNorthEast(),t.getSouthWest())}(this._viewSettings.bounds)),this._viewSettings.center){const e=_c(this._viewSettings.center);n.center=e?L.latLng(e.lat,e.lng):void 0}if(this._center){const e=_c(this._center);n.center=e?L.latLng(e.lat,e.lng):void 0}this._zoom&&(n.zoom=this._zoom+1)}if(this._mapJs=L.mapbox.map(this._mapContainer,t,n),this._mapJs.on("click",(e=>{this._onMapClick(e.latlng)})),n&&n.maxBounds){const e=this._mapJs.getBoundsZoom(n.maxBounds,!0);(!n.minZoom||n.minZoom<e)&&this._mapJs.setMinZoom(e)}}else{let t=document.createElement("style");t.id="maplibreGlStyle",t.textContent=Fc,this._styleParent.appendChild(t),t=document.createElement("style"),t.id="maplibreGeoCoderStyles",t.textContent=kc,this._styleParent.appendChild(t);const n=yield Promise.resolve().then(o.t.bind(o,77280,23)),i=yield this.loadViewSettings(),r={attributionControl:{compact:!0},container:this._mapContainer,style:i,transformRequest:(e,t)=>({headers:new URL(window.origin).hostname===new URL(e).hostname?{Authorization:$r.getAuthorizationHeader()}:{},url:e})};this._viewSettings&&(this._useZoomControls&&(r.maxZoom=this._viewSettings.maxZoom,r.minZoom=this._viewSettings.minZoom),this._viewSettings.bounds&&!this._showBoundaryBox&&(r.maxBounds=this._viewSettings.bounds),r.boxZoom=this._viewSettings.boxZoom,r.zoom=this._viewSettings.zoom,r.center=this._viewSettings.center),this._center=this._center||(this._viewSettings?this._viewSettings.center:void 0),r.center=this._center,this._zoom&&(r.zoom=this._zoom),this._mapGl=new n.Map(r),yield this.styleLoaded(),this._mapGl.on("click",(e=>{this._onMapClick(e.lngLat)})),this._mapGl.on("dblclick",(e=>{this._onMapClick(e.lngLat,!0)})),this._showGeoCodingControl&&this._viewSettings&&this._viewSettings.geocodeUrl&&(this._geocoder=new(bc())({forwardGeocode:this._forwardGeocode.bind(this),reverseGeocode:this._reverseGeocode},{maplibregl:fc(),showResultsWhileTyping:!0}),this._geocoder._onKeyDown=(0,Ci.debounce)((e=>{var t=27,n=9;if(e.keyCode===t&&this._geocoder.options.clearAndBlurOnEsc)return this._geocoder._clear(e),this._geocoder._inputEl.blur();var i=this._geocoder._inputEl.value||e.key;if(!i)return this._geocoder.fresh=!0,e.keyCode!==n&&this._geocoder.clear(e),this._geocoder._clearEl.style.display="none";if(!e.metaKey&&-1===[n,t,37,39,38,40].indexOf(e.keyCode)){if(13===e.keyCode){if(this._geocoder.options.showResultsWhileTyping)return this._geocoder.options.showResultMarkers&&this._geocoder._fitBoundsForMarkers(),this._geocoder._inputEl.value=this._geocoder._typeahead.query,this._geocoder.lastSelected=null,void(this._geocoder._typeahead.selected=null);this._geocoder._typeahead.list.selectingListItem||this._geocoder._geocode(i)}i.length>=this._geocoder.options.minLength&&this._geocoder.options.showResultsWhileTyping&&this._geocoder._geocode(i)}}),300),this._mapGl.addControl(this._geocoder,"top-left"),this._geocoder._inputEl.addEventListener("change",(()=>{var e=this._geocoder._typeahead.selected;this._onGeocodeChange(e)}))),this._controls?this._controls.forEach((e=>{if(Array.isArray(e)){const t=e;this._mapGl.addControl(t[0],t[1])}else this._mapGl.addControl(e)})):(this._mapGl.addControl(new pc.NavigationControl),this._mapGl.addControl(new pc.GeolocateControl({positionOptions:{enableHighAccuracy:!0},showAccuracyCircle:!0,showUserLocation:!0}))),this._geoJsonConfig?yield this.loadGeoJSON(this._geoJsonConfig):yield this.loadGeoJSON(null===(e=this._viewSettings)||void 0===e?void 0:e.geoJson),this._initLongPressEvent()}this._mapContainer.dispatchEvent(new ad),this._loaded=!0,this.createBoundaryBox()}}))}styleLoaded(){return new Promise((e=>{this._mapGl&&this._mapGl.once("style.load",(()=>{e()}))}))}unload(){this._mapGl&&(this._mapGl.remove(),this._mapGl=void 0),this._mapJs&&(this._mapJs.remove(),this._mapJs=void 0)}_onMapClick(e,t=!1){this._mapContainer.dispatchEvent(new sd(e,t))}loadGeoJSON(e){return xc(this,void 0,void 0,(function*(){if(this._geoJsonLayers.size>0&&(this._geoJsonLayers.forEach(((e,t)=>this._mapGl.removeLayer(t))),this._geoJsonLayers=new Map),this._geoJsonSources.length>0&&(this._geoJsonSources.forEach((e=>this._mapGl.removeSource(e))),this._geoJsonSources=[]),this._showGeoJson&&e)if("FeatureCollection"==e.source.type){const t=this.groupSourcesByGeometryType(e.source);null==t||t.forEach(((e,t)=>{const n={type:"geojson",data:{type:"FeatureCollection",features:e}},i=this.addGeoJSONSource(n);i&&this.addGeoJSONLayer(t,i.sourceId)}))}else if("Feature"==e.source.type){const t=this.addGeoJSONSource(e.source);t&&this.addGeoJSONLayer(t.source.type,t.sourceId)}else console.error("Could not create layer since source type is neither 'FeatureCollection' nor 'Feature'.")}))}groupSourcesByGeometryType(e){const t=new Map;return e.features.forEach((e=>{let n=t.get(e.geometry.type);null==n&&(n=[]),n.push(e),t.set(e.geometry.type,n)})),t}addGeoJSONSource(e){if(!this._mapGl)return void console.error("mapGl instance not found!");const t=Date.now()+"-"+(this._geoJsonSources.length+1);return this._mapGl.addSource(t,e),this._geoJsonSources.push(t),{source:e,sourceId:t}}addGeoJSONLayer(e,t){if(!this._mapGl)return void console.error("mapGl instance not found!");const n=e,i=t+"-"+n;if(null==this._geoJsonLayers.get(i)){let e=getComputedStyle(this._mapContainer).getPropertyValue("--or-app-color4");null!=e&&0!=e.length||(e=Ar);let o={id:i,source:t};switch(n){case"Point":case"MultiPoint":o.type="circle",o.paint={"circle-radius":12,"circle-color":e},this._geoJsonLayers.set(i,o),this._mapGl.addLayer(o);break;case"LineString":case"MultiLineString":o.type="line",o.paint={"line-color":e,"line-width":4},this._geoJsonLayers.set(i,o),this._mapGl.addLayer(o);break;case"Polygon":case"MultiPolygon":{o.type="fill",o.paint={"fill-color":e,"fill-opacity":.3},this._geoJsonLayers.set(i,o),this._mapGl.addLayer(o);const n=i+"-outline",r={id:n,source:t,type:"line",paint:{"line-color":e,"line-width":2}};this._geoJsonLayers.set(n,r),this._mapGl.addLayer(r);break}case"GeometryCollection":return void console.error("GeometryCollection GeoJSON is not implemented yet!")}}}addMarker(e){e.hasPosition()&&this._updateMarkerElement(e,!0)}removeMarker(e){this._removeMarkerRadius(e),this._updateMarkerElement(e,!1)}onMarkerChanged(e,t){if(this._loaded)switch(t){case"lat":case"lng":case"radius":e.hasPosition()?e._actualMarkerElement?this._updateMarkerPosition(e):this._updateMarkerElement(e,!0):e._actualMarkerElement&&this._updateMarkerElement(e,!1)}}_updateMarkerPosition(e){switch(this._type){case"RASTER":const t=this._markersJs.get(e);t&&t.setLatLng([e.lat,e.lng]);break;case"VECTOR":const n=this._markersGl.get(e);n&&n.setLngLat([e.lng,e.lat])}this._createMarkerRadius(e)}_updateMarkerElement(e,t){switch(this._type){case"RASTER":let n=this._markersJs.get(e);if(n&&(this._removeMarkerClickHandler(e,e.markerContainer),e._actualMarkerElement=void 0,n.removeFrom(this._mapJs),this._markersJs.delete(e)),t){const t=e._createMarkerElement();if(t){const i=L.divIcon({html:t.outerHTML,className:"or-marker-raster"});n=L.marker([e.lat,e.lng],{icon:i,clickable:e.interactive}),n.addTo(this._mapJs),e._actualMarkerElement=n.getElement()?n.getElement().firstElementChild:void 0,e.interactive&&this._addMarkerClickHandler(e,e.markerContainer),this._markersJs.set(e,n)}e.radius&&this._createMarkerRadius(e)}break;case"VECTOR":let i=this._markersGl.get(e);if(i&&(e._actualMarkerElement=void 0,this._removeMarkerClickHandler(e,i.getElement()),i.remove(),this._markersGl.delete(e)),t){const t=e._createMarkerElement();t&&(i=new pc.Marker({element:t,anchor:"top-left"}).setLngLat([e.lng,e.lat]).addTo(this._mapGl),this._markersGl.set(e,i),e._actualMarkerElement=i.getElement(),e.interactive&&this._addMarkerClickHandler(e,i.getElement())),e.radius&&this._createMarkerRadius(e)}}}_removeMarkerRadius(e){this._mapGl&&this._loaded&&e.radius&&e.lat&&e.lng&&this._mapGl.getSource("circleData")&&(this._mapGl.removeLayer("marker-radius-circle"),this._mapGl.removeSource("circleData"))}_createMarkerRadius(e){this._mapGl&&this._loaded&&e.radius&&e.lat&&e.lng&&(this._removeMarkerRadius(e),this._mapGl.addSource("circleData",{type:"geojson",data:{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[e.lng,e.lat]},properties:{title:"You Found Me"}}]}}),this._mapGl.addLayer({id:"marker-radius-circle",type:"circle",source:"circleData",paint:{"circle-radius":["interpolate",["linear"],["zoom"],0,0,20,Ec(e.radius,e.lat)],"circle-color":"red","circle-opacity":.3}}))}createBoundaryBox(e=[]){var t,n;if(this._mapGl&&this._loaded&&this._showBoundaryBox&&(null===(t=this._viewSettings)||void 0===t?void 0:t.bounds)){this._mapGl.getSource("bounds")&&(this._mapGl.removeLayer("bounds"),this._mapGl.removeSource("bounds")),4!==e.length&&(e=null===(n=this._viewSettings)||void 0===n?void 0:n.bounds.toString().split(","));var i=[[[e[0],e[3]],[e[2],e[3]],[e[2],e[1]],[e[0],e[1]],[e[0],e[3]]]];this._mapGl.fitBounds([parseFloat(e[0])+.01,parseFloat(e[1])-.01,parseFloat(e[2])-.01,parseFloat(e[3])+.01]),this._mapGl.addSource("bounds",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:i}}}),this._mapGl.addLayer({id:"bounds",type:"fill",source:"bounds",paint:{"fill-color":"#FF0000","fill-opacity":.4}})}}_addMarkerClickHandler(e,t){if(t){const n=t=>{t.stopPropagation(),e._onClick(t)};this._clickHandlers.set(e,n),t.addEventListener("click",n)}}_removeMarkerClickHandler(e,t){const n=this._clickHandlers.get(e);n&&t&&(t.removeEventListener("click",n),this._clickHandlers.delete(e))}_forwardGeocode(e){return xc(this,void 0,void 0,(function*(){const t=[];try{let n=this._viewSettings.geocodeUrl+"/search?q="+e.query+"&format=geojson&polygon_geojson=1&addressdetails=1";const i=yield fetch(n),o=yield i.json();for(let e of o.features){let n=[e.bbox[0]+(e.bbox[2]-e.bbox[0])/2,e.bbox[1]+(e.bbox[3]-e.bbox[1])/2],i={type:"Feature",geometry:{type:"Point",coordinates:n},place_name:e.properties.display_name,properties:e.properties,text:e.properties.display_name,place_type:["place"],center:n};t.push(i)}}catch(e){console.error(`Failed to forwardGeocode with error: ${e}`)}return{features:t}}))}_reverseGeocode(e){return xc(this,void 0,void 0,(function*(){const t=[];try{let n=this._viewSettings.geocodeUrl+"/reverse?lat="+e.lat+"&lon="+e.lon+"&format=geojson&polygon_geojson=1&addressdetails=1";const i=yield fetch(n),o=yield i.json();for(let e of o.features){let n=[e.bbox[0]+(e.bbox[2]-e.bbox[0])/2,e.bbox[1]+(e.bbox[3]-e.bbox[1])/2],i={type:"Feature",geometry:{type:"Point",coordinates:n},place_name:e.properties.display_name,properties:e.properties,text:e.properties.display_name,place_type:["place"],center:n};t.push(i)}}catch(e){console.error(`Failed to reverseGeocode with error: ${e}`)}return{features:t}}))}_initLongPressEvent(){if(this._mapGl){let e,t,n=()=>{e&&clearTimeout(e),e=null};this._mapGl.on("touchstart",(n=>{n.originalEvent.touches.length>1||(t=n.lngLat,e=setTimeout((()=>{this._onLongPress(t)}),500))})),this._mapGl.on("mousedown",(n=>{e||(t=n.lngLat,e=setTimeout((()=>{this._onLongPress(t),e=null}),500))})),this._mapGl.on("dragstart",n),this._mapGl.on("mouseup",n),this._mapGl.on("touchend",n),this._mapGl.on("touchcancel",n),this._mapGl.on("touchmove",n),this._mapGl.on("moveend",n),this._mapGl.on("gesturestart",n),this._mapGl.on("gesturechange",n),this._mapGl.on("gestureend",n)}}_onLongPress(e){this._mapContainer.dispatchEvent(new ld(e))}_onGeocodeChange(e){this._mapContainer.dispatchEvent(new cd(e))}}const Cc="--internal-or-map-marker-color",Mc="--internal-or-map-marker-active-color",Sc=he`
|
|
712
712
|
:host {
|
|
713
713
|
--internal-or-map-width: var(--or-map-width, 100%);
|
|
714
714
|
--internal-or-map-min-height: var(--or-map-min-height, 300px);
|
|
@@ -1229,9 +1229,9 @@
|
|
|
1229
1229
|
</span>
|
|
1230
1230
|
</div>
|
|
1231
1231
|
<div id="content" class="${this.expandable&&this.expanded?"expanded":""}">
|
|
1232
|
-
|
|
1232
|
+
${this.lazycontent?this.expanded&&Xe(this.lazycontent,j`${dn.t("loading")}`):j`<slot name="content"></slot>`}
|
|
1233
1233
|
</div>
|
|
1234
|
-
`}};$m([Le({type:Boolean})],Nm.prototype,"expanded",void 0),$m([Le({type:Boolean})],Nm.prototype,"expandable",void 0),$m([Ie("#header")],Nm.prototype,"headerElem",void 0),Nm=$m([Me("or-collapsible-panel")],Nm);const zm=he`
|
|
1234
|
+
`}};$m([Le({type:Promise})],Nm.prototype,"lazycontent",void 0),$m([Le({type:Boolean})],Nm.prototype,"expanded",void 0),$m([Le({type:Boolean})],Nm.prototype,"expandable",void 0),$m([Ie("#header")],Nm.prototype,"headerElem",void 0),Nm=$m([Me("or-collapsible-panel")],Nm);const zm=he`
|
|
1235
1235
|
:host {
|
|
1236
1236
|
flex: 1;
|
|
1237
1237
|
}
|