"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[35627],{16227:function(t,a,e){var o=e(36854),i=e(98117),n=(e(26099),e(3362),e(50649)),r=function(){var t=(0,i.A)((0,o.A)().m(function t(a,e){var i,r,s,l;return(0,o.A)().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!navigator.clipboard){t.n=4;break}return t.p=1,t.n=2,navigator.clipboard.writeText(a);case 2:return t.a(2);case 3:t.p=3,t.v;case 4:r=e||(null===(i=(0,n.n)())||void 0===i?void 0:i.getRootNode())||document.body,s=r.nodeType===Node.DOCUMENT_NODE?document.body:r,(l=document.createElement("textarea")).value=a,l.setAttribute("readonly",""),l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.opacity="0",s.appendChild(l),l.select(),document.execCommand("copy"),s.removeChild(l);case 5:return t.a(2)}},t,null,[[1,3]])}));return function(a,e){return t.apply(this,arguments)}}();e.d(a,{l:function(){return r}})},66854:function(t,a,e){e.a(t,async function(t,o){try{e.r(a);var i,n,r,s,l,c,h=e(95497),u=e(28430),d=e(36854),p=e(98117),f=e(57567),b=e(25979),y=e(12463),m=e(16472),v=(e(28706),e(62062),e(18111),e(61701),e(33110),e(5506),e(26099),e(3362),e(27495),e(71761),e(15697)),_=e(57527),g=e(51209),A=e(148),w=e(16227),k=e(98747),C=(e(90507),e(73651)),z=e(95678),x=t([k,C]);[k,C]=x.then?(await x)():x;var D=function(t){function a(){var t;(0,f.A)(this,a);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return(t=(0,m.A)(this,a,[].concat(o)))._open=!1,t}return(0,y.A)(a,t),(0,b.A)(a,[{key:"showDialog",value:(o=(0,p.A)((0,d.A)().m(function t(a){return(0,d.A)().w(function(t){for(;;)switch(t.n){case 0:this._params=a,this._open=!0;case 1:return t.a(2)}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"closeDialog",value:function(){this._open=!1}},{key:"_dialogClosed",value:function(){this._params=void 0,(0,A.r)(this,"dialog-closed",{dialog:this.localName})}},{key:"showDataAsHex",value:function(t){var a;return(null!==(a=t.match(/.{2}/g))&&void 0!==a?a:[]).map(function(t){return"0x".concat(t.toUpperCase())}).join(" ")}},{key:"_copyToClipboard",value:(e=(0,p.A)((0,d.A)().m(function t(){return(0,d.A)().w(function(t){for(;;)switch(t.n){case 0:if(this._params){t.n=1;break}return t.a(2);case 1:return t.n=2,(0,w.l)(JSON.stringify(this._params.entry));case 2:(0,z.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")});case 3:return t.a(2)}},t,this)})),function(){return e.apply(this,arguments)})},{key:"render",value:function(){var t=this;return this._params?(0,_.qy)(i||(i=(0,u.A)([" <ha-dialog .open="," header-title="," @closed=","> <p> <b>","</b>: "," <br/> <b>","</b>: "," <br/> <b>","</b>: "," </p> <h3> "," </h3> <h4> ",' </h4> <table width="100%"> <tbody> '," </tbody> </table> <h4>",'</h4> <table width="100%"> <tbody> '," </tbody> </table> <h4> ",' </h4> <table width="100%"> <tbody> '," </tbody> </table> ",' <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click=',"> "," </ha-button> </ha-dialog-footer> </ha-dialog> "])),this._open,this.hass.localize("ui.panel.config.bluetooth.device_information"),this._dialogClosed,this.hass.localize("ui.panel.config.bluetooth.address"),this._params.entry.address,this.hass.localize("ui.panel.config.bluetooth.name"),this._params.entry.name,this.hass.localize("ui.panel.config.bluetooth.source"),this._params.entry.source,this.hass.localize("ui.panel.config.bluetooth.advertisement_data"),this.hass.localize("ui.panel.config.bluetooth.manufacturer_data"),Object.entries(this._params.entry.manufacturer_data).map(function(a){var e=(0,h.A)(a,2),o=e[0],i=e[1];return(0,_.qy)(n||(n=(0,u.A)([" <tr> <td><b>","</b></td> <td>","</td> </tr> "])),o,t.showDataAsHex(i))}),this.hass.localize("ui.panel.config.bluetooth.service_data"),Object.entries(this._params.entry.service_data).map(function(a){var e=(0,h.A)(a,2),o=e[0],i=e[1];return(0,_.qy)(r||(r=(0,u.A)([" <tr> <td><b>","</b></td> <td>","</td> </tr> "])),o,t.showDataAsHex(i))}),this.hass.localize("ui.panel.config.bluetooth.service_uuids"),this._params.entry.service_uuids.map(function(t){return(0,_.qy)(s||(s=(0,u.A)([" <tr> <td>","</td> </tr> "])),t)}),this._params.entry.raw?(0,_.qy)(l||(l=(0,u.A)([" <h4> ",' </h4> <div class="raw"> '," </div> "])),this.hass.localize("ui.panel.config.bluetooth.raw_advertisement"),this.showDataAsHex(this._params.entry.raw)):_.s6,this._copyToClipboard,this.hass.localize("ui.panel.config.bluetooth.copy_to_clipboard")):_.s6}}]);var e,o}(_.WF);D.styles=(0,_.AH)(c||(c=(0,u.A)([".raw{word-break:break-all;font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-s)}"]))),(0,v.Cg)([(0,g.MZ)({attribute:!1})],D.prototype,"hass",void 0),(0,v.Cg)([(0,g.wk)()],D.prototype,"_params",void 0),(0,v.Cg)([(0,g.wk)()],D.prototype,"_open",void 0),D=(0,v.Cg)([(0,g.EM)("dialog-bluetooth-device-info")],D),o()}catch(N){o(N)}})}}]);
//# sourceMappingURL=35627.3dcfb601260027d6.js.map