UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

5 lines 9.86 kB
export const __webpack_ids__=["32197"];export const __webpack_modules__={17170:function(e,t,r){r.a(e,(async function(e,n){try{r.r(t),r.d(t,{HaSpinner:()=>h});var i=r(44249),o=r(72621),a=r(97677),s=r(43580),c=r(57243),l=r(15093),d=e([a]);a=(d.then?(await d)():d)[0];let h=(0,i.Z)([(0,l.Mo)("ha-spinner")],(function(e,t){class r extends t{constructor(...t){super(...t),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,l.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,o.Z)(r,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value:()=>[s.Z,c.iv`:host{--indicator-color:var( --ha-spinner-indicator-color, var(--primary-color) );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`]}]}}),a.Z);n()}catch(e){n(e)}}))},50957:function(e,t,r){r.a(e,(async function(e,n){try{r.r(t),r.d(t,{HuiStartingCard:()=>u});var i=r(44249),o=r(72621),a=(r(31622),r(94277)),s=r(57243),c=r(15093),l=r(36522),d=(r(54977),r(17170)),h=e([d]);d=(h.then?(await h)():h)[0];let u=(0,i.Z)([(0,c.Mo)("hui-starting-card")],(function(e,t){class r extends t{constructor(...t){super(...t),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,c.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"method",key:"getCardSize",value:function(){return 2}},{kind:"method",key:"setConfig",value:function(e){}},{kind:"method",key:"updated",value:function(e){(0,o.Z)(r,"updated",this,3)([e]),e.has("hass")&&this.hass.config&&this.hass.config.state!==a.UE&&(0,l.B)(this,"config-refresh")}},{kind:"method",key:"render",value:function(){return this.hass?s.dy` <div class="content"> <ha-spinner></ha-spinner> ${this.hass.localize("ui.panel.lovelace.cards.starting.description")} </div> `:s.Ld}},{kind:"field",static:!0,key:"styles",value:()=>s.iv`:host{display:block;height:calc(100vh - var(--header-height))}ha-spinner{margin-bottom:20px}.content{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}`}]}}),s.oi);n()}catch(e){n(e)}}))},48734:function(e,t,r){r.a(e,(async function(e,n){try{r.d(t,{P5:()=>u,Ve:()=>m});var i=r(16485),o=(r(9359),r(70104),r(92519),r(42179),r(89256),r(24931),r(88463),r(57449),r(19814),e([i]));i=(o.then?(await o)():o)[0];const a=new Set,s=new Map;let c,l="ltr",d="en";const h="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(h){const f=new MutationObserver(p);l=document.documentElement.dir||"ltr",d=document.documentElement.lang||navigator.language,f.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function u(...e){e.map((e=>{const t=e.$code.toLowerCase();s.has(t)?s.set(t,Object.assign(Object.assign({},s.get(t)),e)):s.set(t,e),c||(c=e)})),p()}function p(){h&&(l=document.documentElement.dir||"ltr",d=document.documentElement.lang||navigator.language),[...a.keys()].map((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}class m{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){a.add(this.host)}hostDisconnected(){a.delete(this.host)}dir(){return`${this.host.dir||l}`.toLowerCase()}lang(){return`${this.host.lang||d}`.toLowerCase()}getTranslationData(e){var t,r;const n=new Intl.Locale(e.replace(/_/g,"-")),i=null==n?void 0:n.language.toLowerCase(),o=null!==(r=null===(t=null==n?void 0:n.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==r?r:"";return{locale:n,language:i,region:o,primary:s.get(`${i}-${o}`),secondary:s.get(i)}}exists(e,t){var r;const{primary:n,secondary:i}=this.getTranslationData(null!==(r=t.lang)&&void 0!==r?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[e]||i&&i[e]||t.includeFallback&&c&&c[e])}term(e,...t){const{primary:r,secondary:n}=this.getTranslationData(this.lang());let i;if(r&&r[e])i=r[e];else if(n&&n[e])i=n[e];else{if(!c||!c[e])return console.error(`No translation found for: ${String(e)}`),String(e);i=c[e]}return"function"==typeof i?i(...t):i}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(e,t)}}n()}catch(v){n(v)}}))},68783:function(e,t,r){r.a(e,(async function(e,n){try{r.d(t,{A:()=>d});var i=r(64699),o=r(15073),a=r(81048),s=r(31027),c=r(57243),l=e([o]);o=(l.then?(await l)():l)[0];var d=class extends s.P{constructor(){super(...arguments),this.localize=new o.V(this)}render(){return c.dy` <svg part="base" class="spinner" role="progressbar" aria-label="${this.localize.term("loading")}"> <circle class="spinner__track"></circle> <circle class="spinner__indicator"></circle> </svg> `}};d.styles=[a.N,i.D],n()}catch(e){n(e)}}))},31027:function(e,t,r){r.d(t,{P:()=>s});r(9359),r(31526);var n,i=r(52812),o=r(57243),a=r(15093),s=class extends o.oi{constructor(){super(),(0,i.Ko)(this,n,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}emit(e,t){const r=new CustomEvent(e,(0,i.ih)({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}static define(e,t=this,r={}){const n=customElements.get(e);if(!n){try{customElements.define(e,t,r)}catch(n){customElements.define(e,class extends t{},r)}return}let i=" (unknown version)",o=i;"version"in t&&t.version&&(i=" v"+t.version),"version"in n&&n.version&&(o=" v"+n.version),i&&o&&i===o||console.warn(`Attempted to register <${e}>${i}, but <${e}>${o} has already been registered.`)}attributeChangedCallback(e,t,r){(0,i.ac)(this,n)||(this.constructor.elementProperties.forEach(((e,t)=>{e.reflect&&null!=this[t]&&this.initialReflectedProperties.set(t,this[t])})),(0,i.qx)(this,n,!0)),super.attributeChangedCallback(e,t,r)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach(((t,r)=>{e.has(r)&&null==this[r]&&(this[r]=t)}))}};n=new WeakMap,s.version="2.20.1",s.dependencies={},(0,i.u2)([(0,a.Cb)()],s.prototype,"dir",2),(0,i.u2)([(0,a.Cb)()],s.prototype,"lang",2)},15073:function(e,t,r){r.a(e,(async function(e,n){try{r.d(t,{V:()=>s});var i=r(21262),o=r(48734),a=e([o,i]);[o,i]=a.then?(await a)():a;var s=class extends o.Ve{};(0,o.P5)(i.K),n()}catch(e){n(e)}}))},21262:function(e,t,r){r.a(e,(async function(e,n){try{r.d(t,{K:()=>s});var i=r(48734),o=e([i]);i=(o.then?(await o)():o)[0];var a={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};(0,i.P5)(a);var s=a;n()}catch(e){n(e)}}))},64699:function(e,t,r){r.d(t,{D:()=>n});var n=r(57243).iv`:host{--track-width:2px;--track-color:rgb(128 128 128 / 25%);--indicator-color:var(--sl-color-primary-600);--speed:2s;display:inline-flex;width:1em;height:1em;flex:none}.spinner{flex:1 1 auto;height:100%;width:100%}.spinner__indicator,.spinner__track{fill:none;stroke-width:var(--track-width);r:calc(0.5em - var(--track-width)/ 2);cx:0.5em;cy:0.5em;transform-origin:50% 50%}.spinner__track{stroke:var(--track-color);transform-origin:0% 0%}.spinner__indicator{stroke:var(--indicator-color);stroke-linecap:round;stroke-dasharray:150% 75%;animation:spin var(--speed) linear infinite}@keyframes spin{0%{transform:rotate(0deg);stroke-dasharray:0.05em,3em}50%{transform:rotate(450deg);stroke-dasharray:1.375em,1.375em}100%{transform:rotate(1080deg);stroke-dasharray:0.05em,3em}}`},52812:function(e,t,r){r.d(t,{EZ:()=>p,Ko:()=>g,ac:()=>v,ih:()=>u,qx:()=>y,u2:()=>m});var n=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=e=>{throw TypeError(e)},h=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&h(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&h(e,r,t[r]);return e},p=(e,t)=>i(e,a(t)),m=(e,t,r,i)=>{for(var a,s=i>1?void 0:i?o(t,r):t,c=e.length-1;c>=0;c--)(a=e[c])&&(s=(i?a(t,r,s):a(s))||s);return i&&s&&n(t,r,s),s},f=(e,t,r)=>t.has(e)||d("Cannot "+r),v=(e,t,r)=>(f(e,t,"read from private field"),r?r.call(e):t.get(e)),g=(e,t,r)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),y=(e,t,r,n)=>(f(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r)},81048:function(e,t,r){r.d(t,{N:()=>n});var n=r(57243).iv`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}[hidden]{display:none!important}`},97677:function(e,t,r){r.a(e,(async function(e,n){try{r.d(t,{Z:()=>i.A});var i=r(68783),o=(r(64699),r(15073)),a=r(21262),s=(r(81048),r(31027),r(52812),e([o,a,i]));[o,a,i]=s.then?(await s)():s,n()}catch(e){n(e)}}))},43580:function(e,t,r){r.d(t,{Z:()=>n.D});var n=r(64699);r(52812)}}; //# sourceMappingURL=32197.d356d4ca314ec072.js.map