"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["33970"],{56304:function(t,o,e){e(62953);var a=e(40445),r=e(99199),i=e(92347),n=e(75057),d=e(96196),s=e(77845);let l;class p extends r.u{updated(t){super.updated(t),this.autogrow&&t.has("value")&&(this.mdcRoot.dataset.value=this.value+'=​"')}constructor(...t){super(...t),this.autogrow=!1}}p.styles=[i.R,n.R,(0,d.AH)(l||(l=(t=>t)`:host{--mdc-text-field-fill-color:var(--ha-color-form-background)}:host([autogrow]) .mdc-text-field{position:relative;min-height:74px;min-width:178px;max-height:200px}:host([autogrow]) .mdc-text-field:after{content:attr(data-value);margin-top:23px;margin-bottom:9px;line-height:var(--ha-line-height-normal);min-height:42px;padding:0px 32px 0 16px;letter-spacing:var(
          --mdc-typography-subtitle1-letter-spacing,
          .009375em
        );visibility:hidden;white-space:pre-wrap}:host([autogrow]) .mdc-text-field__input{position:absolute;height:calc(100% - 32px)}:host([autogrow]) .mdc-text-field.mdc-text-field--no-label:after{margin-top:16px;margin-bottom:16px}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start) top}@media only screen and (min-width:459px){:host([mobile-multiline]) .mdc-text-field__input{white-space:nowrap;max-height:16px}}`))],(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],p.prototype,"autogrow",void 0),p=(0,a.Cg)([(0,s.EM)("ha-textarea")],p)},40169:function(t,o,e){e.a(t,async function(t,a){try{e.r(o),e.d(o,{DialogSupportPackage:function(){return w}});e(3362),e(62953);var r=e(40445),i=e(96196),n=e(77845),d=e(1087),s=e(38962),l=e(18350),p=(e(93444),e(69709),e(72554)),c=e(606),h=e(65829),u=(e(56304),e(71117)),g=e(30039),b=t([s,l,p,c,h]);[s,l,p,c,h]=b.then?(await b)():b;let m,f,x,v,y=t=>t;class w extends i.WF{showDialog(){this._open=!0,this._loadSupportPackage()}_dialogClosed(){this._open=!1,this._supportPackage=void 0,(0,d.r)(this,"dialog-closed",{dialog:this.localName})}closeDialog(){return this._open=!1,!0}render(){return(0,i.qy)(m||(m=y` <ha-dialog .hass="${0}" .open="${0}" width="full" header-title="Download support package" @closed="${0}"> ${0} <div slot="footer" class="footer"> <ha-alert> This file may contain personal data about your home. Avoid sharing them with unverified or untrusted parties. </ha-alert> <hr> <ha-dialog-footer> <ha-button slot="secondaryAction" appearance="plain" @click="${0}"> Close </ha-button> <ha-button slot="primaryAction" @click="${0}"> Download </ha-button> </ha-dialog-footer> </div> </ha-dialog> `),this.hass,this._open,this._dialogClosed,this._supportPackage?(0,i.qy)(f||(f=y`<ha-markdown-element .content="${0}" breaks></ha-markdown-element>`),this._supportPackage):(0,i.qy)(x||(x=y` <div class="progress-container"> <ha-spinner></ha-spinner> Generating preview... </div> `)),this.closeDialog,this._download)}async _loadSupportPackage(){this._supportPackage=await(0,u.qF)(this.hass)}async _download(){(0,g.R)("data:text/plain;charset=utf-8,"+encodeURIComponent(this._supportPackage||""),"support-package.md")}constructor(...t){super(...t),this._open=!1}}w.styles=(0,i.AH)(v||(v=y`.progress-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:calc(90vh - 260px);width:100%}.footer{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--ha-space-3);width:100%}ha-dialog-footer{display:block;width:100%}hr{border:none;border-top:1px solid var(--divider-color);width:100%;margin:0}table,td,th{border:none}table{width:100%;display:table;border-collapse:collapse;border-spacing:0}table tr{border-bottom:none}table>tbody>tr:nth-child(odd){background-color:rgba(var(--rgb-primary-text-color),.04)}table>tbody>tr>td{border-radius:var(--ha-border-radius-square)}table>tbody>tr{-webkit-transition:background-color .25s ease;transition:background-color .25s ease}table>tbody>tr:hover{background-color:rgba(var(--rgb-primary-text-color),.08)}tr{border-bottom:1px solid var(--divider-color)}td,th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-radius:var(--ha-border-radius-sm)}details{background-color:var(--secondary-background-color);padding:16px 24px;margin:8px 0;border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-xl)}summary{font-weight:var(--ha-font-weight-bold);cursor:pointer}`)),(0,r.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_open",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_supportPackage",void 0),w=(0,r.Cg)([(0,n.EM)("dialog-cloud-support-package")],w),a()}catch(m){a(m)}})},30039:function(t,o,e){e.d(o,{R:function(){return a}});const a=(t,o="")=>{const e=document.createElement("a");e.target="_blank",e.href=t,e.download=o,e.style.display="none",document.body.appendChild(e),e.dispatchEvent(new MouseEvent("click")),document.body.removeChild(e)}}}]);
//# sourceMappingURL=33970.6d6ef27ceac3c7c1.js.map