2020-04-19 11:20:24 +02:00
! function ( e ) { var t = { } ; function i ( s ) { if ( t [ s ] ) return t [ s ] . exports ; var n = t [ s ] = { i : s , l : ! 1 , exports : { } } ; return e [ s ] . call ( n . exports , n , n . exports , i ) , n . l = ! 0 , n . exports } i . m = e , i . c = t , i . d = function ( e , t , s ) { i . o ( e , t ) || Object . defineProperty ( e , t , { enumerable : ! 0 , get : s } ) } , i . r = function ( e ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( e , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) } , i . t = function ( e , t ) { if ( 1 & t && ( e = i ( e ) ) , 8 & t ) return e ; if ( 4 & t && "object" == typeof e && e && e . _ _esModule ) return e ; var s = Object . create ( null ) ; if ( i . r ( s ) , Object . defineProperty ( s , "default" , { enumerable : ! 0 , value : e } ) , 2 & t && "string" != typeof e ) for ( var n in e ) i . d ( s , n , function ( t ) { return e [ t ] } . bind ( null , n ) ) ; return s } , i . n = function ( e ) { var t = e && e . _ _esModule ? function ( ) { return e . default } : function ( ) { return e } ; return i . d ( t , "a" , t ) , t } , i . o = function ( e , t ) { return Object . prototype . hasOwnProperty . call ( e , t ) } , i . p = "" , i ( i . s = 0 ) } ( [ function ( e , t , i ) { "use strict" ; i . r ( t ) , i . d ( t , "RoomGlanceCard" , ( function ( ) { return ne } ) ) ;
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
const s = "undefined" != typeof window && null != window . customElements && void 0 !== window . customElements . polyfillWrapFlushCallback , n = ( e , t , i = null ) => { for ( ; t !== i ; ) { const i = t . nextSibling ; e . removeChild ( t ) , t = i } } , r = ` {{lit- ${ String ( Math . random ( ) ) . slice ( 2 ) } }} ` , o = ` \x 3c!-- ${ r } -- \x 3e ` , a = new RegExp ( ` ${ r } | ${ o } ` ) ; class l { constructor ( e , t ) { this . parts = [ ] , this . element = t ; const i = [ ] , s = [ ] , n = document . createTreeWalker ( t . content , 133 , null , ! 1 ) ; let o = 0 , l = - 1 , d = 0 ; const { strings : u , values : { length : m } } = e ; for ( ; d < m ; ) { const e = n . nextNode ( ) ; if ( null !== e ) { if ( l ++ , 1 === e . nodeType ) { if ( e . hasAttributes ( ) ) { const t = e . attributes , { length : i } = t ; let s = 0 ; for ( let e = 0 ; e < i ; e ++ ) c ( t [ e ] . name , "$lit$" ) && s ++ ; for ( ; s -- > 0 ; ) { const t = u [ d ] , i = p . exec ( t ) [ 2 ] , s = i . toLowerCase ( ) + "$lit$" , n = e . getAttribute ( s ) ; e . removeAttribute ( s ) ; const r = n . split ( a ) ; this . parts . push ( { type : "attribute" , index : l , name : i , strings : r } ) , d += r . length - 1 } } "TEMPLATE" === e . tagName && ( s . push ( e ) , n . currentNode = e . content ) } else if ( 3 === e . nodeType ) { const t = e . data ; if ( t . indexOf ( r ) >= 0 ) { const s = e . parentNode , n = t . split ( a ) , r = n . length - 1 ; for ( let t = 0 ; t < r ; t ++ ) { let i , r = n [ t ] ; if ( "" === r ) i = h ( ) ; else { const e = p . exec ( r ) ; null !== e && c ( e [ 2 ] , "$lit$" ) && ( r = r . slice ( 0 , e . index ) + e [ 1 ] + e [ 2 ] . slice ( 0 , - "$lit$" . length ) + e [ 3 ] ) , i = document . createTextNode ( r ) } s . insertBefore ( i , e ) , this . parts . push ( { type : "node" , index : ++ l } ) } "" === n [ r ] ? ( s . insertBefore ( h ( ) , e ) , i . push ( e ) ) : e . data = n [ r ] , d += r } } else if ( 8 === e . nodeType ) if ( e . data === r ) { const t = e . parentNode ; null !== e . previousSibling && l !== o || ( l ++ , t . insertBefore ( h ( ) , e ) ) , o = l , this . parts . push ( { type : "node" , index : l } ) , null === e . nextSibling ? e . data = "" : ( i . push ( e ) , l -- ) , d ++ } else { let t = - 1 ; for ( ; - 1 !== ( t = e . data . indexOf ( r , t + 1 ) ) ; ) this . parts . push ( { type : "node" , index : - 1 } ) , d ++ } } else n . currentNode = s . pop ( ) } for ( const e of i ) e . parentNode . removeChild ( e ) } } const c = ( e , t ) => { const i = e . length - t . length ; return i >= 0 && e . slice ( i ) === t } , d = e => - 1 !== e . index , h = ( ) => document . createComment ( "" ) , p = /([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/ ; function u ( e , t ) { const { element : { content : i } , parts : s } = e , n = document . createTreeWalker ( i , 133 , null , ! 1 ) ; let r = f ( s ) , o = s [ r ] , a = - 1 , l = 0 ; const c = [ ] ; let d = null ; for ( ; n . nextNode ( ) ; ) { a ++ ; const e = n . currentNode ; for ( e . previousSibling === d && ( d = null ) , t . has ( e ) && ( c . push ( e ) , null === d && ( d = e ) ) , null !== d && l ++ ; void 0 !== o && o . index === a ; ) o . index = null !== d ? - 1 : o . index - l , r = f ( s , r ) , o = s [ r ] } c . forEach ( e => e . parentNode . removeChild ( e ) ) } const m = e => { let t = 11 === e . nodeType ? 0 : 1 ; const i = document . createTreeWalker ( e , 133 , null , ! 1 ) ; for ( ; i . nextNode ( ) ; ) t ++ ; return t } , f = ( e , t = - 1 ) => { for ( let i = t + 1 ; i < e . length ; i ++ ) { const t = e [ i ] ; if ( d ( t ) ) return i } return - 1 } ;
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 10:52:45 +02:00
const _ = new WeakMap , g = e => "function" == typeof e && _ . has ( e ) , y = { } , v = { } ;
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
class S { constructor ( e , t , i ) { this . _ _parts = [ ] , this . template = e , this . processor = t , this . options = i } update ( e ) { let t = 0 ; for ( const i of this . _ _parts ) void 0 !== i && i . setValue ( e [ t ] ) , t ++ ; for ( const e of this . _ _parts ) void 0 !== e && e . commit ( ) } _clone ( ) { const e = s ? this . template . element . content . cloneNode ( ! 0 ) : document . importNode ( this . template . element . content , ! 0 ) , t = [ ] , i = this . template . parts , n = document . createTreeWalker ( e , 133 , null , ! 1 ) ; let r , o = 0 , a = 0 , l = n . nextNode ( ) ; for ( ; o < i . length ; ) if ( r = i [ o ] , d ( r ) ) { for ( ; a < r . index ; ) a ++ , "TEMPLATE" === l . nodeName && ( t . push ( l ) , n . currentNode = l . content ) , null === ( l = n . nextNode ( ) ) && ( n . currentNode = t . pop ( ) , l = n . nextNode ( ) ) ; if ( "node" === r . type ) { const e = this . processor . handleTextExpression ( this . options ) ; e . insertAfterNode ( l . previousSibling ) , this . _ _parts . push ( e ) } else this . _ _parts . push ( ... this . processor . handleAttributeExpressions ( l , r . name , r . strings , this . options ) ) ; o ++ } else this . _ _parts . push ( void 0 ) , o ++ ; return s && ( document . adoptNode ( e ) , customElements . upgrade ( e ) ) , e } }
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
2020-04-19 11:20:24 +02:00
* / c o n s t b = ` $ { r } ` ; c l a s s w { c o n s t r u c t o r ( e , t , i , s ) { t h i s . s t r i n g s = e , t h i s . v a l u e s = t , t h i s . t y p e = i , t h i s . p r o c e s s o r = s } g e t H T M L ( ) { c o n s t e = t h i s . s t r i n g s . l e n g t h - 1 ; l e t t = " " , i = ! 1 ; f o r ( l e t s = 0 ; s < e ; s + + ) { c o n s t e = t h i s . s t r i n g s [ s ] , n = e . l a s t I n d e x O f ( " \ x 3 c ! - - " ) ; i = ( n > - 1 | | i ) & & - 1 = = = e . i n d e x O f ( " - - \ x 3 e " , n + 1 ) ; c o n s t a = p . e x e c ( e ) ; t + = n u l l = = = a ? e + ( i ? b : o ) : e . s u b s t r ( 0 , a . i n d e x ) + a [ 1 ] + a [ 2 ] + " $ l i t $ " + a [ 3 ] + r } r e t u r n t + = t h i s . s t r i n g s [ e ] , t } g e t T e m p l a t e E l e m e n t ( ) { c o n s t e = d o c u m e n t . c r e a t e E l e m e n t ( " t e m p l a t e " ) ; r e t u r n e . i n n e r H T M L = t h i s . g e t H T M L ( ) , e } }
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
const x = e => null === e || ! ( "object" == typeof e || "function" == typeof e ) , P = e => Array . isArray ( e ) || ! ( ! e || ! e [ Symbol . iterator ] ) ; class C { constructor ( e , t , i ) { this . dirty = ! 0 , this . element = e , this . name = t , this . strings = i , this . parts = [ ] ; for ( let e = 0 ; e < i . length - 1 ; e ++ ) this . parts [ e ] = this . _createPart ( ) } _createPart ( ) { return new N ( this ) } _getValue ( ) { const e = this . strings , t = e . length - 1 ; let i = "" ; for ( let s = 0 ; s < t ; s ++ ) { i += e [ s ] ; const t = this . parts [ s ] ; if ( void 0 !== t ) { const e = t . value ; if ( x ( e ) || ! P ( e ) ) i += "string" == typeof e ? e : String ( e ) ; else for ( const t of e ) i += "string" == typeof t ? t : String ( t ) } } return i += e [ t ] , i } commit ( ) { this . dirty && ( this . dirty = ! 1 , this . element . setAttribute ( this . name , this . _getValue ( ) ) ) } } class N { constructor ( e ) { this . value = void 0 , this . committer = e } setValue ( e ) { e === y || x ( e ) && e === this . value || ( this . value = e , g ( e ) || ( this . committer . dirty = ! 0 ) ) } commit ( ) { for ( ; g ( this . value ) ; ) { const e = this . value ; this . value = y , e ( this ) } this . value !== y && this . committer . commit ( ) } } class T { constructor ( e ) { this . value = void 0 , this . _ _pendingValue = void 0 , this . options = e } appendInto ( e ) { this . startNode = e . appendChild ( h ( ) ) , this . endNode = e . appendChild ( h ( ) ) } insertAfterNode ( e ) { this . startNode = e , this . endNode = e . nextSibling } appendIntoPart ( e ) { e . _ _insert ( this . startNode = h ( ) ) , e . _ _insert ( this . endNode = h ( ) ) } insertAfterPart ( e ) { e . _ _insert ( this . startNode = h ( ) ) , this . endNode = e . endNode , e . endNode = this . startNode } setValue ( e ) { this . _ _pendingValue = e } commit ( ) { if ( null === this . startNode . parentNode ) return ; for ( ; g ( this . _ _pendingValue ) ; ) { const e = this . _ _pendingValue ; this . _ _pendingValue = y , e ( this ) } const e = this . _ _pendingValue ; e !== y && ( x ( e ) ? e !== this . value && this . _ _commitText ( e ) : e instanceof w ? this . _ _commitTemplateResult ( e ) : e instanceof Node ? this . _ _commitNode ( e ) : P ( e ) ? this . _ _commitIterable ( e ) : e === v ? ( this . value = v , this . clear ( ) ) : this . _ _commitText ( e ) ) } _ _insert ( e ) { this . endNode . parentNode . insertBefore ( e , this . endNode ) } _ _commitNode ( e ) { this . value !== e && ( this . clear ( ) , this . _ _insert ( e ) , this . value = e ) } _ _commitText ( e ) { const t = this . startNode . nextSibling , i = "string" == typeof ( e = null == e ? "" : e ) ? e : String ( e ) ; t === this . endNode . previousSibling && 3 === t . nodeType ? t . data = i : this . _ _commitNode ( document . createTextNode ( i ) ) , this . value = e } _ _commitTemplateResult ( e ) { const t = this . options . templateFactory ( e ) ; if ( this . value instanceof S && this . value . template === t ) this . value . update ( e . values ) ; else { const i = new S ( t , e . processor , this . options ) , s = i . _clone ( ) ; i . update ( e . values ) , this . _ _commitNode ( s ) , this . value = i } } _ _commitIterable ( e ) { Array . isArray ( this . value ) || ( this . value = [ ] , this . clear ( ) ) ; const t = this . value ; let i , s = 0 ; for ( const n of e ) i = t [ s ] , void 0 === i && ( i = new T ( this . options ) , t . push ( i ) , 0 === s ? i . appendIntoPart ( this ) : i . insertAfterPart ( t [ s - 1 ] ) ) , i . setValue ( n ) , i . commit ( ) , s ++ ; s < t . length && ( t . length = s , this . clear ( i && i . endNode ) ) } clear ( e = this . startNode ) { n ( this . startNode . parentNode , e . nextSibling , this . endNode ) } } class A { constructor ( e , t , i ) { if ( this . value = void 0 , this . _ _pendingValue = void 0 , 2 !== i . length || "" !== i [ 0 ] || "" !== i [ 1 ] ) throw new Error ( "Boolean attributes can only contain a single expression" ) ; this . element = e , this . name = t , this . strings = i } setValue ( e ) { this . _ _pendingValue = e } commit ( ) { for ( ; g ( this . _ _pendingValue ) ; ) { const e = this . _ _pendingValue ; this . _ _pendingValue = y , e ( this ) } if ( this . _ _pendingValue === y ) return ; const e = ! ! this . _ _pendingValue ; this . value !== e && ( e ? this . element . setAttribute ( this . name , "" ) : this . element . removeAttribute ( this . name ) , this . value = e ) , this . _ _pendingValue = y } } class E extends C { constructor ( e , t , i ) { super ( e , t , i ) , this . single = 2 === i . length && "" === i [ 0 ] && "" === i [ 1 ] } _createPart ( ) { return new k ( this ) } _getValue ( ) { return this . single ? this . parts [ 0 ] . value : super . _getValue ( ) } commit ( ) { this . dirty && ( this . dirty = ! 1 , this . element [ this . name ] = this . _getValue ( ) ) } } class k extends N { } let O = ! 1 ; ( ( ) => { try { const e = { get capture ( ) { return O = ! 0 , ! 1 } } ; window . addEventListener ( "test" , e , e ) , window . removeEventListener ( "test" , e , e ) } catch ( e ) { } } ) ( ) ; class V { constructor ( e , t , i ) { this . value = void 0 , this . _ _pendingValue = void 0 , this . element = e , this . eventName = t , this . eventContext = i , this . _ _boundHandleEvent = e => this . handleEvent ( e ) } setValue ( e ) { this . _ _pendingValue = e } commit ( ) { for ( ; g ( this . _ _pendingValue ) ; ) { const e = this . _ _pendingValue ; this . _ _pendingValue = y , e ( this ) } if ( this . _ _pendingValue === y ) return ; const e
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
2020-04-19 11:20:24 +02:00
* / ; f u n c t i o n U ( e ) { l e t t = j . g e t ( e . t y p e ) ; v o i d 0 = = = t & & ( t = { s t r i n g s A r r a y : n e w W e a k M a p , k e y S t r i n g : n e w M a p } , j . s e t ( e . t y p e , t ) ) ; l e t i = t . s t r i n g s A r r a y . g e t ( e . s t r i n g s ) ; i f ( v o i d 0 ! = = i ) r e t u r n i ; c o n s t s = e . s t r i n g s . j o i n ( r ) ; r e t u r n i = t . k e y S t r i n g . g e t ( s ) , v o i d 0 = = = i & & ( i = n e w l ( e , e . g e t T e m p l a t e E l e m e n t ( ) ) , t . k e y S t r i n g . s e t ( s , i ) ) , t . s t r i n g s A r r a y . s e t ( e . s t r i n g s , i ) , i } c o n s t j = n e w M a p , M = n e w W e a k M a p ;
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
2020-04-19 10:52:45 +02:00
* / c o n s t R = n e w
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
class { handleAttributeExpressions ( e , t , i , s ) { const n = t [ 0 ] ; if ( "." === n ) { return new E ( e , t . slice ( 1 ) , i ) . parts } return "@" === n ? [ new V ( e , t . slice ( 1 ) , s . eventContext ) ] : "?" === n ? [ new A ( e , t . slice ( 1 ) , i ) ] : new C ( e , t , i ) . parts } handleTextExpression ( e ) { return new T ( e ) } } ;
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
2020-04-19 11:20:24 +02:00
* / " u n d e f i n e d " ! = t y p e o f w i n d o w & & ( w i n d o w . l i t H t m l V e r s i o n s | | ( w i n d o w . l i t H t m l V e r s i o n s = [ ] ) ) . p u s h ( " 1 . 2 . 1 " ) ; c o n s t H = ( e , . . . t ) = > n e w w ( e , t , " h t m l " , R ) , z = ( e , t ) = > ` $ { e } - - $ { t } ` ; l e t q = ! 0 ; v o i d 0 = = = w i n d o w . S h a d y C S S ? q = ! 1 : v o i d 0 = = = w i n d o w . S h a d y C S S . p r e p a r e T e m p l a t e D o m & & ( c o n s o l e . w a r n ( " I n c o m p a t i b l e S h a d y C S S v e r s i o n d e t e c t e d . P l e a s e u p d a t e t o a t l e a s t @ w e b c o m p o n e n t s / w e b c o m p o n e n t s j s @ 2 . 0 . 2 a n d @ w e b c o m p o n e n t s / s h a d y c s s @ 1 . 3 . 1 . " ) , q = ! 1 ) ; c o n s t F = e = > t = > { c o n s t i = z ( t . t y p e , e ) ; l e t s = j . g e t ( i ) ; v o i d 0 = = = s & & ( s = { s t r i n g s A r r a y : n e w W e a k M a p , k e y S t r i n g : n e w M a p } , j . s e t ( i , s ) ) ; l e t n = s . s t r i n g s A r r a y . g e t ( t . s t r i n g s ) ; i f ( v o i d 0 ! = = n ) r e t u r n n ; c o n s t o = t . s t r i n g s . j o i n ( r ) ; i f ( n = s . k e y S t r i n g . g e t ( o ) , v o i d 0 = = = n ) { c o n s t i = t . g e t T e m p l a t e E l e m e n t ( ) ; q & & w i n d o w . S h a d y C S S . p r e p a r e T e m p l a t e D o m ( i , e ) , n = n e w l ( t , i ) , s . k e y S t r i n g . s e t ( o , n ) } r e t u r n s . s t r i n g s A r r a y . s e t ( t . s t r i n g s , n ) , n } , L = [ " h t m l " , " s v g " ] , B = n e w S e t , I = ( e , t , i ) = > { B . a d d ( e ) ; c o n s t s = i ? i . e l e m e n t : d o c u m e n t . c r e a t e E l e m e n t ( " t e m p l a t e " ) , n = t . q u e r y S e l e c t o r A l l ( " s t y l e " ) , { l e n g t h : r } = n ; i f ( 0 = = = r ) r e t u r n v o i d w i n d o w . S h a d y C S S . p r e p a r e T e m p l a t e S t y l e s ( s , e ) ; c o n s t o = d o c u m e n t . c r e a t e E l e m e n t ( " s t y l e " ) ; f o r ( l e t e = 0 ; e < r ; e + + ) { c o n s t t = n [ e ] ; t . p a r e n t N o d e . r e m o v e C h i l d ( t ) , o . t e x t C o n t e n t + = t . t e x t C o n t e n t } ( e = > { L . f o r E a c h ( t = > { c o n s t i = j . g e t ( z ( t , e ) ) ; v o i d 0 ! = = i & & i . k e y S t r i n g . f o r E a c h ( e = > { c o n s t { e l e m e n t : { c o n t e n t : t } } = e , i = n e w S e t ; A r r a y . f r o m ( t . q u e r y S e l e c t o r A l l ( " s t y l e " ) ) . f o r E a c h ( e = > { i . a d d ( e ) } ) , u ( e , i ) } ) } ) } ) ( e ) ; c o n s t a = s . c o n t e n t ; i ? f u n c t i o n ( e , t , i = n u l l ) { c o n s t { e l e m e n t : { c o n t e n t : s } , p a r t s : n } = e ; i f ( n u l l = = i ) r e t u r n v o i d s . a p p e n d C h i l d ( t ) ; c o n s t r = d o c u m e n t . c r e a t e T r e e W a l k e r ( s , 1 3 3 , n u l l , ! 1 ) ; l e t o = f ( n ) , a = 0 , l = - 1 ; f o r ( ; r . n e x t N o d e ( ) ; ) { f o r ( l + + , r . c u r r e n t N o d e = = = i & & ( a = m ( t ) , i . p a r e n t N o d e . i n s e r t B e f o r e ( t , i ) ) ; - 1 ! = = o & & n [ o ] . i n d e x = = = l ; ) { i f ( a > 0 ) { f o r ( ; - 1 ! = = o ; ) n [ o ] . i n d e x + = a , o = f ( n , o ) ; r e t u r n } o = f ( n , o ) } } } ( i , o , a . f i r s t C h i l d ) : a . i n s e r t B e f o r e ( o , a . f i r s t C h i l d ) , w i n d o w . S h a d y C S S . p r e p a r e T e m p l a t e S t y l e s ( s , e ) ; c o n s t l = a . q u e r y S e l e c t o r ( " s t y l e " ) ; i f ( w i n d o w . S h a d y C S S . n a t i v e S h a d o w & & n u l l ! = = l ) t . i n s e r t B e f o r e ( l . c l o n e N o d e ( ! 0 ) , t . f i r s t C h i l d ) ; e l s e i f ( i ) { a . i n s e r t B e f o r e ( o , a . f i r s t C h i l d ) ; c o n s t e = n e w S e t ; e . a d d ( o ) , u ( i , e ) } } ; w i n d o w . J S C o m p i l e r _ r e n a m e P r o p e r t y = ( e , t ) = > e ; c o n s t W = { t o A t t r i b u t e ( e , t ) { s w i t c h ( t ) { c a s e B o o l e a n : r e t u r n e ? " " : n u l l ; c a s e O b j e c t : c a s e A r r a y : r e t u r n n u l l = = e ? e : J S O N . s t r i n g i f y ( e ) } r e t u r n e } , f r o m A t t r i b u t e ( e , t ) { s w i t c h ( t ) { c a s e B o o l e a n : r e t u r n n u l l ! = = e ; c a s e N u m b e r : r e t u r n n u l l = = = e ? n u l l : N u m b e r ( e ) ; c a s e O b j e c t : c a s e A r r a y : r e t u r n J S O N . p a r s e ( e ) } r e t u r n e } } , D = ( e , t ) = > t ! = = e & & ( t = = t | | e = = e ) , J = { a t t r i b u t e : ! 0 , t y p e : S t r i n g , c o n v e r t e r : W , r e f l e c t : ! 1 , h a s C h a n g e d : D } ; c l a s s G e x t e n d s H T M L E l e m e n t { c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . _ u p d a t e S t a t e = 0 , t h i s . _ i n s t a n c e P r o p e r t i e s = v o i d 0 , t h i s . _ u p d a t e P r o m i s e = n e w P r o m i s e ( e = > t h i s . _ e n a b l e U p d a t i n g R e s o l v e r = e ) , t h i s . _ c h a n g e d P r o p e r t i e s = n e w M a p , t h i s . _ r e f l e c t i n g P r o p e r t i e s = v o i d 0 , t h i s . i n i t i a l i z e ( ) } s t a t i c g e t o b s e r v e d A t t r i b u t e s ( ) { t h i s . f i n a l i z e ( ) ; c o n s t e = [ ] ; r e t u r n t h i s . _ c l a s s P r o p e r t i e s . f o r E a c h ( ( t , i ) = > { c o n s t s = t h i s . _ a t t r i b u t e N a m e F o r P r o p e r t y ( i , t ) ; v o i d 0 ! = = s & & ( t h i s . _ a t t r i b u t e T o P r o p e r t y M a p . s e t ( s , i ) , e . p u s h ( s ) ) } ) , e } s t a t i c _ e n s u r e C l a s s P r o p e r t i e s ( ) { i f ( ! t h i s . h a s O w n P r o p e r t y ( J S C o m p i l e r _ r e n a m e P r o p e r t y ( " _ c l a s s P r o p e r t i e s " , t h i s ) ) ) { t h i s . _ c l a s s P r o p e r t i e s = n e w M a p ; c o n s t e = O b j e c t . g e t P r o t o t y p e O f ( t h i s ) . _ c l a s s P r o p e r t i e s ; v o i d 0 ! = = e & & e . f o r E a c h ( ( e , t ) = > t h i s . _ c l a s s P r o p e r t i e s . s e t ( t , e ) ) } } s t a t i c c r e a t e P r o p e r t y ( e , t = J ) { i f ( t h i s . _ e n s u r e C l a s s P r o p e r t i e s ( ) , t h i s . _ c l a s s P r o p e r t i e s . s e t ( e , t ) , t . n o A c c e s s o r | | t h i s . p r o t o t y p e . h a s O w n P r o p e r t y ( e ) ) r e t u r n ; c o n s t i = " s y m b o l " = = t y p e o f e ? S y m b o l ( ) : " _ _ " + e , s = t h i s . g e t P r o p e r t y D e s c r i p t o r ( e , i , t ) ; v o i d 0 ! = = s & & O b j e c t . d e f i n e P r o p e r t y ( t h i s . p r o t o t y p e , e , s ) } s t a t i c g e t P r o p e r t y D e s c r i p t o r ( e , t , i ) { r e t u r n { g e t ( ) { r e t u r n t h i s [ t ] } , s e t ( i ) { c o n s t s = t h i s [ e ] ; t h i s [ t ] = i , t h i s . _ r e q u e s t U p d a t e ( e , s ) } , c o n f i g u r a b l e : ! 0 , e n u m e r a b l e : ! 0 } } s t a t i c g e t P r o p e r t y O p t i o n s ( e ) { r e t u r n t h i s . _ c l a s s P r o p e r t i e s & & t h i s . _ c l a s s P r o p e r t i e s . g e t ( e ) | | J } s t a t i c f i n a l i z e ( ) { c o n s t e = O b j e c t . g e t P r o t o t y p e O f ( t h i s ) ; i f ( e . h a s O w n P r o p e r t y ( " f i n a l i z e d " ) | | e . f i n a l i z e ( ) , t h i s . f i n a l i z e d = ! 0 , t h i s . _ e n s u r e C l a s s P r o p e r t i e s ( ) , t h i s . _ a t t r i b u t e T o P r o p e r t y M a p = n e w M a p , t h i s . h a s O w n P r o p e r t y ( J S C o m p i l e r _ r e n a m e P r o p e r t y ( " p r o p e r t i e s " , t h i s ) ) ) { c o n s t e = t h i s . p r o p e r t i e s , t = [ . . . O b j e c t . g e t O w n P r o p e r t y N a m e s ( e ) , . . . " f u n c t i o n " = = t y p e o f O b j e c t . g e t O w n P r o p e r t y S y m b o l s ? O b j e c t . g e t O w n P r o p e r t y S y m b o l s ( e ) : [ ] ] ; f o r ( c o n s t i o f t ) t h i s . c r e a t e P r o p e r t y ( i ,
2019-06-30 19:37:32 +02:00
/ * *
* @ license
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
const K = ( e , t ) => "method" === t . kind && t . descriptor && ! ( "value" in t . descriptor ) ? Object . assign ( Object . assign ( { } , t ) , { finisher ( i ) { i . createProperty ( t . key , e ) } } ) : { kind : "field" , key : Symbol ( ) , placement : "own" , descriptor : { } , initializer ( ) { "function" == typeof t . initializer && ( this [ t . key ] = t . initializer . call ( this ) ) } , finisher ( i ) { i . createProperty ( t . key , e ) } } ; function Q ( e ) { return ( t , i ) => void 0 !== i ? ( ( e , t , i ) => { t . constructor . createProperty ( i , e ) } ) ( e , t , i ) : K ( e , t ) }
2020-04-19 10:52:45 +02:00
/ * *
@ license
Copyright ( c ) 2019 The Polymer Project Authors . All rights reserved .
This code may only be used under the BSD style license found at
http : //polymer.github.io/LICENSE.txt The complete set of authors may be found at
http : //polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http : //polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
const X = "adoptedStyleSheets" in Document . prototype && "replace" in CSSStyleSheet . prototype , Y = Symbol ( ) ; class Z { constructor ( e , t ) { if ( t !== Y ) throw new Error ( "CSSResult is not constructable. Use `unsafeCSS` or `css` instead." ) ; this . cssText = e } get styleSheet ( ) { return void 0 === this . _styleSheet && ( X ? ( this . _styleSheet = new CSSStyleSheet , this . _styleSheet . replaceSync ( this . cssText ) ) : this . _styleSheet = null ) , this . _styleSheet } toString ( ) { return this . cssText } } const ee = ( e , ... t ) => { const i = t . reduce ( ( t , i , s ) => t + ( e => { if ( e instanceof Z ) return e . cssText ; if ( "number" == typeof e ) return e ; throw new Error ( ` Value passed to 'css' function must be a 'css' function result: ${ e } . Use 'unsafeCSS' to pass non-literal values, but \n take care to ensure page security. ` ) } ) ( i ) + e [ s + 1 ] , e [ 0 ] ) ; return new Z ( i , Y ) } ;
2019-06-30 19:37:32 +02:00
/ * *
* @ license
2020-04-19 10:52:45 +02:00
* Copyright ( c ) 2017 The Polymer Project Authors . All rights reserved .
2019-06-30 19:37:32 +02:00
* This code may only be used under the BSD style license found at
* http : //polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http : //polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http : //polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http : //polymer.github.io/PATENTS.txt
* /
2020-04-19 11:20:24 +02:00
( window . litElementVersions || ( window . litElementVersions = [ ] ) ) . push ( "2.3.1" ) ; const te = { } ; class ie extends G { static getStyles ( ) { return this . styles } static _getUniqueStyles ( ) { if ( this . hasOwnProperty ( JSCompiler _renameProperty ( "_styles" , this ) ) ) return ; const e = this . getStyles ( ) ; if ( void 0 === e ) this . _styles = [ ] ; else if ( Array . isArray ( e ) ) { const t = ( e , i ) => e . reduceRight ( ( e , i ) => Array . isArray ( i ) ? t ( i , e ) : ( e . add ( i ) , e ) , i ) , i = t ( e , new Set ) , s = [ ] ; i . forEach ( e => s . unshift ( e ) ) , this . _styles = s } else this . _styles = [ e ] } initialize ( ) { super . initialize ( ) , this . constructor . _getUniqueStyles ( ) , this . renderRoot = this . createRenderRoot ( ) , window . ShadowRoot && this . renderRoot instanceof window . ShadowRoot && this . adoptStyles ( ) } createRenderRoot ( ) { return this . attachShadow ( { mode : "open" } ) } adoptStyles ( ) { const e = this . constructor . _styles ; 0 !== e . length && ( void 0 === window . ShadyCSS || window . ShadyCSS . nativeShadow ? X ? this . renderRoot . adoptedStyleSheets = e . map ( e => e . styleSheet ) : this . _needsShimAdoptedStyleSheets = ! 0 : window . ShadyCSS . ScopingShim . prepareAdoptedCssText ( e . map ( e => e . cssText ) , this . localName ) ) } connectedCallback ( ) { super . connectedCallback ( ) , this . hasUpdated && void 0 !== window . ShadyCSS && window . ShadyCSS . styleElement ( this ) } update ( e ) { const t = this . render ( ) ; super . update ( e ) , t !== te && this . constructor . render ( t , this . renderRoot , { scopeName : this . localName , eventContext : this } ) , this . _needsShimAdoptedStyleSheets && ( this . _needsShimAdoptedStyleSheets = ! 1 , this . constructor . _styles . forEach ( e => { const t = document . createElement ( "style" ) ; t . textContent = e . cssText , this . renderRoot . appendChild ( t ) } ) ) } render ( ) { return te } } ie . finalized = ! 0 , ie . render = ( e , t , i ) => { if ( ! i || "object" != typeof i || ! i . scopeName ) throw new Error ( "The `scopeName` option is required." ) ; const s = i . scopeName , r = M . has ( t ) , o = q && 11 === t . nodeType && ! ! t . host , a = o && ! B . has ( s ) , l = a ? document . createDocumentFragment ( ) : t ; if ( ( ( e , t , i ) => { let s = M . get ( t ) ; void 0 === s && ( n ( t , t . firstChild ) , M . set ( t , s = new T ( Object . assign ( { templateFactory : U } , i ) ) ) , s . appendInto ( t ) ) , s . setValue ( e ) , s . commit ( ) } ) ( e , l , Object . assign ( { templateFactory : F ( s ) } , i ) ) , a ) { const e = M . get ( l ) ; M . delete ( l ) ; const i = e . value instanceof S ? e . value . template : void 0 ; I ( s , l , i ) , n ( t , t . firstChild ) , t . appendChild ( l ) , M . set ( t , e ) } ! r && o && window . ShadyCSS . styleElement ( t . host ) } ; var se = function ( e , t , i , s ) { var n , r = arguments . length , o = r < 3 ? t : null === s ? s = Object . getOwnPropertyDescriptor ( t , i ) : s ; if ( "object" == typeof Reflect && "function" == typeof Reflect . decorate ) o = Reflect . decorate ( e , t , i , s ) ; else for ( var a = e . length - 1 ; a >= 0 ; a -- ) ( n = e [ a ] ) && ( o = ( r < 3 ? n ( o ) : r > 3 ? n ( t , i , o ) : n ( t , i ) ) || o ) ; return r > 3 && o && Object . defineProperty ( t , i , o ) , o } ; let ne = class extends ie { setConfig ( e ) { console . log ( "Setting config" , e ) , this . _config = e } static getCardSize ( ) { return 3 } render ( ) { return this . _config . scenes . length >= 5 ? H `
< ha - card >
< img style = "width: 100%; display: block" src = "${this._config.image}" >
2019-06-30 19:37:32 +02:00
2020-04-19 11:20:24 +02:00
< div class = "box box-top" >
< div > $ { this . _config . name } < / d i v >
< div >
$ { this . renderCoverControl ( ) }
< / d i v >
< / d i v >
< div class = "box box-upper" >
< div class = "title" > < / d i v >
< div > $ { this . renderLightControl ( ) } < / d i v >
< / d i v >
< div class = "box box-lower" >
< div class = "title" > < / d i v >
< div >
$ { this . _config . scenes . map ( e => this . renderSceneButton ( e ) ) }
< / d i v >
< / d i v >
< / h a - c a r d >
` :H `
< ha - card >
< img style = "width: 100%; display: block" src = "${this._config.image}" >
< div class = "box box-upper" >
< div class = "title" > < / d i v >
< div > $ { this . _config . name } < / d i v >
< div >
$ { this . renderCoverControl ( ) }
< / d i v >
< / d i v >
< div class = "box box-lower" >
< div class = "title" > < / d i v >
< div >
$ { this . _config . scenes . map ( e => this . renderSceneButton ( e ) ) }
$ { this . renderLightControl ( ) }
< / d i v >
< / d i v >
< / h a - c a r d >
` }renderSceneButton(e){return H `
2019-06-30 19:37:32 +02:00
< paper - icon - button
icon = "${e.icon||" mdi : checkbox - blank "}"
style = "color: ${e.color||" "};"
title = "${e.name}"
@ click = $ { this . serviceHandler ( "scene" , "turn_on" , { entity _id : e . scene } ) }
> < / p a p e r - i c o n - b u t t o n >
2020-04-19 11:20:24 +02:00
` }renderLightControl(){return H `
2019-06-30 19:37:32 +02:00
< paper - icon - button
2020-04-19 11:20:24 +02:00
icon = "mdi:close-circle"
@ click = $ { this . serviceHandler ( "light" , "turn_off" ) }
> < / p a p e r - i c o n - b u t t o n >
< paper - icon - button
icon = "mdi:chevron-up"
title = "Heller"
@ click = $ { this . serviceHandler ( "dimmer" , "dim" , { offset : 30 } ) }
> < / p a p e r - i c o n - b u t t o n >
< paper - icon - button
icon = "mdi:chevron-down"
title = "Dunkler"
@ click = $ { this . serviceHandler ( "dimmer" , "dim" , { offset : - 30 } ) }
> < / p a p e r - i c o n - b u t t o n > ` } r e n d e r C o v e r C o n t r o l ( ) { r e t u r n H `
< paper - icon - button
2019-06-30 19:37:32 +02:00
icon = "hass:menu"
@ click = $ { this . serviceHandler ( "cover_half" , "set_half" ) }
> < / p a p e r - i c o n - b u t t o n >
< paper - icon - button
icon = "hass:arrow-up"
@ click = $ { this . serviceHandler ( "cover" , "open_cover" ) }
> < / p a p e r - i c o n - b u t t o n >
< paper - icon - button
icon = "hass:stop"
@ click = $ { this . serviceHandler ( "cover" , "stop_cover" ) }
> < / p a p e r - i c o n - b u t t o n >
< paper - icon - button
icon = "hass:arrow-down"
@ click = $ { this . serviceHandler ( "cover" , "close_cover" ) }
> < / p a p e r - i c o n - b u t t o n >
2020-04-19 11:20:24 +02:00
` }serviceHandler(e,t,i={}){const s=this;return function(n){n.stopPropagation(),s.callServiceForAllEntities(e,t,i)}}callServiceForAllEntities(e,t,i={}){if(i.hasOwnProperty("entity_id"))console.log("Calling service with given entity_id",e,t,i),this.hass.callService(e,t,i);else for(let s of this._config.entities)i.entity_id=s,console.log("Calling service",e,t,i),this.hass.callService(e,t,i)}_handleTap(){console.log("Image tap")}_handleHold(){console.log("Image hold")}static get styles(){return ee `
2019-06-30 19:37:32 +02:00
ha - card {
position : relative ;
min - height : 48 px ;
overflow : hidden ;
}
2020-04-19 10:52:45 +02:00
my - image . clickable {
2019-06-30 19:37:32 +02:00
cursor : pointer ;
}
. box {
/* start paper-font-common-nowrap style */
white - space : nowrap ;
overflow : hidden ;
text - overflow : ellipsis ;
/* end paper-font-common-nowrap style */
position : absolute ;
left : 0 ;
right : 0 ;
2020-04-19 10:52:45 +02:00
bottom : 0 ;
2019-06-30 19:37:32 +02:00
padding - left : 8 px ;
padding - right : 8 px ;
font - size : 16 px ;
line - height : 40 px ;
color : white ;
display : flex ;
2020-04-19 10:52:45 +02:00
flex - direction : row ;
2019-06-30 19:37:32 +02:00
justify - content : space - between ;
background - color : rgba ( 0 , 0 , 0 , 0.3 ) ;
}
2020-04-19 11:20:24 +02:00
. box - top {
bottom : 90 px ;
height : 45 px ;
padding - top : 0 px ;
padding - bottom : 0 ;
}
2019-06-30 19:37:32 +02:00
. box - upper {
bottom : 45 px ;
2020-04-19 11:20:24 +02:00
height : 45 px ;
padding - top : 0 px ;
2019-06-30 19:37:32 +02:00
padding - bottom : 0 ;
}
. box - lower {
bottom : 0 ;
padding - top : 0 ;
padding - bottom : 0 px ;
height : 45 px ;
}
. box . title {
font - weight : 500 ;
margin - left : 8 px ;
}
ha - icon {
cursor : pointer ;
padding : 8 px ;
color : # a9a9a9 ;
}
ha - icon . state - on {
color : white ;
}
2020-04-19 11:20:24 +02:00
` }};var re;se([Q()],ne.prototype,"hass",void 0),se([Q()],ne.prototype,"_config",void 0),ne=se([(re="room-glance-card",e=>"function"==typeof e?((e,t)=>(window.customElements.define(e,t),t))(re,e):((e,t)=>{const{kind:i,elements:s}=t;return{kind:i,elements:s,finisher(t){window.customElements.define(e,t)}}})(re,e))],ne)}]);