/*! For license information please see 33970.07aa921a33cddee6.js.LICENSE.txt */
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["33970"],{11896:function(t,e,o){o.d(e,{u:function(){return g}});o(62953);var a=o(40445),i=o(71714),r=o(96196),n=o(77845),l=o(94333),d=o(32288),s=o(60893);let h,p,c=t=>t;const u={fromAttribute(t){return null!==t&&(""===t||t)},toAttribute(t){return"boolean"==typeof t?t?"":null:t}};class g extends i.J{render(){const t=this.charCounter&&-1!==this.maxLength,e=t&&"internal"===this.charCounter,o=t&&!e,a=!!this.helper||!!this.validationMessage||o,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--end-aligned":this.endAligned,"mdc-text-field--with-internal-counter":e};return(0,r.qy)(h||(h=c` <label class="mdc-text-field mdc-text-field--textarea ${0}"> ${0} ${0} ${0} ${0} ${0} </label> ${0} `),(0,l.H)(i),this.renderRipple(),this.outlined?this.renderOutline():this.renderLabel(),this.renderInput(),this.renderCharCounter(e),this.renderLineRipple(),this.renderHelperText(a,o))}renderInput(){const t=this.label?"label":void 0,e=-1===this.minLength?void 0:this.minLength,o=-1===this.maxLength?void 0:this.maxLength,a=this.autocapitalize?this.autocapitalize:void 0;return(0,r.qy)(p||(p=c` <textarea aria-labelledby="${0}" class="mdc-text-field__input" .value="${0}" rows="${0}" cols="${0}" ?disabled="${0}" placeholder="${0}" ?required="${0}" ?readonly="${0}" minlength="${0}" maxlength="${0}" name="${0}" inputmode="${0}" autocapitalize="${0}" @input="${0}" @blur="${0}">
      </textarea>`),(0,d.J)(t),(0,s.V)(this.value),this.rows,this.cols,this.disabled,this.placeholder,this.required,this.readOnly,(0,d.J)(e),(0,d.J)(o),(0,d.J)(""===this.name?void 0:this.name),(0,d.J)(this.inputMode),(0,d.J)(a),this.handleInputChange,this.onInputBlur)}constructor(){super(...arguments),this.rows=2,this.cols=20,this.charCounter=!1}}(0,a.Cg)([(0,n.P)("textarea")],g.prototype,"formElement",void 0),(0,a.Cg)([(0,n.MZ)({type:Number})],g.prototype,"rows",void 0),(0,a.Cg)([(0,n.MZ)({type:Number})],g.prototype,"cols",void 0),(0,a.Cg)([(0,n.MZ)({converter:u})],g.prototype,"charCounter",void 0)},75057:function(t,e,o){o.d(e,{R:function(){return i}});let a;const i=(0,o(96196).AH)(a||(a=(t=>t)`.mdc-text-field{height:100%}.mdc-text-field__input{resize:none}`))},56304:function(t,e,o){o(62953);var a=o(40445),i=o(11896),r=o(92347),n=o(75057),l=o(96196),d=o(77845);let s;class h extends i.u{updated(t){super.updated(t),this.autogrow&&t.has("value")&&(this.mdcRoot.dataset.value=this.value+'=​"')}constructor(...t){super(...t),this.autogrow=!1}}h.styles=[r.R,n.R,(0,l.AH)(s||(s=(t=>t)`: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,d.MZ)({type:Boolean,reflect:!0})],h.prototype,"autogrow",void 0),h=(0,a.Cg)([(0,d.EM)("ha-textarea")],h)},40169:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{DialogSupportPackage:function(){return w}});o(3362),o(62953);var i=o(40445),r=o(96196),n=o(77845),l=o(1087),d=o(38962),s=o(18350),h=(o(93444),o(69709),o(72554)),p=o(606),c=o(65829),u=(o(56304),o(71117)),g=o(30039),m=t([d,s,h,p,c]);[d,s,h,p,c]=m.then?(await m)():m;let b,x,f,v,y=t=>t;class w extends r.WF{showDialog(){this._open=!0,this._loadSupportPackage()}_dialogClosed(){this._open=!1,this._supportPackage=void 0,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}closeDialog(){return this._open=!1,!0}render(){return(0,r.qy)(b||(b=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,r.qy)(x||(x=y`<ha-markdown-element .content="${0}" breaks></ha-markdown-element>`),this._supportPackage):(0,r.qy)(f||(f=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,r.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,i.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,i.Cg)([(0,n.wk)()],w.prototype,"_open",void 0),(0,i.Cg)([(0,n.wk)()],w.prototype,"_supportPackage",void 0),w=(0,i.Cg)([(0,n.EM)("dialog-cloud-support-package")],w),a()}catch(b){a(b)}})},30039:function(t,e,o){o.d(e,{R:function(){return a}});const a=(t,e="")=>{const o=document.createElement("a");o.target="_blank",o.href=t,o.download=e,o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click")),document.body.removeChild(o)}}}]);
//# sourceMappingURL=33970.07aa921a33cddee6.js.map