import{D as e,M as t,N as n,O as r,P as i,S as a,T as o,_ as s,g as c,j as l,k as u,o as d,s as f,x as p}from"./button-cHQg_W3T.js";function m(e,t=w){let n=_(e,t);return n&&(n.tabIndex=0,n.focus()),n}function h(e,t=w){let n=v(e,t);return n&&(n.tabIndex=0,n.focus()),n}function g(e,t=w){for(let n=0;n<e.length;n++){let r=e[n];if(r.tabIndex===0&&t(r))return{item:r,index:n}}return null}function _(e,t=w){for(let n of e)if(t(n))return n;return null}function v(e,t=w){for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r))return r}return null}function y(e,t,n=w,r=!0){for(let i=1;i<e.length;i++){let a=(i+t)%e.length;if(a<t&&!r)return null;let o=e[a];if(n(o))return o}return e[t]?e[t]:null}function b(e,t,n=w,r=!0){for(let i=1;i<e.length;i++){let a=(t-i+e.length)%e.length;if(a>t&&!r)return null;let o=e[a];if(n(o))return o}return e[t]?e[t]:null}function x(e,t,n=w,r=!0){if(t){let i=y(e,t.index,n,r);return i&&(i.tabIndex=0,i.focus()),i}else return m(e,n)}function S(e,t,n=w,r=!0){if(t){let i=b(e,t.index,n,r);return i&&(i.tabIndex=0,i.focus()),i}else return h(e,n)}function C(){return new Event(`request-activation`,{bubbles:!0,composed:!0})}function w(e){return!e.disabled}var T={ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowUp:`ArrowUp`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`},E=class{constructor(e){this.handleKeydown=e=>{let t=e.key;if(e.defaultPrevented||!this.isNavigableKey(t))return;let n=this.items;if(!n.length)return;let r=g(n,this.isActivatable);e.preventDefault();let i=this.isRtl(),a=i?T.ArrowRight:T.ArrowLeft,o=i?T.ArrowLeft:T.ArrowRight,s=null;switch(t){case T.ArrowDown:case o:s=x(n,r,this.isActivatable,this.wrapNavigation());break;case T.ArrowUp:case a:s=S(n,r,this.isActivatable,this.wrapNavigation());break;case T.Home:s=m(n,this.isActivatable);break;case T.End:s=h(n,this.isActivatable);break;default:break}s&&r&&r.item!==s&&(r.item.tabIndex=-1)},this.onDeactivateItems=()=>{let e=this.items;for(let t of e)this.deactivateItem(t)},this.onRequestActivation=e=>{this.onDeactivateItems();let t=e.target;this.activateItem(t),t.focus()},this.onSlotchange=()=>{let e=this.items,t=!1;for(let n of e){if(!n.disabled&&n.tabIndex>-1&&!t){t=!0,n.tabIndex=0;continue}n.tabIndex=-1}if(t)return;let n=_(e,this.isActivatable);n&&(n.tabIndex=0)};let{isItem:t,getPossibleItems:n,isRtl:r,deactivateItem:i,activateItem:a,isNavigableKey:o,isActivatable:s,wrapNavigation:c}=e;this.isItem=t,this.getPossibleItems=n,this.isRtl=r,this.deactivateItem=i,this.activateItem=a,this.isNavigableKey=o,this.isActivatable=s,this.wrapNavigation=c??(()=>!0)}get items(){let e=this.getPossibleItems(),t=[];for(let n of e){if(this.isItem(n)){t.push(n);continue}let e=n.item;e&&this.isItem(e)&&t.push(e)}return t}activateNextItem(){let e=this.items,t=g(e,this.isActivatable);return t&&(t.item.tabIndex=-1),x(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){let e=this.items,t=g(e,this.isActivatable);return t&&(t.item.tabIndex=-1),S(e,t,this.isActivatable,this.wrapNavigation())}},D=new Set(Object.values(T)),O=class extends p{get items(){return this.listController.items}constructor(){super(),this.listController=new E({isItem:e=>e.hasAttribute(`md-list-item`),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction===`rtl`,deactivateItem:e=>{e.tabIndex=-1},activateItem:e=>{e.tabIndex=0},isNavigableKey:e=>D.has(e),isActivatable:e=>!e.disabled&&e.type!==`text`}),this.internals=this.attachInternals(),this.internals.role=`list`,this.addEventListener(`keydown`,this.listController.handleKeydown)}render(){return o`
      <slot
        @deactivate-items=${this.listController.onDeactivateItems}
        @request-activation=${this.listController.onRequestActivation}
        @slotchange=${this.listController.onSlotchange}>
      </slot>
    `}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}};i([e({flatten:!0})],O.prototype,`slotItems`,void 0);var k=t`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative}
`,A=class extends O{};A.styles=[k],A=i([n(`md-list`)],A);var j=class extends p{constructor(){super(...arguments),this.multiline=!1}render(){return o`
      <slot name="container"></slot>
      <slot class="non-text" name="start"></slot>
      <div class="text">
        <slot name="overline" @slotchange=${this.handleTextSlotChange}></slot>
        <slot
          class="default-slot"
          @slotchange=${this.handleTextSlotChange}></slot>
        <slot name="headline" @slotchange=${this.handleTextSlotChange}></slot>
        <slot
          name="supporting-text"
          @slotchange=${this.handleTextSlotChange}></slot>
      </div>
      <slot class="non-text" name="trailing-supporting-text"></slot>
      <slot class="non-text" name="end"></slot>
    `}handleTextSlotChange(){let e=!1,t=0;for(let n of this.textSlots)if(M(n)&&(t+=1),t>1){e=!0;break}this.multiline=e}};i([l({type:Boolean,reflect:!0})],j.prototype,`multiline`,void 0),i([r(`.text slot`)],j.prototype,`textSlots`,void 0);function M(e){for(let t of e.assignedNodes({flatten:!0})){let e=t.nodeType===Node.ELEMENT_NODE,n=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\S/);if(e||n)return!0}return!1}var N=t`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
`,P=class extends j{};P.styles=[N],P=i([n(`md-item`)],P);var F=c(p),I=class extends F{constructor(){super(...arguments),this.disabled=!1,this.type=`text`,this.isListItem=!0,this.href=``,this.target=``}get isDisabled(){return this.disabled&&this.type!==`link`}willUpdate(e){this.href&&(this.type=`link`),super.willUpdate(e)}render(){return this.renderListItem(o`
      <md-item>
        <div slot="container">
          ${this.renderRipple()} ${this.renderFocusRing()}
        </div>
        <slot name="start" slot="start"></slot>
        <slot name="end" slot="end"></slot>
        ${this.renderBody()}
      </md-item>
    `)}renderListItem(e){let t=this.type===`link`,n;switch(this.type){case`link`:n=d`a`;break;case`button`:n=d`button`;break;default:case`text`:n=d`li`;break}let r=this.type!==`text`,i=t&&this.target?this.target:a;return f`
      <${n}
        id="item"
        tabindex="${this.isDisabled||!r?-1:0}"
        ?disabled=${this.isDisabled}
        role="listitem"
        aria-selected=${this.ariaSelected||a}
        aria-checked=${this.ariaChecked||a}
        aria-expanded=${this.ariaExpanded||a}
        aria-haspopup=${this.ariaHasPopup||a}
        class="list-item ${s(this.getRenderClasses())}"
        href=${this.href||a}
        target=${i}
        @focus=${this.onFocus}
      >${e}</${n}>
    `}renderRipple(){return this.type===`text`?a:o` <md-ripple
      part="ripple"
      for="item"
      ?disabled=${this.isDisabled}></md-ripple>`}renderFocusRing(){return this.type===`text`?a:o` <md-focus-ring
      @visibility-changed=${this.onFocusRingVisibilityChanged}
      part="focus-ring"
      for="item"
      inward></md-focus-ring>`}onFocusRingVisibilityChanged(e){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return o`
      <slot></slot>
      <slot name="overline" slot="overline"></slot>
      <slot name="headline" slot="headline"></slot>
      <slot name="supporting-text" slot="supporting-text"></slot>
      <slot
        name="trailing-supporting-text"
        slot="trailing-supporting-text"></slot>
    `}onFocus(){this.tabIndex===-1&&this.dispatchEvent(C())}focus(){this.listItemRoot?.focus()}click(){if(!this.listItemRoot){super.click();return}this.listItemRoot.click()}};I.shadowRootOptions={...p.shadowRootOptions,delegatesFocus:!0},i([l({type:Boolean,reflect:!0})],I.prototype,`disabled`,void 0),i([l({reflect:!0})],I.prototype,`type`,void 0),i([l({type:Boolean,attribute:`md-list-item`,reflect:!0})],I.prototype,`isListItem`,void 0),i([l()],I.prototype,`href`,void 0),i([l()],I.prototype,`target`,void 0),i([u(`.list-item`)],I.prototype,`listItemRoot`,void 0);var L=t`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}
`,R=class extends I{};R.styles=[L],R=i([n(`md-list-item`)],R);