"use strict";const s=require("./class-map-DV5418hw.js"),h=require("./animation-A38fZ1oY.js");/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */const C=Symbol("attachableController");let d;d=new MutationObserver(o=>{var t;for(const e of o)(t=e.target[C])==null||t.hostConnected()});class w{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(t){t===null?this.host.removeAttribute("for"):this.host.setAttribute("for",t)}get control(){return this.host.hasAttribute("for")?!this.htmlFor||!this.host.isConnected?null:this.host.getRootNode().querySelector(`#${this.htmlFor}`):this.currentControl||this.host.parentElement}set control(t){t?this.attach(t):this.detach()}constructor(t,e){this.host=t,this.onControlChange=e,this.currentControl=null,t.addController(this),t[C]=this,d==null||d.observe(t,{attributeFilter:["for"]})}attach(t){t!==this.currentControl&&(this.setCurrentControl(t),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(t){this.onControlChange(this.currentControl,t),this.currentControl=t}}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */const I=["focusin","focusout","pointerdown"];class v extends s.r{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new w(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){var e;if(!t[b]){switch(t.type){default:return;case"focusin":this.visible=((e=this.control)==null?void 0:e.matches(":focus-visible"))??!1;break;case"focusout":case"pointerdown":this.visible=!1;break}t[b]=!0}}onControlChange(t,e){for(const r of I)t==null||t.removeEventListener(r,this),e==null||e.addEventListener(r,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}s.__decorate([s.n({type:Boolean,reflect:!0})],v.prototype,"visible",void 0);s.__decorate([s.n({type:Boolean,reflect:!0})],v.prototype,"inward",void 0);const b=Symbol("handledByFocusRing");/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */const E=s.i$1`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} `;/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */let p=class extends v{};p.styles=[E];p=s.__decorate([s.t$1("md-focus-ring")],p);/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */const x=450,g=225,_=.2,T=10,S=75,P=.35,N="::after",R="forwards";var n;(function(o){o[o.INACTIVE=0]="INACTIVE",o[o.TOUCH_DELAY=1]="TOUCH_DELAY",o[o.HOLDING=2]="HOLDING",o[o.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(n||(n={}));const k=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],L=150,f=window.matchMedia("(forced-colors: active)");class c extends s.r{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=n.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new w(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return s.x`
`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==n.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state===n.HOLDING){this.state=n.WAITING_FOR_CLICK;return}if(this.state===n.TOUCH_DELAY){this.state=n.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t)){this.state=n.WAITING_FOR_CLICK,this.startPressAnimation(t);return}this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=n.TOUCH_DELAY,await new Promise(e=>{setTimeout(e,L)}),this.state===n.TOUCH_DELAY&&(this.state=n.HOLDING,this.startPressAnimation(t)))}}handleClick(){if(!this.disabled){if(this.state===n.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===n.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:e}=this.getBoundingClientRect(),r=Math.max(t,e),a=Math.max(P*r,S),i=Math.floor(r*_),u=Math.sqrt(e**2+t**2)+T;this.initialSize=i,this.rippleScale=`${(u+a)/i}`,this.rippleSize=`${i}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:r}=window,{left:a,top:i}=this.getBoundingClientRect(),l=e+a,u=r+i,{pageX:y,pageY:A}=t;return{x:y-l,y:A-u}}getTranslationCoordinates(t){const{height:e,width:r}=this.getBoundingClientRect(),a={x:(r-this.initialSize)/2,y:(e-this.initialSize)/2};let i;return t instanceof PointerEvent?i=this.getNormalizedPointerEventCoords(t):i={x:r/2,y:e/2},i={x:i.x-this.initialSize/2,y:i.y-this.initialSize/2},{startPoint:i,endPoint:a}}startPressAnimation(t){var l;if(!this.mdRoot)return;this.pressed=!0,(l=this.growAnimation)==null||l.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:r}=this.getTranslationCoordinates(t),a=`${e.x}px, ${e.y}px`,i=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${a}) scale(1)`,`translate(${i}) scale(${this.rippleScale})`]},{pseudoElement:N,duration:x,easing:h.EASING.STANDARD,fill:R})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=n.INACTIVE;const t=this.growAnimation;let e=1/0;if(typeof(t==null?void 0:t.currentTime)=="number"?e=t.currentTime:t!=null&&t.currentTime&&(e=t.currentTime.to("ms").value),e>=g){this.pressed=!1;return}await new Promise(r=>{setTimeout(r,g-e)}),this.growAnimation===t&&(this.pressed=!1)}shouldReactToEvent(t){if(this.disabled||!t.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if(t.type==="pointerenter"||t.type==="pointerleave")return!this.isTouch(t);const e=t.buttons===1;return this.isTouch(t)||e}inBounds({x:t,y:e}){const{top:r,left:a,bottom:i,right:l}=this.getBoundingClientRect();return t>=a&&t<=l&&e>=r&&e<=i}isTouch({pointerType:t}){return t==="touch"}async handleEvent(t){if(!(f!=null&&f.matches))switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t);break}}onControlChange(t,e){for(const r of k)t==null||t.removeEventListener(r,this),e==null||e.addEventListener(r,this)}}s.__decorate([s.n({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0);s.__decorate([h.r()],c.prototype,"hovered",void 0);s.__decorate([h.r()],c.prototype,"pressed",void 0);s.__decorate([h.e$1(".surface")],c.prototype,"mdRoot",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */const M=s.i$1`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} `;/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */let m=class extends c{};m.styles=[M];m=s.__decorate([s.t$1("md-ripple")],m);