@fluid-topics/ft-ripple 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,169 +1,93 @@
1
- !function(e,r,t,i,a,c){
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
1
+ !function(t,e,i,s,p){var r=function(t,e,i,s){for(var p,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(p=t[l])&&(o=(r<3?p(o):r>3?p(e,i,o):p(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const o={color:e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),primaryColor:e.FtCssVariable.extend("--ft-ripple-primary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary)),secondaryColor:e.FtCssVariable.extend("--ft-ripple-secondary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class l extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:s,y:p}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=s?s-r.x:r.width/2),this.originY=Math.round(null!=p?p-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
2
+ <style>
3
+ .ft-ripple .ft-ripple--effect,
4
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
5
+ width: ${this.rippleSize}px;
6
+ height: ${this.rippleSize}px;
7
+ }
4
8
 
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
9
+ .ft-ripple .ft-ripple--effect {
10
+ left: ${this.originX}px;
11
+ top: ${this.originY}px;
12
+ }
13
+ </style>
14
+ <div class="${p.classMap(t)}">
15
+ <div class="ft-ripple--background"></div>
16
+ <div class="ft-ripple--effect"></div>
17
+ </div>
18
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),s=e("touchend","touchcancel"),p=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",p),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",p),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let s,p;return null!=e.x?({x:s,y:p}=e):null!=i.touches&&(s=i.touches[0].clientX,p=i.touches[0].clientY),{x:s,y:p}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}l.elementDefinitions={},l.styles=i.css`
19
+ :host {
20
+ display: contents;
21
+ }
7
22
 
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var p=function(e,r){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},p(e,r)};var o=function(){return o=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},o.apply(this,arguments)};function s(e,r,t,i){for(var a,c=arguments.length,p=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i,o=e.length-1;o>=0;o--)(a=e[o])&&(p=(c<3?a(p):c>3?a(r,t,p):a(r,t))||p);return c>3&&p&&Object.defineProperty(r,t,p),p}function d(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}
17
- /**
18
- * @license
19
- * Copyright 2018 Google Inc.
20
- *
21
- * Permission is hereby granted, free of charge, to any person obtaining a copy
22
- * of this software and associated documentation files (the "Software"), to deal
23
- * in the Software without restriction, including without limitation the rights
24
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
- * copies of the Software, and to permit persons to whom the Software is
26
- * furnished to do so, subject to the following conditions:
27
- *
28
- * The above copyright notice and this permission notice shall be included in
29
- * all copies or substantial portions of the Software.
30
- *
31
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
37
- * THE SOFTWARE.
38
- */
39
- /**
40
- * @license
41
- * Copyright 2018 Google LLC
42
- * SPDX-License-Identifier: Apache-2.0
43
- */
44
- const n=()=>{},l={get passive(){return!1}};document.addEventListener("x",n,l),document.removeEventListener("x",n);
45
- /**
46
- * @license
47
- * Copyright 2018 Google LLC
48
- * SPDX-License-Identifier: Apache-2.0
49
- */
50
- class u extends r.LitElement{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
51
- /**
52
- * @license
53
- * Copyright 2016 Google Inc.
54
- *
55
- * Permission is hereby granted, free of charge, to any person obtaining a copy
56
- * of this software and associated documentation files (the "Software"), to deal
57
- * in the Software without restriction, including without limitation the rights
58
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
59
- * copies of the Software, and to permit persons to whom the Software is
60
- * furnished to do so, subject to the following conditions:
61
- *
62
- * The above copyright notice and this permission notice shall be included in
63
- * all copies or substantial portions of the Software.
64
- *
65
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
66
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
67
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
68
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
69
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
70
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
71
- * THE SOFTWARE.
72
- */var f=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),m={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},h={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},v={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
73
- /**
74
- * @license
75
- * Copyright 2016 Google Inc.
76
- *
77
- * Permission is hereby granted, free of charge, to any person obtaining a copy
78
- * of this software and associated documentation files (the "Software"), to deal
79
- * in the Software without restriction, including without limitation the rights
80
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
81
- * copies of the Software, and to permit persons to whom the Software is
82
- * furnished to do so, subject to the following conditions:
83
- *
84
- * The above copyright notice and this permission notice shall be included in
85
- * all copies or substantial portions of the Software.
86
- *
87
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
90
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
91
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
92
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
93
- * THE SOFTWARE.
94
- */
95
- /**
96
- * @license
97
- * Copyright 2016 Google Inc.
98
- *
99
- * Permission is hereby granted, free of charge, to any person obtaining a copy
100
- * of this software and associated documentation files (the "Software"), to deal
101
- * in the Software without restriction, including without limitation the rights
102
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
103
- * copies of the Software, and to permit persons to whom the Software is
104
- * furnished to do so, subject to the following conditions:
105
- *
106
- * The above copyright notice and this permission notice shall be included in
107
- * all copies or substantial portions of the Software.
108
- *
109
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
110
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
111
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
112
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
113
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
114
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
115
- * THE SOFTWARE.
116
- */
117
- var y=["touchstart","pointerdown","mousedown","keydown"],g=["touchend","pointerup","mouseup","contextmenu"],b=[],w=function(e){function r(t){var i=e.call(this,o(o({},r.defaultAdapter),t))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(e){i.activateImpl(e)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}p(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}(r,e),Object.defineProperty(r,"cssClasses",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){var e=this,t=this.supportsPressRipple();if(this.registerRootHandlers(t),t){var i=r.cssClasses,a=i.ROOT,c=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(a),e.adapter.isUnbounded()&&(e.adapter.addClass(c),e.layoutInternal())}))}},r.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(r.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(r.cssClasses.FG_DEACTIVATION));var t=r.cssClasses,i=t.ROOT,a=t.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(a),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},r.prototype.activate=function(e){this.activateImpl(e)},r.prototype.deactivate=function(){this.deactivateImpl()},r.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},r.prototype.setUnbounded=function(e){var t=r.cssClasses.UNBOUNDED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},r.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(r.cssClasses.BG_FOCUSED)}))},r.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(r.cssClasses.BG_FOCUSED)}))},r.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},r.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},r.prototype.registerRootHandlers=function(e){var r,t;if(e){try{for(var i=d(y),a=i.next();!a.done;a=i.next()){var c=a.value;this.adapter.registerInteractionHandler(c,this.activateHandler)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(r)throw r.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},r.prototype.registerDeactivationHandlers=function(e){var r,t;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=d(g),a=i.next();!a.done;a=i.next()){var c=a.value;this.adapter.registerDocumentInteractionHandler(c,this.deactivateHandler)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(r)throw r.error}}},r.prototype.deregisterRootHandlers=function(){var e,r;try{for(var t=d(y),i=t.next();!i.done;i=t.next()){var a=i.value;this.adapter.deregisterInteractionHandler(a,this.activateHandler)}}catch(r){e={error:r}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},r.prototype.deregisterDeactivationHandlers=function(){var e,r;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var t=d(g),i=t.next();!i.done;i=t.next()){var a=i.value;this.adapter.deregisterDocumentInteractionHandler(a,this.deactivateHandler)}}catch(r){e={error:r}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(e)throw e.error}}},r.prototype.removeCssVars=function(){var e=this,t=r.strings;Object.keys(t).forEach((function(r){0===r.indexOf("VAR_")&&e.adapter.updateCssVariable(t[r],null)}))},r.prototype.activateImpl=function(e){var r=this;if(!this.adapter.isSurfaceDisabled()){var t=this.activationState;if(!t.isActivated){var i=this.previousActivationEvent;if(!(i&&void 0!==e&&i.type!==e.type))t.isActivated=!0,t.isProgrammatic=void 0===e,t.activationEvent=e,t.wasActivatedByPointer=!t.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&b.length>0&&b.some((function(e){return r.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(b.push(e.target),this.registerDeactivationHandlers(e)),t.wasElementMadeActive=this.checkElementMadeActive(e),t.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){b=[],t.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(t.wasElementMadeActive=r.checkElementMadeActive(e),t.wasElementMadeActive&&r.animateActivation()),t.wasElementMadeActive||(r.activationState=r.defaultActivationState())})))}}},r.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},r.prototype.animateActivation=function(){var e=this,t=r.strings,i=t.VAR_FG_TRANSLATE_START,a=t.VAR_FG_TRANSLATE_END,c=r.cssClasses,p=c.FG_DEACTIVATION,o=c.FG_ACTIVATION,s=r.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var d="",n="";if(!this.adapter.isUnbounded()){var l=this.getFgTranslationCoordinates(),u=l.startPoint,f=l.endPoint;d=u.x+"px, "+u.y+"px",n=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,d),this.adapter.updateCssVariable(a,n),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(p),this.adapter.computeBoundingRect(),this.adapter.addClass(o),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),s)},r.prototype.getFgTranslationCoordinates=function(){var e,r=this.activationState,t=r.activationEvent;return{startPoint:e={x:(e=r.wasActivatedByPointer?function(e,r,t){if(!e)return{x:0,y:0};var i,a,c=r.x,p=r.y,o=c+t.left,s=p+t.top;if("touchstart"===e.type){var d=e;i=d.changedTouches[0].pageX-o,a=d.changedTouches[0].pageY-s}else{var n=e;i=n.pageX-o,a=n.pageY-s}return{x:i,y:a}}(t,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},r.prototype.runDeactivationUXLogicIfReady=function(){var e=this,t=r.cssClasses.FG_DEACTIVATION,i=this.activationState,a=i.hasDeactivationUXRun,c=i.isActivated;(a||!c)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(t),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(t)}),v.FG_DEACTIVATION_MS))},r.prototype.rmBoundedActivationClasses=function(){var e=r.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},r.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),r.numbers.TAP_DELAY_MS)},r.prototype.deactivateImpl=function(){var e=this,r=this.activationState;if(r.isActivated){var t=o({},r);r.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(t)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(t),e.resetActivationState()})))}},r.prototype.animateDeactivation=function(e){var r=e.wasActivatedByPointer,t=e.wasElementMadeActive;(r||t)&&this.runDeactivationUXLogicIfReady()},r.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+r.numbers.PADDING;var i=Math.floor(t*r.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},r.prototype.updateLayoutCssVars=function(){var e=r.strings,t=e.VAR_FG_SIZE,i=e.VAR_LEFT,a=e.VAR_TOP,c=e.VAR_FG_SCALE;this.adapter.updateCssVariable(t,this.initialSize+"px"),this.adapter.updateCssVariable(c,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(a,this.unboundedCoords.top+"px"))},r}(f);
118
- /**
119
- * @license
120
- * Copyright 2018 Google LLC
121
- * SPDX-License-Identifier: Apache-2.0
122
- */
123
- class k extends u{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=w}get isActive(){return e=this.parentElement||this,r=":active",(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,r);var e,r}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(e,r)=>{switch(e){case"--mdc-ripple-fg-scale":this.fgScale=r;break;case"--mdc-ripple-fg-size":this.fgSize=r;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=r;break;case"--mdc-ripple-fg-translate-start":this.translateStart=r;break;case"--mdc-ripple-left":this.leftPos=r;break;case"--mdc-ripple-top":this.topPos=r}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(e){this.waitForFoundation((()=>{this.mdcFoundation.activate(e)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(e){this.mdcFoundation?e():this.updateComplete.then(e)}update(e){e.has("disabled")&&this.disabled&&this.endHover(),super.update(e)}render(){const e=this.activated&&(this.primary||!this.accent),t=this.selected&&(this.primary||!this.accent),c={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":e,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":t,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return r.html`
124
- <div class="mdc-ripple-surface mdc-ripple-upgraded ${i.classMap(c)}"
125
- style="${a.styleMap({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}s([t.query(".mdc-ripple-surface")],k.prototype,"mdcRoot",void 0),s([t.property({type:Boolean})],k.prototype,"primary",void 0),s([t.property({type:Boolean})],k.prototype,"accent",void 0),s([t.property({type:Boolean})],k.prototype,"unbounded",void 0),s([t.property({type:Boolean})],k.prototype,"disabled",void 0),s([t.property({type:Boolean})],k.prototype,"activated",void 0),s([t.property({type:Boolean})],k.prototype,"selected",void 0),s([t.property({type:Boolean})],k.prototype,"internalUseStateLayerCustomProperties",void 0),s([t.state()],k.prototype,"hovering",void 0),s([t.state()],k.prototype,"bgFocused",void 0),s([t.state()],k.prototype,"fgActivation",void 0),s([t.state()],k.prototype,"fgDeactivation",void 0),s([t.state()],k.prototype,"fgScale",void 0),s([t.state()],k.prototype,"fgSize",void 0),s([t.state()],k.prototype,"translateStart",void 0),s([t.state()],k.prototype,"translateEnd",void 0),s([t.state()],k.prototype,"leftPos",void 0),s([t.state()],k.prototype,"topPos",void 0);
126
- /**
127
- * @license
128
- * Copyright 2021 Google LLC
129
- * SPDX-LIcense-Identifier: Apache-2.0
130
- */
131
- const A=r.css`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
132
- /**
133
- * @license
134
- * Copyright 2018 Google LLC
135
- * SPDX-License-Identifier: Apache-2.0
136
- */;let O=class extends k{};O.styles=[A],O=s([t.customElement("mwc-ripple")],O);
137
- /**
138
- * @license
139
- * Copyright 2020 Google LLC
140
- * SPDX-License-Identifier: Apache-2.0
141
- */
142
- class T{constructor(e){this.startPress=r=>{e().then((e=>{e&&e.startPress(r)}))},this.endPress=()=>{e().then((e=>{e&&e.endPress()}))},this.startFocus=()=>{e().then((e=>{e&&e.startFocus()}))},this.endFocus=()=>{e().then((e=>{e&&e.endFocus()}))},this.startHover=()=>{e().then((e=>{e&&e.startHover()}))},this.endHover=()=>{e().then((e=>{e&&e.endHover()}))}}}var S=function(e,r,t,i){for(var a,c=arguments.length,p=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i,o=e.length-1;o>=0;o--)(a=e[o])&&(p=(c<3?a(p):c>3?a(r,t,p):a(r,t))||p);return c>3&&p&&Object.defineProperty(r,t,p),p};const _={color:c.FtCssVariable.extend("--ft-ripple-color",c.designSystemVariables.colorContent),primaryColor:c.FtCssVariable.extend("--ft-ripple-primary-color",c.FtCssVariable.extend("--ft-ripple-color",c.designSystemVariables.colorPrimary)),secondaryColor:c.FtCssVariable.extend("--ft-ripple-secondary-color",c.FtCssVariable.extend("--ft-ripple-color",c.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:c.FtCssVariable.external(c.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:c.FtCssVariable.external(c.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:c.FtCssVariable.external(c.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:c.FtCssVariable.external(c.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:c.FtCssVariable.external(c.designSystemVariables.opacityContentOnSurfaceDragged,"Design system")};e.FtRipple=class extends c.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return r.css`
143
- :host {
144
- display: contents;
23
+ .ft-ripple {
24
+ position: absolute;
25
+ inset: 0;
26
+ pointer-events: none;
27
+ }
145
28
 
146
- --mdc-ripple-color: ${_.color};
147
- --mdc-ripple-press-opacity: ${_.opacityContentOnSurfacePressed};
148
- --mdc-ripple-hover-opacity: ${_.opacityContentOnSurfaceHover};
149
- --mdc-ripple-focus-opacity: ${_.opacityContentOnSurfaceFocused};
150
- --mdc-ripple-selected-opacity: ${_.opacityContentOnSurfaceSelected};
151
- --mdc-ripple-activated-opacity: ${_.opacityContentOnSurfaceDragged};
152
- }
29
+ .ft-ripple:not(.ft-ripple--unbounded) {
30
+ overflow: hidden;
31
+ }
153
32
 
154
- mwc-ripple.ft-ripple--secondary {
155
- --mdc-ripple-color: ${_.secondaryColor};
156
- }
33
+ .ft-ripple .ft-ripple--background,
34
+ .ft-ripple .ft-ripple--effect {
35
+ position: absolute;
36
+ opacity: 0;
37
+ background-color: ${o.color};
38
+ }
157
39
 
158
- mwc-ripple.ft-ripple--primary {
159
- --mdc-ripple-color: ${_.primaryColor};
160
- }
161
- `}getTemplate(){return r.html`
162
- <mwc-ripple
163
- class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
164
- ?unbounded=${this.unbounded}
165
- ?activated=${this.activated}
166
- ?selected=${this.selected}
167
- ?disabled=${this.disabled}
168
- ></mwc-ripple>
169
- `}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var e,r,t;null===(e=this.rippleHandlers)||void 0===e||e.endHover(),null===(r=this.rippleHandlers)||void 0===r||r.endFocus(),null===(t=this.rippleHandlers)||void 0===t||t.endPress()}connectedCallback(){var e;super.connectedCallback();const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.host.parentNode;if(r){const e=new T((async()=>this.mwcRipple)),t=(...r)=>t=>{r.forEach((r=>window.addEventListener(r,e.endPress,{once:!0}))),e.startPress(t)},i=t("mouseup"),a=t("touchend","touchcancel"),c=e=>{["Enter"," "].includes(e.key)&&t("keyup")()};r.addEventListener("mouseenter",e.startHover),r.addEventListener("mouseleave",e.endHover),r.addEventListener("mousedown",i),r.addEventListener("touchstart",a),r.addEventListener("keydown",c),r.addEventListener("focus",e.startFocus),r.addEventListener("blur",e.endFocus),this.onDisconnect=()=>{r.removeEventListener("mouseenter",e.startHover),r.removeEventListener("mouseleave",e.endHover),r.removeEventListener("mousedown",i),r.removeEventListener("touchstart",a),r.removeEventListener("keydown",c),r.removeEventListener("focus",e.startFocus),r.removeEventListener("blur",e.endFocus)},this.rippleHandlers=e}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}},e.FtRipple.elementDefinitions={"mwc-ripple":O},S([t.property({type:Boolean})],e.FtRipple.prototype,"primary",void 0),S([t.property({type:Boolean})],e.FtRipple.prototype,"secondary",void 0),S([t.property({type:Boolean})],e.FtRipple.prototype,"unbounded",void 0),S([t.property({type:Boolean})],e.FtRipple.prototype,"activated",void 0),S([t.property({type:Boolean})],e.FtRipple.prototype,"selected",void 0),S([t.property({type:Boolean})],e.FtRipple.prototype,"disabled",void 0),S([t.query("mwc-ripple")],e.FtRipple.prototype,"mwcRipple",void 0),e.FtRipple=S([c.customElement("ft-ripple")],e.FtRipple),e.FtRippleCssVariables=_,Object.defineProperty(e,"t",{value:!0})}({},ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.wcUtils);
40
+ .ft-ripple.ft-ripple--secondary .ft-ripple--background,
41
+ .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
42
+ background-color: ${o.secondaryColor};
43
+ }
44
+
45
+ .ft-ripple.ft-ripple--primary .ft-ripple--background,
46
+ .ft-ripple.ft-ripple--primary .ft-ripple--effect {
47
+ background-color: ${o.primaryColor};
48
+ }
49
+
50
+ .ft-ripple .ft-ripple--background {
51
+ top: 0;
52
+ left: 0;
53
+ height: 100%;
54
+ width: 100%;
55
+ }
56
+
57
+ .ft-ripple .ft-ripple--effect,
58
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
59
+ border-radius: 50%;
60
+ }
61
+
62
+ .ft-ripple .ft-ripple--effect {
63
+ transform: translate(-50%, -50%) scale(0.15);
64
+ transition: transform 300ms ease, opacity 75ms linear;
65
+ }
66
+
67
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
68
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
69
+ left: 50%;
70
+ top: 50%;
71
+ }
72
+
73
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
74
+ transform: translate(-50%, -50%);
75
+ }
76
+
77
+ .ft-ripple.ft-ripple--hovered .ft-ripple--background {
78
+ opacity: ${o.opacityContentOnSurfaceHover};
79
+ }
80
+
81
+ .ft-ripple.ft-ripple--selected .ft-ripple--background {
82
+ opacity: ${o.opacityContentOnSurfaceSelected};
83
+ }
84
+
85
+ .ft-ripple.ft-ripple--focused .ft-ripple--background {
86
+ opacity: ${o.opacityContentOnSurfaceFocused};
87
+ }
88
+
89
+ .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
90
+ opacity: ${o.opacityContentOnSurfacePressed};
91
+ transform: translate(-50%, -50%) scale(1);
92
+ }
93
+ `,r([s.property({type:Boolean})],l.prototype,"primary",void 0),r([s.property({type:Boolean})],l.prototype,"secondary",void 0),r([s.property({type:Boolean})],l.prototype,"unbounded",void 0),r([s.property({type:Boolean})],l.prototype,"activated",void 0),r([s.property({type:Boolean})],l.prototype,"selected",void 0),r([s.property({type:Boolean})],l.prototype,"disabled",void 0),r([s.state()],l.prototype,"hovered",void 0),r([s.state()],l.prototype,"focused",void 0),r([s.state()],l.prototype,"pressed",void 0),r([s.state()],l.prototype,"rippling",void 0),r([s.state()],l.prototype,"rippleSize",void 0),r([s.state()],l.prototype,"originX",void 0),r([s.state()],l.prototype,"originY",void 0),r([s.query(".ft-ripple")],l.prototype,"ripple",void 0),r([s.query(".ft-ripple--effect")],l.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(l),t.FtRipple=l,t.FtRippleCssVariables=o,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);