"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["39670"],{63130:function(t,a,s){s.d(a,{l:function(){return e}});s(3362);var o=s(50248);const e=async(t,a)=>{if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(t))}catch(i){}const s=a||(()=>{const t=(0,o.n)();if(t instanceof HTMLElement){let a=t.getRootNode(),s=null;for(;a instanceof ShadowRoot&&a.host instanceof HTMLElement;)s=a.host,a=a.host.getRootNode();if(s)return s}return document.body})(),e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.opacity="0",s.appendChild(e),e.select(),document.execCommand("copy"),s.removeChild(e)}},58485:function(t,a,s){s.a(t,async function(t,o){try{s.r(a);s(18111),s(61701),s(33110),s(3362),s(62953);var e=s(40445),i=s(96196),n=s(77845),l=s(1087),r=s(18350),d=(s(93444),s(72554)),p=s(81619),h=s(63130),c=s(34675),u=t([r,d]);[r,d]=u.then?(await u)():u;let y,_,b,f,g=t=>t;class m extends i.WF{async showDialog(t){this._params=t,this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._params=void 0,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}async _copyToClipboard(){this._params&&(await(0,h.l)(JSON.stringify(this._params.entry)),(0,p.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}_showRawData(t,a){return s=>{s.preventDefault(),(0,c.k)(this,{key:t,data:a})}}render(){return this._params?(0,i.qy)(y||(y=g` <ha-dialog .hass="${0}" .open="${0}" header-title="${0}" @closed="${0}"> <p> <b>${0}</b>: ${0} <br> <b>${0}</b>: ${0} <br> <b>${0}</b>: ${0} </p> <h4>${0}</h4> <table width="100%"> <tbody> ${0} </tbody> </table> <h4>${0}</h4> <table width="100%"> <tbody> ${0} </tbody> </table> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" appearance="plain" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this.hass,this._open,this.hass.localize("ui.panel.config.ssdp.discovery_information"),this._dialogClosed,this.hass.localize("ui.panel.config.ssdp.name"),this._params.entry.name,this.hass.localize("ui.panel.config.ssdp.ssdp_st"),this._params.entry.ssdp_st,this.hass.localize("ui.panel.config.ssdp.ssdp_location"),this._params.entry.ssdp_location,this.hass.localize("ui.panel.config.ssdp.ssdp_headers"),Object.entries(this._params.entry.ssdp_headers).map(([t,a])=>(0,i.qy)(_||(_=g` <tr> <td><b>${0}</b></td> <td>${0}</td> </tr> `),t,a)),this.hass.localize("ui.panel.config.ssdp.upnp"),Object.entries(this._params.entry.upnp).map(([t,a])=>(0,i.qy)(b||(b=g` <tr> <td><b>${0}</b></td> <td> ${0} </td> </tr> `),t,"object"==typeof a&&null!==a?(0,i.qy)(f||(f=g`<a href="#" @click="${0}">${0}</a>`),this._showRawData(t,a),this.hass.localize("ui.panel.config.ssdp.show_raw_data")):a)),this._copyToClipboard,this.hass.localize("ui.panel.config.ssdp.copy_to_clipboard")):i.s6}constructor(...t){super(...t),this._open=!1}}(0,e.Cg)([(0,n.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,e.Cg)([(0,n.wk)()],m.prototype,"_params",void 0),(0,e.Cg)([(0,n.wk)()],m.prototype,"_open",void 0),m=(0,e.Cg)([(0,n.EM)("dialog-ssdp-device-info")],m),o()}catch(y){o(y)}})},34675:function(t,a,s){s.d(a,{k:function(){return i}});s(3362),s(62953);var o=s(1087);const e=()=>Promise.all([s.e("72130"),s.e("85010"),s.e("34310"),s.e("8574")]).then(s.bind(s,9837)),i=(t,a)=>{(0,o.r)(t,"show-dialog",{dialogTag:"dialog-ssdp-raw-data",dialogImport:e,dialogParams:a})}}}]);
//# sourceMappingURL=39670.1289bdc6fe8abc9d.js.map