2 lines
No EOL
12 KiB
JavaScript
2 lines
No EOL
12 KiB
JavaScript
"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([[8370],{23860:function(t,i,e){e.r(i);var n,o,a,r,s=e(93359),c=e(88962),d=e(33368),l=e(71650),u=e(68308),h=e(82390),f=e(69205),v=e(91808),p=(e(97393),e(5095)),y=e(95260),b=e(53180),k=e(18394),g=(e(54371),e(37662),{info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"});(0,v.Z)([(0,y.Mo)("ha-alert")],(function(t,i){var e=function(i){function e(){var i;(0,l.Z)(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return i=(0,u.Z)(this,e,[].concat(o)),t((0,h.Z)(i)),i}return(0,f.Z)(e,i),(0,d.Z)(e)}(i);return{F:e,d:[{kind:"field",decorators:[(0,y.Cb)()],key:"title",value:function(){return""}},{kind:"field",decorators:[(0,y.Cb)({attribute:"alert-type"})],key:"alertType",value:function(){return"info"}},{kind:"field",decorators:[(0,y.Cb)({type:Boolean})],key:"dismissable",value:function(){return!1}},{kind:"method",key:"render",value:function(){return(0,p.dy)(n||(n=(0,c.Z)([' <div class="issue-type ','" role="alert"> <div class="icon ','"> <slot name="icon"> <ha-svg-icon .path="','"></ha-svg-icon> </slot> </div> <div class="content"> <div class="main-content"> ',' <slot></slot> </div> <div class="action"> <slot name="action"> '," </slot> </div> </div> </div> "])),(0,b.$)((0,s.Z)({},this.alertType,!0)),this.title?"":"no-title",g[this.alertType],this.title?(0,p.dy)(o||(o=(0,c.Z)(['<div class="title">',"</div>"])),this.title):"",this.dismissable?(0,p.dy)(a||(a=(0,c.Z)(['<ha-icon-button @click="','" label="Dismiss alert" .path="','"></ha-icon-button>'])),this._dismiss_clicked,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):"")}},{kind:"method",key:"_dismiss_clicked",value:function(){(0,k.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value:function(){return(0,p.iv)(r||(r=(0,c.Z)(['.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0;direction:var(--direction)}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}'])))}}]}}),p.oi)},33358:function(t,i,e){e.r(i),e.d(i,{HaIconButtonArrowPrev:function(){return v}});var n,o=e(88962),a=e(33368),r=e(71650),s=e(68308),c=e(82390),d=e(69205),l=e(91808),u=(e(97393),e(5095)),h=e(95260),f=e(67684),v=(e(54371),(0,l.Z)([(0,h.Mo)("ha-icon-button-arrow-prev")],(function(t,i){var e=function(i){function e(){var i;(0,r.Z)(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return i=(0,s.Z)(this,e,[].concat(o)),t((0,c.Z)(i)),i}return(0,d.Z)(e,i),(0,a.Z)(e)}(i);return{F:e,d:[{kind:"field",decorators:[(0,h.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,h.Cb)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,h.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,h.SB)()],key:"_icon",value:function(){return"rtl"===f.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},{kind:"method",key:"render",value:function(){var t;return(0,u.dy)(n||(n=(0,o.Z)([' <ha-icon-button .disabled="','" .label="','" .path="','"></ha-icon-button> '])),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon)}}]}}),u.oi))},54371:function(t,i,e){e.r(i),e.d(i,{HaIconButton:function(){return b}});var n,o,a,r,s=e(88962),c=e(33368),d=e(71650),l=e(68308),u=e(82390),h=e(69205),f=e(91808),v=(e(97393),e(20210),e(5095)),p=e(95260),y=e(10694),b=(e(37662),(0,f.Z)([(0,p.Mo)("ha-icon-button")],(function(t,i){var e=function(i){function e(){var i;(0,d.Z)(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return i=(0,l.Z)(this,e,[].concat(o)),t((0,u.Z)(i)),i}return(0,h.Z)(e,i),(0,c.Z)(e)}(i);return{F:e,d:[{kind:"field",decorators:[(0,p.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,p.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,p.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,p.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,p.Cb)({type:Boolean})],key:"hideTitle",value:function(){return!1}},{kind:"field",decorators:[(0,p.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){var t;null===(t=this._button)||void 0===t||t.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value:function(){return{mode:"open",delegatesFocus:!0}}},{kind:"method",key:"render",value:function(){return(0,v.dy)(n||(n=(0,s.Z)([' <mwc-icon-button aria-label="','" title="','" aria-haspopup="','" .disabled="','"> '," </mwc-icon-button> "])),(0,y.o)(this.label),(0,y.o)(this.hideTitle?void 0:this.label),(0,y.o)(this.ariaHasPopup),this.disabled,this.path?(0,v.dy)(o||(o=(0,s.Z)(['<ha-svg-icon .path="','"></ha-svg-icon>'])),this.path):(0,v.dy)(a||(a=(0,s.Z)(["<slot></slot>"]))))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,v.iv)(r||(r=(0,s.Z)([":host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}"])))}}]}}),v.oi))},73957:function(t,i,e){var n,o,a,r=e(88962),s=e(33368),c=e(71650),d=e(68308),l=e(82390),u=e(69205),h=e(91808),f=e(34541),v=e(47838),p=(e(97393),e(76843),e(51467),e(5095)),y=e(95260),b=e(18394),k=(e(65974),e(85717),e(10733),function(){function t(){(0,c.Z)(this,t),this.notifications=void 0,this.notifications={}}return(0,s.Z)(t,[{key:"processMessage",value:function(t){if("removed"===t.type)for(var i=0,e=Object.keys(t.notifications);i<e.length;i++){var n=e[i];delete this.notifications[n]}else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}}]),t}());e(54371),(0,h.Z)([(0,y.Mo)("ha-menu-button")],(function(t,i){var e=function(i){function e(){var i;(0,c.Z)(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return i=(0,d.Z)(this,e,[].concat(o)),t((0,l.Z)(i)),i}return(0,u.Z)(e,i),(0,s.Z)(e)}(i);return{F:e,d:[{kind:"field",decorators:[(0,y.Cb)({type:Boolean})],key:"hassio",value:function(){return!1}},{kind:"field",decorators:[(0,y.Cb)({type:Boolean})],key:"narrow",value:function(){return!1}},{kind:"field",decorators:[(0,y.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,y.SB)()],key:"_hasNotifications",value:function(){return!1}},{kind:"field",decorators:[(0,y.SB)()],key:"_show",value:function(){return!1}},{kind:"field",key:"_alwaysVisible",value:function(){return!1}},{kind:"field",key:"_attachNotifOnConnect",value:function(){return!1}},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,f.Z)((0,v.Z)(e.prototype),"connectedCallback",this).call(this),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,f.Z)((0,v.Z)(e.prototype),"disconnectedCallback",this).call(this),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return p.Ld;var t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,p.dy)(n||(n=(0,r.Z)([' <ha-icon-button .label="','" .path="','" @click="','"></ha-icon-button> '," "])),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,t?(0,p.dy)(o||(o=(0,r.Z)(['<div class="dot"></div>']))):"")}},{kind:"method",key:"firstUpdated",value:function(t){(0,f.Z)((0,v.Z)(e.prototype),"firstUpdated",this).call(this,t),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(t){if((0,f.Z)((0,v.Z)(e.prototype),"willUpdate",this).call(this,t),t.has("narrow")||t.has("hass")){var i=t.has("hass")?t.get("hass"):this.hass,n=(t.has("narrow")?t.get("narrow"):this.narrow)||"always_hidden"===(null==i?void 0:i.dockedSidebar),o=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&n===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}}},{kind:"method",key:"_subscribeNotifications",value:function(){var t,i,e,n,o=this;if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(t=this.hass.connection,i=function(t){o._hasNotifications=t.length>0},e=new k,n=t.subscribeMessage((function(t){return i(e.processMessage(t))}),{type:"persistent_notification/subscribe"}),function(){n.then((function(t){return null==t?void 0:t()}))})}},{kind:"method",key:"_toggleMenu",value:function(){(0,b.B)(this,"hass-toggle-menu")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,p.iv)(a||(a=(0,r.Z)([":host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;border-radius:50%;border:2px solid var(--app-header-background-color)}"])))}}]}}),p.oi)},37662:function(t,i,e){e.r(i),e.d(i,{HaSvgIcon:function(){return y}});var n,o,a,r,s=e(88962),c=e(33368),d=e(71650),l=e(68308),u=e(82390),h=e(69205),f=e(91808),v=(e(97393),e(5095)),p=e(95260),y=(0,f.Z)([(0,p.Mo)("ha-svg-icon")],(function(t,i){var e=function(i){function e(){var i;(0,d.Z)(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return i=(0,l.Z)(this,e,[].concat(o)),t((0,u.Z)(i)),i}return(0,h.Z)(e,i),(0,c.Z)(e)}(i);return{F:e,d:[{kind:"field",decorators:[(0,p.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,p.Cb)()],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,p.Cb)()],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,v.YP)(n||(n=(0,s.Z)([' <svg viewBox="','" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> '," "," </g> </svg>"])),this.viewBox||"0 0 24 24",this.path?(0,v.YP)(o||(o=(0,s.Z)(['<path class="primary-path" d="','"></path>'])),this.path):v.Ld,this.secondaryPath?(0,v.YP)(a||(a=(0,s.Z)(['<path class="secondary-path" d="','"></path>'])),this.secondaryPath):v.Ld)}},{kind:"get",static:!0,key:"styles",value:function(){return(0,v.iv)(r||(r=(0,s.Z)([":host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}"])))}}]}}),v.oi)}}]);
|
|
//# sourceMappingURL=8370.z6Z9kOJJPww.js.map
|