iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 19.5 kB
JavaScript
/*! For license information please see chunk.caf541c070066faf9585.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6925,6076,9462,1199],{79332:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});n(65233);var i={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var n in t)e[n]=t[n]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,n){var i;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(i=e?this.animationConfig[e]:this.animationConfig,Array.isArray(i)||(i=[i]),i)for(var a,o=0;a=i[o];o++)if(a.animatable)a.animatable._getAnimationConfigRecursive(a.type||e,t,n);else if(a.id){var r=t[a.id];r?(r.isClone||(t[a.id]=this._cloneConfig(r),r=t[a.id]),this._copyProperties(r,a)):t[a.id]=a}else n.push(a)},getAnimationConfig:function(e){var t={},n=[];for(var i in this._getAnimationConfigRecursive(e,t,n),t)n.push(t[i]);return n}}},96540:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});n(65233);var i={_configureAnimations:function(e){var t=[],n=[];if(e.length>0)for(var i,a=0;i=e[a];a++){var o=document.createElement(i.name);if(o.isNeonAnimation){var r;o.configure||(o.configure=function(e){return null}),r=o.configure(i),n.push({result:r,config:i,neonAnimation:o})}else console.warn(this.is+":",i.name,"not found!")}for(var l=0;l<n.length;l++){var s=n[l].result,c=n[l].config,p=n[l].neonAnimation;try{"function"!=typeof s.cancel&&(s=document.timeline.play(s))}catch(d){s=null,console.warn("Couldnt play","(",c.name,").",d)}s&&t.push({neonAnimation:p,config:c,animation:s})}return t},_shouldComplete:function(e){for(var t=!0,n=0;n<e.length;n++)if("finished"!=e[n].animation.playState){t=!1;break}return t},_complete:function(e){for(var t=0;t<e.length;t++)e[t].neonAnimation.complete(e[t].config);for(t=0;t<e.length;t++)e[t].animation.cancel()},playAnimation:function(e,t){var n=this.getAnimationConfig(e);if(n){this._active=this._active||{},this._active[e]&&(this._complete(this._active[e]),delete this._active[e]);var i=this._configureAnimations(n);if(0!=i.length){this._active[e]=i;for(var a=0;a<i.length;a++)i[a].animation.onfinish=function(){this._shouldComplete(i)&&(this._complete(i),delete this._active[e],this.fire("neon-animation-finish",t,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",t,{bubbles:!1})}},cancelAnimation:function(){for(var e in this._active){var t=this._active[e];for(var n in t)t[n].animation.cancel()}this._active={}}},a=[n(79332).a,i]},51654:function(e,t,n){"use strict";n.d(t,{Z:function(){return o},n:function(){return r}});n(65233);var i=n(75009),a=n(87156),o={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){t&&(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=(0,a.vz)(e).path,n=0,i=t.indexOf(this);n<i;n++){var o=t[n];if(o.hasAttribute&&(o.hasAttribute("dialog-dismiss")||o.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(o.hasAttribute("dialog-confirm")),this.close(),e.stopPropagation();break}}}},r=[i.$,o]},22626:function(e,t,n){"use strict";n(65233),n(65660),n(1656);var i,a,o,r=n(51654),l=n(9672),s=n(50856);(0,l.k)({_template:(0,s.d)(i||(a=['\n <style>\n\n :host {\n display: block;\n @apply --layout-relative;\n }\n\n :host(.is-scrolled:not(:first-child))::before {\n content: \'\';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {\n content: \'\';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n .scrollable {\n padding: 0 24px;\n\n @apply --layout-scroll;\n @apply --paper-dialog-scrollable;\n }\n\n .fit {\n @apply --layout-fit;\n }\n </style>\n\n <div id="scrollable" class="scrollable" on-scroll="updateScrollState">\n <slot></slot>\n </div>\n'],o||(o=a.slice(0)),i=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(o)}})))),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(r.Z)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}})},50808:function(e,t,n){"use strict";n(65233),n(65660),n(1656),n(47686),n(54242);var i=document.createElement("template");i.setAttribute("style","display: none;"),i.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(i.content);var a,o,r,l=n(96540),s=n(51654),c=n(9672),p=n(50856);(0,c.k)({_template:(0,p.d)(a||(o=['\n <style include="paper-dialog-shared-styles"></style>\n <slot></slot>\n'],r||(r=o.slice(0)),a=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})))),is:"paper-dialog",behaviors:[s.n,l.t],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})},25856:function(e,t,n){"use strict";n(65233),n(65660);var i,a,o,r=n(26110),l=n(98235),s=n(9672),c=n(87156),p=n(50856);(0,s.k)({_template:(0,p.d)(i||(a=['\n <style>\n :host {\n display: inline-block;\n position: relative;\n width: 400px;\n border: 1px solid;\n padding: 2px;\n -moz-appearance: textarea;\n -webkit-appearance: textarea;\n overflow: hidden;\n }\n\n .mirror-text {\n visibility: hidden;\n word-wrap: break-word;\n @apply --iron-autogrow-textarea;\n }\n\n .fit {\n @apply --layout-fit;\n }\n\n textarea {\n position: relative;\n outline: none;\n border: none;\n resize: none;\n background: inherit;\n color: inherit;\n /* see comments in template */\n width: 100%;\n height: 100%;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n text-align: inherit;\n @apply --iron-autogrow-textarea;\n }\n\n textarea::-webkit-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea::-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-ms-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n </style>\n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use   instead of to allow this element to be used in XHTML --\x3e\n <div id="mirror" class="mirror-text" aria-hidden="true"> </div>\n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n <div class="textarea-container fit">\n <textarea id="textarea" name$="[[name]]" aria-label$="[[label]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]"></textarea>\n </div>\n'],o=['\n <style>\n :host {\n display: inline-block;\n position: relative;\n width: 400px;\n border: 1px solid;\n padding: 2px;\n -moz-appearance: textarea;\n -webkit-appearance: textarea;\n overflow: hidden;\n }\n\n .mirror-text {\n visibility: hidden;\n word-wrap: break-word;\n @apply --iron-autogrow-textarea;\n }\n\n .fit {\n @apply --layout-fit;\n }\n\n textarea {\n position: relative;\n outline: none;\n border: none;\n resize: none;\n background: inherit;\n color: inherit;\n /* see comments in template */\n width: 100%;\n height: 100%;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n text-align: inherit;\n @apply --iron-autogrow-textarea;\n }\n\n textarea::-webkit-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea::-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-ms-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n </style>\n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use   instead of to allow this element to be used in XHTML --\x3e\n <div id="mirror" class="mirror-text" aria-hidden="true"> </div>\n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n <div class="textarea-container fit">\n <textarea id="textarea" name\\$="[[name]]" aria-label\\$="[[label]]" autocomplete\\$="[[autocomplete]]" autofocus\\$="[[autofocus]]" inputmode\\$="[[inputmode]]" placeholder\\$="[[placeholder]]" readonly\\$="[[readonly]]" required\\$="[[required]]" disabled\\$="[[disabled]]" rows\\$="[[rows]]" minlength\\$="[[minlength]]" maxlength\\$="[[maxlength]]"></textarea>\n </div>\n'],o||(o=a.slice(0)),i=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(o)}})))),is:"iron-autogrow-textarea",behaviors:[l.x,r.a],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=l.x.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;t&&(t.value!==e&&(t.value=e||0===e?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=(0,c.vz)(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+" "},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&").replace(/"/gm,""").replace(/'/gm,"'").replace(/</gm,"<").replace(/>/gm,">").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});n(2178),n(98121),n(65911);var d,h=n(21006),u=n(66668);(0,s.k)({_template:(0,p.d)(d||(d=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n label {\n pointer-events: none;\n }\n </style>\n\n <paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">\n\n <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>\n\n <iron-autogrow-textarea class="paper-input-input" slot="input" id$="[[_inputId]]" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" bind-value="{{value}}" invalid="{{invalid}}" validator$="[[validator]]" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea>\n\n <template is="dom-if" if="[[errorMessage]]">\n <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error>\n </template>\n\n <template is="dom-if" if="[[charCounter]]">\n <paper-input-char-counter slot="add-on"></paper-input-char-counter>\n </template>\n\n </paper-input-container>\n']))),is:"paper-textarea",behaviors:[u.d0,h.V],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(e){this.$.input.textarea.selectionStart=e},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(e){this.$.input.textarea.selectionEnd=e},_ariaLabelledByChanged:function(e){this._focusableElement.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this._focusableElement.setAttribute("aria-describedby",e)},get _focusableElement(){return this.inputElement.textarea}})},60461:function(e){function t(e){return(t="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})(e)}e.exports=function e(n){return Object.freeze(n),Object.getOwnPropertyNames(n).forEach((function(i){!n.hasOwnProperty(i)||null===n[i]||"object"!==t(n[i])&&"function"!=typeof n[i]||Object.isFrozen(n[i])||e(n[i])})),n}},49629:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var i=n(99602),a=function(e){return null!=e?e:i.Ld}},14516:function(e,t){"use strict";var n=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(a=e[i],o=t[i],!(a===o||n(a)&&n(o)))return!1;var a,o;return!0}t.Z=function(e,t){var n;void 0===t&&(t=i);var a,o=[],r=!1;return function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];return r&&n===this&&t(i,o)||(a=e.apply(this,i),r=!0,n=this,o=i),a}}}}]);
//# sourceMappingURL=chunk.caf541c070066faf9585.js.map