iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
16 lines • 44.7 kB
JavaScript
export const __rspack_esm_id=66896;export const __rspack_esm_ids=[66896];export const __webpack_modules__={68246(e,t,o){o.d(t,{Y:()=>i});const i=e=>e.slice(e.indexOf(".")+1)},28978(e,t,o){o.d(t,{_:()=>a,u:()=>n});var i=o(68246);const a=(e,t)=>void 0===t.friendly_name?(0,i.Y)(e).replace(/_/g," "):(t.friendly_name??"").toString(),n=e=>a(e.entity_id,e.attributes)},7553(e,t,o){o.d(t,{h:()=>a});class i extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,i),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const a=(e,t)=>{const o=new Promise((t,o)=>{setTimeout(()=>{o(new i(e))},e)});return Promise.race([t,o])}},75064(e,t,o){var i=o(62826),a=o(5124),n=o(22441),r=o(2846);class s extends r.G{constructor(...e){super(...e),this.borderTop=!1}}s.styles=[...r.J,a.AH`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var(
--mdc-typography-subtitle1-font-family,
var(--mdc-typography-font-family)
);color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`],(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],s.prototype,"borderTop",void 0),s=(0,i.Cg)([(0,n.EM)("ha-combo-box-item")],s)},82432(e,t,o){o.a(e,async function(e,t){try{o(74423),o(18111),o(20116),o(61701);var i=o(62826),a=o(5124),n=o(22441),r=o(1087),s=o(9899),c=o(77423),l=o(88433),d=o(59241),p=o(95350),h=o(70241),u=o(26401),g=o(606),f=e([g]);g=(f.then?(await f)():f)[0];const m="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",b="__NONE_OPTION__";class y extends a.WF{render(){if(!this._agents)return a.s6;let e=this.value;e||(e=b);const t=this._agents.map(e=>({value:e.id,label:e.name,disabled:"*"!==e.supported_languages&&0===e.supported_languages.length}));return this.required||t.unshift({value:b,label:this.hass.localize("ui.components.conversation-agent-picker.none")}),a.qy` <ha-select .label="${this.label||this.hass.localize("ui.components.conversation-agent-picker.conversation_agent")}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" @selected="${this._changed}" .options="${t}"></ha-select>${this._subConfigEntry&&this._configEntry?.supported_subentry_types[this._subConfigEntry.subentry_type]?.supports_reconfigure||this._configEntry?.supports_options?a.qy`<ha-icon-button .path="${m}" @click="${this._openOptionsFlow}"></ha-icon-button>`:""} `}willUpdate(e){super.willUpdate(e),this.hasUpdated?e.has("language")&&this._debouncedUpdateAgents():this._updateAgents(),e.has("value")&&this._maybeFetchConfigEntry()}async _maybeFetchConfigEntry(){if(this.value&&this.value in this.hass.entities)try{const e=await(0,d.v)(this.hass,this.value);if(!e.config_entry_id)return void(this._configEntry=void 0);this._configEntry=(await(0,c.Vx)(this.hass,e.config_entry_id)).config_entry,e.config_subentry_id?this._subConfigEntry=(await(0,c.t0)(this.hass,e.config_entry_id)).find(t=>t.subentry_id===e.config_subentry_id):this._subConfigEntry=void 0}catch(e){this._configEntry=void 0,this._subConfigEntry=void 0}else this._configEntry=void 0}async _updateAgents(){const{agents:e}=await(0,l.vc)(this.hass,this.language,this.hass.config.country||void 0);if(this._agents=e,!this.value&&this.required){let e;for(const t of this._agents)if("conversation.home_assistant"===t.id&&(!this.language||"*"===t.supported_languages||t.supported_languages.includes(this.language))){e=t.id;break}if(!e)for(const t of this._agents)if("*"===t.supported_languages||!this.language||t.supported_languages.includes(this.language)){e=t.id;break}e&&(this.value=e,(0,r.r)(this,"value-changed",{value:this.value}))}if(!this.value)return;const t=e.find(e=>e.id===this.value);(0,r.r)(this,"supported-languages-changed",{value:t?.supported_languages}),(!t||"*"!==t.supported_languages&&0===t.supported_languages.length)&&(this.value=void 0,(0,r.r)(this,"value-changed",{value:this.value}))}async _openOptionsFlow(){this._configEntry&&(this._subConfigEntry&&this._configEntry.supported_subentry_types[this._subConfigEntry.subentry_type]?.supports_reconfigure?(0,u.a)(this,this._configEntry,this._subConfigEntry.subentry_type,{startFlowHandler:this._configEntry.entry_id,subEntryId:this._subConfigEntry.subentry_id}):(0,h.Q)(this,this._configEntry,{manifest:await(0,p.QC)(this.hass,this._configEntry.domain)}))}_changed(e){const t=e.detail.value;!this.hass||""===t||t===this.value||void 0===this.value&&t===b||(this.value=t===b?void 0:t,(0,r.r)(this,"value-changed",{value:this.value}),(0,r.r)(this,"supported-languages-changed",{value:this._agents.find(e=>e.id===this.value)?.supported_languages}))}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this._debouncedUpdateAgents=(0,s.s)(()=>this._updateAgents(),500)}}y.styles=a.AH`:host{display:flex;align-items:center}ha-select{width:100%}ha-icon-button{color:var(--secondary-text-color)}`,(0,i.Cg)([(0,n.MZ)()],y.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)()],y.prototype,"language",void 0),(0,i.Cg)([(0,n.MZ)()],y.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"required",void 0),(0,i.Cg)([(0,n.wk)()],y.prototype,"_agents",void 0),(0,i.Cg)([(0,n.wk)()],y.prototype,"_configEntry",void 0),(0,i.Cg)([(0,n.wk)()],y.prototype,"_subConfigEntry",void 0),y=(0,i.Cg)([(0,n.EM)("ha-conversation-agent-picker")],y),t()}catch(e){t(e)}})},70947(e,t,o){var i=o(62826),a=o(50759),n=(o(38625),o(5124)),r=o(22441);o(67094);class s extends a.A{renderCheckboxIcon(){return n.qy` <ha-svg-icon id="check" part="checkmark" .path="${this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"}"></ha-svg-icon> `}static get styles(){return[a.A.styles,n.AH`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`]}constructor(...e){super(...e),this.selected=!1}}(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],s.prototype,"selected",void 0),s=(0,i.Cg)([(0,r.EM)("ha-dropdown-item")],s)},29823(e,t,o){o.a(e,async function(e,t){try{var i=o(62826),a=o(52254),n=o(5124),r=o(22441),s=e([a]);a=(s.then?(await s)():s)[0];class c extends a.A{get anchorElement(){return this.popup?.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[a.A.styles,n.AH`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
--card-background-color,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
)}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"dropdownTag",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"dropdownItemTag",void 0),c=(0,i.Cg)([(0,r.EM)("ha-dropdown")],c),t()}catch(e){t(e)}})},47680(e,t,o){o.r(t),o.d(t,{HaIcon:()=>$});o(74423);var i=o(62826),a=o(5124),n=o(22441),r=o(1087),s=o(9899),c=o(700),l=(o(44114),o(18111),o(7588),o(95192)),d=o(7553);const p=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let h;const u=()=>(h||(h=g().catch(e=>{throw h=void 0,e})),h),g=async()=>{const e=(0,l.y$)("hass-icon-db","mdi-icon-store"),t=await(0,l.Jt)("_version",e);return t?t!==p.version&&(await(0,l.IU)(e),(0,l.hZ)("_version",p.version,e)):(0,l.hZ)("_version",p.version,e),e},f=["mdi","hass","hassio","hademo"];let m=[];o(67094);const b={},y={},_=(0,s.s)(()=>(async e=>{const t=Object.keys(e),o=await Promise.allSettled(Object.values(e));(await u())("readwrite",i=>{o.forEach((o,a)=>{"fulfilled"===o.status&&Object.entries(o.value).forEach(([e,t])=>{i.put(t,e)}),delete e[t[a]]})})})(y),2e3),v={},w={"home-assistant":()=>o.e(58781).then(o.bind(o,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>o.e(56009).then(o.bind(o,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>o.e(88800).then(o.bind(o,45091)).then(e=>e.mdiEsphomeLogo)};class $ extends a.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?a.qy` <iron-icon .icon="${this.icon}"></iron-icon>`:a.qy`<ha-svg-icon .path="${this._path}" .secondaryPath="${this._secondaryPath}" .viewBox="${this._viewBox}"></ha-svg-icon>`:a.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,o]=this.icon.split(":",2);let i,a=o;if(!t||!a)return;if(!f.includes(t)){const o=c.y[t];return o?void(o&&"function"==typeof o.getIcon&&this._setCustomPath(o.getIcon(a),e)):void(this._legacy=!0)}if(this._legacy=!1,a in b){const e=b[a];let o;e.newName?(o=`Icon ${t}:${a} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,a=e.newName):o=`Icon ${t}:${a} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(o),(0,r.r)(this,"write_log",{level:"warning",message:o})}if(a in v)return void(this._path=v[a]);if(a in w){const t=await w[a]();return this.icon===e&&(this._path=t),void(v[a]=t)}try{i=await(e=>new Promise((t,o)=>{if(m.push([e,t,o]),m.length>1)return;const i=u();(0,d.h)(1e3,(async()=>{(await i)("readonly",e=>{for(const[t,o,i]of m)(0,l.Yd)(e.get(t)).then(e=>o(e)).catch(e=>i(e));m=[]})})()).catch(e=>{for(const[,,t]of m)t(e);m=[]})}))(a)}catch(e){i=void 0}if(i)return this.icon===e&&(this._path=i),void(v[a]=i);const n=(e=>{let t;for(const o of p.parts){if(void 0!==o.start&&e<o.start)break;t=o}return t.file})(a);if(n in y)return void this._setPath(y[n],a,e);const s=fetch(`/static/mdi/${n}.json`).then(e=>e.json());y[n]=s,this._setPath(s,a,e),s.catch(()=>{delete y[n]}),_()}async _setCustomPath(e,t){const o=await e;this.icon===t&&(this._path=o.path,this._secondaryPath=o.secondaryPath,this._viewBox=o.viewBox)}async _setPath(e,t,o){try{const i=await e;this.icon===o&&(this._path=i[t]),v[t]=i[t]}catch(e){}}constructor(...e){super(...e),this._legacy=!1}}$.styles=a.AH`:host{fill:currentcolor}`,(0,i.Cg)([(0,n.MZ)()],$.prototype,"icon",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_path",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_secondaryPath",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_viewBox",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_legacy",void 0),$=(0,i.Cg)([(0,n.EM)("ha-icon")],$)},3449(e,t,o){var i=o(62826),a=o(5124),n=o(22441);class r extends a.WF{render(){return a.qy`<slot></slot>`}constructor(...e){super(...e),this.disabled=!1}}r.styles=a.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var(
--mdc-typography-caption-letter-spacing,
.0333333333em
);line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),r=(0,i.Cg)([(0,n.EM)("ha-input-helper-text")],r)},2846(e,t,o){o.d(t,{G:()=>l,J:()=>c});var i=o(62826),a=o(58168),n=o(82553),r=o(5124),s=o(22441);o(54276);const c=[n.R,r.AH`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`];class l extends a.n{renderRipple(){return"text"===this.type?r.s6:r.qy`<ha-ripple part="ripple" for="item" ?disabled="${this.disabled&&"link"!==this.type}"></ha-ripple>`}}l.styles=c,l=(0,i.Cg)([(0,s.EM)("ha-md-list-item")],l)},88285(e,t,o){o.a(e,async function(e,t){try{var i=o(62826),a=o(35211),n=o(5124),r=o(22441),s=o(63672),c=o(1087),l=o(22792),d=o(17894),p=(o(75064),o(47680),o(26300)),h=e([p]);p=(h.then?(await h)():h)[0];const u="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",g="M7,10L12,15L17,10H7Z";class f extends((0,d.c)(n.WF)){async focus(){await this.updateComplete,await(this.item?.focus())}render(){const e=!!this.value,t=!(!this.value||this.required||this.disabled||this.hideClearIcon),o=this.placeholder??this.label,i=this.label&&e?n.qy`<span slot="overline">${this.label}${this.required?" *":""}</span>`:n.s6,a=e?this.valueRenderer?this.valueRenderer(this.value??""):n.qy`<span slot="headline">${this.value}</span>`:o?n.qy`<span slot="headline" class="placeholder"> ${o}${this.required?" *":""} </span>`:n.s6;return n.qy` <ha-combo-box-item aria-label="${(0,s.J)(this.label||this.placeholder)}" .disabled="${this.disabled}" type="button" compact="compact"> ${this.image?n.qy`<img alt="${this.label??""}" slot="start" .src="${this.image}" crossorigin="anonymous" referrerpolicy="no-referrer">`:this.icon?n.qy`<ha-icon slot="start" .icon="${this.icon}"></ha-icon>`:n.qy`<slot name="start"></slot>`} ${i}${a} ${this.unknown?n.qy`<div slot="supporting-text" class="unknown"> ${this.unknownItemText||this._i18n?.localize("ui.components.combo-box.unknown_item")} </div>`:n.s6} ${t?n.qy` <ha-icon-button class="clear" slot="end" @click="${this._clear}" .path="${u}"></ha-icon-button> `:n.s6} <ha-svg-icon class="arrow" slot="end" .path="${g}"></ha-svg-icon> </ha-combo-box-item> `}_clear(e){e.stopPropagation(),(0,c.r)(this,"clear")}static get styles(){return[n.AH`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`]}constructor(...e){super(...e),this.invalid=!1}}(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"invalid",void 0),(0,i.Cg)([(0,r.P)("ha-combo-box-item",!0)],f.prototype,"item",void 0),(0,i.Cg)([(0,r.wk)(),(0,a.Fg)({context:l.D5,subscribe:!0})],f.prototype,"_i18n",void 0),f=(0,i.Cg)([(0,r.EM)("ha-picker-field")],f),t()}catch(e){t(e)}})},54276(e,t,o){var i=o(62826),a=o(76482),n=o(91382),r=o(96245),s=o(5124),c=o(22441);class l extends n.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){e?.removeEventListener("touchend",this._handleTouchEnd),t?.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new a.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}l.styles=[r.R,s.AH`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`],l=(0,i.Cg)([(0,c.EM)("ha-ripple")],l)},606(e,t,o){o.a(e,async function(e,t){try{o(74423),o(18111),o(61701);var i=o(62826),a=o(5124),n=o(22441),r=o(63672),s=o(22786),c=o(1087),l=o(29823),d=(o(70947),o(3449),o(88285)),p=(o(67094),e([l,d]));[l,d]=p.then?(await p)():p;class h extends a.WF{render(){return this.disabled?a.qy`${this._renderField()}${this._renderHelper()}`:a.qy` <ha-dropdown placement="bottom" @wa-select="${this._handleSelect}" @wa-show="${this._handleShow}" @wa-hide="${this._handleHide}"> ${this._renderField()} ${this.options?this.options.map(e=>{const t=["string","number"].includes(typeof e);return a.qy` <ha-dropdown-item .value="${t?e:e.value}" .disabled="${!t&&(e.disabled??!1)}" .selected="${this.value===(t?e:e.value)}"> ${e.iconPath?a.qy`<ha-svg-icon slot="icon" .path="${e.iconPath}"></ha-svg-icon>`:a.s6} <div class="content"> ${t?e:e.label||e.value} ${e.secondary?a.qy`<div class="secondary">${e.secondary}</div>`:a.s6} </div> </ha-dropdown-item> `}):a.qy`<slot></slot>`} </ha-dropdown> ${this._renderHelper()} `}_renderField(){const e=this._getValueLabel(this.options,this.value);return a.qy` <ha-picker-field slot="trigger" type="button" class="${this._opened?"opened":""}" compact="compact" aria-label="${(0,r.J)(this.label)}" @clear="${this._clearValue}" .label="${this.label}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" .hideClearIcon="${!this.clearable||this.required||this.disabled||!String(this.value)}"> </ha-picker-field> `}_renderHelper(){return this.helper?a.qy`<ha-input-helper-text .disabled="${this.disabled}">${this.helper}</ha-input-helper-text>`:a.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,c.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,c.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,s.A)((e,t)=>{const o=void 0!==t?String(t):void 0;if(!e||!o)return o;for(const t of e){const e=["string","number"].includes(typeof t);if(e&&t===o||!e&&String(t.value)===o)return e?t:t.label||t.value}return o})}}h.styles=a.AH`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`,(0,i.Cg)([(0,n.MZ)({type:Boolean})],h.prototype,"clearable",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"options",void 0),(0,i.Cg)([(0,n.MZ)()],h.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],h.prototype,"helper",void 0),(0,i.Cg)([(0,n.MZ)()],h.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],h.prototype,"required",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],h.prototype,"disabled",void 0),(0,i.Cg)([(0,n.wk)()],h.prototype,"_opened",void 0),(0,i.Cg)([(0,n.P)("ha-picker-field")],h.prototype,"_triggerField",void 0),h=(0,i.Cg)([(0,n.EM)("ha-select")],h),t()}catch(e){t(e)}})},94215(e,t,o){o.a(e,async function(e,i){try{o.r(t),o.d(t,{HaConversationAgentSelector:()=>l});var a=o(62826),n=o(5124),r=o(22441),s=o(82432),c=e([s]);s=(c.then?(await c)():c)[0];class l extends n.WF{render(){return n.qy`<ha-conversation-agent-picker .hass="${this.hass}" .value="${this.value}" .language="${this.selector.conversation_agent?.language||this.context?.language}" .label="${this.label}" .helper="${this.helper}" .disabled="${this.disabled}" .required="${this.required}"></ha-conversation-agent-picker>`}constructor(...e){super(...e),this.disabled=!1,this.required=!0}}l.styles=n.AH`ha-conversation-agent-picker{width:100%}`,(0,a.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"selector",void 0),(0,a.Cg)([(0,r.MZ)()],l.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)()],l.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)()],l.prototype,"helper",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],l.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],l.prototype,"required",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"context",void 0),l=(0,a.Cg)([(0,r.EM)("ha-selector-conversation_agent")],l),i()}catch(e){i(e)}})},77423(e,t,o){o.d(t,{A:()=>a,Cm:()=>n,Fs:()=>b,JW:()=>m,TC:()=>c,VN:()=>l,Vx:()=>d,XQ:()=>g,eM:()=>h,iH:()=>p,k3:()=>f,m4:()=>r,qf:()=>s,t0:()=>i,yv:()=>u});o(44114),o(18111),o(22489),o(20116),o(7588),o(61701);const i=(e,t)=>e.callWS({type:"config_entries/subentries/list",entry_id:t}),a=(e,t,o,i)=>e.callWS({type:"config_entries/subentries/update",entry_id:t,subentry_id:o,...i}),n=(e,t,o)=>e.callWS({type:"config_entries/subentries/delete",entry_id:t,subentry_id:o}),r=66649!=o.j?["migration_error","setup_error","setup_retry"]:null,s=66649!=o.j?["not_loaded","loaded","setup_error","setup_retry"]:null,c=(e,t,o)=>{const i={type:"config_entries/subscribe"};return o&&o.type&&(i.type_filter=o.type),e.connection.subscribeMessage(e=>{t(e)},i)},l=(e,t)=>{const o={};return t&&(t.type&&(o.type_filter=t.type),t.domain&&(o.domain=t.domain)),e.callWS({type:"config_entries/get",...o})},d=(e,t)=>e.callWS({type:"config_entries/get_single",entry_id:t}),p=(e,t,o)=>e.callWS({type:"config_entries/update",entry_id:t,...o}),h=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),u=(e,t)=>e.callApi("POST",`config/config_entries/entry/${t}/reload`),g=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:"user"}),f=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:null}),m=(e,t)=>{if(!t)return e;const o=e.find(e=>e.entry_id===t);if(!o)return e;return[o,...e.filter(e=>e.entry_id!==t)]};class b{processMessage(e){return e.forEach(e=>{if(null!==e.type&&"added"!==e.type)if("removed"!==e.type){if("updated"===e.type){const t=e.entry;this._entries=this._entries.map(e=>e.entry_id===t.entry_id?t:e)}}else this._entries=this._entries.filter(t=>t.entry_id!==e.entry.entry_id);else this._entries.push(e.entry)}),this._entries}constructor(){this._entries=[]}}},88433(e,t,o){if(o.d(t,{RW:()=>r,ZE:()=>a,e1:()=>s,vc:()=>n}),66649!=o.j)var i=o(44537);var a=function(e){return e[e.CONTROL=1]="CONTROL",e}({});const n=(e,t,o)=>e.callWS({type:"conversation/agent/list",language:t,country:o}),r=(e,t,o,a)=>e.callWS({type:"conversation/agent/homeassistant/debug",sentences:(0,i.e)(t),language:o,device_id:a}),s=(e,t,o)=>e.callWS({type:"conversation/agent/homeassistant/language_scores",language:t,country:o})},700(e,t,o){o.d(t,{y:()=>r});const i=window;"customIconsets"in i||(i.customIconsets={});const a=i.customIconsets,n=window;"customIcons"in n||(n.customIcons={});const r=new Proxy(n.customIcons,{get:(e,t)=>e[t]??(a[t]?{getIcon:a[t]}:void 0)})},59241(e,t,o){o.d(t,{BM:()=>S,Bz:()=>k,DW:()=>f,Er:()=>g,G3:()=>y,G_:()=>_,Ox:()=>z,P9:()=>E,RP:()=>$,bg:()=>v,fs:()=>p,jh:()=>m,n4:()=>x,oY:()=>d,v:()=>b,z0:()=>h});o(74423),o(18111),o(22489),o(20116);var i=o(35518),a=o(22786),n=o(71727);if(66649!=o.j)var r=o(28978);var s=o(52220),c=o(9899);const l=66649!=o.j?["light","cover","valve"]:null,d=e=>l.includes(e),p=e=>null==e||e.length>0,h=e=>null!=e,u=["sensor","binary_sensor"],g=(e,t)=>{const o=t.filter(t=>e.states[t.entity_id]&&"battery"===e.states[t.entity_id].attributes.device_class&&u.includes((0,n.m)(t.entity_id))).sort((e,t)=>u.indexOf((0,n.m)(e.entity_id))-u.indexOf((0,n.m)(t.entity_id)));if(o.length>0)return o[0]},f=(e,t)=>t.find(t=>e.states[t.entity_id]&&"battery_charging"===e.states[t.entity_id].attributes.device_class),m=(e,t)=>{if(t.name)return t.name;const o=e.states[t.entity_id];return o?(0,r.u)(o):t.original_name?t.original_name:t.entity_id},b=(e,t)=>e.callWS({type:"config/entity_registry/get",entity_id:t}),y=(e,t)=>e.callWS({type:"config/entity_registry/get_entries",entity_ids:t}),_=(e,t,o)=>e.callWS({type:"config/entity_registry/update",entity_id:t,...o}),v=(e,t)=>e.callWS({type:"config/entity_registry/remove",entity_id:t}),w=e=>e.sendMessagePromise({type:"config/entity_registry/list"}),$=e=>e.sendMessagePromise({type:"config/entity_registry/list_for_display"}),C=(e,t)=>e.subscribeEvents((0,c.s)(()=>w(e).then(e=>t.setState(e,!0)),500,!0),"entity_registry_updated"),k=(e,t)=>(0,i.N)("_entityRegistry",w,C,e,t),x=(e,t)=>e.sort((e,o)=>(0,s.SH)(e.name||"",o.name||"",t)),z=(0,a.A)(e=>{const t={};for(const o of e)t[o.entity_id]=o;return t}),E=(0,a.A)(e=>{const t={};for(const o of e)t[o.id]=o;return t}),S=(e,t)=>e.callWS({type:"config/entity_registry/get_automatic_entity_ids",entity_ids:t})},95350(e,t,o){if(o.d(t,{$h:()=>h,FP:()=>m,Og:()=>n,QC:()=>p,QQ:()=>s,S1:()=>r,Ud:()=>b,fK:()=>l,l7:()=>d,nQ:()=>g,p$:()=>c}),66649!=o.j)var i=o(35518);if(66649!=o.j)var a=o(9899);const n=66649!=o.j?{bluetooth:"config/bluetooth",dhcp:"config/dhcp",matter:"config/matter",mqtt:"config/mqtt",ssdp:"config/ssdp",thread:"config/thread",zeroconf:"config/zeroconf",zha:"config/zha/dashboard",zwave_js:"config/zwave_js/dashboard"}:null;var r=66649!=o.j?function(e){return e[e.CRITICAL=50]="CRITICAL",e[e.ERROR=40]="ERROR",e[e.WARNING=30]="WARNING",e[e.INFO=20]="INFO",e[e.DEBUG=10]="DEBUG",e[e.NOTSET=0]="NOTSET",e}({}):null;const s=(e,t)=>t.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${e}%22`,c=(e,t,o)=>e(`component.${t}.title`)||o?.name||t,l=(e,t)=>{const o={type:"manifest/list"};return t&&(o.integrations=t),e.callWS(o)},d=async(e,t)=>{const o=await e.sendMessagePromise({type:"manifest/list"}),i={};for(const e of o)i[e.domain]=e;return t(i),()=>{}},p=(e,t)=>e.callWS({type:"manifest/get",integration:t}),h=e=>e.callWS({type:"integration/setup_info"}),u=e=>e.sendMessagePromise({type:"logger/log_info"}),g=(e,t,o,i)=>e.callWS({type:"logger/integration_log_level",integration:t,level:o,persistence:i}),f=(e,t)=>e.subscribeEvents((0,a.s)(()=>u(e).then(e=>t.setState(e,!0)),200,!0),"logging_changed"),m=(e,t)=>(0,i.N)("_integration_log_info",u,f,e,t),b=(e,t)=>e.callWS({type:"integration/wait",domain:t})},7749(e,t,o){o.d(t,{HH:()=>i,TY:()=>a,lu:()=>n,mu:()=>r});const i=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t}),a=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),n=(e,t,o)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,o),r=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},29094(e,t,o){o.d(t,{g:()=>n});var i=o(1087);const a=()=>Promise.all([o.e(4801),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(92769),o.e(3283),o.e(80131),o.e(58416),o.e(54066),o.e(84038),o.e(69205),o.e(26092),o.e(48531),o.e(92411),o.e(44642)]).then(o.bind(o,78314)),n=(e,t,o)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:a,dialogParams:{...t,flowConfig:o,dialogParentElement:e}})}},70241(e,t,o){o.d(t,{Q:()=>s});var i=o(5124),a=o(95350),n=o(7749),r=o(29094);const s=(e,t,o)=>(0,r.g)(e,{startFlowHandler:t.entry_id,domain:t.domain,...o},{flowType:"options_flow",showDevices:!1,createFlow:async(e,o)=>{const[i]=await Promise.all([(0,n.HH)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return i},fetchFlow:async(e,o)=>{const[i]=await Promise.all([(0,n.TY)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return i},handleFlowStep:n.lu,deleteFlow:n.mu,renderAbortDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.abort.${o.reason}`,o.description_placeholders);return a?i.qy` <ha-markdown breaks allow-svg .content="${a}"></ha-markdown> `:o.reason},renderShowFormStepHeader:(e,o)=>e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.title`,o.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header"),renderShowFormStepDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return a?i.qy` <ha-markdown allow-svg breaks .content="${a}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,o,i,a){if("expandable"===i.type)return e.localize(`component.${t.domain}.options.step.${o.step_id}.sections.${i.name}.name`,o.description_placeholders)||i.name;const n=a?.path?.[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${o.step_id}.${n}data.${i.name}`,o.description_placeholders)||i.name},renderShowFormStepFieldHelper(e,o,a,n){if("expandable"===a.type)return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.sections.${a.name}.description`,o.description_placeholders);const r=n?.path?.[0]?`sections.${n.path[0]}.`:"",s=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.${r}data_description.${a.name}`,o.description_placeholders);return s?i.qy`<ha-markdown breaks .content="${s}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,o,i)=>e.localize(`component.${o.translation_domain||t.domain}.options.error.${i}`,o.description_placeholders)||i,renderShowFormStepFieldLocalizeValue:(e,o,i)=>e.localize(`component.${t.domain}.selector.${i}`),renderShowFormStepSubmitButton:(e,o)=>e.localize(`component.${t.domain}.options.step.${o.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===o.last_step?"next":"submit")),renderExternalStepHeader:(e,t)=>"",renderExternalStepDescription:(e,t)=>"",renderCreateEntryDescription:(e,t)=>i.qy` <p>${e.localize("ui.dialogs.options_flow.success.description")}</p> `,renderShowFormProgressHeader:(e,o)=>e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderShowFormProgressDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.progress.${o.progress_action}`,o.description_placeholders);return a?i.qy` <ha-markdown allow-svg breaks .content="${a}"></ha-markdown> `:""},renderMenuHeader:(e,o)=>e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderMenuDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return a?i.qy` <ha-markdown allow-svg breaks .content="${a}"></ha-markdown> `:""},renderMenuOption:(e,o,i)=>e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.menu_options.${i}`,o.description_placeholders),renderMenuOptionDescription:(e,o,i)=>e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.menu_option_descriptions.${i}`,o.description_placeholders),renderLoadingDescription:(e,o)=>e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===o||"loading_step"===o?e.localize(`ui.dialogs.options_flow.loading.${o}`,{integration:(0,a.p$)(e.localize,t.domain)}):"")})},26401(e,t,o){o.d(t,{a:()=>d});var i=o(5124),a=o(95350);const n={"HA-Frontend-Base":`${location.protocol}//${location.host}`},r=(e,t,o,i)=>e.callApi("POST","config/config_entries/subentries/flow",{handler:[t,o],subentry_id:i},n),s=(e,t,o)=>e.callApi("POST",`config/config_entries/subentries/flow/${t}`,o,n),c=(e,t)=>e.callApi("DELETE",`config/config_entries/subentries/flow/${t}`);var l=o(29094);const d=(e,t,o,d)=>(0,l.g)(e,d,{flowType:"config_subentries_flow",showDevices:!0,createFlow:async(e,i)=>{const[a]=await Promise.all([r(e,i,o,d.subEntryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config_subentries",t.domain),e.loadBackendTranslation("selector",t.domain),e.loadBackendTranslation("title",t.domain)]);return a},fetchFlow:async(e,i)=>{const a=await((e,t)=>e.callApi("GET",`config/config_entries/subentries/flow/${t}`,void 0,n))(e,i);return o=a.handler[1],await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config_subentries",t.domain),await e.loadBackendTranslation("selector",t.domain),a},handleFlowStep:s,deleteFlow:c,renderAbortDescription(e,a){const n=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.abort.${a.reason}`,a.description_placeholders);return n?i.qy` <ha-markdown allowsvg breaks .content="${n}"></ha-markdown> `:a.reason},renderShowFormStepHeader:(e,i)=>e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.title`,i.description_placeholders)||e.localize(`component.${t.domain}.title`),renderShowFormStepDescription(e,a){const n=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.step.${a.step_id}.description`,a.description_placeholders);return n?i.qy` <ha-markdown allowsvg breaks .content="${n}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,i,a,n){if("expandable"===a.type)return e.localize(`component.${t.domain}.config_subentries.${o}.step.${i.step_id}.sections.${a.name}.name`,i.description_placeholders)||a.name;const r=n?.path?.[0]?`sections.${n.path[0]}.`:"";return e.localize(`component.${t.domain}.config_subentries.${o}.step.${i.step_id}.${r}data.${a.name}`,i.description_placeholders)||a.name},renderShowFormStepFieldHelper(e,a,n,r){if("expandable"===n.type)return e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.step.${a.step_id}.sections.${n.name}.description`,a.description_placeholders);const s=r?.path?.[0]?`sections.${r.path[0]}.`:"",c=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.step.${a.step_id}.${s}data_description.${n.name}`,a.description_placeholders);return c?i.qy`<ha-markdown breaks .content="${c}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,i,a)=>e.localize(`component.${i.translation_domain||i.translation_domain||t.domain}.config_subentries.${o}.error.${a}`,i.description_placeholders)||a,renderShowFormStepFieldLocalizeValue:(e,o,i)=>e.localize(`component.${t.domain}.selector.${i}`),renderShowFormStepSubmitButton:(e,i)=>e.localize(`component.${t.domain}.config_subentries.${o}.step.${i.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===i.last_step?"next":"submit")),renderExternalStepHeader:(e,i)=>e.localize(`component.${t.domain}.config_subentries.${o}.step.${i.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site"),renderExternalStepDescription(e,a){const n=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.step.${a.step_id}.description`,a.description_placeholders);return i.qy` <p> ${e.localize("ui.panel.config.integrations.config_flow.external_step.description")} </p> ${n?i.qy` <ha-markdown allowsvg breaks .content="${n}"></ha-markdown> `:""} `},renderCreateEntryDescription(e,a){const n=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.create_entry.${a.description||"default"}`,a.description_placeholders);return i.qy` ${n?i.qy` <ha-markdown allowsvg breaks .content="${n}"></ha-markdown> `:i.s6} `},renderShowFormProgressHeader:(e,i)=>e.localize(`component.${t.domain}.config_subentries.${o}.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderShowFormProgressDescription(e,a){const n=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.progress.${a.progress_action}`,a.description_placeholders);return n?i.qy` <ha-markdown allowsvg breaks .content="${n}"></ha-markdown> `:""},renderMenuHeader:(e,i)=>e.localize(`component.${t.domain}.config_subentries.${o}.step.${i.step_id}.title`,i.description_placeholders)||e.localize(`component.${t.domain}.title`),renderMenuDescription(e,a){const n=e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${o}.step.${a.step_id}.description`,a.description_placeholders);return n?i.qy` <ha-markdown allowsvg breaks .content="${n}"></ha-markdown> `:""},renderMenuOption:(e,i,a)=>e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.menu_options.${a}`,i.description_placeholders),renderMenuOptionDescription:(e,i,a)=>e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.menu_option_descriptions.${a}`,i.description_placeholders),renderLoadingDescription(e,t,o,i){if("loading_flow"!==t&&"loading_step"!==t)return"";const n=i?.handler||o;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:n?(0,a.p$)(e.localize,n):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},17894(e,t,o){o.d(t,{c:()=>n});var i=o(62826),a=o(22441);const n=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,i.Cg)([(0,a.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,i.Cg)([(0,a.MZ)()],t.prototype,"icon",void 0),(0,i.Cg)([(0,a.MZ)()],t.prototype,"image",void 0),(0,i.Cg)([(0,a.MZ)()],t.prototype,"label",void 0),(0,i.Cg)([(0,a.MZ)()],t.prototype,"placeholder",void 0),(0,i.Cg)([(0,a.MZ)()],t.prototype,"helper",void 0),(0,i.Cg)([(0,a.MZ)()],t.prototype,"value",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},89429(e){e.exports=function(){}}};