"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["39608"],{70947:function(t,e,o){o(62953);var n=o(40445),a=o(90075),r=(o(43776),o(96196)),i=o(77845);o(67094);let s,c,h=t=>t;class d extends a.A{renderCheckboxIcon(){return(0,r.qy)(s||(s=h` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,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":"M19,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,3M19,5V19H5V5H19Z")}static get styles(){return[a.A.styles,(0,r.AH)(c||(c=h`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...t){super(...t),this.selected=!1}}(0,n.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),d=(0,n.Cg)([(0,i.EM)("ha-dropdown-item")],d)},29823:function(t,e,o){o.a(t,async function(t,e){try{o(3362),o(62953);var n=o(40445),a=o(52254),r=o(96196),i=o(77845),s=t([a]);a=(s.then?(await s)():s)[0];let c,h=t=>t;class d extends a.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[a.A.styles,(0,r.AH)(c||(c=h`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
            --card-background-color,
            var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
          )}#menu{padding:var(--ha-space-1)}`))]}constructor(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,n.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"dropdownTag",void 0),(0,n.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"dropdownItemTag",void 0),d=(0,n.Cg)([(0,i.EM)("ha-dropdown")],d),e()}catch(c){e(c)}})},82e3:function(t,e,o){o.d(e,{D5:function(){return n},Fy:function(){return l},Gk:function(){return g},Hg:function(){return a},TJ:function(){return i},UQ:function(){return d},Y_:function(){return f},ds:function(){return p},e0:function(){return r},ec:function(){return u},go:function(){return c},n2:function(){return h},sq:function(){return s}});o(74423),o(18111),o(61701),o(33110),o(3362);const n=14881==o.j?`${location.protocol}//${location.host}`:null,a=t=>t.map(t=>{if("string"!==t.type)return t;switch(t.name){case"username":return{...t,autocomplete:"username",autofocus:!0};case"password":return{...t,autocomplete:"current-password"};case"code":return{...t,autocomplete:"one-time-code",autofocus:!0};default:return t}}),r=(t,e)=>t.callWS({type:"auth/sign_path",path:e}),i=()=>fetch("/auth/providers",{credentials:"same-origin"}),s=(t,e,o)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:t,handler:o,redirect_uri:e})}),c=(t,e)=>fetch(`/auth/login_flow/${t}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(e)}),h=t=>fetch(`/auth/login_flow/${t}`,{method:"DELETE",credentials:"same-origin"}),d=(t,e,o,n)=>{t.includes("?")?t.endsWith("&")||(t+="&"):t+="?",t+=`code=${encodeURIComponent(e)}`,o&&(t+=`&state=${encodeURIComponent(o)}`),n&&(t+="&storeToken=true"),document.location.assign(t)},l=async(t,e,o,n)=>t.callWS({type:"config/auth_provider/homeassistant/create",user_id:e,username:o,password:n}),u=(t,e,o)=>t.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:e,new_password:o}),p=(t,e,o)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:e,password:o}),g=(t,e,o)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:e,username:o}),f=(t,e,o)=>t.callWS({type:"auth/delete_all_refresh_tokens",token_type:e,delete_current_token:o})},58315:function(t,e,o){o.a(t,async function(t,n){try{o.r(e);o(3362),o(62953);var a=o(40445),r=o(96196),i=o(77845),s=o(29823),c=(o(70947),o(26300)),h=(o(67094),o(82e3)),d=o(81310),l=o(30039),u=o(13133),p=t([s,c,d,u]);[s,c,d,u]=p.then?(await p)():p;let g,f,m=t=>t;const y="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",v="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z";class w extends r.WF{render(){return(0,r.qy)(g||(g=m` <hass-subpage back-path="/config/system" .hass="${0}" .narrow="${0}" .header="${0}"> <ha-dropdown @wa-select="${0}" slot="toolbar-icon"> <ha-icon-button slot="trigger" .path="${0}"> </ha-icon-button> <ha-dropdown-item .value="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </ha-dropdown> <div class="content"> <ha-config-analytics .hass="${0}"></ha-config-analytics> </div> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.analytics.caption"),this._handleOverflowAction,y,"download_device_info",v,this.hass.localize("ui.panel.config.analytics.download_device_info"),this.hass)}async _handleOverflowAction(t){if("download_device_info"===t.detail.item.value){const t=await(0,h.e0)(this.hass,"/api/analytics/devices");(0,l.R)(t.path)}}constructor(...t){super(...t),this.narrow=!1}}w.styles=(0,r.AH)(f||(f=m`.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}ha-config-analytics{display:block;max-width:600px;margin:0 auto;margin-bottom:24px}`)),(0,a.Cg)([(0,i.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],w.prototype,"route",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean})],w.prototype,"narrow",void 0),w=(0,a.Cg)([(0,i.EM)("ha-config-section-analytics")],w),n()}catch(g){n(g)}})},30039:function(t,e,o){o.d(e,{R:function(){return n}});const n=(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=39608.dda68bed03c486cb.js.map