UNPKG

iobroker.lovelace

Version:

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

13 lines 105 kB
export const __rspack_esm_id=33453;export const __rspack_esm_ids=[33453];export const __webpack_modules__={36356(e,t,i){i.d(t,{q:()=>n});class n{get enabled(){return this._enabled}set enabled(e){e!==this._enabled&&(this._enabled=e,this._enabled?this._attach():this._detach(),this._host.requestUpdate())}hostUpdated(){this.enabled&&!this._scrollContainer&&this._attach()}hostDisconnected(){this._detach()}_attach(){this._scrollContainer=this._host.renderRoot?.querySelector(this._selector),this._scrollContainer&&this._scrollContainer.addEventListener("mousedown",this._mouseDown)}_detach(){window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._scrollContainer&&(this._scrollContainer.removeEventListener("mousedown",this._mouseDown),this._scrollContainer=void 0),this.scrolled=!1,this.scrolling=!1,this.mouseIsDown=!1,this.scrollStartX=0,this.scrollLeft=0}constructor(e,{selector:t,enabled:i}){this.mouseIsDown=!1,this.scrolled=!1,this.scrolling=!1,this.scrollStartX=0,this.scrollLeft=0,this._enabled=!0,this._mouseDown=e=>{const t=this._scrollContainer;t&&(this.scrollStartX=e.pageX-t.offsetLeft,this.scrollLeft=t.scrollLeft,this.mouseIsDown=!0,this.scrolled=!1,window.addEventListener("mousemove",this._mouseMove),window.addEventListener("mouseup",this._mouseUp,{once:!0}))},this._mouseUp=()=>{this.mouseIsDown=!1,this.scrolling=!1,this._host.requestUpdate(),window.removeEventListener("mousemove",this._mouseMove)},this._mouseMove=e=>{if(!this.mouseIsDown)return;const t=this._scrollContainer;if(!t)return;const i=e.pageX-t.offsetLeft-this.scrollStartX;this.scrolled||(this.scrolled=Math.abs(i)>1,this.scrolling=this.scrolled,this._host.requestUpdate()),t.scrollLeft=this.scrollLeft-i},this._selector=t,this._host=e,this.enabled=i??!0,e.addController(this)}}},17451(e,t,i){i.d(t,{j:()=>n});const n=(e,t,i)=>(void 0!==i&&(i=!!i),e.hasAttribute(t)?!!i||(e.removeAttribute(t),!1):!1!==i&&(e.setAttribute(t,""),!0))},76774(e,t,i){i.d(t,{q:()=>n});const n=(e,t)=>{const i=e.area_id;return i?t[i]:void 0}},89020(e,t,i){i.d(t,{P:()=>m,x:()=>_});i(18111),i(22489);var n=i(5124),o=i(77423),a=i(95350),s=i(95093),r=i(77763),l=i(65063),c=i(90676),d=i(44919),h=i(36918),g=i(36312),p=i(91926);const _=["zha","zwave_js","matter"],m=async(e,t,i,_)=>{if(_?.domain){const e=await t.loadBackendTranslation("title",_.domain);_.domain=(0,a.p$)(e,_.domain)}if(_?.brand){const e=await(0,s.O)(t);_.brand=e.core.integration[_.brand]?.name||_.brand}if("zwave_js"===i){const a=_?.config_entry?void 0:(await(0,o.VN)(t,{domain:i})).filter(e=>!e.disabled_by);if(!(0,g.x)(t.config,"zwave_js")||!_?.config_entry&&!a?.length)return void(0,l.dk)(e,{title:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Z-Wave"}),text:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Z-Wave",brand:_?.brand||_?.domain||"Z-Wave",supported_hardware_link:n.qy`<a href="${(0,h.o)(t,"/docs/z-wave/controllers")}" target="_blank" rel="noreferrer">${t.localize("ui.panel.config.integrations.config_flow.supported_hardware")}</a>`}),confirmText:t.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,r.W)(e,{startFlowHandler:"zwave_js"})}});(0,d.X)(e,{entry_id:_?.config_entry||a[0].entry_id})}else if("zha"===i){const a=_?.config_entry?void 0:(await(0,o.VN)(t,{domain:i})).filter(e=>!e.disabled_by);if(!(0,g.x)(t.config,"zha")||!_?.config_entry&&!a?.length)return void(0,l.dk)(e,{title:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Zigbee"}),text:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Zigbee",brand:_?.brand||_?.domain||"Zigbee",supported_hardware_link:n.qy`<a href="${(0,h.o)(t,"/integrations/zha/#known-working-zigbee-radio-modules")}" target="_blank" rel="noreferrer">${t.localize("ui.panel.config.integrations.config_flow.supported_hardware")}</a>`}),confirmText:t.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,r.W)(e,{startFlowHandler:"zha"})}});(0,p.oo)("/config/zha/add")}else if("matter"===i){const a=_?.config_entry?void 0:(await(0,o.VN)(t,{domain:i})).filter(e=>!e.disabled_by);if(!(0,g.x)(t.config,i)||!_?.config_entry&&!a?.length)return void(0,l.dk)(e,{title:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Matter"}),text:t.localize("ui.panel.config.integrations.config_flow.missing_matter",{integration:"Matter",brand:_?.brand||_?.domain||"Matter",supported_hardware_link:n.qy`<a href="${(0,h.o)(t,"/integrations/matter")}" target="_blank" rel="noreferrer">${t.localize("ui.panel.config.integrations.config_flow.supported_hardware")}</a>`}),confirmText:t.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,r.W)(e,{startFlowHandler:"matter"})}});(0,c.g)(e)}}},52943(e,t,i){i.d(t,{Z:()=>n});const n=e=>e.charAt(0).toUpperCase()+e.slice(1)},76776(e,t,i){var n=i(62826),o=i(5124),a=i(22441);class s extends o.WF{render(){return o.qy` ${this.header?o.qy`<h1 class="card-header">${this.header}</h1>`:o.s6} <slot></slot> `}constructor(...e){super(...e),this.raised=!1}}s.styles=o.AH`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
    :host
      ::slotted(
        .card-content:not(:nth-child(1 of .card-content, .card-header))
      ),
    slot:not(:first-child)::slotted(.card-content) {
      padding-top: 0;
      margin-top: calc(var(--ha-space-2) * -1);
    }
    :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`,(0,n.Cg)([(0,a.MZ)()],s.prototype,"header",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],s.prototype,"raised",void 0),s=(0,n.Cg)([(0,a.EM)("ha-card")],s)},17308(e,t,i){var n=i(62826),o=i(49838),a=i(11245),s=i(5124),r=i(22441);class l extends o.B{}l.styles=[a.R,s.AH`:host{--md-sys-color-surface:var(--card-background-color)}`],l=(0,n.Cg)([(0,r.EM)("ha-md-list")],l)},65829(e,t,i){i.a(e,async function(e,n){try{i.r(t),i.d(t,{HaSpinner:()=>c});var o=i(62826),a=i(55262),s=i(5124),r=i(22441),l=e([a]);a=(l.then?(await l)():l)[0];class c extends a.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[a.A.styles,s.AH`:host{--indicator-color:var(
            --ha-spinner-indicator-color,
            var(--primary-color)
          );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`]}}(0,o.Cg)([(0,r.MZ)()],c.prototype,"size",void 0),c=(0,o.Cg)([(0,r.EM)("ha-spinner")],c),n()}catch(e){n(e)}})},76944(e,t,i){i.d(t,{MV:()=>s,VR:()=>a,d8:()=>n,jJ:()=>r,l3:()=>o});const n=async e=>e.callWS({type:"application_credentials/config"}),o=async(e,t)=>e.callWS({type:"application_credentials/config_entry",config_entry_id:t}),a=async e=>e.callWS({type:"application_credentials/list"}),s=async(e,t,i,n,o)=>e.callWS({type:"application_credentials/create",domain:t,client_id:i,client_secret:n,name:o}),r=async(e,t)=>e.callWS({type:"application_credentials/delete",application_credentials_id:t})},26571(e,t,i){i.d(t,{Al:()=>a,KY:()=>o,PN:()=>l,dG:()=>d,jm:()=>c,m7:()=>m,sR:()=>h,t1:()=>r,t2:()=>p,x:()=>_,yu:()=>g});var n=i(95350);const o=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],a=["reauth"],s={"HA-Frontend-Base":`${location.protocol}//${location.host}`},r=(e,t,i)=>e.callApi("POST","config/config_entries/flow",{handler:t,entry_id:i},s),l=(e,t)=>e.callApi("GET",`config/config_entries/flow/${t}`,void 0,s),c=(e,t,i)=>e.callApi("POST",`config/config_entries/flow/${t}`,i,s),d=(e,t,i)=>e.callWS({type:"config_entries/ignore_flow",flow_id:t,title:i}),h=(e,t)=>e.callApi("DELETE",`config/config_entries/flow/${t}`),g=(e,t)=>e.callApi("GET","config/config_entries/flow_handlers"+(t?`?type=${t}`:"")),p=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),_=(e,t)=>e.connection.subscribeMessage(e=>t(e),{type:"config_entries/flow/subscribe"}),m=(e,t)=>t.context.title_placeholders&&0!==Object.keys(t.context.title_placeholders).length?e(`component.${t.handler}.config.flow_title`,t.context.title_placeholders)||("name"in t.context.title_placeholders?t.context.title_placeholders.name:(0,n.p$)(e,t.handler)):(0,n.p$)(e,t.handler)},96204(e,t,i){i.d(t,{Dh:()=>n,It:()=>s,WV:()=>a,g9:()=>o});const n=e=>e.callWS({type:"diagnostics/list"}),o=(e,t)=>e.callWS({type:"diagnostics/get",domain:t}),a=e=>`/api/diagnostics/config_entry/${e}`,s=(e,t)=>`/api/diagnostics/config_entry/${e}/device/${t}`},6810(e,t,i){i.d(t,{c:()=>a});const n=async(e,t,i,o,a,...s)=>{const r=a,l=r[e],c=l=>o&&o(a,l.result)!==l.cacheKey?(r[e]=void 0,n(e,t,i,o,a,...s)):l.result;if(l)return l instanceof Promise?l.then(c):c(l);const d=i(a,...s);return r[e]=d,d.then(i=>{r[e]={result:i,cacheKey:o?.(a,i)},setTimeout(()=>{r[e]=void 0},t)},()=>{r[e]=void 0}),d},o=e=>e.callWS({type:"entity/source"}),a=e=>n("_entitySources",3e4,o,e=>Object.keys(e.states).length,e)},70555(e,t,i){i.d(t,{L:()=>a,_:()=>s});var n=i(36312),o=i(62384);const a=e=>e.callApi("GET","error_log"),s=e=>(0,n.x)(e.config,"hassio")&&(0,o.v)(e.config.version,2025,10)?"/api/hassio/core/logs/latest":"/api/error_log"},16869(e,t,i){i.d(t,{B:()=>o,g:()=>n});i(74423);const n=window.externalAppV2||window.externalApp||window.webkit?.messageHandlers?.getExternalAuth||location.search.includes("external_auth=1"),o=window.externalApp||window.externalAppV2},81137(e,t,i){i.d(t,{M:()=>o});const n="M20,2H4V4L9.81,8.36C6.14,9.57 4.14,13.53 5.35,17.2C6.56,20.87 10.5,22.87 14.19,21.66C17.86,20.45 19.86,16.5 18.65,12.82C17.95,10.71 16.3,9.05 14.19,8.36L20,4V2M14.94,19.5L12,17.78L9.06,19.5L9.84,16.17L7.25,13.93L10.66,13.64L12,10.5L13.34,13.64L16.75,13.93L14.16,16.17L14.94,19.5Z",o={bronze:{icon:n,translationKey:"ui.panel.config.integrations.config_entry.bronze_quality"},silver:{icon:n,translationKey:"ui.panel.config.integrations.config_entry.silver_quality"},gold:{icon:n,translationKey:"ui.panel.config.integrations.config_entry.gold_quality"},platinum:{icon:"M18 2C17.1 2 16 3 16 4H8C8 3 6.9 2 6 2H2V11C2 12 3 13 4 13H6.2C6.6 15 7.9 16.7 11 17V19.08C8 19.54 8 22 8 22H16C16 22 16 19.54 13 19.08V17C16.1 16.7 17.4 15 17.8 13H20C21 13 22 12 22 11V2H18M6 11H4V4H6V11M20 11H18V4H20V11Z",translationKey:"ui.panel.config.integrations.config_entry.platinum_quality"},legacy:{icon:"M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",translationKey:"ui.panel.config.integrations.config_entry.legacy_integration"}}},95093(e,t,i){i.d(t,{O:()=>n,s:()=>o});const n=e=>e.callWS({type:"integration/descriptions"}),o=(e,t)=>{if(e){if(t in e){const i=e[t];if("integration_type"in i)return i}for(const i of Object.values(e))if("integrations"in i&&i.integrations&&t in i.integrations)return i.integrations[t]}}},7749(e,t,i){i.d(t,{HH:()=>n,TY:()=>o,lu:()=>a,mu:()=>s});const n=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t}),o=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),a=(e,t,i)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,i),s=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},28669(e,t,i){i.d(t,{TK:()=>r,_2:()=>c,eR:()=>o,hG:()=>l,hU:()=>a,kg:()=>s,wj:()=>n,xg:()=>d});i(44114),i(18111),i(61701);const n="system-admin",o="system-users",a=async e=>e.callWS({type:"config/auth/list"}),s=async(e,t,i,n)=>e.callWS({type:"config/auth/create",name:t,group_ids:i,local_only:n}),r=async(e,t,i)=>e.callWS({...i,type:"config/auth/update",user_id:t}),l=async(e,t)=>e.callWS({type:"config/auth/delete",user_id:t}),c=e=>e?e.trim().split(" ").slice(0,3).map(e=>e.substring(0,1)).join(""):"?",d=(e,t,i)=>{const n=[],o=t=>e.localize(`ui.panel.config.users.${t}`);return t.is_owner&&n.push(["M12 2C6.47 2 2 6.5 2 12C2 17.5 6.5 22 12 22S22 17.5 22 12 17.5 2 12 2M12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4S20 7.58 20 12C20 16.42 16.42 20 12 20M8 14L7 8L10 10L12 7L14 10L17 8L16 14H8M8.56 16C8.22 16 8 15.78 8 15.44V15H16V15.44C16 15.78 15.78 16 15.44 16H8.56Z",o("is_owner")]),i&&t.system_generated&&n.push(["M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z",o("is_system")]),t.local_only&&n.push(["M12 20C7.6 20 4 16.4 4 12S7.6 4 12 4 20 7.6 20 12 16.4 20 12 20M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M11 14H13V17H16V12H18L12 7L6 12H8V17H11V14",o("is_local")]),t.is_active||n.push(["M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z",o("is_not_active")]),n}},15603(e,t,i){i.d(t,{n:()=>a});var n=i(1087);const o=()=>i.e(24922).then(i.bind(i,51937)),a=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-config-entry-system-options",dialogImport:o,dialogParams:t})}},77763(e,t,i){i.d(t,{W:()=>r});var n=i(5124),o=i(26571),a=i(95350),s=i(29094);const r=(e,t)=>(0,s.g)(e,t,{flowType:"config_flow",showDevices:!0,createFlow:async(e,i)=>{const[n]=await Promise.all([(0,o.t1)(e,i,t.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",i),e.loadBackendTranslation("selector",i),e.loadBackendTranslation("title",i)]);return n},fetchFlow:async(e,t)=>{const[i]=await Promise.all([(0,o.PN)(e,t),e.loadFragmentTranslation("config")]);return await Promise.all([e.loadBackendTranslation("config",i.handler),e.loadBackendTranslation("selector",i.handler),e.loadBackendTranslation("title",i.handler)]),i},handleFlowStep:o.jm,deleteFlow:o.sR,renderAbortDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.abort.${t.reason}`,t.description_placeholders);return i?n.qy` <ha-markdown allow-svg breaks .content="${i}"></ha-markdown> `:t.reason},renderShowFormStepHeader:(e,t)=>e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.title`,t.description_placeholders)||e.localize(`component.${t.handler}.title`),renderShowFormStepDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?n.qy` <ha-markdown .allowDataUrl="${"zwave_js"===t.handler}" allow-svg breaks .content="${i}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,t,i,n){if("expandable"===i.type)return e.localize(`component.${t.handler}.config.step.${t.step_id}.sections.${i.name}.name`,t.description_placeholders)||i.name;const o=n?.path?.[0]?`sections.${n.path[0]}.`:"";return e.localize(`component.${t.handler}.config.step.${t.step_id}.${o}data.${i.name}`,t.description_placeholders)||i.name},renderShowFormStepFieldHelper(e,t,i,o){if("expandable"===i.type)return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.sections.${i.name}.description`,t.description_placeholders);const a=o?.path?.[0]?`sections.${o.path[0]}.`:"",s=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.${a}data_description.${i.name}`,t.description_placeholders);return s?n.qy`<ha-markdown breaks .content="${s}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,t,i)=>e.localize(`component.${t.translation_domain||t.translation_domain||t.handler}.config.error.${i}`,t.description_placeholders)||i,renderShowFormStepFieldLocalizeValue:(e,t,i)=>e.localize(`component.${t.handler}.selector.${i}`),renderShowFormStepSubmitButton:(e,t)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===t.last_step?"next":"submit")),renderExternalStepHeader:(e,t)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site"),renderExternalStepDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.${t.step_id}.description`,t.description_placeholders);return n.qy` <p> ${e.localize("ui.panel.config.integrations.config_flow.external_step.description")} </p> ${i?n.qy` <ha-markdown allow-svg breaks .content="${i}"></ha-markdown> `:""} `},renderCreateEntryDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.create_entry.${t.description||"default"}`,t.description_placeholders);return n.qy` ${i?n.qy` <ha-markdown allow-svg breaks .content="${i}"></ha-markdown> `:n.s6} `},renderShowFormProgressHeader:(e,t)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`),renderShowFormProgressDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.progress.${t.progress_action}`,t.description_placeholders);return i?n.qy` <ha-markdown allow-svg breaks .content="${i}"></ha-markdown> `:""},renderMenuHeader:(e,t)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`),renderMenuDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?n.qy` <ha-markdown allow-svg breaks .content="${i}"></ha-markdown> `:""},renderMenuOption:(e,t,i)=>e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_options.${i}`,t.description_placeholders),renderMenuOptionDescription:(e,t,i)=>e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_option_descriptions.${i}`,t.description_placeholders),renderLoadingDescription(e,t,i,n){if("loading_flow"!==t&&"loading_step"!==t)return"";const o=n?.handler||i;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:o?(0,a.p$)(e.localize,o):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},29094(e,t,i){i.d(t,{g:()=>a});var n=i(1087);const o=()=>Promise.all([i.e(4801),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(80131),i.e(58416),i.e(54066),i.e(84038),i.e(69205),i.e(26092),i.e(48531),i.e(92411),i.e(44642)]).then(i.bind(i,78314)),a=(e,t,i)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:o,dialogParams:{...t,flowConfig:i,dialogParentElement:e}})}},70241(e,t,i){i.d(t,{Q:()=>r});var n=i(5124),o=i(95350),a=i(7749),s=i(29094);const r=(e,t,i)=>(0,s.g)(e,{startFlowHandler:t.entry_id,domain:t.domain,...i},{flowType:"options_flow",showDevices:!1,createFlow:async(e,i)=>{const[n]=await Promise.all([(0,a.HH)(e,i),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return n},fetchFlow:async(e,i)=>{const[n]=await Promise.all([(0,a.TY)(e,i),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return n},handleFlowStep:a.lu,deleteFlow:a.mu,renderAbortDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.abort.${i.reason}`,i.description_placeholders);return o?n.qy` <ha-markdown breaks allow-svg .content="${o}"></ha-markdown> `:i.reason},renderShowFormStepHeader:(e,i)=>e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.title`,i.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header"),renderShowFormStepDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return o?n.qy` <ha-markdown allow-svg breaks .content="${o}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,i,n,o){if("expandable"===n.type)return e.localize(`component.${t.domain}.options.step.${i.step_id}.sections.${n.name}.name`,i.description_placeholders)||n.name;const a=o?.path?.[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${i.step_id}.${a}data.${n.name}`,i.description_placeholders)||n.name},renderShowFormStepFieldHelper(e,i,o,a){if("expandable"===o.type)return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.sections.${o.name}.description`,i.description_placeholders);const s=a?.path?.[0]?`sections.${a.path[0]}.`:"",r=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.${s}data_description.${o.name}`,i.description_placeholders);return r?n.qy`<ha-markdown breaks .content="${r}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,i,n)=>e.localize(`component.${i.translation_domain||t.domain}.options.error.${n}`,i.description_placeholders)||n,renderShowFormStepFieldLocalizeValue:(e,i,n)=>e.localize(`component.${t.domain}.selector.${n}`),renderShowFormStepSubmitButton:(e,i)=>e.localize(`component.${t.domain}.options.step.${i.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===i.last_step?"next":"submit")),renderExternalStepHeader:(e,t)=>"",renderExternalStepDescription:(e,t)=>"",renderCreateEntryDescription:(e,t)=>n.qy` <p>${e.localize("ui.dialogs.options_flow.success.description")}</p> `,renderShowFormProgressHeader:(e,i)=>e.localize(`component.${t.domain}.options.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderShowFormProgressDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.progress.${i.progress_action}`,i.description_placeholders);return o?n.qy` <ha-markdown allow-svg breaks .content="${o}"></ha-markdown> `:""},renderMenuHeader:(e,i)=>e.localize(`component.${t.domain}.options.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderMenuDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return o?n.qy` <ha-markdown allow-svg breaks .content="${o}"></ha-markdown> `:""},renderMenuOption:(e,i,n)=>e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.menu_options.${n}`,i.description_placeholders),renderMenuOptionDescription:(e,i,n)=>e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.menu_option_descriptions.${n}`,i.description_placeholders),renderLoadingDescription:(e,i)=>e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===i||"loading_step"===i?e.localize(`ui.dialogs.options_flow.loading.${i}`,{integration:(0,o.p$)(e.localize,t.domain)}):"")})},26401(e,t,i){i.d(t,{a:()=>d});var n=i(5124),o=i(95350);const a={"HA-Frontend-Base":`${location.protocol}//${location.host}`},s=(e,t,i,n)=>e.callApi("POST","config/config_entries/subentries/flow",{handler:[t,i],subentry_id:n},a),r=(e,t,i)=>e.callApi("POST",`config/config_entries/subentries/flow/${t}`,i,a),l=(e,t)=>e.callApi("DELETE",`config/config_entries/subentries/flow/${t}`);var c=i(29094);const d=(e,t,i,d)=>(0,c.g)(e,d,{flowType:"config_subentries_flow",showDevices:!0,createFlow:async(e,n)=>{const[o]=await Promise.all([s(e,n,i,d.subEntryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config_subentries",t.domain),e.loadBackendTranslation("selector",t.domain),e.loadBackendTranslation("title",t.domain)]);return o},fetchFlow:async(e,n)=>{const o=await((e,t)=>e.callApi("GET",`config/config_entries/subentries/flow/${t}`,void 0,a))(e,n);return i=o.handler[1],await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config_subentries",t.domain),await e.loadBackendTranslation("selector",t.domain),o},handleFlowStep:r,deleteFlow:l,renderAbortDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.abort.${o.reason}`,o.description_placeholders);return a?n.qy` <ha-markdown allowsvg breaks .content="${a}"></ha-markdown> `:o.reason},renderShowFormStepHeader:(e,n)=>e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${i}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${t.domain}.title`),renderShowFormStepDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return a?n.qy` <ha-markdown allowsvg breaks .content="${a}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,n,o,a){if("expandable"===o.type)return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.sections.${o.name}.name`,n.description_placeholders)||o.name;const s=a?.path?.[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.${s}data.${o.name}`,n.description_placeholders)||o.name},renderShowFormStepFieldHelper(e,o,a,s){if("expandable"===a.type)return e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.sections.${a.name}.description`,o.description_placeholders);const r=s?.path?.[0]?`sections.${s.path[0]}.`:"",l=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.${r}data_description.${a.name}`,o.description_placeholders);return l?n.qy`<ha-markdown breaks .content="${l}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,n,o)=>e.localize(`component.${n.translation_domain||n.translation_domain||t.domain}.config_subentries.${i}.error.${o}`,n.description_placeholders)||o,renderShowFormStepFieldLocalizeValue:(e,i,n)=>e.localize(`component.${t.domain}.selector.${n}`),renderShowFormStepSubmitButton:(e,n)=>e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===n.last_step?"next":"submit")),renderExternalStepHeader:(e,n)=>e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site"),renderExternalStepDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return n.qy` <p> ${e.localize("ui.panel.config.integrations.config_flow.external_step.description")} </p> ${a?n.qy` <ha-markdown allowsvg breaks .content="${a}"></ha-markdown> `:""} `},renderCreateEntryDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.create_entry.${o.description||"default"}`,o.description_placeholders);return n.qy` ${a?n.qy` <ha-markdown allowsvg breaks .content="${a}"></ha-markdown> `:n.s6} `},renderShowFormProgressHeader:(e,n)=>e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderShowFormProgressDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.progress.${o.progress_action}`,o.description_placeholders);return a?n.qy` <ha-markdown allowsvg breaks .content="${a}"></ha-markdown> `:""},renderMenuHeader:(e,n)=>e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${t.domain}.title`),renderMenuDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return a?n.qy` <ha-markdown allowsvg breaks .content="${a}"></ha-markdown> `:""},renderMenuOption:(e,n,o)=>e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${i}.step.${n.step_id}.menu_options.${o}`,n.description_placeholders),renderMenuOptionDescription:(e,n,o)=>e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${i}.step.${n.step_id}.menu_option_descriptions.${o}`,n.description_placeholders),renderLoadingDescription(e,t,i,n){if("loading_flow"!==t&&"loading_step"!==t)return"";const a=n?.handler||i;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:a?(0,o.p$)(e.localize,a):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},54706(e,t,i){i.d(t,{E:()=>a});i(74423),i(18111),i(13579);var n=i(62826),o=i(22441);const a=e=>{class t extends e{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){if(super.updated(e),e.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const t of e.keys())if(this.hassSubscribeRequiredHostProps.includes(t))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&!this.hassSubscribeRequiredHostProps?.some(e=>void 0===this[e])&&(this.__unsubs=this.hassSubscribe())}}return(0,n.Cg)([(0,o.MZ)({attribute:!1})],t.prototype,"hass",void 0),t}},8872(e,t,i){i.d(t,{F:()=>o,_:()=>a});var n=i(1087);const o=()=>Promise.all([i.e(92769),i.e(3283),i.e(33192),i.e(26092),i.e(66201),i.e(90108)]).then(i.bind(i,22756)),a=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-device-registry-detail",dialogImport:o,dialogParams:t})}},8313(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(22489),i(13579);var n=i(62826),o=i(5124),a=i(22441),s=i(6412),r=i(57237),l=i(37981),c=i(76774),d=i(91926),h=i(29823),g=(i(70947),i(77423)),p=i(58594),_=i(14503),m=i(33963),u=i(8872),f=i(9567),y=e([h,f,m]);[h,f,m]=y.then?(await y)():y;const b="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",v="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",w="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",$="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",C="M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z",H="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4M9,9V15H15V9",x="M18,11H14.82C14.4,9.84 13.3,9 12,9C10.7,9 9.6,9.84 9.18,11H6C5.67,11 4,10.9 4,9V8C4,6.17 5.54,6 6,6H16.18C16.6,7.16 17.7,8 19,8A3,3 0 0,0 22,5A3,3 0 0,0 19,2C17.7,2 16.6,2.84 16.18,4H6C4.39,4 2,5.06 2,8V9C2,11.94 4.39,13 6,13H9.18C9.6,14.16 10.7,15 12,15C13.3,15 14.4,14.16 14.82,13H18C18.33,13 20,13.1 20,15V16C20,17.83 18.46,18 18,18H7.82C7.4,16.84 6.3,16 5,16A3,3 0 0,0 2,19A3,3 0 0,0 5,22C6.3,22 7.4,21.16 7.82,20H18C19.61,20 22,18.93 22,16V15C22,12.07 19.61,11 18,11M19,4A1,1 0 0,1 20,5A1,1 0 0,1 19,6A1,1 0 0,1 18,5A1,1 0 0,1 19,4M5,20A1,1 0 0,1 4,19A1,1 0 0,1 5,18A1,1 0 0,1 6,19A1,1 0 0,1 5,20Z";class z extends o.WF{render(){const e=this.device,t=this._getEntities(),i=(0,c.q)(e,this.hass.areas),n=[e.model||e.sw_version||e.manufacturer,i?i.name:void 0].filter(Boolean);return o.qy`<ha-md-list-item type="button" @click="${this._handleNavigateToDevice}" class="${(0,s.H)({disabled:Boolean(e.disabled_by)})}"> <ha-svg-icon .path="${"service"===e.entry_type?x:v}" slot="start"></ha-svg-icon> <div slot="headline"> ${(0,l.T)(e,this.hass.localize,this.hass.states)} </div> <span slot="supporting-text">${n.join(" • ")} ${n.length&&t.length?" • ":o.s6} ${t.length?this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:t.length}):o.s6}</span> ${this.narrow?o.s6:o.qy`<ha-icon-next slot="end"> </ha-icon-next>`} <div class="vertical-divider" slot="end" @click="${r.d}"></div> ${this.narrow?o.s6:o.qy`<ha-icon-button slot="end" @click="${this._handleEditDeviceButton}" .path="${$}" .label="${this.hass.localize("ui.panel.config.integrations.config_entry.device.edit")}"></ha-icon-button>`} <ha-dropdown slot="end" @click="${r.d}" @wa-select="${this._handleMenuAction}"> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${w}"></ha-icon-button> ${this.narrow?o.qy`<ha-dropdown-item value="edit"> <ha-svg-icon .path="${$}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.device.edit")} </ha-dropdown-item>`:o.s6} ${t.length?o.qy` <ha-dropdown-item value="entities"> <ha-svg-icon .path="${C}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:t.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> `:o.s6} <ha-dropdown-item .variant="${"user"!==e.disabled_by?"danger":"default"}" value="disable" .disabled="${"user"!==e.disabled_by&&!!e.disabled_by}"> <ha-svg-icon .path="${H}" slot="icon"></ha-svg-icon> ${e.disabled_by&&"user"!==e.disabled_by?this.hass.localize("ui.dialogs.device-registry-detail.enabled_cause",{type:this.hass.localize(`ui.dialogs.device-registry-detail.type.${e.entry_type||"device"}`),cause:this.hass.localize(`config_entry.disabled_by.${e.disabled_by}`)}):e.disabled_by?this.hass.localize("ui.panel.config.integrations.config_entry.device.enable"):this.hass.localize("ui.panel.config.integrations.config_entry.device.disable")} </ha-dropdown-item> ${this.entry.supports_remove_device?o.qy`<ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon .path="${b}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.device.delete")} </ha-dropdown-item>`:o.s6} </ha-dropdown> </ha-md-list-item> `}_handleEditDeviceButton(e){e.stopPropagation(),this._handleEditDevice()}_handleNavigateToDevice(){(0,d.oo)(`/config/devices/device/${this.device.id}`)}constructor(...e){super(...e),this.narrow=!1,this._getEntities=()=>this.entities?.filter(e=>e.device_id===this.device.id),this._handleMenuAction=e=>{e.stopPropagation();switch(e.detail.item.value){case"edit":return void this._handleEditDevice();case"entities":return void this._handleNavigateToEntities();case"disable":return void this._doDisableDevice();case"delete":this._handleDeleteDevice()}},this._handleEditDevice=()=>{(0,u._)(this,{device:this.device,updateEntry:async e=>{await(0,p.FB)(this.hass,this.device.id,e)}})},this._handleNavigateToEntities=()=>{(0,d.oo)(`/config/entities/?historyBack=1&device=${this.device.id}`)},this._doDisableDevice=async()=>{const e=null===this.device.disabled_by;if(e&&!Object.values(this.hass.devices).some(e=>e.id!==this.device.id&&e.config_entries.includes(this.entry.entry_id))){const e=this.entry;if(e&&!e.disabled_by){if(!await(0,m.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.devices.confirm_disable_config_entry_title"),text:this.hass.localize("ui.panel.config.devices.confirm_disable_config_entry_message",{name:e.title}),destructive:!0,confirmText:this.hass.localize("ui.common.yes"),dismissText:this.hass.localize("ui.common.no")}))return;let t;try{t=await(0,g.XQ)(this.hass,this.entry.entry_id)}catch(e){return void(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:e.message})}return void(t.require_restart&&(0,m.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")}))}}if(e){if(!await(0,m.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.device.confirm_disable_title"),text:this.hass.localize("ui.panel.config.integrations.config_entry.device.confirm_disable_message",{name:(0,l.T)(this.device,this.hass.localize,this.hass.states)}),destructive:!0,confirmText:this.hass.localize("ui.common.yes"),dismissText:this.hass.localize("ui.common.no")}))return}await(0,p.FB)(this.hass,this.device.id,{disabled_by:e?"user":null})},this._handleDeleteDevice=async()=>{const e=this.entry;if(await(0,m.showConfirmationDialog)(this,{text:this.hass.localize("ui.panel.config.devices.confirm_delete"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0}))try{await(0,p.nO)(this.hass,this.device.id,e.entry_id)}catch(e){(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.devices.error_delete"),text:e.message})}}}}z.styles=[_.RF,o.AH`:host{border-top:1px solid var(--divider-color)}ha-md-list-item{--md-list-item-leading-space:56px;--md-ripple-hover-color:transparent;--md-ripple-pressed-color:transparent}.disabled{opacity:.5}:host([narrow]) ha-md-list-item{--md-list-item-leading-space:16px}.vertical-divider{height:100%;width:1px;background:var(--divider-color)}a{text-decoration:none}`],(0,n.Cg)([(0,a.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],z.prototype,"narrow",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],z.prototype,"entry",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],z.prototype,"device",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],z.prototype,"entities",void 0),z=(0,n.Cg)([(0,a.EM)("ha-config-entry-device-row")],z),t()}catch(e){t(e)}})},65536(e,t,i){i.a(e,async function(e,t){try{i(74423),i(44114),i(18111),i(22489),i(20116),i(30531),i(61701);var n=i(62826),o=i(5124),a=i(22441),s=i(6412),r=i(22786),l=i(63130),c=i(29823),d=(i(70947),i(76944)),h=i(82e3),g=i(77423),p=i(96204),_=i(95350),m=i(15603),u=i(77763),f=i(70241),y=i(26401),b=i(14503),v=i(36918),w=i(30039),$=i(81619),C=i(33963),H=i(8313),x=i(87599),z=i(9567),L=e([c,H,z,x,C]);[c,H,z,x,C]=L.then?(await L)():L;const M="M13,13H11V7H13M13,17H11V15H13M12,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",A="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",V="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z",k="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",E="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",S="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",q="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",D="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",T="M22 15V16L14 18.5L7 16.6V18H1V7H9L15.2 9.3C16.2 9.7 17 10.8 17 12H19C20.7 12 22 13.3 22 15M5 16V9H3V16H5M19.9 14.6C19.7 14.2 19.4 14 19 14H13.6C13.1 14 12.5 13.9 12 13.8L9.7 13L10.3 11.1L12.7 11.9C13 11.9 15 12 15 12C15 11.6 14.8 11.3 14.4 11.2L8.6 9H7V14.5L14 16.4L19.9 14.6Z",F="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="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",P="M13 2V4C17.39 4.54 20.5 8.53 19.96 12.92C19.5 16.56 16.64 19.43 13 19.88V21.88C18.5 21.28 22.45 16.34 21.85 10.85C21.33 6.19 17.66 2.5 13 2M11 2C9.04 2.18 7.19 2.95 5.67 4.2L7.1 5.74C8.22 4.84 9.57 4.26 11 4.06V2M4.26 5.67C3 7.19 2.24 9.04 2.05 11H4.05C4.24 9.58 4.8 8.23 5.69 7.1L4.26 5.67M2.06 13C2.26 14.96 3.03 16.81 4.27 18.33L5.69 16.9C4.81 15.77 4.24 14.42 4.06 13H2.06M7.06 18.37L5.67 19.74C7.18 21 9.04 21.79 11 22V20C9.58 19.82 8.23 19.25 7.1 18.37H7.06Z",B="M2 12C2 16.97 6.03 21 11 21C13.39 21 15.68 20.06 17.4 18.4L15.9 16.9C14.63 18.25 12.86 19 11 19C4.76 19 1.64 11.46 6.05 7.05C10.46 2.64 18 5.77 18 12H15L19 16H19.1L23 12H20C20 7.03 15.97 3 11 3C6.03 3 2 7.03 2 12Z",I="M2 12C2 17 6 21 11 21C13.4 21 15.7 20.1 17.4 18.4L15.9 16.9C14.6 18.3 12.9 19 11 19C4.8 19 1.6 11.5 6.1 7.1S18 5.8 18 12H15L19 16H19.1L23 12H20C20 7 16 3 11 3S2 7 2 12M10 15H12V17H10V15M10 7H12V13H10V7",R="M18,17H10.5L12.5,15H18M6,17V14.5L13.88,6.65C14.07,6.45 14.39,6.45 14.59,6.65L16.35,8.41C16.55,8.61 16.55,8.92 16.35,9.12L8.47,17M19,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",O="M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z",W="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4M9,9V15H15V9",U="M5,3C3.89,3 3,3.89 3,5V19C3,20.11 3.89,21 5,21H19C20.11,21 21,20.11 21,19V5C21,3.89 20.11,3 19,3H5M5,5H19V19H5V5M7,7V9H17V7H7M7,11V13H17V11H7M7,15V17H14V15H7Z",j="M22.7,19L13.6,9.9C14.5,7.6 14,4.9 12.1,3C10.1,1 7.1,0.6 4.7,1.7L9,6L6,9L1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1C4.8,14 7.5,14.5 9.8,13.6L18.9,22.7C19.3,23.1 19.9,23.1 20.3,22.7L22.6,20.4C23.1,20 23.1,19.3 22.7,19Z";class N extends o.WF{render(){const e=this.data.entry;let t,i,n=M;e.disabled_by||"not_loaded"!==e.state?"setup_in_progress"===e.state?(n=P,t=["ui.panel.config.integrations.config_entry.setup_in_progress"]):g.m4.includes(e.state)&&("setup_retry"===e.state&&(n=I),t=[`ui.panel.config.integrations.config_entry.state.${e.state}`],i=(0,x.J)(this.hass,e)):t=["ui.panel.config.integrations.config_entry.not_loaded"];const a=this._getEntities(),r=[...this.data.devices,...this.data.services],l=[...this.data.devices,...this.data.subEntries.flatMap(e=>e.devices)],c=[...this.data.services,...this.data.subEntries.flatMap(e=>e.services)],d=[];e.disabled_by?(d.push(this.hass.localize("ui.panel.config.integrations.config_entry.disable.disabled_cause",{cause:this.hass.localize(`ui.panel.config.integrations.config_entry.disable.disabled_by.${e.disabled_by}`)||e.disabled_by})),"failed_unload"===e.state&&d.push(`.\n        ${this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")}.`)):l.length||c.length||!a.length||d.push(o.qy`<a href="${`/config/entities/?historyBack=1&config_entry=${e.entry_id}`}">${this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:a.length})}</a>`);const h=this._configPanel(e.domain,this.hass.panels),m=this.data.subEntries;return o.qy`<ha-md-list> <ha-md-list-item class="${(0,s.H)({config_entry:!0,"state-not-loaded":"not_loaded"===e.state,"state-failed-unload":"failed_unload"===e.state,"state-setup":"setup_in_progress"===e.state,"state-error":g.m4.includes(e.state),"state-disabled":null!==e.disabled_by,"has-subentries":this._expanded&&m.length>0})}"> ${m.length||r.length?o.qy`<ha-icon-button class="expand-button ${(0,s.H)({expanded:this._expanded})}" .path="${A}" slot="start" @click="${this._toggleExpand}"></ha-icon-button>`:o.s6} <div slot="headline"> ${e.title||(0,_.p$)(this.hass.localize,e.domain)} </div> <div slot="supporting-text"> <div>${d}</div> ${t?o.qy` <div class="message"> <ha-svg-icon .path="${n}"></ha-svg-icon> <div> ${this.hass.localize(...t)}${i?o.qy`: ${i}`:o.s6} </div> </div> `:o.s6} </div> ${"user"===e.disabled_by?o.qy`<ha-button slot="end" @click="${this._handleEnable}"> ${this.hass.localize("ui.common.enable")} </ha-button>`:h&&!t?o.qy`<ha-icon-button .path="${V}" .label="${this.hass.localize("ui.panel.config.integrations.config_entry.configure")}" slot="end" class="link" href="${`/${h}?config_entry=${e.entry_id}`}"> </ha-icon-button>`:e.supports_options?o.qy` <ha-icon-button slot="end" @click="${this._showOptions}" .path="${V}" .label="${this.hass.localize("ui.panel.config.integrations.config_entry.configure")}"> </ha-icon-button> `:o.s6} <ha-dropdown slot="end" @wa-select="${this._handleMenuAction}"> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${q}"></ha-icon-button> ${l.length?o.qy` <a href="${1===l.length?`/config/devices/device/${l[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}`}"> <ha-dropdown-item value="devices"> <ha-svg-icon .path="${S}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:l.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} ${c.length?o.qy` <a href="${1===c.length?`/config/devices/device/${c[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}`}"> <ha-dropdown-item value="services"> <ha-svg-icon .path="${T}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:c.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} ${a.length?o.qy` <a href="${`/config/entities?historyBack=1&config_entry=${e.entry_id}`}"> <ha-dropdown-item value="entities"> <ha-svg-icon .path="${O}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:a.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} ${g.m4.includes(e.state)?o.qy` <a href="${`/config/logs?filter=${encodeURIComponent(e.domain)}`}"> <ha-dropdown-item value="logs"> <ha-svg-icon slot="icon" .path="${U}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.logs.caption")} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} ${!e.disabled_by&&g.qf.includes(e.state)&&e.supports_unload&&"system"!==e.source?o.qy` <ha-dropdown-item value="reload"> <ha-svg-icon slot="icon" .path="${B}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.reload")} </ha-dropdown-item> `:o.s6} <ha-dropdown-item value="rename"> <ha-svg-icon slot="icon" .path="${R}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.rename")} </ha-dropdown-item> <ha-dropdown-item value="copy"> <ha-svg-icon slot="icon" .path="${k}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.copy")} </ha-dropdown-item> ${Object.keys(e.supported_subentry_types).map(t=>o.qy`<ha-dropdown-item value="subentry_${t}"> <ha-svg-icon slot="icon" .path="${Z}"></ha-svg-icon> ${this.hass.localize(`component.${e.domain}.config_subentries.${t}.initiate_flow.user`)} </ha-dropdown-item>`)} <wa-divider></wa-divider> ${this.diagnosticHandler&&"loaded"===e.state?o.qy` <a href="${(0,p.WV)(e.entry_id)}" target="_blank" @click="${this._signUrl}"> <ha-dropdown-item value="diagnostics"> <ha-svg-icon slot="icon" .path="${D}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.download_diagnostics")} </ha-dropdown-item> </a> `:o.s6} ${!e.disabled_by&&e.supports_reconfigure&&"system"!==e.source?o.qy` <ha-dropdown-item value="reconfigure"> <ha-svg-icon slot="icon" .path="${j}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.reconfigure")} </ha-dropdown-item> `:o.s6} <ha-dropdown-item value="system_options"> <ha-svg-icon slot="icon" .path="${V}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.system_options")} </ha-dropdown-item> ${"user"===e.disabled_by?o.qy` <ha-dropdown-item value="enable"> <ha-svg-icon slot="icon" .path="${F}"></ha-svg-icon> ${this.hass.localize("ui.common.enable")} </ha-dropdown-item> `:"system"!==e.source?o.qy` <ha-dropdown-item variant="danger" value="disable"> <ha-svg-icon slot="icon" .path="${W}"></ha-svg-icon> ${this.hass.localize("ui.common.disable")} </ha-dropdown-item> `:o.s6} ${"system"!==e.source?o.qy` <ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon slot="icon" .path="${E}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.delete")} </ha-dropdown-item> `:o.s6} </ha-dropdown> </ha-md-list-item> ${this._expanded?m.length?o.qy`${r.length?o.qy`<ha-md-list class="devices"> <ha-md-list-item @click="${this._toggleOwnDevices}" type="button" class="toggle-devices-row ${(0,s.H)({expanded:this._devicesExpanded})}"> <ha-icon-button class="expand-button ${(0,s.H)({expanded:this._devicesExpanded})}" .path="${A}" slot="start"> </ha-icon-button> ${this.hass.localize("ui.panel.config.integrations.config_entry.devices_without_subentry")} </ha-md-list-item> ${this._devicesExpanded?r.map(t=>o.qy`<ha-config-entry-device-row .hass="${this.hass}" .narrow="${this.narrow}" .entry="${e}" .device="${t}" .entities="${a}"></ha-config-entry-device-row>`):o.s6} </ha-md-list>`:o.s6} ${m.map(t=>o.qy` <ha-config-sub-entry-row .hass="${this.hass}" .narrow="${this.narrow}" .manifest="${this.manifest}" .diagnosticHandler="${this.diagnosticHandler}" .entities="${this.entities}" .entry="${e}" .data="${t}" data-entry-id="${e.entry_id}"></ha-config-sub-entry-row> `)}`:o.qy` ${r.map(t=>o.qy`<ha-config-entry-device-row .hass="${this.hass}" .narrow="${this.narrow}" .entry="${e}" .device="${t}" .entities="${a}"></ha-config-entry-device-row>`)} `:o.s6} </ha-md-list>`}_toggleExpand(){this._expanded=!this._expanded}_toggleOwnDevices(){this._devicesExpanded=!this._devicesExpanded}_showOptions(){(0,f.Q)(this,this.data.entry,{manifest:this.manifest})}async _applicationCredentialForRemove(e){try{return(await(0,d.l3)(this.hass,e)).application_credentials_id}catch(e){return null}}async _removeApplicationCredential(e){if(await(0,C.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_title"),text:o.qy`${this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_prompt")}, <br> <br> ${this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_detail")} <br> <br> <a href="${(0,v.o)(this.hass,"/integrations/application_credentials/")}" target="_blank" rel="noreferrer"> ${this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.learn_more")} </a>`,destructive:!0,confirmText:this.hass.localize("ui.common.remove"),dismissText:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.dismiss")}))try{await(0,d.jJ)(this.hass,e)}catch(e){(0,C.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_error_title"),text:e.message})}}async _signUrl(e){const t=e.currentTarget;e.preventDefault();const i=await(0,h.e0)(this.hass,t.getAttribute("href"));(0,w.R)(i.path)}constructor(...e){super(...e),this.narrow=!1,this._expanded=!0,this._devicesExpanded=!0,this._configPanel=(0,r.A)((e,t)=>Object.values(t).find(t=>t.config_panel_domain===e)?.url_path||_.Og[e]),this._getEntities=()=>this.entities.filter(e=>e.config_entry_id===this.data.entry.entry_id),this._handleMenuAction=e=>{e.stopPropagation();const t=e.detail.item.value;if("reload"!==t)if("rename"!==t)if("copy"!==t)if("reconfigure"!==t)if("system_options"!==t)if("enable"!==t)if("disable"!==t)if("delete"!==t){if(t?.startsWith("subentry_")){const e=t.substring(9);this._addSubEntry(e)}}else this._handleDelete();else this._handleDisable();else this._handleEnable();else this._handleSystemOptions();else this._handleReconfigure();else this._handleCopy();else this._handleRename();else this._handleReload()},this._handleReload=async()=>{const e=(await(0,g.yv)(this.hass,this.data.entry.entry_id)).require_restart?"reload_restart_confirm":"reload_confirm";(0,C.showAlertDialog)(this,{text:this.hass.localize(`ui.panel.config.integrations.config_entry.${e}`)})},this._handleReconfigure=async()=>{(0,u.W)(this,{startFlowHandler:this.data.entry.domain,manifest:await(0,_.QC)(this.hass,this.data.entry.domain),entryId:this.data.entry.entry_id,navigateToResult:!0})},this._handleCopy=async()=>{await(0,l.l)(this.data.entry.entry_id),(0,$.P)(this,{message:this.hass?.localize("ui.common.copied_clipboard")||"Copied to clipboard"})},this._handleRename=async()=>{const e=await(0,C.showPromptDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.rename_dialog"),defaultValue:this.data.entry.title,inputLabel:this.hass.localize("ui.panel.config.integrations.rename_input_label")});null!==e&&await(0,g.iH)(this.hass,this.data.entry.entry_id,{title:e})},this._handleDisable=async()=>{const e=this.data.entry.entry_id;if(!await(0,C.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_confirm_title",{title:this.data.entry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_confirm_text"),confirmText:this.hass.localize("ui.common.disable"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0}))return;let t;try{t=await(0,g.XQ)(this.hass,e)}catch(e){return void(0,C.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:e.message})}t.require_restart&&(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")})},this._handleEnable=async()=>{const e=this.data.entry.entry_id;let t;try{t=await(0,g.k3)(this.hass,e)}catch(e){return void(0,C.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:e.message})}t.require_restart&&(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.enable_restart_confirm")})},this._handleDelete=async()=>{const e=this.data.entry.entry_id,t=await this._applicationCredentialForRemove(e);if(!await(0,C.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:this.data.entry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0}))return;(await(0,g.eM)(this.hass,e)).require_restart&&(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")}),t&&this._removeApplicationCredential(t)},this._handleSystemOptions=()=>{(0,m.n)(this,{entry:this.data.entry,manifest:this.manifest})},this._addSubEntry=e=>{(0,y.a)(this,this.data.entry,e,{startFlowHandler:this.data.entry.entry_id})}}}N.styles=[b.RF,o.AH`:host{display:block;position:relative}:host(.highlight)::after{position:absolute;inset:0;pointer-events:none;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));box-shadow:0 0 0 1px rgba(var(--rgb-info-color),.5),0 0 12px rgba(var(--rgb-info-color),.28);content:""}.expand-button{margin:0 -12px;transition:transform 150ms cubic-bezier(.4, 0, .2, 1)}.expand-button.expanded{transform:rotate(180deg)}ha-md-list{border:1px solid var(--divider-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));padding:0}:host([narrow]){margin-left:-12px;margin-right:-12px}ha-md-list.devices{margin:16px;margin-top:0}ha-icon-button.link{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}.toggle-devices-row{overflow:hidden;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.toggle-devices-row.expanded{border-bottom-left-radius:0;border-bottom-right-radius:0}ha-dropdown a{text-decoration:none}`],(0,n.Cg)([(0,a.MZ)({attribute:!1})],N.prototype,"hass",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],N.prototype,"narrow",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],N.prototype,"manifest",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],N.prototype,"diagnosticHandler",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],N.prototype,"entities",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],N.prototype,"data",void 0),(0,n.Cg)([(0,a.wk)()],N.prototype,"_expanded",void 0),(0,n.Cg)([(0,a.wk)()],N.prototype,"_devicesExpanded",void 0),N=(0,n.Cg)([(0,a.EM)("ha-config-entry-row")],N),t()}catch(e){t(e)}})},87599(e,t,i){i.a(e,async function(e,n){try{i.d(t,{J:()=>J});i(74423),i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(14603),i(47566),i(98721);var o=i(62826),a=i(5124),s=i(22441),r=i(91450),l=i(22786),c=i(36312),d=i(37981),h=i(89020),g=i(52220),p=i(12587),_=i(18350),m=i(29823),u=(i(70947),i(17308),i(2846),i(36866)),f=i(82e3),y=i(77423),b=i(26571),v=i(96204),w=i(59241),$=i(6810),C=i(70555),H=i(95350),x=i(81137),z=i(77763),L=i(26401),M=i(65063),A=i(28794),V=i(81310),k=i(54706),E=i(59653),S=i(14503),q=i(44144),D=i(36918),T=i(30039),F=i(65536),Z=i(76559),P=i(35402),B=e([_,m,u,A,V,F]);[_,m,u,A,V,F]=B.then?(await B)():B;const I="M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z",R="M19 7H16.19C15.74 6.2 15.12 5.5 14.37 5L16 3.41L14.59 2L12.42 4.17C11.96 4.06 11.5 4 11 4S10.05 4.06 9.59 4.17L7.41 2L6 3.41L7.62 5C6.87 5.5 6.26 6.21 5.81 7H3V9H5.09C5.03 9.33 5 9.66 5 10V11H3V13H5V14C5 14.34 5.03 14.67 5.09 15H3V17H5.81C7.26 19.5 10.28 20.61 13 19.65V19C13 16.46 14.61 14.2 17 13.35V13H19V11H17V10C17 9.66 16.97 9.33 16.91 9H19V7M13 15H9V13H13V15M13 11H9V9H13V11M17 16V22L22 19L17 16Z",O="M19 7H16.19C15.74 6.2 15.12 5.5 14.37 5L16 3.41L14.59 2L12.42 4.17C11.96 4.06 11.5 4 11 4S10.05 4.06 9.59 4.17L7.41 2L6 3.41L7.62 5C6.87 5.5 6.26 6.21 5.81 7H3V9H5.09C5.03 9.33 5 9.66 5 10V11H3V13H5V14C5 14.34 5.03 14.67 5.09 15H3V17H5.81C7.26 19.5 10.28 20.61 13 19.65V19C13 16.46 14.61 14.2 17 13.35V13H19V11H17V10C17 9.66 16.97 9.33 16.91 9H19V7M13 15H9V13H13V15M13 11H9V9H13V11M16 16H22V22H16V16Z",W="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",U="M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M9.54 15.65L11.63 17.74L10.35 19L7 15.65L10.35 12.3L11.63 13.56L9.54 15.65M17 15.65L13.65 19L12.38 17.74L14.47 15.65L12.38 13.56L13.65 12.3L17 15.65Z",j="M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,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,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z",N="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",G="M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z",X="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",K="M5,3C3.89,3 3,3.89 3,5V19C3,20.11 3.89,21 5,21H19C20.11,21 21,20.11 21,19V5C21,3.89 20.11,3 19,3H5M5,5H19V19H5V5M7,7V9H17V7H7M7,11V13H17V11H7M7,15V17H14V15H7Z",Q="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,10.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",J=(e,t)=>{if(t.reason){if(t.error_reason_translation_key){const i=e.loadBackendTranslation("exceptions",t.domain).then(e=>e(`component.${t.domain}.exceptions.${t.error_reason_translation_key}.message`,t.error_reason_translation_placeholders??void 0)||t.reason);return a.qy`${(0,r.T)(i)}`}const i=e.loadBackendTranslation("config",t.domain).then(e=>e(`component.${t.domain}.config.error.${t.reason}`)||t.reason);return a.qy`${(0,r.T)(i,t.reason)}`}return a.qy` <br> <a href="${`/config/logs?filter=${encodeURIComponent(t.domain)}`}"> ${e.localize("ui.panel.config.integrations.config_entry.check_the_logs")} </a> `};class Y extends((0,k.E)(a.WF)){connectedCallback(){super.connectedCallback(),window.addEventListener("hashchange",this._handleHashChange),this._handleHashChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this._handleHashChange)}hassSubscribe(){return[(0,w.Bz)(this.hass.connection,e=>{this._entities=e}),(0,H.FP)(this.hass.connection,e=>{for(const t of e)t.domain===this.domain&&(this._logInfo=t)})]}willUpdate(e){if(e.has("domain")&&(this.hass.loadBackendTranslation("title",[this.domain]),this.hass.loadBackendTranslation("config",[this.domain]),this.hass.loadBackendTranslation("config_subentries",[this.domain]),this._extraConfigEntries=void 0,this._filter="",this._subEntries={},this._fetchManifest(),this._fetchDiagnostics(),this._fetchEntitySources()),e.has("configEntries")||e.has("_extraConfigEntries")){const e=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries);this._fetchAllSubEntries(e)}}async _fetchEntitySources(){const e=await(0,$.c)(this.hass),t={};for(const[i,n]of Object.entries(e))n.domain in t||(t[n.domain]=[]),t[n.domain].push(i);this._domainEntities=t}updated(e){super.updated(e),this._searchParms.has("config_entry")&&(e.has("configEntries")&&!e.get("configEntries")||e.has("_searchParms"))&&this.configEntries&&this._highlightEntry()}render(){if(!this.configEntries||!this.domain)return a.s6;const e=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries),t=new Set;e.forEach(e=>{Object.keys(e.supported_subentry_types).forEach(e=>{t.add(e)})});const i=this._domainConfigEntriesInProgress(this.domain,this.configEntriesInProgress),n=this._discoveryFlows(i,this.hass.locale.language),o=this._attentionFlows(i),s=this._attentionEntries(e),r=this._normalEntries(e,this.hass.locale.language),l=this._buildNormalEntryData(r,this.hass.devices,this._subEntries,this.hass.locale.language,this.hass.localize),c=this._buildAttentionEntryData(s,this.hass.devices,this._subEntries,this.hass.locale.language,this.hass.localize),d=this._filterNormalTree(l,this._filter,this.hass.areas),g=this._filterDiscoveryTree(n,this._filter),p=this._filterAttentionFlowTree(o,this._filter),_=this._filterAttentionTree(c,this._filter,this.hass.areas),m=this._getDevices(e,this.hass.devices),u=this._getEntities(e,this._entities);let f=u.length;if(this.domain in this._domainEntities&&f!==this._domainEntities[this.domain].length)if(f){const e=new Set(u.map(e=>e.entity_id));for(const t of this._domainEntities[this.domain])e.add(t);f=e.size}else f=this._domainEntities[this.domain].length;const y=m.filter(e=>"service"===e.entry_type),v=m.filter(e=>"service"!==e.entry_type),w=h.x.includes(this.domain);return a.qy` <hass-subpage .hass="${this.hass}" .narrow="${this.narrow}"> ${this._manifest?a.qy` <a slot="toolbar-icon" href="${this._manifest.is_built_in?(0,D.o)(this.hass,`/integrations/${this._manifest.domain}`):this._manifest.documentation}" rel="noreferrer" target="_blank"> <ha-icon-button .label="${this.hass.localize("ui.panel.config.integrations.config_entry.documentation")}" .path="${j}"></ha-icon-button> </a> `:a.s6} ${this._manifest?.config_flow||this._logInfo?a.qy`<ha-dropdown slot="toolbar-icon"> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${W}"></ha-icon-button> ${this._manifest&&(this._manifest.is_built_in||this._manifest.issue_tracker)?a.qy` <a href="${(0,H.QQ)(this.domain,this._manifest)}" rel="noreferrer" target="_blank"> <ha-dropdown-item> <ha-svg-icon slot="icon" .path="${I}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.known_issues")} <ha-svg-icon slot="details" .path="${N}"></ha-svg-icon> </ha-dropdown-item> </a> `:a.s6} ${this._logInfo?a.qy`<a href="${`/config/logs?filter=${encodeURIComponent(this.domain)}`}"> <ha-dropdown-item> <ha-svg-icon slot="icon" .path="${K}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.logs.caption")} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> <ha-dropdown-item @click="${this._logInfo.level===H.S1.DEBUG?this._handleDisableDebugLogging:this._handleEnableDebugLogging}"> <ha-svg-icon slot="icon" .variant="${this._logInfo.level===H.S1.DEBUG?"danger":"default"}" .path="${this._logInfo.level===H.S1.DEBUG?O:R}"></ha-svg-icon> ${this._logInfo.level===H.S1.DEBUG?this.hass.localize("ui.panel.config.integrations.config_entry.disable_debug_logging"):this.hass.localize("ui.panel.config.integrations.config_entry.enable_debug_logging")} </ha-dropdown-item>`:a.s6} </ha-dropdown>`:a.s6} <div class="container"> <div class="header"> <div class="title-container"> <div class="logo-container"> <img alt="${(0,H.p$)(this.hass.localize,this.domain)}" src="${(0,q.MR)({domain:this.domain,type:"icon@2x",darkOptimized:this.hass.themes?.darkMode},this.hass.auth.data.hassUrl)}" crossorigin="anonymous" referrerpolicy="no-referrer" @load="${this._onImageLoad}" @error="${this._onImageError}"> </div> <div class="title"> <h1>${(0,H.p$)(this.hass.localize,this.domain)}</h1> <div class="sub"> ${null!=this._manifest?.version?a.qy`<span class="version">${this.hass.localize("ui.panel.config.integrations.config_entry.version",{version:this._manifest.version})}</span>`:a.s6} ${!1===this._manifest?.is_built_in?a.qy`<div class="${"integration-info "+(this._manifest.overwrites_built_in?"error":"warn")}"> <ha-svg-icon path="${G}"></ha-svg-icon> <a href="${(0,D.o)(this.hass,"/docs/quality_scale/#-custom")}" rel="noopener noreferrer" target="_blank"> ${this.hass.localize(this._manifest.overwrites_built_in?"ui.panel.config.integrations.config_entry.custom_overwrites_core":"ui.panel.config.integrations.config_entry.custom_integration")} </a> </div>`:a.s6} ${this._manifest?.iot_class?.startsWith("cloud_")?a.qy`<div class="integration-info"> <ha-svg-icon .path="${Q}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.depends_on_cloud")} </div>`:a.s6} ${0===r.length&&this._manifest&&!this._manifest.config_flow&&this.hass.config.components.find(e=>e.split(".")[0]===this.domain)?a.qy`<div class="integration-info info"> <ha-svg-icon path="${U}"></ha-svg-icon>${this.hass.localize("ui.panel.config.integrations.config_entry.no_config_flow")} </div>`:a.s6} ${this._manifest?.is_built_in&&this._manifest.quality_scale&&this._manifest.quality_scale in x.M?a.qy` <div class="integration-info"> <a href="${(0,D.o)(this.hass,`/docs/quality_scale/#-${this._manifest.quality_scale}`)}" rel="noopener noreferrer" target="_blank"> <ha-svg-icon class="${`quality-scale ${this._manifest.quality_scale}-quality`}" .path="${x.M[this._manifest.quality_scale].icon}"></ha-svg-icon> ${this.hass.localize(x.M[this._manifest.quality_scale].translationKey)} <ha-svg-icon class="open-external" .path="${N}"></ha-svg-icon> </a> </div> `:a.s6} </div> <div> ${v.length?a.qy` <a href="${1===v.length?`/config/devices/device/${v[0].id}`:`/config/devices/dashboard?historyBack=1&domain=${this.domain}`}"> ${this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:v.length})} </a> `:a.s6} ${v.length&&y.length?" • ":""} ${y.length?a.qy`<a href="${1===y.length?`/config/devices/device/${y[0].id}`:`/config/devices/dashboard?historyBack=1&domain=${this.domain}`}"> ${this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:y.length})} </a>`:a.s6} ${(v.length||y.length)&&f?" • ":""} ${f?a.qy` <a href="${`/config/entities?historyBack=1&domain=${this.domain}`}"> ${this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:f})} </a> `:a.s6} </div> </div> </div> <div class="actions"> ${w?a.qy` <ha-button @click="${this._addDevice}"> ${this.hass.localize("ui.panel.config.integrations.integration_page.add_device")} </ha-button> `:a.s6} ${"hardware"===this._manifest?.integration_type||this._manifest?.single_config_entry&&(0!==l.length||0!==c.length)?a.s6:a.qy`<ha-button .appearance="${w?"filled":"accent"}" @click="${this._addIntegration}"> ${this.hass.localize(`component.${this.domain}.config.initiate_flow.user`)||(this._manifest?.integration_type?this.hass.localize(`ui.panel.config.integrations.integration_page.add_${this._manifest.integration_type}`):this.hass.localize("ui.panel.config.integrations.integration_page.add_entry"))} </ha-button>`} ${Array.from(t).map(e=>a.qy`<ha-button appearance="filled" @click="${this._addSubEntry}" .flowType="${e}" .disabled="${!r.length}"> <ha-svg-icon slot="start" .path="${X}"></ha-svg-icon> ${this.hass.localize(`component.${this.domain}.config_subentries.${e}.initiate_flow.user`)}</ha-button>`)} </div> </div> ${l.length+c.length>0?a.qy`<ha-input-search appearance="outlined" .value="${this._filter}" @input="${this._handleSearchChange}"></ha-input-search>`:a.s6} ${this._logInfo?.level===H.S1.DEBUG?a.qy`<div class="section"> <ha-alert alert-type="warning"> <ha-svg-icon slot="icon" .path="${R}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.debug_logging_enabled")} <ha-button size="small" variant="warning" slot="action" @click="${this._handleDisableDebugLogging}"> ${this.hass.localize("ui.common.disable")} </ha-button> </ha-alert> </div>`:a.s6} ${g.length?a.qy` <div class="section"> <h3 class="section-header"> ${this.hass.localize("ui.panel.config.integrations.discovered")} </h3> <ha-md-list class="discovered"> ${g.map(e=>a.qy`<ha-md-list-item class="discovered"> ${e.localized_title} <ha-button slot="end" variant="success" size="small" .flow="${e}" @click="${this._continueFlow}"> ${this.hass.localize("ui.common.add")} </ha-button> </ha-md-list-item>`)} </ha-md-list> </div> `:a.s6} ${p.length||_.length?a.qy` <div class="section"> <h3 class="section-header"> ${this.hass.localize("ui.panel.config.integrations.integration_page.attention_entries")} </h3> ${p.length?a.qy`<ha-md-list class="attention"> ${p.map(e=>{const t=b.Al.includes(e.context.source);return a.qy`<ha-md-list-item class="config_entry ${t?"attention":""}"> ${e.localized_title} <span slot="supporting-text">${this.hass.localize("ui.panel.config.integrations."+(t?"attention":"discovered"))}</span> <ha-button slot="end" .flow="${e}" @click="${this._continueFlow}" variant="warning">${this.hass.localize("ui.panel.config.integrations."+(t?"reconfigure":"configure"))}</ha-button> </ha-md-list-item>`})} </ha-md-list>`:a.s6} ${_.map(e=>a.qy`<ha-config-entry-row class="attention" .hass="${this.hass}" .narrow="${this.narrow}" .manifest="${this._manifest}" .diagnosticHandler="${this._diagnosticHandler}" .entities="${this._entities}" .data="${e}" data-entry-id="${e.entry.entry_id}"></ha-config-entry-row>`)} </div> `:a.s6} <div class="section"> <h3 class="section-header"> ${this._manifest?.integration_type?this.hass.localize(`ui.panel.config.integrations.integration_page.entries_${this._manifest.integration_type}`):this.hass.localize("ui.panel.config.integrations.integration_page.entries")} </h3> ${0===d.length?a.qy`<div class="card-content no-entries"> ${this._filter?this.hass.localize("ui.panel.config.integrations.none_found"):this._manifest&&!this._manifest.config_flow&&this.hass.config.components.find(e=>e.split(".")[0]===this.domain)?this.hass.localize("ui.panel.config.integrations.integration_page.yaml_entry"):this.hass.localize("ui.panel.config.integrations.integration_page.no_entries")} </div>`:a.qy` ${d.map(e=>a.qy`<ha-config-entry-row .hass="${this.hass}" .narrow="${this.narrow}" .manifest="${this._manifest}" .diagnosticHandler="${this._diagnosticHandler}" .entities="${this._entities}" .data="${e}" data-entry-id="${e.entry.entry_id}"></ha-config-entry-row>`)} `} </div> </div> </hass-subpage> `}_onImageLoad(e){e.target.style.display="inline-block"}_onImageError(e){e.target.style.display="none"}async _highlightEntry(){await(0,p.E)();const e=this._searchParms.get("config_entry");this._configEntryRows.forEach(e=>e.classList.remove("highlight"));const t=Array.from(this._configEntryRows).find(t=>t.dataset.entryId===e);t&&(t.scrollIntoView({block:"center"}),t.classList.add("highlight"))}_continueFlow(e){(0,z.W)(this,{continueFlowId:e.target.flow.flow_id,navigateToResult:!0,dialogClosedCallback:()=>{}})}async _fetchManifest(){this.domain&&(this._manifest=await(0,H.QC)(this.hass,this.domain),this._manifest.integration_type&&!["device","hub","service"].includes(this._manifest.integration_type)&&(this._extraConfigEntries=await(0,y.VN)(this.hass,{domain:this.domain})))}async _fetchDiagnostics(){if(this.domain&&(0,c.x)(this.hass.config,"diagnostics"))try{this._diagnosticHandler=await(0,v.g9)(this.hass,this.domain)}catch(e){}}async _fetchAllSubEntries(e){const t=++this._subEntriesFetchId,i=e.filter(e=>e.num_subentries>0);if(!i.length)return void(this._subEntries={});const n={};await Promise.all(i.map(async e=>{try{n[e.entry_id]=(await(0,y.t0)(this.hass,e.entry_id)).sort((e,t)=>(0,g.SH)(e.title,t.title,this.hass.locale.language))}catch{n[e.entry_id]=[]}})),t===this._subEntriesFetchId&&(this._subEntries=n)}_handleSearchChange(e){this._filter=e.target.value??""}async _handleEnableDebugLogging(){const e=this.domain;await(0,H.nQ)(this.hass,e,H.S1[H.S1.DEBUG],"once")}async _handleDisableDebugLogging(e){e.stopPropagation();const t=this.domain;await(0,H.nQ)(this.hass,t,H.S1[H.S1.NOTSET],"once");const i=`home-assistant_${t}_${(new Date).toISOString().replace(/:/g,"-")}.log`,n=await(0,f.e0)(this.hass,(0,C._)(this.hass));(0,T.R)(n.path,i)}_addDevice(){(0,h.P)(this,this.hass,this.domain)}async _addIntegration(){this._manifest?.config_flow?(0,Z.X)(this,{domain:this.domain,navigateToResult:!0}):(0,M.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.yaml_only_title"),text:this.hass.localize("ui.panel.config.integrations.config_flow.yaml_only")})}async _addSubEntry(e){const t=e.target.flowType,i=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries).filter(e=>"ignore"!==e.source);i.length&&(1!==i.length||"loaded"!==i[0].state?(0,P.J)(this,{domain:this.domain,subFlowType:t,configEntries:i,configEntryPicked:e=>{(0,L.a)(this,e,t,{startFlowHandler:e.entry_id})}}):(0,L.a)(this,i[0],t,{startFlowHandler:i[0].entry_id}))}static get styles(){return[S.RF,a.AH`.container{display:flex;flex-wrap:wrap;margin:auto;max-width:1000px;padding:32px}:host([narrow]) .container{padding:16px}.container>*{flex-grow:1}.header{display:flex;flex-wrap:wrap;gap:var(--ha-space-6);align-items:center;justify-content:space-between;margin-bottom:24px}.title-container{display:flex;align-items:center}.title{display:flex;gap:var(--ha-space-1);flex-direction:column;justify-content:space-between}.title h1{font-family:var(--ha-font-family-body);font-size:32px;font-weight:700;line-height:40px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none;margin:0}.sub{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center}.card-content{padding:16px 0 8px}.card-header{padding-bottom:0}.no-entries{padding:12px 16px}.logo-container{display:flex;justify-content:center;margin-right:16px;margin-inline-end:16px;margin-inline-start:initial;padding:0 8px}.logo-container img{width:80px}.version{color:var(--secondary-text-color)}.overview .card-actions{padding:0}img{max-width:200px;max-height:100px}@keyframes shimmer{100%{mask-position:left}}.actions{display:flex;flex-wrap:wrap;gap:var(--ha-space-2)}ha-input-search{width:100%;margin-bottom:var(--ha-space-4)}.section{width:100%}.section-header{margin-inline-start:16px;margin-top:6px;margin-bottom:6px;font-family:var(--ha-font-family-body);font-size:14px;font-weight:500;line-height:20px;letter-spacing:.10000000149011612px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none;color:var(--secondary-text-color)}.integration-info{display:flex;align-items:center;gap:var(--ha-space-2)}.integration-info ha-svg-icon{min-width:24px;color:var(--mdc-theme-text-icon-on-background)}.integration-info.warn ha-svg-icon{color:var(--warning-color)}.integration-info.error ha-svg-icon{color:var(--error-color)}.integration-info.info ha-svg-icon{color:var(--info-color)}.quality-scale{mask:linear-gradient(-60deg,#000 30%,#0005,#000 70%) right/350% 100%;animation:shimmer 2.5s infinite}ha-svg-icon.bronze-quality{color:#cd7f32}ha-svg-icon.silver-quality{color:silver}ha-svg-icon.gold-quality{color:gold}ha-svg-icon.platinum-quality{color:#727272}ha-svg-icon.legacy-quality{color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38));animation:unset}ha-md-list{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md);padding:0}.discovered{--md-list-container-color:rgba(var(--rgb-success-color), 0.2)}.attention{--md-list-container-color:rgba(var(--rgb-warning-color), 0.2)}ha-md-list-item{--md-list-item-top-space:4px;--md-list-item-bottom-space:4px;position:relative}ha-md-list-item.discovered{height:72px}ha-md-list-item.config_entry::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:""}ha-config-entry-row{display:block;margin-bottom:16px}a{text-decoration:none}.warning{color:var(--error-color)}.state-failed-unload{--state-message-color:var(--warning-color);--text-on-state-color:var(--primary-text-color)}.state-failed::after{background-color:var(--warning-color)}.state-not-loaded{--state-message-color:var(--primary-text-color)}.state-setup{--state-message-color:var(--secondary-text-color)}.message{font-weight:var(--ha-font-weight-bold);display:flex;align-items:center}.message ha-svg-icon{color:var(--state-message-color)}.message div{flex:1;margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;padding-top:2px;padding-right:2px;padding-inline-end:2px;padding-inline-start:initial;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:7;overflow:hidden;text-overflow:ellipsis}.state-disabled [slot=headline],.state-disabled [slot=supporting-text]{opacity:var(--md-list-item-disabled-opacity, .3)}ha-md-list{margin-top:8px;margin-bottom:8px}a[slot=toolbar-icon]{color:var(--sidebar-icon-color)}ha-svg-icon.open-external{min-width:14px;width:14px}`]}constructor(...e){super(...e),this.narrow=!1,this.isWide=!1,this.configEntriesInProgress=[],this._entities=[],this._searchParms=new URLSearchParams(window.location.hash.substring(1)),this._filter="",this._subEntries={},this._subEntriesFetchId=0,this._domainEntities={},this._handleHashChange=()=>{this._searchParms=new URLSearchParams(window.location.hash.substring(1))},this._domainConfigEntries=(0,l.A)((e,t)=>t?t.filter(t=>t.domain===e):[]),this._domainConfigEntriesInProgress=(0,l.A)((e,t)=>t?t.filter(t=>t.handler===e):[]),this._buildEntryData=(e,t,i,n,o)=>{const a=(e,t)=>(0,g.SH)((0,d.T)(e,o,this.hass.states)||"",(0,d.T)(t,o,this.hass.states)||"",n);return e.map(e=>{const n=Object.values(t).filter(t=>t.config_entries.includes(e.entry_id)),o=(i[e.entry_id]||[]).map(t=>{const i=n.filter(i=>i.config_entries_subentries[e.entry_id]?.includes(t.subentry_id)&&"service"!==i.entry_type).sort(a),o=n.filter(i=>i.config_entries_subentries[e.entry_id]?.includes(t.subentry_id)&&"service"===i.entry_type).sort(a);return{subEntry:t,devices:i,services:o}}),s=n.filter(t=>(!t.config_entries_subentries[e.entry_id]?.length||null===t.config_entries_subentries[e.entry_id][0])&&"service"!==t.entry_type).sort(a),r=n.filter(t=>(!t.config_entries_subentries[e.entry_id]?.length||null===t.config_entries_subentries[e.entry_id][0])&&"service"===t.entry_type).sort(a);return{entry:e,devices:s,services:r,subEntries:o}})},this._buildNormalEntryData=(0,l.A)(this._buildEntryData),this._buildAttentionEntryData=(0,l.A)(this._buildEntryData),this._normalEntries=(0,l.A)((e,t)=>e.filter(e=>"ignore"!==e.source&&!y.m4.includes(e.state)).sort((e,i)=>Boolean(e.disabled_by)!==Boolean(i.disabled_by)?e.disabled_by?1:-1:(0,g.SH)(e.title,i.title,t))),this._attentionEntries=(0,l.A)(e=>e.filter(e=>y.m4.includes(e.state))),this._discoveryFlows=(0,l.A)((e,t)=>e.filter(e=>!b.Al.includes(e.context.source)).sort((e,i)=>(0,g.SH)(e.localized_title||"zzz",i.localized_title||"zzz",t))),this._attentionFlows=(0,l.A)(e=>e.filter(e=>b.Al.includes(e.context.source))),this._filterTree=(0,l.A)((e,t,i)=>{if(!t)return e;const n=["name","manufacturer","model","sw_version","area"],o=e=>({device:e,name:e.name_by_user||e.name||"",manufacturer:e.manufacturer||"",model:e.model||"",sw_version:e.sw_version||"",area:e.area_id&&i[e.area_id]?.name||""}),a=e=>(0,E.C)(e.map(o),t,n,void 0,{keys:n}).map(e=>e.device),s=["title"],r=e=>(0,E.C)([{title:e}],t,s,void 0,{keys:s}).length>0,l=[];for(const t of e){if(r(t.entry.title)){l.push(t);continue}const e=a(t.devices),i=a(t.services),n=t.subEntries.map(e=>{if(r(e.subEntry.title))return e;const t=a(e.devices),i=a(e.services);return t.length||i.length?{subEntry:e.subEntry,devices:t,services:i}:null}).filter(e=>null!==e);(e.length||i.length||n.length)&&l.push({entry:t.entry,devices:e,services:i,subEntries:n})}return l}),this._filterNormalTree=(0,l.A)((e,t,i)=>this._filterTree(e,t,i)),this._filterFlowTree=(e,t)=>{if(!t)return e;const i=["localized_title"];return(0,E.C)(e.filter(e=>e.localized_title),t,i,void 0,{keys:i})},this._filterDiscoveryTree=(0,l.A)((e,t)=>this._filterFlowTree(e,t)),this._filterAttentionFlowTree=(0,l.A)((e,t)=>this._filterFlowTree(e,t)),this._filterAttentionTree=(0,l.A)((e,t,i)=>this._filterTree(e,t,i)),this._getEntities=(0,l.A)((e,t)=>{if(!t)return[];const i=e.map(e=>e.entry_id);return t.filter(e=>e.config_entry_id&&i.includes(e.config_entry_id))}),this._getDevices=(0,l.A)((e,t)=>{if(!t)return[];const i=e.map(e=>e.entry_id);return Object.values(t).filter(e=>e.config_entries.some(e=>i.includes(e)))})}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],Y.prototype,"hass",void 0),(0,o.Cg)([(0,s.MZ)()],Y.prototype,"domain",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],Y.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"is-wide",type:Boolean})],Y.prototype,"isWide",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],Y.prototype,"configEntries",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],Y.prototype,"configEntriesInProgress",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_entities",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_manifest",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_extraConfigEntries",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_diagnosticHandler",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_logInfo",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_searchParms",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_filter",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_subEntries",void 0),(0,o.Cg)([(0,s.wk)()],Y.prototype,"_domainEntities",void 0),(0,o.Cg)([(0,s.YG)("ha-config-entry-row")],Y.prototype,"_configEntryRows",void 0),Y=(0,o.Cg)([(0,s.EM)("ha-config-integration-page")],Y),n()}catch(e){n(e)}})},9567(e,t,i){i.a(e,async function(e,t){try{i(18111),i(22489),i(61701);var n=i(62826),o=i(5124),a=i(22441),s=i(6412),r=i(29823),l=(i(70947),i(77423)),c=i(26401),d=i(33963),h=i(8313),g=e([r,h,d]);[r,h,d]=g.then?(await g)():g;const p="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",_="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z",m="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",u="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",f="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",y="M22 15V16L14 18.5L7 16.6V18H1V7H9L15.2 9.3C16.2 9.7 17 10.8 17 12H19C20.7 12 22 13.3 22 15M5 16V9H3V16H5M19.9 14.6C19.7 14.2 19.4 14 19 14H13.6C13.1 14 12.5 13.9 12 13.8L9.7 13L10.3 11.1L12.7 11.9C13 11.9 15 12 15 12C15 11.6 14.8 11.3 14.4 11.2L8.6 9H7V14.5L14 16.4L19.9 14.6Z",b="M18,17H10.5L12.5,15H18M6,17V14.5L13.88,6.65C14.07,6.45 14.39,6.45 14.59,6.65L16.35,8.41C16.55,8.61 16.55,8.92 16.35,9.12L8.47,17M19,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",v="M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z";class w extends o.WF{render(){const e=this.data.subEntry,t=this.entry,i=this.data.devices,n=this.data.services,a=this._getEntities();return o.qy`<ha-md-list> <ha-md-list-item class="sub-entry" data-entry-id="${t.entry_id}" .configEntry="${t}" .subEntry="${e}"> ${i.length||n.length?o.qy`<ha-icon-button class="expand-button ${(0,s.H)({expanded:this._expanded})}" .path="${p}" slot="start" @click="${this._toggleExpand}"></ha-icon-button>`:o.s6} <span slot="headline">${e.title}</span> <span slot="supporting-text">${this.hass.localize(`component.${t.domain}.config_subentries.${e.subentry_type}.entry_type`)}</span> ${t.supported_subentry_types[e.subentry_type]?.supports_reconfigure?o.qy` <ha-icon-button slot="end" @click="${this._handleReconfigureSub}" .path="${_}" .label="${this.hass.localize(`component.${t.domain}.config_subentries.${e.subentry_type}.initiate_flow.reconfigure`)||this.hass.localize("ui.panel.config.integrations.config_entry.configure")}"> </ha-icon-button> `:o.s6} <ha-dropdown slot="end" @wa-select="${this._handleMenuAction}"> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${f}"></ha-icon-button> ${i.length||n.length?o.qy` <a href="${1===i.length?`/config/devices/device/${i[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${t.entry_id}&sub_entry=${e.subentry_id}`}"> <ha-dropdown-item value="devices"> <ha-svg-icon .path="${u}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:i.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} ${n.length?o.qy` <a href="${1===n.length?`/config/devices/device/${n[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${t.entry_id}&sub_entry=${e.subentry_id}`}"> <ha-dropdown-item value="services"> <ha-svg-icon .path="${y}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:n.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} ${a.length?o.qy` <a href="${`/config/entities?historyBack=1&config_entry=${t.entry_id}&sub_entry=${e.subentry_id}`}"> <ha-dropdown-item value="entities"> <ha-svg-icon .path="${v}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:a.length})} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `:o.s6} <ha-dropdown-item value="rename"> <ha-svg-icon slot="icon" .path="${b}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.rename")} </ha-dropdown-item> <ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon slot="icon" .path="${m}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.integrations.config_entry.delete")} </ha-dropdown-item> </ha-dropdown> </ha-md-list-item> ${this._expanded?o.qy` ${i.map(e=>o.qy`<ha-config-entry-device-row .hass="${this.hass}" .narrow="${this.narrow}" .entry="${this.entry}" .device="${e}" .entities="${this.entities}"></ha-config-entry-device-row>`)} ${n.map(e=>o.qy`<ha-config-entry-device-row .hass="${this.hass}" .narrow="${this.narrow}" .entry="${this.entry}" .device="${e}" .entities="${this.entities}"></ha-config-entry-device-row>`)} `:o.s6} </ha-md-list>`}_toggleExpand(){this._expanded=!this._expanded}async _handleReconfigureSub(){(0,c.a)(this,this.entry,this.data.subEntry.subentry_type,{startFlowHandler:this.entry.entry_id,subEntryId:this.data.subEntry.subentry_id})}constructor(...e){super(...e),this.narrow=!1,this._expanded=!0,this._getEntities=()=>this.entities.filter(e=>e.config_subentry_id===this.data.subEntry.subentry_id),this._handleMenuAction=e=>{switch(e.detail.item.value){case"rename":this._handleRenameSub();break;case"delete":this._handleDeleteSub()}},this._handleRenameSub=async()=>{const e=await(0,d.showPromptDialog)(this,{title:this.hass.localize("ui.common.rename"),defaultValue:this.data.subEntry.title,inputLabel:this.hass.localize("ui.panel.config.integrations.rename_input_label")});null!==e&&await(0,l.A)(this.hass,this.entry.entry_id,this.data.subEntry.subentry_id,{title:e})},this._handleDeleteSub=async()=>{await(0,d.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:this.data.subEntry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})&&await(0,l.Cm)(this.hass,this.entry.entry_id,this.data.subEntry.subentry_id)}}}w.styles=o.AH`.expand-button{margin:0 -12px;transition:transform 150ms cubic-bezier(.4, 0, .2, 1)}.expand-button.expanded{transform:rotate(180deg)}ha-md-list{border:1px solid var(--divider-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));padding:0;margin:16px;margin-top:0}ha-md-list-item.has-subentries{border-bottom:1px solid var(--divider-color)}ha-dropdown a{text-decoration:none}`,(0,n.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],w.prototype,"narrow",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"manifest",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"diagnosticHandler",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"entities",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"entry",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"data",void 0),(0,n.Cg)([(0,a.wk)()],w.prototype,"_expanded",void 0),w=(0,n.Cg)([(0,a.EM)("ha-config-sub-entry-row")],w),t()}catch(e){t(e)}})},5317(e,t,i){i.a(e,async function(e,t){try{var n=i(62826),o=i(5124),a=i(22441),s=i(29823),r=(i(70947),i(26300)),l=e([s,r]);[s,r]=l.then?(await l)():l;const c="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z";class d extends o.WF{render(){return o.qy` <ha-dropdown> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${c}"></ha-icon-button> <a href="/config/application_credentials"> <ha-dropdown-item> ${this.hass.localize("ui.panel.config.application_credentials.caption")} </ha-dropdown-item> </a> </ha-dropdown> `}}d.styles=o.AH`:host{display:flex}a{text-decoration:none}`,(0,n.Cg)([(0,a.MZ)({attribute:!1})],d.prototype,"hass",void 0),d=(0,n.Cg)([(0,a.EM)("ha-integration-overflow-menu")],d),t()}catch(e){t(e)}})},90676(e,t,i){i.d(t,{g:()=>a});var n=i(1087);const o=()=>Promise.all([i.e(4801),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(80131),i.e(35764),i.e(47417),i.e(26092),i.e(8851),i.e(12009),i.e(66201),i.e(2513),i.e(40551)]).then(i.bind(i,7664)),a=e=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-matter-add-device",dialogImport:o,dialogParams:{}})}},44919(e,t,i){i.d(t,{X:()=>a});var n=i(1087);const o=()=>Promise.all([i.e(4801),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(75613),i.e(64366)]).then(i.bind(i,54985)),a=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-zwave_js-add-node",dialogImport:o,dialogParams:t})}},76559(e,t,i){i.d(t,{X:()=>o,n:()=>a});var n=i(1087);const o=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-add-integration",dialogImport:()=>Promise.all([i.e(92769),i.e(50672)]).then(i.bind(i,60051)),dialogParams:t})},a=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-yaml-integration",dialogImport:()=>i.e(24096).then(i.bind(i,95683)),dialogParams:t})}},35402(e,t,i){i.d(t,{J:()=>o});var n=i(1087);const o=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-pick-config-entry",dialogImport:()=>i.e(88889).then(i.bind(i,99712)),dialogParams:t})}},34128(e,t,i){i.d(t,{G9:()=>s,Ni:()=>a,Ue:()=>d,Vd:()=>h,gh:()=>g});i(74423);var n=i(1087),o=i(45291);const a=e=>{const t=document.createElement("hui-error-card");return customElements.get("hui-error-card")?t.setConfig(e):(Promise.resolve().then(i.bind(i,4397)),customElements.whenDefined("hui-error-card").then(()=>{customElements.upgrade(t),t.setConfig(e)})),t},s=(e,t)=>({type:"error",error:e,origConfig:t}),r=(e,t)=>{const i=document.createElement(e);return i.setConfig(t),i},l=(e,t,n)=>"badge"===e?(e=>{const t=document.createElement("hui-error-badge");return customElements.get("hui-error-badge")?t.setConfig(e):(Promise.all([i.e(92769),i.e(3283),i.e(72130),i.e(85010),i.e(67218),i.e(58416),i.e(99788),i.e(22398),i.e(82134),i.e(26092),i.e(34310),i.e(59704),i.e(25322),i.e(90790),i.e(89747),i.e(59532),i.e(36332),i.e(77563),i.e(15862),i.e(99143),i.e(41344),i.e(12009),i.e(66990),i.e(3025),i.e(38108),i.e(66006),i.e(38260)]).then(i.bind(i,50655)),customElements.whenDefined("hui-error-badge").then(()=>{customElements.upgrade(t),t.setConfig(e)})),t})(s(t,n)):"heading-badge"===e?(e=>{const t=document.createElement("hui-error-heading-badge");return customElements.get("hui-error-heading-badge")?t.setConfig(e):(Promise.all([i.e(92769),i.e(3283),i.e(72130),i.e(85010),i.e(67218),i.e(58416),i.e(99788),i.e(22398),i.e(82134),i.e(26092),i.e(34310),i.e(59704),i.e(25322),i.e(90790),i.e(89747),i.e(59532),i.e(36332),i.e(77563),i.e(15862),i.e(99143),i.e(41344),i.e(12009),i.e(66990),i.e(3025),i.e(38108),i.e(66006),i.e(21614)]).then(i.bind(i,13469)),customElements.whenDefined("hui-error-heading-badge").then(()=>{customElements.upgrade(t),t.setConfig(e)})),t})(((e,t)=>({type:"error",error:e,origConfig:t}))(t,n)):a({type:"error",message:t}),c=e=>(0,o.c8)(e)?(0,o.Iu)(e):void 0,d=(e,t,i,n,o,a)=>{try{return h(e,t,i,n,o,a)}catch(i){return console.error(e,t.type,i),l(e,i.message,t)}},h=(e,t,i,o,a,s)=>{if(!t||"object"!=typeof t)throw new Error("Config is not an object");if(!(t.type||s||a&&"entity"in t))throw new Error("No card type configured");const d=t.type?c(t.type):void 0;if(d)return((e,t,i)=>{if(customElements.get(t))return r(t,i);const o=l(e,`Custom element doesn't exist: ${t}.`,i);if(!t.includes("-"))return o;o.style.display="None";const a=window.setTimeout(()=>{o.style.display=""},2e3);return customElements.whenDefined(t).then(()=>{clearTimeout(a),(0,n.r)(o,"ll-rebuild")}),o})(e,d,t);let h;if(a&&!t.type&&t.entity){h=`${a[t.entity.split(".",1)[0]]||a._domain_not_found}-entity`}else h=t.type||s;if(void 0===h)throw new Error("No type specified");const g=`hui-${h}-${e}`;if(o&&h in o)return o[h](),((e,t)=>{if(customElements.get(e))return r(e,t);const i=document.createElement(e);return customElements.whenDefined(e).then(()=>{try{customElements.upgrade(i),(0,n.r)(i,"ll-upgrade"),i.setConfig(t)}catch(e){(0,n.r)(i,"ll-rebuild")}}),i})(g,t);if(i&&i.has(h))return r(g,t);throw new Error(`Unknown type encountered: ${h}`)},g=async(e,t,i,n)=>{const o=c(e);if(o){const e=customElements.get(o);if(e)return e;if(!o.includes("-"))throw new Error(`Custom element not found: ${o}`);return new Promise((e,t)=>{setTimeout(()=>t(new Error(`Custom element not found: ${o}`)),2e3),customElements.whenDefined(o).then(()=>e(customElements.get(o)))})}const a=`hui-${e}-${t}`,s=customElements.get(a);if(i&&i.has(e))return s;if(n&&e in n)return s||n[e]().then(()=>customElements.get(a));throw new Error(`Unknown type: ${e}`)}},94225(e,t,i){i.a(e,async function(e,n){try{i.d(t,{T:()=>b,t:()=>v});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var o=i(99799),a=i(29003),s=i(92055),r=i(19396),l=i(74323),c=i(51199),d=i(43721),h=i(65509),g=i(21659),p=i(82525),_=i(34128),m=e([o,a,s,r,l,c,d,h,g,p]);[o,a,s,r,l,c,d,h,g,p]=m.then?(await m)():m;const u=new Set(["media-player-entity","scene-entity","script-entity","sensor-entity","simple-entity","toggle-entity","button","call-service"]),f={"button-entity":()=>i.e(26846).then(i.bind(i,21869)),"climate-entity":()=>i.e(56995).then(i.bind(i,2798)),"cover-entity":()=>i.e(41243).then(i.bind(i,79734)),"date-entity":()=>i.e(17418).then(i.bind(i,75473)),"datetime-entity":()=>Promise.all([i.e(99194),i.e(81767)]).then(i.bind(i,69690)),"event-entity":()=>Promise.resolve().then(i.bind(i,99799)),"group-entity":()=>i.e(68827).then(i.bind(i,53110)),"input-button-entity":()=>i.e(19825).then(i.bind(i,46472)),"humidifier-entity":()=>i.e(378).then(i.bind(i,53537)),"input-datetime-entity":()=>i.e(71748).then(i.bind(i,1391)),"input-number-entity":()=>i.e(17600).then(i.bind(i,58723)),"input-select-entity":()=>i.e(44325).then(i.bind(i,54596)),"input-text-entity":()=>i.e(8086).then(i.bind(i,51765)),"lock-entity":()=>i.e(28245).then(i.bind(i,49748)),"number-entity":()=>i.e(71523).then(i.bind(i,57198)),"select-entity":()=>i.e(9374).then(i.bind(i,78157)),"text-entity":()=>i.e(67973).then(i.bind(i,58212)),"time-entity":()=>i.e(61331).then(i.bind(i,87550)),"timer-entity":()=>i.e(94097).then(i.bind(i,6344)),"update-entity":()=>i.e(80275).then(i.bind(i,38238)),"valve-entity":()=>i.e(96654).then(i.bind(i,46493)),conditional:()=>Promise.all([i.e(67218),i.e(77563),i.e(78490)]).then(i.bind(i,80725)),"weather-entity":()=>Promise.all([i.e(12009),i.e(77547)]).then(i.bind(i,80395)),divider:()=>i.e(45249).then(i.bind(i,38584)),section:()=>i.e(51255).then(i.bind(i,39082)),weblink:()=>i.e(69148).then(i.bind(i,65751)),cast:()=>i.e(10405).then(i.bind(i,96612)),buttons:()=>i.e(50777).then(i.bind(i,65728)),attribute:()=>Promise.resolve().then(i.bind(i,65509)),text:()=>i.e(95421).then(i.bind(i,3980))},y={_domain_not_found:"simple",alert:"toggle",automation:"toggle",button:"button",climate:"climate",cover:"cover",date:"date",datetime:"datetime",event:"event",fan:"toggle",group:"group",humidifier:"humidifier",input_boolean:"toggle",input_button:"input-button",input_datetime:"input-datetime",input_number:"input-number",input_select:"input-select",input_text:"input-text",light:"toggle",lock:"lock",media_player:"media-player",number:"number",remote:"toggle",scene:"scene",script:"script",select:"select",sensor:"sensor",siren:"toggle",switch:"toggle",text:"text",time:"time",timer:"timer",update:"update",vacuum:"toggle",valve:"valve",water_heater:"climate",weather:"weather"},b=e=>(0,_.Ue)("row",e,u,f,y,void 0),v=e=>(0,_.gh)(e,"row",u,f);n()}catch(e){n(e)}})},30039(e,t,i){i.d(t,{R:()=>o});i(14603),i(47566),i(98721);var n=i(16869);const o=(e,t="")=>{const i=document.createElement("a");i.target="_blank",i.href=e,i.download=t,i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i),e.startsWith("blob:")&&(n.B?setTimeout(()=>URL.revokeObjectURL(e),1e4):URL.revokeObjectURL(e))}}};