iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 10.9 kB
JavaScript
/*! For license information please see 56233.7c3da321c0884f2d.js.LICENSE.txt */
export const __webpack_ids__=["56233"];export const __webpack_modules__={54835:function(e,t,r){var a=r(9065),o=r(15093),n=r(57243);class s extends n.oi{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return n.dy`<span class="shadow"></span>`}}const i=n.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 c=class extends s{};c.styles=[i],c=(0,a.__decorate)([(0,o.Mo)("md-elevation")],c)},57618:function(e,t,r){var a=r(9065),o=r(15093),n=r(57243),s=r(19799);const i=["focusin","focusout","pointerdown"];class c extends n.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[l]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[l]=!0}}onControlChange(e,t){if(!n.sk)for(const r of i)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})],c.prototype,"visible",void 0),(0,a.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],c.prototype,"inward",void 0);const l=Symbol("handledByFocusRing"),d=n.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)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width,8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width,8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width,8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width,8px)}}@media(prefers-reduced-motion){:host{animation:none}}`;let u=class extends c{};u.styles=[d],u=(0,a.__decorate)([(0,o.Mo)("md-focus-ring")],u)},13823:function(e,t,r){r.d(t,{T:()=>l});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"],n=o.map(i);function s(e){return n.includes(e)}function i(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const c=Symbol("privateIgnoreAttributeChangesFor");function l(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[c].has(e))return;this[c].add(e),this.removeAttribute(e),this[c].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(d(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),s(e)&&(super.removeAttribute(d(e)),this.requestUpdate())}}return t=c,function(e){for(const t of o){const r=i(t),a=d(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 d(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:()=>n,b:()=>a});r(67351);const a=Symbol("internals"),o=Symbol("privateInternals");function n(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:()=>c});var a=r(9065),o=r(15093),n=r(61073);const s=Symbol("getFormValue"),i=Symbol("getFormState");function c(e){class t extends e{get form(){return this[n.b].form}get labels(){return this[n.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[n.b].setFormValue(this[s](),this[i]())}[s](){throw new Error("Implement [getFormValue]")}[i](){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}},62212:function(e,t,r){r.d(t,{B:()=>n,_:()=>o});var a=r(98330);const o=(e,t,r,o,n={unsubGrace:!0})=>{if(e[t])return e[t];let s,i,c=0,l=(0,a.M)();const d=()=>{if(!r)throw new Error("Collection does not support refresh");return r(e).then((e=>l.setState(e,!0)))},u=()=>d().catch((t=>{if(e.connected)throw t})),h=()=>{i=void 0,s&&s.then((e=>{e()})),l.clearState(),e.removeEventListener("ready",d),e.removeEventListener("disconnected",p)},p=()=>{i&&(clearTimeout(i),h())};return e[t]={get state(){return l.state},refresh:d,subscribe(t){c++,1===c&&(()=>{if(void 0!==i)return clearTimeout(i),void(i=void 0);o&&(s=o(e,l)),r&&(e.addEventListener("ready",u),u()),e.addEventListener("disconnected",p)})();const a=l.subscribe(t);return void 0!==l.state&&setTimeout((()=>t(l.state)),0),()=>{a(),c--,c||(n.unsubGrace?i=setTimeout(h,5e3):h())}}},e[t]},n=(e,t,r,a,n)=>o(a,e,t,r).subscribe(n)},98330:function(e,t,r){r.d(t,{M:()=>a});r(92745);const a=e=>{let t=[];function r(r,a){e=a?r:Object.assign(Object.assign({},e),r);let o=t;for(let t=0;t<o.length;t++)o[t](e)}return{get state(){return e},action(t){function a(e){r(e,!1)}return function(){let r=[e];for(let e=0;e<arguments.length;e++)r.push(arguments[e]);let o=t.apply(this,r);if(null!=o)return o instanceof Promise?o.then(a):a(o)}},setState:r,clearState(){e=void 0},subscribe:e=>(t.push(e),()=>{!function(e){let r=[];for(let a=0;a<t.length;a++)t[a]===e?e=null:r.push(t[a]);t=r}(e)})}}},27608:function(e,t,r){r.d(t,{MT:()=>o,RV:()=>a,U2:()=>i,ZH:()=>l,t8:()=>c});r(92745),r(9359),r(31526),r(70104);function a(e){return new Promise(((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)}))}function o(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const o=a(r);return(e,r)=>o.then((a=>r(a.transaction(t,e).objectStore(t))))}let n;function s(){return n||(n=o("keyval-store","keyval")),n}function i(e,t=s()){return t("readonly",(t=>a(t.get(e))))}function c(e,t,r=s()){return r("readwrite",(r=>(r.put(t,e),a(r.transaction))))}function l(e=s()){return e("readwrite",(e=>(e.clear(),a(e.transaction))))}}};
//# sourceMappingURL=56233.7c3da321c0884f2d.js.map