diff --git a/honeycomb-menu.js b/honeycomb-menu.js index 4e34c59..3273807 100644 --- a/honeycomb-menu.js +++ b/honeycomb-menu.js @@ -1,35 +1,27 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){(function(t,r){var i; -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var o="Expected a function",u="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",h="[object Error]",d="[object Function]",v="[object GeneratorFunction]",p="[object Map]",_="[object Number]",g="[object Object]",y="[object RegExp]",m="[object Set]",b="[object String]",w="[object Symbol]",$="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",S="[object Float32Array]",E="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",C="[object Int32Array]",O="[object Uint8Array]",z="[object Uint16Array]",R="[object Uint32Array]",P=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,T=/[&<>"']/g,N=RegExp(L.source),B=RegExp(T.source),D=/<%-([\s\S]+?)%>/g,M=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/[\\^$.*+?()[\]{}|]/g,F=RegExp(V.source),X=/^\s+|\s+$/g,Z=/^\s+/,K=/\s+$/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,G=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,ut=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,st=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,ht="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vt="[\\ud800-\\udfff]",pt="["+dt+"]",_t="["+ht+"]",gt="\\d+",yt="[\\u2700-\\u27bf]",mt="[a-z\\xdf-\\xf6\\xf8-\\xff]",bt="[^\\ud800-\\udfff"+dt+gt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",wt="\\ud83c[\\udffb-\\udfff]",$t="[^\\ud800-\\udfff]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Et="(?:"+mt+"|"+bt+")",jt="(?:"+St+"|"+bt+")",kt="(?:"+_t+"|"+wt+")"+"?",Ct="[\\ufe0e\\ufe0f]?"+kt+("(?:\\u200d(?:"+[$t,xt,At].join("|")+")[\\ufe0e\\ufe0f]?"+kt+")*"),Ot="(?:"+[yt,xt,At].join("|")+")"+Ct,zt="(?:"+[$t+_t+"?",_t,xt,At,vt].join("|")+")",Rt=RegExp("['’]","g"),Pt=RegExp(_t,"g"),It=RegExp(wt+"(?="+wt+")|"+zt+Ct,"g"),Ut=RegExp([St+"?"+mt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[pt,St,"$"].join("|")+")",jt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[pt,St+Et,"$"].join("|")+")",St+"?"+Et+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gt,Ot].join("|"),"g"),Lt=RegExp("[\\u200d\\ud800-\\udfff"+ht+"\\ufe0e\\ufe0f]"),Tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bt=-1,Dt={};Dt[S]=Dt[E]=Dt[j]=Dt[k]=Dt[C]=Dt[O]=Dt["[object Uint8ClampedArray]"]=Dt[z]=Dt[R]=!0,Dt[s]=Dt[c]=Dt[x]=Dt[l]=Dt[A]=Dt[f]=Dt[h]=Dt[d]=Dt[p]=Dt[_]=Dt[g]=Dt[y]=Dt[m]=Dt[b]=Dt[$]=!1;var Mt={};Mt[s]=Mt[c]=Mt[x]=Mt[A]=Mt[l]=Mt[f]=Mt[S]=Mt[E]=Mt[j]=Mt[k]=Mt[C]=Mt[p]=Mt[_]=Mt[g]=Mt[y]=Mt[m]=Mt[b]=Mt[w]=Mt[O]=Mt["[object Uint8ClampedArray]"]=Mt[z]=Mt[R]=!0,Mt[h]=Mt[d]=Mt[$]=!1;var Wt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ht=parseFloat,qt=parseInt,Yt="object"==typeof t&&t&&t.Object===Object&&t,Vt="object"==typeof self&&self&&self.Object===Object&&self,Ft=Yt||Vt||Function("return this")(),Xt=e&&!e.nodeType&&e,Zt=Xt&&"object"==typeof r&&r&&!r.nodeType&&r,Kt=Zt&&Zt.exports===Xt,Jt=Kt&&Yt.process,Gt=function(){try{var t=Zt&&Zt.require&&Zt.require("util").types;return t||Jt&&Jt.binding&&Jt.binding("util")}catch(t){}}(),Qt=Gt&&Gt.isArrayBuffer,te=Gt&&Gt.isDate,ee=Gt&&Gt.isMap,ne=Gt&&Gt.isRegExp,re=Gt&&Gt.isSet,ie=Gt&&Gt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ue(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function he(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function Ie(t,e){for(var n=t.length;n--&&we(e,t[n],0)>-1;);return n}function Ue(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Le=Ee({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Te=Ee({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ne(t){return"\\"+Wt[t]}function Be(t){return Lt.test(t)}function De(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Me(t,e){return function(n){return t(e(n))}}function We(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var Xe=function t(e){var n,r=(e=null==e?Ft:Xe.defaults(Ft.Object(),e,Xe.pick(Ft,Nt))).Array,i=e.Date,ht=e.Error,dt=e.Function,vt=e.Math,pt=e.Object,_t=e.RegExp,gt=e.String,yt=e.TypeError,mt=r.prototype,bt=dt.prototype,wt=pt.prototype,$t=e["__core-js_shared__"],xt=bt.toString,At=wt.hasOwnProperty,St=0,Et=(n=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",jt=wt.toString,kt=xt.call(pt),Ct=Ft._,Ot=_t("^"+xt.call(At).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=Kt?e.Buffer:void 0,It=e.Symbol,Lt=e.Uint8Array,Wt=zt?zt.allocUnsafe:void 0,Yt=Me(pt.getPrototypeOf,pt),Vt=pt.create,Xt=wt.propertyIsEnumerable,Zt=mt.splice,Jt=It?It.isConcatSpreadable:void 0,Gt=It?It.iterator:void 0,ye=It?It.toStringTag:void 0,Ee=function(){try{var t=Qi(pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ze=e.clearTimeout!==Ft.clearTimeout&&e.clearTimeout,Ke=i&&i.now!==Ft.Date.now&&i.now,Je=e.setTimeout!==Ft.setTimeout&&e.setTimeout,Ge=vt.ceil,Qe=vt.floor,tn=pt.getOwnPropertySymbols,en=zt?zt.isBuffer:void 0,nn=e.isFinite,rn=mt.join,on=Me(pt.keys,pt),un=vt.max,an=vt.min,sn=i.now,cn=e.parseInt,ln=vt.random,fn=mt.reverse,hn=Qi(e,"DataView"),dn=Qi(e,"Map"),vn=Qi(e,"Promise"),pn=Qi(e,"Set"),_n=Qi(e,"WeakMap"),gn=Qi(pt,"create"),yn=_n&&new _n,mn={},bn=jo(hn),wn=jo(dn),$n=jo(vn),xn=jo(pn),An=jo(_n),Sn=It?It.prototype:void 0,En=Sn?Sn.valueOf:void 0,jn=Sn?Sn.toString:void 0;function kn(t){if(qu(t)&&!Pu(t)&&!(t instanceof Rn)){if(t instanceof zn)return t;if(At.call(t,"__wrapped__"))return ko(t)}return new zn(t)}var Cn=function(){function t(){}return function(e){if(!Hu(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function On(){}function zn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Rn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Pn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function Kn(t,e,n,r,i,o){var u,a=1&e,c=2&e,h=4&e;if(n&&(u=i?n(t,r,i,o):n(t)),void 0!==u)return u;if(!Hu(t))return t;var $=Pu(t);if($){if(u=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&At.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!a)return gi(t,u)}else{var P=no(t),I=P==d||P==v;if(Tu(t))return fi(t,a);if(P==g||P==s||I&&!i){if(u=c||I?{}:io(t),!a)return c?function(t,e){return yi(t,eo(t),e)}(t,function(t,e){return t&&yi(e,wa(e),t)}(u,t)):function(t,e){return yi(t,to(t),e)}(t,Vn(u,t))}else{if(!Mt[P])return i?t:{};u=function(t,e,n){var r=t.constructor;switch(e){case x:return hi(t);case l:case f:return new r(+t);case A:return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case S:case E:case j:case k:case C:case O:case"[object Uint8ClampedArray]":case z:case R:return di(t,n);case p:return new r;case _:case b:return new r(t);case y:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case m:return new r;case w:return i=t,En?pt(En.call(i)):{}}var i}(t,P,a)}}o||(o=new Tn);var U=o.get(t);if(U)return U;o.set(t,u),Zu(t)?t.forEach((function(r){u.add(Kn(r,e,n,r,t,o))})):Yu(t)&&t.forEach((function(r,i){u.set(i,Kn(r,e,n,i,t,o))}));var L=$?void 0:(h?c?Vi:Yi:c?wa:ba)(t);return ae(L||t,(function(r,i){L&&(r=t[i=r]),Hn(u,i,Kn(r,e,n,i,t,o))})),u}function Jn(t,e,n){var r=n.length;if(null==t)return!r;for(t=pt(t);r--;){var i=n[r],o=e[i],u=t[i];if(void 0===u&&!(i in t)||!o(u))return!1}return!0}function Gn(t,e,n){if("function"!=typeof t)throw new yt(o);return bo((function(){t.apply(void 0,n)}),e)}function Qn(t,e,n,r){var i=-1,o=fe,u=!0,a=t.length,s=[],c=e.length;if(!a)return s;n&&(e=de(e,Oe(n))),r?(o=he,u=!1):e.length>=200&&(o=Re,u=!1,e=new Ln(e));t:for(;++i-1},In.prototype.set=function(t,e){var n=this.__data__,r=qn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new Pn,map:new(dn||In),string:new Pn}},Un.prototype.delete=function(t){var e=Ji(this,t).delete(t);return this.size-=e?1:0,e},Un.prototype.get=function(t){return Ji(this,t).get(t)},Un.prototype.has=function(t){return Ji(this,t).has(t)},Un.prototype.set=function(t,e){var n=Ji(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(t){return this.__data__.has(t)},Tn.prototype.clear=function(){this.__data__=new In,this.size=0},Tn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Tn.prototype.get=function(t){return this.__data__.get(t)},Tn.prototype.has=function(t){return this.__data__.has(t)},Tn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof In){var r=n.__data__;if(!dn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Un(r)}return n.set(t,e),this.size=n.size,this};var tr=wi(sr),er=wi(cr,!0);function nr(t,e){var n=!0;return tr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function rr(t,e,n){for(var r=-1,i=t.length;++r0&&n(a)?e>1?or(a,e-1,n,r,i):ve(i,a):r||(i[i.length]=a)}return i}var ur=$i(),ar=$i(!0);function sr(t,e){return t&&ur(t,e,ba)}function cr(t,e){return t&&ar(t,e,ba)}function lr(t,e){return le(e,(function(e){return Du(t[e])}))}function fr(t,e){for(var n=0,r=(e=ai(e,t)).length;null!=t&&ne}function pr(t,e){return null!=t&&At.call(t,e)}function _r(t,e){return null!=t&&e in pt(t)}function gr(t,e,n){for(var i=n?he:fe,o=t[0].length,u=t.length,a=u,s=r(u),c=1/0,l=[];a--;){var f=t[a];a&&e&&(f=de(f,Oe(e))),c=an(f.length,c),s[a]=!n&&(e||o>=120&&f.length>=120)?new Ln(a&&f):void 0}f=t[0];var h=-1,d=s[0];t:for(;++h=a)return s;var c=n[r];return s*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)}))}function Pr(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)a!==t&&Zt.call(a,s,1),Zt.call(t,s,1);return t}function Ur(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;uo(i)?Zt.call(t,i,1):Qr(t,i)}}return t}function Lr(t,e){return t+Qe(ln()*(e-t+1))}function Tr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=Qe(e/2))&&(t+=t)}while(e);return n}function Nr(t,e){return wo(po(t,e,Va),t+"")}function Br(t){return Bn(Ca(t))}function Dr(t,e){var n=Ca(t);return Ao(n,Zn(e,0,n.length))}function Mr(t,e,n,r){if(!Hu(t))return t;for(var i=-1,o=(e=ai(e,t)).length,u=o-1,a=t;null!=a&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var u=r(o);++i>>1,u=t[o];null!==u&&!Ju(u)&&(n?u<=e:u=200){var c=e?null:Ti(t);if(c)return He(c);u=!1,i=Re,s=new Ln}else s=e?[]:a;t:for(;++r=r?t:Yr(t,e,n)}var li=Ze||function(t){return Ft.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var n=t.length,r=Wt?Wt(n):new t.constructor(n);return t.copy(r),r}function hi(t){var e=new t.constructor(t.byteLength);return new Lt(e).set(new Lt(t)),e}function di(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function vi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Ju(t),u=void 0!==e,a=null===e,s=e==e,c=Ju(e);if(!a&&!c&&!o&&t>e||o&&u&&s&&!a&&!c||r&&u&&s||!n&&s||!i)return 1;if(!r&&!o&&!c&&t1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,u&&ao(n[0],n[1],u)&&(o=i<3?void 0:o,i=1),e=pt(e);++r-1?i[o?e[u]:u]:void 0}}function ji(t){return qi((function(e){var n=e.length,r=n,i=zn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new yt(o);if(i&&!a&&"wrapper"==Xi(u))var a=new zn([],!0)}for(r=a?r:n;++r1&&m.reverse(),f&&ca))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,d=2&n?new Ln:void 0;for(o.set(t,e),o.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(J,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ae(a,(function(n){var r="_."+n[0];e&n[1]&&!fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(G);return e?e[1].split(Q):[]}(r),n)))}function xo(t){var e=0,n=0;return function(){var r=sn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ao(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Xo(t,n)}));function eu(t){var e=kn(t);return e.__chain__=!0,e}function nu(t,e){return e(t)}var ru=qi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Xn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Rn&&uo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:nu,args:[i],thisArg:void 0}),new zn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var iu=mi((function(t,e,n){At.call(t,n)?++t[n]:Fn(t,n,1)}));var ou=Ei(Ro),uu=Ei(Po);function au(t,e){return(Pu(t)?ae:tr)(t,Ki(e,3))}function su(t,e){return(Pu(t)?se:er)(t,Ki(e,3))}var cu=mi((function(t,e,n){At.call(t,n)?t[n].push(e):Fn(t,n,[e])}));var lu=Nr((function(t,e,n){var i=-1,o="function"==typeof e,u=Uu(t)?r(t.length):[];return tr(t,(function(t){u[++i]=o?oe(e,t,n):yr(t,e,n)})),u})),fu=mi((function(t,e,n){Fn(t,n,e)}));function hu(t,e){return(Pu(t)?de:jr)(t,Ki(e,3))}var du=mi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var vu=Nr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ao(t,e[0],e[1])?e=[]:n>2&&ao(e[0],e[1],e[2])&&(e=[e[0]]),Rr(t,or(e,1),[])})),pu=Ke||function(){return Ft.Date.now()};function _u(t,e,n){return e=n?void 0:e,Bi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function gu(t,e){var n;if("function"!=typeof e)throw new yt(o);return t=ra(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var yu=Nr((function(t,e,n){var r=1;if(n.length){var i=We(n,Zi(yu));r|=32}return Bi(t,r,e,n,i)})),mu=Nr((function(t,e,n){var r=3;if(n.length){var i=We(n,Zi(mu));r|=32}return Bi(e,r,t,n,i)}));function bu(t,e,n){var r,i,u,a,s,c,l=0,f=!1,h=!1,d=!0;if("function"!=typeof t)throw new yt(o);function v(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function p(t){return l=t,s=bo(g,e),f?v(t):a}function _(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-l>=u}function g(){var t=pu();if(_(t))return y(t);s=bo(g,function(t){var n=e-(t-c);return h?an(n,u-(t-l)):n}(t))}function y(t){return s=void 0,d&&r?v(t):(r=i=void 0,a)}function m(){var t=pu(),n=_(t);if(r=arguments,i=this,c=t,n){if(void 0===s)return p(c);if(h)return li(s),s=bo(g,e),v(c)}return void 0===s&&(s=bo(g,e)),a}return e=oa(e)||0,Hu(n)&&(f=!!n.leading,u=(h="maxWait"in n)?un(oa(n.maxWait)||0,e):u,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==s&&li(s),l=0,r=c=i=s=void 0},m.flush=function(){return void 0===s?a:y(pu())},m}var wu=Nr((function(t,e){return Gn(t,1,e)})),$u=Nr((function(t,e,n){return Gn(t,oa(e)||0,n)}));function xu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new yt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return n.cache=o.set(i,u)||o,u};return n.cache=new(xu.Cache||Un),n}function Au(t){if("function"!=typeof t)throw new yt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}xu.Cache=Un;var Su=si((function(t,e){var n=(e=1==e.length&&Pu(e[0])?de(e[0],Oe(Ki())):de(or(e,1),Oe(Ki()))).length;return Nr((function(r){for(var i=-1,o=an(r.length,n);++i=e})),Ru=mr(function(){return arguments}())?mr:function(t){return qu(t)&&At.call(t,"callee")&&!Xt.call(t,"callee")},Pu=r.isArray,Iu=Qt?Oe(Qt):function(t){return qu(t)&&dr(t)==x};function Uu(t){return null!=t&&Wu(t.length)&&!Du(t)}function Lu(t){return qu(t)&&Uu(t)}var Tu=en||os,Nu=te?Oe(te):function(t){return qu(t)&&dr(t)==f};function Bu(t){if(!qu(t))return!1;var e=dr(t);return e==h||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Fu(t)}function Du(t){if(!Hu(t))return!1;var e=dr(t);return e==d||e==v||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Mu(t){return"number"==typeof t&&t==ra(t)}function Wu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Hu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function qu(t){return null!=t&&"object"==typeof t}var Yu=ee?Oe(ee):function(t){return qu(t)&&no(t)==p};function Vu(t){return"number"==typeof t||qu(t)&&dr(t)==_}function Fu(t){if(!qu(t)||dr(t)!=g)return!1;var e=Yt(t);if(null===e)return!0;var n=At.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xt.call(n)==kt}var Xu=ne?Oe(ne):function(t){return qu(t)&&dr(t)==y};var Zu=re?Oe(re):function(t){return qu(t)&&no(t)==m};function Ku(t){return"string"==typeof t||!Pu(t)&&qu(t)&&dr(t)==b}function Ju(t){return"symbol"==typeof t||qu(t)&&dr(t)==w}var Gu=ie?Oe(ie):function(t){return qu(t)&&Wu(t.length)&&!!Dt[dr(t)]};var Qu=Ii(Er),ta=Ii((function(t,e){return t<=e}));function ea(t){if(!t)return[];if(Uu(t))return Ku(t)?Ve(t):gi(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=no(t);return(e==p?De:e==m?He:Ca)(t)}function na(t){return t?(t=oa(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ra(t){var e=na(t),n=e%1;return e==e?n?e-n:e:0}function ia(t){return t?Zn(ra(t),0,4294967295):0}function oa(t){if("number"==typeof t)return t;if(Ju(t))return NaN;if(Hu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Hu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(X,"");var n=ot.test(t);return n||at.test(t)?qt(t.slice(2),n?2:8):it.test(t)?NaN:+t}function ua(t){return yi(t,wa(t))}function aa(t){return null==t?"":Jr(t)}var sa=bi((function(t,e){if(fo(e)||Uu(e))yi(e,ba(e),t);else for(var n in e)At.call(e,n)&&Hn(t,n,e[n])})),ca=bi((function(t,e){yi(e,wa(e),t)})),la=bi((function(t,e,n,r){yi(e,wa(e),t,r)})),fa=bi((function(t,e,n,r){yi(e,ba(e),t,r)})),ha=qi(Xn);var da=Nr((function(t,e){t=pt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&ao(e[0],e[1],i)&&(r=1);++n1),e})),yi(t,Vi(t),n),r&&(n=Kn(n,7,Wi));for(var i=e.length;i--;)Qr(n,e[i]);return n}));var Sa=qi((function(t,e){return null==t?{}:function(t,e){return Pr(t,e,(function(e,n){return _a(t,n)}))}(t,e)}));function Ea(t,e){if(null==t)return{};var n=de(Vi(t),(function(t){return[t]}));return e=Ki(e),Pr(t,n,(function(t,n){return e(t,n[0])}))}var ja=Ni(ba),ka=Ni(wa);function Ca(t){return null==t?[]:ze(t,ba(t))}var Oa=Ai((function(t,e,n){return e=e.toLowerCase(),t+(n?za(e):e)}));function za(t){return Ba(aa(t).toLowerCase())}function Ra(t){return(t=aa(t))&&t.replace(ct,Le).replace(Pt,"")}var Pa=Ai((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ia=Ai((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ua=xi("toLowerCase");var La=Ai((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ta=Ai((function(t,e,n){return t+(n?" ":"")+Ba(e)}));var Na=Ai((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ba=xi("toUpperCase");function Da(t,e,n){return t=aa(t),void 0===(e=n?void 0:e)?function(t){return Tt.test(t)}(t)?function(t){return t.match(Ut)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Ma=Nr((function(t,e){try{return oe(t,void 0,e)}catch(t){return Bu(t)?t:new ht(t)}})),Wa=qi((function(t,e){return ae(e,(function(e){e=Eo(e),Fn(t,e,yu(t[e],t))})),t}));function Ha(t){return function(){return t}}var qa=ji(),Ya=ji(!0);function Va(t){return t}function Fa(t){return xr("function"==typeof t?t:Kn(t,1))}var Xa=Nr((function(t,e){return function(n){return yr(n,t,e)}})),Za=Nr((function(t,e){return function(n){return yr(t,n,e)}}));function Ka(t,e,n){var r=ba(e),i=lr(e,r);null!=n||Hu(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=lr(e,ba(e)));var o=!(Hu(n)&&"chain"in n&&!n.chain),u=Du(t);return ae(i,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,ve([this.value()],arguments))})})),t}function Ja(){}var Ga=zi(de),Qa=zi(ce),ts=zi(ge);function es(t){return so(t)?Se(Eo(t)):function(t){return function(e){return fr(e,t)}}(t)}var ns=Pi(),rs=Pi(!0);function is(){return[]}function os(){return!1}var us=Oi((function(t,e){return t+e}),0),as=Li("ceil"),ss=Oi((function(t,e){return t/e}),1),cs=Li("floor");var ls,fs=Oi((function(t,e){return t*e}),1),hs=Li("round"),ds=Oi((function(t,e){return t-e}),0);return kn.after=function(t,e){if("function"!=typeof e)throw new yt(o);return t=ra(t),function(){if(--t<1)return e.apply(this,arguments)}},kn.ary=_u,kn.assign=sa,kn.assignIn=ca,kn.assignInWith=la,kn.assignWith=fa,kn.at=ha,kn.before=gu,kn.bind=yu,kn.bindAll=Wa,kn.bindKey=mu,kn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Pu(t)?t:[t]},kn.chain=eu,kn.chunk=function(t,e,n){e=(n?ao(t,e,n):void 0===e)?1:un(ra(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,u=0,a=r(Ge(i/e));oi?0:i+n),(r=void 0===r||r>i?i:ra(r))<0&&(r+=i),r=n>r?0:ia(r);n>>0)?(t=aa(t))&&("string"==typeof e||null!=e&&!Xu(e))&&!(e=Jr(e))&&Be(t)?ci(Ve(t),0,n):t.split(e,n):[]},kn.spread=function(t,e){if("function"!=typeof t)throw new yt(o);return e=null==e?0:un(ra(e),0),Nr((function(n){var r=n[e],i=ci(n,0,e);return r&&ve(i,r),oe(t,this,i)}))},kn.tail=function(t){var e=null==t?0:t.length;return e?Yr(t,1,e):[]},kn.take=function(t,e,n){return t&&t.length?Yr(t,0,(e=n||void 0===e?1:ra(e))<0?0:e):[]},kn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Yr(t,(e=r-(e=n||void 0===e?1:ra(e)))<0?0:e,r):[]},kn.takeRightWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3),!1,!0):[]},kn.takeWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3)):[]},kn.tap=function(t,e){return e(t),t},kn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new yt(o);return Hu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bu(t,e,{leading:r,maxWait:e,trailing:i})},kn.thru=nu,kn.toArray=ea,kn.toPairs=ja,kn.toPairsIn=ka,kn.toPath=function(t){return Pu(t)?de(t,Eo):Ju(t)?[t]:gi(So(aa(t)))},kn.toPlainObject=ua,kn.transform=function(t,e,n){var r=Pu(t),i=r||Tu(t)||Gu(t);if(e=Ki(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Hu(t)&&Du(o)?Cn(Yt(t)):{}}return(i?ae:sr)(t,(function(t,r,i){return e(n,t,r,i)})),n},kn.unary=function(t){return _u(t,1)},kn.union=qo,kn.unionBy=Yo,kn.unionWith=Vo,kn.uniq=function(t){return t&&t.length?Gr(t):[]},kn.uniqBy=function(t,e){return t&&t.length?Gr(t,Ki(e,2)):[]},kn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Gr(t,void 0,e):[]},kn.unset=function(t,e){return null==t||Qr(t,e)},kn.unzip=Fo,kn.unzipWith=Xo,kn.update=function(t,e,n){return null==t?t:ti(t,e,ui(n))},kn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ti(t,e,ui(n),r)},kn.values=Ca,kn.valuesIn=function(t){return null==t?[]:ze(t,wa(t))},kn.without=Zo,kn.words=Da,kn.wrap=function(t,e){return Eu(ui(e),t)},kn.xor=Ko,kn.xorBy=Jo,kn.xorWith=Go,kn.zip=Qo,kn.zipObject=function(t,e){return ii(t||[],e||[],Hn)},kn.zipObjectDeep=function(t,e){return ii(t||[],e||[],Mr)},kn.zipWith=tu,kn.entries=ja,kn.entriesIn=ka,kn.extend=ca,kn.extendWith=la,Ka(kn,kn),kn.add=us,kn.attempt=Ma,kn.camelCase=Oa,kn.capitalize=za,kn.ceil=as,kn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==e&&(e=(e=oa(e))==e?e:0),Zn(oa(t),e,n)},kn.clone=function(t){return Kn(t,4)},kn.cloneDeep=function(t){return Kn(t,5)},kn.cloneDeepWith=function(t,e){return Kn(t,5,e="function"==typeof e?e:void 0)},kn.cloneWith=function(t,e){return Kn(t,4,e="function"==typeof e?e:void 0)},kn.conformsTo=function(t,e){return null==e||Jn(t,e,ba(e))},kn.deburr=Ra,kn.defaultTo=function(t,e){return null==t||t!=t?e:t},kn.divide=ss,kn.endsWith=function(t,e,n){t=aa(t),e=Jr(e);var r=t.length,i=n=void 0===n?r:Zn(ra(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},kn.eq=Cu,kn.escape=function(t){return(t=aa(t))&&B.test(t)?t.replace(T,Te):t},kn.escapeRegExp=function(t){return(t=aa(t))&&F.test(t)?t.replace(V,"\\$&"):t},kn.every=function(t,e,n){var r=Pu(t)?ce:nr;return n&&ao(t,e,n)&&(e=void 0),r(t,Ki(e,3))},kn.find=ou,kn.findIndex=Ro,kn.findKey=function(t,e){return me(t,Ki(e,3),sr)},kn.findLast=uu,kn.findLastIndex=Po,kn.findLastKey=function(t,e){return me(t,Ki(e,3),cr)},kn.floor=cs,kn.forEach=au,kn.forEachRight=su,kn.forIn=function(t,e){return null==t?t:ur(t,Ki(e,3),wa)},kn.forInRight=function(t,e){return null==t?t:ar(t,Ki(e,3),wa)},kn.forOwn=function(t,e){return t&&sr(t,Ki(e,3))},kn.forOwnRight=function(t,e){return t&&cr(t,Ki(e,3))},kn.get=pa,kn.gt=Ou,kn.gte=zu,kn.has=function(t,e){return null!=t&&ro(t,e,pr)},kn.hasIn=_a,kn.head=Uo,kn.identity=Va,kn.includes=function(t,e,n,r){t=Uu(t)?t:Ca(t),n=n&&!r?ra(n):0;var i=t.length;return n<0&&(n=un(i+n,0)),Ku(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&we(t,e,n)>-1},kn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=un(r+i,0)),we(t,e,i)},kn.inRange=function(t,e,n){return e=na(e),void 0===n?(n=e,e=0):n=na(n),function(t,e,n){return t>=an(e,n)&&t=-9007199254740991&&t<=9007199254740991},kn.isSet=Zu,kn.isString=Ku,kn.isSymbol=Ju,kn.isTypedArray=Gu,kn.isUndefined=function(t){return void 0===t},kn.isWeakMap=function(t){return qu(t)&&no(t)==$},kn.isWeakSet=function(t){return qu(t)&&"[object WeakSet]"==dr(t)},kn.join=function(t,e){return null==t?"":rn.call(t,e)},kn.kebabCase=Pa,kn.last=Bo,kn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ra(n))<0?un(r+i,0):an(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):be(t,xe,i,!0)},kn.lowerCase=Ia,kn.lowerFirst=Ua,kn.lt=Qu,kn.lte=ta,kn.max=function(t){return t&&t.length?rr(t,Va,vr):void 0},kn.maxBy=function(t,e){return t&&t.length?rr(t,Ki(e,2),vr):void 0},kn.mean=function(t){return Ae(t,Va)},kn.meanBy=function(t,e){return Ae(t,Ki(e,2))},kn.min=function(t){return t&&t.length?rr(t,Va,Er):void 0},kn.minBy=function(t,e){return t&&t.length?rr(t,Ki(e,2),Er):void 0},kn.stubArray=is,kn.stubFalse=os,kn.stubObject=function(){return{}},kn.stubString=function(){return""},kn.stubTrue=function(){return!0},kn.multiply=fs,kn.nth=function(t,e){return t&&t.length?zr(t,ra(e)):void 0},kn.noConflict=function(){return Ft._===this&&(Ft._=Ct),this},kn.noop=Ja,kn.now=pu,kn.pad=function(t,e,n){t=aa(t);var r=(e=ra(e))?Ye(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ri(Qe(i),n)+t+Ri(Ge(i),n)},kn.padEnd=function(t,e,n){t=aa(t);var r=(e=ra(e))?Ye(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=ln();return an(t+i*(e-t+Ht("1e-"+((i+"").length-1))),e)}return Lr(t,e)},kn.reduce=function(t,e,n){var r=Pu(t)?pe:je,i=arguments.length<3;return r(t,Ki(e,4),n,i,tr)},kn.reduceRight=function(t,e,n){var r=Pu(t)?_e:je,i=arguments.length<3;return r(t,Ki(e,4),n,i,er)},kn.repeat=function(t,e,n){return e=(n?ao(t,e,n):void 0===e)?1:ra(e),Tr(aa(t),e)},kn.replace=function(){var t=arguments,e=aa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},kn.result=function(t,e,n){var r=-1,i=(e=ai(e,t)).length;for(i||(i=1,t=void 0);++r9007199254740991)return[];var n=4294967295,r=an(t,4294967295);t-=4294967295;for(var i=Ce(r,e=Ki(e));++n=o)return t;var a=n-Ye(r);if(a<1)return r;var s=u?ci(u,0,a).join(""):t.slice(0,a);if(void 0===i)return s+r;if(u&&(a+=s.length-a),Xu(i)){if(t.slice(a).search(i)){var c,l=s;for(i.global||(i=_t(i.source,aa(rt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var f=c.index;s=s.slice(0,void 0===f?a:f)}}else if(t.indexOf(Jr(i),a)!=a){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},kn.unescape=function(t){return(t=aa(t))&&N.test(t)?t.replace(L,Fe):t},kn.uniqueId=function(t){var e=++St;return aa(t)+e},kn.upperCase=Na,kn.upperFirst=Ba,kn.each=au,kn.eachRight=su,kn.first=Uo,Ka(kn,(ls={},sr(kn,(function(t,e){At.call(kn.prototype,e)||(ls[e]=t)})),ls),{chain:!1}),kn.VERSION="4.17.19",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){kn[t].placeholder=kn})),ae(["drop","take"],(function(t,e){Rn.prototype[t]=function(n){n=void 0===n?1:un(ra(n),0);var r=this.__filtered__&&!e?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Rn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Rn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ki(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Rn.prototype[t]=function(){return this[n](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Rn.prototype[t]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(Va)},Rn.prototype.find=function(t){return this.filter(t).head()},Rn.prototype.findLast=function(t){return this.reverse().find(t)},Rn.prototype.invokeMap=Nr((function(t,e){return"function"==typeof t?new Rn(this):this.map((function(n){return yr(n,t,e)}))})),Rn.prototype.reject=function(t){return this.filter(Au(Ki(t)))},Rn.prototype.slice=function(t,e){t=ra(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Rn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ra(e))<0?n.dropRight(-e):n.take(e-t)),n)},Rn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},sr(Rn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=kn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(kn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,a=e instanceof Rn,s=u[0],c=a||Pu(e),l=function(t){var e=i.apply(kn,ve([t],u));return r&&f?e[0]:e};c&&n&&"function"==typeof s&&1!=s.length&&(a=c=!1);var f=this.__chain__,h=!!this.__actions__.length,d=o&&!f,v=a&&!h;if(!o&&c){e=v?e:new Rn(this);var p=t.apply(e,u);return p.__actions__.push({func:nu,args:[l],thisArg:void 0}),new zn(p,f)}return d&&v?t.apply(this,u):(p=this.thru(l),d?r?p.value()[0]:p.value():p)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=mt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);kn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Pu(i)?i:[],t)}return this[n]((function(n){return e.apply(Pu(n)?n:[],t)}))}})),sr(Rn.prototype,(function(t,e){var n=kn[e];if(n){var r=n.name+"";At.call(mn,r)||(mn[r]=[]),mn[r].push({name:e,func:n})}})),mn[ki(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var t=new Rn(this.__wrapped__);return t.__actions__=gi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=gi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=gi(this.__views__),t},Rn.prototype.reverse=function(){if(this.__filtered__){var t=new Rn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Rn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Pu(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},kn.prototype.plant=function(t){for(var e,n=this;n instanceof On;){var r=ko(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},kn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Rn){var e=t;return this.__actions__.length&&(e=new Rn(this)),(e=e.reverse()).__actions__.push({func:nu,args:[Ho],thisArg:void 0}),new zn(e,this.__chain__)}return this.thru(Ho)},kn.prototype.toJSON=kn.prototype.valueOf=kn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},kn.prototype.first=kn.prototype.head,Gt&&(kn.prototype[Gt]=function(){return this}),kn}();Ft._=Xe,void 0===(i=function(){return Xe}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(1),n(2)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";n.r(e); +!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=179)}([function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var o=n(42),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();t.exports=i},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var o=n(10),r=n(86),i=n(87),s=o?o.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?r(t):i(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var o=n(33),r=n(27);t.exports=function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,c=e.length;++a1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,a&&r(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++o-1&&t%1==0&&t<=9007199254740991}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,n){var o=n(113),r=n(17),i=n(2),s=n(18),a=n(55),c=n(32),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&r(t),h=!n&&!l&&s(t),p=!n&&!l&&!h&&c(t),f=n||l||h||p,d=f?o(t.length,String):[],v=d.length;for(var y in t)!e&&!u.call(t,y)||f&&("length"==y||h&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,v))||d.push(y);return d}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&n.test(t))&&t>-1&&t%1==0&&tr?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(r);++o/g},function(t,e,n){var o=n(41),r=n(45),i=n(103),s=n(105),a=n(4),c=n(9),u=n(53);t.exports=function t(e,n,l,h,p){e!==n&&i(n,(function(i,c){if(p||(p=new o),a(i))s(e,n,c,l,t,h,p);else{var f=h?h(u(e,c),i,c+"",e,n,p):void 0;void 0===f&&(f=i),r(e,c,f)}}),c)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var o=n(14),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},function(t,e,n){var o=n(14);t.exports=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var o=n(14);t.exports=function(t){return o(this.__data__,t)>-1}},function(t,e,n){var o=n(14);t.exports=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},function(t,e,n){var o=n(13);t.exports=function(){this.__data__=new o,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var o=n(13),r=n(25),i=n(44);t.exports=function(t,e){var n=this.__data__;if(n instanceof o){var s=n.__data__;if(!r||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var o=n(26),r=n(88),i=n(4),s=n(43),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,p=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||r(t))&&(o(t)?p:a).test(s(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var o=n(10),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,a=o?o.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var o=!0}catch(t){}var r=s.call(t);return o&&(e?t[a]=n:delete t[a]),r}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var o,r=n(89),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var o=n(1)["__core-js_shared__"];t.exports=o},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var o=n(92),r=n(13),i=n(25);t.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},function(t,e,n){var o=n(93),r=n(94),i=n(95),s=n(96),a=n(97);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var o=n(33),r=n(5),i=n(34),s=n(8),a=n(11),c=n(12),u=Object.prototype.hasOwnProperty,l=i((function(t,e){if(a(e)||s(e))r(e,c(e),t);else for(var n in e)u.call(e,n)&&o(t,n,e[n])}));t.exports=l},function(t,e,n){var o=n(51)(Object.keys,Object);t.exports=o},function(t,e,n){var o=n(6)(n(1),"DataView");t.exports=o},function(t,e,n){var o=n(6)(n(1),"Promise");t.exports=o},function(t,e,n){var o=n(6)(n(1),"Set");t.exports=o},function(t,e,n){var o=n(6)(n(1),"WeakMap");t.exports=o},function(t,e,n){var o=n(3),r=n(2),i=n(0);t.exports=function(t){return"string"==typeof t||!r(t)&&i(t)&&"[object String]"==o(t)}},function(t,e){t.exports=function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}},function(t,e,n){var o=n(4),r=n(23),i=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=a.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):s.test(t)?NaN:+t}},function(t,e,n){var o=n(36),r=n(129),i=n(146),s=n(39),a=n(5),c=n(154),u=n(155),l=n(66),h=u((function(t,e){var n={};if(null==t)return n;var u=!1;e=o(e,(function(e){return e=s(e,t),u||(u=e.length>1),e})),a(t,l(t),n),u&&(n=r(n,7,c));for(var h=e.length;h--;)i(n,e[h]);return n}));t.exports=h},function(t,e,n){var o=n(41),r=n(130),i=n(33),s=n(131),a=n(132),c=n(47),u=n(49),l=n(133),h=n(135),p=n(136),f=n(66),d=n(22),v=n(137),y=n(138),b=n(50),m=n(2),_=n(18),g=n(142),x=n(4),$=n(144),j=n(12),w={};w["[object Arguments]"]=w["[object Array]"]=w["[object ArrayBuffer]"]=w["[object DataView]"]=w["[object Boolean]"]=w["[object Date]"]=w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Map]"]=w["[object Number]"]=w["[object Object]"]=w["[object RegExp]"]=w["[object Set]"]=w["[object String]"]=w["[object Symbol]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w["[object Error]"]=w["[object Function]"]=w["[object WeakMap]"]=!1,t.exports=function t(e,n,A,S,E,O){var P,C=1&n,k=2&n,z=4&n;if(A&&(P=E?A(e,S,E,O):A(e)),void 0!==P)return P;if(!x(e))return e;var U=m(e);if(U){if(P=v(e),!C)return u(e,P)}else{var R=d(e),T="[object Function]"==R||"[object GeneratorFunction]"==R;if(_(e))return c(e,C);if("[object Object]"==R||"[object Arguments]"==R||T&&!E){if(P=k||T?{}:b(e),!C)return k?h(e,a(P,e)):l(e,s(P,e))}else{if(!w[R])return E?e:{};P=y(e,R,C)}}O||(O=new o);var N=O.get(e);if(N)return N;O.set(e,P),$(e)?e.forEach((function(o){P.add(t(o,n,A,o,e,O))})):g(e)&&e.forEach((function(o,r){P.set(r,t(o,n,A,r,e,O))}));var I=z?k?f:p:k?keysIn:j,M=U?void 0:I(e);return r(M||e,(function(o,r){M&&(o=e[r=o]),i(P,r,t(o,n,A,r,e,O))})),P}},function(t,e){t.exports=function(t,e){for(var n=-1,o=null==t?0:t.length;++n0&&i(l)?n>1?t(l,n-1,i,s,a):o(a,l):s||(a[a.length]=l)}return a}},function(t,e,n){var o=n(10),r=n(17),i=n(2),s=o?o.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||r(t)||!!(s&&t&&t[s])}},function(t,e,n){var o=n(67),r=n(160),i=n(70),s=n(21),a=n(161),c=n(163),u=n(24);t.exports=function(t,e,n){return n&&"number"!=typeof n&&s(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=u(t))&&("string"==typeof e||null!=e&&!a(e))&&!(e=o(e))&&i(t)?r(c(t),0,n):t.split(e,n):[]}},function(t,e,n){var o=n(69);t.exports=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:o(t,e,n)}},function(t,e,n){var o=n(162),r=n(19),i=n(20),s=i&&i.isRegExp,a=s?r(s):o;t.exports=a},function(t,e,n){var o=n(3),r=n(0);t.exports=function(t){return r(t)&&"[object RegExp]"==o(t)}},function(t,e,n){var o=n(164),r=n(70),i=n(165);t.exports=function(t){return r(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var n="[\\ud800-\\udfff]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[i,s,a].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[i+o+"?",o,s,a,n].join("|")+")",h=RegExp(r+"(?="+r+")|"+l+u,"g");t.exports=function(t){return t.match(h)||[]}},function(t,e,n){var o=n(167),r=n(168),i=n(169),s=n(170),a=n(171),c=n(71),u=n(21),l=n(12),h=n(72),p=n(172),f=n(24),d=/\b__p \+= '';/g,v=/\b(__p \+=) '' \+/g,y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/($^)/,_=/['\n\r\u2028\u2029\\]/g,g=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var x=p.imports._.templateSettings||p;n&&u(t,e,n)&&(e=void 0),t=f(t),e=o({},e,x,s);var $,j,w=o({},e.imports,x.imports,s),A=l(w),S=i(w,A),E=0,O=e.interpolate||m,P="__p += '",C=RegExp((e.escape||m).source+"|"+O.source+"|"+(O===h?b:m).source+"|"+(e.evaluate||m).source+"|$","g"),k=g.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";t.replace(C,(function(e,n,o,r,i,s){return o||(o=r),P+=t.slice(E,s).replace(_,a),n&&($=!0,P+="' +\n__e("+n+") +\n'"),i&&(j=!0,P+="';\n"+i+";\n__p += '"),o&&(P+="' +\n((__t = ("+o+")) == null ? '' : __t) +\n'"),E=s+e.length,e})),P+="';\n";var z=g.call(e,"variable")&&e.variable;z||(P="with (obj) {\n"+P+"\n}\n"),P=(j?P.replace(d,""):P).replace(v,"$1").replace(y,"$1;"),P="function("+(z||"obj")+") {\n"+(z?"":"obj || (obj = {});\n")+"var __t, __p = ''"+($?", __e = _.escape":"")+(j?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+P+"return __p\n}";var U=r((function(){return Function(A,k+"return "+P).apply(void 0,S)}));if(U.source=P,c(U))throw U;return U}},function(t,e,n){var o=n(5),r=n(34),i=n(9),s=r((function(t,e,n,r){o(e,i(e),t,r)}));t.exports=s},function(t,e,n){var o=n(58),r=n(35),i=n(71),s=r((function(t,e){try{return o(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=s},function(t,e,n){var o=n(36);t.exports=function(t,e){return o(e,(function(e){return t[e]}))}},function(t,e,n){var o=n(7),r=Object.prototype,i=r.hasOwnProperty;t.exports=function(t,e,n,s){return void 0===t||o(t,r[n])&&!i.call(s,n)?e:t}},function(t,e){var n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+n[t]}},function(t,e,n){var o=n(173),r={escape:n(176),evaluate:n(177),interpolate:n(72),variable:"",imports:{_:{escape:o}}};t.exports=r},function(t,e,n){var o=n(174),r=n(24),i=/[&<>"']/g,s=RegExp(i.source);t.exports=function(t){return(t=r(t))&&s.test(t)?t.replace(i,o):t}},function(t,e,n){var o=n(175)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=o},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e){t.exports=/<%-([\s\S]+?)%>/g},function(t,e){t.exports=/<%([\s\S]+?)%>/g},function(t,e,n){var o=n(35),r=n(7),i=n(21),s=n(9),a=Object.prototype,c=a.hasOwnProperty,u=o((function(t,e){t=Object(t);var n=-1,o=e.length,u=o>2?e[2]:void 0;for(u&&i(e[0],e[1],u)&&(o=1);++n{const n=1===t.length?t[0]:e.reduce((e,n,r)=>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.")})(n)+t[r+1],t[0]);return new a(n,t,o)},c=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t +const o=window,r=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==i)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(r&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const n=1===t.length?t[0]:e.reduce((e,n,o)=>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.")})(n)+t[o+1],t[0]);return new a(n,t,i)},u=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,i))(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;var l;const f=window,h=f.trustedTypes,d=h?h.emptyScript:"",v=f.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},g=(t,e)=>e!==t&&(e==e||t==t),y={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:g};class m 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,n)=>{const r=this._$Ep(n,e);void 0!==r&&(this._$Ev.set(r,n),t.push(r))}),t}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||y}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 n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"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,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.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 e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(e=>{const n=document.createElement("style"),i=r.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,t.appendChild(n)})})(e,this.constructor.elementStyles),e}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,n){this._$AK(t,n)}_$EO(t,e,n=y){var r;const i=this.constructor._$Ep(t,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:p).toAttribute(e,n.type);this._$El=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=r.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:p;this._$El=i,this[i]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||g)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(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 n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),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(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}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 l;const h=window,p=h.trustedTypes,f=p?p.emptyScript:"",d=h.reactiveElementPolyfillSupport,v={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},y=(t,e)=>e!==t&&(e==e||t==t),b={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y};class m 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,n)=>{const o=this._$Ep(n,e);void 0!==o&&(this._$Ev.set(o,n),t.push(o))}),t}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,n,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||b}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 n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"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,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.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 e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{r?t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(e=>{const n=document.createElement("style"),r=o.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)})})(e,this.constructor.elementStyles),e}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,n){this._$AK(t,n)}_$EO(t,e,n=b){var o;const r=this.constructor._$Ep(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==(null===(o=n.converter)||void 0===o?void 0:o.toAttribute)?n.converter:v).toAttribute(e,n.type);this._$El=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$El=null}}_$AK(t,e){var n;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:v;this._$El=r,this[r]=i.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let o=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):o=!1),!this.isUpdatePending&&o&&(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 n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),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(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}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){}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var b;m.finalized=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:m}),(null!==(l=f.reactiveElementVersions)&&void 0!==l?l:f.reactiveElementVersions=[]).push("1.6.1");const w=window,$=w.trustedTypes,x=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,S="?"+A,E=`<${S}>`,j=document,k=()=>j.createComment(""),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,z=t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,I=/>/g,U=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),L=/'/g,T=/"/g,N=/^(?:script|style|textarea|title)$/i,B=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),D=B(1),M=(B(2),Symbol.for("lit-noChange")),W=Symbol.for("lit-nothing"),H=new WeakMap,q=j.createTreeWalker(j,129,null,!1),Y=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"":"",u=R;for(let e=0;e"===s[0]?(u=null!=i?i:R,c=-1):void 0===s[1]?c=-2:(c=u.lastIndex-s[2].length,a=s[1],u=void 0===s[3]?U:'"'===s[3]?T:L):u===T||u===L?u=U:u===P||u===I?u=R:(u=U,i=void 0);const f=u===U&&t[e+1].startsWith("/>")?" ":"";o+=u===R?n+E:c>=0?(r.push(a),n.slice(0,c)+"$lit$"+n.slice(c)+A+f):n+A+(-2===c?(r.push(void 0),e):f)}const a=o+(t[n]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(a):a,r]};class V{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const u=t.length-1,a=this.parts,[s,c]=Y(t,e);if(this.el=V.createElement(s,n),q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=q.nextNode())&&a.length0){r.textContent=$?$.emptyScript:"";for(let n=0;n2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=F(this,t,e,0),o=!C(t)||t!==this._$AH&&t!==M,o&&(this._$AH=t);else{const r=t;let u,a;for(t=i[0],u=0;ut}):void 0,j=`lit$${(Math.random()+"").slice(9)}$`,w="?"+j,A=`<${w}>`,S=document,E=()=>S.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,C=t=>P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,U=/>/g,R=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),T=/'/g,N=/"/g,I=/^(?:script|style|textarea|title)$/i,M=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),D=M(1),H=(M(2),Symbol.for("lit-noChange")),L=Symbol.for("lit-nothing"),B=new WeakMap,Y=S.createTreeWalker(S,129,null,!1),q=(t,e)=>{const n=t.length-1,o=[];let r,i=2===e?"":"",s=k;for(let e=0;e"===c[0]?(s=null!=r?r:k,u=-1):void 0===c[1]?u=-2:(u=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?R:'"'===c[3]?N:T):s===N||s===T?s=R:s===z||s===U?s=k:(s=R,r=void 0);const h=s===R&&t[e+1].startsWith("/>")?" ":"";i+=s===k?n+A:u>=0?(o.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+j+h):n+j+(-2===u?(o.push(void 0),e):h)}const a=i+(t[n]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class V{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let r=0,i=0;const s=t.length-1,a=this.parts,[c,u]=q(t,e);if(this.el=V.createElement(c,n),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Y.nextNode())&&a.length0){o.textContent=x?x.emptyScript:"";for(let n=0;n2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,o){const r=this.strings;let i=!1;if(void 0===r)t=X(this,t,e,0),i=!O(t)||t!==this._$AH&&t!==H,i&&(this._$AH=t);else{const o=t;let s,a;for(t=r[0],s=0;s{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let u=o._$litPart$;if(void 0===u){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=u=new Z(e.insertBefore(k(),t),t,void 0,null!=n?n:{})}return u._$AI(t),u})(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 M}}ot.finalized=!0,ot._$litElement$=!0,null===(rt=globalThis.litElementHydrateSupport)||void 0===rt||rt.call(globalThis,{LitElement:ot});const ut=globalThis.litElementPolyfillSupport;null==ut||ut({LitElement:ot});(null!==(it=globalThis.litElementVersions)&&void 0!==it?it:globalThis.litElementVersions=[]).push("3.3.1");function at(t,e,n={},r={}){const i=new Event(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0},r));return i.detail=n,t.dispatchEvent(i),i}function st(t,e,n,r,i){return ct(t,e,n,Object.assign({},r),i)}function ct(t,e,n,r,i){if(["number","boolean"].includes(typeof r))return r;if(!r)return r;if(["object"].includes(typeof r))return Object.keys(r).forEach(o=>{r[o]=ct(t,e,n,r[o],i)}),r;i&&(r=i(r));const o=r.trim();return"[[["===o.substring(0,3)&&"]]]"===o.slice(-3)?function(t,e,n,r){try{return new Function("states","entity","variables","user","hass","'use strict'; "+r).call(this,t.states,e,n,t.user,t)}catch(t){const e=r.length<=100?r.trim():r.trim().substring(0,98)+"...";throw t.message=`${t.name}: ${t.message} in '${e}'`,t.name="HoneyCombJSTemplateError",t}}(t,e,n,o.slice(3,-3)):r}function lt(t){if(document.querySelector("home-assistant"))return document.querySelector("home-assistant").provideHass(t)}function ft(t,e){const n={type:"error",error:t,origConfig:e},r=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const t=document.createElement("hui-error-card");t.setConfig(n),r.parentElement&&r.parentElement.replaceChild(t,r)}),r}function ht(t){if(!t||"object"!=typeof t||!t.type)return ft("No card type configured",t);let e=t.type;if(e=e.startsWith("custom:")?e.substr("custom:".length):`hui-${e}-card`,customElements.get(e))return function(t,e){let n=document.createElement(t);try{n.setConfig(JSON.parse(JSON.stringify(e)))}catch(t){n=ft(t,e)}return n}(e,t);const n=ft(`Custom element doesn't exist: ${e}.`,t);n.style.display="None";const r=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(e).then(()=>{clearTimeout(r),at("ll-rebuild",{},n)}),n}const dt=n(0);class vt extends ot{static get is(){return"honeycomb-menu-item"}static get properties(){return{hass:{type:Object},config:{type:Object},variables:{type:Object},size:{type:Number},color:{type:String},icon:{type:String},action:{type:Object},disabled:{type:Boolean,reflect:!0,attribute:!0},audio:{type:Boolean},autoclose:{type:Boolean},active:{type:Boolean,reflect:!0,attribute:!0}}}set hass(t){this._hass=t,this._computeIsActive()}get hass(){return this._hass}set config(t){"break"==t.type||dt.isEmpty(t)||t.disabled?this.disabled=!0:(this._config=dt.assign({autoclose:!0,audio:!0,active:!1,variables:{}},t),dt.isString(this._config.tap_action)&&(this._config.tap_action={action:this._config.tap_action}),dt.isString(this._config.hold_action)&&(this._config.hold_action={action:this._config.hold_action}),dt.isString(this._config.double_tap_action)&&(this._config.double_tap_action={action:this._config.double_tap_action}),this._config.active||this.style.setProperty("--paper-item-icon-active-color","var(--paper-item-icon-color)"),this._parseTemplates(),this._computeIsActive())}get config(){return this._config}static get styles(){return s` +var nt,ot;class rt extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{var o,r;const i=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:e;let s=i._$litPart$;if(void 0===s){const t=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;i._$litPart$=s=new W(e.insertBefore(E(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s})(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 H}}rt.finalized=!0,rt._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:rt});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:rt});(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.3.1");function st(t,e,n={},o={}){const r=new Event(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0},o));return r.detail=n,t.dispatchEvent(r),r}function at(t,e,n,o,r){return ct(t,e,n,Object.assign({},o),r)}function ct(t,e,n,o,r){if(["number","boolean"].includes(typeof o))return o;if(!o)return o;if(["object"].includes(typeof o))return Object.keys(o).forEach(i=>{o[i]=ct(t,e,n,o[i],r)}),o;r&&(o=r(o));const i=o.trim();return"[[["===i.substring(0,3)&&"]]]"===i.slice(-3)?function(t,e,n,o){try{return new Function("states","entity","variables","user","hass","'use strict'; "+o).call(this,t.states,e,n,t.user,t)}catch(t){const e=o.length<=100?o.trim():o.trim().substring(0,98)+"...";throw t.message=`${t.name}: ${t.message} in '${e}'`,t.name="HoneyCombJSTemplateError",t}}(t,e,n,i.slice(3,-3)):o}function ut(t){if(document.querySelector("home-assistant"))return document.querySelector("home-assistant").provideHass(t)}function lt(t,e){const n={type:"error",error:t,origConfig:e},o=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const t=document.createElement("hui-error-card");t.setConfig(n),o.parentElement&&o.parentElement.replaceChild(t,o)}),o}function ht(t){if(!t||"object"!=typeof t||!t.type)return lt("No card type configured",t);let e=t.type;if(e=e.startsWith("custom:")?e.substr("custom:".length):`hui-${e}-card`,customElements.get(e))return function(t,e){let n=document.createElement(t);try{n.setConfig(JSON.parse(JSON.stringify(e)))}catch(t){n=lt(t,e)}return n}(e,t);const n=lt(`Custom element doesn't exist: ${e}.`,t);n.style.display="None";const o=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(e).then(()=>{clearTimeout(o),st("ll-rebuild",{},n)}),n}const pt=n(40),ft=n(119),dt=n(61),vt=n(125);class yt extends rt{static get is(){return"honeycomb-menu-item"}static get properties(){return{hass:{type:Object},config:{type:Object},variables:{type:Object},size:{type:Number},color:{type:String},icon:{type:String},action:{type:Object},disabled:{type:Boolean,reflect:!0,attribute:!0},audio:{type:Boolean},autoclose:{type:Boolean},active:{type:Boolean,reflect:!0,attribute:!0}}}set hass(t){this._hass=t,this._computeIsActive()}get hass(){return this._hass}set config(t){"break"==t.type||dt(t)||t.disabled?this.disabled=!0:(this._config=ft({autoclose:!0,audio:!0,active:!1,variables:{}},t),vt(this._config.tap_action)&&(this._config.tap_action={action:this._config.tap_action}),vt(this._config.hold_action)&&(this._config.hold_action={action:this._config.hold_action}),vt(this._config.double_tap_action)&&(this._config.double_tap_action={action:this._config.double_tap_action}),this._config.active||this.style.setProperty("--paper-item-icon-active-color","var(--paper-item-icon-color)"),this._parseTemplates(),this._computeIsActive())}get config(){return this._config}static get styles(){return c` :host { } :host([active]) { @@ -90,7 +82,7 @@ var rt,it;class ot extends m{constructor(){super(...arguments),this.renderOption
- `}_computeIsActive(){this.config&&("boolean"==typeof this.config.active&&(this.active=this.config.active&&this.hass.states[this.config.entity]&&"on"==this.hass.states[this.config.entity].state),"string"==typeof this.config.active&&(this.active=ct(this.hass,this.hass.states[this.config.entity],this.config.variables,this.config.active)))}firstUpdated(){this.disabled||this.shadowRoot.querySelector("#item").append(this._createLovelaceCard())}_parseTemplates(){this.config.entity=ct(this.hass,null,this.config.variables,this.config.entity);for(let t in this.config)["tap_action","hold_action","double_tap_action"].indexOf(t)>-1&&(this.config[t]=st(this.hass,this.hass.states[this.config.entity],this.config.variables,this.config[t]))}_createLovelaceCard(){var t=ht(dt.merge({},{type:"custom:button-card",size:"30px",show_name:!1},this.config));lt(t),t.addEventListener("action",t=>{t.detail.item=this,t.detail.autoclose=this.config.autoclose,t.detail.audio=this.config.audio});var e=new CSSStyleSheet;return e.replaceSync("ha-card { height: 100%; position: fixed !important; padding: 0 !important; }"),t.shadowRoot.adoptedStyleSheets=[...t.shadowRoot.adoptedStyleSheets,e],t}}customElements.define(vt.is,vt);class pt extends ot{static get is(){return"xy-pad"}static get properties(){return{hass:{type:Object},config:{type:Object},size:{type:Number},clampX:{type:Number},clampY:{type:Number},active:{type:Boolean,reflect:!0,attribute:!0},_current:{type:Object}}}static get styles(){return s` + `}_computeIsActive(){this.config&&("boolean"==typeof this.config.active&&(this.active=this.config.active&&this.hass.states[this.config.entity]&&"on"==this.hass.states[this.config.entity].state),"string"==typeof this.config.active&&(this.active=ct(this.hass,this.hass.states[this.config.entity],this.config.variables,this.config.active)))}firstUpdated(){this.disabled||this.shadowRoot.querySelector("#item").append(this._createLovelaceCard())}_parseTemplates(){this.config.entity=ct(this.hass,null,this.config.variables,this.config.entity);for(let t in this.config)["tap_action","hold_action","double_tap_action"].indexOf(t)>-1&&(this.config[t]=at(this.hass,this.hass.states[this.config.entity],this.config.variables,this.config[t]))}_createLovelaceCard(){var t=ht(pt({},{type:"custom:button-card",size:"30px",show_name:!1},this.config));ut(t),t.addEventListener("action",t=>{t.detail.item=this,t.detail.autoclose=this.config.autoclose,t.detail.audio=this.config.audio});var e=new CSSStyleSheet;return e.replaceSync("ha-card { height: 100%; position: fixed !important; padding: 0 !important; }"),t.shadowRoot.adoptedStyleSheets=[...t.shadowRoot.adoptedStyleSheets,e],t}}customElements.define(yt.is,yt);const bt=n(62);class mt extends rt{static get is(){return"xy-pad"}static get properties(){return{hass:{type:Object},config:{type:Object},size:{type:Number},clampX:{type:Number},clampY:{type:Number},active:{type:Boolean,reflect:!0,attribute:!0},_current:{type:Object}}}static get styles(){return c` :host { position: absolute; @@ -118,7 +110,7 @@ var rt,it;class ot extends m{constructor(){super(...arguments),this.renderOption #joystick:active, :host([active]) #joystick { box-shadow: 0px 0px 2px 5px #fbfbfb; background: #c5c5c5; - }`}render(){return D`
`}get joystick(){return this.shadowRoot.querySelector("#joystick")}firstUpdated(){this.config.x||(this.clampX=0),this.config.y||(this.clampY=0),this._setInitCssPositions(),this._bindListeners(),this._reset()}_setInitCssPositions(){const t=this.joystick;t.style.width=this.size+"px",t.style.height=this.size+"px",t.style.left=`calc( 50% - (${this.size}px / 2) )`,t.style.top=`calc( 50% - (${this.size}px / 2) )`}_bindListeners(){this.addEventListener("touchstart",this._handleOnDragStart,!1),this.addEventListener("touchmove",this._handleOnDrag,!1),document.addEventListener("touchend",this._handleOnDragEnd.bind(this),!1),this.addEventListener("mousedown",this._handleOnDragStart,!1),this.addEventListener("mousemove",this._handleOnDrag,!1),document.addEventListener("mouseup",this._handleOnDragEnd.bind(this),!1)}_reset(){this.active=!1,this.style.zIndex=0,this.joystick.style.transform="translate3d(0, 0, 0)",this._current={x:0,y:0},this._interval&&(clearInterval(this._interval),this._interval=null)}_handleOnDragStart(t){this.active=!0,this.style.zIndex=100,this.dispatchEvent(this.__constructEvent("drag-start")),this.config.repeat&&(this._interval=setInterval(t=>{this.dispatchEvent(this.__constructEvent("drag-interval"))},this.config.repeat))}_setPosition(t,e){t=t-this.joystick.offsetLeft-this.size/2,e=e-this.joystick.offsetTop-this.size/2,this._current.x=_.clamp(t,-this.clampX,this.clampX),this._current.y=_.clamp(e,-this.clampY,this.clampY),this.joystick.style.transform=`translate3d(${this._current.x}px, ${this._current.y}px, 0)`,this.dispatchEvent(this.__constructEvent("drag"))}_handleOnDrag(t){if(this.active){if(t.cancelBubble=!0,"touchmove"===t.type){var e=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-e.left,t.offsetY=t.targetTouches[0].pageY-e.top}this._setPosition(t.offsetX,t.offsetY)}}_handleOnDragEnd(t){this.dispatchEvent(this.__constructEvent("drag-end")),this._reset()}__constructEvent(t){return new CustomEvent(t,this.__constructEventData())}__constructEventData(){let t=this.config.x&&this.config.x.invert?-this._current.x:this._current.x,e=this.config.y&&this.config.y.invert?-this._current.y:this._current.y;return{detail:{x:t,y:e,x_percentage:t/this.clampX*100,y_percentage:e/this.clampY*100}}}}customElements.define(pt.is,pt);const _t=n(0),gt=function(){let t=document.querySelector("home-assistant");return t=t&&t.shadowRoot,t=t&&t.querySelector("home-assistant-main"),t=t&&t.shadowRoot,t=t&&t.querySelector("app-drawer-layout partial-panel-resolver")||t.querySelector("ha-drawer partial-panel-resolver"),t=t&&t.shadowRoot||t,t=t&&t.querySelector("ha-panel-lovelace"),t=t&&t.shadowRoot,t=t&&t.querySelector("hui-root"),t&&t.lovelace.config||null}().honeycomb_menu_templates||null,yt=document.querySelector("home-assistant").hass;_t.templateSettings.interpolate=/{{([\s\S]+?)}}/g;const mt=new function(){this.honeycomb=null,this.position={x:0,y:0},this.handleXYPosition=function(t){this.position.x="touchstart"===t.type?t.touches[0].clientX:t.clientX,this.position.y="touchstart"===t.type?t.touches[0].clientY:t.clientY}.bind(this)};function bt(t){mt.honeycomb&&mt.honeycomb.close(),mt.honeycomb=document.createElement("honeycomb-menu"),mt.honeycomb.setConfig(t),mt.honeycomb.display(function(){let t=document.querySelector("home-assistant");return t=t&&t.shadowRoot,t=t&&t.querySelector("home-assistant-main"),t=t&&t.shadowRoot,t=t&&t.querySelector("app-drawer-layout partial-panel-resolver")||t.querySelector("ha-drawer partial-panel-resolver"),t=t&&t.shadowRoot||t,t=t&&t.querySelector("ha-panel-lovelace"),t=t&&t.shadowRoot,t=t&&t.querySelector("hui-root"),t=t&&t.shadowRoot,t=t&&t.querySelector("ha-app-layout")||t,t=t&&t.querySelector("#view"),t=t&&t.firstElementChild,t}(),mt.position.x,mt.position.y),mt.honeycomb.addEventListener("closing",t=>{mt.honeycomb=null})}document.addEventListener("touchstart",mt.handleXYPosition,!1),document.addEventListener("mousedown",mt.handleXYPosition,!1),yt._callService=yt.callService,yt.callService=function(t,e,n,r){if("honeycomb"!=t)return yt._callService(t,e,n,r);var i=function t(e,n){if(!n){n=new Array(6);for(let t=0;t<6;t++)n[t]=new Array}function r(t){return t.buttons&&t.buttons.forEach((t,e)=>{t.position?n[t.position].unshift(t):n[e].unshift(t)}),{buttons:n}}if(!(e=_t.merge({},e)).template||!gt||!gt[e.template])return Object.assign({},e,r(e));let i=t(gt[e.template],n);return delete e.template,Object.assign({},i,e,r(e))}(n);i.entity_id&&!i.entity&&(i.entity=i.entity_id),bt(i)};class wt extends ot{static get is(){return"honeycomb-menu"}static get properties(){return{hass:{type:Object},config:{type:Object},sizes:{type:Object,readonly:!0},variables:{type:Object},closing:{type:Boolean,attribute:!0,reflect:!0},view:{},buttons:{type:Array},_service:{type:Object}}}constructor(){super(),this.closing=!1,this.buttons=[],this._service={x:!1,y:!1}}static get styles(){return s` + }`}render(){return D`
`}get joystick(){return this.shadowRoot.querySelector("#joystick")}firstUpdated(){this.config.x||(this.clampX=0),this.config.y||(this.clampY=0),this._setInitCssPositions(),this._bindListeners(),this._reset()}_setInitCssPositions(){const t=this.joystick;t.style.width=this.size+"px",t.style.height=this.size+"px",t.style.left=`calc( 50% - (${this.size}px / 2) )`,t.style.top=`calc( 50% - (${this.size}px / 2) )`}_bindListeners(){this.addEventListener("touchstart",this._handleOnDragStart,!1),this.addEventListener("touchmove",this._handleOnDrag,!1),document.addEventListener("touchend",this._handleOnDragEnd.bind(this),!1),this.addEventListener("mousedown",this._handleOnDragStart,!1),this.addEventListener("mousemove",this._handleOnDrag,!1),document.addEventListener("mouseup",this._handleOnDragEnd.bind(this),!1)}_reset(){this.active=!1,this.style.zIndex=0,this.joystick.style.transform="translate3d(0, 0, 0)",this._current={x:0,y:0},this._interval&&(clearInterval(this._interval),this._interval=null)}_handleOnDragStart(t){this.active=!0,this.style.zIndex=100,this.dispatchEvent(this.__constructEvent("drag-start")),this.config.repeat&&(this._interval=setInterval(t=>{this.dispatchEvent(this.__constructEvent("drag-interval"))},this.config.repeat))}_setPosition(t,e){t=t-this.joystick.offsetLeft-this.size/2,e=e-this.joystick.offsetTop-this.size/2,this._current.x=bt(t,-this.clampX,this.clampX),this._current.y=bt(e,-this.clampY,this.clampY),this.joystick.style.transform=`translate3d(${this._current.x}px, ${this._current.y}px, 0)`,this.dispatchEvent(this.__constructEvent("drag"))}_handleOnDrag(t){if(this.active){if(t.cancelBubble=!0,"touchmove"===t.type){var e=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-e.left,t.offsetY=t.targetTouches[0].pageY-e.top}this._setPosition(t.offsetX,t.offsetY)}}_handleOnDragEnd(t){this.dispatchEvent(this.__constructEvent("drag-end")),this._reset()}__constructEvent(t){return new CustomEvent(t,this.__constructEventData())}__constructEventData(){let t=this.config.x&&this.config.x.invert?-this._current.x:this._current.x,e=this.config.y&&this.config.y.invert?-this._current.y:this._current.y;return{detail:{x:t,y:e,x_percentage:t/this.clampX*100,y_percentage:e/this.clampY*100}}}}customElements.define(mt.is,mt);const _t=function(){let t=document.querySelector("home-assistant");return t=t&&t.shadowRoot,t=t&&t.querySelector("home-assistant-main"),t=t&&t.shadowRoot,t=t&&t.querySelector("app-drawer-layout partial-panel-resolver")||t.querySelector("ha-drawer partial-panel-resolver"),t=t&&t.shadowRoot||t,t=t&&t.querySelector("ha-panel-lovelace"),t=t&&t.shadowRoot,t=t&&t.querySelector("hui-root"),t&&t.lovelace.config||null}().honeycomb_menu_templates||null,gt=document.querySelector("home-assistant").hass,xt=n(40),$t=n(128),jt=n(159),wt=n(62),At=n(166),St=n(61),Et=n(178),Ot=new function(){this.honeycomb=null,this.position={x:0,y:0},this.handleXYPosition=function(t){this.position.x="touchstart"===t.type?t.touches[0].clientX:t.clientX,this.position.y="touchstart"===t.type?t.touches[0].clientY:t.clientY}.bind(this)};function Pt(t){Ot.honeycomb&&Ot.honeycomb.close(),Ot.honeycomb=document.createElement("honeycomb-menu"),Ot.honeycomb.setConfig(t),Ot.honeycomb.display(function(){let t=document.querySelector("home-assistant");return t=t&&t.shadowRoot,t=t&&t.querySelector("home-assistant-main"),t=t&&t.shadowRoot,t=t&&t.querySelector("app-drawer-layout partial-panel-resolver")||t.querySelector("ha-drawer partial-panel-resolver"),t=t&&t.shadowRoot||t,t=t&&t.querySelector("ha-panel-lovelace"),t=t&&t.shadowRoot,t=t&&t.querySelector("hui-root"),t=t&&t.shadowRoot,t=t&&t.querySelector("ha-app-layout")||t,t=t&&t.querySelector("#view"),t=t&&t.firstElementChild,t}(),Ot.position.x,Ot.position.y),Ot.honeycomb.addEventListener("closing",t=>{Ot.honeycomb=null})}document.addEventListener("touchstart",Ot.handleXYPosition,!1),document.addEventListener("mousedown",Ot.handleXYPosition,!1),gt._callService=gt.callService,gt.callService=function(t,e,n,o){if("honeycomb"!=t)return gt._callService(t,e,n,o);var r=function t(e,n){if(!n){n=new Array(6);for(let t=0;t<6;t++)n[t]=new Array}function o(t){return t.buttons&&t.buttons.forEach((t,e)=>{t.position?n[t.position].unshift(t):n[e].unshift(t)}),{buttons:n}}if(!(e=xt({},e)).template||!_t||!_t[e.template])return Object.assign({},e,o(e));let r=t(_t[e.template],n);return delete e.template,Object.assign({},r,e,o(e))}(n);r.entity_id&&!r.entity&&(r.entity=r.entity_id),Pt(r)};class Ct extends rt{static get is(){return"honeycomb-menu"}static get properties(){return{hass:{type:Object},config:{type:Object},sizes:{type:Object,readonly:!0},variables:{type:Object},closing:{type:Boolean,attribute:!0,reflect:!0},view:{},buttons:{type:Array},_service:{type:Object}}}constructor(){super(),this.closing=!1,this.buttons=[],this._service={x:!1,y:!1}}static get styles(){return c` @keyframes fadeIn { from {opacity: 0; } to { opacity: 1; } } @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } } @keyframes zoomIn { @@ -211,7 +203,6 @@ var rt,it;class ot extends m{constructor(){super(...arguments),this.renderOption animation-name: zoomOut; } :host([closing]) honeycomb-menu-item[selected] { - animation-delay: 800ms !important; animation-duration: 0.75s; animation-name: bounceOut; } @@ -235,7 +226,6 @@ var rt,it;class ot extends m{constructor(){super(...arguments),this.renderOption height: var(--container-height); }`}render(){return D`
- ${this.config.xy_pad?D` D` `)} - `}setConfig(t){lt(this),_t.defaults(t,{action:"hold",entity:null,active:!1,autoclose:!0,variables:{},size:225,spacing:2,animation_speed:100}),this.config=t;let e=this.config.size/3.586;this.sizes={item:e,containerWidth:3*e,containerHeight:2.9*e},this._assignButtons()}display(t,e,n){this.view=t,this.view.style.position="relative",this.view.append(this),this._setPosition(e,n)}firstUpdated(){this._setCssVars()}close(t=null){this.closing||(this.closing=!0,t&&t.setAttribute("selected",""),at(this,"closing",{item:t}),this.shadowRoot.querySelector("#shade").addEventListener("animationend",(function(t){this.remove()})),this.shadowRoot.querySelectorAll("honeycomb-menu-item")[5].addEventListener("animationend",e=>{this.remove(),at(this,"closed",{item:t})}))}_assignButtons(){this.buttons=[];for(let t=0;t<6;t++){let e={};for(let n of this.config.buttons[t])if(void 0!==n.show?n.show=ct(this.hass,this.hass.states[this.config.entity],this.config.variables,n.show):"break"!=n&&"skip"!=n&&(n.show=!0),"break"==n||n.show&&"skip"!=n){e=n;break}"break"==e&&(e={}),this.buttons[t]=_t.merge({},e)}}_setPosition(t,e){let n=this.sizes.containerWidth/2,r=this.sizes.containerHeight/2,i={min:{x:parseFloat(window.getComputedStyle(this.view,null).getPropertyValue("padding-left"))+n,y:parseFloat(window.getComputedStyle(this.view,null).getPropertyValue("padding-top"))+r},max:{x:this.view.clientWidth-n,y:this.view.clientHeight-r}},o=this.view.getBoundingClientRect();t=_t.clamp(t-o.left,i.min.x,i.max.x-5),e=_t.clamp(e-o.top,i.min.y,i.max.y-5),this.style.left=t-n+"px",this.style.top=e-r+"px"}_setCssVarProperty(t,e){this.shadowRoot.querySelector("#honeycombs").style.setProperty(t,`var(${e}, ${this.view.style.getPropertyValue(t)})`,"important")}_setCssVars(){this.style.setProperty("--item-size",this.sizes.item+"px"),this.style.setProperty("--container-width",this.sizes.containerWidth+"px"),this.style.setProperty("--container-height",this.sizes.containerHeight+"px"),this.style.setProperty("--spacing",this.config.spacing+"px"),this._setCssVarProperty("--paper-item-icon-color","--honeycomb-menu-icon-color"),this._setCssVarProperty("--paper-item-icon-active-color","--honeycomb-menu-icon-active-color"),this._setCssVarProperty("--ha-card-background","--honeycomb-menu-background-color"),this._setCssVarProperty("--ha-card-active-background","--honeycomb-menu-active-background-color")}_handleShadeClick(t){t.cancelBubble=!0,this.close()}_handleItemAction(t){t.detail.item&&(this._playButtonSound(t.detail.item),t.detail.autoclose&&this.close(t.detail.item))}_playButtonSound(t){if(!t.config.audio)return;const e=this.shadowRoot.querySelector("#audio");e&&(e.src=t.config.audio,e.play())}_handleXYPad(t){this.config.xy_pad.on_release&&"drag-end"!=t.type||this.config.xy_pad.repeat&&"drag-interval"!=t.type||["x","y"].forEach(e=>{let n=this.config.xy_pad[e];if(0==t.detail[e]||!n||!n.service||this._service[e])return;this._service[e]=!0;let r=_t.split(n.service,".",2);this.hass.callService(r[0],r[1],this.__renderServiceData(t.detail,n.service_data)).then(t=>this._service[e]=!1)})}__renderServiceData(t,e){return e?st(this.hass,this.hass.states[this.config.entity],{},e,e=>"entity"==e?this.config.entity:_t.template(e)(t)):new Object}_computeXYPadSize(){return this.config.size/6}_computeXYPadClamp(){return this.config.size/3}_computeItemSize(){return this.config.size/3}_computeItemConfig(t){return _t.isEmpty(t)?t:_t.omit(_t.merge({},this.config,t),["buttons","size","action","xy_pad","spacing"])}_computeAnimateDelay(t){return this.config.animation_speed*t+"ms"}}customElements.define(wt.is,wt)}]); \ No newline at end of file + `}setConfig(t){ut(this),Et(t,{action:"hold",entity:null,active:!1,autoclose:!0,variables:{},size:225,spacing:2,animation_speed:100}),this.config=t;let e=this.config.size/3.586;this.sizes={item:e,containerWidth:3*e,containerHeight:2.9*e},this._assignButtons()}display(t,e,n){this.view=t,this.view.style.position="relative",this.view.append(this),this._setPosition(e,n)}firstUpdated(){this._setCssVars()}close(t=null){if(this.closing)return;this.closing=!0;let e=t||this.shadowRoot.querySelectorAll("honeycomb-menu-item")[5];t&&(t.setAttribute("selected",""),t.setAttribute("style",`animation-delay: ${this._computeAnimateDelay(3)};`)),st(this,"closing",{item:t}),this.shadowRoot.querySelector("#shade").addEventListener("animationend",(function(t){this.remove()})),e.addEventListener("animationend",e=>{this.remove(),st(this,"closed",{item:t})})}_assignButtons(){this.buttons=[];for(let t=0;t<6;t++){let e={};for(let n of this.config.buttons[t])if(void 0!==n.show?n.show=ct(this.hass,this.hass.states[this.config.entity],this.config.variables,n.show):"break"!=n&&"skip"!=n&&(n.show=!0),"break"==n||n.show&&"skip"!=n){e=n;break}"break"==e&&(e={}),this.buttons[t]=xt({},e)}}_setPosition(t,e){let n=this.sizes.containerWidth/2,o=this.sizes.containerHeight/2,r={min:{x:parseFloat(window.getComputedStyle(this.view,null).getPropertyValue("padding-left"))+n,y:parseFloat(window.getComputedStyle(this.view,null).getPropertyValue("padding-top"))+o},max:{x:this.view.clientWidth-n,y:this.view.clientHeight-o}},i=this.view.getBoundingClientRect();t=wt(t-i.left,r.min.x,r.max.x-5),e=wt(e-i.top,r.min.y,r.max.y-5),this.style.left=t-n+"px",this.style.top=e-o+"px"}_setCssVarProperty(t,e){this.shadowRoot.querySelector("#honeycombs").style.setProperty(t,`var(${e}, ${this.view.style.getPropertyValue(t)})`,"important")}_setCssVars(){this.style.setProperty("--item-size",this.sizes.item+"px"),this.style.setProperty("--container-width",this.sizes.containerWidth+"px"),this.style.setProperty("--container-height",this.sizes.containerHeight+"px"),this.style.setProperty("--spacing",this.config.spacing+"px"),this._setCssVarProperty("--paper-item-icon-color","--honeycomb-menu-icon-color"),this._setCssVarProperty("--paper-item-icon-active-color","--honeycomb-menu-icon-active-color"),this._setCssVarProperty("--ha-card-background","--honeycomb-menu-background-color"),this._setCssVarProperty("--ha-card-active-background","--honeycomb-menu-active-background-color")}_handleShadeClick(t){t.cancelBubble=!0,this.close()}_handleItemAction(t){t.detail.item&&(this._playButtonSound(t.detail.item),t.detail.autoclose&&this.close(t.detail.item))}_playButtonSound(t){if(!t.config.audio)return;let e=document.querySelector("#honeycomb-audio");e||(e=document.createElement("audio"),e.id="honeycomb-audio",document.querySelector("home-assistant").append(e)),e.src=t.config.audio,e.play()}_handleXYPad(t){this.config.xy_pad.on_release&&"drag-end"!=t.type||this.config.xy_pad.repeat&&"drag-interval"!=t.type||["x","y"].forEach(e=>{let n=this.config.xy_pad[e];if(0==t.detail[e]||!n||!n.service||this._service[e])return;this._service[e]=!0;let o=jt(n.service,".",2);this.hass.callService(o[0],o[1],this.__renderServiceData(t.detail,n.service_data)).then(t=>this._service[e]=!1)})}__renderServiceData(t,e){return e?at(this.hass,this.hass.states[this.config.entity],{},e,e=>"entity"==e?this.config.entity:At(e,{interpolate:/{{([\s\S]+?)}}/g})(t)):new Object}_computeXYPadSize(){return this.config.size/6}_computeXYPadClamp(){return this.config.size/3}_computeItemSize(){return this.config.size/3}_computeItemConfig(t){return St(t)?t:$t(xt({},this.config,t),["buttons","size","action","xy_pad","spacing"])}_computeAnimateDelay(t){return this.config.animation_speed*t+"ms"}}customElements.define(Ct.is,Ct)}]); \ No newline at end of file diff --git a/src/event-manager.js b/src/event-manager.js index fe68c6e..2adf4f5 100644 --- a/src/event-manager.js +++ b/src/event-manager.js @@ -1,3 +1,5 @@ +const isArray = require('lodash/isEmpty'); + class EventManager { }; @@ -30,7 +32,7 @@ EventManager.prototype.addEventListener = function( _event, _func, _options ) EventManager.prototype.removeEventListeners = function(_event) { - if( _.isArray(_event) ) + if( isArray(_event) ) return _event.forEach( e => this.removeEventListeners(e) ); this.getEvents(_event).forEach( o => { diff --git a/src/honeycomb-menu-item.js b/src/honeycomb-menu-item.js index 5aa21d0..1386281 100644 --- a/src/honeycomb-menu-item.js +++ b/src/honeycomb-menu-item.js @@ -1,7 +1,11 @@ import { LitElement, html, css } from 'lit'; import { objectEvalTemplate, getTemplateOrValue, provideHass, createCard } from "./helpers.js"; -const _ = require('lodash'); +// const _ = require('lodash'); +const merge = require('lodash/merge'); +const assign = require('lodash/assign'); +const isEmpty = require('lodash/isEmpty'); +const isString = require('lodash/isString'); class HoneycombMenuItem extends LitElement { @@ -66,25 +70,25 @@ class HoneycombMenuItem extends LitElement set config( config ) { - if( config.type == 'break' || _.isEmpty(config) || config.disabled ) + if( config.type == 'break' || isEmpty(config) || config.disabled ) { this.disabled = true; return; } // Assign Defaults - this._config = _.assign({ + this._config = assign({ autoclose: true, audio: true, active: false, variables: {}, }, config); - if( _.isString( this._config.tap_action ) ) + if( isString( this._config.tap_action ) ) this._config.tap_action = {'action': this._config.tap_action}; - if( _.isString( this._config.hold_action ) ) + if( isString( this._config.hold_action ) ) this._config.hold_action = {'action': this._config.hold_action}; - if( _.isString( this._config.double_tap_action ) ) + if( isString( this._config.double_tap_action ) ) this._config.double_tap_action = {'action': this._config.double_tap_action}; if( ! this._config.active ) @@ -206,7 +210,7 @@ class HoneycombMenuItem extends LitElement _createLovelaceCard() { - var card = createCard(_.merge({}, { + var card = createCard(merge({}, { type: 'custom:button-card', size: '30px', show_name: false diff --git a/src/honeycomb-menu.js b/src/honeycomb-menu.js index f35f451..ef1d399 100644 --- a/src/honeycomb-menu.js +++ b/src/honeycomb-menu.js @@ -1,4 +1,4 @@ -const _ = require('lodash'); +// const _ = require('lodash'); import { LitElement, html, css } from 'lit'; import "./honeycomb-menu-item.js"; @@ -7,7 +7,16 @@ import { objectEvalTemplate, getTemplateOrValue, fireEvent, lovelace_view, provi const honeycomb_templates = lovelace_config().honeycomb_menu_templates || null; const hass = document.querySelector('home-assistant').hass; -_.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + +const merge = require('lodash/merge'); +const omit = require('lodash/omit'); +const split = require('lodash/split'); +const clamp = require('lodash/clamp'); +const _template = require('lodash/template'); +const isEmpty = require('lodash/isEmpty'); +const _defaults = require('lodash/defaults'); + +// _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; const manager = new function() { this.honeycomb = null; @@ -66,7 +75,7 @@ function traverseConfigs( _config, _buttons ) // Allow non extensible to be a new object that can be extended. Using // merge will also affect sub properties - _config = _.merge({}, _config ); + _config = merge({}, _config ); if( ! _config.template || ! honeycomb_templates || ! honeycomb_templates[_config.template] ) @@ -240,7 +249,6 @@ class HoneycombMenu extends LitElement animation-name: zoomOut; } :host([closing]) honeycomb-menu-item[selected] { - animation-delay: 800ms !important; animation-duration: 0.75s; animation-name: bounceOut; } @@ -269,7 +277,6 @@ class HoneycombMenu extends LitElement { return html`
- ${(this.config.xy_pad) ? html` html` @@ -300,7 +306,7 @@ class HoneycombMenu extends LitElement { provideHass(this); - _.defaults(config, { + _defaults(config, { action: 'hold', entity: null, active: false, @@ -345,14 +351,20 @@ class HoneycombMenu extends LitElement this.closing = true; - if( _item ) _item.setAttribute('selected', ''); + let ele = _item || this.shadowRoot.querySelectorAll('honeycomb-menu-item')[5]; + if( _item ) + { + _item.setAttribute('selected', ''); + _item.setAttribute('style', `animation-delay: ${this._computeAnimateDelay(3)};`); + } fireEvent(this, 'closing', { item: _item }); // Remove shade div earlier to allow clicking of other lovelace elements while the animation continues this.shadowRoot.querySelector('#shade').addEventListener('animationend', function(e) { this.remove(); }); - this.shadowRoot.querySelectorAll('honeycomb-menu-item')[5].addEventListener('animationend', e => { + + ele.addEventListener('animationend', e => { this.remove(); fireEvent(this, 'closed', { item: _item }); }); @@ -385,7 +397,7 @@ class HoneycombMenu extends LitElement button = {}; // Clone to allow writable object from button-card - this.buttons[i] = _.merge({}, button); + this.buttons[i] = merge({}, button); } } @@ -408,8 +420,8 @@ class HoneycombMenu extends LitElement } let rect = this.view.getBoundingClientRect(); - _x = _.clamp( _x - rect.left, bounds.min.x, bounds.max.x - 5 ); - _y = _.clamp( _y - rect.top, bounds.min.y, bounds.max.y - 5 ); + _x = clamp( _x - rect.left, bounds.min.x, bounds.max.x - 5 ); + _y = clamp( _y - rect.top, bounds.min.y, bounds.max.y - 5 ); this.style.left = `${_x - container.w}px`; this.style.top = `${_y - container.h}px`; @@ -456,12 +468,15 @@ class HoneycombMenu extends LitElement if( ! _item.config.audio ) return; - const audio_ele = this.shadowRoot.querySelector('#audio'); - if( audio_ele ) + let audio_ele = document.querySelector('#honeycomb-audio'); + if( ! audio_ele ) { - audio_ele.src = _item.config.audio; - audio_ele.play(); + audio_ele = document.createElement('audio'); + audio_ele.id = 'honeycomb-audio'; + document.querySelector("home-assistant").append(audio_ele); } + audio_ele.src = _item.config.audio; + audio_ele.play(); } _handleXYPad(e) @@ -477,7 +492,7 @@ class HoneycombMenu extends LitElement return; this._service[axis] = true; - let service = _.split( config.service, '.', 2); + let service = split( config.service, '.', 2); this.hass .callService( service[0], service[1], this.__renderServiceData(e.detail, config.service_data) ) .then(e => this._service[axis] = false); @@ -493,7 +508,7 @@ class HoneycombMenu extends LitElement return objectEvalTemplate( this.hass, this.hass.states[this.config.entity], {}, data, (val) => { if( val == 'entity' ) return this.config.entity; - return _.template(val)(vars); + return _template(val, {interpolate: /{{([\s\S]+?)}}/g})(vars); }); } @@ -514,9 +529,9 @@ class HoneycombMenu extends LitElement _computeItemConfig( item ) { - if( _.isEmpty(item) ) + if( isEmpty(item) ) return item; - return _.omit( _.merge( {}, this.config, item ), ['buttons', 'size', 'action', 'xy_pad', 'spacing'] ); + return omit( merge( {}, this.config, item ), ['buttons', 'size', 'action', 'xy_pad', 'spacing'] ); } _computeAnimateDelay( i ) diff --git a/src/xy-pad.js b/src/xy-pad.js index 94aa2ac..fe5ecc6 100644 --- a/src/xy-pad.js +++ b/src/xy-pad.js @@ -1,5 +1,7 @@ import { LitElement, html, css } from 'lit'; +const clamp = require('lodash/clamp'); + class XYPad extends LitElement { static get is() @@ -142,8 +144,8 @@ class XYPad extends LitElement { _x = _x - this.joystick.offsetLeft - (this.size / 2); _y = _y - this.joystick.offsetTop - (this.size / 2); - this._current.x = _.clamp(_x, -this.clampX, this.clampX); - this._current.y = _.clamp(_y, -this.clampY, this.clampY); + this._current.x = clamp(_x, -this.clampX, this.clampX); + this._current.y = clamp(_y, -this.clampY, this.clampY); this.joystick.style.transform = `translate3d(${this._current.x}px, ${this._current.y}px, 0)`;