@momentum-design/components 0.139.7 → 0.139.9

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.
@@ -15,7 +15,7 @@
15
15
  :host {
16
16
  display: contents;
17
17
  }
18
- `,Of=hx;var Bl=class extends Q{constructor({context:o,initialValue:t}){super(),this.context=new Us(this,{context:o,initialValue:t})}updateContext(){throw new Error("Not implemented")}render(){return this.updateContext(),S`<slot></slot>`}};Bl.styles=[...Q.styles,Of];var Rf=Bl;var Se=Rf;var Ve=n=>{class o extends n{constructor(){super(...arguments);this.elementToAutoFocus=null;this.autoFocusOnMount=!1}async firstUpdated(i){super.firstUpdated(i),this.autoFocusOnMount&&(await this.updateComplete,(this.elementToAutoFocus||this).focus())}}return h([u({type:Boolean,reflect:!0,attribute:"auto-focus-on-mount"})],o.prototype,"autoFocusOnMount",2),o};var Zt=n=>{class o extends n{}return h([u({reflect:!0,type:Boolean})],o.prototype,"disabled",2),o};var ii=n=>{class o extends n{constructor(){super(...arguments);this.tabIndex=0}}return h([u({reflect:!0,type:Number})],o.prototype,"tabIndex",2),o};var Lt={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",END:"End",ENTER:"Enter",ESCAPE:"Escape",HOME:"Home",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT_TAB:"Shift+Tab",SPACE:" ",TAB:"Tab",DELETE:"Delete"};var px=n=>{let{host:o,context:t,subscribe:e,callback:i,syncProperties:a}=n,d=(i||a)&&(f=>{a&&a.forEach(v=>{o.requestUpdate(v)}),i==null||i(f)});return new Hs(o,{context:t,callback:d,subscribe:e!=null?e:!0})},mx={consume:px},Ie=mx;var Pf=(n,o)=>!!(n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING),Ff=(n,o)=>!!(n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING),ux=n=>n.getClientRects().length===0,fx=n=>{let{width:o,height:t}=n.getBoundingClientRect(),{offsetWidth:e,offsetHeight:i}=n;return e+i+t+o===0},yh=n=>{if(!(n instanceof Element))return null;let o=getComputedStyle(n),{overflowX:t,overflowY:e}=o,i=t==="auto"||t==="scroll",a=e==="auto"||e==="scroll";return i&&a?"both":i?"horizontal":a?"vertical":null},vx=n=>fx(n)||ux(n),gx=n=>{let{display:o,opacity:t,visibility:e}=n.style;return o==="none"||t==="0"||e==="hidden"||e==="collapse"},bx=n=>{let o=getComputedStyle(n);return o.visibility==="hidden"||o.height==="0"||o.display==="none"},yx=n=>getComputedStyle(n).display==="contents",Ex=n=>n.hasAttribute("hidden")||n.getAttribute("aria-hidden")==="true"||gx(n)||!yx(n)&&(bx(n)||vx(n)),Tx=n=>n.disabled,xx=n=>n.getAttribute("tabindex")!=="-1",Ax=n=>!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(n.tagName)||n instanceof HTMLAnchorElement&&n.hasAttribute("href")||n instanceof HTMLInputElement&&n.type!=="hidden"||(n instanceof HTMLAudioElement||n instanceof HTMLVideoElement)&&n.hasAttribute("controls")||(n instanceof HTMLImageElement||n instanceof HTMLObjectElement)&&n.hasAttribute("usemap")||n.hasAttribute("tabindex")&&n.tabIndex>-1),Df=(n,o)=>o.some(t=>n.matches(t));var qo=(n,o={})=>{var R,H,J,W;if(!n)return[];let t=new Set((R=o==null?void 0:o.excludedElements)!=null?R:[]),e=(H=o==null?void 0:o.includeSelectors)!=null?H:[],i=(J=o==null?void 0:o.excludeSelectors)!=null?J:[],a=(W=o==null?void 0:o.stopAtNonTabbable)!=null?W:!1,d=new Set([]),f=Z=>{if(t.has(n)||Df(Z,i)||Ex(Z)||Tx(Z))return"stop";if(a&&!(Z instanceof HTMLSlotElement)&&Z.getAttribute("tabindex")==="-1"){let ot=Z.getRootNode();if(!(ot instanceof ShadowRoot&&ot.delegatesFocus))return"stop"}return Df(Z,e)||xx(Z)&&Ax(Z)?"focusable":"continue"},v=o.customFocusableCheck?Z=>o.customFocusableCheck(Z,f(Z)):f,x=Z=>{if(Z instanceof HTMLElement){let st=v(Z);if(st==="focusable"&&d.add(Z),st==="stop")return}let ot=[];Z instanceof HTMLSlotElement?ot=Z.assignedElements({flatten:!0}):Z instanceof HTMLElement&&Z.shadowRoot?ot=Array.from(Z.shadowRoot.children):Z.children.length&&(ot=Array.from(Z.children)),ot.forEach(x)};return x(n),[...d]},ln=(n=document)=>{var t;let o=n instanceof Document?n.activeElement:n;for(;(t=o==null?void 0:o.shadowRoot)!=null&&t.activeElement;)o=o.shadowRoot.activeElement;return o},Hl=n=>n&&"isWidthOverflowing"in n&&typeof n.isWidthOverflowing=="function",Eh=n=>{let o=n.getRootNode();return o!==document&&o instanceof ShadowRoot?Eh(o.host):n},$f=n=>{let o=[n],t=n;for(;t;){let e=t.getRootNode();if(e instanceof ShadowRoot)t=e.host,o.push(t);else break}return o};var Ri=class{static get stackArray(){return Array.from(this.stack)}static getActiveTrap(){return this.stackArray.at(-1)}static addKeydownListener(o){this.currentKeydownListener=o,document.addEventListener("keydown",o)}static removeKeydownListener(){this.currentKeydownListener&&(document.removeEventListener("keydown",this.currentKeydownListener),this.currentKeydownListener=null)}static activate(o){this.stackArray.forEach(t=>{t!==o&&t.setIsFocusTrapActivated(!1)}),this.stack.add(o),this.removeKeydownListener(),this.addKeydownListener(o.handleTabKeydown.bind(o))}static deactivate(o){if(this.stack.has(o)&&(this.stack.delete(o),this.removeKeydownListener(),this.stack.size>0)){let t=this.stackArray.pop();t&&(t.setIsFocusTrapActivated(!0),this.addKeydownListener(t.handleTabKeydown.bind(t)))}}};Ri.stack=new Set,Ri.currentKeydownListener=null;var Ul=V.constructTagName("spatialnavigationprovider");var oi={DIRECTION_LEFT:"data-spatial-left",DIRECTION_RIGHT:"data-spatial-right",DIRECTION_UP:"data-spatial-up",DIRECTION_DOWN:"data-spatial-down",GO_BACK:"data-spatial-go-back",FOCUSABLE:"data-spatial-focusable",EXCLUDE:"data-spatial-exclude",NO_SCROLL:"data-spatial-noscroll",SCROLL_PARENT:"data-spatial-scroll-parent"},Th={SPATIAL_NAVIGATION_KEY_MAPPING:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown",escape:"Escape",enter:"Enter"},WEIGHTS:{alignWeight:5,orthogonalWeight:{vertical:2,horizontal:30}}};var Sx=Ul,xh=Sx;var Vf=n=>{let{x:o,y:t,width:e,height:i,left:a,top:d,right:f,bottom:v}=n.getBoundingClientRect(),x=o+e/2,R=t+i/2;return{x:o,y:t,width:e,height:i,left:a,top:d,right:f,bottom:v,xMid:x,yMid:R}},Ix=(n,o,t)=>Math.abs(t==="horizontal"?o.yMid-n.yMid:o.xMid-n.xMid),Cx=(n,o)=>o==="horizontal"?n.height/2:n.width/2,_x=(n,o,t)=>t==="horizontal"?Math.max(0,Math.min(n.bottom,o.bottom)-Math.max(n.top,o.top)):Math.max(0,Math.min(n.right,o.right)-Math.max(n.left,o.left)),wx=(n,o,t)=>o==="horizontal"?t/n.height:t/n.width,kx=(n,o,t,e)=>{let i=o.xMid-n.xMid,a=o.yMid-n.yMid,d=Math.sqrt(i*i+a*a),f=Ix(n,o,t)+Cx(n,t)*e.orthogonalWeight[t],v=_x(n,o,t),x=wx(n,t,v)*e.alignWeight;return d+f-x-Math.sqrt(v)},zf=(n,o,t,e)=>{if(!n||o.length===0)return[];if(o.length===1)return o[0]===n?[]:[{candidate:o[0],distance:0}];let i=Vf(n),a=t==="left"||t==="right"?"horizontal":"vertical";return o.reduce((d,f)=>{if(f===n)return d;let v=f.closest(`[${oi.SCROLL_PARENT}]`),x=v&&!v.contains(n)?v:f,R=Vf(x);if(t==="left"&&R.right>i.xMid||t==="right"&&R.left<i.xMid||t==="up"&&R.bottom>i.yMid||t==="down"&&R.top<i.yMid)return d;let H=kx(i,R,a,e);return d.push({candidate:f,distance:H}),d},[]).sort((d,f)=>d.distance-f.distance)};var Xo=class extends UIEvent{constructor(o,t,e){super(o,{bubbles:!0,cancelable:!0,composed:!0,view:window}),this.action=e,this.relatedTarget=t}};var dn=class extends Se{constructor(){super({context:xh});this.navigationKeyMapping=Th.SPATIAL_NAVIGATION_KEY_MAPPING;this.distanceCalculationWeights=Th.WEIGHTS;this.root=this;this.initialHistoryLength=window.history.length;this.handleKeyDownCapture=t=>{var d;if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.isNavigationKey(t.key))return;let e=!1,i=t.target,a=this.context.value.keyToActionMap[t.key];if(this.isDirectionKey(t.key)&&this.getElementSelectorForDirectionAttr(i,a)!==void 0&&(e=!0,this.focusNext(t,a)),i.parentElement&&!i.hasAttribute(oi.NO_SCROLL)){let f=(d=i.closest(`[${oi.SCROLL_PARENT}]`))!=null?d:i.parentElement,v=yh(f);if(v){let x=i.getBoundingClientRect(),R=f.getBoundingClientRect();(v==="vertical"||v==="both")&&(a==="up"&&x.top<R.top&&f.scrollTop>0&&(f.scrollTo({top:f.scrollTop-R.height/2,behavior:"auto"}),e=!0),a==="down"&&x.bottom>R.bottom&&f.scrollTop+R.height<f.scrollHeight&&(f.scrollTo({top:f.scrollTop+R.height/2,behavior:"auto"}),e=!0)),(v==="horizontal"||v==="both")&&(a==="right"&&x.left<R.left&&f.scrollLeft>0&&(f.scrollTo({left:f.scrollLeft-R.width/2,behavior:"auto"}),e=!0),a==="left"&&x.right>R.right&&f.scrollLeft+R.width<f.scrollWidth&&(f.scrollTo({left:f.scrollLeft+R.width/2,behavior:"auto"}),e=!0))}}e&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleKeyDown=t=>{var d;if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.isNavigationKey(t.key))return;let e=this.context.value.keyToActionMap[t.key],i=new Xo("navbeforeprocess",this,e);if(t.target&&((d=t.composedPath()[0]||t.target)==null||d.dispatchEvent(i)),i.defaultPrevented)return;let a=!1;switch(e){case"up":a=this.focusNext(t,"up");break;case"down":a=this.focusNext(t,"down");break;case"left":a=this.focusNext(t,"left");break;case"right":a=this.focusNext(t,"right");break;case"enter":a=this.pressEnter();break;case"escape":a=this.goBack();break;default:}a?t.preventDefault():this.dispatchEvent(new Xo("navnotarget",this,e))};this.activeElementObserverCallback=()=>{let t=this.getActiveElement();if(!t||!t.isConnected)if(this.root.contains(document.activeElement)){let e=ln();e&&this.setActiveElement(e)}else this.initActiveElement(t)};this.handleFocus=t=>{this.initActiveElement(t.target)};this.activeElementObserver=new MutationObserver(this.activeElementObserverCallback)}isNavigationKey(t){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right,this.navigationKeyMapping.enter,this.navigationKeyMapping.escape].includes(t)}isDirectionKey(t){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right].includes(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDownCapture,{capture:!0}),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("focus",this.handleFocus),this.initActiveElement()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDownCapture,{capture:!0}),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("focus",this.handleFocus),this.activeElement=void 0,this.activeElementObserver.disconnect()}static get Context(){return xh}updateContext(){let{actionToKeyMap:t}=this.context.value||{};(!t||t.left!==this.navigationKeyMapping.left||t.right!==this.navigationKeyMapping.right||t.up!==this.navigationKeyMapping.up||t.down!==this.navigationKeyMapping.down||t.enter!==this.navigationKeyMapping.enter||t.escape!==this.navigationKeyMapping.escape)&&(this.context.value={actionToKeyMap:{...this.navigationKeyMapping},keyToActionMap:Object.fromEntries(Object.entries(this.navigationKeyMapping).map(([e,i])=>[i,e]))},this.context.updateObservers())}initActiveElement(t){let e=qo(this.root);this.findActiveElement(e,t)}findActiveElement(t,e){if(!e||!t.includes(e)){let i=t[0];i&&this.setActiveElementAndFocus(i)}}focusNext(t,e){let i=Ri.getActiveTrap(),a=null,d=[],f=t.composedPath();f=f.includes(this.root)?f:[this.root];for(let v of f)if(v===i||v===this.root||yh(v)){d.push(...qo(v,{excludedElements:a?[a]:void 0,includeSelectors:[`[${oi.FOCUSABLE}]`],excludeSelectors:[`[${oi.EXCLUDE}]`]}));let x=this.focusNextInFocusableAria(d,e);if(x||v===i||v===this.root)return x&&this.emitNavBeforeFocusEvent(x,e),!!x;a=v}return!1}emitNavBeforeFocusEvent(t,e){var i;if(t){let a=new Xo("navbeforefocus",t,e);if((i=this.getActiveElement())==null||i.dispatchEvent(a),!a.defaultPrevented)return this.setActiveElementAndFocus(t),!0}return!1}getElementSelectorForDirectionAttr(t,e){var a;let i=`data-spatial-${e}`;return(a=t==null?void 0:t.getAttribute(i))!=null?a:void 0}focusNextInFocusableAria(t,e){var v,x;let i=this.getActiveElement(),a=ln(),d=t;if((!i||!d.includes(i)||i!==a)&&(a&&d.includes(a)?i=a:[i]=d,this.setActiveElement(i)),a){let R=`data-spatial-${e}`,H=$f(a).find(W=>W.hasAttribute(R)),J=H==null?void 0:H.getAttribute(R);if(H&&J){let W=H.getRootNode(),Z=(v=W==null?void 0:W.getElementById(J))!=null?v:W==null?void 0:W.querySelector(J);if(Z){let ot=qo(Z,{includeSelectors:[`[${oi.FOCUSABLE}]`],excludeSelectors:[`[${oi.EXCLUDE}]`]});if(ot.includes(Z))return Z;if(ot.length>0)d=ot;else return Z}}}return i!==ln()?i:t.length===0||(x=zf(i,d,e,this.distanceCalculationWeights)[0])==null?void 0:x.candidate}emitGoBackEvent(t){let e=new Xo("navback",t,"escape");return this.dispatchEvent(e),e.defaultPrevented}setActiveElement(t){var e;t!==((e=this.activeElement)==null?void 0:e.deref())&&(this.activeElementObserver.disconnect(),t?(this.activeElement=new WeakRef(t),t.parentNode&&this.activeElementObserver.observe(t.parentNode,{childList:!0})):this.activeElement=void 0)}setActiveElementAndFocus(t){this.setActiveElement(t),queueMicrotask(()=>t.focus())}getActiveElement(){var t;return(t=this.activeElement)==null?void 0:t.deref()}pressEnter(){let t=ln();return t instanceof HTMLElement?(t.click(),!0):!1}goBack(){let t=qo(this.root).find(i=>i.hasAttribute(oi.GO_BACK));if(!this.emitGoBackEvent(t)){if(t)return t.click(),!0;if(window.history.length>this.initialHistoryLength)return window.history.back(),!0}return!1}};h([u({attribute:!1})],dn.prototype,"navigationKeyMapping",2),h([u({attribute:!1})],dn.prototype,"distanceCalculationWeights",2);var Ah=dn;Ah.register(Ul);var Bf=Ah;var K={ENTER:"enter",ESCAPE:"escape",UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",SPACE:"space",TAB:"tab",HOME:"home",END:"end",BACKSPACE:"backspace"},Nx={[Lt.ARROW_UP]:K.UP,[Lt.ARROW_DOWN]:K.DOWN,[Lt.ARROW_LEFT]:K.LEFT,[Lt.ARROW_RIGHT]:K.RIGHT,[Lt.ENTER]:K.ENTER,[Lt.SPACE]:K.SPACE,[Lt.ESCAPE]:K.ESCAPE,[Lt.TAB]:K.TAB,[Lt.HOME]:K.HOME,[Lt.END]:K.END,[Lt.BACKSPACE]:K.BACKSPACE},re={DEFAULT:"default",SPATIAL:"spatial"},Nt=n=>{class o extends n{constructor(){super(...arguments);this.spatialNavigationContext=Ie.consume({host:this,context:Bf.Context})}getKeyboardNavMode(){var a;return((a=this.spatialNavigationContext)==null?void 0:a.value)?re.SPATIAL:re.DEFAULT}getActionForKeyEvent(i,a=!1){var v,x,R;let f=((R=(x=(v=this.spatialNavigationContext)==null?void 0:v.value)==null?void 0:x.keyToActionMap)!=null?R:Nx)[i.key];if(a){if(!(window.getComputedStyle(this).direction==="rtl"))return f;if(f===K.LEFT)return K.RIGHT;if(f===K.RIGHT)return K.LEFT}return f}isDirectionAction(i){return i===K.UP||i===K.DOWN||i===K.LEFT||i===K.RIGHT}}return o};var Ot=n=>{class o extends n{constructor(...i){super(...i);this.keyDownEventHandledFlag=!1;this.keyDownEventHandledHandler=()=>{setTimeout(()=>{this.keyDownEventHandledFlag=!1})};this.handleNavBeforeProcessEvent=i=>{this.keyDownEventHandledFlag&&i.preventDefault()};this.addEventListener("keydown",this.keyDownEventHandledHandler),this.addEventListener("navbeforeprocess",this.handleNavBeforeProcessEvent)}keyDownEventHandled(){this.keyDownEventHandledFlag=!0}get isKeyDownEventHandled(){return this.keyDownEventHandledFlag}}return o};var Tt=z`
18
+ `,Of=hx;var Bl=class extends Q{constructor({context:o,initialValue:t}){super(),this.context=new Us(this,{context:o,initialValue:t})}updateContext(){throw new Error("Not implemented")}render(){return this.updateContext(),S`<slot></slot>`}};Bl.styles=[...Q.styles,Of];var Rf=Bl;var Se=Rf;var Ve=n=>{class o extends n{constructor(){super(...arguments);this.elementToAutoFocus=null;this.autoFocusOnMount=!1}async firstUpdated(i){super.firstUpdated(i),this.autoFocusOnMount&&(await this.updateComplete,(this.elementToAutoFocus||this).focus())}}return h([u({type:Boolean,reflect:!0,attribute:"auto-focus-on-mount"})],o.prototype,"autoFocusOnMount",2),o};var Zt=n=>{class o extends n{}return h([u({reflect:!0,type:Boolean})],o.prototype,"disabled",2),o};var ii=n=>{class o extends n{constructor(){super(...arguments);this.tabIndex=0}}return h([u({reflect:!0,type:Number})],o.prototype,"tabIndex",2),o};var Lt={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",END:"End",ENTER:"Enter",ESCAPE:"Escape",HOME:"Home",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT_TAB:"Shift+Tab",SPACE:" ",TAB:"Tab",DELETE:"Delete"};var px=n=>{let{host:o,context:t,subscribe:e,callback:i,syncProperties:a}=n,d=(i||a)&&(f=>{a&&a.forEach(v=>{o.requestUpdate(v)}),i==null||i(f)});return new Hs(o,{context:t,callback:d,subscribe:e!=null?e:!0})},mx={consume:px},Ie=mx;var Pf=(n,o)=>!!(n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING),Ff=(n,o)=>!!(n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING),ux=n=>n.getClientRects().length===0,fx=n=>{let{width:o,height:t}=n.getBoundingClientRect(),{offsetWidth:e,offsetHeight:i}=n;return e+i+t+o===0},yh=n=>{if(!(n instanceof Element))return null;let o=getComputedStyle(n),{overflowX:t,overflowY:e}=o,i=t==="auto"||t==="scroll",a=e==="auto"||e==="scroll";return i&&a?"both":i?"horizontal":a?"vertical":null},vx=n=>fx(n)||ux(n),gx=n=>{let{display:o,opacity:t,visibility:e}=n.style;return o==="none"||t==="0"||e==="hidden"||e==="collapse"},bx=n=>{let o=getComputedStyle(n);return o.visibility==="hidden"||o.height==="0"||o.display==="none"},yx=n=>getComputedStyle(n).display==="contents",Ex=n=>n.hasAttribute("hidden")||n.getAttribute("aria-hidden")==="true"||gx(n)||!yx(n)&&(bx(n)||vx(n)),Tx=n=>n.disabled,xx=n=>n.getAttribute("tabindex")!=="-1",Ax=n=>!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(n.tagName)||n instanceof HTMLAnchorElement&&n.hasAttribute("href")||n instanceof HTMLInputElement&&n.type!=="hidden"||(n instanceof HTMLAudioElement||n instanceof HTMLVideoElement)&&n.hasAttribute("controls")||(n instanceof HTMLImageElement||n instanceof HTMLObjectElement)&&n.hasAttribute("usemap")||n.hasAttribute("tabindex")&&n.tabIndex>-1),Df=(n,o)=>o.some(t=>n.matches(t));var qo=(n,o={})=>{var R,H,J,W;if(!n)return[];let t=new Set((R=o==null?void 0:o.excludedElements)!=null?R:[]),e=(H=o==null?void 0:o.includeSelectors)!=null?H:[],i=(J=o==null?void 0:o.excludeSelectors)!=null?J:[],a=(W=o==null?void 0:o.stopAtNonTabbable)!=null?W:!1,d=new Set([]),f=Z=>{var ot;if(t.has(n)||Df(Z,i)||Ex(Z)||Tx(Z))return"stop";if(a&&!(Z instanceof HTMLSlotElement)&&Z.getAttribute("tabindex")==="-1"){let st=Z.getRootNode();if(!(st instanceof ShadowRoot&&st.delegatesFocus))return"stop"}return(ot=Z.shadowRoot)!=null&&ot.delegatesFocus?"continue":Df(Z,e)||xx(Z)&&Ax(Z)?"focusable":"continue"},v=o.customFocusableCheck?Z=>o.customFocusableCheck(Z,f(Z)):f,x=Z=>{if(Z instanceof HTMLElement){let st=v(Z);if(st==="focusable"&&d.add(Z),st==="stop")return}let ot=[];Z instanceof HTMLSlotElement?ot=Z.assignedElements({flatten:!0}):Z instanceof HTMLElement&&Z.shadowRoot?ot=Array.from(Z.shadowRoot.children):Z.children.length&&(ot=Array.from(Z.children)),ot.forEach(x)};return x(n),[...d]},ln=(n=document)=>{var t;let o=n instanceof Document?n.activeElement:n;for(;(t=o==null?void 0:o.shadowRoot)!=null&&t.activeElement;)o=o.shadowRoot.activeElement;return o},Hl=n=>n&&"isWidthOverflowing"in n&&typeof n.isWidthOverflowing=="function",Eh=n=>{let o=n.getRootNode();return o!==document&&o instanceof ShadowRoot?Eh(o.host):n},$f=n=>{let o=[n],t=n;for(;t;){let e=t.getRootNode();if(e instanceof ShadowRoot)t=e.host,o.push(t);else break}return o};var Ri=class{static get stackArray(){return Array.from(this.stack)}static getActiveTrap(){return this.stackArray.at(-1)}static addKeydownListener(o){this.currentKeydownListener=o,document.addEventListener("keydown",o)}static removeKeydownListener(){this.currentKeydownListener&&(document.removeEventListener("keydown",this.currentKeydownListener),this.currentKeydownListener=null)}static activate(o){this.stackArray.forEach(t=>{t!==o&&t.setIsFocusTrapActivated(!1)}),this.stack.add(o),this.removeKeydownListener(),this.addKeydownListener(o.handleTabKeydown.bind(o))}static deactivate(o){if(this.stack.has(o)&&(this.stack.delete(o),this.removeKeydownListener(),this.stack.size>0)){let t=this.stackArray.pop();t&&(t.setIsFocusTrapActivated(!0),this.addKeydownListener(t.handleTabKeydown.bind(t)))}}};Ri.stack=new Set,Ri.currentKeydownListener=null;var Ul=V.constructTagName("spatialnavigationprovider");var oi={DIRECTION_LEFT:"data-spatial-left",DIRECTION_RIGHT:"data-spatial-right",DIRECTION_UP:"data-spatial-up",DIRECTION_DOWN:"data-spatial-down",GO_BACK:"data-spatial-go-back",FOCUSABLE:"data-spatial-focusable",EXCLUDE:"data-spatial-exclude",NO_SCROLL:"data-spatial-noscroll",SCROLL_PARENT:"data-spatial-scroll-parent"},Th={SPATIAL_NAVIGATION_KEY_MAPPING:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown",escape:"Escape",enter:"Enter"},WEIGHTS:{alignWeight:5,orthogonalWeight:{vertical:2,horizontal:30}}};var Sx=Ul,xh=Sx;var Vf=n=>{let{x:o,y:t,width:e,height:i,left:a,top:d,right:f,bottom:v}=n.getBoundingClientRect(),x=o+e/2,R=t+i/2;return{x:o,y:t,width:e,height:i,left:a,top:d,right:f,bottom:v,xMid:x,yMid:R}},Ix=(n,o,t)=>Math.abs(t==="horizontal"?o.yMid-n.yMid:o.xMid-n.xMid),Cx=(n,o)=>o==="horizontal"?n.height/2:n.width/2,_x=(n,o,t)=>t==="horizontal"?Math.max(0,Math.min(n.bottom,o.bottom)-Math.max(n.top,o.top)):Math.max(0,Math.min(n.right,o.right)-Math.max(n.left,o.left)),wx=(n,o,t)=>o==="horizontal"?t/n.height:t/n.width,kx=(n,o,t,e)=>{let i=o.xMid-n.xMid,a=o.yMid-n.yMid,d=Math.sqrt(i*i+a*a),f=Ix(n,o,t)+Cx(n,t)*e.orthogonalWeight[t],v=_x(n,o,t),x=wx(n,t,v)*e.alignWeight;return d+f-x-Math.sqrt(v)},zf=(n,o,t,e)=>{if(!n||o.length===0)return[];if(o.length===1)return o[0]===n?[]:[{candidate:o[0],distance:0}];let i=Vf(n),a=t==="left"||t==="right"?"horizontal":"vertical";return o.reduce((d,f)=>{if(f===n)return d;let v=f.closest(`[${oi.SCROLL_PARENT}]`),x=v&&!v.contains(n)?v:f,R=Vf(x);if(t==="left"&&R.right>i.xMid||t==="right"&&R.left<i.xMid||t==="up"&&R.bottom>i.yMid||t==="down"&&R.top<i.yMid)return d;let H=kx(i,R,a,e);return d.push({candidate:f,distance:H}),d},[]).sort((d,f)=>d.distance-f.distance)};var Xo=class extends UIEvent{constructor(o,t,e){super(o,{bubbles:!0,cancelable:!0,composed:!0,view:window}),this.action=e,this.relatedTarget=t}};var dn=class extends Se{constructor(){super({context:xh});this.navigationKeyMapping=Th.SPATIAL_NAVIGATION_KEY_MAPPING;this.distanceCalculationWeights=Th.WEIGHTS;this.root=this;this.initialHistoryLength=window.history.length;this.handleKeyDownCapture=t=>{var d;if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.isNavigationKey(t.key))return;let e=!1,i=t.target,a=this.context.value.keyToActionMap[t.key];if(this.isDirectionKey(t.key)&&this.getElementSelectorForDirectionAttr(i,a)!==void 0&&(e=!0,this.focusNext(t,a)),i.parentElement&&!i.hasAttribute(oi.NO_SCROLL)){let f=(d=i.closest(`[${oi.SCROLL_PARENT}]`))!=null?d:i.parentElement,v=yh(f);if(v){let x=i.getBoundingClientRect(),R=f.getBoundingClientRect();(v==="vertical"||v==="both")&&(a==="up"&&x.top<R.top&&f.scrollTop>0&&(f.scrollTo({top:f.scrollTop-R.height/2,behavior:"auto"}),e=!0),a==="down"&&x.bottom>R.bottom&&f.scrollTop+R.height<f.scrollHeight&&(f.scrollTo({top:f.scrollTop+R.height/2,behavior:"auto"}),e=!0)),(v==="horizontal"||v==="both")&&(a==="right"&&x.left<R.left&&f.scrollLeft>0&&(f.scrollTo({left:f.scrollLeft-R.width/2,behavior:"auto"}),e=!0),a==="left"&&x.right>R.right&&f.scrollLeft+R.width<f.scrollWidth&&(f.scrollTo({left:f.scrollLeft+R.width/2,behavior:"auto"}),e=!0))}}e&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleKeyDown=t=>{var d;if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.isNavigationKey(t.key))return;let e=this.context.value.keyToActionMap[t.key],i=new Xo("navbeforeprocess",this,e);if(t.target&&((d=t.composedPath()[0]||t.target)==null||d.dispatchEvent(i)),i.defaultPrevented)return;let a=!1;switch(e){case"up":a=this.focusNext(t,"up");break;case"down":a=this.focusNext(t,"down");break;case"left":a=this.focusNext(t,"left");break;case"right":a=this.focusNext(t,"right");break;case"enter":a=this.pressEnter();break;case"escape":a=this.goBack();break;default:}a?t.preventDefault():this.dispatchEvent(new Xo("navnotarget",this,e))};this.activeElementObserverCallback=()=>{let t=this.getActiveElement();if(!t||!t.isConnected)if(this.root.contains(document.activeElement)){let e=ln();e&&this.setActiveElement(e)}else this.initActiveElement(t)};this.handleFocus=t=>{this.initActiveElement(t.target)};this.activeElementObserver=new MutationObserver(this.activeElementObserverCallback)}isNavigationKey(t){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right,this.navigationKeyMapping.enter,this.navigationKeyMapping.escape].includes(t)}isDirectionKey(t){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right].includes(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDownCapture,{capture:!0}),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("focus",this.handleFocus),this.initActiveElement()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDownCapture,{capture:!0}),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("focus",this.handleFocus),this.activeElement=void 0,this.activeElementObserver.disconnect()}static get Context(){return xh}updateContext(){let{actionToKeyMap:t}=this.context.value||{};(!t||t.left!==this.navigationKeyMapping.left||t.right!==this.navigationKeyMapping.right||t.up!==this.navigationKeyMapping.up||t.down!==this.navigationKeyMapping.down||t.enter!==this.navigationKeyMapping.enter||t.escape!==this.navigationKeyMapping.escape)&&(this.context.value={actionToKeyMap:{...this.navigationKeyMapping},keyToActionMap:Object.fromEntries(Object.entries(this.navigationKeyMapping).map(([e,i])=>[i,e]))},this.context.updateObservers())}initActiveElement(t){let e=qo(this.root);this.findActiveElement(e,t)}findActiveElement(t,e){if(!e||!t.includes(e)){let i=t[0];i&&this.setActiveElementAndFocus(i)}}focusNext(t,e){let i=Ri.getActiveTrap(),a=null,d=[],f=t.composedPath();f=f.includes(this.root)?f:[this.root];for(let v of f)if(v===i||v===this.root||yh(v)){d.push(...qo(v,{excludedElements:a?[a]:void 0,includeSelectors:[`[${oi.FOCUSABLE}]`],excludeSelectors:[`[${oi.EXCLUDE}]`]}));let x=this.focusNextInFocusableAria(d,e);if(x||v===i||v===this.root)return x&&this.emitNavBeforeFocusEvent(x,e),!!x;a=v}return!1}emitNavBeforeFocusEvent(t,e){var i;if(t){let a=new Xo("navbeforefocus",t,e);if((i=this.getActiveElement())==null||i.dispatchEvent(a),!a.defaultPrevented)return this.setActiveElementAndFocus(t),!0}return!1}getElementSelectorForDirectionAttr(t,e){var a;let i=`data-spatial-${e}`;return(a=t==null?void 0:t.getAttribute(i))!=null?a:void 0}focusNextInFocusableAria(t,e){var v,x;let i=this.getActiveElement(),a=ln(),d=t;if((!i||!d.includes(i)||i!==a)&&(a&&d.includes(a)?i=a:[i]=d,this.setActiveElement(i)),a){let R=`data-spatial-${e}`,H=$f(a).find(W=>W.hasAttribute(R)),J=H==null?void 0:H.getAttribute(R);if(H&&J){let W=H.getRootNode(),Z=(v=W==null?void 0:W.getElementById(J))!=null?v:W==null?void 0:W.querySelector(J);if(Z){let ot=qo(Z,{includeSelectors:[`[${oi.FOCUSABLE}]`],excludeSelectors:[`[${oi.EXCLUDE}]`]});if(ot.includes(Z))return Z;if(ot.length>0)d=ot;else return Z}}}return i!==ln()?i:t.length===0||(x=zf(i,d,e,this.distanceCalculationWeights)[0])==null?void 0:x.candidate}emitGoBackEvent(t){let e=new Xo("navback",t,"escape");return this.dispatchEvent(e),e.defaultPrevented}setActiveElement(t){var e;t!==((e=this.activeElement)==null?void 0:e.deref())&&(this.activeElementObserver.disconnect(),t?(this.activeElement=new WeakRef(t),t.parentNode&&this.activeElementObserver.observe(t.parentNode,{childList:!0})):this.activeElement=void 0)}setActiveElementAndFocus(t){this.setActiveElement(t),queueMicrotask(()=>t.focus())}getActiveElement(){var t;return(t=this.activeElement)==null?void 0:t.deref()}pressEnter(){let t=ln();return t instanceof HTMLElement?(t.click(),!0):!1}goBack(){let t=qo(this.root).find(i=>i.hasAttribute(oi.GO_BACK));if(!this.emitGoBackEvent(t)){if(t)return t.click(),!0;if(window.history.length>this.initialHistoryLength)return window.history.back(),!0}return!1}};h([u({attribute:!1})],dn.prototype,"navigationKeyMapping",2),h([u({attribute:!1})],dn.prototype,"distanceCalculationWeights",2);var Ah=dn;Ah.register(Ul);var Bf=Ah;var K={ENTER:"enter",ESCAPE:"escape",UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",SPACE:"space",TAB:"tab",HOME:"home",END:"end",BACKSPACE:"backspace"},Nx={[Lt.ARROW_UP]:K.UP,[Lt.ARROW_DOWN]:K.DOWN,[Lt.ARROW_LEFT]:K.LEFT,[Lt.ARROW_RIGHT]:K.RIGHT,[Lt.ENTER]:K.ENTER,[Lt.SPACE]:K.SPACE,[Lt.ESCAPE]:K.ESCAPE,[Lt.TAB]:K.TAB,[Lt.HOME]:K.HOME,[Lt.END]:K.END,[Lt.BACKSPACE]:K.BACKSPACE},re={DEFAULT:"default",SPATIAL:"spatial"},Nt=n=>{class o extends n{constructor(){super(...arguments);this.spatialNavigationContext=Ie.consume({host:this,context:Bf.Context})}getKeyboardNavMode(){var a;return((a=this.spatialNavigationContext)==null?void 0:a.value)?re.SPATIAL:re.DEFAULT}getActionForKeyEvent(i,a=!1){var v,x,R;let f=((R=(x=(v=this.spatialNavigationContext)==null?void 0:v.value)==null?void 0:x.keyToActionMap)!=null?R:Nx)[i.key];if(a){if(!(window.getComputedStyle(this).direction==="rtl"))return f;if(f===K.LEFT)return K.RIGHT;if(f===K.RIGHT)return K.LEFT}return f}isDirectionAction(i){return i===K.UP||i===K.DOWN||i===K.LEFT||i===K.RIGHT}}return o};var Ot=n=>{class o extends n{constructor(...i){super(...i);this.keyDownEventHandledFlag=!1;this.keyDownEventHandledHandler=()=>{setTimeout(()=>{this.keyDownEventHandledFlag=!1})};this.handleNavBeforeProcessEvent=i=>{this.keyDownEventHandledFlag&&i.preventDefault()};this.addEventListener("keydown",this.keyDownEventHandledHandler),this.addEventListener("navbeforeprocess",this.handleNavBeforeProcessEvent)}keyDownEventHandled(){this.keyDownEventHandledFlag=!0}get isKeyDownEventHandled(){return this.keyDownEventHandledFlag}}return o};var Tt=z`
19
19
  :host {
20
20
  align-items: center;
21
21
  display: flex;
@@ -2768,7 +2768,7 @@
2768
2768
  border-top-right-radius: var(--mdc-popover-arrow-border-radius);
2769
2769
  border-bottom-left-radius: 100%;
2770
2770
  }
2771
- `,Jg=[_S];var Vd=V.constructTagName("popoverportal"),$d=class extends Q{connectedCallback(){super.connectedCallback(),this.ariaHidden="true",this.style.display="none"}disconnectedCallback(){var o;super.disconnectedCallback(),(o=this.onDisconnect)==null||o.call(this)}};var zd=class{constructor(o){this.portalElement=null;this.disconnectAfterAppendTo=!1;this.arrowPixelChange=!1;this.popover=o}setupDelay(){try{let[o,t]=this.popover.delay.split(",").map(e=>{let i=parseInt(e,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${e}`);return i});return[o,t]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(o){let t=this.popover.renderRoot.querySelector('div[part="popover-hover-bridge"]');Object.assign(t.style,{top:"",left:"",right:"",bottom:""});let e=this.popover.triggerElement;if(t&&e){let i=this.popover.getBoundingClientRect(),a=e.getBoundingClientRect(),d=0;if(!a)return;let f=this.popover.offsetHeight||0,v=this.popover.offsetWidth||0,x=o.split("-")[0];switch(x==="top"||x==="bottom"?d=Math.max(0,Math.max(i.top-a.bottom,a.top-i.bottom)):(x==="left"||x==="right")&&(d=Math.max(0,Math.max(a.left-i.right,i.left-a.right))),d+=1,x){case"top":t.style.height=`${d}px`,t.style.bottom=`calc(-1 * (${d}px))`,t.style.left="50%",t.style.width=`${v}px`;break;case"left":t.style.height=`${f}px`,t.style.width=`${d}px`,t.style.right=`calc(-1.5 * (${d}px))`;break;case"right":t.style.height=`${f}px`,t.style.width=`${d}px`,t.style.left=`calc(-0.5 * (${d}px))`;break;case"bottom":default:t.style.height=`${d}px`,t.style.top=`calc(-1 * (${d}px))`,t.style.left="50%",t.style.width=`${v}px`;break}}}setupAppendTo(){var o,t;if(this.popover.appendTo){let e=document.getElementById(this.popover.appendTo);e&&!Array.from(e.children).includes(this.popover)&&(this.disconnectAfterAppendTo=!0,this.portalElement=document.createElement(Vd),this.portalElement.onDisconnect=()=>{this.popover.remove(),this.portalElement=null},(t=(o=this.popover.parentElement)==null?void 0:o.appendChild)==null||t.call(o,this.portalElement),e.appendChild(this.popover))}}cleanupAppendTo(){!this.disconnectAfterAppendTo&&this.portalElement&&this.portalElement.remove(),this.disconnectAfterAppendTo=!1}updateAriaLabels(){var o,t,e;this.popover.interactive&&this.popover.role&&(this.popover.ariaLabel||(this.popover.ariaLabel=((o=this.popover.triggerElement)==null?void 0:o.ariaLabel)||((t=this.popover.triggerElement)==null?void 0:t.textContent)||""),!this.popover.ariaLabelledby&&!this.popover.ariaLabel&&(this.popover.ariaLabelledby=((e=this.popover.triggerElement)==null?void 0:e.id)||""))}updateAriaModal(){this.popover.role===et.DIALOG||this.popover.role===et.ALERTDIALOG?this.popover.setAttribute("aria-modal","true"):this.popover.removeAttribute("aria-modal")}updateAriaExpandedAttribute(){var o,t,e;this.popover.disableAriaExpanded||((o=this.popover.triggerElement)==null||o.setAttribute("aria-expanded",`${this.popover.visible}`),(e=this.popover.triggerElement)==null||e.setAttribute("aria-haspopup",((t=this.popover.triggerElement)==null?void 0:t.getAttribute("aria-haspopup"))||this.popover.role||"dialog"))}updateArrowStyle(o,t){var R;if(!this.popover.arrowElement)return;let e=t.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[e],{x:a,y:d}=o,f=this.popover.arrowElement.getBoundingClientRect(),v=(R=this.popover.arrowElement.offsetParent)==null?void 0:R.getBoundingClientRect();if(!this.arrowPixelChange){let H=v!=null&&v[i]?12-Math.abs(f[i]-v[i]):0;Math.round(H)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let x=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",e),Object.assign(this.popover.arrowElement.style,{left:a!=null?`${a}px`:"",top:d!=null?`${d}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-x}px`})}updatePopoverStyle(o,t){Object.assign(this.popover.style,{left:`${o}px`,top:`${t}px`})}};var wt=class extends Ot(Nt(ld(od(js(Q))))){constructor(){super();this.depthManager=new vo(this);this.id="";this.triggerID="";this.trigger=Et.TRIGGER;this.placement=Et.PLACEMENT;this.color=Et.COLOR;this.visible=Et.VISIBLE;this.offset=Et.OFFSET;this.boundary=Et.BOUNDARY;this.boundaryRoot=Et.BOUNDARY_ROOT;this.focusTrap=Et.FOCUS_TRAP;this.preventScroll=Et.PREVENT_SCROLL;this.showArrow=Et.ARROW;this.closeButton=Et.CLOSE_BUTTON;this.interactive=Et.INTERACTIVE;this.delay=Et.DELAY;this.hideOnEscape=Et.HIDE_ON_ESCAPE;this.propagateEventOnEscape=Et.PROPAGATE_EVENT_ON_ESCAPE;this.hideOnBlur=Et.HIDE_ON_BLUR;this.hideOnOutsideClick=Et.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=Et.FOCUS_BACK;this.backdrop=Et.BACKDROP;this.isBackdropInvisible=Et.IS_BACKDROP_INVISIBLE;this.disableFlip=Et.DISABLE_FLIP;this.size=Et.SIZE;this.closeButtonAriaLabel=null;this.strategy=Et.STRATEGY;this.role=Et.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=Et.DISABLE_ARIA_EXPANDED;this.keepConnectedTooltipOpen=Et.KEEP_CONNECTED_TOOLTIP_OPEN;this.animationFrame=Et.ANIMATION_FRAME;this.inline=Et.INLINE;this.elementIndexToReceiveFocus=null;this.stackGroupName="";this.arrowElement=null;this.isHovered=!1;this.openDelay=0;this.closeDelay=0;this.floatingUICleanupFunction=null;this.shouldSuppressOpening=!1;this.timers=new Fd(this);this.parseTrigger=()=>{var a;let i=(((a=this.trigger)==null?void 0:a.split(" "))||[]).filter(d=>Object.values(_e).includes(d)).length>0?this.trigger:Et.TRIGGER;i==="mouseenter"&&(this.interactive?i="mouseenter click":i="mouseenter focusin"),this.trigger=i};this.setupTriggerListeners=()=>{if(this.trigger.includes("click")&&(document.addEventListener("click",this.togglePopoverVisible,{capture:!0}),this.hideOnBlur&&document.addEventListener("focusout",this.handleFocusOut,{capture:!0})),this.trigger.includes("mouseenter")){let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.addEventListener("mouseenter",this.show),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),document.addEventListener("mouseover",this.handleMouseEnter,{capture:!0}),document.addEventListener("mouseout",this.handleMouseLeave,{capture:!0})}this.trigger.includes("focusin")&&(document.addEventListener("focusin",this.handleFocusIn,{capture:!0}),this.interactive||document.addEventListener("focusout",this.handleFocusOut,{capture:!0}))};this.removeTriggerListeners=()=>{document.removeEventListener("click",this.togglePopoverVisible,{capture:!0});let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.removeEventListener("mouseenter",this.show),document.removeEventListener("mouseover",this.handleMouseEnter,{capture:!0}),document.removeEventListener("mouseout",this.handleMouseLeave,{capture:!0}),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),document.removeEventListener("focusin",this.handleFocusIn,{capture:!0}),document.removeEventListener("focusout",this.handleFocusOut,{capture:!0})};this.removeAllListeners=()=>{this.removeTriggerListeners(),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.hideOnBlur&&this.removeEventListener("focusout",this.onPopoverFocusOut)};this.onOutsidePopoverClick=t=>{if(!this.depthManager.isHostOnTop())return;let e=t.composedPath(),i=this.contains(t.target)||e.includes(this.triggerElement)||e.includes(this),a=this.backdropElement?e.includes(this.backdropElement):!1;(!i||a)&&(this.hide(),Gi.onClickOutside(this),a&&t.stopPropagation())};this.onEscapeKeydown=t=>{!this.visible||this.getActionForKeyEvent(t)!==K.ESCAPE||!this.depthManager.isHostOnTop()||(this.propagateEventOnEscape||t.stopPropagation(),t.preventDefault(),this.hide(),Gi.onEscapeKeyPressed(this),this.keyDownEventHandled())};this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()};this.isHoverWithinTrigger=t=>{let{triggerElement:e}=this,{relatedTarget:i}=t;return e&&i instanceof Element?e===i||!!(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY):!1};this.handleMouseEnter=t=>{this.isEventFromTrigger(t)&&(this.isHoverWithinTrigger(t)||(this.isHovered=!0,this.show()))};this.handleMouseLeave=t=>{this.isEventFromTrigger(t)&&(this.isHoverWithinTrigger(t)||(this.isHovered=!1,this.startCloseDelay()))};this.handleFocusOut=t=>{if(this.isEventFromTrigger(t)){if(this.hideOnBlur){let{relatedTarget:e}=t;this.contains(e)||this.hide();return}this.isHovered||this.hide()}};this.handleFocusIn=t=>{var e,i,a,d;this.isEventFromTrigger(t)&&((e=this.triggerElement)!=null&&e.matches(":focus-visible")||(d=(a=(i=this.triggerElement)==null?void 0:i.shadowRoot)==null?void 0:a.querySelector(".mdc-focus-ring"))!=null&&d.matches(":focus-visible")||this.isHovered)&&this.show()};this.cancelOpenDelay=()=>{this.timers.clearTimeout(Bi.OPEN)};this.startCloseDelay=()=>{this.cancelOpenDelay(),this.interactive?this.timers.setTimeout(Bi.HOVER,()=>{this.visible=!1},this.closeDelay):this.hide()};this.cancelCloseDelay=()=>{this.timers.clearTimeout(Bi.HOVER),this.timers.clearTimeout(Bi.CLOSE)};this.hide=()=>{this.cancelOpenDelay();let t=()=>{this.visible=!1};this.closeDelay>0?this.timers.setTimeout(Bi.CLOSE,t,this.closeDelay):(this.timers.clearTimeout(Bi.CLOSE),t())};this.togglePopoverVisible=t=>{this.isEventFromTrigger(t)&&(this.visible?this.hide():this.show())};this.positionPopover=()=>{let{triggerElement:t}=this;if(!t)return;let e=!this.boundary||this.boundary==="clippingAncestors"?"clippingAncestors":Array.from(document.querySelectorAll(this.boundary)),i=this.boundaryRoot,a=[];if(this.inline&&a.push(Zg()),a.push(Yg({boundary:e,rootBoundary:i,padding:this.boundaryPadding})),this.disableFlip||a.push(jg({boundary:e,rootBoundary:i})),this.size){let f=x=>{this.style.setProperty("--mdc-popover-internal-available-height",`${x}px`)},v=this.renderRoot.querySelector('[part="popover-content"]');a.push(qg({boundary:e,rootBoundary:i,apply({availableHeight:x}){v&&(Object.assign(v.style,{maxHeight:`${x}px`,overflowY:"auto"}),f(x))},padding:50}))}let d=0;if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector('div[part="popover-arrow"]'),this.arrowElement)){let f=this.arrowElement.offsetHeight;d=Math.sqrt(2*f**2)/2,a.push(Xg({element:this.arrowElement,padding:12}))}a.push(Wg(typeof this.offset=="number"?this.offset+d:this.offset)),this.floatingUICleanupFunction=Kg(t,this,async()=>{let{triggerElement:f}=this;if(!f)return;let v=this.adjustPlacementForRtl(this.placement),{x,y:R,middlewareData:H,placement:J}=await Qg(f,this,{placement:v,middleware:a,strategy:this.strategy});this.utils.updatePopoverStyle(x,R),H.arrow&&this.arrowElement&&this.utils.updateArrowStyle(H.arrow,J),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(J)},{animationFrame:this.animationFrame})};this.show=this.show.bind(this),this.utils=new zd(this),this.parseTrigger(),[this.openDelay,this.closeDelay]=this.utils.setupDelay()}get zIndex(){return Number.isInteger(this.internalZIndex)?this.internalZIndex:this.depthManager.getHostZIndex()}set zIndex(t){this.internalZIndex=t}get connectedTooltip(){let t=this.getRootNode().querySelectorAll(`mdc-tooltip[triggerID="${this.triggerID}"]`);return Array.from(t).find(e=>e!==this)}get triggerElement(){return this.getRootNode().querySelector(`[id="${this.triggerID}"]`)}async firstUpdated(t){super.firstUpdated(t),Gi.onCreatedPopover(this)}connectedCallback(){super.connectedCallback(),this.utils.setupAppendTo(),this.setupTriggerListeners()}async disconnectedCallback(){var t,e;super.disconnectedCallback(),this.removeAllListeners(),(t=this.deactivateFocusTrap)==null||t.call(this),this.deactivatePreventScroll(),this.moveElementBackAfterBackdropRemoval(this.triggerElement),this.removeBackdrop(),(e=this.floatingUICleanupFunction)==null||e.call(this),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),this.utils.cleanupAppendTo(),Gi.onDestroyedPopover(this)}async updated(t){if(super.updated(t),t.has("visible")){let e=t.get("visible")||!1;await this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}t.has("trigger")&&(this.parseTrigger(),this.removeTriggerListeners(),this.setupTriggerListeners()),t.has("placement")&&this.setAttribute("placement",Object.values(Mt).includes(this.placement)?this.placement:Et.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("color")&&this.setAttribute("color",Object.values(rs).includes(this.color)?this.color:Et.COLOR),t.has("appendTo")&&(this.appendTo&&this.isConnected?this.utils.setupAppendTo():this.utils.cleanupAppendTo()),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.updateAriaLabels(),t.has("role")&&(this.role===""&&(this.role=null),this.utils.updateAriaModal()),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("focusTrap")&&!this.focusTrap&&this.visible&&this.deactivateFocusTrap(),t.has("preventScroll")&&(!this.preventScroll&&this.visible?this.deactivatePreventScroll():this.preventScroll&&this.visible&&this.activatePreventScroll())}onComponentStackChanged(t){t==="removed"?this.hide():t==="moved"&&this.requestUpdate("zIndex")}async isOpenUpdated(t,e){var a,d;let{triggerElement:i}=this;t===e||!i||(e&&!this.shouldSuppressOpening?(this.depthManager.pushHost()&&this.requestUpdate("zIndex"),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.visible=!1,this.connectedTooltip.shouldSuppressOpening=!0),this.backdrop&&!this.backdropElement&&(this.createBackdrop("popover"),this.keepElementAboveBackdrop(i)),this.positionPopover(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="none")),this.hideOnEscape&&(this.addEventListener("keydown",this.onEscapeKeydown),document.addEventListener("keydown",this.onEscapeKeydown)),this.activatePreventScroll(),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick,{capture:!0}),setTimeout(()=>{var f,v,x;this.interactive&&this.focusTrap&&((f=this.activateFocusTrap)==null||f.call(this),(x=this.setInitialFocus)==null||x.call(this,(v=this.elementIndexToReceiveFocus)!=null?v:0))},0),Gi.onShowPopover(this)):(this.depthManager.popHost(),(a=this.floatingUICleanupFunction)==null||a.call(this),this.backdrop&&(this.moveElementBackAfterBackdropRemoval(i),this.removeBackdrop()),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.deactivatePreventScroll(),(d=this.deactivateFocusTrap)==null||d.call(this),this.focusBackToTrigger&&(i==null||i.focus()),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),Gi.onHidePopover(this)))}show(){if(this.shouldSuppressOpening||(this.cancelCloseDelay(),this.visible))return;let t=()=>{this.visible=!0};this.openDelay>0?this.timers.setTimeout(Bi.OPEN,t,this.openDelay):(this.timers.clearTimeout(Bi.OPEN),t())}isEventFromTrigger(t){var e;return this.triggerID?t.composed?t.composedPath().some(i=>(i==null?void 0:i.id)===this.triggerID):((e=t.target)==null?void 0:e.id)===this.triggerID:!1}isRtl(){return window.getComputedStyle(this).direction==="rtl"}adjustPlacementForRtl(t){if(!this.isRtl())return t;switch(t){case Mt.LEFT:return Mt.RIGHT;case Mt.LEFT_START:return Mt.RIGHT_START;case Mt.LEFT_END:return Mt.RIGHT_END;case Mt.RIGHT:return Mt.LEFT;case Mt.RIGHT_START:return Mt.LEFT_START;case Mt.RIGHT_END:return Mt.LEFT_END;default:return t}}render(){return this.style.zIndex=`${this.zIndex}`,S`
2771
+ `,Jg=[_S];var Vd=V.constructTagName("popoverportal"),$d=class extends Q{connectedCallback(){super.connectedCallback(),this.ariaHidden="true",this.style.display="none"}disconnectedCallback(){var o;super.disconnectedCallback(),(o=this.onDisconnect)==null||o.call(this)}};var zd=class{constructor(o){this.portalElement=null;this.disconnectAfterAppendTo=!1;this.arrowPixelChange=!1;this.popover=o}setupDelay(){try{let[o,t]=this.popover.delay.split(",").map(e=>{let i=parseInt(e,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${e}`);return i});return[o,t]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(o){let t=this.popover.renderRoot.querySelector('div[part="popover-hover-bridge"]');Object.assign(t.style,{top:"",left:"",right:"",bottom:""});let e=this.popover.triggerElement;if(t&&e){let i=this.popover.getBoundingClientRect(),a=e.getBoundingClientRect(),d=0;if(!a)return;let f=this.popover.offsetHeight||0,v=this.popover.offsetWidth||0,x=o.split("-")[0];switch(x==="top"||x==="bottom"?d=Math.max(0,Math.max(i.top-a.bottom,a.top-i.bottom)):(x==="left"||x==="right")&&(d=Math.max(0,Math.max(a.left-i.right,i.left-a.right))),d+=1,x){case"top":t.style.height=`${d}px`,t.style.bottom=`calc(-1 * (${d}px))`,t.style.left="50%",t.style.width=`${v}px`;break;case"left":t.style.height=`${f}px`,t.style.width=`${d}px`,t.style.right=`calc(-1.5 * (${d}px))`;break;case"right":t.style.height=`${f}px`,t.style.width=`${d}px`,t.style.left=`calc(-0.5 * (${d}px))`;break;case"bottom":default:t.style.height=`${d}px`,t.style.top=`calc(-1 * (${d}px))`,t.style.left="50%",t.style.width=`${v}px`;break}}}setupAppendTo(){var o,t;if(this.popover.appendTo){let e=document.getElementById(this.popover.appendTo);e&&!Array.from(e.children).includes(this.popover)&&(this.disconnectAfterAppendTo=!0,this.portalElement=document.createElement(Vd),this.portalElement.onDisconnect=()=>{this.popover.remove(),this.portalElement=null},(t=(o=this.popover.parentElement)==null?void 0:o.appendChild)==null||t.call(o,this.portalElement),e.appendChild(this.popover))}}cleanupAppendTo(){!this.disconnectAfterAppendTo&&this.portalElement&&this.portalElement.remove(),this.disconnectAfterAppendTo=!1}updateAriaLabels(){var o,t,e;this.popover.interactive&&this.popover.role&&(this.popover.ariaLabel||(this.popover.ariaLabel=((o=this.popover.triggerElement)==null?void 0:o.ariaLabel)||((t=this.popover.triggerElement)==null?void 0:t.textContent)||""),!this.popover.ariaLabelledby&&!this.popover.ariaLabel&&(this.popover.ariaLabelledby=((e=this.popover.triggerElement)==null?void 0:e.id)||""))}updateAriaModal(){this.popover.role===et.DIALOG||this.popover.role===et.ALERTDIALOG?this.popover.setAttribute("aria-modal","true"):this.popover.removeAttribute("aria-modal")}updateAriaExpandedAttribute(){var o,t,e;this.popover.disableAriaExpanded||((o=this.popover.triggerElement)==null||o.setAttribute("aria-expanded",`${this.popover.visible}`),(e=this.popover.triggerElement)==null||e.setAttribute("aria-haspopup",((t=this.popover.triggerElement)==null?void 0:t.getAttribute("aria-haspopup"))||this.popover.role||"dialog"))}updateArrowStyle(o,t){var R;if(!this.popover.arrowElement)return;let e=t.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[e],{x:a,y:d}=o,f=this.popover.arrowElement.getBoundingClientRect(),v=(R=this.popover.arrowElement.offsetParent)==null?void 0:R.getBoundingClientRect();if(!this.arrowPixelChange){let H=v!=null&&v[i]?12-Math.abs(f[i]-v[i]):0;Math.round(H)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let x=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",e),Object.assign(this.popover.arrowElement.style,{left:a!=null?`${a}px`:"",top:d!=null?`${d}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-x}px`})}updatePopoverStyle(o,t){Object.assign(this.popover.style,{left:`${o}px`,top:`${t}px`})}};var wt=class extends Ot(Nt(ld(od(js(Q))))){constructor(){super();this.depthManager=new vo(this);this.id="";this.triggerID="";this.trigger=Et.TRIGGER;this.placement=Et.PLACEMENT;this.color=Et.COLOR;this.visible=Et.VISIBLE;this.offset=Et.OFFSET;this.boundary=Et.BOUNDARY;this.boundaryRoot=Et.BOUNDARY_ROOT;this.focusTrap=Et.FOCUS_TRAP;this.preventScroll=Et.PREVENT_SCROLL;this.showArrow=Et.ARROW;this.closeButton=Et.CLOSE_BUTTON;this.interactive=Et.INTERACTIVE;this.delay=Et.DELAY;this.hideOnEscape=Et.HIDE_ON_ESCAPE;this.propagateEventOnEscape=Et.PROPAGATE_EVENT_ON_ESCAPE;this.hideOnBlur=Et.HIDE_ON_BLUR;this.hideOnOutsideClick=Et.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=Et.FOCUS_BACK;this.backdrop=Et.BACKDROP;this.isBackdropInvisible=Et.IS_BACKDROP_INVISIBLE;this.disableFlip=Et.DISABLE_FLIP;this.size=Et.SIZE;this.closeButtonAriaLabel=null;this.strategy=Et.STRATEGY;this.role=Et.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=Et.DISABLE_ARIA_EXPANDED;this.keepConnectedTooltipOpen=Et.KEEP_CONNECTED_TOOLTIP_OPEN;this.animationFrame=Et.ANIMATION_FRAME;this.inline=Et.INLINE;this.elementIndexToReceiveFocus=null;this.stackGroupName="";this.arrowElement=null;this.isHovered=!1;this.openDelay=0;this.closeDelay=0;this.floatingUICleanupFunction=null;this.shouldSuppressOpening=!1;this.timers=new Fd(this);this.parseTrigger=()=>{var a;let i=(((a=this.trigger)==null?void 0:a.split(" "))||[]).filter(d=>Object.values(_e).includes(d)).length>0?this.trigger:Et.TRIGGER;i==="mouseenter"&&(this.interactive?i="mouseenter click":i="mouseenter focusin"),this.trigger=i};this.setupTriggerListeners=()=>{if(this.trigger.includes("click")&&(document.addEventListener("click",this.togglePopoverVisible,{capture:!0}),this.hideOnBlur&&document.addEventListener("focusout",this.handleFocusOut,{capture:!0})),this.trigger.includes("mouseenter")){let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.addEventListener("mouseenter",this.show),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),document.addEventListener("mouseover",this.handleMouseEnter,{capture:!0}),document.addEventListener("mouseout",this.handleMouseLeave,{capture:!0})}this.trigger.includes("focusin")&&(document.addEventListener("focusin",this.handleFocusIn,{capture:!0}),this.interactive||document.addEventListener("focusout",this.handleFocusOut,{capture:!0}))};this.removeTriggerListeners=()=>{document.removeEventListener("click",this.togglePopoverVisible,{capture:!0});let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.removeEventListener("mouseenter",this.show),document.removeEventListener("mouseover",this.handleMouseEnter,{capture:!0}),document.removeEventListener("mouseout",this.handleMouseLeave,{capture:!0}),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),document.removeEventListener("focusin",this.handleFocusIn,{capture:!0}),document.removeEventListener("focusout",this.handleFocusOut,{capture:!0})};this.removeAllListeners=()=>{this.removeTriggerListeners(),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.hideOnBlur&&this.removeEventListener("focusout",this.onPopoverFocusOut)};this.onOutsidePopoverClick=t=>{if(!this.depthManager.isHostOnTop())return;let e=t.composedPath(),i=this.contains(t.target)||e.includes(this.triggerElement)||e.includes(this),a=this.backdropElement?e.includes(this.backdropElement):!1;(!i||a)&&(this.hide(),Gi.onClickOutside(this),a&&t.stopPropagation())};this.onEscapeKeydown=t=>{!this.visible||this.getActionForKeyEvent(t)!==K.ESCAPE||!this.depthManager.isHostOnTop()||(this.propagateEventOnEscape||t.stopPropagation(),t.preventDefault(),this.hide(),Gi.onEscapeKeyPressed(this),this.keyDownEventHandled())};this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()};this.isHoverWithinTrigger=t=>{let{triggerElement:e}=this,{relatedTarget:i}=t;return e&&i instanceof Element?e===i||!!(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY):!1};this.handleMouseEnter=t=>{this.isEventFromTrigger(t)&&(this.isHoverWithinTrigger(t)||(this.isHovered=!0,this.show()))};this.handleMouseLeave=t=>{this.isEventFromTrigger(t)&&(this.isHoverWithinTrigger(t)||(this.isHovered=!1,this.startCloseDelay()))};this.handleFocusOut=t=>{if(this.isEventFromTrigger(t)){if(this.hideOnBlur){let{relatedTarget:e}=t;this.contains(e)||this.hide();return}this.isHovered||this.hide()}};this.handleFocusIn=t=>{var e,i,a,d;this.isEventFromTrigger(t)&&((e=this.triggerElement)!=null&&e.matches(":focus-visible")||(d=(a=(i=this.triggerElement)==null?void 0:i.shadowRoot)==null?void 0:a.querySelector(".mdc-focus-ring"))!=null&&d.matches(":focus-visible")||this.isHovered)&&this.show()};this.cancelOpenDelay=()=>{this.timers.clearTimeout(Bi.OPEN)};this.startCloseDelay=()=>{this.cancelOpenDelay(),this.interactive?this.timers.setTimeout(Bi.HOVER,()=>{this.visible=!1},this.closeDelay):this.hide()};this.cancelCloseDelay=()=>{this.timers.clearTimeout(Bi.HOVER),this.timers.clearTimeout(Bi.CLOSE)};this.hide=()=>{this.cancelOpenDelay();let t=()=>{this.visible=!1};this.closeDelay>0?this.timers.setTimeout(Bi.CLOSE,t,this.closeDelay):(this.timers.clearTimeout(Bi.CLOSE),t())};this.togglePopoverVisible=t=>{this.isEventFromTrigger(t)&&(this.visible?this.hide():this.show())};this.positionPopover=()=>{let{triggerElement:t}=this;if(!t)return;let e=!this.boundary||this.boundary==="clippingAncestors"?"clippingAncestors":Array.from(document.querySelectorAll(this.boundary)),i=this.boundaryRoot,a=0;if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector('div[part="popover-arrow"]'),this.arrowElement)){let f=this.arrowElement.offsetHeight;a=Math.sqrt(2*f**2)/2}let d=[];if(this.inline&&d.push(Zg()),d.push(Wg(typeof this.offset=="number"?this.offset+a:this.offset)),d.push(Yg({boundary:e,rootBoundary:i,padding:this.boundaryPadding})),this.disableFlip||d.push(jg({boundary:e,rootBoundary:i})),this.size){let f=x=>{this.style.setProperty("--mdc-popover-internal-available-height",`${x}px`)},v=this.renderRoot.querySelector('[part="popover-content"]');d.push(qg({boundary:e,rootBoundary:i,apply({availableHeight:x}){v&&(Object.assign(v.style,{maxHeight:`${x}px`,overflowY:"auto"}),f(x))},padding:50}))}this.showArrow&&this.arrowElement&&d.push(Xg({element:this.arrowElement,padding:12})),this.floatingUICleanupFunction=Kg(t,this,async()=>{let{triggerElement:f}=this;if(!f)return;let v=this.adjustPlacementForRtl(this.placement),{x,y:R,middlewareData:H,placement:J}=await Qg(f,this,{placement:v,middleware:d,strategy:this.strategy});this.utils.updatePopoverStyle(x,R),H.arrow&&this.arrowElement&&this.utils.updateArrowStyle(H.arrow,J),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(J)},{animationFrame:this.animationFrame})};this.show=this.show.bind(this),this.utils=new zd(this),this.parseTrigger(),[this.openDelay,this.closeDelay]=this.utils.setupDelay()}get zIndex(){return Number.isInteger(this.internalZIndex)?this.internalZIndex:this.depthManager.getHostZIndex()}set zIndex(t){this.internalZIndex=t}get connectedTooltip(){let t=this.getRootNode().querySelectorAll(`mdc-tooltip[triggerID="${this.triggerID}"]`);return Array.from(t).find(e=>e!==this)}get triggerElement(){return this.getRootNode().querySelector(`[id="${this.triggerID}"]`)}async firstUpdated(t){super.firstUpdated(t),Gi.onCreatedPopover(this)}connectedCallback(){super.connectedCallback(),this.utils.setupAppendTo(),this.setupTriggerListeners()}async disconnectedCallback(){var t,e;super.disconnectedCallback(),this.removeAllListeners(),(t=this.deactivateFocusTrap)==null||t.call(this),this.deactivatePreventScroll(),this.moveElementBackAfterBackdropRemoval(this.triggerElement),this.removeBackdrop(),(e=this.floatingUICleanupFunction)==null||e.call(this),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),this.utils.cleanupAppendTo(),Gi.onDestroyedPopover(this)}async updated(t){if(super.updated(t),t.has("visible")){let e=t.get("visible")||!1;await this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}t.has("trigger")&&(this.parseTrigger(),this.removeTriggerListeners(),this.setupTriggerListeners()),t.has("placement")&&this.setAttribute("placement",Object.values(Mt).includes(this.placement)?this.placement:Et.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("color")&&this.setAttribute("color",Object.values(rs).includes(this.color)?this.color:Et.COLOR),t.has("appendTo")&&(this.appendTo&&this.isConnected?this.utils.setupAppendTo():this.utils.cleanupAppendTo()),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.updateAriaLabels(),t.has("role")&&(this.role===""&&(this.role=null),this.utils.updateAriaModal()),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("focusTrap")&&!this.focusTrap&&this.visible&&this.deactivateFocusTrap(),t.has("preventScroll")&&(!this.preventScroll&&this.visible?this.deactivatePreventScroll():this.preventScroll&&this.visible&&this.activatePreventScroll())}onComponentStackChanged(t){t==="removed"?this.hide():t==="moved"&&this.requestUpdate("zIndex")}async isOpenUpdated(t,e){var a,d;let{triggerElement:i}=this;t===e||!i||(e&&!this.shouldSuppressOpening?(this.depthManager.pushHost()&&this.requestUpdate("zIndex"),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.visible=!1,this.connectedTooltip.shouldSuppressOpening=!0),this.backdrop&&!this.backdropElement&&(this.createBackdrop("popover"),this.keepElementAboveBackdrop(i)),this.positionPopover(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="none")),this.hideOnEscape&&(this.addEventListener("keydown",this.onEscapeKeydown),document.addEventListener("keydown",this.onEscapeKeydown)),this.activatePreventScroll(),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick,{capture:!0}),setTimeout(()=>{var f,v,x;this.interactive&&this.focusTrap&&((f=this.activateFocusTrap)==null||f.call(this),(x=this.setInitialFocus)==null||x.call(this,(v=this.elementIndexToReceiveFocus)!=null?v:0))},0),Gi.onShowPopover(this)):(this.depthManager.popHost(),(a=this.floatingUICleanupFunction)==null||a.call(this),this.backdrop&&(this.moveElementBackAfterBackdropRemoval(i),this.removeBackdrop()),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.deactivatePreventScroll(),(d=this.deactivateFocusTrap)==null||d.call(this),this.focusBackToTrigger&&(i==null||i.focus()),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),Gi.onHidePopover(this)))}show(){if(this.shouldSuppressOpening||(this.cancelCloseDelay(),this.visible))return;let t=()=>{this.visible=!0};this.openDelay>0?this.timers.setTimeout(Bi.OPEN,t,this.openDelay):(this.timers.clearTimeout(Bi.OPEN),t())}isEventFromTrigger(t){var e;return this.triggerID?t.composed?t.composedPath().some(i=>(i==null?void 0:i.id)===this.triggerID):((e=t.target)==null?void 0:e.id)===this.triggerID:!1}isRtl(){return window.getComputedStyle(this).direction==="rtl"}adjustPlacementForRtl(t){if(!this.isRtl())return t;switch(t){case Mt.LEFT:return Mt.RIGHT;case Mt.LEFT_START:return Mt.RIGHT_START;case Mt.LEFT_END:return Mt.RIGHT_END;case Mt.RIGHT:return Mt.LEFT;case Mt.RIGHT_START:return Mt.LEFT_START;case Mt.RIGHT_END:return Mt.LEFT_END;default:return t}}render(){return this.style.zIndex=`${this.zIndex}`,S`
2772
2772
  <div part="popover-hover-bridge"></div>
2773
2773
  ${this.closeButton?S` <mdc-button
2774
2774
  part="popover-close"
@@ -5869,20 +5869,21 @@
5869
5869
  display: contents;
5870
5870
  }
5871
5871
 
5872
- :host(:hover)::part(static-radio) {
5872
+ :host(:hover)::part(radio-indicator) {
5873
5873
  --mdc-staticradio-outer-circle-background-color: var(--mds-color-theme-control-inactive-hover);
5874
+ cursor: pointer;
5874
5875
  }
5875
5876
 
5876
- :host(:active)::part(static-radio) {
5877
+ :host(:active)::part(radio-indicator) {
5877
5878
  --mdc-staticradio-outer-circle-background-color: var(--mds-color-theme-control-inactive-pressed);
5878
5879
  }
5879
5880
 
5880
- :host([checked]:hover)::part(static-radio) {
5881
+ :host([checked]:hover)::part(radio-indicator) {
5881
5882
  --mdc-staticradio-outer-circle-border-color: var(--mds-color-theme-control-active-hover);
5882
5883
  --mdc-staticradio-outer-circle-background-color: var(--mds-color-theme-control-active-hover);
5883
5884
  }
5884
5885
 
5885
- :host([checked]:active)::part(static-radio) {
5886
+ :host([checked]:active)::part(radio-indicator) {
5886
5887
  --mdc-staticradio-outer-circle-border-color: var(--mds-color-theme-control-active-pressed);
5887
5888
  --mdc-staticradio-outer-circle-background-color: var(--mds-color-theme-control-active-pressed);
5888
5889
  }