Initial Commit
This commit is contained in:
commit
d4a69c41be
2748 files changed
+80489
No files matched your search
@@ -0,0 +1,78 @@
|
||||
var t,e,n,o,i,r,a,s,l,c,u,h,d,p,f,m,v,g,_,y,b,k,w,C,E,x,A,S,T,M,z,O,I,j,P,N,B,L,H,D,R,U,V,F,$,G,K,Y,q,W,X,Z,J,Q,tt,et,nt,ot,it,rt,at,st,lt,ct,ut,ht,dt,pt,ft,mt,vt,gt,_t,yt,bt,kt,wt,Ct,Et,xt,At,St,Tt,Mt,zt,Ot,It,jt,Pt,Nt,Bt,Lt,Ht,Dt,Rt,Ut,Vt,Ft,$t,Gt,Kt,Yt,qt,Wt,Xt,Zt,Jt,Qt,te,ee,ne,oe,ie,re,ae,se,le,ce,ue,he,de,pe,fe,me,ve,ge,_e,ye,be,ke,we,Ce,Ee,xe,Ae,Se,Te,Me,ze,Oe,Ie,je,Pe,Ne,Be,Le,He,De,Re,Ue,Ve,Fe,$e,Ge,Ke,Ye,qe,We,Xe,Ze,Je,Qe,tn,en,nn,on,rn,an,sn,ln,cn,un,hn,dn,pn,fn,mn,vn,gn,_n,yn,bn,kn,wn,Cn,En,xn,An,Sn,Tn,Mn,zn,On,In,jn,Pn,Nn,Bn,Ln,Hn,Dn,Rn,Un,Vn,Fn,$n,Gn,Kn,Yn,qn,Wn,Xn,Zn,Jn,Qn,to,eo,no,oo,io,ro,ao,so,lo,co,uo,ho,po,fo,mo,vo,go,_o,yo,bo,ko,wo,Co,Eo,xo,Ao,So,To,Mo,zo,Oo,Io,jo,Po,No,Bo,Lo,Ho,Do,Ro,Uo,Vo,Fo,$o,Go,Ko,Yo,qo,Wo,Xo,Zo,Jo,Qo,ti,ei,ni,oi,ii,ri,ai,si,li,ci,ui,hi,di,pi,fi,mi,vi,gi,_i,yi,bi,ki,wi,Ci,Ei,xi,Ai,Si,Ti,Mi,zi,Oi,Ii,ji,Pi,Ni,Bi=["message","explanation"];function Li(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Hi(t){return Xi(t)||Yi(t)||cr(t)||Wi()}function Di(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(mr(t)+" is not iterable")}var Ri=Zi().m(ds);function Ui(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Vi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ui(Object(n),!0).forEach((function(e){Fi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ui(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Fi(t,e,n){return(e=fr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $i(t,e,n,o){var i=Gi(sr(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function Gi(){return Gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sr(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Gi.apply(null,arguments)}function Ki(t){return function(t){if(Array.isArray(t))return ur(t)}(t)||Yi(t)||cr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yi(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function qi(t,e){return Xi(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=r.call(n)).done)&&(s.push(o.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||cr(t,e)||Wi()}function Wi(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xi(t){if(Array.isArray(t))return t}function Zi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var l=o&&o.prototype instanceof s?o:s,c=Object.create(l.prototype);return Ji(c,"_invoke",function(n,o,i){var r,s,l,c=0,u=i||[],h=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return r=e,s=0,l=t,d.n=n,a}};function p(n,o){for(s=n,l=o,e=0;!h&&c&&!i&&e<u.length;e++){var i,r=u[e],p=d.p,f=r[2];n>3?(i=f===o)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=p&&((i=n<2&&p<r[1])?(s=0,d.v=o,d.n=r[1]):p<f&&(i=n<3||r[0]>o||o>f)&&(r[4]=n,r[5]=o,d.n=f,s=0))}if(i||n>1)return a;throw h=!0,o}return function(i,u,f){if(c>1)throw TypeError("Generator is already running");for(h&&1===u&&p(u,f),s=u,l=f;(e=s<2?t:l)||!h;){r||(s?s<3?(s>1&&(d.n=-1),p(s,l)):d.n=l:d.v=l);try{if(c=2,r){if(s||(i="next"),e=r[i]){if(!(e=e.call(r,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=t}else if((e=(h=d.n<0)?l:n.call(o,d))!==a)break}catch(e){r=t,s=1,l=e}finally{c=1}}return{value:e,done:h}}}(n,i,r),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][o]?e(e([]Line truncated
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
var wr=globalThis,Cr=wr.ShadowRoot&&(void 0===wr.ShadyCSS||wr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Er=Symbol(),xr=new WeakMap,Ar=function(){return pr((function t(e,n,o){if(hr(this,t),this._$cssResult$=!0,o!==Er)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}),[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(Cr&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=xr.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&xr.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}])}(),Sr=function(t){return new Ar("string"==typeof t?t:t+"",void 0,Er)},Tr=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];var i=1===t.length?t[0]:n.reduce((function(e,n,o){return e+function(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 Ar(i,t,Er)},Mr=Cr?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",o=lr(t.cssRules);try{for(o.s();!(e=o.n()).done;){n+=e.value.cssText}}catch(t){o.e(t)}finally{o.f()}return Sr(n)}(t):t},zr=Object.is,Or=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,jr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertySymbols,Nr=Object.getPrototypeOf,Br=globalThis,Lr=Br.trustedTypes,Hr=Lr?Lr.emptyScript:"",Dr=Br.reactiveElementPolyfillSupport,Rr=function(t,e){return t},Ur={toAttribute:function(t,e){switch(e){case Boolean:t=t?Hr:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var 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}},Vr=function(t,e){return!zr(t,e)},Fr={attribute:!0,type:String,converter:Ur,reflect:!1,useDefault:!1,hasChanged:Vr};null!==(t=Symbol.metadata)&&void 0!==t||(Symbol.metadata=Symbol("metadata")),null!==(e=Br.litPropertyMetadata)&&void 0!==e||(Br.litPropertyMetadata=new WeakMap);var $r=function(t){function e(){var t;return hr(this,e),(t=er(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return or(e,ir(HTMLElement)),pr(e,[{key:"_$Ev",value:function(){var t,e=this;this._$ES=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$EO)&&void 0!==e?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$EO)||void 0===e||e.delete(t)}},{key:"_$E_",value:function(){var t,e=new Map,n=lr(this.constructor.elementProperties.keys());try{for(n.s();!(t=n.n()).done;){var o=t.value;this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o])}}catch(t){n.e(t)}finally{n.f()}e.size>0&&(this._$Ep=e)}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){if(Cr)t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet}));else{var n,o=lr(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,r=document.createElement("style"),a=wr.litNonce;void 0!==a&&r.setAttribute("nonce",a),r.textContent=i.cssText,t.appendChild(r)}}catch(t){o.e(t)}finally{o.f()}}}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$EO)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ET",value:function(t,e){var n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(void 0!==o&&!0===n.reflect){var i,r=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:Ur).toAttribute(e,n.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}},{key:"_$AK",value:function(t,e){var n=this.constructor,o=n._$Eh.get(t);if(void 0!==o&&this._$Em!==o){var i,r,a,s=n.getPropertyOptions(o),l="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(i=s.converter)||void 0===i?void 0:i.fromAttribute)?s.converter:Ur;this._$Em=o;vLine truncated
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
var Gr=globalThis,Kr=Gr.trustedTypes,Yr=Kr?Kr.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,qr="$lit$",Wr="lit$".concat(Math.random().toFixed(9).slice(2),"$"),Xr="?"+Wr,Zr="<".concat(Xr,">"),Jr=document,Qr=function(){return Jr.createComment("")},ta=function(t){return null===t||"object"!=mr(t)&&"function"!=typeof t},ea=Array.isArray,na="[ \t\n\f\r]",oa=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ia=/-->/g,ra=/>/g,aa=RegExp(">|".concat(na,"(?:([^\\s\"'>=/]+)(").concat(na,"*=").concat(na,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),sa=/'/g,la=/"/g,ca=/^(?:script|style|textarea|title)$/i,ua=function(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return{_$litType$:t,strings:e,values:o}}},ha=ua(1),da=ua(2),pa=Symbol.for("lit-noChange"),fa=Symbol.for("lit-nothing"),ma=new WeakMap,va=Jr.createTreeWalker(Jr,129);function ga(t,e){if(!ea(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Yr?Yr.createHTML(e):e}var _a=function(t,e){for(var n,o=t.length-1,i=[],r=2===e?"<svg>":3===e?"<math>":"",a=oa,s=0;s<o;s++){for(var l=t[s],c=void 0,u=void 0,h=-1,d=0;d<l.length&&(a.lastIndex=d,null!==(u=a.exec(l)));)d=a.lastIndex,a===oa?"!--"===u[1]?a=ia:void 0!==u[1]?a=ra:void 0!==u[2]?(ca.test(u[2])&&(n=RegExp("</"+u[2],"g")),a=aa):void 0!==u[3]&&(a=aa):a===aa?">"===u[0]?(a=null!=n?n:oa,h=-1):void 0===u[1]?h=-2:(h=a.lastIndex-u[2].length,c=u[1],a=void 0===u[3]?aa:'"'===u[3]?la:sa):a===la||a===sa?a=aa:a===ia||a===ra?a=oa:(a=aa,n=void 0);var p=a===aa&&t[s+1].startsWith("/>")?" ":"";r+=a===oa?l+Zr:h>=0?(i.push(c),l.slice(0,h)+qr+l.slice(h)+Wr+p):l+Wr+(-2===h?s:p)}return[ga(t,r+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]},ya=function(){return pr((function t(e,n){var o,i=e.strings,r=e._$litType$;hr(this,t),this.parts=[];var a=0,s=0,l=i.length-1,c=this.parts,u=qi(_a(i,r),2),h=u[0],d=u[1];if(this.el=t.createElement(h,n),va.currentNode=this.el.content,2===r||3===r){var p=this.el.content.firstChild;p.replaceWith.apply(p,Ki(p.childNodes))}for(;null!==(o=va.nextNode())&&c.length<l;){if(1===o.nodeType){if(o.hasAttributes()){var f,m=lr(o.getAttributeNames());try{for(m.s();!(f=m.n()).done;){var v=f.value;if(v.endsWith(qr)){var g=d[s++],_=o.getAttribute(v).split(Wr),y=/([.?@])?(.*)/.exec(g);c.push({type:1,index:a,name:y[2],strings:_,ctor:"."===y[1]?Ea:"?"===y[1]?xa:"@"===y[1]?Aa:Ca}),o.removeAttribute(v)}else v.startsWith(Wr)&&(c.push({type:6,index:a}),o.removeAttribute(v))}}catch(t){m.e(t)}finally{m.f()}}if(ca.test(o.tagName)){var b=o.textContent.split(Wr),k=b.length-1;if(k>0){o.textContent=Kr?Kr.emptyScript:"";for(var w=0;w<k;w++)o.append(b[w],Qr()),va.nextNode(),c.push({type:2,index:++a});o.append(b[k],Qr())}}}else if(8===o.nodeType)if(o.data===Xr)c.push({type:2,index:a});else for(var C=-1;-1!==(C=o.data.indexOf(Wr,C+1));)c.push({type:7,index:a}),C+=Wr.length-1;a++}}),null,[{key:"createElement",value:function(t,e){var n=Jr.createElement("template");return n.innerHTML=t,n}}])}();function ba(t,e){var n,o,i,r,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,l=arguments.length>3?arguments[3]:void 0;if(e===pa)return e;var c=void 0!==l?null===(n=s._$Co)||void 0===n?void 0:n[l]:s._$Cl,u=ta(e)?void 0:e._$litDirective$;return(null===(o=c)||void 0===o?void 0:o.constructor)!==u&&(null!==(i=c)&&void 0!==i&&null!==(r=i._$AO)&&void 0!==r&&r.call(i,!1),void 0===u?c=void 0:(c=new u(t))._$AT(t,s,l),void 0!==l?(null!==(a=s._$Co)&&void 0!==a?a:s._$Co=[])[l]=c:s._$Cl=c),void 0!==c&&(e=ba(t,c._$AS(t,e.values),c,l)),e}var ka=function(){return pr((function t(e,n){hr(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}),[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,o=n.el.content,i=n.parts,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:Jr).importNode(o,!0);va.currentNode=r;for(var a=va.nextNode(),s=0,l=0,c=i[0];void 0!==c;){var u;if(s===c.index){var h=void 0;2===c.type?h=new wa(a,a.nextSibling,this,t):1===c.type?h=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(h=new Sa(a,this,t)),this._$AV.push(h),c=i[++l]}s!==(null===(u=c)||void 0===u?void 0:u.index)&&(a=va.nextNode(),s++)}return va.currentNode=Jr,r}},{key:"p",value:function(t){var e,n=0,o=lr(this._$AV);try{for(o.s();!(e=o.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){o.e(t)}finally{o.f()}}}])}(),wa=function(){function t(e,n,o,i){var r;hr(this,t),this.type=2,this._$AH=fa,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=o,this.options=i,this._$Cv=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}return pr(t,[{key:"_$AU",get:function(){var t,e;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cv}},{key:"parentNode",get:function(){var t,e=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(t=e)||void 0=Line truncated
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/za._$litElement$=!0,za.finalized=!0,null===(i=Ma.litElementHydrateSupport)||void 0===i||i.call(Ma,{LitElement:za});var Oa=Ma.litElementPolyfillSupport;null==Oa||Oa({LitElement:za}),(null!==(r=Ma.litElementVersions)&&void 0!==r?r:Ma.litElementVersions=[]).push("4.2.1");
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
var Ia=function(t){return function(e,n){void 0!==n?n.addInitializer((function(){customElements.define(t,e)})):customElements.define(t,e)}},ja={attribute:!0,type:String,converter:Ur,reflect:!1,hasChanged:Vr},Pa=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ja,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=n.kind,i=n.metadata,r=globalThis.litPropertyMetadata.get(i);if(void 0===r&&globalThis.litPropertyMetadata.set(i,r=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),r.set(n.name,t),"accessor"===o){var a=n.name;return{set:function(n){var o=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,o,t)},init:function(e){return void 0!==e&&this.C(a,void 0,t,e),e}}}if("setter"===o){var s=n.name;return function(n){var o=this[s];e.call(this,n),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+o)};
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function Na(t){return function(e,n){return"object"==mr(n)?Pa(t,e,n):function(t,e,n){var o=e.hasOwnProperty(n);return e.constructor.createProperty(n,t),o?Object.getOwnPropertyDescriptor(e,n):void 0}(t,e,n)}}
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function Ba(t){return Na(Vi(Vi({},t),{},{state:!0,attribute:!1}))}
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
function La(t,e){return function(e,n,o){return function(t,e,n){return n.configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=mr(e)&&Object.defineProperty(t,e,n),n}(e,n,{get:function(){return function(e){var n,o;return null!==(n=null===(o=e.renderRoot)||void 0===o?void 0:o.querySelector(t))&&void 0!==n?n:null}(this)}})}}
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/var Ha,Da,Ra,Ua,Va,Fa=1,$a=function(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return{_$litDirective$:t,values:n}}},Ga=function(){return pr((function t(e){hr(this,t)}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,Ki(e))}}])}(),Ka=$a(function(t){function e(t){var n,o;if(hr(this,e),o=er(this,e,[t]),t.type!==Fa||"class"!==t.name||(null===(n=t.strings)||void 0===n?void 0:n.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return o}return or(e,Ga),pr(e,[{key:"render",value:function(t){return" "+Object.keys(t).filter((function(e){return t[e]})).join(" ")+" "}},{key:"update",value:function(t,e){var n=qi(e,1)[0];if(void 0===this.st){for(var o in this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((function(t){return""!==t})))),n){var i;n[o]&&(null===(i=this.nt)||void 0===i||!i.has(o))&&this.st.add(o)}return this.render(n)}var r,a=t.element.classList,s=lr(this.st);try{for(s.s();!(r=s.n()).done;){var l=r.value;l in n||(a.remove(l),this.st.delete(l))}}catch(t){s.e(t)}finally{s.f()}for(var c in n){var u,h=!!n[c];h===this.st.has(c)||(null===(u=this.nt)||void 0===u?void 0:u.has(c))||(h?(a.add(c),this.st.add(c)):(a.remove(c),this.st.delete(c)))}return pa}}])}()),Ya="important",qa=" !"+Ya,Wa=$a(function(t){function e(t){var n,o;if(hr(this,e),o=er(this,e,[t]),t.type!==Fa||"style"!==t.name||(null===(n=t.strings)||void 0===n?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return o}return or(e,Ga),pr(e,[{key:"render",value:function(t){return Object.keys(t).reduce((function(e,n){var o=t[n];return null==o?e:e+"".concat(n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(o,";")}),"")}},{key:"update",value:function(t,e){var n=qi(e,1)[0],o=t.element.style;if(void 0===this.ft)return this.ft=new Set(Object.keys(n)),this.render(n);var i,r=lr(this.ft);try{for(r.s();!(i=r.n()).done;){var a=i.value;null==n[a]&&(this.ft.delete(a),a.includes("-")?o.removeProperty(a):o[a]=null)}}catch(t){r.e(t)}finally{r.f()}for(var s in n){var l=n[s];if(null!=l){this.ft.add(s);var c="string"==typeof l&&l.endsWith(qa);s.includes("-")||c?o.setProperty(s,c?l.slice(0,-11):l,c?Ya:""):o[s]=l}}return pa}}])}()),Xa=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"]),Za=function(t,e,n,o){o=o||{},n=null==n?{}:n;var i=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return i.detail=n,t.dispatchEvent(i),i},Ja=function(t){return t.substr(0,t.indexOf("."))},Qa=function(t){return Ja(t.entity_id)},ts=function(t,e){return es(t.attributes,e)},es=function(t,e){return 0!=(t.supported_features&e)},ns=function(t,e,n){return Math.min(Math.max(t,e),n)};!function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(Ha||(Ha={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(Da||(Da={})),function(t){t.local="local",t.server="server"}(Ra||(Ra={})),function(t){t.language="language",t.system="system",t.DMY="DMY",t.MDY="MDY",t.YMD="YMD"}(Ua||(Ua={})),function(t){t.language="language",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday",t.sunday="sunday"}(Va||(Va={}));var os=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},is=function(t,e,n){var o=e?function(t){switch(t.number_format){case Ha.comma_decimal:return["en-US","en"];case Ha.decimal_comma:return["de","es","it"];case Ha.space_comma:return["fr","sv","cs"];case Ha.system:return;default:return t.language}}(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==Ha.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,rs(t,n)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,rs(t,n)).format(Number(t))}return"string"==typeof t?t:"".concat(os(t,null==n?void 0:n.maximumFractionDigits).toString()).concat("currency"===(null==n?void 0:n.style)?" ".concat(n.currency):"")},rs=function(t,e){var n=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return n;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){var o=t.indexOf(".")>-1?t.split(".")[1].length:0;n.minimumFractionDigits=o,n.maximumFractionDigits=o}return n},as=function(t){function e(t,n){var o,i;hr(this,e);var r=t.message,a=t.explanation,s=fLine truncated
|
||||
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
||||
* http://hammerjs.github.io/
|
||||
*
|
||||
* Copyright (c) 2016 Jorik Tangelder;
|
||||
* Licensed under the MIT license */xg||(xg=1,Ag=Sg,function(t,e,n,o){var i,r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),s="function",l=Math.round,c=Math.abs,u=Date.now;function h(t,e,n){return setTimeout(_(t,n),e)}function d(t,e,n){return!!Array.isArray(t)&&(p(t,n[e],n),!0)}function p(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==o)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function f(e,n,o){var i="DEPRECATED METHOD: "+n+"\n"+o+" AT \n";return function(){var n=new Error("get-stack-trace"),o=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,i,o),e.apply(this,arguments)}}i="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==o&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var m=f((function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===o)&&(t[i[r]]=e[i[r]]),r++;return t}),"extend","Use `assign`."),v=f((function(t,e){return m(t,e,!0)}),"merge","Use `assign`.");function g(t,e,n){var o,r=e.prototype;(o=t.prototype=Object.create(r)).constructor=t,o._super=r,n&&i(o,n)}function _(t,e){return function(){return t.apply(e,arguments)}}function y(t,e){return mr(t)==s?t.apply(e&&e[0]||o,e):t}function b(t,e){return t===o?e:t}function k(t,e,n){p(x(e),(function(e){t.addEventListener(e,n,!1)}))}function w(t,e,n){p(x(e),(function(e){t.removeEventListener(e,n,!1)}))}function C(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function E(t,e){return t.indexOf(e)>-1}function x(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var o=0;o<t.length;){if(n&&t[o][n]==e||!n&&t[o]===e)return o;o++}return-1}function S(t){return Array.prototype.slice.call(t,0)}function T(t,e,n){for(var o=[],i=[],r=0;r<t.length;){var a=t[r][e];A(i,a)<0&&o.push(t[r]),i[r]=a,r++}return o=o.sort((function(t,n){return t[e]>n[e]})),o}function M(t,e){for(var n,i,a=e[0].toUpperCase()+e.slice(1),s=0;s<r.length;){if((i=(n=r[s])?n+a:e)in t)return i;s++}return o}var z=1;function O(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var I="ontouchstart"in t,j=M(t,"PointerEvent")!==o,P=I&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N="touch",B="mouse",L=25,H=1,D=4,R=8,U=1,V=2,F=4,$=8,G=16,K=V|F,Y=$|G,q=K|Y,W=["x","y"],X=["clientX","clientY"];function Z(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){y(t.options.enable,[t])&&n.handler(e)},this.init()}function J(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,a=e&H&&i-r==0,s=e&(D|R)&&i-r==0;n.isFirst=!!a,n.isFinal=!!s,a&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=Q(e)),r>1&&!n.firstMultiple?n.firstMultiple=Q(e):1===r&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,h=e.center=tt(i);e.timeStamp=u(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=it(l,h),e.distance=ot(l,h),function(t,e){var n=e.center,o=t.offsetDelta||{},i=t.prevDelta||{},r=t.prevInput||{};e.eventType!==H&&r.eventType!==D||(i=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},o=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-o.x),e.deltaY=i.y+(n.y-o.y)}(n,e),e.offsetDirection=nt(e.deltaX,e.deltaY);var d,p,f=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=f.x,e.overallVelocityY=f.y,e.overallVelocity=c(f.x)>c(f.y)?f.x:f.y,e.scale=s?(d=s.pointers,ot((p=i)[0],p[1],X)/ot(d[0],d[1],X)):1,e.rotation=s?function(t,e){return it(e[1],e[0],X)+it(t[1],t[0],X)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,a,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=R&&(l>L||s.velocity===o)){var u=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,d=et(l,u,h);i=d.x,r=d.y,n=c(d.x)>c(d.y)?d.x:d.y,a=nt(u,h),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=a}(n,e);var m=t.element;C(e.srcEvent.target,m)&&(m=e.srcEvent.target),e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Q(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:e,center:tt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function tt(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,o=0,i=0;i<e;)n+=t[i].clientX,o+=t[i].clientY,i++;return{x:l(n/e),y:l(o/e)}}function et(t,e,n){return{x:e/t||0,y:n/t||0}}function nt(t,e){return t===e?U:c(t)>=c(Line truncated
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
var ny=function(t){return null!=t?t:fa},oy=new Set(["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white"]),iy=new Set(["primary-text","secondary-text","disabled-text","disabled"]);function ry(t){if(oy.has(t)||iy.has(t))return"var(--".concat(t,"-color)");if(function(t){return/^\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*$/.test(t)}(t)){var e=t.split(",").map((function(t){return t.trim()}));return"rgb(".concat(e.join(", "),")")}return t}var ay=/{%|{{/,sy=function(t){return ay.test(t)},ly=As({index:Ss(xs()),view_index:Ss(xs()),view_layout:bs(),type:Ts(),layout_options:bs(),grid_options:bs(),visibility:bs()}),cy=gs(ly,As({entity:Ss(Ts()),area:Ss(Ts()),primary:Ss(Ts()),secondary:Ss(Ts()),color:Ss(Ts()),icon:Ss(Ts()),picture:Ss(Ts()),badge_icon:Ss(Ts()),badge_text:Ss(Ts()),badge_color:Ss(Ts()),vertical:Ss(ws()),multiline_secondary:Ss(ws()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml),icon_tap_action:Ss(ml),icon_hold_action:Ss(ml),icon_double_tap_action:Ss(ml),features:Ss(ks(bs())),features_position:Ss(Cs(["bottom","inline"])),entity_id:Ss(zs([Ts(),ks(Ts())])),icon_color:Ss(Ts()),layout:Ss(Ts()),fill_container:Ss(ws())})),uy=function(t){var e=Object.assign({},t);return e.icon_color&&(delete e.icon_color,null==e.color&&(e.color=t.icon_color)),e.layout&&(delete e.layout,null==e.vertical&&(e.vertical="vertical"===t.layout)),delete e.fill_container,e},hy=function(t){var e=Ja(t);return Xa.has(e)||["button","input_button","scene"].includes(e)?"toggle":"none"};rv({type:"mushroom-template-card",name:"Mushroom Template",description:"Build your own Mushroom card using templates"});var dy=new Uv(1e3),py=["icon","color","primary","secondary","picture","badge_icon","badge_color","badge_text"],fy=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments))._unsubRenderTemplates=new Map,t._featureContext=Ws((function(t){return{entity_id:t.entity,area_id:t.area}})),t._featurePosition=Ws((function(t){return t.vertical?"bottom":t.features_position||"bottom"})),t._displayedFeatures=Ws((function(e){var n=e.features||[];return"inline"===t._featurePosition(e)?n.slice(0,1):n})),t}return or(e,za),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),this._tryConnect()}},{key:"disconnectedCallback",value:function(){if($i(e,"disconnectedCallback",this,3)([]),this._tryDisconnect(),this._config&&this._templateResults){var t=this._computeCacheKey();dy.set(t,this._templateResults)}}},{key:"_computeCacheKey",value:function(){return Rv(this._config)}},{key:"willUpdate",value:function(t){if($i(e,"willUpdate",this,3)([t]),this._config&&!this._templateResults){var n=this._computeCacheKey();dy.has(n)?this._templateResults=dy.get(n):this._templateResults={}}}},{key:"updated",value:function(t){$i(e,"updated",this,3)([t]),this._config&&this.hass&&this._tryConnect()}},{key:"_getTemplateKeyValue",value:function(t){var e;return this._config&&null!==(e=this._config[t])&&void 0!==e?e:""}},{key:"_tryConnect",value:(a=tr(Zi().m((function t(){var e=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:py.forEach((function(t){e._tryConnectKey(t)}));case 1:return t.a(2)}}),t)}))),function(){return a.apply(this,arguments)})},{key:"_tryConnectKey",value:(r=tr(Zi().m((function t(e){var n,o,i,r,a=this;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:if(void 0===this._unsubRenderTemplates.get(e)&&this.hass&&this._config){t.n=1;break}return t.a(2);case 1:if(o=this._getTemplateKeyValue(e),sy(o)){t.n=2;break}return t.a(2);case 2:return t.p=2,i=tl(this.hass.connection,(function(t){a._templateResults=Object.assign(Object.assign({},a._templateResults),Fi({},e,t))}),{template:o,entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity,area:this._config.area},strict:!0}),this._unsubRenderTemplates.set(e,i),t.n=3,i;case 3:t.n=5;break;case 4:t.p=4,t.v,r={result:null!==(n=this._config[e])&&void 0!==n?n:"",listeners:{all:!1,domains:[],entities:[],time:!1}},this._templateResults=Object.assign(Object.assign({},this._templateResults),Fi({},e,r)),this._unsubRenderTemplates.delete(e);case 5:return t.a(2)}}),t,this,[[2,4]])}))),function(t){return r.apply(this,arguments)})},{key:"_tryDisconnect",value:(i=tr(Zi().m((function t(){var e=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:py.forEach((function(t){e._tryDisconnectKey(t)}));case 1:return t.a(2)}}),t)}))),function(){return i.apply(this,arguments)})},{key:"_tryDisconnectKey",value:(o=tr(Zi().m((function t(e){var n,o;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:if(n=this._unsubRenderTemplates.get(e)){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,n;case 2:(0,t.v)(),this._unsubRenderTemplates.delete(e),t.n=5;break;case 3:if(t.p=3,"not_found"!==(o=t.v).code&&"template_error"!==o.code){t.n=4;break}t.n=5Line truncated
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
var NC,BC={},LC=$a(function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).ot=BC,t}return or(e,Ga),pr(e,[{key:"render",value:function(t,e){return e()}},{key:"update",value:function(t,e){var n=this,o=qi(e,2),i=o[0],r=o[1];if(Array.isArray(i)){if(Array.isArray(this.ot)&&this.ot.length===i.length&&i.every((function(t,e){return t===n.ot[e]})))return pa}else if(this.ot===i)return pa;return this.ot=Array.isArray(i)?Array.from(i):i,this.render(i,r)}}])}()),HC={},DC=$a(function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).key=fa,t}return or(e,Ga),pr(e,[{key:"render",value:function(t,e){return this.key=t,e}},{key:"update",value:function(t,e){var n=qi(e,2),o=n[0],i=n[1];return o!==this.key&&(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:HC;t._$AH=e}(t),this.key=o),i}}])}()),RC=new Set(["spacer"]),UC=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments))._attached=!1,t._renderEmptySortable=!1,t._selectorKey=0,t}return or(e,Zm),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),this._attached=!0}},{key:"disconnectedCallback",value:function(){$i(e,"disconnectedCallback",this,3)([]),this._attached=!1}},{key:"render",value:function(){var t=this;if(!this.chips||!this.hass)return fa;var e=vd(this.hass);return ha(ci||(ci=Li(["\n <h3>\n ",'\n </h3>\n <div class="chips">\n ',"\n </div>\n ","\n "])),this.label||"".concat(e("editor.chip.chip-picker.chips")," (").concat(this.hass.localize("ui.panel.lovelace.editor.card.config.required"),")"),LC([this.chips,this._renderEmptySortable],(function(){return t._renderEmptySortable?"":t.chips.map((function(n,o){return ha(ui||(ui=Li(['\n <div class="chip">\n <div class="handle">\n <ha-icon icon="mdi:drag"></ha-icon>\n </div>\n ',"\n ","\n <ha-icon-button\n .label=",'\n class="remove-icon"\n .index=',"\n @click=",'\n >\n <ha-icon icon="mdi:close"></ha-icon>\n </ha-icon-button>\n </div>\n '])),ha(hi||(hi=Li(['\n <div class="special-row">\n <div>\n <span> ','</span>\n <span class="secondary">\n ',"\n </span>\n </div>\n </div>\n "])),t._renderChipLabel(n),t._renderChipSecondary(n)),RC.has(n.type)?fa:ha(di||(di=Li(["\n <ha-icon-button\n .label=",'\n class="edit-icon"\n .index=',"\n @click=",'\n >\n <ha-icon icon="mdi:pencil"></ha-icon>\n </ha-icon-button>\n '])),e("editor.chip.chip-picker.edit"),o,t._editChip),e("editor.chip.chip-picker.clear"),o,t._removeChip)}))})),DC(this._selectorKey,ha(pi||(pi=Li(["<ha-selector\n .hass=","\n .label=","\n .value=","\n .selector=","\n @value-changed=","\n ></ha-selector>"])),this.hass,e("editor.chip.chip-picker.add"),"",{select:{options:yC.map((function(t){return{value:t,label:e("editor.chip.chip-picker.types.".concat(t))}})),mode:"dropdown"}},this._addChips)))}},{key:"updated",value:function(t){var n;$i(e,"updated",this,3)([t]);var o=t.has("_attached"),i=t.has("chips");if(i||o)return o&&!this._attached?(null===(n=this._sortable)||void 0===n||n.destroy(),void(this._sortable=void 0)):void(this._sortable||!this.chips?i&&this._handleChipsChanged():this._createSortable())}},{key:"_handleChipsChanged",value:(i=tr(Zi().m((function t(){var e;return Zi().w((function(t){for(;;)switch(t.n){case 0:return this._renderEmptySortable=!0,t.n=1,this.updateComplete;case 1:for(e=this.shadowRoot.querySelector(".chips");e.lastElementChild;)e.removeChild(e.lastElementChild);this._renderEmptySortable=!1;case 2:return t.a(2)}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_createSortable",value:(o=tr(Zi().m((function t(){var e,n=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:if(NC){t.n=2;break}return t.n=1,Promise.resolve().then((function(){return PS}));case 1:e=t.v,(NC=e.Sortable).mount(e.OnSpill),NC.mount(e.AutoScroll());case 2:this._sortable=new NC(this.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:function(){var t=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,n._chipMoved(e))}),t)})));return function(e){return t.apply(this,arguments)}}()});case 3:return t.a(2)}}),t,this)}))),function(){return o.apply(this,arLine truncated
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/br([Na({attribute:!1})],UC.prototype,"chips",void 0),br([Na()],UC.prototype,"label",void 0),br([Ba()],UC.prototype,"_attached",void 0),br([Ba()],UC.prototype,"_renderEmptySortable",void 0),br([Ba()],UC.prototype,"_selectorKey",void 0),UC=br([Ia("mushroom-chips-card-chips-editor")],UC);var VC=As({type:Es("action"),icon:Ss(Ts()),icon_color:Ss(Ts()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml)}),FC=As({type:Es("back"),icon:Ss(Ts()),icon_color:Ss(Ts())}),$C=As({type:Es("entity"),entity:Ss(Ts()),name:Ss(Ts()),content_info:Ss(Ts()),icon:Ss(Ts()),icon_color:Ss(Ts()),use_entity_picture:Ss(ws()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml)}),GC=As({type:Es("menu"),icon:Ss(Ts()),icon_color:Ss(Ts())}),KC=As({type:Es("quickbar"),icon:Ss(Ts()),mode:Ss(Cs(["command","device","entity"]))}),YC=As({type:Es("weather"),entity:Ss(Ts()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml),show_temperature:Ss(ws()),show_conditions:Ss(ws())}),qC=As({type:Es("conditional"),chip:Ss(bs()),conditions:Ss(ks(bs()))}),WC=As({type:Es("light"),entity:Ss(Ts()),name:Ss(Ts()),content_info:Ss(Ts()),icon:Ss(Ts()),use_light_color:Ss(ws()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml)}),XC=As({type:Es("template"),entity:Ss(Ts()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml),content:Ss(Ts()),icon:Ss(Ts()),icon_color:Ss(Ts()),picture:Ss(Ts()),entity_id:Ss(zs([Ts(),ks(Ts())]))}),ZC=As({type:Es("spacer")}),JC=ys((function(t){if(t&&"object"===mr(t)&&"type"in t)switch(t.type){case"action":return VC;case"back":return FC;case"entity":return $C;case"menu":return GC;case"quickbar":return KC;case"weather":return YC;case"conditional":return qC;case"light":return WC;case"template":return XC;case"spacer":return ZC}return As()})),QC=gs(ly,As({chips:ks(JC),alignment:Ss(Ts())})),tE=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,Zm),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),Yv()}},{key:"setConfig",value:function(t){ms(t,QC),this._config=t}},{key:"_title",get:function(){return this._config.title||""}},{key:"_theme",get:function(){return this._config.theme||""}},{key:"render",value:function(){var t;if(!this.hass||!this._config)return fa;if(this._subElementEditorConfig)return ha(mi||(mi=Li(["\n <mushroom-sub-element-editor\n .hass=","\n .config=","\n @go-back=","\n @config-changed=","\n >\n </mushroom-sub-element-editor>\n "])),this.hass,this._subElementEditorConfig,this._goBack,this._handleSubElementChanged);var e=vd(this.hass);return ha(vi||(vi=Li(['\n <div class="card-config">\n <ha-selector\n .hass=','\n .label="'," (",')"\n .value=',"\n .selector=","\n @value-changed=","\n ></ha-selector>\n </div>\n <mushroom-chips-card-chips-editor\n .hass=","\n .chips=","\n @chips-changed=","\n @edit-detail-element=","\n ></mushroom-chips-card-chips-editor>\n "])),this.hass,e("editor.card.chips.alignment"),this.hass.localize("ui.panel.lovelace.editor.card.config.optional"),null!==(t=this._config.alignment)&&void 0!==t?t:"",{select:{options:Ky(e),mode:"dropdown"}},this._alignmentChanged,this.hass,this._config.chips,this._valueChanged,this._editDetailElement)}},{key:"_alignmentChanged",value:function(t){if(t.stopPropagation(),this._config){var e=t.detail.value,n=Object.assign({},this._config);e?n.alignment=e:delete n.alignment,Za(this,"config-changed",{config:n})}}},{key:"_valueChanged",value:function(t){var e,n,o;if(this._config&&this.hass){var i=t.target,r=i.configValue||(null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type),a=null!==(o=null!==(n=i.checked)&&void 0!==n?n:t.detail.value)&&void 0!==o?o:i.value;if("chip"===r||t.detail&&t.detail.chips){var s=t.detail.chips||this._config.chips.concat();"chip"===r&&(a?s[this._subElementEditorConfig.index]=a:(s.splice(this._subElementEditorConfig.index,1),this._goBack()),this._subElementEditorConfig.elementConfig=a),this._config=Object.assign(Object.assign({},this._config),{chips:s})}else r&&(a?this._config=Object.assign(Object.assign({},this._config),Fi({},r,a)):(this._config=Object.assign({},this._config),delete this._config[r]));Za(this,"config-changed",{config:this._config})}}},{key:"_handleSubElementChanged",value:function(t){var e;if(t.stopPropagation(),this._config&&this.hass){var n=null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type,o=t.detail.config;if("chip"===n){var i=this._config.chips.concat();o?i[this._subElementEditorConfig.index]=o:(i.splice(this._subElementEditorConfig.index,1),this._goBack()),this._config=Object.assign(Object.assign({},this._config),{chips:i})}else n&&(""===o?(this._config=Object.assign({},this._config),delete this._config[n]):this._config=Object.assign(Object.assign({},this._config),Fi({},n,o)));this._subElementEditorConfig=Object.assign(Object.assign({}Line truncated
|
||||
/**!
|
||||
* Sortable 1.15.6
|
||||
* @author RubaXa <trash@rubaxa.org>
|
||||
* @author owenm <owen23355@gmail.com>
|
||||
* @license MIT
|
||||
*/function zx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Ox(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zx(Object(n),!0).forEach((function(e){jx(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zx(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ix(t){return Ix="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ix(t)}function jx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Px(){return Px=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Px.apply(this,arguments)}function Nx(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Bx(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Lx=Bx(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Hx=Bx(/Edge/i),Dx=Bx(/firefox/i),Rx=Bx(/safari/i)&&!Bx(/chrome/i)&&!Bx(/android/i),Ux=Bx(/iP(ad|od|hone)/i),Vx=Bx(/chrome/i)&&Bx(/android/i),Fx={capture:!1,passive:!1};function $x(t,e,n){t.addEventListener(e,n,!Lx&&Fx)}function Gx(t,e,n){t.removeEventListener(e,n,!Lx&&Fx)}function Kx(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Yx(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function qx(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Kx(t,e):Kx(t,e))||o&&t===n)return t;if(t===n)break}while(t=Yx(t))}return null}var Wx,Xx=/\s+/g;function Zx(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Xx," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Xx," ")}}function Jx(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Qx(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Jx(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function tA(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function eA(){var t=document.scrollingElement;return t||document.documentElement}function nA(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,s,l,c,u,h;if(t!==window&&t.parentNode&&t!==eA()?(a=(r=t.getBoundingClientRect()).top,s=r.left,l=r.bottom,c=r.right,u=r.height,h=r.width):(a=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Lx))do{if(i&&i.getBoundingClientRect&&("none"!==Jx(i,"transform")||n&&"static"!==Jx(i,"position"))){var d=i.getBoundingClientRect();a-=d.top+parseInt(Jx(i,"border-top-width")),s-=d.left+parseInt(Jx(i,"border-left-width")),l=a+r.height,c=s+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=Qx(i||t),f=p&&p.a,m=p&&p.d;p&&(l=(a/=m)+(u/=m),c=(s/=f)+(h/=f))}return{top:a,left:s,bottom:l,right:c,width:h,height:u}}}function oA(t,e,n){for(var o=lA(t,!0),i=nA(t)[e];o;){if(!(i>=nA(o)[n]))return o;if(o===eA())break;o=lA(o,!1)}return!1}function iA(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==dS.ghost&&(o||a[r]!==dS.dragged)&&qx(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function rA(t,e){for(var n=t.lastElementChild;n&&(n===dS.ghost||"none"===Jx(n,"display")||e&&!Kx(n,e));)n=n.previousElementSibling;return n||null}function aA(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===dS.clone||e&&!Kx(t,e)||n++;return n}function sA(t){var e=0,n=0,o=eA();if(t)do{var i=Qx(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function lA(t,e){if(!t||!t.getBoundingClientRect)returnLine truncated
|
||||
Binary file not shown.
Reference in new issue
Block a user