0){n.textContent=M?M.emptyScript:"";for(var T=0;T2&&void 0!==arguments[2]?arguments[2]:t,a=arguments.length>3?arguments[3]:void 0;if(e===tt)return e;var l=void 0!==a?null===(i=s._$Co)||void 0===i?void 0:i[a]:s._$Cl,c=B(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t))._$AT(t,s,a),void 0!==a?(null!==(r=(o=s)._$Co)&&void 0!==r?r:o._$Co=[])[a]=l:s._$Cl=l),void 0!==l&&(e=st(t,l._$AS(t,e.values),l,a)),e}var at=function(){function t(e,i){O(this,t),this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=i}return T(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"v",value:function(t){var e,i=this._$AD,n=i.el.content,r=i.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:D).importNode(n,!0);nt.currentNode=o;for(var s=nt.nextNode(),a=0,l=0,c=r[0];void 0!==c;){if(a===c.index){var h=void 0;2===c.type?h=new lt(s,s.nextSibling,this,t):1===c.type?h=new c.ctor(s,c.name,c.strings,this,t):6===c.type&&(h=new pt(s,this,t)),this.u.push(h),c=r[++l]}a!==(null==c?void 0:c.index)&&(s=nt.nextNode(),a++)}return o}},{key:"p",value:function(t){var e,i=0,n=x(this.u);try{for(n.s();!(e=n.n()).done;){var r=e.value;void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,i),i+=r.strings.length-2):r._$AI(t[i])),i++}}catch(t){n.e(t)}finally{n.f()}}}]),t}(),lt=function(){function t(e,i,n,r){var o;O(this,t),this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=n,this.options=r,this._$Cm=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}return T(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=st(this,t,e),B(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):z(t)?this.k(t):this.g(t)}},{key:"O",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"T",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}},{key:"g",value:function(t){this._$AH!==et&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}},{key:"$",value:function(t){var e,i=t.values,n=t._$litType$,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=ot.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{var o=new at(r,this),s=o.v(this.options);o.p(i),this.T(s),this._$AH=o}}},{key:"_$AC",value:function(t){var e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new ot(t)),e}},{key:"k",value:function(e){F(this._$AH)||(this._$AH=[],this._$AR());var i,n,r=this._$AH,o=0,s=x(e);try{for(s.s();!(n=s.n()).done;){var a=n.value;o===r.length?r.push(i=new t(this.O(W()),this.O(W()),this,this.options)):i=r[o],i._$AI(a),o++}}catch(t){s.e(t)}finally{s.f()}o0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,i=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,i);e&&e!==this._$AB;){var n=e.nextSibling;e.remove(),e=n}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),ct=function(){function t(e,i,n,r,o){O(this,t),this.type=1,this._$AH=et,this._$AN=void 0,this.element=e,this.name=i,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=et}return T(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=this.strings,o=!1;if(void 0===r)t=st(this,t,e,0),(o=!B(t)||t!==this._$AH&&t!==tt)&&(this._$AH=t);else{var s,a,l=t;for(t=r[0],s=0;s1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=st(this,t,i,0))&&void 0!==e?e:et)!==tt){var n=this._$AH,r=t===et&&n!==et||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==et&&(n===et||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}]),i}(ct),pt=function(){function t(e,i,n){O(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}return T(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){st(this,t)}}]),t}(),gt=I.litHtmlPolyfillSupport;null==gt||gt(ot,lt),(null!==(R=I.litHtmlVersions)&&void 0!==R?R:I.litHtmlVersions=[]).push("2.6.1");var vt,_t;function yt(t){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e){for(var i=0;i3)for(i=[i],n=3;n-1,n=parseFloat(t);return i?e/100*n:n}function $e(t){return parseInt(t,16)}function ke(t){return t.toString(16).padStart(2,"0")}var xe=function(){function t(t,e){this.$={h:0,s:0,v:0,a:1},t&&this.set(t),this.onChange=e,this.initialValue=oe({},this.$)}var e,i,n,r=t.prototype;return r.set=function(e){if("string"==typeof e)/^(?:#?|0x?)[0-9a-fA-F]{3,8}$/.test(e)?this.hexString=e:/^rgba?/.test(e)?this.rgbString=e:/^hsla?/.test(e)&&(this.hslString=e);else{if("object"!=typeof e)throw new Error("Invalid color value");e instanceof t?this.hsva=e.hsva:"r"in e&&"g"in e&&"b"in e?this.rgb=e:"h"in e&&"s"in e&&"v"in e?this.hsv=e:"h"in e&&"s"in e&&"l"in e?this.hsl=e:"kelvin"in e&&(this.kelvin=e.kelvin)}},r.setChannel=function(t,e,i){var n;this[t]=oe({},this[t],((n={})[e]=i,n))},r.reset=function(){this.hsva=this.initialValue},r.clone=function(){return new t(this)},r.unbind=function(){this.onChange=void 0},t.hsvToRgb=function(t){var e=t.h/60,i=t.s/100,n=t.v/100,r=be(e),o=e-r,s=n*(1-i),a=n*(1-o*i),l=n*(1-(1-o)*i),c=r%6,h=[l,n,n,a,s,s][c],u=[s,s,l,n,n,a][c];return{r:me(255*[n,a,s,s,l,n][c],0,255),g:me(255*h,0,255),b:me(255*u,0,255)}},t.rgbToHsv=function(t){var e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=r-o,a=0,l=r,c=0===r?0:s/r;switch(r){case o:a=0;break;case e:a=(i-n)/s+(i.4;){i=.5*(s+o);var a=t.kelvinToRgb(i);a.b/a.r>=r/n?s=i:o=i}return i},e=t,(i=[{key:"hsv",get:function(){var t=this.$;return{h:t.h,s:t.s,v:t.v}},set:function(t){var e=this.$;if(t=oe({},e,t),this.onChange){var i={h:!1,v:!1,s:!1,a:!1};for(var n in e)i[n]=t[n]!=e[n];this.$=t,(i.h||i.s||i.v||i.a)&&this.onChange(this,i)}else this.$=t}},{key:"hsva",get:function(){return oe({},this.$)},set:function(t){this.hsv=t}},{key:"hue",get:function(){return this.$.h},set:function(t){this.hsv={h:t}}},{key:"saturation",get:function(){return this.$.s},set:function(t){this.hsv={s:t}}},{key:"value",get:function(){return this.$.v},set:function(t){this.hsv={v:t}}},{key:"alpha",get:function(){return this.$.a},set:function(t){this.hsv=oe({},this.hsv,{a:t})}},{key:"kelvin",get:function(){return t.rgbToKelvin(this.rgb)},set:function(e){this.rgb=t.kelvinToRgb(e)}},{key:"red",get:function(){return this.rgb.r},set:function(t){this.rgb=oe({},this.rgb,{r:t})}},{key:"green",get:function(){return this.rgb.g},set:function(t){this.rgb=oe({},this.rgb,{g:t})}},{key:"blue",get:function(){return this.rgb.b},set:function(t){this.rgb=oe({},this.rgb,{b:t})}},{key:"rgb",get:function(){var e=t.hsvToRgb(this.$),i=e.r,n=e.g,r=e.b;return{r:ye(i),g:ye(n),b:ye(r)}},set:function(e){this.hsv=oe({},t.rgbToHsv(e),{a:void 0===e.a?1:e.a})}},{key:"rgba",get:function(){return oe({},this.rgb,{a:this.alpha})},set:function(t){this.rgb=t}},{key:"hsl",get:function(){var e=t.hsvToHsl(this.$),i=e.h,n=e.s,r=e.l;return{h:ye(i),s:ye(n),l:ye(r)}},set:function(e){this.hsv=oe({},t.hslToHsv(e),{a:void 0===e.a?1:e.a})}},{key:"hsla",get:function(){return oe({},this.hsl,{a:this.alpha})},set:function(t){this.hsl=t}},{key:"rgbString",get:function(){var t=this.rgb;return"rgb("+t.r+", "+t.g+", "+t.b+")"},set:function(t){var e,i,n,r,o=1;if((e=ce.exec(t))?(i=we(e[1],255),n=we(e[2],255),r=we(e[3],255)):(e=he.exec(t))&&(i=we(e[1],255),n=we(e[2],255),r=we(e[3],255),o=we(e[4],1)),!e)throw new Error("Invalid rgb string");this.rgb={r:i,g:n,b:r,a:o}}},{key:"rgbaString",get:function(){var t=this.rgba;return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},set:function(t){this.rgbString=t}},{key:"hexString",get:function(){var t=this.rgb;return"#"+ke(t.r)+ke(t.g)+ke(t.b)},set:function(t){var e,i,n,r,o=255;if((e=fe.exec(t))?(i=17*$e(e[1]),n=17*$e(e[2]),r=17*$e(e[3])):(e=pe.exec(t))?(i=17*$e(e[1]),n=17*$e(e[2]),r=17*$e(e[3]),o=17*$e(e[4])):(e=ge.exec(t))?(i=$e(e[1]),n=$e(e[2]),r=$e(e[3])):(e=ve.exec(t))&&(i=$e(e[1]),n=$e(e[2]),r=$e(e[3]),o=$e(e[4])),!e)throw new Error("Invalid hex string");this.rgb={r:i,g:n,b:r,a:o/255}}},{key:"hex8String",get:function(){var t=this.rgba;return"#"+ke(t.r)+ke(t.g)+ke(t.b)+ke(be(255*t.a))},set:function(t){this.hexString=t}},{key:"hslString",get:function(){var t=this.hsl;return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},set:function(t){var e,i,n,r,o=1;if((e=ue.exec(t))?(i=we(e[1],360),n=we(e[2],100),r=we(e[3],100)):(e=de.exec(t))&&(i=we(e[1],360),n=we(e[2],100),r=we(e[3],100),o=we(e[4],1)),!e)throw new Error("Invalid hsl string");this.hsl={h:i,s:n,l:r,a:o}}},{key:"hslaString",get:function(){var t=this.hsla;return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},set:function(t){this.hslString=t}}])&&re(e.prototype,i),n&&re(e,n),t}();function Se(t){var e,i=t.width,n=t.sliderSize,r=t.borderWidth,o=t.handleRadius,s=t.padding,a=t.sliderShape,l="horizontal"===t.layoutDirection;return n=null!=(e=n)?e:2*s+2*o,"circle"===a?{handleStart:t.padding+t.handleRadius,handleRange:i-2*s-2*o,width:i,height:i,cx:i/2,cy:i/2,radius:i/2-r/2}:{handleStart:n/2,handleRange:i-n,radius:n/2,x:0,y:0,width:l?n:i,height:l?i:n}}function Ae(t,e){var i=Se(t),n=i.width,r=i.height,o=i.handleRange,s=i.handleStart,a="horizontal"===t.layoutDirection,l=a?n/2:r/2,c=s+function(t,e){var i=e.hsva,n=e.rgb;switch(t.sliderType){case"red":return n.r/2.55;case"green":return n.g/2.55;case"blue":return n.b/2.55;case"alpha":return 100*i.a;case"kelvin":var r=t.minTemperature,o=t.maxTemperature-r,s=(e.kelvin-r)/o*100;return Math.max(0,Math.min(s,100));case"hue":return i.h/=3.6;case"saturation":return i.s;case"value":default:return i.v}}(t,e)/100*o;return a&&(c=-1*c+o+2*s),{x:a?l:c,y:a?c:l}}var Ee,Ce=2*Math.PI,Oe=function(t,e){return Math.sqrt(t*t+e*e)};function Pe(t){return t.width/2-t.padding-t.handleRadius-t.borderWidth}function Te(t){var e=t.width/2;return{width:t.width,radius:e-t.borderWidth,cx:e,cy:e}}function je(t,e,i){var n=t.wheelAngle,r=t.wheelDirection;return i&&"clockwise"===r?e=n+e:"clockwise"===r?e=360-n+e:i&&"anticlockwise"===r?e=n+180-e:"anticlockwise"===r&&(e=n-e),function(t,e){return(t%e+e)%e}(e,360)}function Re(t,e,i){var n=Te(t),r=n.cx,o=n.cy,s=Pe(t);e=r-e,i=o-i;var a=je(t,Math.atan2(-i,-e)*(360/Ce)),l=Math.min(Oe(e,i),s);return{h:Math.round(a),s:Math.round(100/s*l)}}function Ie(t){var e=t.width,i=t.boxHeight;return{width:e,height:null!=i?i:e,radius:t.padding+t.handleRadius}}function Me(t,e,i){var n=Ie(t),r=n.width,o=n.height,s=n.radius,a=(e-s)/(r-2*s)*100,l=(i-s)/(o-2*s)*100;return{s:Math.max(0,Math.min(a,100)),v:Math.max(0,Math.min(100-l,100))}}function He(t){Ee||(Ee=document.getElementsByTagName("base"));var e=window.navigator.userAgent,i=/^((?!chrome|android).)*safari/i.test(e),n=/iPhone|iPod|iPad/i.test(e),r=window.location;return(i||n)&&Ee.length>0?r.protocol+"//"+r.host+r.pathname+r.search+t:t}function Ne(t,e,i,n){for(var r=0;r0&&(o[n?"marginLeft":"marginTop"]=r),Dt(Bt,null,t.children(this.uid,i,o))},e.prototype.handleEvent=function(t){var e=this,i=this.props.onInput,n=this.base.getBoundingClientRect();t.preventDefault();var r=t.touches?t.changedTouches[0]:t,o=r.clientX-n.left,s=r.clientY-n.top;switch(t.type){case"mousedown":case"touchstart":!1!==i(o,s,0)&&We.forEach((function(t){document.addEventListener(t,e,{passive:!1})}));break;case"mousemove":case"touchmove":i(o,s,1);break;case"mouseup":case"touchend":i(o,s,2),We.forEach((function(t){document.removeEventListener(t,e,{passive:!1})}))}},e}(Ft);function Fe(t){var e=t.r,i=t.url,n=e,r=e;return Dt("svg",{className:"IroHandle IroHandle--"+t.index+" "+(t.isActive?"IroHandle--isActive":""),style:{"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0);",transform:"translate("+De(t.x)+", "+De(t.y)+")",willChange:"transform",top:De(-e),left:De(-e),width:De(2*e),height:De(2*e),position:"absolute",overflow:"visible"}},i&&Dt("use",Object.assign({xlinkHref:He(i)},t.props)),!i&&Dt("circle",{cx:n,cy:r,r:e,fill:"none","stroke-width":2,stroke:"#000"}),!i&&Dt("circle",{cx:n,cy:r,r:e-2,fill:t.fill,"stroke-width":2,stroke:"#fff"}))}function ze(t){var e=t.activeIndex,i=void 0!==e&&e0?e.colors:[e.color]).forEach((function(t){return i.addColor(t)})),this.setActiveColor(0),this.state=Object.assign({},e,{color:this.color,colors:this.colors,layout:e.layout})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addColor=function(t,e){void 0===e&&(e=this.colors.length);var i=new xe(t,this.onColorChange.bind(this));this.colors.splice(e,0,i),this.colors.forEach((function(t,e){return t.index=e})),this.state&&this.setState({colors:this.colors}),this.deferredEmit("color:init",i)},e.prototype.removeColor=function(t){var e=this.colors.splice(t,1)[0];e.unbind(),this.colors.forEach((function(t,e){return t.index=e})),this.state&&this.setState({colors:this.colors}),e.index===this.color.index&&this.setActiveColor(0),this.emit("color:remove",e)},e.prototype.setActiveColor=function(t){this.color=this.colors[t],this.state&&this.setState({color:this.color}),this.emit("color:setActive",this.color)},e.prototype.setColors=function(t,e){var i=this;void 0===e&&(e=0),this.colors.forEach((function(t){return t.unbind()})),this.colors=[],t.forEach((function(t){return i.addColor(t)})),this.setActiveColor(e),this.emit("color:setAll",this.colors)},e.prototype.on=function(t,e){var i=this,n=this.events;(Array.isArray(t)?t:[t]).forEach((function(t){(n[t]||(n[t]=[])).push(e),i.deferredEvents[t]&&(i.deferredEvents[t].forEach((function(t){e.apply(null,t)})),i.deferredEvents[t]=[])}))},e.prototype.off=function(t,e){var i=this;(Array.isArray(t)?t:[t]).forEach((function(t){var n=i.events[t];n&&n.splice(n.indexOf(e),1)}))},e.prototype.emit=function(t){for(var e=this,i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];var r=this.activeEvents,o=!!r.hasOwnProperty(t)&&r[t];if(!o){r[t]=!0;var s=this.events[t]||[];s.forEach((function(t){return t.apply(e,i)})),r[t]=!1}},e.prototype.deferredEmit=function(t){for(var e,i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];var r=this.deferredEvents;(e=this).emit.apply(e,[t].concat(i)),(r[t]||(r[t]=[])).push(i)},e.prototype.setOptions=function(t){this.setState(t)},e.prototype.resize=function(t){this.setOptions({width:t})},e.prototype.reset=function(){this.colors.forEach((function(t){return t.reset()})),this.setState({colors:this.colors})},e.prototype.onMount=function(t){this.el=t,this.deferredEmit("mount",this)},e.prototype.onColorChange=function(t,e){this.setState({color:this.color}),this.inputActive&&(this.inputActive=!1,this.emit("input:change",t,e)),this.emit("color:change",t,e)},e.prototype.emitInputEvent=function(t,e){0===t?this.emit("input:start",this.color,e):1===t?this.emit("input:move",this.color,e):2===t&&this.emit("input:end",this.color,e)},e.prototype.render=function(t,e){var i=this,n=e.layout;return Array.isArray(n)||(n=[{component:qe},{component:ze}],e.transparency&&n.push({component:ze,options:{sliderType:"alpha"}})),Dt("div",{class:"IroColorPicker",id:e.id,style:{display:e.display}},n.map((function(t,n){var r=t.component,o=t.options;return Dt(r,Object.assign({},e,o,{ref:void 0,onInput:i.emitInputEvent.bind(i),parent:i,index:n}))})))},e}(Ft);Ke.defaultProps=Object.assign({},{width:300,height:300,color:"#fff",colors:[],padding:6,layoutDirection:"vertical",borderColor:"#fff",borderWidth:0,handleRadius:8,activeHandleRadius:null,handleSvg:null,handleProps:{x:0,y:0},wheelLightness:!0,wheelAngle:0,wheelDirection:"anticlockwise",sliderSize:null,sliderMargin:12,boxHeight:null},{colors:[],display:"block",id:null,layout:"default",margin:null});var Ge,Je,Ze,Xe=((Je=function(t,e){var i,n=document.createElement("div");function r(){var e=t instanceof Element?t:document.querySelector(t);e.appendChild(i.base),i.onMount(e)}return function(t,e,i){var n,r,o;Pt.__p&&Pt.__p(t,e),r=(n=i===It)?null:i&&i.__k||e.__k,t=Dt(Bt,null,[t]),o=[],Qt(e,n?e.__k=t:(i||e).__k=t,r||Mt,Mt,void 0!==e.ownerSVGElement,i&&!n?[i]:r?null:Ht.slice.call(e.childNodes),o,!1,i||Mt,n),te(o,t)}(Dt(Ge,Object.assign({},{ref:function(t){return i=t}},e)),n),"loading"!==document.readyState?r():document.addEventListener("DOMContentLoaded",r),i}).prototype=(Ge=Ke).prototype,Object.assign(Je,Ge),Je.__component=Ge,Je);!function(t){t.version="5.5.2",t.Color=xe,t.ColorPicker=Xe,function(t){t.h=Dt,t.ComponentBase=Be,t.Handle=Fe,t.Slider=ze,t.Wheel=qe,t.Box=Ve}(t.ui||(t.ui={}))}(Ze||(Ze={}));var Ye=Ze;
+/**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+const Qe=window,ti=Qe.ShadowRoot&&(void 0===Qe.ShadyCSS||Qe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;Symbol(),new WeakMap;
+/**
+ * @license
+ * Copyright 2021 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+function ei(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:n}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach(([e,i])=>t.registry.define(e,i)));const r=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return((t,e)=>{ti?t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(e=>{const i=document.createElement("style"),n=Qe.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)})})(r,this.constructor.elementStyles),r}}}var ii=l`
+ .IroSlider {
+ display: none !important;
}
- function k(a, b) {
- var c = Object.keys(a);
- if (Object.getOwnPropertySymbols) {
- var d = Object.getOwnPropertySymbols(a);
- b &&
- (d = d.filter(function (b) {
- return Object.getOwnPropertyDescriptor(a, b).enumerable;
- })),
- c.push.apply(c, d);
- }
- return c;
+
+ .light-entity-card {
+ padding: 16px;
+ }
+
+ .light-entity-child-card {
+ box-shadow: none !important;
+ padding: 0 !important;
+ }
+
+ .light-entity-card.group {
+ padding-bottom: 5;
+ padding-top: 0;
+ }
+
+ .ha-slider-full-width ha-slider {
+ width: 100%;
+ }
+
+ .percent-slider {
+ color: var(--primary-text-color);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .light-entity-card__header {
+ display: flex;
+ justify-content: space-between;
+ @apply --paper-font-headline;
+ line-height: 40px;
+ color: var(--primary-text-color);
+ }
+
+ .group .light-entity-card__header {
+ }
+
+ .light-entity-card-sliders > div {
+ margin-top: 10px;
+ }
+
+ .group .light-entity-card-sliders > div {
+ margin-top: 0px;
+ }
+
+ .light-entity-card__toggle {
+ display: flex;
+ cursor: pointer;
+ }
+
+ .light-entity-card__color-picker {
+ display: flex;
+ justify-content: space-around;
+ margin-top: 10px;
+ }
+
+ .light-entity-card-color_temp {
+ background-image: var(--ha-slider-background);
+ }
+
+ .light-entity-card-effectlist {
+ padding-top: 10px;
+ padding-bottom: 10px;
}
- function l(a) {
- for (var b, c = 1; c < arguments.length; c++)
- (b = null == arguments[c] ? {} : arguments[c]),
- c % 2
- ? k(Object(b), !0).forEach(function (c) {
- m(a, c, b[c]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(b))
- : k(Object(b)).forEach(function (c) {
- Object.defineProperty(
- a,
- c,
- Object.getOwnPropertyDescriptor(b, c)
- );
- });
- return a;
+
+ .group .light-entity-card-effectlist {
+ padding-bottom: 20px;
}
- function m(a, b, c) {
- return (
- b in a
- ? Object.defineProperty(a, b, {
- value: c,
- enumerable: !0,
- configurable: !0,
- writable: !0,
- })
- : (a[b] = c),
- a
- );
+
+ .light-entity-card-center {
+ display: flex;
+ justify-content: center;
+ cursor: pointer;
}
- function n(a, b, c, d, e, f, g) {
- try {
- var h = a[f](g),
- i = h.value;
- } catch (a) {
- return void c(a);
- }
- h.done ? b(i) : Promise.resolve(i).then(d, e);
+
+ .hidden {
+ display: none;
}
- function o(a) {
- return function () {
- var b = this,
- c = arguments;
- return new Promise(function (d, e) {
- function f(a) {
- n(h, d, e, f, g, "next", a);
- }
- function g(a) {
- n(h, d, e, f, g, "throw", a);
- }
- var h = a.apply(b, c);
- f(void 0);
- });
- };
+
+ .icon-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+`,ni={shorten_cards:!1,consolidate_entities:!1,child_card:!1,hide_header:!1,show_header_icon:!1,header:"",color_wheel:!0,persist_features:!1,brightness:!0,color_temp:!0,white_value:!0,color_picker:!0,speed:!0,intensity:!0,force_features:!1,show_slider_percent:!1,full_width_sliders:!1,brightness_icon:"weather-sunny",white_icon:"file-word-box",temperature_icon:"thermometer",speed_icon:"speedometer",intensity_icon:"transit-connection-horizontal"};var ri=l`
+ .entities {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ display: flex;
+ }
+
+ .entities ha-formfield {
+ display: block;
+ margin-bottom: 10px;
+ margin-left: 10px;
+ }
+
+ .checkbox-options {
+ display: flex;
+ }
+
+ mwc-select {
+ width: 100%;
+ }
+
+ .checkbox-options ha-formfield,
+ .entities mwc-switch,
+ .entities ha-form-string {
+ padding-right: 2%;
+ width: 48%;
}
- var p,
- q,
- r,
- s,
- t,
- u,
- v,
- w,
- x,
- y,
- z,
- A,
- B,
- C,
- D,
- E,
- F,
- G,
- H,
- I,
- J,
- K,
- O,
- P,
- Q,
- R,
- U,
- V,
- W,
- X,
- Y,
- Z,
- aa,
- ba,
- ca,
- da,
- ea,
- fa,
- ga,
- ha,
- ia,
- ja,
- ka,
- la,
- ma,
- na,
- oa,
- pa,
- qa,
- ra,
- sa,
- ta,
- ua,
- va,
- wa,
- xa,
- ya,
- za,
- Aa,
- Ba,
- Ca,
- Da,
- Ea,
- Fa,
- Ga,
- Ha,
- Ia,
- Ja;
- (function (a, b) {
- "object" == typeof exports && "undefined" != typeof module
- ? b()
- : "function" == typeof define && define.amd
- ? define(b)
- : b();
- })(this, function () {
- function Ka(a, b) {
- var c,
- f,
- g,
- j,
- k = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : a,
- m = 3 < arguments.length ? arguments[3] : void 0;
- if (b === $) return b;
- var e =
- void 0 === m
- ? k._$Cu
- : null === (c = k._$Cl) || void 0 === c
- ? void 0
- : c[m],
- p = Ab(b) ? void 0 : b._$litDirective$;
- return (
- (null == e ? void 0 : e.constructor) !== p &&
- (null === (f = null == e ? void 0 : e._$AO) ||
- void 0 === f ||
- f.call(e, !1),
- void 0 === p ? (e = void 0) : ((e = new p(a)), e._$AT(a, k, m)),
- void 0 === m
- ? (k._$Cu = e)
- : ((null !== (g = (j = k)._$Cl) && void 0 !== g
- ? g
- : (j._$Cl = []))[m] = e)),
- void 0 !== e && (b = Ka(a, e._$AS(a, b.values), e, m)),
- b
- );
- }
- function La(a) {
- return class extends a {
- createRenderRoot() {
- var a = this.constructor,
- { registry: b, elementDefinitions: c, shadowRootOptions: d } = a;
- c &&
- !b &&
- ((a.registry = new CustomElementRegistry()),
- Object.entries(c).forEach((b) => {
- var [c, d] = b;
- return a.registry.define(c, d);
- }));
- var e = (this.renderOptions.creationScope = this.attachShadow(
- l(l({}, d), {}, { customElements: a.registry })
- ));
- return nb(e, this.constructor.elementStyles), e;
- }
- };
- }
- function Ma(a, c) {
- function b() {
- this.constructor = a;
- }
- if ("function" != typeof c && null !== c)
- throw new TypeError(
- "Class extends value " + (c + "") + " is not a constructor or null"
- );
- Xb(a, c),
- (a.prototype =
- null === c
- ? Object.create(c)
- : ((b.prototype = c.prototype), new b()));
- }
- function Na(a, b, e, f) {
- var g,
- h = arguments.length,
- c =
- 3 > h
- ? b
- : null === f
- ? (f = Object.getOwnPropertyDescriptor(b, e))
- : f;
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate)
- c = Reflect.decorate(a, b, e, f);
- else
- for (var j = a.length - 1; 0 <= j; j--)
- (g = a[j]) &&
- (c = (3 > h ? g(c) : 3 < h ? g(b, e, c) : g(b, e)) || c);
- return 3 < h && c && Object.defineProperty(b, e, c), c;
- }
- function Oa(a) {
- var b = "function" == typeof Symbol && Symbol.iterator,
- c = b && a[b],
- d = 0;
- if (c) return c.call(a);
- if (a && "number" == typeof a.length)
- return {
- next: function () {
- return (
- a && d >= a.length && (a = void 0),
- { value: a && a[d++], done: !a }
- );
- },
- };
- throw new TypeError(
- b ? "Object is not iterable." : "Symbol.iterator is not defined."
- );
- }
- function Pa(a) {
- return (b, c) =>
- void 0 === c
- ? bc(a, b)
- : ((a, b, c) => {
- b.constructor.createProperty(c, a);
- })(a, b, c);
- }
- function Qa(a) {
- return Pa(l(l({}, a), {}, { state: !0 }));
- }
- function Ra(a, b) {
- return cc({
- descriptor: (c) => {
- var d = {
- get() {
- var b, c;
- return null !==
- (c =
- null === (b = this.renderRoot) || void 0 === b
- ? void 0
- : b.querySelector(a)) && void 0 !== c
- ? c
- : null;
- },
- enumerable: !0,
- configurable: !0,
- };
- if (b) {
- var e = "symbol" == typeof c ? Symbol() : "__" + c;
- d.get = function () {
- var b, c;
- return (
- void 0 === this[e] &&
- (this[e] =
- null !==
- (c =
- null === (b = this.renderRoot) || void 0 === b
- ? void 0
- : b.querySelector(a)) && void 0 !== c
- ? c
- : null),
- this[e]
- );
- };
- }
- return d;
- },
- });
- }
- function Sa(a) {
- var { slot: b, selector: c } = null == a ? {} : a;
- return cc({
- descriptor: () => ({
- get() {
- var d,
- e = "slot" + (b ? "[name=".concat(b, "]") : ":not([name])"),
- f =
- null === (d = this.renderRoot) || void 0 === d
- ? void 0
- : d.querySelector(e),
- g = null == f ? [] : dc(f, a);
- return c ? g.filter((a) => a.matches(c)) : g;
- },
- enumerable: !0,
- configurable: !0,
- }),
- });
- }
- function Ta(a, b, c) {
- var d,
- f = a;
- return (
- "object" == typeof a ? ((f = a.slot), (d = a)) : (d = { flatten: b }),
- c
- ? Sa({ slot: f, flatten: b, selector: c })
- : cc({
- descriptor: () => ({
- get() {
- var a,
- b,
- c = "slot" + (f ? "[name=".concat(f, "]") : ":not([name])"),
- g =
- null === (a = this.renderRoot) || void 0 === a
- ? void 0
- : a.querySelector(c);
- return null !==
- (b = null == g ? void 0 : g.assignedNodes(d)) &&
- void 0 !== b
- ? b
- : [];
- },
- enumerable: !0,
- configurable: !0,
- }),
- })
- );
- }
- function Ua(a, b) {
- var c = a.matches || a.webkitMatchesSelector || a.msMatchesSelector;
- return c.call(a, b);
- }
- function Va(a) {
- return {
- addClass: (b) => {
- a.classList.add(b);
- },
- removeClass: (b) => {
- a.classList.remove(b);
- },
- hasClass: (b) => a.classList.contains(b),
- };
- }
- function Wa(a, b, c) {
- if (!a) return { x: 0, y: 0 };
- var d,
- e,
- f = b.x,
- g = b.y,
- h = f + c.left,
- i = g + c.top;
- if ("touchstart" === a.type) {
- var j = a;
- (d = j.changedTouches[0].pageX - h),
- (e = j.changedTouches[0].pageY - i);
- } else {
- var k = a;
- (d = k.pageX - h), (e = k.pageY - i);
- }
- return { x: d, y: e };
- }
- function Xa(a) {
- var b = a.key;
- if (Ec.has(b)) return b;
- var c = Gc.get(a.keyCode);
- return c ? c : Dc.UNKNOWN;
- }
- function Ya() {
- return {
- bufferClearTimeout: 0,
- currentFirstChar: "",
- sortedIndexCursor: 0,
- typeaheadBuffer: "",
- };
- }
- function Za(a, b) {
- for (var c, d = new Map(), e = 0; e < a; e++)
- if (((c = b(e).trim()), !!c)) {
- var f = c[0].toLowerCase();
- d.has(f) || d.set(f, []),
- d.get(f).push({ text: c.toLowerCase(), index: e });
- }
- return (
- d.forEach(function (a) {
- a.sort(function (a, b) {
- return a.index - b.index;
- });
- }),
- d
- );
- }
- function $a(a, b) {
- var c = a.nextChar,
- d = a.focusItemAtIndex,
- e = a.sortedIndexByFirstChar,
- f = a.focusedItemIndex,
- g = a.skipFocus,
- h = a.isItemAtIndexDisabled;
- clearTimeout(b.bufferClearTimeout),
- (b.bufferClearTimeout = setTimeout(function () {
- db(b);
- }, Qc.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS)),
- (b.typeaheadBuffer += c);
- var i;
- return (
- (i = 1 === b.typeaheadBuffer.length ? ab(e, f, h, b) : bb(e, h, b)),
- -1 === i || g || d(i),
- i
- );
- }
- function ab(a, b, c, d) {
- var e = d.typeaheadBuffer[0],
- f = a.get(e);
- if (!f) return -1;
- if (e === d.currentFirstChar && f[d.sortedIndexCursor].index === b) {
- d.sortedIndexCursor = (d.sortedIndexCursor + 1) % f.length;
- var g = f[d.sortedIndexCursor].index;
- if (!c(g)) return g;
- }
- d.currentFirstChar = e;
- var h,
- i = -1;
- for (h = 0; h < f.length; h++)
- if (!c(f[h].index)) {
- i = h;
- break;
- }
- for (; h < f.length; h++)
- if (f[h].index > b && !c(f[h].index)) {
- i = h;
- break;
- }
- return -1 === i
- ? -1
- : ((d.sortedIndexCursor = i), f[d.sortedIndexCursor].index);
- }
- function bb(a, b, c) {
- var d = c.typeaheadBuffer[0],
- e = a.get(d);
- if (!e) return -1;
- var f = e[c.sortedIndexCursor];
- if (0 === f.text.lastIndexOf(c.typeaheadBuffer, 0) && !b(f.index))
- return f.index;
- for (
- var g = (c.sortedIndexCursor + 1) % e.length, h = -1;
- g !== c.sortedIndexCursor;
- ) {
- var i = e[g],
- j = 0 === i.text.lastIndexOf(c.typeaheadBuffer, 0),
- k = !b(i.index);
- if (j && k) {
- h = g;
- break;
- }
- g = (g + 1) % e.length;
- }
- return -1 === h
- ? -1
- : ((c.sortedIndexCursor = h), e[c.sortedIndexCursor].index);
- }
- function cb(a) {
- return 0 < a.typeaheadBuffer.length;
- }
- function db(a) {
- a.typeaheadBuffer = "";
- }
- function eb(a, b) {
- var c = a.event,
- d = a.isTargetListItem,
- e = a.focusedItemIndex,
- f = a.focusItemAtIndex,
- g = a.sortedIndexByFirstChar,
- h = a.isItemAtIndexDisabled,
- i = "ArrowLeft" === Xa(c),
- j = "ArrowUp" === Xa(c),
- k = "ArrowRight" === Xa(c),
- l = "ArrowDown" === Xa(c),
- m = "Home" === Xa(c),
- n = "End" === Xa(c),
- o = "Enter" === Xa(c),
- p = "Spacebar" === Xa(c);
- if (c.ctrlKey || c.metaKey || i || j || k || l || m || n || o) return -1;
- var q = !p && 1 === c.key.length;
- if (q) {
- Sc(c);
- var r = {
- focusItemAtIndex: f,
- focusedItemIndex: e,
- nextChar: c.key.toLowerCase(),
- sortedIndexByFirstChar: g,
- skipFocus: !1,
- isItemAtIndexDisabled: h,
- };
- return $a(r, b);
- }
- if (!p) return -1;
- d && Sc(c);
- var s = d && cb(b);
- if (s) {
- var r = {
- focusItemAtIndex: f,
- focusedItemIndex: e,
- nextChar: " ",
- sortedIndexByFirstChar: g,
- skipFocus: !1,
- isItemAtIndexDisabled: h,
- };
- return $a(r, b);
- }
- return -1;
- }
- function fb(a) {
- return a instanceof Set;
- }
- function gb(a) {
- var b,
- c = 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : 50;
- return function () {
- var d =
- !(0 < arguments.length && arguments[0] !== void 0) || arguments[0];
- clearTimeout(b),
- (b = setTimeout(() => {
- a(d);
- }, c));
- };
- }
- function hb() {
- var a = this.itemsReadyResolver;
- (this.itemsReady = new Promise((a) => (this.itemsReadyResolver = a))),
- a();
- }
- var ib =
- window.ShadowRoot &&
- (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) &&
- "adoptedStyleSheets" in Document.prototype &&
- "replace" in CSSStyleSheet.prototype,
- jb = Symbol(),
- kb = new Map();
- class e {
- constructor(a, b) {
- if (((this._$cssResult$ = !0), b !== jb))
- throw Error(
- "CSSResult is not constructable. Use `unsafeCSS` or `css` instead."
- );
- this.cssText = a;
- }
- get styleSheet() {
- var a = kb.get(this.cssText);
- return (
- ib &&
- void 0 === a &&
- (kb.set(this.cssText, (a = new CSSStyleSheet())),
- a.replaceSync(this.cssText)),
- a
- );
- }
- toString() {
- return this.cssText;
- }
- }
- var n,
- lb = (a) => new e("string" == typeof a ? a : a + "", jb),
- mb = function (a) {
- for (
- var b = arguments.length, c = Array(1 < b ? b - 1 : 0), d = 1;
- d < b;
- d++
- )
- c[d - 1] = arguments[d];
- var f =
- 1 === a.length
- ? a[0]
- : c.reduce(
- (b, c, d) =>
- b +
- ((a) => {
- if (!0 === a._$cssResult$) return a.cssText;
- if ("number" == typeof a) return a;
- throw Error(
- "Value passed to 'css' function must be a 'css' function result: " +
- a +
- ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."
- );
- })(c) +
- a[d + 1],
- a[0]
- );
- return new e(f, jb);
- },
- nb = (a, b) => {
- ib
- ? (a.adoptedStyleSheets = b.map((a) =>
- a instanceof CSSStyleSheet ? a : a.styleSheet
- ))
- : b.forEach((b) => {
- var c = document.createElement("style"),
- d = window.litNonce;
- void 0 !== d && c.setAttribute("nonce", d),
- (c.textContent = b.cssText),
- a.appendChild(c);
- });
- },
- i = ib
- ? (a) => a
- : (a) =>
- a instanceof CSSStyleSheet
- ? ((a) => {
- var b = "";
- for (var c of a.cssRules) b += c.cssText;
- return lb(b);
- })(a)
- : a,
- S = window.trustedTypes,
- ob = S ? S.emptyScript : "",
- pb = window.reactiveElementPolyfillSupport,
- qb = {
- toAttribute(a, b) {
- return (
- b === Boolean
- ? (a = a ? ob : null)
- : b === Object || b === Array
- ? (a = null == a ? a : JSON.stringify(a))
- : void 0,
- a
- );
- },
- fromAttribute(a, b) {
- var c = a;
- switch (b) {
- case Boolean:
- c = null !== a;
- break;
- case Number:
- c = null === a ? null : +a;
- break;
- case Object:
- case Array:
- try {
- c = JSON.parse(a);
- } catch (a) {
- c = null;
- }
- }
- return c;
- },
- },
- rb = (a, b) => b !== a && (b == b || a == a),
- sb = {
- attribute: !0,
- type: String,
- converter: qb,
- reflect: !1,
- hasChanged: rb,
- };
- class h extends HTMLElement {
- constructor() {
- super(),
- (this._$Et = new Map()),
- (this.isUpdatePending = !1),
- (this.hasUpdated = !1),
- (this._$Ei = null),
- this.o();
- }
- static addInitializer(a) {
- var b;
- (null !== (b = this.l) && void 0 !== b) || (this.l = []),
- this.l.push(a);
- }
- static get observedAttributes() {
- this.finalize();
- var a = [];
- return (
- this.elementProperties.forEach((b, c) => {
- var d = this._$Eh(c, b);
- void 0 !== d && (this._$Eu.set(d, c), a.push(d));
- }),
- a
- );
- }
- static createProperty(a) {
- var b =
- 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : sb;
- if (
- (b.state && (b.attribute = !1),
- this.finalize(),
- this.elementProperties.set(a, b),
- !b.noAccessor && !this.prototype.hasOwnProperty(a))
- ) {
- var c = "symbol" == typeof a ? Symbol() : "__" + a,
- d = this.getPropertyDescriptor(a, c, b);
- void 0 !== d && Object.defineProperty(this.prototype, a, d);
- }
- }
- static getPropertyDescriptor(a, b, c) {
- return {
- get() {
- return this[b];
- },
- set(d) {
- var e = this[a];
- (this[b] = d), this.requestUpdate(a, e, c);
- },
- configurable: !0,
- enumerable: !0,
- };
- }
- static getPropertyOptions(a) {
- return this.elementProperties.get(a) || sb;
- }
- static finalize() {
- if (this.hasOwnProperty("finalized")) return !1;
- this.finalized = !0;
- var a = Object.getPrototypeOf(this);
- if (
- (a.finalize(),
- (this.elementProperties = new Map(a.elementProperties)),
- (this._$Eu = new Map()),
- this.hasOwnProperty("properties"))
- ) {
- var b = this.properties,
- c = [
- ...Object.getOwnPropertyNames(b),
- ...Object.getOwnPropertySymbols(b),
- ];
- for (var d of c) this.createProperty(d, b[d]);
- }
- return (this.elementStyles = this.finalizeStyles(this.styles)), !0;
- }
- static finalizeStyles(a) {
- var b = [];
- if (Array.isArray(a)) {
- var c = new Set(a.flat(1 / 0).reverse());
- for (var d of c) b.unshift(i(d));
- } else void 0 !== a && b.push(i(a));
- return b;
- }
- static _$Eh(a, b) {
- var c = b.attribute;
- return !1 === c
- ? void 0
- : "string" == typeof c
- ? c
- : "string" == typeof a
- ? a.toLowerCase()
- : void 0;
- }
- o() {
- var a;
- (this._$Ep = new Promise((a) => (this.enableUpdating = a))),
- (this._$AL = new Map()),
- this._$Em(),
- this.requestUpdate(),
- null === (a = this.constructor.l) ||
- void 0 === a ||
- a.forEach((a) => a(this));
- }
- addController(a) {
- var b, c;
- (null !== (b = this._$Eg) && void 0 !== b ? b : (this._$Eg = [])).push(
- a
- ),
- void 0 !== this.renderRoot &&
- this.isConnected &&
- (null === (c = a.hostConnected) || void 0 === c || c.call(a));
- }
- removeController(a) {
- var b;
- null === (b = this._$Eg) ||
- void 0 === b ||
- b.splice(this._$Eg.indexOf(a) >>> 0, 1);
- }
- _$Em() {
- this.constructor.elementProperties.forEach((a, b) => {
- this.hasOwnProperty(b) && (this._$Et.set(b, this[b]), delete this[b]);
- });
- }
- createRenderRoot() {
- var a,
- b =
- null !== (a = this.shadowRoot) && void 0 !== a
- ? a
- : this.attachShadow(this.constructor.shadowRootOptions);
- return nb(b, this.constructor.elementStyles), b;
- }
- connectedCallback() {
- var a;
- void 0 === this.renderRoot &&
- (this.renderRoot = this.createRenderRoot()),
- this.enableUpdating(!0),
- null === (a = this._$Eg) ||
- void 0 === a ||
- a.forEach((a) => {
- var b;
- return null === (b = a.hostConnected) || void 0 === b
- ? void 0
- : b.call(a);
- });
- }
- enableUpdating() {}
- disconnectedCallback() {
- var a;
- null === (a = this._$Eg) ||
- void 0 === a ||
- a.forEach((a) => {
- var b;
- return null === (b = a.hostDisconnected) || void 0 === b
- ? void 0
- : b.call(a);
- });
- }
- attributeChangedCallback(a, b, c) {
- this._$AK(a, c);
- }
- _$ES(a, b) {
- var c,
- d,
- f =
- 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : sb,
- g = this.constructor._$Eh(a, f);
- if (void 0 !== g && !0 === f.reflect) {
- var h = (
- null !==
- (d =
- null === (c = f.converter) || void 0 === c
- ? void 0
- : c.toAttribute) && void 0 !== d
- ? d
- : qb.toAttribute
- )(b, f.type);
- (this._$Ei = a),
- null == h ? this.removeAttribute(g) : this.setAttribute(g, h),
- (this._$Ei = null);
- }
- }
- _$AK(a, b) {
- var c,
- d,
- f,
- g = this.constructor,
- h = g._$Eu.get(a);
- if (void 0 !== h && this._$Ei !== h) {
- var i = g.getPropertyOptions(h),
- j = i.converter,
- k =
- null !==
- (f =
- null !==
- (d =
- null === (c = j) || void 0 === c
- ? void 0
- : c.fromAttribute) && void 0 !== d
- ? d
- : "function" == typeof j
- ? j
- : null) && void 0 !== f
- ? f
- : qb.fromAttribute;
- (this._$Ei = h), (this[h] = k(b, i.type)), (this._$Ei = null);
- }
- }
- requestUpdate(a, b, c) {
- var d = !0;
- void 0 !== a &&
- (((c = c || this.constructor.getPropertyOptions(a)).hasChanged || rb)(
- this[a],
- b
- )
- ? (this._$AL.has(a) || this._$AL.set(a, b),
- !0 === c.reflect &&
- this._$Ei !== a &&
- (void 0 === this._$EC && (this._$EC = new Map()),
- this._$EC.set(a, c)))
- : (d = !1)),
- !this.isUpdatePending && d && (this._$Ep = this._$E_());
- }
- _$E_() {
- var a = this;
- return o(function* () {
- a.isUpdatePending = !0;
- try {
- yield a._$Ep;
- } catch (a) {
- Promise.reject(a);
- }
- var b = a.scheduleUpdate();
- return null != b && (yield b), !a.isUpdatePending;
- })();
- }
- scheduleUpdate() {
- return this.performUpdate();
- }
- performUpdate() {
- var a;
- if (this.isUpdatePending) {
- this.hasUpdated,
- this._$Et &&
- (this._$Et.forEach((a, b) => (this[b] = a)),
- (this._$Et = void 0));
- var b = !1,
- c = this._$AL;
- try {
- (b = this.shouldUpdate(c)),
- b
- ? (this.willUpdate(c),
- null === (a = this._$Eg) ||
- void 0 === a ||
- a.forEach((a) => {
- var b;
- return null === (b = a.hostUpdate) || void 0 === b
- ? void 0
- : b.call(a);
- }),
- this.update(c))
- : this._$EU();
- } catch (a) {
- throw ((b = !1), this._$EU(), a);
- }
- b && this._$AE(c);
- }
- }
- willUpdate() {}
- _$AE(a) {
- var b;
- null === (b = this._$Eg) ||
- void 0 === b ||
- b.forEach((a) => {
- var b;
- return null === (b = a.hostUpdated) || void 0 === b
- ? void 0
- : b.call(a);
- }),
- this.hasUpdated || ((this.hasUpdated = !0), this.firstUpdated(a)),
- this.updated(a);
- }
- _$EU() {
- (this._$AL = new Map()), (this.isUpdatePending = !1);
- }
- get updateComplete() {
- return this.getUpdateComplete();
- }
- getUpdateComplete() {
- return this._$Ep;
- }
- shouldUpdate() {
- return !0;
- }
- update() {
- void 0 !== this._$EC &&
- (this._$EC.forEach((a, b) => this._$ES(b, this[b], a)),
- (this._$EC = void 0)),
- this._$EU();
- }
- updated() {}
- firstUpdated() {}
- }
- (h.finalized = !0),
- (h.elementProperties = new Map()),
- (h.elementStyles = []),
- (h.shadowRootOptions = { mode: "open" }),
- null == pb || pb({ ReactiveElement: h }),
- (null !== (n = globalThis.reactiveElementVersions) && void 0 !== n
- ? n
- : (globalThis.reactiveElementVersions = [])
- ).push("1.3.0");
- var a,
- tb = globalThis.trustedTypes,
- ub = tb ? tb.createPolicy("lit-html", { createHTML: (a) => a }) : void 0,
- vb = "lit$".concat((Math.random() + "").slice(9), "$"),
- wb = "?" + vb,
- xb = "<".concat(wb, ">"),
- yb = document,
- zb = function () {
- var a =
- 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : "";
- return yb.createComment(a);
- },
- Ab = (a) =>
- null === a || ("object" != typeof a && "function" != typeof a),
- Bb = Array.isArray,
- d = (a) => {
- var b;
- return (
- Bb(a) ||
- "function" ==
- typeof (null === (b = a) || void 0 === b
- ? void 0
- : b[Symbol.iterator])
- );
- },
- Cb = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
- c = /-->/g,
- Db = />/g,
- Eb =
- />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,
- f = /'/g,
- _ = /"/g,
- m = /^(?:script|style|textarea|title)$/i,
- g = ((a) =>
- function (b) {
- for (
- var c = arguments.length, d = Array(1 < c ? c - 1 : 0), e = 1;
- e < c;
- e++
- )
- d[e - 1] = arguments[e];
- return { _$litType$: a, strings: b, values: d };
- })(1),
- $ = Symbol.for("lit-noChange"),
- b = Symbol.for("lit-nothing"),
- Fb = new WeakMap(),
- T = (a, b, c) => {
- var d,
- f,
- g =
- null !== (d = null == c ? void 0 : c.renderBefore) && void 0 !== d
- ? d
- : b,
- h = g._$litPart$;
- if (void 0 === h) {
- var i =
- null !== (f = null == c ? void 0 : c.renderBefore) && void 0 !== f
- ? f
- : null;
- g._$litPart$ = h = new Kb(
- b.insertBefore(zb(), i),
- i,
- void 0,
- null == c ? {} : c
- );
- }
- return h._$AI(a), h;
- },
- Gb = yb.createTreeWalker(yb, 129, null, !1),
- Hb = (a, b) => {
- for (
- var e,
- g = a.length - 1,
- i = [],
- j = 2 === b ? "" : "",
- k = Cb,
- l = 0;
- l < g;
- l++
- ) {
- for (
- var n = a[l], o = void 0, p = void 0, q = -1, s = 0;
- s < n.length && ((k.lastIndex = s), (p = k.exec(n)), null !== p);
+ .checkbox-options ha-formfield {
+ margin-top: 10px;
+ }
+
+ .overall-config {
+ margin-bottom: 20px;
+ }
+`;var oi=(t,e)=>t.reduce((t,i)=>(i.defineId?t[i.defineId]=i:i.promise.then(t=>{void 0===e.registry.get(i.name)&&e.registry.define(i.name,t)}),t),{});var si=t=>({name:t,promise:customElements.whenDefined(t).then(()=>customElements.get(t))});const ai=(t,e,i={},n={})=>{const r=new Event(e,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return r.detail=i,t.dispatchEvent(r),r};class li extends(ei(Ct)){static get elementDefinitions(){return oi([si("ha-checkbox"),si("ha-formfield"),si("ha-form-string"),si("ha-select"),si("mwc-list-item")],li)}static get styles(){return ri}static get properties(){return{hass:{},_config:{}}}setConfig(t){this._config={...ni,...t}}get entityOptions(){const t=Object.keys(this.hass.states).filter(t=>["switch","light","group"].includes(t.substr(0,t.indexOf("."))));return t.sort(),t}firstUpdated(){this._firstRendered=!0}render(){if(!this.hass)return Q``;let{header:t}=this._config;if(!t&&this._config.entity){let e=this._config.entity.split(".")[1]||"";e&&(e=e.charAt(0).toUpperCase()+e.slice(1),t=e)}const e=this.entityOptions.map(t=>Q`${t} `);return Q`
+
+
+
+
+
+
+
+ t.stopPropagation()}"
+ .configValue="${"entity"}"
+ >
+ ${e}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- )
- (s = k.lastIndex),
- k === Cb
- ? "!--" === p[1]
- ? (k = c)
- : void 0 === p[1]
- ? void 0 === p[2]
- ? void 0 !== p[3] && (k = Eb)
- : (m.test(p[2]) && (e = RegExp("" + p[2], "g")), (k = Eb))
- : (k = Db)
- : k === Eb
- ? ">" === p[0]
- ? ((k = null == e ? Cb : e), (q = -1))
- : void 0 === p[1]
- ? (q = -2)
- : ((q = k.lastIndex - p[2].length),
- (o = p[1]),
- (k = void 0 === p[3] ? Eb : '"' === p[3] ? _ : f))
- : k === _ || k === f
- ? (k = Eb)
- : k === c || k === Db
- ? (k = Cb)
- : ((k = Eb), (e = void 0));
- var u = k === Eb && a[l + 1].startsWith("/>") ? " " : "";
- j +=
- k === Cb
- ? n + xb
- : 0 <= q
- ? (i.push(o), n.slice(0, q) + "$lit$" + n.slice(q) + vb + u)
- : n + vb + (-2 === q ? (i.push(void 0), l) : u);
- }
- var t = j + (a[g] || ">") + (2 === b ? "" : "");
- if (!Array.isArray(a) || !a.hasOwnProperty("raw"))
- throw Error("invalid template strings array");
- return [void 0 === ub ? t : ub.createHTML(t), i];
- };
- class Ib {
- constructor(b, e) {
- var f,
- { strings: g, _$litType$: h } = b;
- this.parts = [];
- var i = 0,
- j = 0,
- n = g.length - 1,
- o = this.parts,
- [c, p] = Hb(g, h);
- if (
- ((this.el = Ib.createElement(c, e)),
- (Gb.currentNode = this.el.content),
- 2 === h)
- ) {
- var a = this.el.content,
- q = a.firstChild;
- q.remove(), a.append(...q.childNodes);
- }
- for (; null !== (f = Gb.nextNode()) && o.length < n; ) {
- if (1 === f.nodeType) {
- if (f.hasAttributes()) {
- var s = [];
- for (var t of f.getAttributeNames())
- if (t.endsWith("$lit$") || t.startsWith(vb)) {
- var u = p[j++];
- if ((s.push(t), void 0 !== u)) {
- var v = f.getAttribute(u.toLowerCase() + "$lit$").split(vb),
- w = /([.?@])?(.*)/.exec(u);
- o.push({
- type: 1,
- index: i,
- name: w[2],
- strings: v,
- ctor:
- "." === w[1]
- ? Lb
- : "?" === w[1]
- ? k
- : "@" === w[1]
- ? Mb
- : N,
- });
- } else o.push({ type: 6, index: i });
- }
- for (var x of s) f.removeAttribute(x);
- }
- if (m.test(f.tagName)) {
- var y = f.textContent.split(vb),
- z = y.length - 1;
- if (0 < z) {
- f.textContent = tb ? tb.emptyScript : "";
- for (var A = 0; A < z; A++)
- f.append(y[A], zb()),
- Gb.nextNode(),
- o.push({ type: 2, index: ++i });
- f.append(y[z], zb());
- }
- }
- } else if (8 === f.nodeType)
- if (f.data === wb) o.push({ type: 2, index: i });
- else
- for (var B = -1; -1 !== (B = f.data.indexOf(vb, B + 1)); )
- o.push({ type: 7, index: i }), (B += vb.length - 1);
- i++;
- }
- }
- static createElement(a) {
- var b = yb.createElement("template");
- return (b.innerHTML = a), b;
- }
- }
- class Jb {
- constructor(a, b) {
- (this.v = []), (this._$AN = void 0), (this._$AD = a), (this._$AM = b);
- }
- get parentNode() {
- return this._$AM.parentNode;
- }
- get _$AU() {
- return this._$AM._$AU;
- }
- p(a) {
- var b,
- {
- el: { content: e },
- parts: c,
- } = this._$AD,
- f = (
- null !== (b = null == a ? void 0 : a.creationScope) && void 0 !== b
- ? b
- : yb
- ).importNode(e, !0);
- Gb.currentNode = f;
- for (var g = Gb.nextNode(), j = 0, h = 0, k = c[0]; void 0 !== k; ) {
- if (j === k.index) {
- var d = void 0;
- 2 === k.type
- ? (d = new Kb(g, g.nextSibling, this, a))
- : 1 === k.type
- ? (d = new k.ctor(g, k.name, k.strings, this, a))
- : 6 === k.type && (d = new Nb(g, this, a)),
- this.v.push(d),
- (k = c[++h]);
- }
- j !== (null == k ? void 0 : k.index) && ((g = Gb.nextNode()), j++);
- }
- return f;
- }
- m(a) {
- var b = 0;
- for (var c of this.v)
- void 0 !== c &&
- (void 0 === c.strings
- ? c._$AI(a[b])
- : (c._$AI(a, c, b), (b += c.strings.length - 2))),
- b++;
- }
- }
- class Kb {
- constructor(a, c, d, f) {
- var e;
- (this.type = 2),
- (this._$AH = b),
- (this._$AN = void 0),
- (this._$AA = a),
- (this._$AB = c),
- (this._$AM = d),
- (this.options = f),
- (this._$Cg =
- null === (e = null == f ? void 0 : f.isConnected) ||
- void 0 === e ||
- e);
- }
- get _$AU() {
- var a, b;
- return null !==
- (b = null === (a = this._$AM) || void 0 === a ? void 0 : a._$AU) &&
- void 0 !== b
- ? b
- : this._$Cg;
- }
- get parentNode() {
- var a = this._$AA.parentNode,
- b = this._$AM;
- return void 0 !== b && 11 === a.nodeType && (a = b.parentNode), a;
- }
- get startNode() {
- return this._$AA;
- }
- get endNode() {
- return this._$AB;
- }
- _$AI(a) {
- var c =
- 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : this;
- (a = Ka(this, a, c)),
- Ab(a)
- ? a === b || null == a || "" === a
- ? (this._$AH !== b && this._$AR(), (this._$AH = b))
- : a !== this._$AH && a !== $ && this.$(a)
- : void 0 === a._$litType$
- ? void 0 === a.nodeType
- ? d(a)
- ? this.S(a)
- : this.$(a)
- : this.k(a)
- : this.T(a);
- }
- A(a) {
- var b =
- 1 < arguments.length && arguments[1] !== void 0
- ? arguments[1]
- : this._$AB;
- return this._$AA.parentNode.insertBefore(a, b);
- }
- k(a) {
- this._$AH !== a && (this._$AR(), (this._$AH = this.A(a)));
- }
- $(a) {
- this._$AH !== b && Ab(this._$AH)
- ? (this._$AA.nextSibling.data = a)
- : this.k(yb.createTextNode(a)),
- (this._$AH = a);
- }
- T(a) {
- var b,
- { values: c, _$litType$: d } = a,
- e =
- "number" == typeof d
- ? this._$AC(a)
- : (void 0 === d.el &&
- (d.el = Ib.createElement(d.h, this.options)),
- d);
- if ((null === (b = this._$AH) || void 0 === b ? void 0 : b._$AD) === e)
- this._$AH.m(c);
- else {
- var f = new Jb(e, this),
- g = f.p(this.options);
- f.m(c), this.k(g), (this._$AH = f);
- }
- }
- _$AC(a) {
- var b = Fb.get(a.strings);
- return void 0 === b && Fb.set(a.strings, (b = new Ib(a))), b;
- }
- S(a) {
- Bb(this._$AH) || ((this._$AH = []), this._$AR());
- var b,
- c = this._$AH,
- d = 0;
- for (var f of a)
- d === c.length
- ? c.push(
- (b = new Kb(this.A(zb()), this.A(zb()), this, this.options))
- )
- : (b = c[d]),
- b._$AI(f),
- d++;
- d < c.length && (this._$AR(b && b._$AB.nextSibling, d), (c.length = d));
- }
- _$AR() {
- var a,
- b =
- 0 < arguments.length && arguments[0] !== void 0
- ? arguments[0]
- : this._$AA.nextSibling,
- c = 1 < arguments.length ? arguments[1] : void 0;
- for (
- null === (a = this._$AP) || void 0 === a || a.call(this, !1, !0, c);
- b && b !== this._$AB;
+
+
+
+
+
+
+
+
+
+
+
- ) {
- var d = b.nextSibling;
- b.remove(), (b = d);
- }
- }
- setConnected(a) {
- var b;
- void 0 === this._$AM &&
- ((this._$Cg = a),
- null === (b = this._$AP) || void 0 === b || b.call(this, a));
- }
- }
- class N {
- constructor(a, c, d, f, e) {
- (this.type = 1),
- (this._$AH = b),
- (this._$AN = void 0),
- (this.element = a),
- (this.name = c),
- (this._$AM = f),
- (this.options = e),
- 2 < d.length || "" !== d[0] || "" !== d[1]
- ? ((this._$AH = Array(d.length - 1).fill(new String())),
- (this.strings = d))
- : (this._$AH = b);
- }
- get tagName() {
- return this.element.tagName;
- }
- get _$AU() {
- return this._$AM._$AU;
- }
- _$AI(a) {
- var c =
- 1 < arguments.length && arguments[1] !== void 0
- ? arguments[1]
- : this,
- d = 2 < arguments.length ? arguments[2] : void 0,
- f = 3 < arguments.length ? arguments[3] : void 0,
- e = this.strings,
- g = !1;
- if (void 0 === e)
- (a = Ka(this, a, c, 0)),
- (g = !Ab(a) || (a !== this._$AH && a !== $)),
- g && (this._$AH = a);
- else {
- var h,
- i,
- j = a;
- for (a = e[0], h = 0; h < e.length - 1; h++)
- (i = Ka(this, j[d + h], c, h)),
- i === $ && (i = this._$AH[h]),
- g || (g = !Ab(i) || i !== this._$AH[h]),
- i === b
- ? (a = b)
- : a !== b && (a += (null == i ? "" : i) + e[h + 1]),
- (this._$AH[h] = i);
- }
- g && !f && this.C(a);
- }
- C(a) {
- a === b
- ? this.element.removeAttribute(this.name)
- : this.element.setAttribute(this.name, null == a ? "" : a);
- }
- }
- class Lb extends N {
- constructor() {
- super(...arguments), (this.type = 3);
- }
- C(a) {
- this.element[this.name] = a === b ? void 0 : a;
- }
- }
- var M = tb ? tb.emptyScript : "";
- class k extends N {
- constructor() {
- super(...arguments), (this.type = 4);
- }
- C(a) {
- a && a !== b
- ? this.element.setAttribute(this.name, M)
- : this.element.removeAttribute(this.name);
- }
- }
- class Mb extends N {
- constructor(a, b, c, d, e) {
- super(a, b, c, d, e), (this.type = 5);
- }
- _$AI(a) {
- var c,
- d =
- 1 < arguments.length && arguments[1] !== void 0
- ? arguments[1]
- : this;
- if (
- (a = null !== (c = Ka(this, a, d, 0)) && void 0 !== c ? c : b) !== $
- ) {
- var f = this._$AH,
- e =
- (a === b && f !== b) ||
- a.capture !== f.capture ||
- a.once !== f.once ||
- a.passive !== f.passive,
- g = a !== b && (f === b || e);
- e && this.element.removeEventListener(this.name, this, f),
- g && this.element.addEventListener(this.name, this, a),
- (this._$AH = a);
- }
- }
- handleEvent(a) {
- var b, c;
- "function" == typeof this._$AH
- ? this._$AH.call(
- null !==
- (c =
- null === (b = this.options) || void 0 === b
- ? void 0
- : b.host) && void 0 !== c
- ? c
- : this.element,
- a
- )
- : this._$AH.handleEvent(a);
- }
- }
- class Nb {
- constructor(a, b, c) {
- (this.element = a),
- (this.type = 6),
- (this._$AN = void 0),
- (this._$AM = b),
- (this.options = c);
- }
- get _$AU() {
- return this._$AM._$AU;
- }
- _$AI(a) {
- Ka(this, a);
- }
- }
- var L = window.litHtmlPolyfillSupport;
- null == L || L(Ib, Kb),
- (null !== (a = globalThis.litHtmlVersions) && void 0 !== a
- ? a
- : (globalThis.litHtmlVersions = [])
- ).push("2.2.0");
- var Ob, Pb;
- class Qb extends h {
- constructor() {
- super(...arguments),
- (this.renderOptions = { host: this }),
- (this._$Dt = void 0);
- }
- createRenderRoot() {
- var a,
- b,
- c = super.createRenderRoot();
- return (
- (null !== (a = (b = this.renderOptions).renderBefore) &&
- void 0 !== a) ||
- (b.renderBefore = c.firstChild),
- c
- );
- }
- update(a) {
- var b = this.render();
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected),
- super.update(a),
- (this._$Dt = T(b, this.renderRoot, this.renderOptions));
- }
- connectedCallback() {
- var a;
- super.connectedCallback(),
- null === (a = this._$Dt) || void 0 === a || a.setConnected(!0);
- }
- disconnectedCallback() {
- var a;
- super.disconnectedCallback(),
- null === (a = this._$Dt) || void 0 === a || a.setConnected(!1);
- }
- render() {
- return $;
- }
- }
- (Qb.finalized = !0),
- (Qb._$litElement$ = !0),
- null === (Ob = globalThis.litElementHydrateSupport) ||
- void 0 === Ob ||
- Ob.call(globalThis, { LitElement: Qb });
- var Rb = globalThis.litElementPolyfillSupport;
- null == Rb || Rb({ LitElement: Qb }),
- (null !== (Pb = globalThis.litElementVersions) && void 0 !== Pb
- ? Pb
- : (globalThis.litElementVersions = [])
- ).push("3.2.0");
- var Sb = mb(
- p ||
- (p = j([
- "\n .light-entity-card {\n padding: 16px;\n }\n\n .light-entity-child-card {\n box-shadow: none !important;\n padding: 0 !important;\n }\n\n .light-entity-card.group {\n padding-bottom: 0;\n padding-top: 0;\n }\n\n .ha-slider-full-width ha-slider {\n width: 100%;\n }\n\n .percent-slider {\n color: var(--primary-text-color);\n margin-top: 5px;\n }\n\n .light-entity-card__header {\n display: flex;\n justify-content: space-between;\n @apply --paper-font-headline;\n line-height: 40px;\n color: var(--primary-text-color);\n font-size: 24px;\n }\n\n .group .light-entity-card__header {\n font-size: 16px;\n }\n\n .light-entity-card-sliders > div {\n margin-top: 10px;\n }\n\n .group .light-entity-card-sliders > div {\n margin-top: 0px;\n }\n\n .light-entity-card__toggle {\n display: flex;\n cursor: pointer;\n }\n\n .light-entity-card__color-picker {\n display: flex;\n justify-content: space-around;\n --ha-color-picker-wheel-borderwidth: 5;\n --ha-color-picker-wheel-bordercolor: white;\n --ha-color-picker-wheel-shadow: none;\n --ha-color-picker-marker-borderwidth: 2;\n --ha-color-picker-marker-bordercolor: white;\n }\n\n .group .light-entity-card__color-picker {\n width: 50%;\n margin: 0 auto;\n }\n \n .light-entity-card-color_temp {\n background-image: var(--ha-slider-background);\n }\n\n .group .light-entity-card-effectlist {\n margin-top: -25px;\n }\n\n .light-entity-card-center {\n display: flex;\n justify-content: center;\n cursor: pointer;\n }\n\n .light-entity-card-toggle {\n margin-right: 5px;\n }\n\n .hidden {\n display: none;\n }\n\n .icon-container {\n margin-top: 4px;\n }\n",
- ]))
- ),
- Tb = {
- shorten_cards: !1,
- consolidate_entities: !1,
- child_card: !1,
- hide_header: !1,
- header: "",
- color_wheel: !0,
- persist_features: !1,
- brightness: !0,
- color_temp: !0,
- white_value: !0,
- color_picker: !0,
- smooth_color_wheel: !1,
- speed: !0,
- intensity: !0,
- force_features: !1,
- show_slider_percent: !1,
- full_width_sliders: !1,
- brightness_icon: "weather-sunny",
- white_icon: "file-word-box",
- temperature_icon: "thermometer",
- speed_icon: "speedometer",
- intensity_icon: "transit-connection-horizontal",
- },
- Ub = mb(
- q ||
- (q = j([
- "\n .entities {\n padding-top: 10px;\n padding-bottom: 10px;\n display: flex;\n }\n\n .entities ha-formfield {\n display: block;\n margin-bottom: 10px;\n margin-left: 10px;\n }\n\n .checkbox-options {\n display: flex;\n }\n \n mwc-select {\n width: 100%;\n }\n\n .checkbox-options ha-formfield,\n .entities mwc-switch,\n .entities ha-form-string {\n padding-right: 2%;\n width: 48%;\n }\n\n .checkbox-options ha-formfield {\n margin-top: 10px;\n }\n\n .overall-config {\n margin-bottom: 20px;\n }\n",
- ]))
- ),
- Vb = (a, b) =>
- a.reduce(
- (a, c) => (
- c.defineId
- ? (a[c.defineId] = c)
- : c.promise.then((a) => {
- void 0 === b.registry.get(c.name) &&
- b.registry.define(c.name, a);
- }),
- a
- ),
- {}
- ),
- Wb = (a) => ({
- name: a,
- promise: customElements
- .whenDefined(a)
- .then(() => customElements.get(a)),
- }),
- Xb = function (a, c) {
- return (
- (Xb =
- Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array &&
- function (a, c) {
- a.__proto__ = c;
- }) ||
- function (a, c) {
- for (var b in c)
- Object.prototype.hasOwnProperty.call(c, b) && (a[b] = c[b]);
- }),
- Xb(a, c)
- );
- },
- Yb = function () {
- return (
- (Yb =
- Object.assign ||
- function (a) {
- for (var b, c = 1, d = arguments.length; c < d; c++)
- for (var e in ((b = arguments[c]), b))
- Object.prototype.hasOwnProperty.call(b, e) && (a[e] = b[e]);
- return a;
- }),
- Yb.apply(this, arguments)
- );
- },
- Zb = (a) => (b, c) => {
- if (!b.constructor._observers) {
- b.constructor._observers = new Map();
- var d = b.updated;
- b.updated = function (a) {
- d.call(this, a),
- a.forEach((a, b) => {
- var c = this.constructor._observers,
- d = c.get(b);
- d !== void 0 && d.call(this, this[b], a);
- });
- };
- } else if (!b.constructor.hasOwnProperty("_observers")) {
- var e = b.constructor._observers;
- (b.constructor._observers = new Map()),
- e.forEach((a, c) => b.constructor._observers.set(c, a));
- }
- b.constructor._observers.set(c, a);
- };
- class $b {
- constructor(a) {
- (this.startPress = (b) => {
- a().then((a) => {
- a && a.startPress(b);
- });
- }),
- (this.endPress = () => {
- a().then((a) => {
- a && a.endPress();
- });
- }),
- (this.startFocus = () => {
- a().then((a) => {
- a && a.startFocus();
- });
- }),
- (this.endFocus = () => {
- a().then((a) => {
- a && a.endFocus();
- });
- }),
- (this.startHover = () => {
- a().then((a) => {
- a && a.startHover();
- });
- }),
- (this.endHover = () => {
- a().then((a) => {
- a && a.endHover();
- });
- });
- }
- }
- var ac,
- bc = (a, b) =>
- "method" === b.kind && b.descriptor && !("value" in b.descriptor)
- ? l(
- l({}, b),
- {},
- {
- finisher(c) {
- c.createProperty(b.key, a);
- },
- }
- )
- : {
- kind: "field",
- key: Symbol(),
- placement: "own",
- descriptor: {},
- originalKey: b.key,
- initializer() {
- "function" == typeof b.initializer &&
- (this[b.key] = b.initializer.call(this));
- },
- finisher(c) {
- c.createProperty(b.key, a);
- },
- },
- cc = (a) => {
- var { finisher: b, descriptor: c } = a;
- return (a, d) => {
- var e;
- if (void 0 === d) {
- var f = null !== (e = a.originalKey) && void 0 !== e ? e : a.key,
- g =
- null == c
- ? l(l({}, a), {}, { key: f })
- : {
- kind: "method",
- placement: "prototype",
- key: f,
- descriptor: c(a.key),
- };
- return (
- null != b &&
- (g.finisher = function (a) {
- b(a, f);
- }),
- g
- );
- }
- {
- var h = a.constructor;
- void 0 !== c && Object.defineProperty(a, d, c(d)),
- null == b || b(h, d);
- }
- };
- },
- dc =
- null ==
- (null === (ac = window.HTMLSlotElement) || void 0 === ac
- ? void 0
- : ac.prototype.assignedElements)
- ? (a, b) =>
- a.assignedNodes(b).filter((a) => a.nodeType === Node.ELEMENT_NODE)
- : (a, b) => a.assignedElements(b),
- ec = {
- ATTRIBUTE: 1,
- CHILD: 2,
- PROPERTY: 3,
- BOOLEAN_ATTRIBUTE: 4,
- EVENT: 5,
- ELEMENT: 6,
- },
- fc = (a) =>
- function () {
- for (var b = arguments.length, c = Array(b), d = 0; d < b; d++)
- c[d] = arguments[d];
- return { _$litDirective$: a, values: c };
- };
- class gc {
- constructor() {}
- get _$AU() {
- return this._$AM._$AU;
- }
- _$AT(a, b, c) {
- (this._$Ct = a), (this._$AM = b), (this._$Ci = c);
- }
- _$AS(a, b) {
- return this.update(a, b);
- }
- update(a, b) {
- return this.render(...b);
- }
- }
- var hc = fc(
- class extends gc {
- constructor(a) {
- var b;
- if (
- (super(a),
- a.type !== ec.ATTRIBUTE ||
- "class" !== a.name ||
- 2 <
- (null === (b = a.strings) || void 0 === b ? void 0 : b.length))
- )
- throw Error(
- "`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."
- );
- }
- render(a) {
- return (
- " " +
- Object.keys(a)
- .filter((b) => a[b])
- .join(" ") +
- " "
- );
- }
- update(a, b) {
- var c,
- d,
- [f] = b;
- if (void 0 === this.et) {
- for (var e in ((this.et = new Set()),
- void 0 !== a.strings &&
- (this.st = new Set(
- a.strings
- .join(" ")
- .split(/\s/)
- .filter((a) => "" !== a)
- )),
- f))
- !f[e] ||
- (null !== (c = this.st) && void 0 !== c && c.has(e)) ||
- this.et.add(e);
- return this.render(f);
- }
- var g = a.element.classList;
- for (var h in (this.et.forEach((a) => {
- a in f || (g.remove(a), this.et.delete(a));
- }),
- f)) {
- var i = !!f[h];
- i === this.et.has(h) ||
- (null === (d = this.st) || void 0 === d ? void 0 : d.has(h)) ||
- (i
- ? (g.add(h), this.et.add(h))
- : (g.remove(h), this.et.delete(h)));
- }
- return $;
- }
- }
- );
- class ic extends Qb {
- constructor() {
- super(...arguments),
- (this.value = ""),
- (this.group = null),
- (this.tabindex = -1),
- (this.disabled = !1),
- (this.twoline = !1),
- (this.activated = !1),
- (this.graphic = null),
- (this.multipleGraphics = !1),
- (this.hasMeta = !1),
- (this.noninteractive = !1),
- (this.selected = !1),
- (this.shouldRenderRipple = !1),
- (this._managingList = null),
- (this.boundOnClick = this.onClick.bind(this)),
- (this._firstChanged = !0),
- (this._skipPropRequest = !1),
- (this.rippleHandlers = new $b(
- () => ((this.shouldRenderRipple = !0), this.ripple)
- )),
- (this.listeners = [
- {
- target: this,
- eventNames: ["click"],
- cb: () => {
- this.onClick();
- },
- },
- {
- target: this,
- eventNames: ["mouseenter"],
- cb: this.rippleHandlers.startHover,
- },
- {
- target: this,
- eventNames: ["mouseleave"],
- cb: this.rippleHandlers.endHover,
- },
- {
- target: this,
- eventNames: ["focus"],
- cb: this.rippleHandlers.startFocus,
- },
- {
- target: this,
- eventNames: ["blur"],
- cb: this.rippleHandlers.endFocus,
- },
- {
- target: this,
- eventNames: ["mousedown", "touchstart"],
- cb: (a) => {
- var b = a.type;
- this.onDown("mousedown" === b ? "mouseup" : "touchend", a);
- },
- },
- ]);
- }
- get text() {
- var a = this.textContent;
- return a ? a.trim() : "";
- }
- render() {
- var a = this.renderText(),
- b = this.graphic ? this.renderGraphic() : g(r || (r = j([""]))),
- c = this.hasMeta ? this.renderMeta() : g(s || (s = j([""])));
- return g(
- t || (t = j(["\n ", "\n ", "\n ", "\n ", ""])),
- this.renderRipple(),
- b,
- a,
- c
- );
- }
- renderRipple() {
- return this.shouldRenderRipple
- ? g(
- u ||
- (u = j([
- "\n
\n ",
- ])),
- this.activated
- )
- : this.activated
- ? g(v || (v = j(['
'])))
- : "";
- }
- renderGraphic() {
- var a = { multi: this.multipleGraphics };
- return g(
- w ||
- (w = j([
- '\n
\n \n ',
- ])),
- hc(a)
- );
- }
- renderMeta() {
- return g(
- x ||
- (x = j([
- '\n
\n \n ',
- ]))
- );
- }
- renderText() {
- var a = this.twoline ? this.renderTwoline() : this.renderSingleLine();
- return g(
- y ||
- (y = j([
- '\n
\n ',
- "\n ",
- ])),
- a
- );
- }
- renderSingleLine() {
- return g(z || (z = j(["
"])));
- }
- renderTwoline() {
- return g(
- A ||
- (A = j([
- '\n
\n \n \n
\n \n \n ',
- ]))
- );
- }
- onClick() {
- this.fireRequestSelected(!this.selected, "interaction");
- }
- onDown(a, b) {
- var c = () => {
- window.removeEventListener(a, c), this.rippleHandlers.endPress();
- };
- window.addEventListener(a, c), this.rippleHandlers.startPress(b);
- }
- fireRequestSelected(a, b) {
- if (!this.noninteractive) {
- var c = new CustomEvent("request-selected", {
- bubbles: !0,
- composed: !0,
- detail: { source: b, selected: a },
- });
- this.dispatchEvent(c);
- }
- }
- connectedCallback() {
- super.connectedCallback(),
- this.noninteractive || this.setAttribute("mwc-list-item", "");
- for (var a of this.listeners)
- for (var b of a.eventNames)
- a.target.addEventListener(b, a.cb, { passive: !0 });
- }
- disconnectedCallback() {
- super.disconnectedCallback();
- for (var a of this.listeners)
- for (var b of a.eventNames) a.target.removeEventListener(b, a.cb);
- this._managingList &&
- (this._managingList.debouncedLayout
- ? this._managingList.debouncedLayout(!0)
- : this._managingList.layout(!0));
- }
- firstUpdated() {
- var a = new Event("list-item-rendered", { bubbles: !0, composed: !0 });
- this.dispatchEvent(a);
- }
- }
- Na([Ra("slot")], ic.prototype, "slotElement", void 0),
- Na(
- [
- (function (a) {
- return cc({
- descriptor: () => ({
- get() {
- var b = this;
- return o(function* () {
- var c;
- return (
- yield b.updateComplete,
- null === (c = b.renderRoot) || void 0 === c
- ? void 0
- : c.querySelector(a)
- );
- })();
- },
- enumerable: !0,
- configurable: !0,
- }),
- });
- })("mwc-ripple"),
- ],
- ic.prototype,
- "ripple",
- void 0
- ),
- Na([Pa({ type: String })], ic.prototype, "value", void 0),
- Na([Pa({ type: String, reflect: !0 })], ic.prototype, "group", void 0),
- Na([Pa({ type: Number, reflect: !0 })], ic.prototype, "tabindex", void 0),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- a
- ? this.setAttribute("aria-disabled", "true")
- : this.setAttribute("aria-disabled", "false");
- }),
- ],
- ic.prototype,
- "disabled",
- void 0
- ),
- Na([Pa({ type: Boolean, reflect: !0 })], ic.prototype, "twoline", void 0),
- Na(
- [Pa({ type: Boolean, reflect: !0 })],
- ic.prototype,
- "activated",
- void 0
- ),
- Na([Pa({ type: String, reflect: !0 })], ic.prototype, "graphic", void 0),
- Na([Pa({ type: Boolean })], ic.prototype, "multipleGraphics", void 0),
- Na([Pa({ type: Boolean })], ic.prototype, "hasMeta", void 0),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- a
- ? (this.removeAttribute("aria-checked"),
- this.removeAttribute("mwc-list-item"),
- (this.selected = !1),
- (this.activated = !1),
- (this.tabIndex = -1))
- : this.setAttribute("mwc-list-item", "");
- }),
- ],
- ic.prototype,
- "noninteractive",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- var b = this.getAttribute("role"),
- c =
- "gridcell" === b ||
- "option" === b ||
- "row" === b ||
- "tab" === b;
- return (
- c && a
- ? this.setAttribute("aria-selected", "true")
- : c && this.setAttribute("aria-selected", "false"),
- this._firstChanged
- ? void (this._firstChanged = !1)
- : void (
- this._skipPropRequest ||
- this.fireRequestSelected(a, "property")
- )
- );
- }),
- ],
- ic.prototype,
- "selected",
- void 0
- ),
- Na([Qa()], ic.prototype, "shouldRenderRipple", void 0),
- Na([Qa()], ic.prototype, "_managingList", void 0);
- var jc = mb(
- B ||
- (B = j([
- ':host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}',
- ]))
- ),
- kc = (a) => a.nodeType === Node.ELEMENT_NODE,
- lc = () => {},
- mc = {
- get passive() {
- return !1;
- },
- };
- document.addEventListener("x", lc, mc),
- document.removeEventListener("x", lc);
- var nc = function () {
- var a =
- 0 < arguments.length && arguments[0] !== void 0
- ? arguments[0]
- : window.document,
- b = a.activeElement,
- c = [];
- if (!b) return c;
- for (; b && (c.push(b), b.shadowRoot); ) b = b.shadowRoot.activeElement;
- return c;
- },
- oc = (a) => {
- var b = nc();
- if (!b.length) return !1;
- var c = b[b.length - 1],
- d = new Event("check-if-focused", { bubbles: !0, composed: !0 }),
- e = [],
- f = (a) => {
- e = a.composedPath();
- };
- return (
- document.body.addEventListener("check-if-focused", f),
- c.dispatchEvent(d),
- document.body.removeEventListener("check-if-focused", f),
- -1 !== e.indexOf(a)
- );
- };
- class pc extends Qb {
- click() {
- return this.mdcRoot
- ? (this.mdcRoot.focus(), void this.mdcRoot.click())
- : void super.click();
- }
- createFoundation() {
- this.mdcFoundation !== void 0 && this.mdcFoundation.destroy(),
- this.mdcFoundationClass &&
- ((this.mdcFoundation = new this.mdcFoundationClass(
- this.createAdapter()
- )),
- this.mdcFoundation.init());
- }
- firstUpdated() {
- this.createFoundation();
- }
- }
- var qc = (function () {
- function a(a) {
- void 0 === a && (a = {}), (this.adapter = a);
- }
- return (
- Object.defineProperty(a, "cssClasses", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(a, "strings", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(a, "numbers", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(a, "defaultAdapter", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- (a.prototype.init = function () {}),
- (a.prototype.destroy = function () {}),
- a
- );
- })(),
- rc = {
- 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",
- },
- sc = {
- 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",
- },
- tc = {
- DEACTIVATION_TIMEOUT_MS: 225,
- FG_DEACTIVATION_MS: 150,
- INITIAL_ORIGIN_SCALE: 0.6,
- PADDING: 10,
- TAP_DELAY_MS: 300,
- },
- uc = ["touchstart", "pointerdown", "mousedown", "keydown"],
- vc = ["touchend", "pointerup", "mouseup", "contextmenu"],
- wc = [],
- xc = (function (a) {
- function b(c) {
- var d = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (d.activationAnimationHasEnded = !1),
- (d.activationTimer = 0),
- (d.fgDeactivationRemovalTimer = 0),
- (d.fgScale = "0"),
- (d.frame = { width: 0, height: 0 }),
- (d.initialSize = 0),
- (d.layoutFrame = 0),
- (d.maxRadius = 0),
- (d.unboundedCoords = { left: 0, top: 0 }),
- (d.activationState = d.defaultActivationState()),
- (d.activationTimerCallback = function () {
- (d.activationAnimationHasEnded = !0),
- d.runDeactivationUXLogicIfReady();
- }),
- (d.activateHandler = function (a) {
- d.activateImpl(a);
- }),
- (d.deactivateHandler = function () {
- d.deactivateImpl();
- }),
- (d.focusHandler = function () {
- d.handleFocus();
- }),
- (d.blurHandler = function () {
- d.handleBlur();
- }),
- (d.resizeHandler = function () {
- d.layout();
- }),
- d
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return rc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "strings", {
- get: function () {
- return sc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "numbers", {
- get: function () {
- return tc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "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: !1,
- configurable: !0,
- }),
- (b.prototype.init = function () {
- var a = this,
- c = this.supportsPressRipple();
- if ((this.registerRootHandlers(c), c)) {
- var d = b.cssClasses,
- e = d.ROOT,
- f = d.UNBOUNDED;
- requestAnimationFrame(function () {
- a.adapter.addClass(e),
- a.adapter.isUnbounded() &&
- (a.adapter.addClass(f), a.layoutInternal());
- });
- }
- }),
- (b.prototype.destroy = function () {
- var a = this;
- if (this.supportsPressRipple()) {
- this.activationTimer &&
- (clearTimeout(this.activationTimer),
- (this.activationTimer = 0),
- this.adapter.removeClass(b.cssClasses.FG_ACTIVATION)),
- this.fgDeactivationRemovalTimer &&
- (clearTimeout(this.fgDeactivationRemovalTimer),
- (this.fgDeactivationRemovalTimer = 0),
- this.adapter.removeClass(b.cssClasses.FG_DEACTIVATION));
- var c = b.cssClasses,
- d = c.ROOT,
- e = c.UNBOUNDED;
- requestAnimationFrame(function () {
- a.adapter.removeClass(d),
- a.adapter.removeClass(e),
- a.removeCssVars();
- });
- }
- this.deregisterRootHandlers(),
- this.deregisterDeactivationHandlers();
- }),
- (b.prototype.activate = function (a) {
- this.activateImpl(a);
- }),
- (b.prototype.deactivate = function () {
- this.deactivateImpl();
- }),
- (b.prototype.layout = function () {
- var a = this;
- this.layoutFrame && cancelAnimationFrame(this.layoutFrame),
- (this.layoutFrame = requestAnimationFrame(function () {
- a.layoutInternal(), (a.layoutFrame = 0);
- }));
- }),
- (b.prototype.setUnbounded = function (a) {
- var c = b.cssClasses.UNBOUNDED;
- a ? this.adapter.addClass(c) : this.adapter.removeClass(c);
- }),
- (b.prototype.handleFocus = function () {
- var a = this;
- requestAnimationFrame(function () {
- return a.adapter.addClass(b.cssClasses.BG_FOCUSED);
- });
- }),
- (b.prototype.handleBlur = function () {
- var a = this;
- requestAnimationFrame(function () {
- return a.adapter.removeClass(b.cssClasses.BG_FOCUSED);
- });
- }),
- (b.prototype.supportsPressRipple = function () {
- return this.adapter.browserSupportsCssVars();
- }),
- (b.prototype.defaultActivationState = function () {
- return {
- activationEvent: void 0,
- hasDeactivationUXRun: !1,
- isActivated: !1,
- isProgrammatic: !1,
- wasActivatedByPointer: !1,
- wasElementMadeActive: !1,
- };
- }),
- (b.prototype.registerRootHandlers = function (a) {
- var b, c;
- if (a) {
- try {
- for (var d, e = Oa(uc), f = e.next(); !f.done; f = e.next())
- (d = f.value),
- this.adapter.registerInteractionHandler(
- d,
- this.activateHandler
- );
- } catch (a) {
- b = { error: a };
- } finally {
- try {
- f && !f.done && (c = e.return) && c.call(e);
- } finally {
- if (b) throw b.error;
- }
- }
- this.adapter.isUnbounded() &&
- this.adapter.registerResizeHandler(this.resizeHandler);
- }
- this.adapter.registerInteractionHandler("focus", this.focusHandler),
- this.adapter.registerInteractionHandler("blur", this.blurHandler);
- }),
- (b.prototype.registerDeactivationHandlers = function (a) {
- var b, c;
- if ("keydown" === a.type)
- this.adapter.registerInteractionHandler(
- "keyup",
- this.deactivateHandler
- );
- else
- try {
- for (var d, e = Oa(vc), f = e.next(); !f.done; f = e.next())
- (d = f.value),
- this.adapter.registerDocumentInteractionHandler(
- d,
- this.deactivateHandler
- );
- } catch (a) {
- b = { error: a };
- } finally {
- try {
- f && !f.done && (c = e.return) && c.call(e);
- } finally {
- if (b) throw b.error;
- }
- }
- }),
- (b.prototype.deregisterRootHandlers = function () {
- var a, b;
- try {
- for (var c, d = Oa(uc), e = d.next(); !e.done; e = d.next())
- (c = e.value),
- this.adapter.deregisterInteractionHandler(
- c,
- this.activateHandler
- );
- } catch (b) {
- a = { error: b };
- } finally {
- try {
- e && !e.done && (b = d.return) && b.call(d);
- } finally {
- if (a) throw a.error;
- }
- }
- this.adapter.deregisterInteractionHandler(
- "focus",
- this.focusHandler
- ),
- this.adapter.deregisterInteractionHandler(
- "blur",
- this.blurHandler
- ),
- this.adapter.isUnbounded() &&
- this.adapter.deregisterResizeHandler(this.resizeHandler);
- }),
- (b.prototype.deregisterDeactivationHandlers = function () {
- var a, b;
- this.adapter.deregisterInteractionHandler(
- "keyup",
- this.deactivateHandler
- );
- try {
- for (var c, d = Oa(vc), e = d.next(); !e.done; e = d.next())
- (c = e.value),
- this.adapter.deregisterDocumentInteractionHandler(
- c,
- this.deactivateHandler
- );
- } catch (b) {
- a = { error: b };
- } finally {
- try {
- e && !e.done && (b = d.return) && b.call(d);
- } finally {
- if (a) throw a.error;
- }
- }
- }),
- (b.prototype.removeCssVars = function () {
- var a = this,
- c = b.strings,
- d = Object.keys(c);
- d.forEach(function (b) {
- 0 === b.indexOf("VAR_") &&
- a.adapter.updateCssVariable(c[b], null);
- });
- }),
- (b.prototype.activateImpl = function (a) {
- var b = this;
- if (!this.adapter.isSurfaceDisabled()) {
- var c = this.activationState;
- if (!c.isActivated) {
- var d = this.previousActivationEvent,
- e = d && void 0 !== a && d.type !== a.type;
- if (!e) {
- (c.isActivated = !0),
- (c.isProgrammatic = void 0 === a),
- (c.activationEvent = a),
- (c.wasActivatedByPointer =
- !c.isProgrammatic &&
- void 0 !== a &&
- ("mousedown" === a.type ||
- "touchstart" === a.type ||
- "pointerdown" === a.type));
- var f =
- void 0 !== a &&
- 0 < wc.length &&
- wc.some(function (a) {
- return b.adapter.containsEventTarget(a);
- });
- return f
- ? void this.resetActivationState()
- : void (void 0 !== a &&
- (wc.push(a.target),
- this.registerDeactivationHandlers(a)),
- (c.wasElementMadeActive = this.checkElementMadeActive(a)),
- c.wasElementMadeActive && this.animateActivation(),
- requestAnimationFrame(function () {
- (wc = []),
- c.wasElementMadeActive ||
- void 0 === a ||
- (" " !== a.key && 32 !== a.keyCode) ||
- ((c.wasElementMadeActive =
- b.checkElementMadeActive(a)),
- c.wasElementMadeActive && b.animateActivation()),
- c.wasElementMadeActive ||
- (b.activationState = b.defaultActivationState());
- }));
- }
- }
- }
- }),
- (b.prototype.checkElementMadeActive = function (a) {
- return (
- void 0 === a ||
- "keydown" !== a.type ||
- this.adapter.isSurfaceActive()
- );
- }),
- (b.prototype.animateActivation = function () {
- var a = this,
- c = b.strings,
- d = c.VAR_FG_TRANSLATE_START,
- e = c.VAR_FG_TRANSLATE_END,
- f = b.cssClasses,
- g = f.FG_DEACTIVATION,
- h = f.FG_ACTIVATION,
- i = b.numbers.DEACTIVATION_TIMEOUT_MS;
- this.layoutInternal();
- var j = "",
- k = "";
- if (!this.adapter.isUnbounded()) {
- var l = this.getFgTranslationCoordinates(),
- m = l.startPoint,
- n = l.endPoint;
- (j = m.x + "px, " + m.y + "px"), (k = n.x + "px, " + n.y + "px");
- }
- this.adapter.updateCssVariable(d, j),
- this.adapter.updateCssVariable(e, k),
- clearTimeout(this.activationTimer),
- clearTimeout(this.fgDeactivationRemovalTimer),
- this.rmBoundedActivationClasses(),
- this.adapter.removeClass(g),
- this.adapter.computeBoundingRect(),
- this.adapter.addClass(h),
- (this.activationTimer = setTimeout(function () {
- a.activationTimerCallback();
- }, i));
- }),
- (b.prototype.getFgTranslationCoordinates = function () {
- var a,
- b = this.activationState,
- c = b.activationEvent,
- d = b.wasActivatedByPointer;
- (a = d
- ? Wa(
- c,
- this.adapter.getWindowPageOffset(),
- this.adapter.computeBoundingRect()
- )
- : { x: this.frame.width / 2, y: this.frame.height / 2 }),
- (a = {
- x: a.x - this.initialSize / 2,
- y: a.y - this.initialSize / 2,
- });
- var e = {
- x: this.frame.width / 2 - this.initialSize / 2,
- y: this.frame.height / 2 - this.initialSize / 2,
- };
- return { startPoint: a, endPoint: e };
- }),
- (b.prototype.runDeactivationUXLogicIfReady = function () {
- var a = this,
- c = b.cssClasses.FG_DEACTIVATION,
- d = this.activationState,
- e = d.hasDeactivationUXRun,
- f = d.isActivated;
- (e || !f) &&
- this.activationAnimationHasEnded &&
- (this.rmBoundedActivationClasses(),
- this.adapter.addClass(c),
- (this.fgDeactivationRemovalTimer = setTimeout(function () {
- a.adapter.removeClass(c);
- }, tc.FG_DEACTIVATION_MS)));
- }),
- (b.prototype.rmBoundedActivationClasses = function () {
- var a = b.cssClasses.FG_ACTIVATION;
- this.adapter.removeClass(a),
- (this.activationAnimationHasEnded = !1),
- this.adapter.computeBoundingRect();
- }),
- (b.prototype.resetActivationState = function () {
- var a = this;
- (this.previousActivationEvent =
- this.activationState.activationEvent),
- (this.activationState = this.defaultActivationState()),
- setTimeout(function () {
- return (a.previousActivationEvent = void 0);
- }, b.numbers.TAP_DELAY_MS);
- }),
- (b.prototype.deactivateImpl = function () {
- var a = this,
- b = this.activationState;
- if (b.isActivated) {
- var c = Yb({}, b);
- b.isProgrammatic
- ? (requestAnimationFrame(function () {
- a.animateDeactivation(c);
- }),
- this.resetActivationState())
- : (this.deregisterDeactivationHandlers(),
- requestAnimationFrame(function () {
- (a.activationState.hasDeactivationUXRun = !0),
- a.animateDeactivation(c),
- a.resetActivationState();
- }));
- }
- }),
- (b.prototype.animateDeactivation = function (a) {
- var b = a.wasActivatedByPointer,
- c = a.wasElementMadeActive;
- (b || c) && this.runDeactivationUXLogicIfReady();
- }),
- (b.prototype.layoutInternal = function () {
- var a = Math.floor,
- c = Math.max,
- d = this;
- this.frame = this.adapter.computeBoundingRect();
- var e = c(this.frame.height, this.frame.width);
- this.maxRadius = this.adapter.isUnbounded()
- ? e
- : (function getBoundedRadius() {
- var a = Math.sqrt,
- c = Math.pow,
- e = a(c(d.frame.width, 2) + c(d.frame.height, 2));
- return e + b.numbers.PADDING;
- })();
- var f = a(e * b.numbers.INITIAL_ORIGIN_SCALE);
- (this.initialSize =
- this.adapter.isUnbounded() && 0 != f % 2 ? f - 1 : f),
- (this.fgScale = "" + this.maxRadius / this.initialSize),
- this.updateLayoutCssVars();
- }),
- (b.prototype.updateLayoutCssVars = function () {
- var a = Math.round,
- c = b.strings,
- d = c.VAR_FG_SIZE,
- e = c.VAR_LEFT,
- f = c.VAR_TOP,
- g = c.VAR_FG_SCALE;
- this.adapter.updateCssVariable(d, this.initialSize + "px"),
- this.adapter.updateCssVariable(g, this.fgScale),
- this.adapter.isUnbounded() &&
- ((this.unboundedCoords = {
- left: a(this.frame.width / 2 - this.initialSize / 2),
- top: a(this.frame.height / 2 - this.initialSize / 2),
- }),
- this.adapter.updateCssVariable(
- e,
- this.unboundedCoords.left + "px"
- ),
- this.adapter.updateCssVariable(
- f,
- this.unboundedCoords.top + "px"
- ));
- }),
- b
- );
- })(qc),
- yc = fc(
- class extends gc {
- constructor(a) {
- var b;
- if (
- (super(a),
- a.type !== ec.ATTRIBUTE ||
- "style" !== a.name ||
- 2 <
- (null === (b = a.strings) || void 0 === b
- ? void 0
- : b.length))
- )
- throw Error(
- "The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute."
- );
- }
- render(a) {
- return Object.keys(a).reduce((b, c) => {
- var d = a[c];
- return null == d
- ? b
- : b +
- ""
- .concat(
- (c = c
- .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&")
- .toLowerCase()),
- ":"
- )
- .concat(d, ";");
- }, "");
- }
- update(a, b) {
- var [c] = b,
- { style: d } = a.element;
- if (void 0 === this.ct) {
- for (var e in ((this.ct = new Set()), c)) this.ct.add(e);
- return this.render(c);
- }
- for (var f in (this.ct.forEach((a) => {
- null == c[a] &&
- (this.ct.delete(a),
- a.includes("-") ? d.removeProperty(a) : (d[a] = ""));
- }),
- c)) {
- var g = c[f];
- null != g &&
- (this.ct.add(f),
- f.includes("-") ? d.setProperty(f, g) : (d[f] = g));
- }
- return $;
- }
- }
- );
- class zc extends pc {
- constructor() {
- super(...arguments),
- (this.primary = !1),
- (this.accent = !1),
- (this.unbounded = !1),
- (this.disabled = !1),
- (this.activated = !1),
- (this.selected = !1),
- (this.internalUseStateLayerCustomProperties = !1),
- (this.hovering = !1),
- (this.bgFocused = !1),
- (this.fgActivation = !1),
- (this.fgDeactivation = !1),
- (this.fgScale = ""),
- (this.fgSize = ""),
- (this.translateStart = ""),
- (this.translateEnd = ""),
- (this.leftPos = ""),
- (this.topPos = ""),
- (this.mdcFoundationClass = xc);
- }
- get isActive() {
- return Ua(this.parentElement || this, ":active");
- }
- createAdapter() {
- return {
- browserSupportsCssVars: () => !0,
- isUnbounded: () => this.unbounded,
- isSurfaceActive: () => this.isActive,
- isSurfaceDisabled: () => this.disabled,
- addClass: (a) => {
- switch (a) {
- case "mdc-ripple-upgraded--background-focused":
- this.bgFocused = !0;
- break;
- case "mdc-ripple-upgraded--foreground-activation":
- this.fgActivation = !0;
- break;
- case "mdc-ripple-upgraded--foreground-deactivation":
- this.fgDeactivation = !0;
- break;
- default:
- }
- },
- removeClass: (a) => {
- switch (a) {
- case "mdc-ripple-upgraded--background-focused":
- this.bgFocused = !1;
- break;
- case "mdc-ripple-upgraded--foreground-activation":
- this.fgActivation = !1;
- break;
- case "mdc-ripple-upgraded--foreground-deactivation":
- this.fgDeactivation = !1;
- break;
- default:
- }
- },
- containsEventTarget: () => !0,
- registerInteractionHandler: () => void 0,
- deregisterInteractionHandler: () => void 0,
- registerDocumentInteractionHandler: () => void 0,
- deregisterDocumentInteractionHandler: () => void 0,
- registerResizeHandler: () => void 0,
- deregisterResizeHandler: () => void 0,
- updateCssVariable: (a, b) => {
- switch (a) {
- case "--mdc-ripple-fg-scale":
- this.fgScale = b;
- break;
- case "--mdc-ripple-fg-size":
- this.fgSize = b;
- break;
- case "--mdc-ripple-fg-translate-end":
- this.translateEnd = b;
- break;
- case "--mdc-ripple-fg-translate-start":
- this.translateStart = b;
- break;
- case "--mdc-ripple-left":
- this.leftPos = b;
- break;
- case "--mdc-ripple-top":
- this.topPos = b;
- break;
- default:
- }
- },
- computeBoundingRect: () =>
- (this.parentElement || this).getBoundingClientRect(),
- getWindowPageOffset: () => ({
- x: window.pageXOffset,
- y: window.pageYOffset,
- }),
- };
- }
- startPress(a) {
- this.waitForFoundation(() => {
- this.mdcFoundation.activate(a);
- });
- }
- endPress() {
- this.waitForFoundation(() => {
- this.mdcFoundation.deactivate();
- });
- }
- startFocus() {
- this.waitForFoundation(() => {
- this.mdcFoundation.handleFocus();
- });
- }
- endFocus() {
- this.waitForFoundation(() => {
- this.mdcFoundation.handleBlur();
- });
- }
- startHover() {
- this.hovering = !0;
- }
- endHover() {
- this.hovering = !1;
- }
- waitForFoundation(a) {
- this.mdcFoundation ? a() : this.updateComplete.then(a);
- }
- update(a) {
- a.has("disabled") && this.disabled && this.endHover(), super.update(a);
- }
- render() {
- var a = this.activated && (this.primary || !this.accent),
- b = this.selected && (this.primary || !this.accent),
- c = {
- "mdc-ripple-surface--accent": this.accent,
- "mdc-ripple-surface--primary--activated": a,
- "mdc-ripple-surface--accent--activated":
- this.accent && this.activated,
- "mdc-ripple-surface--primary--selected": b,
- "mdc-ripple-surface--accent--selected":
- this.accent && this.selected,
- "mdc-ripple-surface--disabled": this.disabled,
- "mdc-ripple-surface--hover": this.hovering,
- "mdc-ripple-surface--primary": this.primary,
- "mdc-ripple-surface--selected": this.selected,
- "mdc-ripple-upgraded--background-focused": this.bgFocused,
- "mdc-ripple-upgraded--foreground-activation": this.fgActivation,
- "mdc-ripple-upgraded--foreground-deactivation": this.fgDeactivation,
- "mdc-ripple-upgraded--unbounded": this.unbounded,
- "mdc-ripple-surface--internal-use-state-layer-custom-properties":
- this.internalUseStateLayerCustomProperties,
- };
- return g(
- C ||
- (C = j([
- '\n
',
- ])),
- hc(c),
- yc({
- "--mdc-ripple-fg-scale": this.fgScale,
- "--mdc-ripple-fg-size": this.fgSize,
- "--mdc-ripple-fg-translate-end": this.translateEnd,
- "--mdc-ripple-fg-translate-start": this.translateStart,
- "--mdc-ripple-left": this.leftPos,
- "--mdc-ripple-top": this.topPos,
- })
- );
- }
- }
- Na([Ra(".mdc-ripple-surface")], zc.prototype, "mdcRoot", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "primary", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "accent", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "unbounded", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "disabled", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "activated", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "selected", void 0),
- Na(
- [Pa({ type: Boolean })],
- zc.prototype,
- "internalUseStateLayerCustomProperties",
- void 0
- ),
- Na([Qa()], zc.prototype, "hovering", void 0),
- Na([Qa()], zc.prototype, "bgFocused", void 0),
- Na([Qa()], zc.prototype, "fgActivation", void 0),
- Na([Qa()], zc.prototype, "fgDeactivation", void 0),
- Na([Qa()], zc.prototype, "fgScale", void 0),
- Na([Qa()], zc.prototype, "fgSize", void 0),
- Na([Qa()], zc.prototype, "translateStart", void 0),
- Na([Qa()], zc.prototype, "translateEnd", void 0),
- Na([Qa()], zc.prototype, "leftPos", void 0),
- Na([Qa()], zc.prototype, "topPos", void 0);
- var Ac = mb(
- D ||
- (D = j([
- '.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}',
- ]))
- );
- class Bc extends La(zc) {
- static get defineId() {
- return "mwc-ripple";
- }
- static get elementDefinitions() {
- return Vb([], Bc);
- }
- static get styles() {
- return Ac;
- }
- }
- class Cc extends La(ic) {
- static get defineId() {
- return "mwc-list-item";
- }
- static get elementDefinitions() {
- return Vb([Bc], Cc);
- }
- static get styles() {
- return jc;
- }
- }
- var Dc = {
- 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",
- TAB: "Tab",
- },
- Ec = new Set();
- Ec.add(Dc.BACKSPACE),
- Ec.add(Dc.ENTER),
- Ec.add(Dc.SPACEBAR),
- Ec.add(Dc.PAGE_UP),
- Ec.add(Dc.PAGE_DOWN),
- Ec.add(Dc.END),
- Ec.add(Dc.HOME),
- Ec.add(Dc.ARROW_LEFT),
- Ec.add(Dc.ARROW_UP),
- Ec.add(Dc.ARROW_RIGHT),
- Ec.add(Dc.ARROW_DOWN),
- Ec.add(Dc.DELETE),
- Ec.add(Dc.ESCAPE),
- Ec.add(Dc.TAB);
- var Fc = {
- BACKSPACE: 8,
- ENTER: 13,
- SPACEBAR: 32,
- PAGE_UP: 33,
- PAGE_DOWN: 34,
- END: 35,
- HOME: 36,
- ARROW_LEFT: 37,
- ARROW_UP: 38,
- ARROW_RIGHT: 39,
- ARROW_DOWN: 40,
- DELETE: 46,
- ESCAPE: 27,
- TAB: 9,
- },
- Gc = new Map();
- Gc.set(Fc.BACKSPACE, Dc.BACKSPACE),
- Gc.set(Fc.ENTER, Dc.ENTER),
- Gc.set(Fc.SPACEBAR, Dc.SPACEBAR),
- Gc.set(Fc.PAGE_UP, Dc.PAGE_UP),
- Gc.set(Fc.PAGE_DOWN, Dc.PAGE_DOWN),
- Gc.set(Fc.END, Dc.END),
- Gc.set(Fc.HOME, Dc.HOME),
- Gc.set(Fc.ARROW_LEFT, Dc.ARROW_LEFT),
- Gc.set(Fc.ARROW_UP, Dc.ARROW_UP),
- Gc.set(Fc.ARROW_RIGHT, Dc.ARROW_RIGHT),
- Gc.set(Fc.ARROW_DOWN, Dc.ARROW_DOWN),
- Gc.set(Fc.DELETE, Dc.DELETE),
- Gc.set(Fc.ESCAPE, Dc.ESCAPE),
- Gc.set(Fc.TAB, Dc.TAB);
- var Hc,
- Ic,
- Jc,
- Kc,
- Lc = new Set([
- Dc.PAGE_UP,
- Dc.PAGE_DOWN,
- Dc.END,
- Dc.HOME,
- Dc.ARROW_LEFT,
- Dc.ARROW_UP,
- Dc.ARROW_RIGHT,
- Dc.ARROW_DOWN,
- ]),
- Mc = {
- 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",
- },
- Nc =
- ((Hc = {}),
- (Hc["" + Mc.LIST_ITEM_ACTIVATED_CLASS] = "mdc-list-item--activated"),
- (Hc["" + Mc.LIST_ITEM_CLASS] = "mdc-list-item"),
- (Hc["" + Mc.LIST_ITEM_DISABLED_CLASS] = "mdc-list-item--disabled"),
- (Hc["" + Mc.LIST_ITEM_SELECTED_CLASS] = "mdc-list-item--selected"),
- (Hc["" + Mc.LIST_ITEM_PRIMARY_TEXT_CLASS] =
- "mdc-list-item__primary-text"),
- (Hc["" + Mc.ROOT] = "mdc-list"),
- Hc),
- Oc =
- ((Ic = {}),
- (Ic["" + Mc.LIST_ITEM_ACTIVATED_CLASS] =
- "mdc-deprecated-list-item--activated"),
- (Ic["" + Mc.LIST_ITEM_CLASS] = "mdc-deprecated-list-item"),
- (Ic["" + Mc.LIST_ITEM_DISABLED_CLASS] =
- "mdc-deprecated-list-item--disabled"),
- (Ic["" + Mc.LIST_ITEM_SELECTED_CLASS] =
- "mdc-deprecated-list-item--selected"),
- (Ic["" + Mc.LIST_ITEM_TEXT_CLASS] = "mdc-deprecated-list-item__text"),
- (Ic["" + Mc.LIST_ITEM_PRIMARY_TEXT_CLASS] =
- "mdc-deprecated-list-item__primary-text"),
- (Ic["" + Mc.ROOT] = "mdc-deprecated-list"),
- Ic),
- Pc = {
- 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",
- ARIA_INTERACTIVE_ROLES_SELECTOR: '[role="listbox"], [role="menu"]',
- ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable="true"]',
- CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"], input[type="radio"]',
- CHECKBOX_SELECTOR: 'input[type="checkbox"]',
- CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:
- "\n ." +
- Mc.LIST_ITEM_CLASS +
- " button:not(:disabled),\n ." +
- Mc.LIST_ITEM_CLASS +
- " a,\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- " button:not(:disabled),\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- " a\n ",
- DEPRECATED_SELECTOR: ".mdc-deprecated-list",
- FOCUSABLE_CHILD_ELEMENTS:
- "\n ." +
- Mc.LIST_ITEM_CLASS +
- " button:not(:disabled),\n ." +
- Mc.LIST_ITEM_CLASS +
- " a,\n ." +
- Mc.LIST_ITEM_CLASS +
- ' input[type="radio"]:not(:disabled),\n .' +
- Mc.LIST_ITEM_CLASS +
- ' input[type="checkbox"]:not(:disabled),\n .' +
- Oc[Mc.LIST_ITEM_CLASS] +
- " button:not(:disabled),\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- " a,\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- ' input[type="radio"]:not(:disabled),\n .' +
- Oc[Mc.LIST_ITEM_CLASS] +
- ' input[type="checkbox"]:not(:disabled)\n ',
- RADIO_SELECTOR: 'input[type="radio"]',
- SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]',
- },
- Qc = { UNSET_INDEX: -1, TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300 },
- Rc = ["input", "button", "textarea", "select"],
- Sc = function (a) {
- var b = a.target;
- if (b) {
- var c = ("" + b.tagName).toLowerCase();
- -1 === Rc.indexOf(c) && a.preventDefault();
- }
- },
- Tc =
- !(
- null ===
- (Kc =
- null === (Jc = window.ShadyDOM) || void 0 === Jc
- ? void 0
- : Jc.inUse) || void 0 === Kc
- ) && Kc;
- class Uc extends pc {
- constructor() {
- super(...arguments),
- (this.disabled = !1),
- (this.containingForm = null),
- (this.formDataListener = (a) => {
- this.disabled || this.setFormData(a.formData);
- });
- }
- findFormElement() {
- if (!this.shadowRoot || Tc) return null;
- var a = this.getRootNode(),
- b = a.querySelectorAll("form");
- for (var c of Array.from(b)) if (c.contains(this)) return c;
- return null;
- }
- connectedCallback() {
- var a;
- super.connectedCallback(),
- (this.containingForm = this.findFormElement()),
- null === (a = this.containingForm) || void 0 === a
- ? void 0
- : a.addEventListener("formdata", this.formDataListener);
- }
- disconnectedCallback() {
- var a;
- super.disconnectedCallback(),
- null === (a = this.containingForm) || void 0 === a
- ? void 0
- : a.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", (a) => {
- this.dispatchEvent(new Event("change", a));
- });
- }
- }
- (Uc.shadowRootOptions = { mode: "open", delegatesFocus: !0 }),
- Na([Pa({ type: Boolean })], Uc.prototype, "disabled", void 0);
- var Vc = {
- LABEL_FLOAT_ABOVE: "mdc-floating-label--float-above",
- LABEL_REQUIRED: "mdc-floating-label--required",
- LABEL_SHAKE: "mdc-floating-label--shake",
- ROOT: "mdc-floating-label",
- },
- Wc = (function (a) {
- function b(c) {
- var d = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (d.shakeAnimationEndHandler = function () {
- d.handleShakeAnimationEnd();
- }),
- d
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return Vc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- getWidth: function () {
- return 0;
- },
- registerInteractionHandler: function () {},
- deregisterInteractionHandler: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.init = function () {
- this.adapter.registerInteractionHandler(
- "animationend",
- this.shakeAnimationEndHandler
- );
- }),
- (b.prototype.destroy = function () {
- this.adapter.deregisterInteractionHandler(
- "animationend",
- this.shakeAnimationEndHandler
- );
- }),
- (b.prototype.getWidth = function () {
- return this.adapter.getWidth();
- }),
- (b.prototype.shake = function (a) {
- var c = b.cssClasses.LABEL_SHAKE;
- a ? this.adapter.addClass(c) : this.adapter.removeClass(c);
- }),
- (b.prototype.float = function (a) {
- var c = b.cssClasses,
- d = c.LABEL_FLOAT_ABOVE,
- e = c.LABEL_SHAKE;
- a
- ? this.adapter.addClass(d)
- : (this.adapter.removeClass(d), this.adapter.removeClass(e));
- }),
- (b.prototype.setRequired = function (a) {
- var c = b.cssClasses.LABEL_REQUIRED;
- a ? this.adapter.addClass(c) : this.adapter.removeClass(c);
- }),
- (b.prototype.handleShakeAnimationEnd = function () {
- var a = b.cssClasses.LABEL_SHAKE;
- this.adapter.removeClass(a);
- }),
- b
- );
- })(qc),
- Xc = (a) => ({
- addClass: (b) => a.classList.add(b),
- removeClass: (b) => a.classList.remove(b),
- getWidth: () => a.scrollWidth,
- registerInteractionHandler: (b, c) => {
- a.addEventListener(b, c);
- },
- deregisterInteractionHandler: (b, c) => {
- a.removeEventListener(b, c);
- },
- });
- var Yc = fc(
- class extends gc {
- constructor(a) {
- switch (
- (super(a),
- (this.foundation = null),
- (this.previousPart = null),
- a.type)
- ) {
- case ec.ATTRIBUTE:
- case ec.PROPERTY:
- break;
- default:
- throw new Error(
- "FloatingLabel directive only support attribute and property parts"
- );
- }
- }
- update(a, b) {
- var [c] = b;
- if (a !== this.previousPart) {
- this.foundation && this.foundation.destroy(),
- (this.previousPart = a);
- var d = a.element;
- d.classList.add("mdc-floating-label");
- var e = Xc(d);
- (this.foundation = new Wc(e)), this.foundation.init();
- }
- return this.render(c);
- }
- render() {
- return this.foundation;
- }
- }
- ),
- Zc = {
- LINE_RIPPLE_ACTIVE: "mdc-line-ripple--active",
- LINE_RIPPLE_DEACTIVATING: "mdc-line-ripple--deactivating",
- },
- $c = (function (a) {
- function b(c) {
- var d = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (d.transitionEndHandler = function (a) {
- d.handleTransitionEnd(a);
- }),
- d
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return Zc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- hasClass: function () {
- return !1;
- },
- setStyle: function () {},
- registerEventHandler: function () {},
- deregisterEventHandler: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.init = function () {
- this.adapter.registerEventHandler(
- "transitionend",
- this.transitionEndHandler
- );
- }),
- (b.prototype.destroy = function () {
- this.adapter.deregisterEventHandler(
- "transitionend",
- this.transitionEndHandler
- );
- }),
- (b.prototype.activate = function () {
- this.adapter.removeClass(Zc.LINE_RIPPLE_DEACTIVATING),
- this.adapter.addClass(Zc.LINE_RIPPLE_ACTIVE);
- }),
- (b.prototype.setRippleCenter = function (a) {
- this.adapter.setStyle("transform-origin", a + "px center");
- }),
- (b.prototype.deactivate = function () {
- this.adapter.addClass(Zc.LINE_RIPPLE_DEACTIVATING);
- }),
- (b.prototype.handleTransitionEnd = function (a) {
- var b = this.adapter.hasClass(Zc.LINE_RIPPLE_DEACTIVATING);
- "opacity" === a.propertyName &&
- b &&
- (this.adapter.removeClass(Zc.LINE_RIPPLE_ACTIVE),
- this.adapter.removeClass(Zc.LINE_RIPPLE_DEACTIVATING));
- }),
- b
- );
- })(qc),
- _c = (a) => ({
- addClass: (b) => a.classList.add(b),
- removeClass: (b) => a.classList.remove(b),
- hasClass: (b) => a.classList.contains(b),
- setStyle: (b, c) => a.style.setProperty(b, c),
- registerEventHandler: (b, c) => {
- a.addEventListener(b, c);
- },
- deregisterEventHandler: (b, c) => {
- a.removeEventListener(b, c);
- },
- });
- var ad,
- bd = fc(
- class extends gc {
- constructor(a) {
- switch (
- (super(a),
- (this.previousPart = null),
- (this.foundation = null),
- a.type)
- ) {
- case ec.ATTRIBUTE:
- case ec.PROPERTY:
- return;
- default:
- throw new Error(
- "LineRipple only support attribute and property parts."
- );
- }
- }
- update(a) {
- if (this.previousPart !== a) {
- this.foundation && this.foundation.destroy(),
- (this.previousPart = a);
- var b = a.element;
- b.classList.add("mdc-line-ripple");
- var c = _c(b);
- (this.foundation = new $c(c)), this.foundation.init();
- }
- return this.render();
- }
- render() {
- return this.foundation;
- }
- }
- ),
- cd = {
- 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",
- },
- dd = {
- CLOSED_EVENT: "MDCMenuSurface:closed",
- CLOSING_EVENT: "MDCMenuSurface:closing",
- 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"])',
- },
- ed = {
- TRANSITION_OPEN_DURATION: 120,
- TRANSITION_CLOSE_DURATION: 75,
- MARGIN_TO_EDGE: 32,
- ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: 0.67,
- TOUCH_EVENT_WAIT_MS: 30,
- };
- (function (a) {
- (a[(a.BOTTOM = 1)] = "BOTTOM"),
- (a[(a.CENTER = 2)] = "CENTER"),
- (a[(a.RIGHT = 4)] = "RIGHT"),
- (a[(a.FLIP_RTL = 8)] = "FLIP_RTL");
- })(ad || (ad = {}));
- var fd;
- (function (a) {
- (a[(a.TOP_LEFT = 0)] = "TOP_LEFT"),
- (a[(a.TOP_RIGHT = 4)] = "TOP_RIGHT"),
- (a[(a.BOTTOM_LEFT = 1)] = "BOTTOM_LEFT"),
- (a[(a.BOTTOM_RIGHT = 5)] = "BOTTOM_RIGHT"),
- (a[(a.TOP_START = 8)] = "TOP_START"),
- (a[(a.TOP_END = 12)] = "TOP_END"),
- (a[(a.BOTTOM_START = 9)] = "BOTTOM_START"),
- (a[(a.BOTTOM_END = 13)] = "BOTTOM_END");
- })(fd || (fd = {}));
- var gd = {
- 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",
- },
- hd = {
- 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",
- },
- id = {
- LABEL_SCALE: 0.75,
- UNSET_INDEX: -1,
- CLICK_DEBOUNCE_TIMEOUT_MS: 330,
- },
- jd = (function (a) {
- function b(c, d) {
- void 0 === d && (d = {});
- var e = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (e.disabled = !1),
- (e.isMenuOpen = !1),
- (e.useDefaultValidation = !0),
- (e.customValidity = !0),
- (e.lastSelectedIndex = id.UNSET_INDEX),
- (e.clickDebounceTimeout = 0),
- (e.recentlyClicked = !1),
- (e.leadingIcon = d.leadingIcon),
- (e.helperText = d.helperText),
- e
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return gd;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "numbers", {
- get: function () {
- return id;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "strings", {
- get: function () {
- return hd;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "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: !1,
- configurable: !0,
- }),
- (b.prototype.getSelectedIndex = function () {
- return this.adapter.getSelectedIndex();
- }),
- (b.prototype.setSelectedIndex = function (a, b, c) {
- void 0 === b && (b = !1),
- void 0 === c && (c = !1),
- a >= this.adapter.getMenuItemCount() ||
- (a === id.UNSET_INDEX
- ? this.adapter.setSelectedText("")
- : this.adapter.setSelectedText(
- this.adapter.getMenuItemTextAtIndex(a).trim()
- ),
- this.adapter.setSelectedIndex(a),
- b && this.adapter.closeMenu(),
- !c && this.lastSelectedIndex !== a && this.handleChange(),
- (this.lastSelectedIndex = a));
- }),
- (b.prototype.setValue = function (a, b) {
- void 0 === b && (b = !1);
- var c = this.adapter.getMenuItemValues().indexOf(a);
- this.setSelectedIndex(c, !1, b);
- }),
- (b.prototype.getValue = function () {
- var a = this.adapter.getSelectedIndex(),
- b = this.adapter.getMenuItemValues();
- return a === id.UNSET_INDEX ? "" : b[a];
- }),
- (b.prototype.getDisabled = function () {
- return this.disabled;
- }),
- (b.prototype.setDisabled = function (a) {
- (this.disabled = a),
- this.disabled
- ? (this.adapter.addClass(gd.DISABLED), this.adapter.closeMenu())
- : this.adapter.removeClass(gd.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()
- );
- }),
- (b.prototype.openMenu = function () {
- this.adapter.addClass(gd.ACTIVATED),
- this.adapter.openMenu(),
- (this.isMenuOpen = !0),
- this.adapter.setSelectAnchorAttr("aria-expanded", "true");
- }),
- (b.prototype.setHelperTextContent = function (a) {
- this.helperText && this.helperText.setContent(a);
- }),
- (b.prototype.layout = function () {
- if (this.adapter.hasLabel()) {
- var a = 0 < this.getValue().length,
- b = this.adapter.hasClass(gd.FOCUSED),
- c = a || b,
- d = this.adapter.hasClass(gd.REQUIRED);
- this.notchOutline(c),
- this.adapter.floatLabel(c),
- this.adapter.setLabelRequired(d);
- }
- }),
- (b.prototype.layoutOptions = function () {
- var a = this.adapter.getMenuItemValues(),
- b = a.indexOf(this.getValue());
- this.setSelectedIndex(b, !1, !0);
- }),
- (b.prototype.handleMenuOpened = function () {
- if (0 !== this.adapter.getMenuItemValues().length) {
- var a = this.getSelectedIndex(),
- b = 0 <= a ? a : 0;
- this.adapter.focusMenuItemAtIndex(b);
- }
- }),
- (b.prototype.handleMenuClosing = function () {
- this.adapter.setSelectAnchorAttr("aria-expanded", "false");
- }),
- (b.prototype.handleMenuClosed = function () {
- this.adapter.removeClass(gd.ACTIVATED),
- (this.isMenuOpen = !1),
- this.adapter.isSelectAnchorFocused() || this.blur();
- }),
- (b.prototype.handleChange = function () {
- this.layout(), this.adapter.notifyChange(this.getValue());
- var a = this.adapter.hasClass(gd.REQUIRED);
- a && this.useDefaultValidation && this.setValid(this.isValid());
- }),
- (b.prototype.handleMenuItemAction = function (a) {
- this.setSelectedIndex(a, !0);
- }),
- (b.prototype.handleFocus = function () {
- this.adapter.addClass(gd.FOCUSED),
- this.layout(),
- this.adapter.activateBottomLine();
- }),
- (b.prototype.handleBlur = function () {
- this.isMenuOpen || this.blur();
- }),
- (b.prototype.handleClick = function (a) {
- if (!(this.disabled || this.recentlyClicked))
- return (
- this.setClickDebounceTimeout(),
- this.isMenuOpen
- ? void this.adapter.closeMenu()
- : void (this.adapter.setRippleCenter(a), this.openMenu())
- );
- }),
- (b.prototype.handleKeydown = function (a) {
- if (!this.isMenuOpen && this.adapter.hasClass(gd.FOCUSED)) {
- var b = Xa(a) === Dc.ENTER,
- c = Xa(a) === Dc.SPACEBAR,
- d = Xa(a) === Dc.ARROW_UP,
- e = Xa(a) === Dc.ARROW_DOWN,
- f = a.ctrlKey || a.metaKey;
- if (
- !f &&
- ((!c && a.key && 1 === a.key.length) ||
- (c && this.adapter.isTypeaheadInProgress()))
- ) {
- var g = c ? " " : a.key,
- h = this.adapter.typeaheadMatchItem(
- g,
- this.getSelectedIndex()
- );
- return (
- 0 <= h && this.setSelectedIndex(h), void a.preventDefault()
- );
- }
- (b || c || d || e) &&
- (d && 0 < this.getSelectedIndex()
- ? this.setSelectedIndex(this.getSelectedIndex() - 1)
- : e &&
- this.getSelectedIndex() <
- this.adapter.getMenuItemCount() - 1 &&
- this.setSelectedIndex(this.getSelectedIndex() + 1),
- this.openMenu(),
- a.preventDefault());
- }
- }),
- (b.prototype.notchOutline = function (a) {
- if (this.adapter.hasOutline()) {
- var b = this.adapter.hasClass(gd.FOCUSED);
- if (a) {
- var c = id.LABEL_SCALE,
- d = this.adapter.getLabelWidth() * c;
- this.adapter.notchOutline(d);
- } else b || this.adapter.closeOutline();
- }
- }),
- (b.prototype.setLeadingIconAriaLabel = function (a) {
- this.leadingIcon && this.leadingIcon.setAriaLabel(a);
- }),
- (b.prototype.setLeadingIconContent = function (a) {
- this.leadingIcon && this.leadingIcon.setContent(a);
- }),
- (b.prototype.getUseDefaultValidation = function () {
- return this.useDefaultValidation;
- }),
- (b.prototype.setUseDefaultValidation = function (a) {
- this.useDefaultValidation = a;
- }),
- (b.prototype.setValid = function (a) {
- this.useDefaultValidation || (this.customValidity = a),
- this.adapter.setSelectAnchorAttr("aria-invalid", (!a).toString()),
- a
- ? (this.adapter.removeClass(gd.INVALID),
- this.adapter.removeMenuClass(gd.MENU_INVALID))
- : (this.adapter.addClass(gd.INVALID),
- this.adapter.addMenuClass(gd.MENU_INVALID)),
- this.syncHelperTextValidity(a);
- }),
- (b.prototype.isValid = function () {
- return this.useDefaultValidation &&
- this.adapter.hasClass(gd.REQUIRED) &&
- !this.adapter.hasClass(gd.DISABLED)
- ? this.getSelectedIndex() !== id.UNSET_INDEX &&
- (0 !== this.getSelectedIndex() || !!this.getValue())
- : this.customValidity;
- }),
- (b.prototype.setRequired = function (a) {
- a
- ? this.adapter.addClass(gd.REQUIRED)
- : this.adapter.removeClass(gd.REQUIRED),
- this.adapter.setSelectAnchorAttr("aria-required", a.toString()),
- this.adapter.setLabelRequired(a);
- }),
- (b.prototype.getRequired = function () {
- return "true" === this.adapter.getSelectAnchorAttr("aria-required");
- }),
- (b.prototype.init = function () {
- var a = this.adapter.getAnchorElement();
- a &&
- (this.adapter.setMenuAnchorElement(a),
- this.adapter.setMenuAnchorCorner(fd.BOTTOM_START)),
- this.adapter.setMenuWrapFocus(!1),
- this.setDisabled(this.adapter.hasClass(gd.DISABLED)),
- this.syncHelperTextValidity(!this.adapter.hasClass(gd.INVALID)),
- this.layout(),
- this.layoutOptions();
- }),
- (b.prototype.blur = function () {
- this.adapter.removeClass(gd.FOCUSED),
- this.layout(),
- this.adapter.deactivateBottomLine();
- var a = this.adapter.hasClass(gd.REQUIRED);
- a && this.useDefaultValidation && this.setValid(this.isValid());
- }),
- (b.prototype.syncHelperTextValidity = function (a) {
- if (this.helperText) {
- this.helperText.setValidity(a);
- var b = this.helperText.isVisible(),
- c = this.helperText.getId();
- b && c
- ? this.adapter.setSelectAnchorAttr(hd.ARIA_DESCRIBEDBY, c)
- : this.adapter.removeSelectAnchorAttr(hd.ARIA_DESCRIBEDBY);
- }
- }),
- (b.prototype.setClickDebounceTimeout = function () {
- var a = this;
- clearTimeout(this.clickDebounceTimeout),
- (this.clickDebounceTimeout = setTimeout(function () {
- a.recentlyClicked = !1;
- }, id.CLICK_DEBOUNCE_TIMEOUT_MS)),
- (this.recentlyClicked = !0);
- }),
- b
- );
- })(qc),
- kd = (a) => (null == a ? b : a),
- ld = function () {
- var a =
- 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : {},
- b = {};
- for (var c in a) b[c] = a[c];
- return Object.assign(
- {
- badInput: !1,
- customError: !1,
- patternMismatch: !1,
- rangeOverflow: !1,
- rangeUnderflow: !1,
- stepMismatch: !1,
- tooLong: !1,
- tooShort: !1,
- typeMismatch: !1,
- valid: !0,
- valueMissing: !1,
- },
- b
- );
- };
- class md extends Uc {
- constructor() {
- super(...arguments),
- (this.mdcFoundationClass = jd),
- (this.disabled = !1),
- (this.outlined = !1),
- (this.label = ""),
- (this.outlineOpen = !1),
- (this.outlineWidth = 0),
- (this.value = ""),
- (this.name = ""),
- (this.selectedText = ""),
- (this.icon = ""),
- (this.menuOpen = !1),
- (this.helper = ""),
- (this.validateOnInitialRender = !1),
- (this.validationMessage = ""),
- (this.required = !1),
- (this.naturalMenuWidth = !1),
- (this.isUiValid = !0),
- (this.fixedMenuPosition = !1),
- (this.typeaheadState = Ya()),
- (this.sortedIndexByFirstChar = new Map()),
- (this.menuElement_ = null),
- (this.listeners = []),
- (this.onBodyClickBound = () => void 0),
- (this._menuUpdateComplete = null),
- (this.valueSetDirectly = !1),
- (this.validityTransform = null),
- (this._validity = ld());
- }
- get items() {
- return (
- this.menuElement_ || (this.menuElement_ = this.menuElement),
- this.menuElement_ ? this.menuElement_.items : []
- );
- }
- get selected() {
- var a = this.menuElement;
- return a ? a.selected : null;
- }
- get index() {
- var a = this.menuElement;
- return a ? a.index : -1;
- }
- get shouldRenderHelperText() {
- return !!this.helper || !!this.validationMessage;
- }
- get validity() {
- return this._checkValidity(this.value), this._validity;
- }
- render() {
- var a = {
- "mdc-select--disabled": this.disabled,
- "mdc-select--no-label": !this.label,
- "mdc-select--filled": !this.outlined,
- "mdc-select--outlined": this.outlined,
- "mdc-select--with-leading-icon": !!this.icon,
- "mdc-select--required": this.required,
- "mdc-select--invalid": !this.isUiValid,
- },
- b = { "mdc-select__menu--invalid": !this.isUiValid },
- c = !this.label ? void 0 : "label",
- d = this.shouldRenderHelperText ? "helper-text" : void 0;
- return g(
- E ||
- (E = j([
- '\n
\n
\n \n
\n
',
- ' \n \n
\n \n \n \n \n \n \n \n ',
- '\n
\n
",
- ])),
- hc(a),
- yc(b),
- this.onKeydown,
- this.registerBodyClick,
- this.deregisterBodyClick
- );
- }
- createAdapter() {
- var a = this;
- return Object.assign(Object.assign({}, Va(this.mdcRoot)), {
- hasAnchor: () => !!this.anchor,
- notifyClose: () => {
- var a = new CustomEvent("closed", { bubbles: !0, composed: !0 });
- (this.open = !1), this.mdcRoot.dispatchEvent(a);
- },
- notifyClosing: () => {
- var a = new CustomEvent("closing", { bubbles: !0, composed: !0 });
- this.mdcRoot.dispatchEvent(a);
- },
- notifyOpen: () => {
- var a = new CustomEvent("opened", { bubbles: !0, composed: !0 });
- (this.open = !0), this.mdcRoot.dispatchEvent(a);
- },
- isElementInContainer: () => !1,
- isRtl: () =>
- !!this.mdcRoot &&
- "rtl" === getComputedStyle(this.mdcRoot).direction,
- setTransformOrigin: (a) => {
- var b = this.mdcRoot;
- b && (this.styleTransformOrigin = a);
- },
- isFocused: () => oc(this),
- saveFocus: () => {
- var a = nc(),
- b = a.length;
- b || (this.previouslyFocused = null),
- (this.previouslyFocused = a[b - 1]);
- },
- restoreFocus: () => {
- !this.previouslyFocused ||
- ("focus" in this.previouslyFocused &&
- this.previouslyFocused.focus());
- },
- getInnerDimensions: () => {
- var a = this.mdcRoot;
- return a
- ? { width: a.offsetWidth, height: a.offsetHeight }
- : { width: 0, height: 0 };
- },
- getAnchorDimensions: () => {
- var a = this.anchor;
- return a ? a.getBoundingClientRect() : null;
- },
- getBodyDimensions: () => ({
- width: document.body.clientWidth,
- height: document.body.clientHeight,
- }),
- getWindowDimensions: () => ({
- width: window.innerWidth,
- height: window.innerHeight,
- }),
- getWindowScroll: () => ({
- x: window.pageXOffset,
- y: window.pageYOffset,
- }),
- setPosition: (a) => {
- var b = this.mdcRoot;
- b &&
- ((this.styleLeft = "left" in a ? "".concat(a.left, "px") : ""),
- (this.styleRight = "right" in a ? "".concat(a.right, "px") : ""),
- (this.styleTop = "top" in a ? "".concat(a.top, "px") : ""),
- (this.styleBottom =
- "bottom" in a ? "".concat(a.bottom, "px") : ""));
- },
- setMaxHeight: (function () {
- var b = o(function* (b) {
- var c = a.mdcRoot;
- c &&
- ((a.styleMaxHeight = b),
- yield a.updateComplete,
- (a.styleMaxHeight = "var(--mdc-menu-max-height, ".concat(
- b,
- ")"
- )));
- });
- return function () {
- return b.apply(this, arguments);
- };
- })(),
- });
- }
- onKeydown(a) {
- this.mdcFoundation && this.mdcFoundation.handleKeydown(a);
- }
- onBodyClick(a) {
- if (!this.stayOpenOnBodyClick) {
- var b = a.composedPath();
- -1 === b.indexOf(this) && this.close();
- }
- }
- registerBodyClick() {
- (this.onBodyClickBound = this.onBodyClick.bind(this)),
- document.body.addEventListener("click", this.onBodyClickBound, {
- passive: !0,
- capture: !0,
- });
- }
- deregisterBodyClick() {
- document.body.removeEventListener("click", this.onBodyClickBound, {
- capture: !0,
- });
- }
- close() {
- this.open = !1;
- }
- show() {
- this.open = !0;
- }
- }
- Na([Ra(".mdc-menu-surface")], Cd.prototype, "mdcRoot", void 0),
- Na([Ra("slot")], Cd.prototype, "slotElement", void 0),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation &&
- !this.fixed &&
- this.mdcFoundation.setIsHoisted(a);
- }),
- ],
- Cd.prototype,
- "absolute",
- void 0
- ),
- Na([Pa({ type: Boolean })], Cd.prototype, "fullwidth", void 0),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation &&
- !this.absolute &&
- this.mdcFoundation.setFixedPosition(a);
- }),
- ],
- Cd.prototype,
- "fixed",
- void 0
- ),
- Na(
- [
- Pa({ type: Number }),
- Zb(function (a) {
- this.mdcFoundation &&
- null !== this.y &&
- null !== a &&
- (this.mdcFoundation.setAbsolutePosition(a, this.y),
- this.mdcFoundation.setAnchorMargin({
- left: a,
- top: this.y,
- right: -a,
- bottom: this.y,
- }));
- }),
- ],
- Cd.prototype,
- "x",
- void 0
- ),
- Na(
- [
- Pa({ type: Number }),
- Zb(function (a) {
- this.mdcFoundation &&
- null !== this.x &&
- null !== a &&
- (this.mdcFoundation.setAbsolutePosition(this.x, a),
- this.mdcFoundation.setAnchorMargin({
- left: this.x,
- top: a,
- right: -this.x,
- bottom: a,
- }));
- }),
- ],
- Cd.prototype,
- "y",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation && this.mdcFoundation.setQuickOpen(a);
- }),
- ],
- Cd.prototype,
- "quick",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a, b) {
- this.mdcFoundation &&
- (a
- ? this.mdcFoundation.open()
- : b !== void 0 && this.mdcFoundation.close());
- }),
- ],
- Cd.prototype,
- "open",
- void 0
- ),
- Na([Pa({ type: Boolean })], Cd.prototype, "stayOpenOnBodyClick", void 0),
- Na(
- [
- Qa(),
- Zb(function (a) {
- this.mdcFoundation &&
- (a
- ? this.mdcFoundation.setAnchorCorner(a)
- : this.mdcFoundation.setAnchorCorner(a));
- }),
- ],
- Cd.prototype,
- "bitwiseCorner",
- void 0
- ),
- Na(
- [
- Pa({ type: String }),
- Zb(function (a) {
- if (this.mdcFoundation) {
- var b = null === this.previousMenuCorner,
- c = !b && a !== this.previousMenuCorner;
- ("START" === a || "END" === a) &&
- (c || (b && "END" === a)) &&
- ((this.bitwiseCorner ^= ad.RIGHT),
- this.mdcFoundation.flipCornerHorizontally(),
- (this.previousMenuCorner = a));
- }
- }),
- ],
- Cd.prototype,
- "menuCorner",
- void 0
- ),
- Na(
- [
- Pa({ type: String }),
- Zb(function (a) {
- if (this.mdcFoundation && a) {
- var b = Bd[a];
- "END" === this.menuCorner && (b ^= ad.RIGHT),
- (this.bitwiseCorner = b);
- }
- }),
- ],
- Cd.prototype,
- "corner",
- void 0
- ),
- Na([Qa()], Cd.prototype, "styleTop", void 0),
- Na([Qa()], Cd.prototype, "styleLeft", void 0),
- Na([Qa()], Cd.prototype, "styleRight", void 0),
- Na([Qa()], Cd.prototype, "styleBottom", void 0),
- Na([Qa()], Cd.prototype, "styleMaxHeight", void 0),
- Na([Qa()], Cd.prototype, "styleTransformOrigin", void 0);
- var Dd = mb(
- U ||
- (U = j([
- ".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}",
- ]))
- );
- class Ed extends La(Cd) {
- static get defineId() {
- return "mwc-menu-surface";
- }
- static get elementDefinitions() {
- return Vb([], Ed);
- }
- static get styles() {
- return Dd;
- }
- }
- var Fd = (a) => a.hasAttribute("mwc-list-item");
- class Gd extends pc {
- constructor() {
- var a;
- super(),
- (a = this),
- (this.mdcAdapter = null),
- (this.mdcFoundationClass = yd),
- (this.activatable = !1),
- (this.multi = !1),
- (this.wrapFocus = !1),
- (this.itemRoles = null),
- (this.innerRole = null),
- (this.innerAriaLabel = null),
- (this.rootTabbable = !1),
- (this.previousTabindex = null),
- (this.noninteractive = !1),
- (this.itemsReadyResolver = () => {}),
- (this.itemsReady = Promise.resolve([])),
- (this.items_ = []);
- var b = gb(this.layout.bind(this));
- this.debouncedLayout = function () {
- var c =
- !(0 < arguments.length && arguments[0] !== void 0) || arguments[0];
- hb.call(a), b(c);
- };
- }
- getUpdateComplete() {
- var a = () => super.getUpdateComplete,
- b = this;
- return o(function* () {
- var c = yield a().call(b);
- return yield b.itemsReady, c;
- })();
- }
- get items() {
- return this.items_;
- }
- updateItems() {
- var a,
- b = null !== (a = this.assignedElements) && void 0 !== a ? a : [],
- c = [];
- for (var f of b)
- Fd(f) && (c.push(f), (f._managingList = this)),
- f.hasAttribute("divider") &&
- !f.hasAttribute("role") &&
- f.setAttribute("role", "separator");
- this.items_ = c;
- var d = new Set();
- if (
- (this.items_.forEach((a, b) => {
- this.itemRoles
- ? a.setAttribute("role", this.itemRoles)
- : a.removeAttribute("role"),
- a.selected && d.add(b);
- }),
- this.multi)
- )
- this.select(d);
- else {
- var g = d.size ? d.entries().next().value[1] : -1;
- this.select(g);
- }
- var e = new Event("items-updated", { bubbles: !0, composed: !0 });
- this.dispatchEvent(e);
- }
- get selected() {
- var a = this.index;
- if (!fb(a)) return -1 === a ? null : this.items[a];
- var b = [];
- for (var c of a) b.push(this.items[c]);
- return b;
- }
- get index() {
- return this.mdcFoundation ? this.mdcFoundation.getSelectedIndex() : -1;
- }
- render() {
- var a = null === this.innerRole ? void 0 : this.innerRole,
- b = null === this.innerAriaLabel ? void 0 : this.innerAriaLabel,
- c = this.rootTabbable ? "0" : "-1";
- return g(
- V ||
- (V = j([
- "\n \n
\n ",
- ])),
- c,
- kd(a),
- kd(b),
- this.onKeydown,
- this.onFocusIn,
- this.onFocusOut,
- this.onRequestSelected,
- this.onListItemConnected,
- this.renderPlaceholder()
- );
- }
- renderPlaceholder() {
- var a,
- b = null !== (a = this.assignedElements) && void 0 !== a ? a : [];
- return void 0 !== this.emptyMessage && 0 === b.length
- ? g(
- W ||
- (W = j([
- "\n
",
- " \n ",
- ])),
- this.emptyMessage
- )
- : null;
- }
- firstUpdated() {
- super.firstUpdated(),
- this.items.length ||
- (this.mdcFoundation.setMulti(this.multi), this.layout());
- }
- onFocusIn(a) {
- if (this.mdcFoundation && this.mdcRoot) {
- var b = this.getIndexOfTarget(a);
- this.mdcFoundation.handleFocusIn(a, b);
- }
- }
- onFocusOut(a) {
- if (this.mdcFoundation && this.mdcRoot) {
- var b = this.getIndexOfTarget(a);
- this.mdcFoundation.handleFocusOut(a, b);
- }
- }
- onKeydown(a) {
- if (this.mdcFoundation && this.mdcRoot) {
- var b = this.getIndexOfTarget(a),
- c = a.target,
- d = Fd(c);
- this.mdcFoundation.handleKeydown(a, d, b);
- }
- }
- onRequestSelected(a) {
- if (this.mdcFoundation) {
- var d = this.getIndexOfTarget(a);
- if (
- -1 === d &&
- (this.layout(), (d = this.getIndexOfTarget(a)), -1 === d)
- )
- return;
- var e = this.items[d];
- if (e.disabled) return;
- var b = a.detail.selected,
- c = a.detail.source;
- this.mdcFoundation.handleSingleSelection(d, "interaction" === c, b),
- a.stopPropagation();
- }
- }
- getIndexOfTarget(a) {
- var b = this.items,
- c = a.composedPath();
- for (var d of c) {
- var e = -1;
- if ((kc(d) && Fd(d) && (e = b.indexOf(d)), -1 !== e)) return e;
- }
- return -1;
- }
- createAdapter() {
- return (
- (this.mdcAdapter = {
- getListItemCount: () => (this.mdcRoot ? this.items.length : 0),
- getFocusedElementIndex: this.getFocusedItemIndex,
- getAttributeForElementIndex: (a, b) => {
- var c = this.mdcRoot;
- if (!c) return "";
- var d = this.items[a];
- return d ? d.getAttribute(b) : "";
- },
- setAttributeForElementIndex: (a, b, c) => {
- if (this.mdcRoot) {
- var d = this.items[a];
- d && d.setAttribute(b, c);
- }
- },
- focusItemAtIndex: (a) => {
- var b = this.items[a];
- b && b.focus();
- },
- setTabIndexForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.tabindex = b);
- },
- notifyAction: (a) => {
- var b = new CustomEvent("action", {
- bubbles: !0,
- composed: !0,
- detail: { index: a },
- });
- this.dispatchEvent(b);
- },
- notifySelected: (a, b) => {
- var c = new CustomEvent("selected", {
- bubbles: !0,
- composed: !0,
- detail: { index: a, diff: b },
- });
- this.dispatchEvent(c);
- },
- isFocusInsideList: () => oc(this),
- isRootFocused: () => {
- var a = this.mdcRoot,
- b = a.getRootNode();
- return b.activeElement === a;
- },
- setDisabledStateForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.disabled = b);
- },
- getDisabledStateForElementIndex: (a) => {
- var b = this.items[a];
- return !!b && b.disabled;
- },
- setSelectedStateForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.selected = b);
- },
- getSelectedStateForElementIndex: (a) => {
- var b = this.items[a];
- return !!b && b.selected;
- },
- setActivatedStateForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.activated = b);
- },
- }),
- this.mdcAdapter
- );
- }
- selectUi(a) {
- var b =
- !!(1 < arguments.length && arguments[1] !== void 0) && arguments[1],
- c = this.items[a];
- c && ((c.selected = !0), (c.activated = b));
- }
- deselectUi(a) {
- var b = this.items[a];
- b && ((b.selected = !1), (b.activated = !1));
- }
- select(a) {
- this.mdcFoundation && this.mdcFoundation.setSelectedIndex(a);
- }
- toggle(a, b) {
- this.multi && this.mdcFoundation.toggleMultiAtIndex(a, b);
- }
- onListItemConnected(a) {
- var b = a.target;
- this.layout(-1 === this.items.indexOf(b));
- }
- layout() {
- var a =
- !(0 < arguments.length && arguments[0] !== void 0) || arguments[0];
- a && this.updateItems();
- var b = this.items[0];
- for (var c of this.items) c.tabindex = -1;
- b &&
- (this.noninteractive
- ? !this.previousTabindex && (this.previousTabindex = b)
- : (b.tabindex = 0)),
- this.itemsReadyResolver();
- }
- getFocusedItemIndex() {
- if (!this.mdcRoot) return -1;
- if (!this.items.length) return -1;
- var a = nc();
- if (!a.length) return -1;
- for (var b, c = a.length - 1; 0 <= c; c--)
- if (((b = a[c]), Fd(b))) return this.items.indexOf(b);
- return -1;
- }
- focusItemAtIndex(a) {
- for (var b of this.items)
- if (0 === b.tabindex) {
- b.tabindex = -1;
- break;
- }
- (this.items[a].tabindex = 0), this.items[a].focus();
- }
- focus() {
- var a = this.mdcRoot;
- a && a.focus();
- }
- blur() {
- var a = this.mdcRoot;
- a && a.blur();
- }
- }
- Na([Pa({ type: String })], Gd.prototype, "emptyMessage", void 0),
- Na([Ra(".mdc-deprecated-list")], Gd.prototype, "mdcRoot", void 0),
- Na([Ta("", !0, "*")], Gd.prototype, "assignedElements", void 0),
- Na(
- [Ta("", !0, '[tabindex="0"]')],
- Gd.prototype,
- "tabbableElements",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation && this.mdcFoundation.setUseActivatedClass(a);
- }),
- ],
- Gd.prototype,
- "activatable",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a, b) {
- this.mdcFoundation && this.mdcFoundation.setMulti(a),
- b !== void 0 && this.layout();
- }),
- ],
- Gd.prototype,
- "multi",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation && this.mdcFoundation.setWrapFocus(a);
- }),
- ],
- Gd.prototype,
- "wrapFocus",
- void 0
- ),
- Na(
- [
- Pa({ type: String }),
- Zb(function (a, b) {
- b !== void 0 && this.updateItems();
- }),
- ],
- Gd.prototype,
- "itemRoles",
- void 0
- ),
- Na([Pa({ type: String })], Gd.prototype, "innerRole", void 0),
- Na([Pa({ type: String })], Gd.prototype, "innerAriaLabel", void 0),
- Na([Pa({ type: Boolean })], Gd.prototype, "rootTabbable", void 0),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- var b, c;
- if (a) {
- var d =
- null !==
- (c =
- null === (b = this.tabbableElements) || void 0 === b
- ? void 0
- : b[0]) && void 0 !== c
- ? c
- : null;
- (this.previousTabindex = d),
- d && d.setAttribute("tabindex", "-1");
- } else !a && this.previousTabindex && (this.previousTabindex.setAttribute("tabindex", "0"), (this.previousTabindex = null));
- }),
- ],
- Gd.prototype,
- "noninteractive",
- void 0
- );
- var Hd = mb(
- X ||
- (X = j([
- '@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}',
- ]))
- );
- class Id extends La(Gd) {
- static get defineId() {
- return "mwc-list";
- }
- static get elementDefinitions() {
- return Vb([Cc], Id);
- }
- static get styles() {
- return Hd;
- }
- }
- class Jd extends La(zd) {
- static get defineId() {
- return "mwc-menu";
- }
- static get elementDefinitions() {
- return Vb([Ed, Id], Jd);
- }
- static get styles() {
- return Ad;
- }
- }
- var Kd = { NOTCH_ELEMENT_SELECTOR: ".mdc-notched-outline__notch" },
- Ld = { NOTCH_ELEMENT_PADDING: 8 },
- Md = {
- NO_LABEL: "mdc-notched-outline--no-label",
- OUTLINE_NOTCHED: "mdc-notched-outline--notched",
- OUTLINE_UPGRADED: "mdc-notched-outline--upgraded",
- },
- Nd = (function (a) {
- function b(c) {
- return a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "strings", {
- get: function () {
- return Kd;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return Md;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "numbers", {
- get: function () {
- return Ld;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- setNotchWidthProperty: function () {},
- removeNotchWidthProperty: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.notch = function (a) {
- var c = b.cssClasses.OUTLINE_NOTCHED;
- 0 < a && (a += Ld.NOTCH_ELEMENT_PADDING),
- this.adapter.setNotchWidthProperty(a),
- this.adapter.addClass(c);
- }),
- (b.prototype.closeNotch = function () {
- var a = b.cssClasses.OUTLINE_NOTCHED;
- this.adapter.removeClass(a),
- this.adapter.removeNotchWidthProperty();
- }),
- b
- );
- })(qc);
- class Od extends pc {
- constructor() {
- super(...arguments),
- (this.mdcFoundationClass = Nd),
- (this.width = 0),
- (this.open = !1),
- (this.lastOpen = this.open);
- }
- createAdapter() {
- return {
- addClass: (a) => this.mdcRoot.classList.add(a),
- removeClass: (a) => this.mdcRoot.classList.remove(a),
- setNotchWidthProperty: (a) =>
- this.notchElement.style.setProperty("width", "".concat(a, "px")),
- removeNotchWidthProperty: () =>
- this.notchElement.style.removeProperty("width"),
- };
- }
- openOrClose(a, b) {
- this.mdcFoundation &&
- (a && b !== void 0
- ? this.mdcFoundation.notch(b)
- : this.mdcFoundation.closeNotch());
- }
- render() {
- this.openOrClose(this.open, this.width);
- var a = hc({ "mdc-notched-outline--notched": this.open });
- return g(
- Y ||
- (Y = j([
- '\n
\n \n \n \n \n \n ',
- ])),
- a
- );
- }
- }
- Na([Ra(".mdc-notched-outline")], Od.prototype, "mdcRoot", void 0),
- Na([Pa({ type: Number })], Od.prototype, "width", void 0),
- Na([Pa({ type: Boolean, reflect: !0 })], Od.prototype, "open", void 0),
- Na(
- [Ra(".mdc-notched-outline__notch")],
- Od.prototype,
- "notchElement",
- void 0
- );
- var Pd = mb(
- Z ||
- (Z = j([
- ".mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}",
- ]))
- );
- class Qd extends La(Od) {
- static get defineId() {
- return "mwc-notched-outline";
- }
- static get elementDefinitions() {
- return Vb([], Qd);
- }
- static get styles() {
- return Pd;
- }
- }
- var Rd = mb(
- aa ||
- (aa = j([
- ':host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}',
- ]))
- );
- class Sd extends La(Qb) {
- static get defineId() {
- return "mwc-icon";
- }
- static get elementDefinitions() {
- return Vb([], Sd);
- }
- render() {
- return g(ba || (ba = j(["
"])));
- }
- static get styles() {
- return Rd;
- }
- }
- class Td extends La(md) {
- static get defineId() {
- return "mwc-select";
- }
- static get elementDefinitions() {
- return Vb([Jd, Sd, Qd], Td);
- }
- static get styles() {
- return od;
- }
- }
- var Ud = function (a, b) {
- var c =
- 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {},
- d = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : {},
- e = new Event(b, {
- bubbles: void 0 === d.bubbles || d.bubbles,
- cancelable: !!d.cancelable,
- composed: void 0 === d.composed || d.composed,
- });
- return (e.detail = c), a.dispatchEvent(e), e;
- };
- class Vd extends La(Qb) {
- static get elementDefinitions() {
- return Vb(
- [Wb("ha-checkbox"), Wb("ha-formfield"), Wb("ha-form-string"), Cc, Td],
- Vd
- );
- }
- static get styles() {
- return Ub;
- }
- static get properties() {
- return { hass: {}, _config: {} };
- }
- setConfig(a) {
- this._config = l(l({}, Tb), a);
- }
- get entityOptions() {
- var a = Object.keys(this.hass.states).filter((a) =>
- ["switch", "light", "group"].includes(a.substr(0, a.indexOf(".")))
- );
- return a.sort(), a;
- }
- firstUpdated() {
- this._firstRendered = !0;
- }
- render() {
- if (!this.hass) return g(ca || (ca = j([""])));
- var { header: a } = this._config;
- if (!a && this._config.entity) {
- var c = this._config.entity.split(".")[1] || "";
- c && ((c = c.charAt(0).toUpperCase() + c.slice(1)), (a = c));
- }
- var b = this.entityOptions.map((a) =>
- g(
- da ||
- (da = j([
- '
",
- " ",
- ])),
- a,
- a === this._config.entity,
- a
- )
- );
- return g(
- ea ||
- (ea = j([
- '\n
\n\n
\n \n
\n\n
\n \n ',
- "\n \n \n
\n\n
\n \n \n
\n\n
\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n
\n
\n
\n ',
- ])),
- { name: "header", type: "string" },
- a,
- "header",
- this.configChanged,
- !0,
- this.configChanged,
- (a) => a.stopPropagation(),
- "entity",
- b,
- { name: "brightness_icon", type: "string" },
- this._config.brightness_icon,
- "brightness_icon",
- this.configChanged,
- { name: "white_icon", type: "string" },
- this._config.white_icon,
- "white_icon",
- this.configChanged,
- { name: "temperature_icon", type: "string" },
- this._config.temperature_icon,
- "temperature_icon",
- this.configChanged,
- this.checkboxConfigChanged,
- this._config.color_wheel,
- "color_wheel",
- this.checkboxConfigChanged,
- this._config.shorten_cards,
- "shorten_cards",
- this.checkboxConfigChanged,
- this._config.persist_features,
- "persist_features",
- this.checkboxConfigChanged,
- this._config.brightness,
- "brightness",
- this.checkboxConfigChanged,
- this._config.color_temp,
- "color_temp",
- this.checkboxConfigChanged,
- this._config.white_value,
- "white_value",
- this.checkboxConfigChanged,
- this._config.speed,
- "speed",
- this.checkboxConfigChanged,
- this._config.intensity,
- "intensity",
- this.checkboxConfigChanged,
- this._config.color_picker,
- "color_picker",
- this.checkboxConfigChanged,
- this._config.effects_list,
- "effects_list",
- this.checkboxConfigChanged,
- this._config.full_width_sliders,
- "full_width_sliders",
- this.checkboxConfigChanged,
- this._config.show_slider_percent,
- "show_slider_percent",
- this.checkboxConfigChanged,
- this._config.smooth_color_wheel,
- "smooth_color_wheel",
- this.checkboxConfigChanged,
- this._config.consolidate_entities,
- "consolidate_entities",
- this.checkboxConfigChanged,
- this._config.hide_header,
- "hide_header",
- this.checkboxConfigChanged,
- this._config.child_card,
- "child_card",
- this.checkboxConfigChanged,
- this._config.force_features,
- "force_features"
- );
- }
- configChanged(a) {
- if (this._config && this.hass && this._firstRendered) {
- var {
- target: { configValue: b, value: c },
- detail: { value: d },
- } = a;
- (this._config =
- void 0 !== d && null !== d
- ? l(l({}, this._config), {}, { [b]: d })
- : l(l({}, this._config), {}, { [b]: c })),
- Ud(this, "config-changed", { config: this._config });
- }
- }
- checkboxConfigChanged(a) {
- if (this._config && this.hass && this._firstRendered) {
- var {
- target: { value: b, checked: c },
- } = a;
- (this._config = l(l({}, this._config), {}, { [b]: c })),
- Ud(this, "config-changed", { config: this._config });
- }
- }
- }
- var Wd = "light-entity-card-editor";
- customElements.define(Wd, Vd),
- console.info(
- "%c LIGHT-ENTITY-CARD \n%c Version ".concat(
- {
- name: "light-entity-card",
- version: "5.0.0",
- description: "A light-entity card for Home Assistant Lovelace UI",
- keywords: [
- "home-assistant",
- "homeassistant",
- "hass",
- "automation",
- "lovelace",
- "custom-cards",
- "light-entity",
- ],
- repository: "git@github.com:ljmerza/light-entity-card.git",
- author: "Leonardo Merza
",
- license: "MIT",
- dependencies: {
- "@lit-labs/scoped-registry-mixin": "^1.0.0",
- "@material/mwc-icon": "^0.25.3",
- "@material/mwc-list": "^0.25.3",
- "@material/mwc-menu": "^0.25.3",
- "@material/mwc-notched-outline": "^0.25.3",
- "@material/mwc-ripple": "^0.25.3",
- "@material/mwc-select": "^0.25.3",
- "core-js": "^2.6.5",
- lit: "^2.1.2",
- },
- devDependencies: {
- "@babel/cli": "^7.4.3",
- "@babel/core": "^7.4.3",
- "@babel/plugin-proposal-class-properties": "^7.3.3",
- "@babel/plugin-proposal-decorators": "^7.3.0",
- "@babel/plugin-transform-template-literals": "^7.2.0",
- "@babel/preset-env": "^7.3.1",
- "@rollup/plugin-json": "^4.0.3",
- "babel-plugin-iife-wrap": "^1.1.0",
- "babel-preset-minify": "^0.5.0",
- eslint: "^5.16.0",
- "eslint-config-airbnb-base": "^13.1.0",
- "eslint-plugin-import": "2.16.0",
- rollup: "^0.66.6",
- "rollup-plugin-node-resolve": "^3.4.0",
- },
- resolutions: {
- lit: "^2.1.2",
- "lit-html": "2.1.2",
- "lit-element": "3.1.2",
- "@lit/reactive-element": "1.2.1",
- },
- scripts: {
- build: "npm run rollup && npm run babel",
- rollup: "rollup -c",
- babel:
- "babel dist/light-entity-card.js --out-file dist/light-entity-card.js",
- lint: "eslint src/* --ext .js",
- watch: "rollup -c --watch",
- start: "rollup -c --watch",
- },
- }.version,
- " "
- ),
- "color: orange; font-weight: bold; background: black",
- "color: white; font-weight: bold; background: dimgray"
- );
- class Xd extends La(Qb) {
- static get elementDefinitions() {
- return Vb(
- [
- Wb("ha-card"),
- Wb("more-info-light"),
- Wb("ha-switch"),
- Wb("ha-icon"),
- Wb("ha-slider"),
- Wb("ha-color-picker"),
- Td,
- Cc,
- ],
- Xd
- );
- }
- firstUpdated() {
- return o(function* () {
- if (window.loadCardHelpers) {
- var a = yield window.loadCardHelpers();
- a.importMoreInfoControl("light");
- }
- })();
- }
- static get properties() {
- return { hass: Object, config: Object };
- }
- setConfig(a) {
- if (!a.entity) throw Error("entity required.");
- (this.config = l(l({}, Tb), a)),
- (this._hueSegments = this.config.smooth_color_wheel ? 0 : 24),
- (this._saturationSegments = this.config.smooth_color_wheel ? 0 : 8);
- }
- static getConfigElement() {
- return o(function* () {
- return document.createElement(Wd);
- })();
- }
- static get featureNames() {
- return {
- brightness: 1,
- colorTemp: 2,
- effectList: 4,
- color: 16,
- whiteValue: 128,
- };
- }
- static get cmdToggle() {
- return { on: "turn_on", off: "turn_off" };
- }
- static get entityLength() {
- return { light: 10, switch: 1 };
- }
- getCardSize() {
- if (
- !this.config ||
- !this.__hass ||
- !this.__hass.states[this.config.entity]
- )
- return 1;
- var a = 0,
- b = this.__hass.states[this.config.entity];
- return (
- Array.isArray(b.attributes.entity_id)
- ? b.attributes.entity_id.forEach(
- (b) => (a += this.getEntityLength(b))
- )
- : (a += this.getEntityLength(b.attributes.entity_id)),
- this.config.group && (a *= 0.8),
- parseInt(a, 1)
- );
- }
- getEntityLength(a) {
- return /^light\./.test(a)
- ? Xd.entityLength.light
- : /^switch\./.test(a)
- ? Xd.entityLength.switch
- : 0;
- }
- get styles() {
- return Sb;
- }
- get language() {
- return this.__hass.resources[this.__hass.language];
- }
- isEntityOn(a) {
- return "on" === a.state;
- }
- updated() {
- (this._isUpdating = !1),
- this._shownStateObjects.forEach((a) => {
- var b = this.generateColorPickerId(a),
- c = this.shadowRoot.querySelectorAll("#".concat(b));
- if (c.length) {
- var d = (a.attributes.hs_color && a.attributes.hs_color[0]) || 0,
- e =
- (a.attributes.hs_color && a.attributes.hs_color[1] / 100) ||
- 0;
- c[0].desiredHsColor = { h: d, s: e };
- }
- });
- }
- render() {
- var a = this.__hass.states[this.config.entity];
- if (!a)
- return g(
- fa ||
- (fa = j([
- "\n \n ",
- " \n ",
- ])),
- this.styles,
- "Invalid entity: ".concat(this.config.entity)
- );
- (this._isUpdating = !0),
- (this._stateObjects = this.getEntitiesToShow(a)),
- (this._shownStateObjects = this.config.consolidate_entities
- ? [a]
- : [...this._stateObjects]);
- var b = this._shownStateObjects.reduce(
- (a, b) =>
- g(ga || (ga = j(["", "", ""])), a, this.createEntityTemplate(b)),
- ""
- ),
- c = "light-entity-card "
- .concat(this.config.shorten_cards ? " group" : "", " ")
- .concat(this.config.child_card ? " light-entity-child-card" : "");
- return g(
- ha ||
- (ha = j([
- "\n \n \n \n ',
- " ",
- "\n ",
- " ",
- "\n ",
- "\n \n ",
- " ",
- "\n ",
- ])),
- this.createHeader(a),
- b,
- this.createBrightnessSlider(a),
- this.createSpeedSlider(a),
- this.createIntensitySlider(a),
- this.createColorTemperature(a),
- this.createWhiteValue(a),
- this.createColorPicker(a),
- this.createEffectList(a)
- );
- }
- createHeader(a) {
- if (this.config.hide_header) return g(ja || (ja = j([""])));
- var b = this.config.header || a.attributes.friendly_name || a.entity_id;
- return g(
- ka ||
- (ka = j([
- '\n
+
+ `}configChanged(t){if(!this._config||!this.hass||!this._firstRendered)return;const{target:{configValue:e,value:i},detail:{value:n}}=t;this._config=null!=n?{...this._config,[e]:n}:{...this._config,[e]:i},ai(this,"config-changed",{config:this._config})}checkboxConfigChanged(t){if(!this._config||!this.hass||!this._firstRendered)return;const{target:{value:e,checked:i}}=t;this._config={...this._config,[e]:i},ai(this,"config-changed",{config:this._config})}}var ci=i(0);customElements.define("light-entity-card-editor",li),console.info("light-entity-card v"+ci.version);class hi extends(ei(Ct)){static get elementDefinitions(){return oi([si("ha-card"),si("more-info-light"),si("ha-switch"),si("ha-icon"),si("state-badge"),si("ha-slider"),si("ha-color-picker"),si("ha-select"),si("mwc-list-item")],hi)}static get properties(){return{hass:{},config:{}}}async firstUpdated(){this.setColorWheels(),this._firstUpdate=!0}async updated(){this.setColorWheels()}setColorWheels(){if(!this._shownStateObjects)return;const t=this.getColorPickerWidth();for(const e of this._shownStateObjects){const i=this.renderRoot.getElementById("picker-"+e.entity_id);if(!i)continue;i.innerHTML="";let n={h:0,s:0,l:50};if(e.attributes.hs_color){n={h:parseInt(e.attributes.hs_color[0]),s:parseInt(e.attributes.hs_color[1]),l:50}}new Ye.ColorPicker(i,{sliderSize:0,color:n,width:t,wheelLightness:!1}).on("input:end",t=>this.setColorPicker(t.hsl,e))}}getColorPickerWidth(){const t=this.shadowRoot.querySelector(".light-entity-card").offsetWidth,e=this.config.shorten_cards,i=t-(e?100:50),n=e?200:300;return n>i?i:n}setConfig(t){if(!t.entity)throw Error("entity required.");this.config={...ni,...t}}static async getConfigElement(){return document.createElement("light-entity-card-editor")}static get featureNames(){return{brightness:1,colorTemp:2,effectList:4,color:16,whiteValue:128}}static get cmdToggle(){return{on:"turn_on",off:"turn_off"}}static get entityLength(){return{light:10,switch:1}}getCardSize(){if(!this.config||!this.__hass||!this.__hass.states[this.config.entity])return 1;let t=0;const e=this.__hass.states[this.config.entity];return Array.isArray(e.attributes.entity_id)?e.attributes.entity_id.forEach(e=>t+=this.getEntityLength(e)):t+=this.getEntityLength(e.attributes.entity_id),this.config.group&&(t*=.8),parseInt(t,1)}getEntityLength(t){return/^light\./.test(t)?hi.entityLength.light:/^switch\./.test(t)?hi.entityLength.switch:0}get styles(){return ii}get language(){return this.__hass.resources[this.__hass.language]}isEntityOn(t){return"on"===t.state}render(){const t=this.hass.states[this.config.entity];if(!t)return Q`
+
+ ${"Invalid entity: "+this.config.entity}
+ `;this._stateObjects=this.getEntitiesToShow(t),this.config.consolidate_entities?this._shownStateObjects=[t]:this._shownStateObjects=[...this._stateObjects];const e=this._shownStateObjects.reduce((t,e)=>Q`${t}${this.createEntityTemplate(e)}`,""),i=`light-entity-card ${this.config.shorten_cards?" group":""} ${this.config.child_card?" light-entity-child-card":""}`;return setTimeout(()=>{this.setColorWheels()},100),Q`
+
+
+ ${e}
+
+ `}getEntitiesToShow(t){return t.attributes.entity_id&&Array.isArray(t.attributes.entity_id)?t.attributes.entity_id.map(t=>this.hass.states[t]).filter(Boolean):[t]}createEntityTemplate(t){const e=this.config.full_width_sliders?"ha-slider-full-width":"";return Q`
+ ${this.createHeader(t)}
+
+ ${this.createBrightnessSlider(t)} ${this.createSpeedSlider(t)}
+ ${this.createIntensitySlider(t)} ${this.createColorTemperature(t)}
+ ${this.createWhiteValue(t)}
+
+ ${this.createColorPicker(t)} ${this.createEffectList(t)}
+ `}createHeader(t){if(this.config.hide_header)return Q``;const e=this.config.header||t.attributes.friendly_name||t.entity_id;return Q`
+
+ `}showHeaderIcon(t){return this.config.show_header_icon?Q`
+
+
+
+ `:Q``}createBrightnessSlider(t){return!1===this.config.brightness||this.dontShowFeature("brightness",t)?Q``:Q`
+
+
+
+
+
this._setValue(e,t,"brightness")}"
+ min="1"
+ max="255"
+ >
+ ${this.showPercent(t.attributes.brightness,0,254)}
+
+ `}createSpeedSlider(t){return!1===this.config.speed||this.dontShowFeature("speed",t)?Q``:Q`
+
+
+
+
+
this._setValue(e,t,"speed")}"
+ min="1"
+ max="255"
+ >
+ ${this.showPercent(t.attributes.speed,0,254)}
+
+ `}createIntensitySlider(t){return!1===this.config.speed||this.dontShowFeature("intensity",t)?Q``:Q`
+
+
+
+
+
this._setValue(e,t,"intensity")}"
+ min="1"
+ max="255"
+ >
+ ${this.showPercent(t.attributes.intensity,0,254)}
+
+ `}showPercent(t,e,i){if(!this.config.show_slider_percent)return Q``;let n=parseInt(100*(t-e)/(i-e),0);return isNaN(n)&&(n=0),Q` ${n}%
`}createColorTemperature(t){if(!1===this.config.color_temp)return Q``;if(this.dontShowFeature("colorTemp",t))return Q``;const e=this.showPercent(t.attributes.color_temp,t.attributes.min_mireds-1,t.attributes.max_mireds-1);return Q`
+
+
+
+
+
this._setValue(e,t,"color_temp")}"
+ >
+
+ ${e}
+
+ `}createWhiteValue(t){return!1===this.config.white_value||this.dontShowFeature("whiteValue",t)?Q``:Q`
+
+
+
+
+
this._setValue(e,t,"white_value")}"
+ >
+
+ ${this.showPercent(t.attributes.white_value,0,254)}
+
+ `}createEffectList(t){if(!1===this.config.effects_list)return Q``;if(!this.config.persist_features&&!this.isEntityOn(t))return Q``;let e=t.attributes.effect_list||[];if(this.config.effects_list&&Array.isArray(this.config.effects_list))e=this.config.effects_list;else if(this.config.effects_list&&this.hass.states[this.config.effects_list]){const t=this.hass.states[this.config.effects_list];e=t.attributes&&t.attributes.options||[]}else if(this.dontShowFeature("effectList",t))return Q``;const i=e.map(e=>this.createListItem(t,e)),n=this.language["ui.card.light.effect"];return Q`
+
+ t.stopPropagation()}"
+ @selected=${e=>this.setEffect(e,t)}
+ label="${n}"
+ >
+ ${i}
+
+
+ `}createListItem(t,e){return Q`${e} `}createColorPicker(t){return!1===this.config.color_picker||this.dontShowFeature("color",t)?Q``:Q`
+
+ `}dontShowFeature(t,e){if(this.config.force_features)return!1;if("speed"===t&&"speed"in e.attributes)return!0;if("intensity"===t&&"intensity"in e.attributes)return!0;let i=hi.featureNames[t]&e.attributes.supported_features;const n=e.attributes.supported_color_modes||[];if(!i)switch(t){case"brightness":if(i=Object.prototype.hasOwnProperty.call(e.attributes,"brightness"),!i){const t=["hs","rgb","rgbw","rgbww","white","brightness","color_temp","xy"];i=[...new Set(n.filter(e=>t.includes(e)))].length>0}break;case"colorTemp":if(n){const t=["color_temp"];i=[...new Set(n.filter(e=>t.includes(e)))].length>0}break;case"effectList":i=e.attributes.effect_list&&e.attributes.effect_list.length;break;case"color":if(!i){const t=["hs","rgb","rgbw","rgbww","xy"];i=[...new Set(n.filter(e=>t.includes(e)))].length>0}break;case"whiteValue":i=Object.prototype.hasOwnProperty.call(e.attributes,"white_value");break;default:i=!1}return!i||(!this.config.persist_features&&!this.isEntityOn(e)||void 0)}setColorPicker(t,e){this.callEntityService({hs_color:[t.h,t.s]},e)}_setValue(t,e,i){const n=parseInt(t.target.value,0);isNaN(n)||parseInt(e.attributes[i],0)===n||this.callEntityService({[i]:n},e)}setToggle(t,e){const i=this.isEntityOn(e)?hi.cmdToggle.off:hi.cmdToggle.on;this.callEntityService({},e,i)}setEffect(t,e){t.target.value&&this.callEntityService({effect:t.target.value},e)}callEntityService(t,e,i){if(!this._firstUpdate)return;let n=e.entity_id.split(".")[0];"group"===n&&(n="homeassistant"),this.hass.callService(n,i||hi.cmdToggle.on,{entity_id:e.entity_id,...t})}}customElements.define("light-entity-card",hi),window.customCards=window.customCards||[],window.customCards.push({type:"light-entity-card",name:"Light Entity Card",description:"Control lights and switches"})}]);
+//# sourceMappingURL=light-entity-card.js.map
diff --git a/custom_components/ui_lovelace_minimalist/cards/lovelace-auto-entities/lovelace-auto-entities.js b/custom_components/ui_lovelace_minimalist/cards/lovelace-auto-entities/lovelace-auto-entities.js
index de928a5da..84a74b4b6 100644
--- a/custom_components/ui_lovelace_minimalist/cards/lovelace-auto-entities/lovelace-auto-entities.js
+++ b/custom_components/ui_lovelace_minimalist/cards/lovelace-auto-entities/lovelace-auto-entities.js
@@ -1,4 +1,4 @@
-function t(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,i,r):s(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),n=new Map;class s{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=n.get(this.cssText);return e&&void 0===t&&(n.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const o=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new s(n,i)},r=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",i))(e)})(t):t;var a;const l=window.trustedTypes,c=l?l.emptyScript:"",d=window.reactiveElementPolyfillSupport,h={toAttribute(t,e){switch(e){case Boolean:t=t?c:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},u=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:u};class g extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Eh(i,e);void 0!==n&&(this._$Eu.set(n,i),t.push(n))})),t}static createProperty(t,e=v){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const s=this[t];this[e]=n,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=v){var n,s;const o=this.constructor._$Eh(t,i);if(void 0!==o&&!0===i.reflect){const r=(null!==(s=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==s?s:h.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,e){var i,n,s;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),a=t.converter,l=null!==(s=null!==(n=null===(i=a)||void 0===i?void 0:i.fromAttribute)&&void 0!==n?n:"function"==typeof a?a:null)&&void 0!==s?s:h.fromAttribute;this._$Ei=r,this[r]=l(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}var p;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:g}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.3.0");const f=globalThis.trustedTypes,_=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,y="?"+m,b=`<${y}>`,$=document,w=(t="")=>$.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S=/-->/g,O=/>/g,j=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,x=/"/g,k=/^(?:script|style|textarea|title)$/i,U=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),P=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),N=new WeakMap,D=$.createTreeWalker($,129,null,!1),I=(t,e)=>{const i=t.length-1,n=[];let s,o=2===e?"":"",r=C;for(let e=0;e"===l[0]?(r=null!=s?s:C,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?j:'"'===l[3]?x:T):r===x||r===T?r=j:r===S||r===O?r=C:(r=j,s=void 0);const h=r===j&&t[e+1].startsWith("/>")?" ":"";o+=r===C?i+b:c>=0?(n.push(a),i.slice(0,c)+"$lit$"+i.slice(c)+m+h):i+m+(-2===c?(n.push(void 0),e):h)}const a=o+(t[i]||">")+(2===e?" ":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(a):a,n]};class R{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,o=0;const r=t.length-1,a=this.parts,[l,c]=I(t,e);if(this.el=R.createElement(l,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=D.nextNode())&&a.length0){n.textContent=f?f.emptyScript:"";for(let i=0;i{var e;return A(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==M&&E(this._$AH)?this._$AA.nextSibling.data=t:this.k($.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=R.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new F(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new R(t)),e}S(t){A(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new L(this.A(w()),this.A(w()),this,this.options)):i=e[n],i._$AI(s),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let o=!1;if(void 0===s)t=H(this,t,e,0),o=!E(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const n=t;let r,a;for(t=s[0],r=0;r{var n,s;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let r=o._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;o._$litPart$=r=new L(e.insertBefore(w(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return P}}Y.finalized=!0,Y._$litElement$=!0,null===(K=globalThis.litElementHydrateSupport)||void 0===K||K.call(globalThis,{LitElement:Y});const Q=globalThis.litElementPolyfillSupport;null==Q||Q({LitElement:Y}),(null!==(Z=globalThis.litElementVersions)&&void 0!==Z?Z:globalThis.litElementVersions=[]).push("3.2.0");const X=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function tt(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):X(t,e)}function et(t){return tt({...t,state:!0})}var it;function nt(){return document.querySelector("hc-main")?document.querySelector("hc-main").hass:document.querySelector("home-assistant")?document.querySelector("home-assistant").hass:void 0}null===(it=window.HTMLSlotElement)||void 0===it||it.prototype.assignedElements;const st="lovelace-player-device-id";function ot(){if(!localStorage[st]){const t=()=>Math.floor(1e5*(1+Math.random())).toString(16).substring(1);window.fully&&"function"==typeof fully.getDeviceId?localStorage[st]=fully.getDeviceId():localStorage[st]=`${t()}${t()}-${t()}${t()}`}return localStorage[st]}let rt=ot();const at=new URLSearchParams(window.location.search);var lt;function ct(t){return!!String(t).includes("{%")||(!!String(t).includes("{{")||void 0)}at.get("deviceID")&&null!==(lt=at.get("deviceID"))&&("clear"===lt?localStorage.removeItem(st):localStorage[st]=lt,rt=ot()),window.cardMod_template_cache=window.cardMod_template_cache||{};const dt=window.cardMod_template_cache;async function ht(t,e,i){const n=nt().connection,s=JSON.stringify([e,i]);let o=dt[s];o?(o.callbacks.has(t)||ut(t),t(o.value),o.callbacks.add(t)):(ut(t),t(""),i=Object.assign({user:nt().user.name,browser:rt,hash:location.hash.substr(1)||""},i),dt[s]=o={template:e,variables:i,value:"",callbacks:new Set([t]),unsubscribe:n.subscribeMessage((t=>function(t,e){const i=dt[t];i&&(i.value=e.result,i.callbacks.forEach((t=>t(e.result))))}(s,t)),{type:"render_template",template:e,variables:i})})}async function ut(t){let e;for(const[i,n]of Object.entries(dt))if(n.callbacks.has(t)){n.callbacks.delete(t),0==n.callbacks.size&&(e=n.unsubscribe,delete dt[i]);break}e&&await(await e)()}var vt;function gt(t,e){if("string"==typeof t&&t.startsWith("$$")&&(t=t.substring(2),e=JSON.stringify(e)),"string"==typeof e&&"string"==typeof t&&(t.startsWith("/")&&t.endsWith("/")||-1!==t.indexOf("*"))){return t.startsWith("/")||(t=`/^${t=t.replace(/\./g,".").replace(/\*/g,".*")}$/`),new RegExp(t.slice(1,-1)).test(e)}if("string"==typeof t){if(t.startsWith("<="))return parseFloat(e)<=parseFloat(t.substring(2));if(t.startsWith(">="))return parseFloat(e)>=parseFloat(t.substring(2));if(t.startsWith("<"))return parseFloat(e)"))return parseFloat(e)>parseFloat(t.substring(1));if(t.startsWith("!"))return parseFloat(e)!=parseFloat(t.substring(1));if(t.startsWith("="))return parseFloat(e)==parseFloat(t.substring(1))}return t===e}window.autoEntities_cache=null!==(vt=window.autoEntities_cache)&&void 0!==vt?vt:{};const pt=window.autoEntities_cache;async function ft(t){var e;return pt.areas=null!==(e=pt.areas)&&void 0!==e?e:await t.callWS({type:"config/area_registry/list"}),pt.areas}async function _t(t){var e;return pt.devices=null!==(e=pt.devices)&&void 0!==e?e:await t.callWS({type:"config/device_registry/list"}),pt.devices}async function mt(t){var e;return pt.entities=null!==(e=pt.entities)&&void 0!==e?e:await t.callWS({type:"config/entity_registry/list"}),pt.entities}const yt={options:async()=>!0,sort:async()=>!0,domain:async(t,e,i)=>gt(e,i.entity_id.split(".")[0]),entity_id:async(t,e,i)=>gt(e,i.entity_id),state:async(t,e,i)=>gt(e,i.state),name:async(t,e,i)=>{var n;return gt(e,null===(n=i.attributes)||void 0===n?void 0:n.friendly_name)},group:async(t,e,i)=>{var n,s,o;return null===(o=null===(s=null===(n=t.states[e])||void 0===n?void 0:n.attributes)||void 0===s?void 0:s.entity_id)||void 0===o?void 0:o.includes(i.entity_id)},attributes:async(t,e,i)=>{for(const[t,n]of Object.entries(e)){let e=t.split(" ")[0],s=i.attributes;for(const t of e.split(":"))s=s?s[t]:void 0;if(void 0===s||!gt(n,s))return!1}return!0},not:async(t,e,i)=>!await bt(t,e,i.entity_id),or:async(t,e,i)=>{for(const n of e)if(await bt(t,n,i.entity_id))return!0;return!1},device:async(t,e,i)=>{const n=(await mt(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;const s=(await _t(t)).find((t=>t.id===n.device_id));return!!s&&(gt(e,s.name_by_user)||gt(e,s.name))},device_manufacturer:async(t,e,i)=>{const n=(await mt(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;const s=(await _t(t)).find((t=>t.id===n.device_id));return!!s&>(e,s.manufacturer)},device_model:async(t,e,i)=>{const n=(await mt(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;const s=(await _t(t)).find((t=>t.id===n.device_id));return!!s&>(e,s.model)},area:async(t,e,i)=>{const n=(await mt(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;let s=(await ft(t)).find((t=>t.area_id===n.area_id));if(s)return gt(e,s.name)||gt(e,s.area_id);const o=(await _t(t)).find((t=>t.id===n.device_id));return!!o&&(s=(await ft(t)).find((t=>t.area_id===o.area_id)),!!s&&(gt(e,s.name)||gt(e,s.area_id)))},entity_category:async(t,e,i)=>{const n=(await mt(t)).find((t=>t.entity_id===i.entity_id));return!!n&>(e,n.entity_category)},last_changed:async(t,e,i)=>gt(e,((new Date).getTime()-new Date(i.last_changed).getTime())/6e4),last_updated:async(t,e,i)=>gt(e,((new Date).getTime()-new Date(i.last_updated).getTime())/6e4),last_triggered:async(t,e,i)=>{if(null==i.attributes.last_triggered)return!1;return gt(e,((new Date).getTime()-new Date(i.attributes.last_triggered).getTime())/6e4)},integration:async(t,e,i)=>{const n=(await mt(t)).find((t=>t.entity_id===i.entity_id));return!!n&>(e,n.platform)}};async function bt(t,e,i){var n;if(!t.states[i])return!1;for(let[s,o]of Object.entries(e))if(s=s.trim().split(" ")[0].trim(),!await(null===(n=yt[s])||void 0===n?void 0:n.call(yt,t,o,t.states[i])))return!1;return!0}function $t(t,e,i){var n,s,o,r;const[a,l]=i.reverse?[-1,1]:[1,-1];return i.ignore_case&&(t=null!==(s=null===(n=null==t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t))&&void 0!==s?s:t,e=null!==(r=null===(o=null==e?void 0:e.toLowerCase)||void 0===o?void 0:o.call(e))&&void 0!==r?r:e),i.numeric&&(isNaN(parseFloat(t))&&isNaN(parseFloat(e))||(t=isNaN(parseFloat(t))?void 0:parseFloat(t),e=isNaN(parseFloat(e))?void 0:parseFloat(e))),void 0===t&&void 0===e?0:void 0===t?a:void 0===e?l:i.numeric?t===e?0:(i.reverse?-1:1)*(t0,domain:(t,e,i)=>{var n,s;return $t(null===(n=null==t?void 0:t.entity_id)||void 0===n?void 0:n.split(".")[0],null===(s=null==e?void 0:e.entity_id)||void 0===s?void 0:s.split(".")[0],i)},entity_id:(t,e,i)=>$t(null==t?void 0:t.entity_id,null==e?void 0:e.entity_id,i),friendly_name:(t,e,i)=>{var n,s,o,r;return $t((null===(n=null==t?void 0:t.attributes)||void 0===n?void 0:n.friendly_name)||(null===(s=null==t?void 0:t.entity_id)||void 0===s?void 0:s.split(".")[1]),(null===(o=null==e?void 0:e.attributes)||void 0===o?void 0:o.friendly_name)||(null===(r=null==e?void 0:e.entity_id)||void 0===r?void 0:r.split(".")[1]),i)},name:(t,e,i)=>{var n,s,o,r;return $t((null===(n=null==t?void 0:t.attributes)||void 0===n?void 0:n.friendly_name)||(null===(s=null==t?void 0:t.entity_id)||void 0===s?void 0:s.split(".")[1]),(null===(o=null==e?void 0:e.attributes)||void 0===o?void 0:o.friendly_name)||(null===(r=null==e?void 0:e.entity_id)||void 0===r?void 0:r.split(".")[1]),i)},state:(t,e,i)=>$t(null==t?void 0:t.state,null==e?void 0:e.state,i),attribute:(t,e,i)=>{var n;const[s,o]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];let r=null==t?void 0:t.attributes,a=null==e?void 0:e.attributes;for(const t of null===(n=null==i?void 0:i.attribute)||void 0===n?void 0:n.split(":")){if(void 0===r&&void 0===a)return 0;if(void 0===r)return s;if(void 0===a)return o;[r,a]=[r[t],a[t]]}return $t(r,a,i)},last_changed:(t,e,i)=>{const[n,s]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];return null==(null==t?void 0:t.last_changed)&&null==(null==e?void 0:e.last_changed)?0:null==(null==t?void 0:t.last_changed)?n:null==(null==e?void 0:e.last_changed)?s:(i.numeric=!0,$t(new Date(null==t?void 0:t.last_changed).getTime(),new Date(null==e?void 0:e.last_changed).getTime(),i))},last_updated:(t,e,i)=>{const[n,s]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];return null==(null==t?void 0:t.last_updated)&&null==(null==e?void 0:e.last_updated)?0:null==(null==t?void 0:t.last_updated)?n:null==(null==e?void 0:e.last_updated)?s:(i.numeric=!0,$t(new Date(null==t?void 0:t.last_updated).getTime(),new Date(null==e?void 0:e.last_updated).getTime(),i))},last_triggered:(t,e,i)=>{var n,s,o,r,a,l;const[c,d]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];return null==(null===(n=null==t?void 0:t.attributes)||void 0===n?void 0:n.last_triggered)&&null==(null===(s=null==e?void 0:e.attributes)||void 0===s?void 0:s.last_triggered)?0:null==(null===(o=null==t?void 0:t.attributes)||void 0===o?void 0:o.last_triggered)?c:null==(null===(r=null==e?void 0:e.attributes)||void 0===r?void 0:r.last_triggered)?d:(i.numeric=!0,$t(new Date(null===(a=null==t?void 0:t.attributes)||void 0===a?void 0:a.last_triggered).getTime(),new Date(null===(l=null==e?void 0:e.attributes)||void 0===l?void 0:l.last_triggered).getTime(),i))}};function Et(t,e){return function(i,n){var s,o;return null!==(o=null===(s=wt[e.method])||void 0===s?void 0:s.call(wt,t.states[i.entity],t.states[n.entity],e))&&void 0!==o?o:0}}var At="1.11.0";const Ct=(t,e)=>{if(t===e)return!0;if(typeof t!=typeof e)return!1;if(!(t instanceof Object&&e instanceof Object))return!1;for(const i in t)if(t.hasOwnProperty(i)){if(!e.hasOwnProperty(i))return!1;if(t[i]!==e[i]){if("object"!=typeof t[i])return!1;if(!Ct(t[i],e[i]))return!1}}for(const i in e)if(e.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0},St=["none","domain","entity_id","state","name","group","area","device","device_manufacturer","device_model","attributes","last_changed","last_updated","last_triggered","entity_category","integration"],Ot={type:"select",options:[["domain","Entity Domain"],["entity_id","Entity ID"],["state","Entity State"],["name","Friendly Name"],["group","Member of Group"],["area","In area"],["device","Device"],["device_manufacturer","Device Manufacturer"],["device_model","Device Model"],["attributes","Attribute"],["last_changed","Last Change"],["last_updated","Last Update"],["last_triggered","Last Trigger"],["entity_category","Entity Category"],["integration","Governing integration"]]},jt=([t,e],i)=>{var n;return St.includes(t)?{type:"grid",name:"",schema:[Object.assign(Object.assign({},Ot),{name:`key_${i}`,label:"Property"}),{name:`value_${i}`,selector:null!==(n={attributes:{object:{}}}[t])&&void 0!==n?n:{text:{}},label:"Value"}]}:{type:"Constant",name:"Some filters are not shown",value:"Please switch to the CODE EDITOR to access all options."}},Tt=[{name:"options",selector:{object:{}}}],xt=[{name:"data",selector:{object:{}}}],kt=[{name:"method",label:"Sort method",type:"select",options:[["domain","Entity Domain"],["entity_id","Entity ID"],["friendly_name","Friendly Name"],["state","Entity State"],["last_changed","Last Change"],["last_updated","Last Update"],["last_triggered","Last Trigger"]]},{type:"constant",name:"Sorting options:",value:""},{type:"grid",name:"",schema:[{name:"reverse",type:"boolean",label:"Reverse"},{name:"ignore_case",type:"boolean",label:"Ignore case"},{name:"numeric",type:"boolean",label:"Numeric sort"}]}],Ut=[{type:"grid",name:"",schema:[{name:"show_empty",type:"boolean",label:"Show if empty"},{name:"card_param",type:"string",label:"Parameter to populate"}]}];class Pt extends Y{constructor(){super(...arguments),this._selectedTab=0,this._cardGUIMode=!0,this._cardGUIModeAvailable=!0}setConfig(t){this._config=t}connectedCallback(){super.connectedCallback(),(async()=>{var t,e;if(customElements.get("ha-form"))return;const i=await(null===(e=(t=window).loadCardHelpers)||void 0===e?void 0:e.call(t));if(!i)return;const n=await i.createCardElement({type:"entity"});n&&await n.getConfigElement()})()}_handleSwitchTab(t){this._selectedTab=parseInt(t.detail.index,10)}_addFilterGroup(){var t;if(!this._config)return;const e=[...null===(t=this._config.filter)||void 0===t?void 0:t.include];e.push({});const i=Object.assign(Object.assign({},this._config.filter),{include:e});this._config=Object.assign(Object.assign({},this._config),{filter:i}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_deleteFilterGroup(t){var e;if(!this._config)return;const i=[...null===(e=this._config.filter)||void 0===e?void 0:e.include];i.splice(t,1);const n=Object.assign(Object.assign({},this._config.filter),{include:i});this._config=Object.assign(Object.assign({},this._config),{filter:n}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_moveFilterGroup(t,e){var i;if(!this._config)return;const n=[...null===(i=this._config.filter)||void 0===i?void 0:i.include];[n[t],n[t+e]]=[n[t+e],n[t]];const s=Object.assign(Object.assign({},this._config.filter),{include:n});this._config=Object.assign(Object.assign({},this._config),{filter:s}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_addSpecialEntry(){var t;if(!this._config)return;const e=[...null===(t=this._config.filter)||void 0===t?void 0:t.include];e.push({type:""});const i=Object.assign(Object.assign({},this._config.filter),{include:e});this._config=Object.assign(Object.assign({},this._config),{filter:i}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}async _changeSpecialEntry(t,e){var i,n,s,o;if(!this._config)return;const r=null!==(n=Object.assign({},null===(i=e.detail.value)||void 0===i?void 0:i.data))&&void 0!==n?n:{type:""};r.type=null!==(s=r.type)&&void 0!==s?s:"";const a=[...null===(o=this._config.filter)||void 0===o?void 0:o.include];a[t]=r;const l=Object.assign(Object.assign({},this._config.filter),{include:a});this._config=Object.assign(Object.assign({},this._config),{filter:l}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}async _changeGroupOptions(t,e){var i;if(!this._config)return;const n=e.detail.value,s=[...null===(i=this._config.filter)||void 0===i?void 0:i.include];s[t]=Object.assign({},n);const o=Object.assign(Object.assign({},this._config.filter),{include:s});this._config=Object.assign(Object.assign({},this._config),{filter:o}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeFilter(t,e){var i;if(!this._config)return;const n=((t,e)=>{var i;const n={};for(let s=0;s<=t.filter.include.length+1;s++)void 0!==e[`key_${s}`]&&(n[e[`key_${s}`]]=null!==(i=e[`value_${s}`])&&void 0!==i?i:"");return void 0!==e.key_new&&(n[e.key_new]=""),n})(this._config,e.detail.value),s=[...null===(i=this._config.filter)||void 0===i?void 0:i.include];s[t]=Object.assign(Object.assign({},n),{options:s[t].options}),this._config.filter=Object.assign(Object.assign({},this._config.filter),{include:s}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeSortOptions(t){if(!this._config)return;const e=t.detail.value;this._config=Object.assign(Object.assign({},this._config),{sort:e}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeCardOptions(t){if(!this._config)return;const e=t.detail.value;this._config=Object.assign(Object.assign({},this._config),e),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_showEmptyToggle(){if(!this._config)return;const t=!1===this._config.show_empty;this._config=Object.assign(Object.assign({},this._config),{show_empty:t}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeCardParam(t){if(!this._config)return;const e=""===t.target.value||"entities"===t.target.value?void 0:t.target.value;this._config=Object.assign(Object.assign({},this._config),{card_param:e}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_getCardConfig(){const t=Object.assign({},this._config.card);return t[this._config.card_param||"entities"]=[],t}_handleCardConfigChanged(t){if(t.stopPropagation(),!this._config)return;const e=Object.assign({},t.detail.config);delete e[this._config.card_param||"entities"],this._config=Object.assign(Object.assign({},this._config),{card:e}),this._cardGUIModeAvailable=t.detail.guiModeAvailable,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_deleteCard(t){this._config&&(this._config=Object.assign({},this._config),delete this._config.card,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}})))}_toggleCardMode(t){var e;null===(e=this._cardEditorEl)||void 0===e||e.toggleMode()}_cardGUIModeChanged(t){t.stopPropagation(),this._cardGUIMode=t.detail.guiMode,this._cardGUIModeAvailable=t.detail.guiModeAvailable}render(){return this.hass&&this._config?U`
+function t(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,i,r):s(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}const e=window,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),s=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&s.set(e,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new o(i,t,n)},a=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,n))(e)})(t):t;var l;const d=window,c=d.trustedTypes,h=c?c.emptyScript:"",u=d.reactiveElementPolyfillSupport,v={toAttribute(t,e){switch(e){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,e)=>e!==t&&(e==e||t==t),p={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:f};let g=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=p){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const s=this[t];this[e]=n,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const n=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,n)=>{i?t.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((i=>{const n=document.createElement("style"),s=e.litNonce;void 0!==s&&n.setAttribute("nonce",s),n.textContent=i.cssText,t.appendChild(n)}))})(n,this.constructor.elementStyles),n}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=p){var n;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:v).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,s=n._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=n.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:v;this._$El=s,this[s]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};var _;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(l=d.reactiveElementVersions)&&void 0!==l?l:d.reactiveElementVersions=[]).push("1.5.0");const m=window,y=m.trustedTypes,b=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,E=`<${w}>`,A=document,C=(t="")=>A.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,x=/>/g,T=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),U=/'/g,P=/"/g,M=/^(?:script|style|textarea|title)$/i,N=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),I=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),H=new WeakMap,D=A.createTreeWalker(A,129,null,!1),F=(t,e)=>{const i=t.length-1,n=[];let s,o=2===e?"":"",r=j;for(let e=0;e"===l[0]?(r=null!=s?s:j,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?T:'"'===l[3]?P:U):r===P||r===U?r=T:r===k||r===x?r=j:(r=T,s=void 0);const h=r===T&&t[e+1].startsWith("/>")?" ":"";o+=r===j?i+E:d>=0?(n.push(a),i.slice(0,d)+"$lit$"+i.slice(d)+$+h):i+$+(-2===d?(n.push(void 0),e):h)}const a=o+(t[i]||">")+(2===e?" ":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(a):a,n]};class L{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,o=0;const r=t.length-1,a=this.parts,[l,d]=F(t,e);if(this.el=L.createElement(l,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=D.nextNode())&&a.length0){n.textContent=y?y.emptyScript:"";for(let i=0;iO(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==R&&S(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=L.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new G(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new L(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new z(this.O(C()),this.O(C()),this,this.options)):i=e[n],i._$AI(s),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let o=!1;if(void 0===s)t=W(this,t,e,0),o=!S(t)||t!==this._$AH&&t!==I,o&&(this._$AH=t);else{const n=t;let r,a;for(t=s[0],r=0;r{var n,s;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let r=o._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;o._$litPart$=r=new z(e.insertBefore(C(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return I}}tt.finalized=!0,tt._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:tt});const et=globalThis.litElementPolyfillSupport;null==et||et({LitElement:tt}),(null!==(X=globalThis.litElementVersions)&&void 0!==X?X:globalThis.litElementVersions=[]).push("3.2.2");const it=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function nt(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):it(t,e)}function st(t){return nt({...t,state:!0})}var ot;function rt(){return document.querySelector("hc-main")?document.querySelector("hc-main").hass:document.querySelector("home-assistant")?document.querySelector("home-assistant").hass:void 0}null===(ot=window.HTMLSlotElement)||void 0===ot||ot.prototype.assignedElements;const at="lovelace-player-device-id";function lt(){if(!localStorage[at]){const t=()=>Math.floor(1e5*(1+Math.random())).toString(16).substring(1);window.fully&&"function"==typeof fully.getDeviceId?localStorage[at]=fully.getDeviceId():localStorage[at]=`${t()}${t()}-${t()}${t()}`}return localStorage[at]}let dt=lt();const ct=new URLSearchParams(window.location.search);var ht;function ut(t){return!!String(t).includes("{%")||(!!String(t).includes("{{")||void 0)}ct.get("deviceID")&&null!==(ht=ct.get("deviceID"))&&("clear"===ht?localStorage.removeItem(at):localStorage[at]=ht,dt=lt()),window.cardMod_template_cache=window.cardMod_template_cache||{};const vt=window.cardMod_template_cache;async function ft(t,e,i){const n=rt().connection,s=JSON.stringify([e,i]);let o=vt[s];o?(o.callbacks.has(t)||pt(t),t(o.value),o.callbacks.add(t)):(pt(t),t(""),i=Object.assign({user:rt().user.name,browser:dt,hash:location.hash.substr(1)||""},i),vt[s]=o={template:e,variables:i,value:"",callbacks:new Set([t]),unsubscribe:n.subscribeMessage((t=>function(t,e){const i=vt[t];i&&(i.value=e.result,i.callbacks.forEach((t=>t(e.result))))}(s,t)),{type:"render_template",template:e,variables:i})})}async function pt(t){let e;for(const[i,n]of Object.entries(vt))if(n.callbacks.has(t)){n.callbacks.delete(t),0==n.callbacks.size&&(e=n.unsubscribe,delete vt[i]);break}e&&await(await e)()}var gt;const _t=(t,e)=>{if(t===e)return!0;if(typeof t!=typeof e)return!1;if(!(t instanceof Object&&e instanceof Object))return!1;for(const i in t)if(t.hasOwnProperty(i)){if(!e.hasOwnProperty(i))return!1;if(t[i]!==e[i]){if("object"!=typeof t[i])return!1;if(!_t(t[i],e[i]))return!1}}for(const i in e)if(e.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0};window.autoEntities_cache=null!==(gt=window.autoEntities_cache)&&void 0!==gt?gt:{};const mt=window.autoEntities_cache;async function yt(t){var e;return mt.areas=null!==(e=mt.areas)&&void 0!==e?e:await t.callWS({type:"config/area_registry/list"}),mt.areas}function bt(){return mt.areas}async function $t(t){var e;return mt.devices=null!==(e=mt.devices)&&void 0!==e?e:await t.callWS({type:"config/device_registry/list"}),mt.devices}function wt(){return mt.devices}async function Et(t){var e;return mt.entities=null!==(e=mt.entities)&&void 0!==e?e:await t.callWS({type:"config/entity_registry/list"}),mt.entities}function At(){return mt.entities}const Ct=/([mhd])\s+ago\s*$/i,St="m ago";function Ot(t,e){if("string"==typeof t&&t.startsWith("$$")&&(t=t.substring(2),e=JSON.stringify(e)),"string"==typeof e&&"string"==typeof t&&(t.startsWith("/")&&t.endsWith("/")||-1!==t.indexOf("*"))){return t.startsWith("/")||(t=`/^${t=t.replace(/\./g,".").replace(/\*/g,".*")}$/`),new RegExp(t.slice(1,-1)).test(e)}if("string"==typeof t){const i=Ct.exec(t);if(i){t=t.replace(i[0],"");e=((new Date).getTime()-new Date(e).getTime())/6e4;const n=i[1];"h"===n?e/=60:"d"===n&&(e=e/60/24)}}if("string"==typeof t){if(t.startsWith("<="))return parseFloat(e)<=parseFloat(t.substring(2));if(t.startsWith(">="))return parseFloat(e)>=parseFloat(t.substring(2));if(t.startsWith("<"))return parseFloat(e)"))return parseFloat(e)>parseFloat(t.substring(1));if(t.startsWith("!"))return parseFloat(e)!=parseFloat(t.substring(1));if(t.startsWith("="))return parseFloat(e)==parseFloat(t.substring(1))}return t===e}const jt={options:async()=>!0,sort:async()=>!0,domain:async(t,e,i)=>Ot(e,i.entity_id.split(".")[0]),entity_id:async(t,e,i)=>Ot(e,i.entity_id),state:async(t,e,i)=>Ot(e,i.state),name:async(t,e,i)=>{var n;return Ot(e,null===(n=i.attributes)||void 0===n?void 0:n.friendly_name)},group:async(t,e,i)=>{var n,s,o;return null===(o=null===(s=null===(n=t.states[e])||void 0===n?void 0:n.attributes)||void 0===s?void 0:s.entity_id)||void 0===o?void 0:o.includes(i.entity_id)},attributes:async(t,e,i)=>{for(const[t,n]of Object.entries(e)){let e=t.split(" ")[0],s=i.attributes;for(const t of e.split(":"))s=s?s[t]:void 0;if(void 0===s||!Ot(n,s))return!1}return!0},not:async(t,e,i)=>!await kt(t,e,i.entity_id),and:async(t,e,i)=>{for(const n of e)if(!await kt(t,n,i.entity_id))return!1;return!0},or:async(t,e,i)=>{for(const n of e)if(await kt(t,n,i.entity_id))return!0;return!1},device:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;const s=(await $t(t)).find((t=>t.id===n.device_id));return!!s&&(Ot(e,s.name_by_user)||Ot(e,s.name))},device_manufacturer:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;const s=(await $t(t)).find((t=>t.id===n.device_id));return!!s&&Ot(e,s.manufacturer)},device_model:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;const s=(await $t(t)).find((t=>t.id===n.device_id));return!!s&&Ot(e,s.model)},area:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));if(!n)return!1;let s=(await yt(t)).find((t=>t.area_id===n.area_id));if(s)return Ot(e,s.name)||Ot(e,s.area_id);const o=(await $t(t)).find((t=>t.id===n.device_id));return!!o&&(s=(await yt(t)).find((t=>t.area_id===o.area_id)),!!s&&(Ot(e,s.name)||Ot(e,s.area_id)))},entity_category:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));return!!n&&Ot(e,n.entity_category)},last_changed:async(t,e,i)=>(Ct.test(e)||(e+=St),Ot(e,i.last_changed)),last_updated:async(t,e,i)=>(Ct.test(e)||(e+=St),Ot(e,i.last_updated)),last_triggered:async(t,e,i)=>null!=i.attributes.last_triggered&&(Ct.test(e)||(e+=St),Ot(e,i.attributes.last_triggered)),integration:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));return!!n&&Ot(e,n.platform)},hidden_by:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id));return!!n&&Ot(e,n.hidden_by)},label:async(t,e,i)=>{const n=(await Et(t)).find((t=>t.entity_id===i.entity_id)),s=await async function(t){var e;return mt.labels=null!==(e=mt.labels)&&void 0!==e?e:await t.callWS({type:"config/label_registry/list"}),mt.labels}(t),o=(t,e)=>{if(Ot(t,e))return!0;const i=s.find((t=>t.label_id===e));if(!i)return!1;return Ot(t,i.name)};if(!n)return!1;if(!n.labels)return!1;const r=n.labels.some((t=>o(e,t)));if(r)return r;const a=(await $t(t)).find((t=>t.id===n.device_id));if(!a)return!1;return a.labels.some((t=>o(e,t)))}};async function kt(t,e,i){var n;if(!t.states[i])return!1;for(let[s,o]of Object.entries(e))if(s=s.trim().split(" ")[0].trim(),!await(null===(n=jt[s])||void 0===n?void 0:n.call(jt,t,o,t.states[i])))return!1;return!0}function xt(t,e,i){var n,s,o,r;const[a,l]=i.reverse?[-1,1]:[1,-1];return i.ignore_case&&(t=null!==(s=null===(n=null==t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t))&&void 0!==s?s:t,e=null!==(r=null===(o=null==e?void 0:e.toLowerCase)||void 0===o?void 0:o.call(e))&&void 0!==r?r:e),i.numeric&&(isNaN(parseFloat(t))&&isNaN(parseFloat(e))||(t=isNaN(parseFloat(t))?void 0:parseFloat(t),e=isNaN(parseFloat(e))?void 0:parseFloat(e))),void 0===t&&void 0===e?0:void 0===t?a:void 0===e?l:i.numeric?t===e?0:(i.reverse?-1:1)*(t0,domain:(t,e,i)=>{var n,s;return xt(null===(n=null==t?void 0:t.entity_id)||void 0===n?void 0:n.split(".")[0],null===(s=null==e?void 0:e.entity_id)||void 0===s?void 0:s.split(".")[0],i)},entity_id:(t,e,i)=>xt(null==t?void 0:t.entity_id,null==e?void 0:e.entity_id,i),friendly_name:(t,e,i)=>{var n,s,o,r;return xt((null===(n=null==t?void 0:t.attributes)||void 0===n?void 0:n.friendly_name)||(null===(s=null==t?void 0:t.entity_id)||void 0===s?void 0:s.split(".")[1]),(null===(o=null==e?void 0:e.attributes)||void 0===o?void 0:o.friendly_name)||(null===(r=null==e?void 0:e.entity_id)||void 0===r?void 0:r.split(".")[1]),i)},name:(t,e,i)=>{var n,s,o,r;return xt((null===(n=null==t?void 0:t.attributes)||void 0===n?void 0:n.friendly_name)||(null===(s=null==t?void 0:t.entity_id)||void 0===s?void 0:s.split(".")[1]),(null===(o=null==e?void 0:e.attributes)||void 0===o?void 0:o.friendly_name)||(null===(r=null==e?void 0:e.entity_id)||void 0===r?void 0:r.split(".")[1]),i)},device:(t,e,i)=>{var n,s;const o=At().find((e=>e.entity_id===t.entity_id)),r=At().find((t=>t.entity_id===e.entity_id));if(!o||!r)return 0;const a=wt().find((t=>t.id===o.device_id)),l=wt().find((t=>t.id===r.device_id));return a&&l?xt(null!==(n=a.name_by_user)&&void 0!==n?n:a.name,null!==(s=l.name_by_user)&&void 0!==s?s:l.name,i):0},area:(t,e,i)=>{const n=At().find((e=>e.entity_id===t.entity_id)),s=At().find((t=>t.entity_id===e.entity_id));if(!n||!s)return 0;const o=wt().find((t=>t.id===n.device_id)),r=wt().find((t=>t.id===s.device_id));if(!o||!r)return 0;const a=bt().find((t=>t.area_id===o.area_id)),l=bt().find((t=>t.area_id===r.area_id));return a&&l?xt(a.name,l.name,i):0},state:(t,e,i)=>xt(null==t?void 0:t.state,null==e?void 0:e.state,i),attribute:(t,e,i)=>{var n;const[s,o]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];let r=null==t?void 0:t.attributes,a=null==e?void 0:e.attributes;for(const t of null===(n=null==i?void 0:i.attribute)||void 0===n?void 0:n.split(":")){if(void 0===r&&void 0===a)return 0;if(void 0===r)return s;if(void 0===a)return o;[r,a]=[r[t],a[t]]}return xt(r,a,i)},last_changed:(t,e,i)=>{const[n,s]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];return null==(null==t?void 0:t.last_changed)&&null==(null==e?void 0:e.last_changed)?0:null==(null==t?void 0:t.last_changed)?n:null==(null==e?void 0:e.last_changed)?s:(i.numeric=!0,xt(new Date(null==t?void 0:t.last_changed).getTime(),new Date(null==e?void 0:e.last_changed).getTime(),i))},last_updated:(t,e,i)=>{const[n,s]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];return null==(null==t?void 0:t.last_updated)&&null==(null==e?void 0:e.last_updated)?0:null==(null==t?void 0:t.last_updated)?n:null==(null==e?void 0:e.last_updated)?s:(i.numeric=!0,xt(new Date(null==t?void 0:t.last_updated).getTime(),new Date(null==e?void 0:e.last_updated).getTime(),i))},last_triggered:(t,e,i)=>{var n,s,o,r,a,l;const[d,c]=(null==i?void 0:i.reverse)?[-1,1]:[1,-1];return null==(null===(n=null==t?void 0:t.attributes)||void 0===n?void 0:n.last_triggered)&&null==(null===(s=null==e?void 0:e.attributes)||void 0===s?void 0:s.last_triggered)?0:null==(null===(o=null==t?void 0:t.attributes)||void 0===o?void 0:o.last_triggered)?d:null==(null===(r=null==e?void 0:e.attributes)||void 0===r?void 0:r.last_triggered)?c:(i.numeric=!0,xt(new Date(null===(a=null==t?void 0:t.attributes)||void 0===a?void 0:a.last_triggered).getTime(),new Date(null===(l=null==e?void 0:e.attributes)||void 0===l?void 0:l.last_triggered).getTime(),i))}};function Ut(t,e){return function(i,n){var s,o;return null!==(o=null===(s=Tt[e.method])||void 0===s?void 0:s.call(Tt,t.states[i.entity],t.states[n.entity],e))&&void 0!==o?o:0}}var Pt="1.13.0";const Mt=["none","domain","entity_id","state","name","group","area","device","device_manufacturer","device_model","attributes","last_changed","last_updated","last_triggered","entity_category","integration","hidden_by","label"],Nt={type:"select",options:[["domain","Entity Domain"],["entity_id","Entity ID"],["state","Entity State"],["name","Friendly Name"],["group","Member of Group"],["area","In area"],["device","Device"],["label","Label"],["device_manufacturer","Device Manufacturer"],["device_model","Device Model"],["attributes","Attribute"],["last_changed","Last Change"],["last_updated","Last Update"],["last_triggered","Last Trigger"],["entity_category","Entity Category"],["integration","Governing integration"],["hidden_by","Hidden by"]]},It=([t,e],i)=>{var n;return Mt.includes(t)?{type:"grid",name:"",schema:[Object.assign(Object.assign({},Nt),{name:`key_${i}`,label:"Property"}),{name:`value_${i}`,selector:null!==(n={attributes:{object:{}}}[t])&&void 0!==n?n:{text:{}},label:"Value"}]}:{type:"Constant",name:"Some filters are not shown",value:"Please switch to the CODE EDITOR to access all options."}},Rt=[{name:"options",selector:{object:{}}}],Ht=[{name:"data",selector:{object:{}}}],Dt=[{name:"method",label:"Sort method",type:"select",options:[["domain","Entity Domain"],["entity_id","Entity ID"],["friendly_name","Friendly Name"],["state","Entity State"],["last_changed","Last Change"],["last_updated","Last Update"],["last_triggered","Last Trigger"]]},{type:"constant",name:"Sorting options:",value:""},{type:"grid",name:"",schema:[{name:"reverse",type:"boolean",label:"Reverse"},{name:"ignore_case",type:"boolean",label:"Ignore case"},{name:"numeric",type:"boolean",label:"Numeric sort"},{name:"ip",type:"boolean",label:"IP address short"}]}],Ft=[{type:"grid",name:"",schema:[{name:"show_empty",type:"boolean",label:"Show if empty"},{name:"card_param",type:"string",label:"Parameter to populate"}]}];class Lt extends tt{constructor(){super(...arguments),this._selectedTab=0,this._cardGUIMode=!0,this._cardGUIModeAvailable=!0}setConfig(t){this._config=t}connectedCallback(){super.connectedCallback(),(async()=>{var t,e;if(customElements.get("ha-form"))return;const i=await(null===(e=(t=window).loadCardHelpers)||void 0===e?void 0:e.call(t));if(!i)return;const n=await i.createCardElement({type:"entity"});n&&await n.getConfigElement()})()}_handleSwitchTab(t){this._selectedTab=parseInt(t.detail.index,10)}_addFilterGroup(){var t;if(!this._config)return;const e=[...null===(t=this._config.filter)||void 0===t?void 0:t.include];e.push({});const i=Object.assign(Object.assign({},this._config.filter),{include:e});this._config=Object.assign(Object.assign({},this._config),{filter:i}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_deleteFilterGroup(t){var e;if(!this._config)return;const i=[...null===(e=this._config.filter)||void 0===e?void 0:e.include];i.splice(t,1);const n=Object.assign(Object.assign({},this._config.filter),{include:i});this._config=Object.assign(Object.assign({},this._config),{filter:n}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_moveFilterGroup(t,e){var i;if(!this._config)return;const n=[...null===(i=this._config.filter)||void 0===i?void 0:i.include];[n[t],n[t+e]]=[n[t+e],n[t]];const s=Object.assign(Object.assign({},this._config.filter),{include:n});this._config=Object.assign(Object.assign({},this._config),{filter:s}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_addSpecialEntry(){var t;if(!this._config)return;const e=[...null===(t=this._config.filter)||void 0===t?void 0:t.include];e.push({type:""});const i=Object.assign(Object.assign({},this._config.filter),{include:e});this._config=Object.assign(Object.assign({},this._config),{filter:i}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}async _changeSpecialEntry(t,e){var i,n,s,o;if(!this._config)return;const r=null!==(n=Object.assign({},null===(i=e.detail.value)||void 0===i?void 0:i.data))&&void 0!==n?n:{type:""};r.type=null!==(s=r.type)&&void 0!==s?s:"";const a=[...null===(o=this._config.filter)||void 0===o?void 0:o.include];a[t]=r;const l=Object.assign(Object.assign({},this._config.filter),{include:a});this._config=Object.assign(Object.assign({},this._config),{filter:l}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}async _changeGroupOptions(t,e){var i;if(!this._config)return;const n=e.detail.value,s=[...null===(i=this._config.filter)||void 0===i?void 0:i.include];s[t]=Object.assign({},n);const o=Object.assign(Object.assign({},this._config.filter),{include:s});this._config=Object.assign(Object.assign({},this._config),{filter:o}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeFilter(t,e){var i;if(!this._config)return;const n=((t,e)=>{var i;const n={};for(let s=0;s<=t.filter.include.length+1;s++)void 0!==e[`key_${s}`]&&(n[e[`key_${s}`]]=null!==(i=e[`value_${s}`])&&void 0!==i?i:"");return void 0!==e.key_new&&(n[e.key_new]=""),n})(this._config,e.detail.value),s=[...null===(i=this._config.filter)||void 0===i?void 0:i.include];s[t]=Object.assign(Object.assign({},n),{options:s[t].options}),this._config.filter=Object.assign(Object.assign({},this._config.filter),{include:s}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeSortOptions(t){if(!this._config)return;const e=t.detail.value;this._config=Object.assign(Object.assign({},this._config),{sort:e}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeCardOptions(t){if(!this._config)return;const e=t.detail.value;this._config=Object.assign(Object.assign({},this._config),e),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_showEmptyToggle(){if(!this._config)return;const t=!1===this._config.show_empty;this._config=Object.assign(Object.assign({},this._config),{show_empty:t}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_changeCardParam(t){if(!this._config)return;const e=""===t.target.value||"entities"===t.target.value?void 0:t.target.value;this._config=Object.assign(Object.assign({},this._config),{card_param:e}),this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_getCardConfig(){const t=Object.assign({},this._config.card);return t[this._config.card_param||"entities"]=[],t}_handleCardConfigChanged(t){if(t.stopPropagation(),!this._config)return;const e=Object.assign({},t.detail.config);delete e[this._config.card_param||"entities"],this._config=Object.assign(Object.assign({},this._config),{card:e}),this._cardGUIModeAvailable=t.detail.guiModeAvailable,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}}))}_deleteCard(t){this._config&&(this._config=Object.assign({},this._config),delete this._config.card,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:this._config}})))}_toggleCardMode(t){var e;null===(e=this._cardEditorEl)||void 0===e||e.toggleMode()}_cardGUIModeChanged(t){t.stopPropagation(),this._cardGUIMode=t.detail.guiMode,this._cardGUIModeAvailable=t.detail.guiModeAvailable}render(){return this.hass&&this._config?N`