UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

3 lines 19.6 kB
/*! For license information please see chunk.30279c88ea9550c310ad.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[5438,5149],{39841:function(e,t,n){"use strict";n(65233),n(65660);var i,s,o,r=n(9672),a=n(87156),l=n(50856),c=n(44181);(0,r.k)({_template:(0,l.d)(i||(s=['\n <style>\n :host {\n display: block;\n /**\n * Force app-header-layout to have its own stacking context so that its parent can\n * control the stacking of it relative to other elements (e.g. app-drawer-layout).\n * This could be done using `isolation: isolate`, but that\'s not well supported\n * across browsers.\n */\n position: relative;\n z-index: 0;\n }\n\n #wrapper ::slotted([slot=header]) {\n @apply --layout-fixed-top;\n z-index: 1;\n }\n\n #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) {\n height: 100%;\n }\n\n :host([has-scrolling-region]) #wrapper ::slotted([slot=header]) {\n position: absolute;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) #wrapper #contentContainer {\n @apply --layout-fit;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing #contentContainer {\n position: relative;\n }\n\n :host([fullbleed]) {\n @apply --layout-vertical;\n @apply --layout-fit;\n }\n\n :host([fullbleed]) #wrapper,\n :host([fullbleed]) #wrapper #contentContainer {\n @apply --layout-vertical;\n @apply --layout-flex;\n }\n\n #contentContainer {\n /* Create a stacking context here so that all children appear below the header. */\n position: relative;\n z-index: 0;\n }\n\n @media print {\n :host([has-scrolling-region]) #wrapper #contentContainer {\n overflow-y: visible;\n }\n }\n\n </style>\n\n <div id="wrapper" class="initializing">\n <slot id="headerSlot" name="header"></slot>\n\n <div id="contentContainer">\n <slot></slot>\n </div>\n </div>\n'],o=['\n <style>\n :host {\n display: block;\n /**\n * Force app-header-layout to have its own stacking context so that its parent can\n * control the stacking of it relative to other elements (e.g. app-drawer-layout).\n * This could be done using \\`isolation: isolate\\`, but that\'s not well supported\n * across browsers.\n */\n position: relative;\n z-index: 0;\n }\n\n #wrapper ::slotted([slot=header]) {\n @apply --layout-fixed-top;\n z-index: 1;\n }\n\n #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) {\n height: 100%;\n }\n\n :host([has-scrolling-region]) #wrapper ::slotted([slot=header]) {\n position: absolute;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) #wrapper #contentContainer {\n @apply --layout-fit;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing #contentContainer {\n position: relative;\n }\n\n :host([fullbleed]) {\n @apply --layout-vertical;\n @apply --layout-fit;\n }\n\n :host([fullbleed]) #wrapper,\n :host([fullbleed]) #wrapper #contentContainer {\n @apply --layout-vertical;\n @apply --layout-flex;\n }\n\n #contentContainer {\n /* Create a stacking context here so that all children appear below the header. */\n position: relative;\n z-index: 0;\n }\n\n @media print {\n :host([has-scrolling-region]) #wrapper #contentContainer {\n overflow-y: visible;\n }\n }\n\n </style>\n\n <div id="wrapper" class="initializing">\n <slot id="headerSlot" name="header"></slot>\n\n <div id="contentContainer">\n <slot></slot>\n </div>\n </div>\n'],o||(o=s.slice(0)),i=Object.freeze(Object.defineProperties(s,{raw:{value:Object.freeze(o)}})))),is:"app-header-layout",behaviors:[c.Y],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return(0,a.vz)(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var e=this.header;if(this.isAttached&&e){this.$.wrapper.classList.remove("initializing"),e.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var t=e.offsetHeight;this.hasScrollingRegion?(e.style.left="",e.style.right=""):requestAnimationFrame(function(){var t=this.getBoundingClientRect(),n=document.documentElement.clientWidth-t.right;e.style.left=t.left+"px",e.style.right=n+"px"}.bind(this));var n=this.$.contentContainer.style;e.fixed&&!e.condenses&&this.hasScrollingRegion?(n.marginTop=t+"px",n.paddingTop=""):(n.paddingTop=t+"px",n.marginTop="")}}})},8621:function(e,t,n){"use strict";n.d(t,{G:function(){return v}});n(65233);var i={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},s={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},o={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},r=/[a-z0-9*]/,a=/U\+/,l=/^arrow/,c=/^space(bar)?/,h=/^escape$/;function d(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||c.test(i)?n="space":h.test(i)?n="esc":1==i.length?t&&!r.test(i)||(n=i):n=l.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function u(e,t){return e.key?d(e.key,t):e.detail&&e.detail.key?d(e.detail.key,t):(n=e.keyIdentifier,o="",n&&(n in i?o=i[n]:a.test(n)?(n=parseInt(n.replace("U+","0x"),16),o=String.fromCharCode(n).toLowerCase()):o=n.toLowerCase()),o||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):s[e]),t}(e.keyCode)||"");var n,o}function p(e,t){return u(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function y(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var n=t.split(":"),i=n[0],s=n[1];return i in o?(e[o[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=s||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}var v={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=y(t),i=0;i<n.length;++i)if(p(n[i],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1}))},_addKeyBinding:function(e,t){y(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,n,i;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],i=e[2],t.removeEventListener(n,i)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var i=e[n][0],s=e[n][1];if(p(i,t)&&(this._triggerKeyHandler(i,s,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var i=Object.create(e);i.keyboardEvent=n;var s=new CustomEvent(e.event,{detail:i,cancelable:!0});this[t].call(this,s),s.defaultPrevented&&n.preventDefault()}}},51644:function(e,t,n){"use strict";n.d(t,{$:function(){return o},P:function(){return r}});n(65233),n(26110);var i=n(8621),s=n(87156),o={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_focusChanged:function(e){this._detectKeyboardFocus(e),e||this._setPressed(!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,n=(0,s.vz)(t).localTarget;this.isLightDescendant(n)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,n=(0,s.vz)(t).localTarget;this.isLightDescendant(n)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async((function(){this.click()}),1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},r=[i.G,o]},26110:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});n(65233),n(87156);var i={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){this._setFocused("focus"===e.type)},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(null===this._oldTabIndex?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}}},63207:function(e,t,n){"use strict";n(65660),n(15112);var i,s,o,r=n(9672),a=n(87156),l=n(50856),c=n(65233);(0,r.k)({_template:(0,l.d)(i||(s=["\n <style>\n :host {\n @apply --layout-inline;\n @apply --layout-center-center;\n position: relative;\n\n vertical-align: middle;\n\n fill: var(--iron-icon-fill-color, currentcolor);\n stroke: var(--iron-icon-stroke-color, none);\n\n width: var(--iron-icon-width, 24px);\n height: var(--iron-icon-height, 24px);\n @apply --iron-icon;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n"],o||(o=s.slice(0)),i=Object.freeze(Object.defineProperties(s,{raw:{value:Object.freeze(o)}})))),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:c.XY.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,a.vz)(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,(0,a.vz)(this.root).appendChild(this._img))}})},99257:function(e,t,n){"use strict";n(65233);var i=n(15112),s=n(9672),o=n(87156);(0,s.k)({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new i.P({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(e){return this.name+":"+e}),this)},applyIcon:function(e,t){this.removeIcon(e);var n=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(n){var i=(0,o.vz)(e.root||e);return i.insertBefore(n,i.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&((0,o.vz)(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var e=Object.create(null);return(0,o.vz)(this).querySelectorAll("[id]").forEach((function(t){e[t.id]=t})),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,n){if(e){var i=e.cloneNode(!0),s=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=i.getAttribute("viewBox")||"0 0 "+t+" "+t,r="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&i.hasAttribute("mirror-in-rtl")&&(r+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),s.setAttribute("viewBox",o),s.setAttribute("preserveAspectRatio","xMidYMid meet"),s.setAttribute("focusable","false"),s.style.cssText=r,s.appendChild(i).removeAttribute("id"),s}return null}})},85753:function(e,t,n){"use strict";n.d(t,{I:function(){return s},E:function(){return o}});n(65233);var i=n(78161),s={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},o=[i.i,s]},15112:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});n(65233);var i=n(9672);function s(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 o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),e[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)}var t,n,i;return t=e,(n=[{key:"value",get:function(){var t=this.type,n=this.key;if(t&&n)return e.types[t]&&e.types[t][n]},set:function(t){var n=this.type,i=this.key;n&&i&&(n=e.types[n]=e.types[n]||{},null==t?delete n[i]:n[i]=t)}},{key:"list",get:function(){if(this.type){var t=e.types[this.type];return t?Object.keys(t).map((function(e){return r[this.type][e]}),this):[]}}},{key:"byKey",value:function(e){return this.key=e,this.value}}])&&s(t.prototype,n),i&&s(t,i),e}();o[" "]=function(){},o.types={};var r=o.types;(0,i.k)({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,n){var i=new o({type:e,key:t});return void 0!==n&&n!==i.value?i.value=n:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new o({type:this.type,key:e}).value}})}}]); //# sourceMappingURL=chunk.30279c88ea9550c310ad.js.map