iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
11 lines • 25.1 kB
JavaScript
/*! For license information please see 98672.92ef36abf2990ad7.js.LICENSE.txt */
export const __rspack_esm_id=98672;export const __rspack_esm_ids=[98672];export const __webpack_modules__={48078(t,e,a){a(18111),a(18237);var i=a(62826),s=a(5124),r=a(22441),o=a(6412);class n extends s.WF{render(){return s.qy` <div class="container ${(0,o.H)({faded:!this._contentShown})}" style="${this._contentShown?"":`max-height: ${this.fadedHeight}px`}" ="${this._showContent}"> <slot -resize="${this._setShowContent}"></slot> </div> `}get _slottedHeight(){return(this.shadowRoot.querySelector(".container")?.firstElementChild).assignedElements().reduce((t,e)=>t+e.offsetHeight,0)||0}_setShowContent(){const t=this._slottedHeight;this._contentShown=0!==t&&t<=this.fadedHeight+50}firstUpdated(t){super.firstUpdated(t),this._setShowContent()}_showContent(){this._contentShown=!0}constructor(...t){super(...t),this.fadedHeight=102,this._contentShown=!1}}n.styles=s.AH`.container{display:block;height:auto;cursor:default}.faded{cursor:pointer;-webkit-mask-image:linear-gradient(to bottom,black 25%,transparent 100%);mask-image:linear-gradient(to bottom,black 25%,transparent 100%);overflow-y:hidden}`,(0,i.Cg)([(0,r.MZ)({type:Number,attribute:"faded-height"})],n.prototype,"fadedHeight",void 0),(0,i.Cg)([(0,r.wk)()],n.prototype,"_contentShown",void 0),n=(0,i.Cg)([(0,r.EM)("ha-faded")],n)},83892(t,e,a){a.d(e,{x:()=>n});a(18111),a(13579);var i=a(62826),s=a(92070),r=a(5124),o=a(22441);class n extends r.WF{_onSlotChange(t){return e=>{const a=e.target.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==t.textContent?.trim());"start"===t?this._hasStart=a:this._hasEnd=a}}render(){return this._renderBase(this._renderInner())}_renderBase(t){return r.qy`<div part="base" class="base" id="item">${t}</div>`}_renderInner(){const t=this._slotController.test("content");return r.qy` <div part="start" class="start" ?hidden="${!this._hasStart}"> <slot name="start" ="${this._onSlotChange("start")}"></slot> </div> <div part="content" class="content"> ${t?r.qy`<slot name="content"></slot>`:this._renderDefaultContent()} </div> <div part="end" class="end" ?hidden="${!this._hasEnd}"> <slot name="end" ="${this._onSlotChange("end")}"></slot> </div> `}_renderDefaultContent(){const t=this._slotController.test("headline"),e=this._slotController.test("supporting-text"),a=t||void 0!==this.headline,i=e||void 0!==this.supportingText;return r.qy` ${a?r.qy`<div part="headline" class="headline"> <slot name="headline">${this.headline??r.s6}</slot> </div>`:r.s6} ${i?r.qy`<div part="supporting-text" class="supporting"> <slot name="supporting-text">${this.supportingText??r.s6}</slot> </div>`:r.s6} `}constructor(...t){super(...t),this.disabled=!1,this._slotController=new s.X(this,"headline","supporting-text","content"),this._hasStart=!1,this._hasEnd=!1}}n.styles=r.AH`:host{display:block;color:var(--primary-text-color);font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal)}:host([disabled]){color:var(--disabled-text-color);pointer-events:none}.base{position:relative;display:flex;flex-direction:row;align-items:center;gap:var(--ha-row-item-gap,var(--ha-space-4));padding-block:var(--ha-row-item-padding-block,var(--ha-space-3));padding-inline:var(--ha-row-item-padding-inline,var(--ha-space-4));min-height:var(--ha-row-item-min-height,48px);box-sizing:border-box}.content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center}.end,.start{display:flex;align-items:center;flex:0 0 auto}.end[hidden],.start[hidden]{display:none}.headline{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.supporting{color:var(--secondary-text-color);font-size:var(--ha-font-size-s);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`,(0,i.Cg)([(0,o.MZ)({type:String})],n.prototype,"headline",void 0),(0,i.Cg)([(0,o.MZ)({type:String,attribute:"supporting-text"})],n.prototype,"supportingText",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),(0,i.Cg)([(0,o.wk)()],n.prototype,"_hasStart",void 0),(0,i.Cg)([(0,o.wk)()],n.prototype,"_hasEnd",void 0),n=(0,i.Cg)([(0,o.EM)("ha-row-item")],n)},94355(t,e,a){a.a(t,async function(t,e){try{var i=a(62826),s=a(88590),r=a(5124),o=a(22441),n=t([s]);s=(n.then?(await n)():n)[0];class c extends s.A{static get styles(){return[s.A.styles,r.AH`:host{--indicator-color:var(
--ha-progress-bar-indicator-color,
var(--ha-color-on-primary-normal)
);--track-color:var(
--ha-progress-bar-track-color,
var(--ha-color-fill-neutral-normal-hover)
);--track-height:var(--ha-progress-bar-track-height, 12px);--wa-transition-slow:var(--ha-animation-duration-slow);position:relative}.progress-bar{border-radius:var(--ha-progress-bar-border-radius,var(--ha-border-radius-pill))}.indicator{background:var(--ha-progress-bar-indicator-background,var(--indicator-color))}:host([indeterminate]) .indicator{animation:wa-progress-indeterminate var(--ha-progress-bar-animation-duration,2.5s) infinite cubic-bezier(.37,0,.63,1)} slide-highlight{0%{transform:translateX(-200%)}100%{transform:translateX(200%)}}:host([loading]:not([indeterminate])) .progress-bar::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,oklch(from var(--indicator-color) 85% c h) 50%,transparent 100%);opacity:.5;animation:slide-highlight var(--ha-progress-bar-animation-duration,2.5s) infinite cubic-bezier(.37,0,.63,1);width:50%}:host::after{--width:var(
--ha-progress-bar-indicator-highlight-width,
calc(var(--track-height) * 2)
);width:var(--width);height:var(--ha-progress-bar-indicator-highlight-height,calc(var(--track-height) * 2));content:"";position:absolute;inset-inline-start:clamp(var(--width)/ 2,var(--percentage,0%),calc(100% - var(--width)/ 2));top:50%;transform:translate(-50%,-50%);background-image:var(--ha-progress-bar-indicator-highlight-image);background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;transition:inset-inline-start var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease)}:host([indeterminate])::after{display:none}`]}constructor(...t){super(...t),this.loading=!1}}(0,i.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],c.prototype,"loading",void 0),c=(0,i.Cg)([(0,o.EM)("ha-progress-bar")],c),e()}catch(t){e(t)}})},31420(t,e,a){a.a(t,async function(t,i){try{a.d(e,{Bi:()=>L,Dt:()=>G,EB:()=>A,IW:()=>j,P_:()=>O,SG:()=>S,Sx:()=>F,T2:()=>f,Xm:()=>v,Ye:()=>m,Zm:()=>T,cq:()=>P,dH:()=>z,en:()=>V,gF:()=>k,gb:()=>y,gv:()=>q,jU:()=>N,kI:()=>E,mF:()=>B,mu:()=>C,oJ:()=>U,pI:()=>x,pL:()=>K,q5:()=>I,q7:()=>H,qk:()=>b,sp:()=>W,uM:()=>J,v3:()=>M,xN:()=>X,yL:()=>w,yj:()=>D,zZ:()=>$});a(74423),a(16573),a(78100),a(77936),a(18111),a(22489),a(20116),a(7588),a(61701),a(37467),a(44732),a(79577),a(16632),a(34226),a(9486),a(20456),a(14603),a(47566),a(98721);var s=a(22711),r=a(97732),o=a(6226),n=a(22786),c=a(80785),l=a(95747),d=a(30162);if(66649!=a.j)var h=a(36918);var p=a(30039),u=a(39889);if(66649!=a.j)var _=a(95350);var g=t([s,l,d]);[s,l,d]=g.then?(await g)():g;var b=66649!=a.j?function(t){return t.NEVER="never",t.DAILY="daily",t.CUSTOM_DAYS="custom_days",t}({}):null;const f=66649!=a.j?["mon","tue","wed","thu","fri","sat","sun"]:null,m=t=>t.sort((t,e)=>f.indexOf(t)-f.indexOf(e)),v=t=>t.callWS({type:"backup/config/info"}),y=(t,e)=>t.callWS({type:"backup/config/update",...e}),k=(t,e)=>y(t,{create_backup:{agent_ids:e.create_backup.agent_ids,include_folders:e.create_backup.include_folders??[],include_database:e.create_backup.include_database,include_addons:e.create_backup.include_addons??[],include_all_addons:e.create_backup.include_all_addons,password:e.create_backup.password},retention:e.retention,schedule:e.schedule}),w=(t,e,a)=>`/api/backup/download/${t}?agent_id=${e}${a?`&password=${a}`:""}`,x=t=>t.callWS({type:"backup/info"}),$=(t,e)=>t.callWS({type:"backup/details",backup_id:e}),O=t=>t.callWS({type:"backup/agents/info"}),C=(t,e)=>t.callWS({type:"backup/delete",backup_id:e}),S=(t,e)=>t.callWS({type:"backup/generate",...e}),j=t=>t.callWS({type:"backup/generate_with_automatic_settings"}),z=(t,e)=>t.callWS({type:"backup/restore",...e}),E=async(t,e,a)=>{const i=new FormData;i.append("file",e);const s=new URLSearchParams;return a.forEach(t=>{s.append("agent_id",t)}),(0,u.QE)(t.fetchWithAuth(`/api/backup/upload?${s.toString()}`,{method:"POST",body:i}))},A=t=>{const e=t.find(L);if(e)return e;const a=t.find(N);return a||t[0]},T=(t,e,a,i)=>t.callWS({type:"backup/can_decrypt_on_download",backup_id:e,agent_id:a,password:i}),q="backup.local",B="hassio.local",U="cloud.cloud",L=t=>[q,B].includes(t),N=t=>{const[e,a]=t.split(".");return"hassio"===e&&"local"!==a},H=(t,e,a)=>{if(L(e))return t("ui.panel.config.backup.agents.local_agent");const i=a.find(t=>t.agent_id===e),s=e.split(".")[0],r=i?i.name:e.split(".")[1];if(N(e))return r;const o=(0,_.p$)(t,s);return a.filter(t=>t.agent_id.split(".")[0]===s).length>1?`${o}: ${r}`:o},M=t=>Math.max(...Object.values(t.agents).map(t=>t.size)),R=["automatic","app_update","manual"],I=(0,s.z)(t=>t?R:R.filter(t=>"app_update"!==t)),W=(t,e)=>t.with_automatic_settings?"automatic":!e||null==t.extra_metadata?.["supervisor.addon_update"]&&null==t.extra_metadata?.["supervisor.app_update"]?"manual":"app_update",D=(t,e)=>{const a=L(t),i=L(e),s=N(t),r=N(e),o=(t,e)=>t?1:e?2:3,n=o(a,s),c=o(i,r);return n!==c?n-c:t.localeCompare(e)},P=()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",e="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx";let a="";const i=new Uint8Array(34);return crypto.getRandomValues(i),i.forEach((i,s)=>{a+="-"===e[s]?"-":t[i%36]}),a},Z=(t,e)=>"data:text/plain;charset=utf-8,"+encodeURIComponent(`${t.localize("ui.panel.config.backup.emergency_kit_file.title")}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.description")}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.date")} ${(0,l.r6)(new Date,t.locale,t.config)}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.instance")}\n${t.config.location_name}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.url")}\n${t.auth.data.hassUrl}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.encryption_key")}\n${e}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.more_info",{link:(0,h.o)(t,"/more-info/backup-emergency-kit")})}`),Y=(t,e)=>`home_assistant_backup_emergency_kit_${e?`${e}_`:""}${(0,l.GH)(new Date,t.locale,t.config).replace(",","").replace(" ","_")}.txt`,F=(t,e,a)=>(0,p.R)(Z(t,e),Y(t,a)),J=(0,r.g)((0,o.a)(new Date,4),45),K=(0,r.g)((0,o.a)(new Date,5),45),V=(0,n.A)((t,e,a)=>{if((0,c.A)(a))return(0,d.fU)(a,t,e);if("string"==typeof a&&a){const i=a.split(":"),s=(0,r.g)((0,o.a)(new Date,parseInt(i[0])),parseInt(i[1]));return(0,d.fU)(s,t,e)}return`${(0,d.fU)(J,t,e)} - ${(0,d.fU)(K,t,e)}`}),X="application/x-tar",G=66649!=a.j?{file:void 0}:null;i()}catch(t){i(t)}})},6810(t,e,a){a.d(e,{c:()=>r});const i=async(t,e,a,s,r,...o)=>{const n=r,c=n[t],l=c=>s&&s(r,c.result)!==c.cacheKey?(n[t]=void 0,i(t,e,a,s,r,...o)):c.result;if(c)return c instanceof Promise?c.then(l):l(c);const d=a(r,...o);return n[t]=d,d.then(a=>{n[t]={result:a,cacheKey:s?.(r,a)},setTimeout(()=>{n[t]=void 0},e)},()=>{n[t]=void 0}),d},s=t=>t.callWS({type:"entity/source"}),r=t=>i("_entitySources",3e4,s,t=>Object.keys(t.states).length,t)},16869(t,e,a){a.d(e,{B:()=>s,g:()=>i});a(74423);const i=window.externalAppV2||window.externalApp||window.webkit?.messageHandlers?.getExternalAuth||location.search.includes("external_auth=1"),s=window.externalApp||window.externalAppV2},26581(t,e,a){a.d(e,{r:()=>s,y:()=>i});const i=async t=>t.callWS({type:"hassio/update/config/info"}),s=async(t,e)=>t.callWS({type:"hassio/update/config/update",...e})},1843(t,e,a){a.a(t,async function(t,i){try{a.r(e);a(74423);var s=a(62826),r=a(5124),o=a(22441),n=a(36312),c=(a(46190),a(98975)),l=a(82286),d=a(89300),h=a(38962),p=a(18350),u=(a(48078),a(3587),a(65829)),_=a(59646),g=(a(83892),a(94355)),b=a(31420),f=a(22675),m=a(6810),v=a(26581),y=a(24247),k=a(65063),w=t([d,h,p,u,_,g,b,c,y]);[d,h,p,u,_,g,b,c,y]=w.then?(await w)():w;class x extends r.WF{async _fetchBackupConfig(){try{const{config:t}=await(0,b.Xm)(this.hass);this._backupConfig=t}catch(t){console.error(t)}}async _fetchUpdateBackupConfig(t){try{const e=await(0,v.y)(this.hass);if(this._isHaOrOsUpdate(t))return void(this._createBackup=e.core_backup_before_update);"addon"===t&&(this._createBackup=e.add_on_backup_before_update)}catch(t){console.error(t)}}async _fetchEntitySources(){this._entitySources=await(0,m.c)(this.hass)}_isHaOrOsUpdate(t){return["home_assistant","home_assistant_os"].includes(t)}_computeCreateBackupTexts(){if(!this.stateObj||!(0,l.$)(this.stateObj,y.TY.BACKUP))return;const t=this._entitySources?(0,y.mj)(this.stateObj,this._entitySources):"generic";if(this._isHaOrOsUpdate(t)){if(!(!!this._backupConfig&&!!this._backupConfig.automatic_backups_configured&&!!this._backupConfig.create_backup.password&&this._backupConfig.create_backup.agent_ids.length>0))return{title:this.hass.localize("ui.dialogs.more_info_control.update.create_backup.manual"),description:this.hass.localize("ui.dialogs.more_info_control.update.create_backup.manual_description")};const t=this._backupConfig?.last_completed_automatic_backup?new Date(this._backupConfig?.last_completed_automatic_backup):null,e=new Date;return{title:this.hass.localize("ui.dialogs.more_info_control.update.create_backup.automatic"),description:t?this.hass.localize("ui.dialogs.more_info_control.update.create_backup.automatic_description_last",{relative_time:(0,c.K)(t,this.hass.locale,e,!0)}):this.hass.localize("ui.dialogs.more_info_control.update.create_backup.automatic_description_none")}}if("addon"===t){const t=this.stateObj.attributes.installed_version;return{title:this.hass.localize("ui.dialogs.more_info_control.update.create_backup.app"),description:t?this.hass.localize("ui.dialogs.more_info_control.update.create_backup.app_description",{version:t}):void 0}}return{title:this.hass.localize("ui.dialogs.more_info_control.update.create_backup.generic")}}render(){if(!this.hass||!this.stateObj||this.stateObj.state===f.Hh||this.stateObj.state===f.HV)return r.s6;const t=this._computeCreateBackupTexts();return r.qy` <div class="content"> <div class="summary"> ${this.stateObj.attributes.in_progress?(0,l.$)(this.stateObj,y.TY.PROGRESS)&&null!==this.stateObj.attributes.update_percentage?r.qy`<ha-progress-bar loading .value="${this.stateObj.attributes.update_percentage}"></ha-progress-bar>`:r.qy`<ha-progress-bar indeterminate></ha-progress-bar>`:r.s6} <h3>${this.stateObj.attributes.title}</h3> ${this._error?r.qy`<ha-alert alert-type="error">${this._error}</ha-alert>`:r.s6} <div class="row"> <div class="key"> ${this.hass.formatEntityAttributeName(this.stateObj,"installed_version")} </div> <div class="value"> ${this.stateObj.attributes.installed_version??this.hass.localize("state.default.unavailable")} </div> </div> <div class="row"> <div class="key"> ${this.hass.formatEntityAttributeName(this.stateObj,"latest_version")} </div> <div class="value"> ${this.stateObj.attributes.latest_version??this.hass.localize("state.default.unavailable")} </div> </div> ${this.stateObj.attributes.release_url?r.qy`<div class="row"> <div class="key"> <a href="${this.stateObj.attributes.release_url}" target="_blank" rel="noreferrer"> ${this.hass.localize("ui.dialogs.more_info_control.update.release_announcement")} </a> </div> </div>`:r.s6} </div> ${(0,l.$)(this.stateObj,y.TY.RELEASE_NOTES)&&!this._error?void 0===this._releaseNotes?r.qy` <hr> ${this._markdownLoading?this._renderLoader():r.s6} `:this._releaseNotes?r.qy` <hr> <ha-markdown -resize="${this._markdownLoaded}" .content="${this._releaseNotes}" class="${this._markdownLoading?"hidden":""}"></ha-markdown> ${this._markdownLoading?this._renderLoader():r.s6} `:r.s6:this.stateObj.attributes.release_summary?r.qy` <hr> <ha-markdown -resize="${this._markdownLoaded}" .content="${this.stateObj.attributes.release_summary}" class="${this._markdownLoading?"hidden":""}"></ha-markdown> ${this._markdownLoading?this._renderLoader():r.s6} `:r.s6} </div> <div class="footer"> ${t?r.qy` <ha-row-item> <span slot="headline">${t.title}</span> ${t.description?r.qy` <span slot="supporting-text"> ${t.description} </span> `:r.s6} <ha-switch slot="end" .checked="${this._createBackup}" ="${this._createBackupChanged}" .disabled="${(0,y.Jy)(this.stateObj)}"></ha-switch> </ha-row-item> `:r.s6} <div class="actions"> ${"off"===this.stateObj.state&&this.stateObj.attributes.skipped_version?r.qy` <ha-button appearance="plain" ="${this._handleClearSkipped}"> ${this.hass.localize("ui.dialogs.more_info_control.update.clear_skipped")} </ha-button> `:r.qy` <ha-button appearance="plain" ="${this._handleSkip}" .disabled="${(0,y.IC)(this.stateObj)||"off"===this.stateObj.state||(0,y.Jy)(this.stateObj)}"> ${this.hass.localize("ui.dialogs.more_info_control.update.skip")} </ha-button> `} ${(0,l.$)(this.stateObj,y.TY.INSTALL)?r.qy` <ha-button ="${this._handleInstall}" .loading="${(0,y.Jy)(this.stateObj)}" .disabled="${(0,y.od)(this.stateObj)}"> ${this.hass.localize("ui.dialogs.more_info_control.update.update")} </ha-button> `:r.s6} </div> </div> `}_renderLoader(){return r.qy` <div class="flex center loader"> <ha-spinner></ha-spinner> </div> `}firstUpdated(){(0,l.$)(this.stateObj,y.TY.RELEASE_NOTES)&&this._fetchReleaseNotes(),(0,l.$)(this.stateObj,y.TY.BACKUP)&&this._fetchEntitySources().then(()=>{const t=(0,y.mj)(this.stateObj,this._entitySources);(0,n.x)(this.hass.config,"hassio")&&["addon","home_assistant","home_assistant_os"].includes(t)&&this._fetchUpdateBackupConfig(t),this._isHaOrOsUpdate(t)&&this._fetchBackupConfig()})}async _markdownLoaded(){this._markdownLoading&&(this._markdownLoading=!1)}async _fetchReleaseNotes(){try{this._releaseNotes=await(0,y.ev)(this.hass,this.stateObj.entity_id)}catch(t){this._error=t.message}}get _shouldCreateBackup(){return!!(0,l.$)(this.stateObj,y.TY.BACKUP)&&this._createBackup}_handleInstall(){const t={entity_id:this.stateObj.entity_id};this._shouldCreateBackup&&(t.backup=!0),(0,l.$)(this.stateObj,y.TY.SPECIFIC_VERSION)&&this.stateObj.attributes.latest_version&&(t.version=this.stateObj.attributes.latest_version),this.hass.callService("update","install",t)}_createBackupChanged(t){this._createBackup=t.target.checked}_handleSkip(){this.stateObj.attributes.auto_update?(0,k.showAlertDialog)(this,{title:this.hass.localize("ui.dialogs.more_info_control.update.auto_update_enabled_title"),text:this.hass.localize("ui.dialogs.more_info_control.update.auto_update_enabled_text")}):this.hass.callService("update","skip",{entity_id:this.stateObj.entity_id})}_handleClearSkipped(){this.hass.callService("update","clear_skipped",{entity_id:this.stateObj.entity_id})}constructor(...t){super(...t),this._markdownLoading=!0,this._createBackup=!1}}x.styles=r.AH`:host{display:flex;flex-direction:column;flex:1;justify-content:space-between}hr{border-color:var(--divider-color);border-bottom:none;margin:var(--ha-space-4) 0}ha-expansion-panel{margin:var(--ha-space-4) 0}.summary{margin-bottom:var(--ha-space-4)}.row{margin:0;display:flex;flex-direction:row;justify-content:space-between}.footer{border-top:1px solid var(--divider-color);background:var(--ha-dialog-surface-background,var(--mdc-theme-surface,#fff));position:sticky;bottom:0;margin:0 calc(var(--ha-space-6) * -1) 0 calc(var(--ha-space-6) * -1);margin-bottom:calc(-1 * max(var(--safe-area-inset-bottom),var(--ha-space-6)));box-sizing:border-box;display:flex;flex-direction:column;align-items:center;overflow:hidden;z-index:10}ha-row-item{width:100%;--ha-row-item-padding-inline:var(--ha-space-6)}.actions{width:100%;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;box-sizing:border-box;padding:var(--ha-space-4);z-index:1;gap:var(--ha-space-2)}a{color:var(--primary-color)}.flex.center{display:flex;justify-content:center;align-items:center}ha-markdown{direction:ltr;padding-bottom:var(--ha-space-4);box-sizing:border-box}ha-markdown.hidden{display:none}.loader{height:80px;box-sizing:border-box;padding-bottom:var(--ha-space-4)}`,(0,s.Cg)([(0,o.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],x.prototype,"stateObj",void 0),(0,s.Cg)([(0,o.wk)()],x.prototype,"_releaseNotes",void 0),(0,s.Cg)([(0,o.wk)()],x.prototype,"_error",void 0),(0,s.Cg)([(0,o.wk)()],x.prototype,"_markdownLoading",void 0),(0,s.Cg)([(0,o.wk)()],x.prototype,"_backupConfig",void 0),(0,s.Cg)([(0,o.wk)()],x.prototype,"_createBackup",void 0),(0,s.Cg)([(0,o.wk)()],x.prototype,"_entitySources",void 0),x=(0,s.Cg)([(0,o.EM)("more-info-update")],x),i()}catch(t){i(t)}})},26528(t,e,a){a.d(e,{v:()=>i});const i=async(t,e,a={})=>(t.expired&&await t.refreshAccessToken(),a.credentials="same-origin",a.headers||(a.headers={}),a.headers||(a.headers={}),a.headers.authorization=`Bearer ${t.accessToken}`,fetch(e,a))},30039(t,e,a){a.d(e,{R:()=>s});a(14603),a(47566),a(98721);var i=a(16869);const s=(t,e="")=>{const a=document.createElement("a");a.target="_blank",a.href=t,a.download=e,a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),t.startsWith("blob:")&&(i.B?setTimeout(()=>URL.revokeObjectURL(t),1e4):URL.revokeObjectURL(t))}},39889(t,e,a){a.d(e,{Ay:()=>r,QE:()=>s,qB:()=>o});a(74423),a(33110);if(66649!=a.j)var i=a(26528);const s=async t=>{let e,a;try{e=await t}catch(t){throw{error:"Request error",status_code:void 0,body:void 0}}const i=e.headers.get("content-type");if(i&&i.includes("application/json"))try{a=await e.json()}catch(t){throw{error:"Unable to parse JSON response",status_code:t.status,body:null}}else a=await e.text();if(!e.ok)throw{error:`Response error: ${e.status}`,status_code:e.status,body:a};return a};async function r(t,e,a,r,o){const n=`${t.data.hassUrl}/api/${a}`,c={method:e,headers:o||{}};return r&&(c.headers["Content-Type"]="application/json;charset=UTF-8",c.body=JSON.stringify(r)),s((0,i.v)(t,n,c))}async function o(t,e,a,s,r,o){const n=`${t.data.hassUrl}/api/${a}`,c={method:e,headers:r||{},signal:o};return s&&(c.headers["Content-Type"]="application/json;charset=UTF-8",c.body=JSON.stringify(s)),(0,i.v)(t,n,c)}},88590(t,e,a){a.a(t,async function(t,i){try{a.d(e,{A:()=>g});var s=a(5124),r=a(22441),o=a(63672),n=a(95010),c=a(717),l=a(17060),d=a(4168),h=t([l]);l=(h.then?(await h)():h)[0];var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,_=(t,e,a,i)=>{for(var s,r=i>1?void 0:i?u(e,a):e,o=t.length-1;o>=0;o--)(s=t[o])&&(r=(i?s(e,a,r):s(r))||r);return i&&r&&p(e,a,r),r};let g=class extends c.A{updated(t){t.has("value")&&requestAnimationFrame(()=>{this.style.setProperty("--percentage",`${(0,n.q)(this.value,0,100)}%`)})}render(){return s.qy` <div part="base" class="progress-bar" role="progressbar" title="${(0,o.J)(this.title)}" aria-label="${this.label.length>0?this.label:this.localize.term("progress")}" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${this.indeterminate?"0":this.value}"> <div part="indicator" class="indicator"> ${this.indeterminate?"":s.qy` <slot part="label" class="label"></slot> `} </div> </div> `}constructor(){super(...arguments),this.localize=new l.c(this),this.value=0,this.indeterminate=!1,this.label=""}};g.css=d.A,_([(0,r.MZ)({type:Number,reflect:!0})],g.prototype,"value",2),_([(0,r.MZ)({type:Boolean,reflect:!0})],g.prototype,"indeterminate",2),_([(0,r.MZ)()],g.prototype,"label",2),g=_([(0,r.EM)("wa-progress-bar")],g),i()}catch(t){i(t)}})},4168(t,e,a){a.d(e,{A:()=>i});var i=a(5124).AH`:host{--track-height:1rem;--track-color:var(--wa-color-neutral-fill-normal);--indicator-color:var(--wa-color-brand-fill-loud);display:flex}.progress-bar{flex:1 1 auto;display:flex;position:relative;overflow:hidden;height:var(--track-height);border-radius:var(--wa-border-radius-pill);background-color:var(--track-color);color:var(--wa-color-brand-on-loud);font-size:var(--wa-font-size-s)}.indicator{width:var(--percentage);display:flex;align-items:center;justify-content:center;background-color:var(--indicator-color);text-align:center;white-space:nowrap;overflow:hidden;line-height:1;font-weight:var(--wa-font-weight-semibold);transition:all var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease);user-select:none;-webkit-user-select:none}:host([indeterminate]) .indicator{position:absolute;inset-block:0;inline-size:50%;animation:wa-progress-indeterminate 2.5s infinite cubic-bezier(.37,0,.63,1)} (forced-colors:active){.progress-bar{outline:solid 1px SelectedItem;background-color:var(--wa-color-surface-default)}.indicator{outline:solid 1px SelectedItem;background-color:SelectedItem}} wa-progress-indeterminate{0%{inset-inline-start:-50%}100%,75%{inset-inline-start:100%}}`},6226(t,e,a){a.d(e,{a:()=>s});var i=a(83504);function s(t,e,a){const s=(0,i.a)(t,a?.in);return s.setHours(e),s}},97732(t,e,a){a.d(e,{g:()=>s});var i=a(83504);function s(t,e,a){const s=(0,i.a)(t,a?.in);return s.setMinutes(e),s}}};