iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 21 kB
JavaScript
/*! For license information please see 5824.4ec82ee94498117a.js.LICENSE.txt */
export const __webpack_ids__=["5824"];export const __webpack_modules__={12582:function(e,t,i){i.d(t,{Z:()=>a});i(9359),i(31526),i(70104);function a(e){if(!e||"object"!=typeof e)return e;if("[object Date]"==Object.prototype.toString.call(e))return new Date(e.getTime());if(Array.isArray(e))return e.map(a);var t={};return Object.keys(e).forEach((function(i){t[i]=a(e[i])})),t}},68958:function(e,t,i){i.d(t,{t:()=>d});i(92745),i(9359),i(31526),i(88972);class a{constructor(e=window.localStorage){this.storage=void 0,this._storage={},this._listeners={},this.storage=e,e===window.localStorage&&window.addEventListener("storage",(e=>{e.key&&this.hasKey(e.key)&&(this._storage[e.key]=e.newValue?JSON.parse(e.newValue):e.newValue,this._listeners[e.key]&&this._listeners[e.key].forEach((t=>t(e.oldValue?JSON.parse(e.oldValue):e.oldValue,this._storage[e.key]))))}))}addFromStorage(e){if(!this._storage[e]){const t=this.storage.getItem(e);t&&(this._storage[e]=JSON.parse(t))}}subscribeChanges(e,t){return this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t],()=>{this.unsubscribeChanges(e,t)}}unsubscribeChanges(e,t){if(!(e in this._listeners))return;const i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}hasKey(e){return e in this._storage}getValue(e){return this._storage[e]}setValue(e,t){const i=this._storage[e];this._storage[e]=t;try{void 0===t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify(t))}catch(e){}finally{this._listeners[e]&&this._listeners[e].forEach((e=>e(i,t)))}}}const n={},d=e=>t=>{const i=e.storage||"localStorage";let d;i&&i in n?d=n[i]:(d=new a(window[i]),n[i]=d);const o=String(t.key),l=e.key||String(t.key),r=t.initializer?t.initializer():void 0;d.addFromStorage(l);const s=!1!==e.subscribe?e=>d.subscribeChanges(l,((i,a)=>{e.requestUpdate(t.key,i)})):void 0,c=()=>d.hasKey(l)?e.deserializer?e.deserializer(d.getValue(l)):d.getValue(l):r;return{kind:"method",placement:"prototype",key:t.key,descriptor:{set(i){((i,a)=>{let n;e.state&&(n=c()),d.setValue(l,e.serializer?e.serializer(a):a),e.state&&i.requestUpdate(t.key,n)})(this,i)},get:()=>c(),enumerable:!0,configurable:!0},finisher(i){if(e.state&&e.subscribe){const e=i.prototype.connectedCallback,t=i.prototype.disconnectedCallback;i.prototype.connectedCallback=function(){e.call(this),this[`__unbsubLocalStorage${o}`]=s?.(this)},i.prototype.disconnectedCallback=function(){t.call(this),this[`__unbsubLocalStorage${o}`]?.(),this[`__unbsubLocalStorage${o}`]=void 0}}e.state&&i.createProperty(t.key,{noAccessor:!0,...e.stateOptions})}}}},54237:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowNext:()=>l});var a=i(44249),n=i(57243),d=i(15093),o=i(5111);i(23334);let l=(0,a.Z)([(0,d.Mo)("ha-icon-button-arrow-next")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_icon",value:()=>"rtl"===o.E.document.dir?"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z":"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"},{kind:"method",key:"render",value:function(){return n.dy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.next")||"Next"}" .path="${this._icon}"></ha-icon-button> `}}]}}),n.oi)},54202:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowPrev:()=>l});var a=i(44249),n=i(57243),d=i(15093),o=i(5111);i(23334);let l=(0,a.Z)([(0,d.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_icon",value:()=>"rtl"===o.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"},{kind:"method",key:"render",value:function(){return n.dy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}"></ha-icon-button> `}}]}}),n.oi)},83166:function(e,t,i){var a=i(44249),n=i(72621),d=i(1105),o=i(33990),l=i(57243),r=i(15093),s=i(5111);(0,a.Z)([(0,r.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"iconTrailing",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,r.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,n.Z)(i,"updated",this,3)([e]),(e.has("invalid")||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||e.has("invalid")&&void 0!==e.get("invalid"))&&this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return l.dy` <span class="mdc-text-field__icon mdc-text-field__icon--${i}" tabindex="${t?1:-1}"> <slot name="${i}Icon"></slot> </span> `}},{kind:"field",static:!0,key:"styles",value:()=>[o.W,l.iv`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start)}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`,"rtl"===s.E.document.dir?l.iv`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`:l.iv``]}]}}),d.P)},36841:function(e,t,i){var a=i(44249),n=(i(9359),i(56475),i(57243)),d=i(15093),o=(i(23334),i(37583),i(83166),i(36522));(0,a.Z)([(0,d.Mo)("search-input")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"filter",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"suffix",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:String})],key:"label",value:void 0},{kind:"method",key:"focus",value:function(){this._input?.focus()}},{kind:"field",decorators:[(0,d.IO)("ha-textfield",!0)],key:"_input",value:void 0},{kind:"method",key:"render",value:function(){return n.dy` <ha-textfield .autofocus="${this.autofocus}" .label="${this.label||this.hass.localize("ui.common.search")}" .value="${this.filter||""}" icon .iconTrailing="${this.filter||this.suffix}" ="${this._filterInputChanged}"> <slot name="prefix" slot="leadingIcon"> <ha-svg-icon tabindex="-1" class="prefix" .path="${"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}"></ha-svg-icon> </slot> <div class="trailing" slot="trailingIcon"> ${this.filter&&n.dy` <ha-icon-button ="${this._clearSearch}" .label="${this.hass.localize("ui.common.clear")}" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}" class="clear-button"></ha-icon-button> `} <slot name="suffix"></slot> </div> </ha-textfield> `}},{kind:"method",key:"_filterChanged",value:async function(e){(0,o.B)(this,"value-changed",{value:String(e)})}},{kind:"method",key:"_filterInputChanged",value:async function(e){this._filterChanged(e.target.value)}},{kind:"method",key:"_clearSearch",value:async function(){this._filterChanged("")}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:inline-flex}ha-icon-button,ha-svg-icon{color:var(--primary-text-color)}ha-svg-icon{outline:0}.clear-button{--mdc-icon-size:20px}ha-textfield{display:inherit}.trailing{display:flex;align-items:center}`}]}}),n.oi)},53047:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HuiStackCardEditor:()=>V});var n=i(44249),d=(i(9359),i(70104),i(89373),i(54207),i(12582)),o=i(57243),l=i(15093),r=i(62900),s=i(11721),c=i(68958),h=i(36522),u=(i(23334),i(54202),i(54237),i(91728)),f=i(3054),p=i(18200),g=i(10991),v=e([u,f]);[u,f]=v.then?(await v)():v;const _="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",k="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",b="M19,3L13,9L15,11L22,4V3M12,12.5A0.5,0.5 0 0,1 11.5,12A0.5,0.5 0 0,1 12,11.5A0.5,0.5 0 0,1 12.5,12A0.5,0.5 0 0,1 12,12.5M6,20A2,2 0 0,1 4,18C4,16.89 4.9,16 6,16A2,2 0 0,1 8,18C8,19.11 7.1,20 6,20M6,8A2,2 0 0,1 4,6C4,4.89 4.9,4 6,4A2,2 0 0,1 8,6C8,7.11 7.1,8 6,8M9.64,7.64C9.87,7.14 10,6.59 10,6A4,4 0 0,0 6,2A4,4 0 0,0 2,6A4,4 0 0,0 6,10C6.59,10 7.14,9.87 7.64,9.64L10,12L7.64,14.36C7.14,14.13 6.59,14 6,14A4,4 0 0,0 2,18A4,4 0 0,0 6,22A4,4 0 0,0 10,18C10,17.41 9.87,16.86 9.64,16.36L12,14L19,21H22V20L9.64,7.64Z",m="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",y="M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z",x="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",C=(0,r.f0)(p.I,(0,r.Ry)({cards:(0,r.IX)((0,r.Yj)()),title:(0,r.jt)((0,r.Z_)())})),$=[{name:"title",selector:{text:{}}}];let V=(0,n.Z)([(0,l.Mo)("hui-stack-card-editor")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"lovelace",value:void 0},{kind:"field",decorators:[(0,c.t)({key:"dashboardCardClipboard",state:!1,subscribe:!1,storage:"sessionStorage"})],key:"_clipboard",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_config",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_selectedCard",value:()=>0},{kind:"field",decorators:[(0,l.SB)()],key:"_GUImode",value:()=>!0},{kind:"field",decorators:[(0,l.SB)()],key:"_guiModeAvailable",value:()=>!0},{kind:"field",key:"_keys",value:()=>new Map},{kind:"field",key:"_schema",value:()=>$},{kind:"field",decorators:[(0,l.IO)("hui-card-element-editor")],key:"_cardEditorEl",value:void 0},{kind:"method",key:"setConfig",value:function(e){(0,r.hu)(e,C),this._config=e}},{kind:"method",key:"focusYamlEditor",value:function(){this._cardEditorEl?.focusYamlEditor()}},{kind:"method",key:"formData",value:function(){return this._config}},{kind:"method",key:"render",value:function(){if(!this.hass||!this._config)return o.Ld;const e=this._selectedCard,t=this._config.cards.length,i=!this._cardEditorEl||this._GUImode;return o.dy` <ha-form .hass="${this.hass}" .data="${this.formData()}" .schema="${this._schema}" .computeLabel="${this._computeLabelCallback}" -changed="${this._valueChanged}"></ha-form> <div class="card-config"> <div class="toolbar"> <paper-tabs .selected="${e}" scrollable -activate="${this._handleSelectedCard}"> ${this._config.cards.map(((e,t)=>o.dy` <paper-tab> ${t+1} </paper-tab> `))} </paper-tabs> <paper-tabs id="add-card" .selected="${e===t?"0":void 0}" -activate="${this._handleSelectedCard}"> <paper-tab> <ha-svg-icon .path="${x}"></ha-svg-icon> </paper-tab> </paper-tabs> </div> <div id="editor"> ${e<t?o.dy` <div id="card-options"> <ha-icon-button class="gui-mode-button" ="${this._toggleMode}" .disabled="${!this._guiModeAvailable}" .label="${this.hass.localize(i?"ui.panel.lovelace.editor.edit_card.show_code_editor":"ui.panel.lovelace.editor.edit_card.show_visual_editor")}" .path="${i?_:y}"></ha-icon-button> <ha-icon-button-arrow-prev .disabled="${0===e}" .label="${this.hass.localize("ui.panel.lovelace.editor.edit_card.move_before")}" ="${this._handleMove}" .move="${-1}"></ha-icon-button-arrow-prev> <ha-icon-button-arrow-next .label="${this.hass.localize("ui.panel.lovelace.editor.edit_card.move_after")}" .disabled="${e===t-1}" ="${this._handleMove}" .move="${1}"></ha-icon-button-arrow-next> <ha-icon-button .label="${this.hass.localize("ui.panel.lovelace.editor.edit_card.copy")}" .path="${k}" ="${this._handleCopyCard}"></ha-icon-button> <ha-icon-button .label="${this.hass.localize("ui.panel.lovelace.editor.edit_card.cut")}" .path="${b}" ="${this._handleCutCard}"></ha-icon-button> <ha-icon-button .label="${this.hass.localize("ui.panel.lovelace.editor.edit_card.delete")}" .path="${m}" ="${this._handleDeleteCard}"></ha-icon-button> </div> ${(0,s.U)(this._getKey(this._config.cards,e),o.dy`<hui-card-element-editor .hass="${this.hass}" .value="${this._config.cards[e]}" .lovelace="${this.lovelace}" -changed="${this._handleConfigChanged}" -changed="${this._handleGUIModeChanged}"></hui-card-element-editor>`)} `:o.dy` <hui-card-picker .hass="${this.hass}" .lovelace="${this.lovelace}" -changed="${this._handleCardPicked}"></hui-card-picker> `} </div> </div> `}},{kind:"method",key:"_getKey",value:function(e,t){const i=`${e[t].type}${t}${e.length}`;return this._keys.has(i)||this._keys.set(i,Math.random().toString()),this._keys.get(i)}},{kind:"method",key:"_handleSelectedCard",value:function(e){"add-card"!==e.target.id?(this._setMode(!0),this._guiModeAvailable=!0,this._selectedCard=parseInt(e.detail.selected,10)):this._selectedCard=this._config.cards.length}},{kind:"method",key:"_handleConfigChanged",value:function(e){if(e.stopPropagation(),!this._config)return;const t=[...this._config.cards],i=e.detail.config;t[this._selectedCard]=i,this._config={...this._config,cards:t},this._guiModeAvailable=e.detail.guiModeAvailable,(0,h.B)(this,"config-changed",{config:this._config})}},{kind:"method",key:"_handleCardPicked",value:function(e){if(e.stopPropagation(),!this._config)return;const t=e.detail.config,i=[...this._config.cards,t];this._config={...this._config,cards:i},this._keys.clear(),(0,h.B)(this,"config-changed",{config:this._config})}},{kind:"method",key:"_handleCopyCard",value:function(){this._config&&(this._clipboard=(0,d.Z)(this._config.cards[this._selectedCard]))}},{kind:"method",key:"_handleCutCard",value:function(){this._handleCopyCard(),this._handleDeleteCard()}},{kind:"method",key:"_handleDeleteCard",value:function(){if(!this._config)return;const e=[...this._config.cards];e.splice(this._selectedCard,1),this._config={...this._config,cards:e},this._selectedCard=Math.max(0,this._selectedCard-1),this._keys.clear(),(0,h.B)(this,"config-changed",{config:this._config})}},{kind:"method",key:"_handleMove",value:function(e){if(!this._config)return;const t=e.currentTarget.move,i=this._selectedCard+t,a=[...this._config.cards],n=a.splice(this._selectedCard,1)[0];a.splice(i,0,n),this._config={...this._config,cards:a},this._selectedCard=i,this._keys.clear(),(0,h.B)(this,"config-changed",{config:this._config})}},{kind:"method",key:"_handleGUIModeChanged",value:function(e){e.stopPropagation(),this._GUImode=e.detail.guiMode,this._guiModeAvailable=e.detail.guiModeAvailable}},{kind:"method",key:"_toggleMode",value:function(){this._cardEditorEl?.toggleMode()}},{kind:"method",key:"_setMode",value:function(e){this._GUImode=e,this._cardEditorEl&&(this._cardEditorEl.GUImode=e)}},{kind:"method",key:"_valueChanged",value:function(e){(0,h.B)(this,"config-changed",{config:e.detail.value})}},{kind:"field",key:"_computeLabelCallback",value(){return e=>this.hass.localize(`ui.panel.lovelace.editor.card.${this._config.type}.${e.name}`)}},{kind:"get",static:!0,key:"styles",value:function(){return[g.A,o.iv`.toolbar{display:flex;--paper-tabs-selection-bar-color:var(--primary-color);--paper-tab-ink:var(--primary-color)}paper-tabs{display:flex;font-size:14px;flex-grow:1}#add-card{max-width:32px;padding:0}#card-options{display:flex;justify-content:flex-end;width:100%}#editor{border:1px solid var(--divider-color);padding:12px} (max-width:450px){#editor{margin:0 -12px}}.gui-mode-button{margin-right:auto;margin-inline-end:auto;margin-inline-start:initial}`]}}]}}),o.oi);a()}catch(e){a(e)}}))},18200:function(e,t,i){i.d(t,{I:()=>n});var a=i(62900);const n=(0,a.Ry)({type:(0,a.Z_)(),view_layout:(0,a.Yj)(),layout_options:(0,a.Yj)(),grid_options:(0,a.Yj)(),visibility:(0,a.Yj)()})},8775:function(e,t,i){i.d(t,{U:()=>o});var a=i(2841),n=i(45779),d=i(53232);const o=(0,n.XM)(class extends n.Xe{constructor(){super(...arguments),this.key=a.Ld}render(e,t){return this.key=e,t}update(e,[t,i]){return t!==this.key&&((0,d.hl)(e),this.key=t),i}})},11721:function(e,t,i){i.d(t,{U:()=>a.U});var a=i(8775)}};
//# sourceMappingURL=5824.4ec82ee94498117a.js.map