1export const __rspack_esm_id=92227;export const __rspack_esm_ids=[92227];export const __webpack_modules__={33480(e,t,a){var i=a(98274);a.d(t,{},{t:e=>(0,i.m)(e.entity_id)})},32836(e,t,a){a(74423);var i=a(95722),s=a(98274),o=a(19963);function n(e,t){const a=(0,s.m)(e.entity_id),n=void 0!==t?t:e?.state;if(o.fm.has(a))return n!==i.Hh;if(n===i.Hh||n===i.HV)return!1;if("off"===n&&"alert"!==a)return!1;switch(a){case"alarm_control_panel":return"disarmed"!==n;case"alert":return"idle"!==n;case"cover":case"valve":return"closed"!==n;case"device_tracker":case"person":return"not_home"!==n;case"lawn_mower":return!["docked","paused"].includes(n);case"lock":return"locked"!==n;case"media_player":return"standby"!==n;case"vacuum":return!["idle","docked","paused"].includes(n);case"plant":return"problem"===n;case"group":return["on","home","open","locked","problem"].includes(n);case"timer":return"active"===n;case"camera":return["streaming","recording"].includes(n)}return!0}a.d(t,{a:()=>n})},22707(e,t,a){const i=(e,t)=>0!==(e.supported_features&t);a.d(t,{},{$:(e,t)=>i(e.attributes,t)})},1315(e,t,a){var i=a(27065);a.d(t,{},{l:async(e,t)=>{if(navigator.clipboard)try{return void await navigator.clipboard.writeText(e)}catch{}const a=t||(0,i.n)()?.getRootNode()||document.body,s=a.nodeType===Node.DOCUMENT_NODE?document.body:a,o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.opacity="0",s.appendChild(o),o.select(),document.execCommand("copy"),s.removeChild(o)}})},94939(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(61701);var i=a(28861),s=a(11467),o=a(82476),n=a(16635),l=a(47749),r=a(62228),c=a(6162),d=(a(26e3),a(42290),a(91128)),h=(a(47551),e([c,d]));[c,d]=h.then?(await h)():h;class p extends s.WF{render(){return this.disabled?s.qy`${this._renderField()}${this._renderHelper()}`:s.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 s.qy` <ha-dropdown-item .value=${t?e:e.value} .disabled=${!t&&(e.disabled??!1)} .selected=${this.value===(t?e:e.value)}> ${e.iconPath?s.qy`<ha-svg-icon slot="icon" .path=${e.iconPath}></ha-svg-icon>`:s.s6} <div class="content"> ${t?e:e.label||e.value} ${e.secondary?s.qy`<div class="secondary"> ${e.secondary} </div>`:s.s6} </div> </ha-dropdown-item> `}):s.qy`<slot></slot>`} </ha-dropdown> ${this._renderHelper()} `}_renderField(){const e=this._getValueLabel(this.options,this.value);return s.qy` <ha-picker-field slot="trigger" type="button" class=${this._opened?"opened":""} compact=compact aria-label=${(0,n.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?s.qy`<ha-input-helper-text .disabled=${this.disabled}>${this.helper}</ha-input-helper-text>`:s.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,r.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,r.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,l.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const t of e){const e=["string","number"].includes(typeof t);if(e&&t===a||!e&&String(t.value)===a)return e?t:t.label||t.value}return a})}}p.styles=s.AH`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{gap:var(--ha-space-1);flex-direction:column;display:flex}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{margin:var(--ha-space-2) 0 0;display:block}`,(0,i.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"clearable",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"options",void 0),(0,i.Cg)([(0,o.MZ)()],p.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)()],p.prototype,"helper",void 0),(0,i.Cg)([(0,o.MZ)()],p.prototype,"value",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,i.Cg)([(0,o.wk)()],p.prototype,"_opened",void 0),(0,i.Cg)([(0,o.P)("ha-picker-field")],p.prototype,"_triggerField",void 0),p=(0,i.Cg)([(0,o.EM)("ha-select")],p),t()}catch(e){t(e)}})},45426(e,t,a){var i=a(28861),s=a(11467),o=a(82476),n=a(7346);a(47551);class l extends s.WF{render(){return this._localize?s.qy` <ha-svg-icon .path=${"M12,2A7,7 0 0,1 19,9C19,11.38 17.81,13.47 16,14.74V17A1,1 0 0,1 15,18H9A1,1 0 0,1 8,17V14.74C6.19,13.47 5,11.38 5,9A7,7 0 0,1 12,2M9,21V20H15V21A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21M12,4A5,5 0 0,0 7,9C7,11.05 8.23,12.81 10,13.58V16H14V13.58C15.77,12.81 17,11.05 17,9A5,5 0 0,0 12,4Z"}></ha-svg-icon> <span class="prefix">${this._localize("ui.panel.config.tips.tip")}</span> <span class="text"><slot></slot></span> `:s.s6}}l.styles=s.AH`:host{text-align:center;display:block}.text{direction:var(--direction);margin-left:2px;color:var(--secondary-text-color);margin-inline-start:2px;margin-inline-end:initial}.prefix{font-weight:var(--ha-font-weight-medium)}`,(0,i.Cg)([(0,o.wk)(),(0,n.IW)()],l.prototype,"_localize",void 0),l=(0,i.Cg)([(0,o.EM)("ha-tip")],l)},9878(e,t,a){var i=a(28861),s=a(63018),o=a(82476),n=a(11467),l=a(7578),r=a(78813),c=a(7209),d=a(91695);class h extends n.WF{render(){return n.qy` <img class="logo" alt=${c.aK[this.voiceAssistantId].name} src=${(0,d.MR)({domain:c.aK[this.voiceAssistantId].domain,type:"icon",darkOptimized:this._ui.themes?.darkMode},this._config.auth.data.hassUrl)} crossorigin="anonymous" referrerpolicy="no-referrer"/> `}static get styles(){return[l.RF,n.AH`:host{display:inline}.logo{vertical-align:middle;height:24px;position:relative}`]}}(0,i.Cg)([(0,o.wk)(),(0,s.Fg)({context:r.EK,subscribe:!0})],h.prototype,"_ui",void 0),(0,i.Cg)([(0,o.wk)(),(0,s.Fg)({context:r.WF,subscribe:!0})],h.prototype,"_config",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],h.prototype,"voiceAssistantId",void 0),h=(0,i.Cg)([(0,o.EM)("voice-assistant-brand-icon")],h)},49950(e,t,a){a(17642),a(15024),a(31698);a.d(t,{},{$:e=>e.callWS({type:"cloud/tts/info"}),Q:e=>{const t=[];if(!e)return t;const a=new Set;for(const[i]of e.languages)a.has(i)||(a.add(i),t.push(i));return t}})},95722(e,t,a){a(95747);const i="unavailable",s="unknown";a.d(t,{},{HV:s,Hh:i})},7209(e,t,a){a(18111),a(22489);var i=a(22666);const s={conversation:{domain:"assist_pipeline",name:"Assist"},"cloud.alexa":{domain:"alexa",name:"Amazon Alexa"},"cloud.google_assistant":{domain:"google_assistant",name:"Google Assistant"}};a.d(t,{},{Gw:(e,t)=>e.callWS({type:"homeassistant/expose_new_entities/get",assistant:t}),Ow:e=>e.callWS({type:"homeassistant/expose_entity/list"}),YH:(e,t,a)=>e.callWS({type:"homeassistant/expose_new_entities/set",assistant:t,expose_new:a}),aK:s,hB:(e,t)=>{const a=(0,i.Ox)(e)[t];return Object.keys(s).filter(e=>a?.options?.[e]?.should_expose)},ij:(e,t,a,i)=>e.callWS({type:"homeassistant/expose_entity",assistants:t,entity_ids:a,should_expose:i})})},97119(e,t,a){var i=a(32836),s=a(22707),o=a(95722),n=a(60172),l=a(53853);const r="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",c="M14,19H18V5H14M6,19H10V5H6V19Z",d="M8,5.14V19.14L19,12.14L8,5.14Z",h="M13,3H11V13H13V3M17.83,5.17L16.41,6.59C18.05,7.91 19,9.9 19,12A7,7 0 0,1 12,19C8.14,19 5,15.88 5,12C5,9.91 5.95,7.91 7.58,6.58L6.17,5.17C2.38,8.39 1.92,14.07 5.14,17.86C8.36,21.64 14.04,22.1 17.83,18.88C19.85,17.17 21,14.65 21,12C21,9.37 19.84,6.87 17.83,5.17Z",p="M18,18H6V6H18V18Z",u="M8.16,3L6.75,4.41L9.34,7H4C2.89,7 2,7.89 2,9V19C2,20.11 2.89,21 4,21H20C21.11,21 22,20.11 22,19V9C22,7.89 21.11,7 20,7H14.66L17.25,4.41L15.84,3L12,6.84L8.16,3M4,9H17V19H4V9M19.5,9A1,1 0 0,1 20.5,10A1,1 0 0,1 19.5,11A1,1 0 0,1 18.5,10A1,1 0 0,1 19.5,9M19.5,12A1,1 0 0,1 20.5,13A1,1 0 0,1 19.5,14A1,1 0 0,1 18.5,13A1,1 0 0,1 19.5,12Z",g={album:{icon:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12,16.5C9.5,16.5 7.5,14.5 7.5,12C7.5,9.5 9.5,7.5 12,7.5C14.5,7.5 16.5,9.5 16.5,12C16.5,14.5 14.5,16.5 12,16.5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",layout:"grid"},app:{icon:"M21 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H21C22.1 22 23 21.1 23 20V4C23 2.9 22.1 2 21 2M21 7H3V4H21V7Z",layout:"grid",show_list_images:!0},artist:{icon:r,layout:"grid",show_list_images:!0},channel:{icon:u,thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},composer:{icon:"M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4M11,6A2,2 0 0,0 9,8A2,2 0 0,0 11,10A2,2 0 0,0 13,8A2,2 0 0,0 11,6M11,13C12.1,13 13.66,13.23 15.11,13.69C14.5,14.07 14,14.6 13.61,15.23C12.79,15.03 11.89,14.9 11,14.9C8.03,14.9 4.9,16.36 4.9,17V18.1H13.04C13.13,18.8 13.38,19.44
113.76,20H3V17C3,14.34 8.33,13 11,13M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",layout:"grid",show_list_images:!0},contributing_artist:{icon:r,layout:"grid",show_list_images:!0},directory:{icon:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",layout:"grid",show_list_images:!0},episode:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},game:{icon:"M7,6H17A6,6 0 0,1 23,12A6,6 0 0,1 17,18C15.22,18 13.63,17.23 12.53,16H11.47C10.37,17.23 8.78,18 7,18A6,6 0 0,1 1,12A6,6 0 0,1 7,6M6,9V11H4V13H6V15H8V13H10V11H8V9H6M15.5,12A1.5,1.5 0 0,0 14,13.5A1.5,1.5 0 0,0 15.5,15A1.5,1.5 0 0,0 17,13.5A1.5,1.5 0 0,0 15.5,12M18.5,9A1.5,1.5 0 0,0 17,10.5A1.5,1.5 0 0,0 18.5,12A1.5,1.5 0 0,0 20,10.5A1.5,1.5 0 0,0 18.5,9Z",layout:"grid",thumbnail_ratio:"portrait"},genre:{icon:"M8.11,19.45C5.94,18.65 4.22,16.78 3.71,14.35L2.05,6.54C1.81,5.46 2.5,4.4 3.58,4.17L13.35,2.1L13.38,2.09C14.45,1.88 15.5,2.57 15.72,3.63L16.07,5.3L20.42,6.23H20.45C21.5,6.47 22.18,7.53 21.96,8.59L20.3,16.41C19.5,20.18 15.78,22.6 12,21.79C10.42,21.46 9.08,20.61 8.11,19.45V19.45M20,8.18L10.23,6.1L8.57,13.92V13.95C8,16.63 9.73,19.27 12.42,19.84C15.11,20.41 17.77,18.69 18.34,16L20,8.18M16,16.5C15.37,17.57 14.11,18.16 12.83,17.89C11.56,17.62 10.65,16.57 10.5,15.34L16,16.5M8.47,5.17L4,6.13L5.66,13.94L5.67,13.97C5.82,14.68 6.12,15.32 6.53,15.87C6.43,15.1 6.45,14.3 6.62,13.5L7.05,11.5C6.6,11.42 6.21,11.17 6,10.81C6.06,10.2 6.56,9.66 7.25,9.5C7.33,9.5 7.4,9.5 7.5,9.5L8.28,5.69C8.32,5.5 8.38,5.33 8.47,5.17M15.03,12.23C15.35,11.7 16.03,11.42 16.72,11.57C17.41,11.71 17.91,12.24 18,12.86C17.67,13.38 17,13.66 16.3,13.5C15.61,13.37 15.11,12.84 15.03,12.23M10.15,11.19C10.47,10.66 11.14,10.38 11.83,10.53C12.5,10.67 13.03,11.21 13.11,11.82C12.78,12.34 12.11,12.63 11.42,12.5C10.73,12.33 10.23,11.8 10.15,11.19M11.97,4.43L13.93,4.85L13.77,4.05L11.97,4.43Z",layout:"grid",show_list_images:!0},image:{icon:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z",layout:"grid",show_list_images:!0},movie:{icon:"M18,4L20,8H17L15,4H13L15,8H12L10,4H8L10,8H7L5,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V4H18Z",thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},music:{icon:"M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z",show_list_images:!0},playlist:{icon:"M15,6H3V8H15V6M15,10H3V12H15V10M3,16H11V14H3V16M17,6V14.18C16.69,14.07 16.35,14 16,14A3,3 0 0,0 13,17A3,3 0 0,0 16,20A3,3 0 0,0 19,17V8H22V6H17Z",layout:"grid",show_list_images:!0},podcast:{icon:"M17,18.25V21.5H7V18.25C7,16.87 9.24,15.75 12,15.75C14.76,15.75 17,16.87 17,18.25M12,5.5A6.5,6.5 0 0,1 18.5,12C18.5,13.25 18.15,14.42 17.54,15.41L16,14.04C16.32,13.43 16.5,12.73 16.5,12C16.5,9.5 14.5,7.5 12,7.5C9.5,7.5 7.5,9.5 7.5,12C7.5,12.73 7.68,13.43 8,14.04L6.46,15.41C5.85,14.42 5.5,13.25 5.5,12A6.5,6.5 0 0,1 12,5.5M12,1.5A10.5,10.5 0 0,1 22.5,12C22.5,14.28 21.77,16.39 20.54,18.11L19.04,16.76C19.96,15.4 20.5,13.76 20.5,12A8.5,8.5 0 0,0 12,3.5A8.5,8.5 0 0,0 3.5,12C3.5,13.76 4.04,15.4 4.96,16.76L3.46,18.11C2.23,16.39 1.5,14.28 1.5,12A10.5,10.5 0 0,1 12,1.5M12,9.5A2.5,2.5 0 0,1 14.5,12A2.5,2.5 0 0,1 12,14.5A2.5,2.5 0 0,1 9.5,12A2.5,2.5 0 0,1 12,9.5Z",layout:"grid"},season:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},track:{icon:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13,13H11V18A2,2 0 0,1 9,20A2,2 0 0,1 7,18A2,2 0 0,1 9,16C9.4,16 9.7,16.1 10,16.3V11H13V13M13,9V3.5L18.5,9H13Z"},tv_show:{icon:u,layout:"grid",thumbnail_ratio:"portrait"},url:{icon:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,
110.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},video:{icon:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",layout:"grid",show_list_images:!0}};a.d(t,{vj:()=>l.v},{$6:e=>{let t=e.attributes.media_position;return"playing"!==e.state?t:(t+=(Date.now()-new Date(e.attributes.media_position_updated_at).getTime())/1e3,t<0?0:t)},EC:g,ET:(e,t,a,i)=>e.callWS({type:"media_player/browse_media",entity_id:t,media_content_id:a,media_content_type:i}),H1:"browser",HN:e=>{if(!e)return;const t=e.indexOf("?authSig=");let a=t>0?e.slice(0,t):e;return a.startsWith("http")&&(a=decodeURIComponent(a.split("/").pop())),a},Im:(e,t,a)=>e.callService("media_player","join",{group_members:a},{entity_id:t}),QI:(e,t,a)=>e.callService("media_player","volume_set",{entity_id:t,volume_level:a}),Un:(e,t=!1)=>{if(!e)return;const a=e.state;if(a===o.Hh)return;const n=!0===e.attributes.assumed_state;if(!(0,i.a)(e)&&!n)return(0,s.$)(e,l.v.TURN_ON)?[{icon:h,action:"turn_on"}]:void 0;const r=[];n&&(0,s.$)(e,l.v.TURN_ON)&&r.push({icon:"M11,3H13V21H11V3Z",action:"turn_on"}),(0,s.$)(e,l.v.TURN_OFF)&&r.push({icon:n?"M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M12,19A7,7 0 0,1 5,12A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19Z":h,action:"turn_off"});const u=e.attributes;return("playing"===a||"paused"===a||n)&&(0,s.$)(e,l.v.SHUFFLE_SET)&&t&&r.push({icon:!0===u.shuffle?"M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z":"M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16",action:"shuffle_set"}),("playing"===a||"paused"===a||n)&&(0,s.$)(e,l.v.PREVIOUS_TRACK)&&r.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!n&&("playing"===a&&((0,s.$)(e,l.v.PAUSE)||(0,s.$)(e,l.v.STOP))||("paused"===a||"idle"===a)&&(0,s.$)(e,l.v.PLAY)||"on"===a&&((0,s.$)(e,l.v.PLAY)||(0,s.$)(e,l.v.PAUSE)))&&r.push({icon:"on"===a?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==a?d:(0,s.$)(e,l.v.PAUSE)?c:p,action:"playing"!==a?"media_play":(0,s.$)(e,l.v.PAUSE)?"media_pause":"media_stop"}),n&&(0,s.$)(e,l.v.PLAY)&&r.push({icon:d,action:"media_play"}),n&&(0,s.$)(e,l.v.PAUSE)&&r.push({icon:c,action:"media_pause"}),n&&(0,s.$)(e,l.v.STOP)&&r.push({icon:p,action:"media_stop"}),("playing"===a||"paused"===a||n)&&(0,s.$)(e,l.v.NEXT_TRACK)&&r.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===a||"paused"===a||n)&&(0,s.$)(e,l.v.REPEAT_SET)&&t&&r.push({icon:"all"===u.repeat?"M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"one"===u.repeat?"M13,15V9H12L10,10V11H11.5V15M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"M2,5.27L3.28,4L20,20.72L18.73,22L15.73,19H7V22L3,18L7,14V17H13.73L7,10.27V11H5V8.27L2,5.27M17,13H19V17.18L17,15.18V13M17,5V2L21,6L17,10V7H8.82L6.82,5H17Z",action:"repeat_set"}),r.length>0?r:void 0},Xm:e=>{if(void 0===e||e===1/0)return"";const t=Math.max(0,Math.floor(e)),a=Math.floor(t/3600),i=Math.floor(t%3600/60),s=t%60,o=e=>e.toString().padStart(2,"0");return a>0?`${o(a)}:${o(i)}:${o(s)}`:`${o(i)}:${o(s)}`},c:(e,t,a,i,s,o)=>e.callWS({type:"media_player/search_media",entity_id:t,search_query:a,media_content_id:i,media_content_type:s,media_filter_classes:o}),ce:(e,t,a)=>e.callService("media_player",a,"shuffle_set"===a?{entity_id:t.entity_id,shuffle:!t.attributes.shuffle}:"repeat_set"===a?{entity_id:t.entity_id,repeat:"all"===t.attributes.repeat?"one":"off"===t.attributes.repeat?"all":"off"}:{entity_id:t.entity_id}),fh:(e,t)=>e.callService("media_player","unjoin",{},{entity_id:t}),ie:(e,t,a,i,s={})=>(!s.enqueue&&void 0===s.announce&&(0,n.ni)(a)&&(s.announce=!0),e.callService("media_player","play_media",{entity_id:t,media_content_id:a,media_content_type:i,...s})),mm:e=>{let t;switch(e.attributes.media_content_type){case"music":case"image":t=e.attributes.media_artist;break;case"playlist":t=e.attributes.media_playlist||e.attributes.media_artist;break;case"tvshow":t=e.attributes.media_series_title,e.attributes.media_season&&(t+=" S"+e.attributes.media_season,e.attributes.media_episode&&(t+="E"+e.attributes.media_episode));break;case"channel":t=e.attributes.media_channel;break;default:t=e.attributes.app_name||""}return t}})},60172(e,t,a){const i="media-source://tts/";a.d(t,{},{EF:e=>e.substring(19),S_:(e,t)=>e.callApi("POST","tts_get_url",t),Xv:(e,t,a)=>e.callWS({type:"tts/engine/list",language:t,country:a}),ni:e=>e.startsWith(i),u1:(e,t)=>e.callWS({type:"tts/engine/get",engine_id:t}),z3:(e,t,a)=>e.callWS({type:"tts/engine/voices",engine_id:t,language:a})})},92814(e,t,a){a.a(e,async function(e,i){try{a.r(t);a(18111),a(22489),a(20116),a(61701);var s=a(28861),o=a(11467),n=a(82476),l=a(47749),r=a(49302),c=a(62228),d=a(1315),h=a(33480),p=a(24783),u=a(22707),g=a(69595),_=(a(30753),a(96007)),m=a(15276),v=(a(77519),a(82739),a(94939)),y=(a(47551),a(38409)),f=(a(45426),a(9878),a(53290)),A=a(34220),C=a(49950),b=a(97119),H=a(60172),V=a(24936),M=a(35923),$=a(7578),L=a(10110),w=a(40774),x=e([g,_,m,v,y,M]);[g,_,m,v,y,M]=x.then?(await x)():x;const S="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",k="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z",Z="M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z",E=(e,t)=>{const a=[];if(!t)return a;for(const[i,s,o]of t.languages)i===e&&a.push({voiceId:s,voiceName:o});return a};
1class z extends o.WF{render(){if(!this.cloudStatus||!this.ttsInfo)return o.s6;const e=this.getLanguages(this.ttsInfo),t=this.cloudStatus.prefs.tts_default_voice,a=this.getSupportedVoices(t[0],this.ttsInfo),i=this._target||"browser",s=this._getTargetOptions(this.hass.states,this.hass.localize("ui.panel.config.cloud.account.tts.dialog.target_browser"));return o.qy` <hass-subpage .hass=${this.hass} .narrow=${this.narrow} .header=${this.hass.localize("ui.panel.config.cloud.account.tts.title")} back-path="/config/cloud/account"> <div class="content"> <ha-card outlined> <div class="card-header"> <voice-assistant-brand-icon .hass=${this.hass} .voiceAssistantId=${"conversation"}></voice-assistant-brand-icon> ${this.hass.localize("ui.panel.config.cloud.account.assist.card_title")} </div> <div class="card-content"> <p> ${this.hass.localize("ui.panel.config.cloud.account.assist.description")} </p> </div> <div class="card-actions"> <ha-button appearance="plain" href="https://www.home-assistant.io/voice_control/" target="_blank" rel="noreferrer"> ${this.hass.localize("ui.panel.config.cloud.account.assist.link_learn_more")} </ha-button> <ha-button appearance="filled" href="/config/voice-assistants/assistants"> ${this.hass.localize("ui.panel.config.cloud.account.assist.configure")} </ha-button> </div> </ha-card> <ha-card outlined header=${this.hass.localize("ui.panel.config.cloud.account.tts.card_title")}> <div class="card-content"> <ha-md-list> <ha-md-list-item> <span slot="headline"> ${this.hass.localize("ui.panel.config.cloud.account.tts.default_language")} </span> <span slot="supporting-text"> ${this.hass.localize("ui.panel.config.cloud.account.tts.default_language_description")} </span> <ha-language-picker slot="end" .hass=${this.hass} .label=${""} .disabled=${this.savingPreferences} .value=${t[0]} .languages=${e} noClearButton @value-changed=${this._handleLanguageChange}> </ha-language-picker> </ha-md-list-item> <ha-md-list-item> <span slot="headline"> ${this.hass.localize("ui.panel.config.cloud.account.tts.default_voice")} </span> <span slot="supporting-text"> ${this.hass.localize("ui.panel.config.cloud.account.tts.default_voice_description")} </span> <ha-select slot="end" .disabled=${this.savingPreferences} .value=${t[1]} @selected=${this._handleVoiceChange} .options=${a.map(e=>({value:e.voiceId,label:e.voiceName}))}> </ha-select> </ha-md-list-item> <ha-md-list-item> <span slot="headline"> ${this.hass.localize("ui.components.media-browser.tts.selected_voice_id")} </span> <code slot="supporting-text">${t[1]}</code> <ha-icon-button slot="end" .path=${S} .label=${this.hass.localize("ui.components.media-browser.tts.copy_voice_id")} @click=${this._copyVoiceId}></ha-icon-button> </ha-md-list-item> </ha-md-list> <div class="try-tts"> <span class="try-heading"> ${this.hass.localize("ui.panel.config.cloud.account.tts.dialog.header")} </span> <ha-textarea id="message" resize="auto" .label=${this.hass.localize("ui.panel.config.cloud.account.tts.dialog.message")} .value=${this._message||this.hass.localize("ui.panel.config.cloud.account.tts.dialog.example_message",{name:this.hass.user.name})}></ha-textarea> <ha-select id="target" .label=${this.hass.localize("ui.panel.config.cloud.account.tts.dialog.target")} .value=${i} @selected=${this._handleTargetChanged} .options=${s}></ha-select> <div class="try-actions"> <ha-button appearance="plain" .disabled=${"browser"===i} @click=${this._createAutomation}> <ha-svg-icon slot="start" .path=${Z}></ha-svg-icon> ${this.hass.localize("ui.panel.config.cloud.account.tts.dialog.create_automation")} </ha-button> <ha-button appearance="filled" @click=${this._playExample} .disabled=${this._loadingExample}> <ha-svg-icon slot="start" .path=${k}></ha-svg-icon> ${this.hass.localize("ui.panel.config.cloud.account.tts.dialog.play")} </ha-button> </div> </div> </div> <div class="card-actions"> <ha-button appearance="plain" href="https://support.nabucasa.com/hc/en-us/articles/25619386304541" target="_blank" rel="noreferrer"> ${this.hass.localize("ui.panel.config.cloud.account.tts.link_learn_more")} </ha-button> </div> </ha-card> <ha-card outlined header=${this.hass.localize("ui.panel.config.cloud.account.stt.card_title")}> <div class="card-content"> <p> ${this.hass.localize("ui.panel.config.cloud.account.stt.description")} </p> </div> <div class="card-actions"> <ha-button appearance="plain" href="https://support.nabucasa.com/hc/en-us/articles/29718084245149" target="_blank" rel="noreferrer"> ${this.hass.localize("ui.panel.config.cloud.account.stt.link_learn_more")} </ha-button>
1 </div> </ha-card> <ha-tip .hass=${this.hass}> ${this.hass.localize("ui.panel.config.cloud.account.tts.tip")} </ha-tip> </div> </hass-subpage> `}willUpdate(e){super.willUpdate(e),this.hasUpdated||(0,C.$)(this.hass).then(e=>{this.ttsInfo=e}),e.has("cloudStatus")&&(this.savingPreferences=!1)}async _copyVoiceId(e){e.preventDefault(),await(0,d.l)(this.cloudStatus.prefs.tts_default_voice[1]),(0,L.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")})}_handleTargetChanged(e){this._target=e.detail.value,this.requestUpdate("_target")}async _playExample(){const e=this._messageInput?.value;if(!e)return;this._message=e;const t=this._target||"browser";if("browser"===t){const t=new Audio;t.play(),this._playBrowser(e,t)}else this.hass.callService("tts","cloud_say",{entity_id:t,message:e})}_createAutomation(){const e=this._messageInput.value;this._message=e,(0,f.mX)({action:[{service:"tts.cloud_say",data:{entity_id:this._target,message:e}}]})}async _playBrowser(e,t){this._loadingExample=!0;const[a,i]=this.cloudStatus.prefs.tts_default_voice;let s;try{s=(await(0,H.S_)(this.hass,{platform:"cloud",message:e,language:a,options:{voice:i}})).path}catch(e){return this._loadingExample=!1,void(0,V.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.cloud.account.tts.unable_load_example",{error:e.error||e.body||e}),warning:!0})}t.src=s,t.addEventListener("canplaythrough",()=>{t.play()}),t.addEventListener("playing",()=>{this._loadingExample=!1}),t.addEventListener("error",()=>{(0,V.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.cloud.account.tts.error_playing_audio")}),this._loadingExample=!1})}async _handleLanguageChange(e){if(e.detail.value===this.cloudStatus.prefs.tts_default_voice[0])return;this.savingPreferences=!0;const t=e.detail.value,a=this.cloudStatus.prefs.tts_default_voice[1],i=this.getSupportedVoices(t,this.ttsInfo),s=i.find(e=>e.voiceId===a)?a:i[0].voiceId;try{await(0,A.Up)(this.hass,{tts_default_voice:[t,s]}),(0,c.r)(this,"ha-refresh-cloud-status")}catch(e){this.savingPreferences=!1,console.error(e),(0,V.showAlertDialog)(this,{text:`Unable to save default language. ${e}`,warning:!0})}}async _handleVoiceChange(e){const t=e.detail.value;if(!t||t===this.cloudStatus.prefs.tts_default_voice[1])return;this.savingPreferences=!0;const a=this.cloudStatus.prefs.tts_default_voice[0];try{await(0,A.Up)(this.hass,{tts_default_voice:[a,t]}),(0,c.r)(this,"ha-refresh-cloud-status")}catch(e){this.savingPreferences=!1,console.error(e),(0,V.showAlertDialog)(this,{text:`Unable to save default voice. ${e}`,warning:!0})}}constructor(...e){super(...e),this.narrow=!1,this.savingPreferences=!1,this._loadingExample=!1,this.getLanguages=(0,l.A)(C.Q),this.getSupportedVoices=(0,l.A)(E),this._getTargetOptions=(0,l.A)((e,t)=>[{value:"browser",label:t},...Object.values(e).filter(e=>"media_player"===(0,h.t)(e)&&(0,u.$)(e,b.vj.PLAY_MEDIA)).map(e=>({value:e.entity_id,label:(0,p.u)(e)}))])}}z.styles=[$.RF,w.e,o.AH`a{color:var(--primary-color)}.card-header{align-items:center;gap:var(--ha-space-3);display:flex}.card-content{padding-left:0;padding-right:0}.card-content p{color:var(--secondary-text-color);padding-inline:var(--ha-space-4);margin:0}.try-tts{padding-inline:var(--ha-space-4);margin-top:var(--ha-space-3)}.try-heading{font-weight:var(--ha-font-weight-medium);margin-bottom:var(--ha-space-2);display:block}.try-tts ha-textarea,.try-tts ha-select{width:100%;margin-bottom:var(--ha-space-2);display:block}.try-actions{justify-content:flex-end;gap:var(--ha-space-2);flex-wrap:wrap;display:flex}ha-md-list{--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-4);background:0 0}ha-md-list-item{--md-item-overflow:visible}ha-language-picker,ha-select{min-width:210px}@media (width<=450px){ha-language-picker,ha-select{width:160px;min-width:160px}}.card-actions{justify-content:space-between;display:flex}ha-tip{max-width:600px;margin:0 auto}`],(0,s.Cg)([(0,n.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,s.Cg)([(0,n.MZ)({attribute:!1})],z.prototype,"cloudStatus",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],z.prototype,"narrow",void 0),(0,s.Cg)([(0,n.wk)()],z.prototype,"savingPreferences",void 0),(0,s.Cg)([(0,n.wk)()],z.prototype,"ttsInfo",void 0),(0,s.Cg)([(0,n.wk)()],z.prototype,"_loadingExample",void 0),(0,s.Cg)([(0,n.P)("#message")],z.prototype,"_messageInput",void 0),(0,s.Cg)([(0,r.I)({key:"cloudTtsTryMessage",state:!1,subscribe:!1})],z.prototype,"_message",void 0),(0,s.Cg)([(0,r.I)({key:"cloudTtsTryTarget",state:!1,subscribe:!1})],z.prototype,"_target",void 0),z=(0,s.Cg)([(0,n.EM)("cloud-tts-pref")],z),a.d(t,{CloudTTSPref:()=>z},{getCloudTtsSupportedVoices:E}),i()}catch(e){i(e)}})}}; 2//# sourceMappingURL=92227.5616f03b498ba261.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.