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 ? "