iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 11.2 kB
JavaScript
/*! For license information please see 94320.ebfe12d389b0bdd0.js.LICENSE.txt */
export const __webpack_ids__=["94320"];export const __webpack_modules__={88618:function(e,t,r){r.d(t,{Wg:()=>d,qN:()=>n.q});var a,o,i=r(9065),s=r(15093),n=r(11911);const l=null!==(o=null===(a=window.ShadyDOM)||void 0===a?void 0:a.inUse)&&void 0!==o&&o;class d extends n.H{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||l)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}}d.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,i.__decorate)([(0,s.Cb)({type:Boolean})],d.prototype,"disabled",void 0)},54835:function(e,t,r){var a=r(9065),o=r(15093),i=r(57243);class s extends i.oi{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return i.dy`<span class="shadow"></span>`}}const n=i.iv`.shadow,.shadow::after,.shadow::before,:host{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::after,.shadow::before{content:"";transition-property:box-shadow,opacity;--_level:var(--md-elevation-level, 0);--_shadow-color:var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}`;let l=class extends s{};l.styles=[n],l=(0,a.__decorate)([(0,o.Mo)("md-elevation")],l)},57618:function(e,t,r){var a=r(9065),o=r(15093),i=r(57243),s=r(19799);const n=["focusin","focusout","pointerdown"];class l extends i.oi{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new s.J(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[d]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[d]=!0}}onControlChange(e,t){if(!i.sk)for(const r of n)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}(0,a.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],l.prototype,"visible",void 0),(0,a.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],l.prototype,"inward",void 0);const d=Symbol("handledByFocusRing"),c=i.iv`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2,0,0,1);box-sizing:border-box;color:var(--md-focus-ring-color,var(--md-sys-color-secondary,#625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));inset:calc(-1*var(--md-focus-ring-outward-offset,2px));outline:var(--md-focus-ring-width,3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border:var(--md-focus-ring-width,3px) solid currentColor;inset:var(--md-focus-ring-inward-offset,0px)} outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width,8px)}} outward-shrink{from{outline-width:var(--md-focus-ring-active-width,8px)}} inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width,8px)}} inward-shrink{from{border-width:var(--md-focus-ring-active-width,8px)}}{:host{animation:none}}`;let u=class extends l{};u.styles=[c],u=(0,a.__decorate)([(0,o.Mo)("md-focus-ring")],u)},13823:function(e,t,r){r.d(t,{T:()=>d});r(92519),r(42179),r(89256),r(24931),r(88463),r(57449),r(19814);var a=r(57243);const o=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],i=o.map(n);function s(e){return i.includes(e)}function n(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const l=Symbol("privateIgnoreAttributeChangesFor");function d(e){var t;if(a.sk)return e;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!s(e))return void super.attributeChangedCallback(e,t,r);if(this[l].has(e))return;this[l].add(e),this.removeAttribute(e),this[l].delete(e);const a=u(e);null===r?delete this.dataset[a]:this.dataset[a]=r,this.requestUpdate(u(e),t)}getAttribute(e){return s(e)?super.getAttribute(c(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),s(e)&&(super.removeAttribute(c(e)),this.requestUpdate())}}return t=l,function(e){for(const t of o){const r=n(t),a=c(r),o=u(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(a),{attribute:a,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[o]??null},set(e){const r=this.dataset[o]??null;e!==r&&(null===e?delete this.dataset[o]:this.dataset[o]=e,this.requestUpdate(t,r))}})}}(r),r}function c(e){return`data-${e}`}function u(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}},79679:function(e,t,r){function a(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const r=Reflect.construct(t.constructor,[t.type,t]),a=e.dispatchEvent(r);return a||t.preventDefault(),a}r.d(t,{e:()=>a})},61073:function(e,t,r){r.d(t,{N:()=>i,b:()=>a});r(67351);const a=Symbol("internals"),o=Symbol("privateInternals");function i(e){return class extends e{get[a](){return this[o]||(this[o]=this.attachInternals()),this[o]}}}},19484:function(e,t,r){r.d(t,{$u:()=>s,hz:()=>l});var a=r(9065),o=r(15093),i=r(61073);const s=Symbol("getFormValue"),n=Symbol("getFormState");function l(e){class t extends e{get form(){return this[i.b].form}get labels(){return this[i.b].labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}attributeChangedCallback(e,t,r){if("name"!==e&&"disabled"!==e)super.attributeChangedCallback(e,t,r);else{const r="disabled"===e?null!==t:t;this.requestUpdate(e,r)}}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[i.b].setFormValue(this[s](),this[n]())}[s](){throw new Error("Implement [getFormValue]")}[n](){return this[s]()}formDisabledCallback(e){this.disabled=e}}return t.formAssociated=!0,(0,a.__decorate)([(0,o.Cb)({noAccessor:!0})],t.prototype,"name",null),(0,a.__decorate)([(0,o.Cb)({type:Boolean,noAccessor:!0})],t.prototype,"disabled",null),t}},53232:function(e,t,r){r.d(t,{E_:()=>v,OR:()=>l,_Y:()=>c,dZ:()=>n,fk:()=>u,hN:()=>s,hl:()=>p,i9:()=>f,pt:()=>i,ws:()=>m});var a=r(2841);const{I:o}=a.Al,i=e=>null===e||"object"!=typeof e&&"function"!=typeof e,s=(e,t)=>void 0===t?void 0!==(null==e?void 0:e._$litType$):(null==e?void 0:e._$litType$)===t,n=e=>{var t;return null!=(null===(t=null==e?void 0:e._$litType$)||void 0===t?void 0:t.h)},l=e=>void 0===e.strings,d=()=>document.createComment(""),c=(e,t,r)=>{var a;const i=e._$AA.parentNode,s=void 0===t?e._$AB:t._$AA;if(void 0===r){const t=i.insertBefore(d(),s),a=i.insertBefore(d(),s);r=new o(t,a,e,e.options)}else{const t=r._$AB.nextSibling,o=r._$AM,n=o!==e;if(n){let t;null===(a=r._$AQ)||void 0===a||a.call(r,e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==o._$AU&&r._$AP(t)}if(t!==s||n){let e=r._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,s),e=t}}}return r},u=(e,t,r=e)=>(e._$AI(t,r),e),h={},p=(e,t=h)=>e._$AH=t,f=e=>e._$AH,m=e=>{var t;null===(t=e._$AP)||void 0===t||t.call(e,!1,!0);let r=e._$AA;const a=e._$AB.nextSibling;for(;r!==a;){const e=r.nextSibling;r.remove(),r=e}},v=e=>{e._$AR()}}};
//# sourceMappingURL=94320.ebfe12d389b0bdd0.js.map