iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 25.2 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[33790],{60353:function(e,t,r){r.d(t,{u:function(){return o}});class o{start(e){const t=Date.now();this._startY=e,this._startTime=t,this._lastY=e,this._lastTime=t,this._delta=0}move(e){const t=Date.now();return this._delta=this._startY-e,this._lastY=e,this._lastTime=t,this._delta}end(){const e=this.getVelocity(),t=Math.abs(e)>this._velocityThreshold;return{velocity:e,delta:this._delta,isSwipe:t,isDownwardSwipe:e>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const e=this._lastTime-this._startTime;return e>0?(this._lastY-this._startY)/e:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(e={}){var t,r;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(t=e.velocitySwipeThreshold)&&void 0!==t?t:.5,this._movementTimeThreshold=null!==(r=e.movementTimeThreshold)&&void 0!==r?r:100}}},5745:function(e,t,r){var o=r(40445),a=r(99731),i=r(67576);class s extends a.Y{}s=(0,o.Cg)([(0,i.EM)("ha-chip-set")],s)},99611:function(e,t,r){r.a(e,async function(e,t){try{r(18111),r(13579),r(3362),r(17642),r(58004),r(33853),r(45876),r(32475),r(15024),r(31698),r(62953);var o=r(40445),a=r(1126),i=r(35211),s=r(5124),n=r(67576),l=r(1087),d=r(60353),h=r(22792),c=r(59992),u=r(14503),p=r(22348),v=e([a,c]);[a,c]=v.then?(await v)():v;let f,m,_=e=>e;const g=300,b=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),y=new Set(["volume-slider-container","forecast"]);class w extends((0,c.V)(s.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(e){super.updated(e),e.has("open")&&(this._drawerOpen=this.open)}render(){return(0,s.qy)(f||(f=_` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" ="${0}" -show="${0}" -after-show="${0}" -hide="${0}" -after-hide="${0}" ="${0}" without-header ="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(e){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(e)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${g}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},g)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,u.dp,(0,s.AH)(m||(m=_`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)} (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),g,g)]}constructor(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new d.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e;const t=this._autofocusElement;null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,p.V)(this._hassConfig.auth.external)?t&&(t.id||(t.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})):null==t||t.focus()})},this._handleAfterShow=()=>{(0,l.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=e=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);e.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,l.r)(this,"closed"))},this._handleHide=e=>{if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail.source===e.target.drawer;if(this._sliderInteractionActive)return e.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1},this._handleKeyDown=e=>{"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)},this._handleCloseAction=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&("close"===e.getAttribute("data-dialog")||"close"===e.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=e=>{if(this.preventScrimClose)return;const t=e.composedPath();for(const r of t){if(r===this._drawer)break;if(r instanceof HTMLElement&&(r.scrollTop>0||b.has(r.localName)||Array.from(r.classList).some(e=>y.has(e))))return}e.stopPropagation(),this._startResizing(e.touches[0].clientY)},this._handleTouchMove=e=>{const t=e.touches[0].clientY,r=this._gestureRecognizer.move(t);r<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*r}px)`)}))},this._handleTouchEnd=()=>{var e;this._unregisterResizeHandlers(),this._isDragging=!1;const t=this._gestureRecognizer.end();if(t.isSwipe)return void(t.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const r=null===(e=this._drawer.shadowRoot)||void 0===e?void 0:e.querySelector('[part="body"]'),o=(null==r?void 0:r.offsetHeight)||0;o>0&&t.delta<0&&Math.abs(t.delta)>.5*o?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,o.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,n.wk)()],w.prototype,"_drawerOpen",void 0),(0,o.Cg)([(0,n.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:h.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,n.P)("#drawer")],w.prototype,"_drawer",void 0),(0,o.Cg)([(0,n.P)("#body")],w.prototype,"_bodyElement",void 0),(0,o.Cg)([(0,n.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,o.Cg)([(0,n.EM)("ha-bottom-sheet")],w),t()}catch(f){t(f)}})},18198:function(e,t,r){r.d(t,{Dc:function(){return h},Si:function(){return d}});var o=r(40445),a=r(5124),i=r(67576);r(47680),r(67094);let s,n,l=e=>e;const d=e=>{switch(e.level){case 0:return"M11,10H13V16H11V10M22,12H19V20H5V12H2L12,3L22,12M15,10A2,2 0 0,0 13,8H11A2,2 0 0,0 9,10V16A2,2 0 0,0 11,18H13A2,2 0 0,0 15,16V10Z";case 1:return"M12,3L2,12H5V20H19V12H22L12,3M10,8H14V18H12V10H10V8Z";case 2:return"M12,3L2,12H5V20H19V12H22L12,3M9,8H13A2,2 0 0,1 15,10V12A2,2 0 0,1 13,14H11V16H15V18H9V14A2,2 0 0,1 11,12H13V10H9V8Z";case 3:return"M12,3L22,12H19V20H5V12H2L12,3M15,11.5V10C15,8.89 14.1,8 13,8H9V10H13V12H11V14H13V16H9V18H13A2,2 0 0,0 15,16V14.5A1.5,1.5 0 0,0 13.5,13A1.5,1.5 0 0,0 15,11.5Z";case-1:return"M12,3L2,12H5V20H19V12H22L12,3M11,15H7V13H11V15M15,18H13V10H11V8H15V18Z"}return"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"},h=e=>{switch(e.level){case 0:return"mdi:home-floor-0";case 1:return"mdi:home-floor-1";case 2:return"mdi:home-floor-2";case 3:return"mdi:home-floor-3";case-1:return"mdi:home-floor-negative-1"}return"mdi:home"};class c extends a.WF{render(){if(!this.floor)return a.s6;if(this.floor.icon)return(0,a.qy)(s||(s=l`<ha-icon .icon="${0}"></ha-icon>`),this.floor.icon);const e=d(this.floor);return(0,a.qy)(n||(n=l`<ha-svg-icon .path="${0}"></ha-svg-icon>`),e)}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],c.prototype,"floor",void 0),(0,o.Cg)([(0,i.MZ)()],c.prototype,"icon",void 0),c=(0,o.Cg)([(0,i.EM)("ha-floor-icon")],c)},7089:function(e,t,r){r.a(e,async function(e,t){try{r(74423),r(18111),r(81148),r(22489),r(7588),r(61701),r(13579),r(3362),r(62953);var o=r(40445),a=r(5124),i=r(67576),s=r(22786),n=r(1087),l=r(71727),d=r(55931),h=r(53641),c=r(58594),u=r(32250),p=r(65063),v=r(27986),f=(r(75064),r(18198),r(38508)),m=r(26300),_=(r(67094),e([f,m]));[f,m]=_.then?(await _)():_;let g,b,y,w,C,S,H,x=e=>e;const k="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",V="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z",A="___ADD_NEW___",L=[{name:"search_labels.floorName",weight:10},{name:"search_labels.aliases",weight:8},{name:"search_labels.floor_id",weight:3}];class T extends a.WF{willUpdate(e){var t;this._pendingFloorId&&e.has("hass")&&this.hass.floors!==(null===(t=e.get("hass"))||void 0===t?void 0:t.floors)&&this.hass.floors[this._pendingFloorId]&&(this._setValue(this._pendingFloorId),this._pendingFloorId=void 0)}async open(){var e;await this.updateComplete,await(null===(e=this._picker)||void 0===e?void 0:e.open())}render(){var e;const t=null!==(e=this.placeholder)&&void 0!==e?e:this.hass.localize("ui.components.floor-picker.floor"),r=this._computeValueRenderer(this.hass.floors);return(0,a.qy)(g||(g=x` <ha-generic-picker .hass="${0}" .autofocus="${0}" .disabled="${0}" .label="${0}" .helper="${0}" .placeholder="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .value="${0}" .getItems="${0}" .getAdditionalItems="${0}" .valueRenderer="${0}" .rowRenderer="${0}" .searchKeys="${0}" .unknownItemText="${0}" -changed="${0}"> </ha-generic-picker> `),this.hass,this.autofocus,this.disabled,this.label,this.helper,t,this._notFoundLabel,this.hass.localize("ui.components.floor-picker.no_floors"),this.value,this._getItems,this._getAdditionalItems,r,this._rowRenderer,L,this.hass.localize("ui.components.floor-picker.unknown"),this._valueChanged)}_valueChanged(e){e.stopPropagation();const t=e.detail.value;if(t){if(t.startsWith(A)){this.hass.loadFragmentTranslation("config");const e=t.substring(A.length);return void(0,v.k)(this,{suggestedName:e,createEntry:async(e,t)=>{try{const r=await(0,u.KD)(this.hass,e);t.forEach(e=>{(0,h.gs)(this.hass,e,{floor_id:r.floor_id})}),this.hass.floors[r.floor_id]?this._setValue(r.floor_id):this._pendingFloorId=r.floor_id}catch(r){(0,p.showAlertDialog)(this,{title:this.hass.localize("ui.components.floor-picker.failed_create_floor"),text:r.message})}}})}this._setValue(t)}else this._setValue(void 0)}_setValue(e){this.value=e,(0,n.r)(this,"value-changed",{value:e}),(0,n.r)(this,"change")}constructor(...e){super(...e),this.noAdd=!1,this.disabled=!1,this.required=!1,this._computeValueRenderer=(0,s.A)(e=>e=>{const t=this.hass.floors[e];if(!t)return(0,a.qy)(b||(b=x` <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <span slot="headline">${0}</span> `),V,t);const r=t?(0,d.X)(t):void 0;return(0,a.qy)(y||(y=x` <ha-floor-icon slot="start" .floor="${0}"></ha-floor-icon> <span slot="headline">${0}</span> `),t,r)}),this._getFloors=(0,s.A)((e,t,r,o,a,i,s,n,h,p)=>{const v=Object.values(e),f=Object.values(t),m=Object.values(r),_=Object.values(o);let g,b,y={};(a||i||s||n||h)&&(y=(0,c.g2)(_),g=m,b=_.filter(e=>e.area_id),a&&(g=g.filter(e=>{const t=y[e.id];return!(!t||!t.length)&&y[e.id].some(e=>a.includes((0,l.m)(e.entity_id)))}),b=b.filter(e=>a.includes((0,l.m)(e.entity_id)))),i&&(g=g.filter(e=>{const t=y[e.id];return!t||!t.length||_.every(e=>!i.includes((0,l.m)(e.entity_id)))}),b=b.filter(e=>!i.includes((0,l.m)(e.entity_id)))),s&&(g=g.filter(e=>{const t=y[e.id];return!(!t||!t.length)&&y[e.id].some(e=>{const t=this.hass.states[e.entity_id];return!!t&&(t.attributes.device_class&&s.includes(t.attributes.device_class))})}),b=b.filter(e=>{const t=this.hass.states[e.entity_id];return t.attributes.device_class&&s.includes(t.attributes.device_class)})),n&&(g=g.filter(e=>n(e))),h&&(g=g.filter(e=>{const t=y[e.id];return!(!t||!t.length)&&y[e.id].some(e=>{const t=this.hass.states[e.entity_id];return!!t&&h(t)})}),b=b.filter(e=>{const t=this.hass.states[e.entity_id];return!!t&&h(t)})));let w,C=v;if(g&&(w=g.filter(e=>e.area_id).map(e=>e.area_id)),b&&(w=(null!=w?w:[]).concat(b.filter(e=>e.area_id).map(e=>e.area_id))),w){const e=(0,u._o)(f);C=C.filter(t=>{var r;return null===(r=e[t.floor_id])||void 0===r?void 0:r.some(e=>w.includes(e.area_id))})}p&&(C=C.filter(e=>!p.includes(e.floor_id)));return C.map(e=>{const t=(0,d.X)(e);return{id:e.floor_id,primary:t,floor:e,search_labels:{floorName:t,floor_id:e.floor_id,aliases:e.aliases.join(" ")}}})}),this._rowRenderer=e=>(0,a.qy)(w||(w=x` <ha-combo-box-item type="button" compact="compact"> ${0} <span slot="headline">${0}</span> </ha-combo-box-item> `),e.icon_path?(0,a.qy)(C||(C=x` <ha-svg-icon slot="start" style="margin:0 4px" .path="${0}"></ha-svg-icon> `),e.icon_path):(0,a.qy)(S||(S=x` <ha-floor-icon slot="start" .floor="${0}" style="margin:0 4px"></ha-floor-icon> `),e.floor),e.primary),this._getItems=()=>this._getFloors(this.hass.floors,this.hass.areas,this.hass.devices,this.hass.entities,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.excludeFloors),this._allFloorNames=(0,s.A)(e=>Object.values(e).map(e=>{var t;return null===(t=(0,d.X)(e))||void 0===t?void 0:t.toLowerCase()}).filter(Boolean)),this._getAdditionalItems=e=>{if(this.noAdd)return[];const t=this._allFloorNames(this.hass.floors);return e&&!t.includes(e.toLowerCase())?[{id:A+e,primary:this.hass.localize("ui.components.floor-picker.add_new_suggestion",{name:e}),icon_path:k}]:[{id:A,primary:this.hass.localize("ui.components.floor-picker.add_new"),icon_path:k}]},this._notFoundLabel=e=>this.hass.localize("ui.components.floor-picker.no_match",{term:(0,a.qy)(H||(H=x`<b>‘${0}’</b>`),e)})}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],T.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)()],T.prototype,"label",void 0),(0,o.Cg)([(0,i.MZ)()],T.prototype,"value",void 0),(0,o.Cg)([(0,i.MZ)()],T.prototype,"helper",void 0),(0,o.Cg)([(0,i.MZ)()],T.prototype,"placeholder",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,attribute:"no-add"})],T.prototype,"noAdd",void 0),(0,o.Cg)([(0,i.MZ)({type:Array,attribute:"include-domains"})],T.prototype,"includeDomains",void 0),(0,o.Cg)([(0,i.MZ)({type:Array,attribute:"exclude-domains"})],T.prototype,"excludeDomains",void 0),(0,o.Cg)([(0,i.MZ)({type:Array,attribute:"include-device-classes"})],T.prototype,"includeDeviceClasses",void 0),(0,o.Cg)([(0,i.MZ)({type:Array,attribute:"exclude-floors"})],T.prototype,"excludeFloors",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],T.prototype,"deviceFilter",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],T.prototype,"entityFilter",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],T.prototype,"disabled",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],T.prototype,"required",void 0),(0,o.Cg)([(0,i.P)("ha-generic-picker")],T.prototype,"_picker",void 0),(0,o.Cg)([(0,i.wk)()],T.prototype,"_pendingFloorId",void 0),T=(0,o.Cg)([(0,i.EM)("ha-floor-picker")],T),t()}catch(g){t(g)}})},36866:function(e,t,r){r.a(e,async function(e,t){try{r(62953);var o=r(40445),a=r(5124),i=r(67576),s=r(91485),n=e([s]);s=(n.then?(await n)():n)[0];let l,d,h=e=>e;const c="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";class u extends s.U{willUpdate(e){var t,r;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(r=t.localize)||void 0===r?void 0:r.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,a.qy)(l||(l=h`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),c)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}u.styles=[...s.U.styles,(0,a.AH)(d||(d=h`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,o.Cg)([(0,i.EM)("ha-input-search")],u),t()}catch(l){t(l)}})},32250:function(e,t,r){r.d(t,{KD:function(){return o},NL:function(){return a},Rj:function(){return s},_o:function(){return n},ls:function(){return i}});r(44114),r(62953),r(29908);const o=(e,t)=>e.callWS(Object.assign({type:"config/floor_registry/create"},t)),a=(e,t,r)=>e.callWS(Object.assign({type:"config/floor_registry/update",floor_id:t},r)),i=(e,t)=>e.callWS({type:"config/floor_registry/delete",floor_id:t}),s=(e,t)=>e.callWS({type:"config/floor_registry/reorder",floor_ids:t}),n=e=>{const t={};for(const r of e)r.floor_id&&(r.floor_id in t||(t[r.floor_id]=[]),t[r.floor_id].push(r));return t}},59992:function(e,t,r){r.a(e,async function(e,o){try{r.d(t,{V:function(){return v}});r(62953);var a=r(40445),i=r(88696),s=r(5124),n=r(6412),l=r(67576),d=e([i]);i=(d.then?(await d)():d)[0];let h,c,u=e=>e;const p=e=>void 0===e?[]:Array.isArray(e)?e:[e],v=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,s.qy)(h||(h=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...p(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,s.AH)(c||(c=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:r=0,clientHeight:o=0,scrollTop:a=0}=e;this._contentScrollable=r-o>a+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const r=e.currentTarget;this._contentScrolled=(null!==(t=r.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(r)},this._resize=new i.P(this,{target:null,callback:e=>{var t;const r=null===(t=e[0])||void 0===t?void 0:t.target;r&&this._updateScrollableState(r)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,a.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,a.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};o()}catch(h){o(h)}})},27986:function(e,t,r){r.d(t,{k:function(){return i}});r(3362),r(62953);var o=r(1087);const a=()=>Promise.all([r.e(32450),r.e(7305),r.e(92769),r.e(3283),r.e(8158),r.e(62574),r.e(26092),r.e(39005),r.e(61617)]).then(r.bind(r,91622)),i=(e,t)=>{(0,o.r)(e,"show-dialog",{dialogTag:"dialog-floor-registry-detail",dialogImport:a,dialogParams:t})}},22348:function(e,t,r){r.d(t,{V:function(){return a}});var o=r(37177);const a=e=>!!e&&o.n},37177:function(e,t,r){r.d(t,{n:function(){return o}});r(27495);const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,r){r.d(t,{C:function(){return o}});const o="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);